EditTable-2ee96569.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 S,q as W,w as l,f as t,N as j,m as y,h as F,V as G,W as M,B as P,z as Q,C as U,H as A,__tla as D}from"./index-2eab2d23.js";import{_ as J,__tla as K}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{u as L,__tla as O}from"./tagsView-fd4f3d23.js";import{_ as X,__tla as Y}from"./BasicInfoForm.vue_vue_type_script_setup_true_lang-95b5da35.js";import{_ as Z,__tla as $}from"./ColumInfoForm.vue_vue_type_script_setup_true_lang-378ab85d.js";import{_ as aa,__tla as ta}from"./GenerateInfoForm.vue_vue_type_script_setup_true_lang-4c10f017.js";import{g as la,u as ra,__tla as ea}from"./index-75c8efb1.js";import{u as _a,__tla as sa}from"./useMessage-171aa63e.js";import{__tla as oa}from"./el-card-c558f0ec.js";import{__tla as ua}from"./formRules-228bd511.js";import{__tla as na}from"./dict.type-24e55a62.js";import{__tla as ca}from"./el-dropdown-item-ca87bcd9.js";import{__tla as ma}from"./el-tree-select-4ae7c290.js";import{__tla as fa}from"./dict-1ad71b6f.js";import"./tree-fd3a041e.js";import{__tla as ia}from"./index-14739cb5.js";let d,ya=Promise.all([(()=>{try{return D}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return O}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}=F(),h=_a(),{push:b,currentRoute:g}=z(),{query:v}=B(),{delView:I}=L(),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=G,V=M,i=P,R=Q,C=U,q=J,x=A;return N((S(),W(q,null,{default:l(()=>[t(V,{modelValue:a(u),"onUpdate:modelValue":s[0]||(s[0]=E=>j(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(C,null,{default:l(()=>[t(R,{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};