1 |
- import{d as q,u as E,L as j,r,x as z,B,a,o as G,j as H,w as t,i as e,P as K,m as p,z as P,W as S,X as U,q as W,G as F,H as L,K as X}from"./index-df709923.js";import{_ as A}from"./ContentWrap.vue_vue_type_script_setup_true_lang-e908c5dd.js";import{u as D}from"./tagsView-38c5284d.js";import{_ as J}from"./BasicInfoForm.vue_vue_type_script_setup_true_lang-c43e681d.js";import{_ as M}from"./ColumInfoForm.vue_vue_type_script_setup_true_lang-b575d66e.js";import{_ as N}from"./GenerateInfoForm.vue_vue_type_script_setup_true_lang-eedad82b.js";import{g as O,u as Q}from"./index-02810897.js";import{u as Y}from"./useMessage-89e9d1aa.js";import"./el-card-91c2276d.js";import"./formRules-392c4b03.js";import"./dict.type-264bac73.js";import"./el-dropdown-item-790d67e4.js";import"./el-tree-select-880d8b15.js";import"./dict-017bf708.js";import"./tree-fd3a041e.js";import"./index-cf0c5e01.js";const Z=q({name:"InfraCodegenEditTable",__name:"EditTable",setup($){const{t:_}=P(),b=Y(),{push:y,currentRoute:g}=E(),{query:v}=j(),{delView:I}=D(),u=r(!1),m=r("colum"),f=r(),k=r(),i=r(),o=r({table:{},columns:[]}),w=async()=>{var s,l;if(a(o)){await((s=a(f))==null?void 0:s.validate()),await((l=a(i))==null?void 0:l.validate());try{await Q(o.value),b.success(_("common.updateSuccess")),c()}catch{}}},c=()=>{I(a(g)),y("/infra/codegen")};return z(()=>{(async()=>{const s=v.id;if(s){u.value=!0;try{o.value=await O(s)}finally{u.value=!1}}})()}),(s,l)=>{const n=S,R=U,d=W,V=F,h=L,x=A,C=X;return B((G(),H(x,null,{default:t(()=>[e(R,{modelValue:a(m),"onUpdate:modelValue":l[0]||(l[0]=T=>K(m)?m.value=T:null)},{default:t(()=>[e(n,{label:"\u57FA\u672C\u4FE1\u606F",name:"basicInfo"},{default:t(()=>[e(a(J),{ref_key:"basicInfoRef",ref:f,table:a(o).table},null,8,["table"])]),_:1}),e(n,{label:"\u5B57\u6BB5\u4FE1\u606F",name:"colum"},{default:t(()=>[e(a(M),{ref_key:"columInfoRef",ref:k,columns:a(o).columns},null,8,["columns"])]),_:1}),e(n,{label:"\u751F\u6210\u4FE1\u606F",name:"generateInfo"},{default:t(()=>[e(a(N),{ref_key:"generateInfoRef",ref:i,table:a(o).table,columns:a(o).columns},null,8,["table","columns"])]),_:1})]),_:1},8,["modelValue"]),e(h,null,{default:t(()=>[e(V,{style:{float:"right"}},{default:t(()=>[e(d,{loading:a(u),type:"primary",onClick:w},{default:t(()=>l[1]||(l[1]=[p("\u4FDD\u5B58")])),_:1},8,["loading"]),e(d,{onClick:c},{default:t(()=>l[2]||(l[2]=[p("\u8FD4\u56DE")])),_:1})]),_:1})]),_:1})]),_:1})),[[C,a(u)]])}}});export{Z as default};
|