1 |
- import{d as Z,B as $,r as p,f as ee,z as ae,S as te,o as n,c as b,i as e,w as l,a as t,T as M,F as v,C as K,j as i,m as c,D as h,t as P,l as le,X as re,I as oe,G as ne,H as se,p as ce,_ as ie,q as ue,J as pe,K as de,al as me,L as _e,M as fe,__tla as ye}from"./index-1e808f2e.js";import{_ as he,__tla as ge}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{_ as we,__tla as be}from"./DictTag.vue_vue_type_script_lang-5c02ebfe.js";import{_ as ve,__tla as ke}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{a as xe,D as Y,__tla as Ce}from"./dict-a31cb4ba.js";import{d as q,__tla as Ve}from"./formatTime-a348c3be.js";import{d as Te}from"./download-20922b56.js";import{T as Me,g as Ne,d as Se,e as Ue,__tla as De}from"./TenantForm-9866e9f6.js";import{g as Oe,__tla as ze}from"./index-95c7dfd0.js";import{u as Ie,__tla as Ke}from"./useMessage-5f9e8917.js";import{__tla as Pe}from"./index-73afebcf.js";import"./color-6e929987.js";import{__tla as Ye}from"./el-card-03b3588b.js";import{__tla as qe}from"./Dialog-f44f9d78.js";import"./_plugin-vue_export-helper-1b428a4d.js";import"./constants-e43f22dd.js";let A,Ae=Promise.all([(()=>{try{return ye}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return qe}catch{}})()]).then(async()=>{A=Z({name:"SystemTenant",__name:"index",setup(Fe){const k=Ie(),{t:F}=$(),x=p(!0),N=p(0),S=p([]),r=ee({pageNo:1,pageSize:10,name:void 0,contactName:void 0,contactMobile:void 0,status:void 0,createTime:[]}),U=p(),C=p(!1),D=p([]),_=async()=>{x.value=!0;try{const u=await Ne(r);S.value=u.list,N.value=u.total}finally{x.value=!1}},f=()=>{r.pageNo=1,_()},H=()=>{U.value.resetFields(),f()},O=p(),z=(u,o)=>{O.value.open(u,o)},R=async()=>{try{await k.exportConfirm(),C.value=!0;const u=await Ue(r);Te.excel(u,"\u79DF\u6237\u5217\u8868.xls")}catch{}finally{C.value=!1}};return ae(async()=>{await _(),D.value=await Oe()}),(u,o)=>{const V=re,d=oe,L=ne,j=se,B=ce,g=ie,m=ue,G=pe,I=ve,s=de,T=me,J=we,X=_e,E=he,w=te("hasPermi"),Q=fe;return n(),b(v,null,[e(I,null,{default:l(()=>[e(G,{class:"-mb-15px",model:t(r),ref_key:"queryFormRef",ref:U,inline:!0,"label-width":"68px"},{default:l(()=>[e(d,{label:"\u54C1\u724C\u65B9",prop:"name"},{default:l(()=>[e(V,{modelValue:t(r).name,"onUpdate:modelValue":o[0]||(o[0]=a=>t(r).name=a),placeholder:"\u8BF7\u8F93\u5165\u54C1\u724C\u65B9",clearable:"",onKeyup:M(f,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u8054\u7CFB\u4EBA",prop:"contactName"},{default:l(()=>[e(V,{modelValue:t(r).contactName,"onUpdate:modelValue":o[1]||(o[1]=a=>t(r).contactName=a),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA",clearable:"",onKeyup:M(f,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u8054\u7CFB\u624B\u673A",prop:"contactMobile"},{default:l(()=>[e(V,{modelValue:t(r).contactMobile,"onUpdate:modelValue":o[2]||(o[2]=a=>t(r).contactMobile=a),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u624B\u673A",clearable:"",onKeyup:M(f,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u54C1\u724C\u65B9\u72B6\u6001","label-width":"auto",prop:"status"},{default:l(()=>[e(j,{modelValue:t(r).status,"onUpdate:modelValue":o[3]||(o[3]=a=>t(r).status=a),placeholder:"\u8BF7\u9009\u62E9\u54C1\u724C\u65B9\u72B6\u6001",clearable:"",class:"!w-240px"},{default:l(()=>[(n(!0),b(v,null,K(t(xe)(t(Y).COMMON_STATUS),a=>(n(),i(L,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:l(()=>[e(B,{modelValue:t(r).createTime,"onUpdate:modelValue":o[4]||(o[4]=a=>t(r).createTime=a),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),e(d,null,{default:l(()=>[e(m,{onClick:f},{default:l(()=>[e(g,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22 ")]),_:1}),e(m,{onClick:H},{default:l(()=>[e(g,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E ")]),_:1}),h((n(),i(m,{type:"primary",plain:"",onClick:o[5]||(o[5]=a=>z("create"))},{default:l(()=>[e(g,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E ")]),_:1})),[[w,["system:tenant:create"]]]),h((n(),i(m,{type:"success",plain:"",onClick:R,loading:t(C)},{default:l(()=>[e(g,{icon:"ep:download",class:"mr-5px"}),c(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[w,["system:tenant:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(I,null,{default:l(()=>[h((n(),i(X,{data:t(S)},{default:l(()=>[e(s,{label:"\u54C1\u724C\u65B9\u7F16\u53F7",width:"100",align:"center",prop:"id"}),e(s,{label:"\u54C1\u724C\u65B9",align:"center",prop:"name"}),e(s,{label:"\u54C1\u724C\u65B9\u5957\u9910",width:"120",align:"center",prop:"packageId"},{default:l(a=>[a.row.packageId===0?(n(),i(T,{key:0,type:"danger"},{default:l(()=>[c("\u7CFB\u7EDF\u79DF\u6237")]),_:1})):(n(!0),b(v,{key:1},K(t(D),y=>(n(),b(v,null,[y.id===a.row.packageId?(n(),i(T,{type:"success",key:y.id},{default:l(()=>[c(P(y.name),1)]),_:2},1024)):le("",!0)],64))),256))]),_:1}),e(s,{label:"\u8054\u7CFB\u4EBA",align:"center",prop:"contactName"}),e(s,{label:"\u8054\u7CFB\u624B\u673A",align:"center",prop:"contactMobile"}),e(s,{label:"\u8D26\u53F7\u989D\u5EA6",align:"center",prop:"accountCount"},{default:l(a=>[e(T,null,{default:l(()=>[c(P(a.row.accountCount),1)]),_:2},1024)]),_:1}),e(s,{label:"\u8FC7\u671F\u65F6\u95F4",align:"center",prop:"expireTime",width:"180",formatter:t(q)},null,8,["formatter"]),e(s,{label:"\u7ED1\u5B9A\u57DF\u540D",align:"center",prop:"website",width:"180"}),e(s,{label:"\u54C1\u724C\u65B9\u72B6\u6001",width:"120",align:"center",prop:"status"},{default:l(a=>[e(J,{type:t(Y).COMMON_STATUS,value:a.row.status},null,8,["type","value"])]),_:1}),e(s,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(q)},null,8,["formatter"]),e(s,{label:"\u64CD\u4F5C",align:"center","min-width":"110",fixed:"right"},{default:l(a=>[h((n(),i(m,{link:"",type:"primary",onClick:y=>z("update",a.row.id)},{default:l(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["system:tenant:update"]]]),h((n(),i(m,{link:"",type:"danger",onClick:y=>(async W=>{try{await k.delConfirm(),await Se(W),k.success(F("common.delSuccess")),await _()}catch{}})(a.row.id)},{default:l(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["system:tenant:delete"]]])]),_:1})]),_:1},8,["data"])),[[Q,t(x)]]),e(E,{total:t(N),page:t(r).pageNo,"onUpdate:page":o[6]||(o[6]=a=>t(r).pageNo=a),limit:t(r).pageSize,"onUpdate:limit":o[7]||(o[7]=a=>t(r).pageSize=a),onPagination:_},null,8,["total","page","limit"])]),_:1}),e(Me,{ref_key:"formRef",ref:O,onSuccess:_},null,512)],64)}}})});export{Ae as __tla,A as default};
|