2025-01-16 14:28:24 +08:00
|
|
|
import{_ as fe}from"./index.45324bab.js";import{R as ce,x as Ee,P as Ve,Q as Be,S as ye,y as ve,K as Ce,C as Ae,D as De,G as ke,B as ge,N as we,O as Ue,H as qe,w as xe,F as Re}from"./element-plus.8e273e86.js";import{_ as $e}from"./index.vue_vue_type_script_setup_true_lang.20e90b1a.js";import{f as L,b as Ie}from"./index.5ea969a0.js";import{u as Te,a as Ne}from"./vue-router.10bd5b90.js";import{t as he,g as Pe}from"./code.863ce3c5.js";import{a as Oe}from"./useDictOptions.f24011b2.js";import{d as Se}from"./dict.2484ecd9.js";import{m as Le}from"./menu.af045500.js";import{_ as Qe}from"./relations-add.vue_vue_type_script_setup_true_lang.e64fee45.js";import{l as Q}from"./lodash.41b9567d.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.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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.5cc5edf3.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const Ge={class:"code-edit"},He={class:"w-80"},We={class:"w-80"},Ze={class:"w-80"},Je={class:"w-80"},Me={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 W=Te(),Z=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)},J=n=>{const e=Q.exports.cloneDeep(G(n));t.relations.push(e)},M=async n=>{const e=Q.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:W.query.id});Object.keys(t).forEach(e=>{t[e]=n[e]}),ze(()=>t.generate_type,e=>{e==1&&L.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}=Oe({dict_type:{api:Se},menu:{api:Le,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),Z.back()}catch(E){for
|