2024-12-24 15:35:59 +08:00
|
|
|
import{_ as fe}from"./index.5fa75692.js";import{Q as ce,x as Ee,O as Ve,P as Be,R as ye,y as ve,M as Ce,C as Ae,D as De,I as ke,B as ge,G as we,H as Ue,J as qe,w as xe,F as Re}from"./element-plus.b2546c95.js";import{_ as Ie}from"./index.vue_vue_type_script_setup_true_lang.20e90b1a.js";import{f as Q,b as $e}from"./index.40cea784.js";import{u as Te,a as he}from"./vue-router.10bd5b90.js";import{t as Ne,g as Pe}from"./code.1d687b90.js";import{a as Oe}from"./useDictOptions.82432a9d.js";import{d as Le}from"./dict.59be402f.js";import{m as Qe}from"./menu.d02d590b.js";import{_ as Se}from"./relations-add.vue_vue_type_script_setup_true_lang.4542b46d.js";import{l as S}from"./lodash.41b9567d.js";import{d as K,r as j,Z as z,s as G,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 I,n as ze,t as H,w as Ge}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.6de51668.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const He={class:"code-edit"},Ke={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=K({name:"tableEdit"}),Kl=K({...ul,setup(al){const J=Te(),M=he(),w=j("column"),U=j(!1),$=[{name:"\u4E00\u5BF9\u4E00",value:"has_one"},{name:"\u4E00\u5BF9\u591A",value:"has_many"}],t=z({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=G(),x=G(),h=z({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"}]}),N=async(n,e,E)=>{var f,_;U.value=!0,await ze(),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(H(n));t.relations.push(e)},Z=async n=>{const e=S.exports.cloneDeep(H(n));console.log(q),t.relations.splice(q,1,e)},X=n=>{t.relations.splice(n,1)},Y=async()=>{const n=await Ne({id:J.query.id});Object.keys(t).forEach(e=>{t[e]=n[e]}),Ge(()=>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}=Oe({dict_type:{api:Le},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
|