moreShopAdmin/build/admin/assets/edit.e2657331.js

2 lines
17 KiB
JavaScript
Raw Permalink Normal View History

2024-11-21 17:27:37 +08:00
import{_ as fe}from"./index.f122b62f.js";import{Q as ce,x as Ee,G as Ve,H as Be,R as ye,y as ve,L as Ce,C as Ae,D as De,M as ke,B as ge,J as we,K as Ue,N as qe,w as xe,F as Re}from"./element-plus.91c68cc0.js";import{_ as $e}from"./index.vue_vue_type_script_setup_true_lang.20e90b1a.js";import{f as Q,b as Ie}from"./index.d12b3af4.js";import{u as Te,a as Ne}from"./vue-router.10bd5b90.js";import{t as he,g as Pe}from"./code.c509338d.js";import{a as Le}from"./useDictOptions.1f11cf62.js";import{d as Oe}from"./dict.cc5fd312.js";import{m as Qe}from"./menu.4dbf783b.js";import{_ as Se}from"./relations-add.vue_vue_type_script_setup_true_lang.ef730e70.js";import{l as S}from"./lodash.4e6d2a38.js";import{d as H,r as j,Z as K,s as z,b as C,o as p,c as B,U as l,L as a,u as o,j as je,a as d,T as v,a9 as A,K as y,R as b,Q as $,n as Ke,t as G,w as ze}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.e03c2e5b.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const Ge={class:"code-edit"},He={class:"w-80"},Je={class:"w-80"},Me={class:"w-80"},We={class:"w-80"},Ze={class:"w-80"},Xe={class:"w-80"},Ye={class:"w-80"},el={class:"w-80"},ll={class:"mt-4"},ul=H({name:"tableEdit"}),Hl=H({...ul,setup(al){const J=Te(),M=Ne(),w=j("column"),U=j(!1),I=[{name:"\u4E00\u5BF9\u4E00",value:"has_one"},{name:"\u4E00\u5BF9\u591A",value:"has_many"}],t=K({id:"",table_name:"",table_comment:"",author:"",remark:"",template_type:0,generate_type:0,module_name:"",class_dir:"",class_comment:"",table_column:[],menu:{pid:0,name:"",type:0},tree:{tree_id:0,tree_pid:0,tree_name:0},delete:{name:"",type:0},relations:[]});let q=0;const T=z(),x=z(),N=K({table_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u8868\u540D\u79F0"}],table_comment:[{required:!0,message:"\u8BF7\u8F93\u5165\u8868\u63CF\u8FF0"}],module_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u6A21\u5757\u540D"}],generate_type:[{required:!0,trigger:"change"}],template_type:[{required:!0,trigger:"change"}],["menu.pid"]:[{required:!0,message:"\u8BF7\u9009\u62E9\u7236\u7EA7\u83DC\u5355"}],["menu.name"]:[{required:!0,message:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0"}],["delete.type"]:[{required:!0,trigger:"change"}],["delete.name"]:[{required:!0,message:"\u8BF7\u9009\u62E9\u5220\u9664\u5B57\u6BB5"}]}),h=async(n,e,E)=>{var f,_;U.value=!0,await Ke(),e&&E!==void 0&&((f=x.value)==null||f.setFormData(e),q=E),(_=x.value)==null||_.open(n)},W=n=>{const e=S.exports.cloneDeep(G(n));t.relations.push(e)},Z=async n=>{const e=S.exports.cloneDeep(G(n));console.log(q),t.relations.splice(q,1,e)},X=n=>{t.relations.splice(n,1)},Y=async()=>{const n=await he({id:J.query.id});Object.keys(t).forEach(e=>{t[e]=n[e]}),ze(()=>t.generate_type,e=>{e==1&&Q.confirm("\u751F\u6210\u5230\u6A21\u5757\u65B9\u5F0F\u5982\u9047\u540C\u540D\u6587\u4EF6\u4F1A\u8986\u76D6\u65E7\u6587\u4EF6\uFF0C\u786E\u5B9A\u8981\u9009\u62E9\u6B64\u65B9\u5F0F\u5417\uFF1F").catch(()=>{t.generate_type=0})})},{optionsData:P}=Le({dict_type:{api:Oe},menu:{api:Qe,transformData(n){const e={id:0,name:"\u9876\u7EA7",children:[]};return e.children=n,[e]}}}),ee=async()=>{var n,e;try{await((n=T.value)==null?void 0:n.validate()),await Pe(t),M.back()}catch(E){for