EditTable-5941d329.js 3.1 KB

1
  1. import{d as T,u as z,I as B,r as _,k as H,v as N,a,o as P,q as S,w as l,f as t,N as W,m as y,h as j,V as F,W as G,B as M,z as U,C as A,H as D,__tla as J}from"./index-73e02845.js";import{_ as K,__tla as L}from"./ContentWrap.vue_vue_type_script_setup_true_lang-589371a6.js";import{u as O,__tla as Q}from"./tagsView-ec31b381.js";import{_ as X,__tla as Y}from"./BasicInfoForm.vue_vue_type_script_setup_true_lang-a0ba4c0f.js";import{_ as Z,__tla as $}from"./ColumInfoForm.vue_vue_type_script_setup_true_lang-6cbb2e06.js";import{_ as aa,__tla as ta}from"./GenerateInfoForm.vue_vue_type_script_setup_true_lang-0ffd4d13.js";import{g as la,u as ra,__tla as ea}from"./index-668e3798.js";import{u as _a,__tla as sa}from"./useMessage-1490ad82.js";import{__tla as oa}from"./el-card-ada74e7d.js";import{__tla as ua}from"./formRules-839fbb1b.js";import{__tla as na}from"./dict.type-ac2b2e0a.js";import{__tla as ca}from"./el-dropdown-item-0e9cd13e.js";import{__tla as ma}from"./el-tree-select-a05a2d94.js";import{__tla as fa}from"./dict-0fdd6c74.js";import"./tree-fd3a041e.js";import{__tla as ia}from"./index-b7639f88.js";let d,ya=Promise.all([(()=>{try{return J}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return Y}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ia}catch{}})()]).then(async()=>{d=T({name:"InfraCodegenEditTable",__name:"EditTable",setup(da){const{t:p}=j(),h=_a(),{push:b,currentRoute:g}=z(),{query:v}=B(),{delView:I}=O(),o=_(!1),u=_("colum"),c=_(),k=_(),m=_(),r=_({table:{},columns:[]}),w=async()=>{var e,s;if(a(r)){await((e=a(c))==null?void 0:e.validate()),await((s=a(m))==null?void 0:s.validate());try{await ra(r.value),h.success(p("common.updateSuccess")),f()}catch{}}},f=()=>{I(a(g)),b("/infra/codegen")};return H(()=>{(async()=>{const e=v.id;if(e){o.value=!0;try{r.value=await la(e)}finally{o.value=!1}}})()}),(e,s)=>{const n=F,V=G,i=M,C=U,R=A,q=K,x=D;return N((P(),S(q,null,{default:l(()=>[t(V,{modelValue:a(u),"onUpdate:modelValue":s[0]||(s[0]=E=>W(u)?u.value=E:null)},{default:l(()=>[t(n,{label:"\u57FA\u672C\u4FE1\u606F",name:"basicInfo"},{default:l(()=>[t(a(X),{ref_key:"basicInfoRef",ref:c,table:a(r).table},null,8,["table"])]),_:1}),t(n,{label:"\u5B57\u6BB5\u4FE1\u606F",name:"colum"},{default:l(()=>[t(a(Z),{ref_key:"columInfoRef",ref:k,columns:a(r).columns},null,8,["columns"])]),_:1}),t(n,{label:"\u751F\u6210\u4FE1\u606F",name:"generateInfo"},{default:l(()=>[t(a(aa),{ref_key:"generateInfoRef",ref:m,table:a(r).table,columns:a(r).columns},null,8,["table","columns"])]),_:1})]),_:1},8,["modelValue"]),t(R,null,{default:l(()=>[t(C,{style:{float:"right"}},{default:l(()=>[t(i,{loading:a(o),type:"primary",onClick:w},{default:l(()=>[y("\u4FDD\u5B58")]),_:1},8,["loading"]),t(i,{onClick:f},{default:l(()=>[y("\u8FD4\u56DE")]),_:1})]),_:1})]),_:1})]),_:1})),[[x,a(o)]])}}})});export{ya as __tla,d as default};