EditTable-02543c79.js 3.0 KB

1
  1. import{d as E,u as D,N as q,r as _,z as B,D as J,a,o as M,k as S,w as l,i as t,R as U,l as d,B as j,Z as F,$ as G,s as H,I as N,J as P,M as Z,_ as $,__tla as A}from"./index-66208f93.js";import{_ as K,__tla as L}from"./ContentWrap-0715bda8.js";import{u as O,__tla as Q}from"./tagsView-cb0f0f7f.js";import W,{__tla as X}from"./BasicInfoForm-20e1d6be.js";import Y,{__tla as aa}from"./ColumInfoForm-a08f8396.js";import ta,{__tla as la}from"./GenerateInfoForm-0602aa0e.js";import{g as ea,u as ra,__tla as _a}from"./index-7ee8b860.js";import{u as sa,__tla as oa}from"./useMessage-798a77de.js";import{__tla as na}from"./el-card-a836492c.js";import{__tla as ua}from"./formRules-f0247544.js";import{__tla as ca}from"./dict.type-7a853d4d.js";import{__tla as ma}from"./el-dropdown-item-de1de94d.js";import{__tla as fa}from"./el-tree-select-18149140.js";import{__tla as ia}from"./dict-6d253095.js";import"./tree-0af4953a.js";import{__tla as da}from"./index-ade44515.js";let y,ya=Promise.all([(()=>{try{return A}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return Q}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return da}catch{}})()]).then(async()=>{y=$(E({name:"InfraCodegenEditTable",__name:"EditTable",setup(pa){const{t:p}=j(),h=sa(),{push:b,currentRoute:v}=D(),{query:g}=q(),{delView:I}=O(),o=_(!1),n=_("colum"),c=_(),w=_(),m=_(),e=_({table:{},columns:[]}),k=async()=>{var r,s;if(a(e)){await((r=a(c))==null?void 0:r.validate()),await((s=a(m))==null?void 0:s.validate());try{await ra(e.value),h.success(p("common.updateSuccess")),f()}catch{}}},f=()=>{I(a(v)),b("/infra/codegen")};return B(()=>{(async()=>{const r=g.id;if(r){o.value=!0;try{e.value=await ea(r)}finally{o.value=!1}}})()}),(r,s)=>{const u=F,R=G,i=H,V=N,T=P,x=K,z=Z;return J((M(),S(x,null,{default:l(()=>[t(R,{modelValue:a(n),"onUpdate:modelValue":s[0]||(s[0]=C=>U(n)?n.value=C:null)},{default:l(()=>[t(u,{label:"\u57FA\u672C\u4FE1\u606F",name:"basicInfo"},{default:l(()=>[t(a(W),{ref_key:"basicInfoRef",ref:c,table:a(e).table},null,8,["table"])]),_:1}),t(u,{label:"\u5B57\u6BB5\u4FE1\u606F",name:"colum"},{default:l(()=>[t(a(Y),{ref_key:"columInfoRef",ref:w,columns:a(e).columns},null,8,["columns"])]),_:1}),t(u,{label:"\u751F\u6210\u4FE1\u606F",name:"generateInfo"},{default:l(()=>[t(a(ta),{ref_key:"generateInfoRef",ref:m,table:a(e).table,columns:a(e).columns},null,8,["table","columns"])]),_:1})]),_:1},8,["modelValue"]),t(T,null,{default:l(()=>[t(V,{style:{float:"right"}},{default:l(()=>[t(i,{loading:a(o),type:"primary",onClick:k},{default:l(()=>[d("\u4FDD\u5B58")]),_:1},8,["loading"]),t(i,{onClick:f},{default:l(()=>[d("\u8FD4\u56DE")]),_:1})]),_:1})]),_:1})]),_:1})),[[z,a(o)]])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/infra/codegen/EditTable.vue"]])});export{ya as __tla,y as default};