1 |
- import{ap as b,d as Q,n as $,r as p,f as ee,o as m,l as v,w as a,i as e,a as t,j as V,C as ae,c as N,F as q,k as M,a2 as I,t as le,y as te,U as se,H as ue,E as de,D as oe,G as re,s as ne,bZ as ie,I as me,ag as pe,ah as ce,K as _e,J as fe,N as be,_ as ve,__tla as ge}from"./index-afaf388d.js";import{_ as we,__tla as ye}from"./Dialog-82c2009c.js";import{a as Ve,D as he,__tla as ke}from"./dict-0449a0a1.js";import{C as S}from"./constants-a1da293a.js";import{g as xe,__tla as Ue}from"./index-0475551a.js";import{u as Te,__tla as Ce}from"./useMessage-a290df31.js";let h,F,E,O,z,Ne=Promise.all([(()=>{try{return ge}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Ce}catch{}})()]).then(async()=>{let d;z=c=>b.get({url:"/system/tenant/page",params:c}),E=c=>b.delete({url:"/system/tenant/delete?id="+c}),O=c=>b.download({url:"/system/tenant/export-excel",params:c}),d=100,h=ve(Q({name:"SystemTenantForm",__name:"TenantForm",emits:["success"],setup(c,{expose:A,emit:B}){const{t:y}=$(),k=Te(),_=p(!1),x=p(""),f=p(!1),U=p(""),u=p({id:void 0,name:void 0,packageId:void 0,contactName:void 0,contactMobile:void 0,accountCount:void 0,expireTime:void 0,website:void 0,status:S.ENABLE,username:void 0,password:void 0}),D=ee({name:[{required:!0,message:"\u79DF\u6237\u540D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],packageId:[{required:!0,message:"\u79DF\u6237\u5957\u9910\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],contactName:[{required:!0,message:"\u8054\u7CFB\u4EBA\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],status:[{required:!0,message:"\u79DF\u6237\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],accountCount:[{required:!0,message:"\u8D26\u53F7\u989D\u5EA6\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],expireTime:[{required:!0,message:"\u8FC7\u671F\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],website:[{required:!0,message:"\u7ED1\u5B9A\u57DF\u540D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],username:[{required:!0,message:"\u7528\u6237\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],password:[{required:!0,message:"\u7528\u6237\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),w=p(),T=p([]);A({open:async(n,l)=>{if(_.value=!0,x.value=y("action."+n),U.value=n,R(),l){f.value=!0;try{u.value=await(i=>b.get({url:"/system/tenant/get?id="+i}))(l)}finally{f.value=!1}}T.value=await xe()}});const j=B,L=async()=>{if(w&&await w.value.validate()){f.value=!0;try{const n=u.value;U.value==="create"?(await(l=>b.post({url:"/system/tenant/create",data:l}))(n),k.success(y("common.createSuccess"))):(await(l=>b.put({url:"/system/tenant/update",data:l}))(n),k.success(y("common.updateSuccess"))),_.value=!1,j("success")}finally{f.value=!1}}},R=()=>{var n;u.value={id:void 0,name:void 0,packageId:void 0,contactName:void 0,contactMobile:void 0,accountCount:void 0,expireTime:void 0,website:void 0,status:S.ENABLE,username:void 0,password:void 0},(n=w.value)==null||n.resetFields()};return(n,l)=>{const i=se,o=ue,r=de,G=oe,H=re,g=ne,P=ie,J=me,K=pe,W=ce,X=_e,C=fe,Y=we,Z=be;return m(),v(Y,{modelValue:t(_),"onUpdate:modelValue":l[11]||(l[11]=s=>te(_)?_.value=s:null),title:t(x),width:"50%"},{footer:a(()=>[e(C,{disabled:t(f),type:"primary",onClick:L},{default:a(()=>[V("\u786E \u5B9A")]),_:1},8,["disabled"]),e(C,{onClick:l[10]||(l[10]=s=>_.value=!1)},{default:a(()=>[V("\u53D6 \u6D88")]),_:1})]),default:a(()=>[ae((m(),v(X,{ref_key:"formRef",ref:w,model:t(u),rules:t(D),"label-width":"80px"},{default:a(()=>[e(g,{gutter:30},{default:a(()=>[e(r,{span:"12"},{default:a(()=>[e(o,{label:"\u54C1\u724C\u65B9","label-width":d,prop:"name"},{default:a(()=>[e(i,{modelValue:t(u).name,"onUpdate:modelValue":l[0]||(l[0]=s=>t(u).name=s),placeholder:"\u8BF7\u8F93\u5165\u54C1\u724C\u65B9"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:"12"},{default:a(()=>[e(o,{label:"\u54C1\u724C\u65B9\u5957\u9910","label-width":d,prop:"packageId"},{default:a(()=>[e(H,{modelValue:t(u).packageId,"onUpdate:modelValue":l[1]||(l[1]=s=>t(u).packageId=s),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u54C1\u724C\u65B9\u5957\u9910"},{default:a(()=>[(m(!0),N(q,null,M(t(T),s=>(m(),v(G,{key:s.id,label:s.name,value:s.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(g,{gutter:30},{default:a(()=>[e(r,{span:"12"},{default:a(()=>[e(o,{label:"\u8054\u7CFB\u4EBA","label-width":d,prop:"contactName"},{default:a(()=>[e(i,{modelValue:t(u).contactName,"onUpdate:modelValue":l[2]||(l[2]=s=>t(u).contactName=s),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:"12"},{default:a(()=>[e(o,{label:"\u8054\u7CFB\u624B\u673A","label-width":d,prop:"contactMobile"},{default:a(()=>[e(i,{modelValue:t(u).contactMobile,"onUpdate:modelValue":l[3]||(l[3]=s=>t(u).contactMobile=s),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u624B\u673A"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(g,{gutter:30},{default:a(()=>[e(r,{span:"12"},{default:a(()=>[t(u).id===void 0?(m(),v(o,{key:0,label:"\u7528\u6237\u540D\u79F0","label-width":d,prop:"username"},{default:a(()=>[e(i,{modelValue:t(u).username,"onUpdate:modelValue":l[4]||(l[4]=s=>t(u).username=s),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1})):I("",!0)]),_:1}),e(r,{span:"12"},{default:a(()=>[t(u).id===void 0?(m(),v(o,{key:0,label:"\u7528\u6237\u5BC6\u7801","label-width":d,prop:"password"},{default:a(()=>[e(i,{modelValue:t(u).password,"onUpdate:modelValue":l[5]||(l[5]=s=>t(u).password=s),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u5BC6\u7801","show-password":"",type:"password"},null,8,["modelValue"])]),_:1})):I("",!0)]),_:1})]),_:1}),e(g,{gutter:30},{default:a(()=>[e(r,{span:"12"},{default:a(()=>[e(o,{label:"\u8D26\u53F7\u989D\u5EA6","label-width":d,prop:"accountCount"},{default:a(()=>[e(P,{modelValue:t(u).accountCount,"onUpdate:modelValue":l[6]||(l[6]=s=>t(u).accountCount=s),min:0,"controls-position":"right",placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7\u989D\u5EA6"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:"12"},{default:a(()=>[e(o,{label:"\u8FC7\u671F\u65F6\u95F4","label-width":d,prop:"expireTime"},{default:a(()=>[e(J,{style:{width:"200px"},modelValue:t(u).expireTime,"onUpdate:modelValue":l[7]||(l[7]=s=>t(u).expireTime=s),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8FC7\u671F\u65F6\u95F4",type:"date","value-format":"x"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(g,{gutter:30},{default:a(()=>[e(r,{span:"12"},{default:a(()=>[e(o,{label:"\u7ED1\u5B9A\u57DF\u540D","label-width":d,prop:"website"},{default:a(()=>[e(i,{modelValue:t(u).website,"onUpdate:modelValue":l[8]||(l[8]=s=>t(u).website=s),placeholder:"\u8BF7\u8F93\u5165\u7ED1\u5B9A\u57DF\u540D"},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:"12"},{default:a(()=>[e(o,{label:"\u54C1\u724C\u65B9\u72B6\u6001","label-width":d,class:"item",prop:"status"},{default:a(()=>[e(W,{modelValue:t(u).status,"onUpdate:modelValue":l[9]||(l[9]=s=>t(u).status=s)},{default:a(()=>[(m(!0),N(q,null,M(t(Ve)(t(he).COMMON_STATUS),s=>(m(),v(K,{key:s.value,label:s.value},{default:a(()=>[V(le(s.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[Z,t(f)]])]),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-a8a0b744"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/system/tenant/TenantForm.vue"]]),F=Object.freeze(Object.defineProperty({__proto__:null,default:h},Symbol.toStringTag,{value:"Module"}))});export{h as T,Ne as __tla,F as a,E as d,O as e,z as g};
|