EditTable-573e5df6.js 3.0 KB

1
  1. import{d as z,u as H,O as U,r as _,B as j,C as q,a,o as A,l as B,w as l,i as t,y as D,j as d,n as J,z as O,A as S,J as F,H as K,K as N,N as P,_ as X,__tla as G}from"./index-af173888.js";import{_ as L,__tla as M}from"./ContentWrap-b959c1be.js";import{u as Q,__tla as W}from"./tagsView-cc773b9b.js";import Y,{__tla as Z}from"./BasicInfoForm-de548246.js";import $,{__tla as aa}from"./ColumInfoForm-f4692773.js";import ta,{__tla as la}from"./GenerateInfoForm-44b98616.js";import{g as ea,u as ra,__tla as _a}from"./index-d4091e8f.js";import{u as sa,__tla as oa}from"./useMessage-170c1b43.js";import{__tla as na}from"./el-card-178b9654.js";import{__tla as ua}from"./formRules-515a78c5.js";import{__tla as ca}from"./dict.type-51edc0d0.js";import{__tla as ma}from"./el-dropdown-item-0e402ceb.js";import{__tla as fa}from"./el-tree-select-cd58540b.js";import{__tla as ia}from"./dict-093d1dfa.js";import"./tree-02f455f9.js";import{__tla as da}from"./index-5a53c3c3.js";let y,ya=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return M}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Z}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=X(z({name:"InfraCodegenEditTable",__name:"EditTable",setup(pa){const{t:p}=J(),h=sa(),{push:b,currentRoute:w}=H(),{query:g}=U(),{delView:v}=Q(),o=_(!1),n=_("colum"),c=_(),I=_(),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=()=>{v(a(w)),b("/infra/codegen")};return j(()=>{(async()=>{const r=g.id;if(r){o.value=!0;try{e.value=await ea(r)}finally{o.value=!1}}})()}),(r,s)=>{const u=O,R=S,i=F,C=K,E=N,V=L,x=P;return q((A(),B(V,null,{default:l(()=>[t(R,{modelValue:a(n),"onUpdate:modelValue":s[0]||(s[0]=T=>D(n)?n.value=T:null)},{default:l(()=>[t(u,{label:"\u57FA\u672C\u4FE1\u606F",name:"basicInfo"},{default:l(()=>[t(a(Y),{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($),{ref_key:"columInfoRef",ref:I,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(E,null,{default:l(()=>[t(C,{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})),[[x,a(o)]])}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/infra/codegen/EditTable.vue"]])});export{ya as __tla,y as default};