import{d as G,Q as H,J as L,r as i,A as ee,b as ae,a1 as le,o as r,c as f,k as e,B as l,a as t,a2 as z,F as g,i as N,a3 as te,N as E,g as u,O as d,P as _,D as F,h as M,C as pe,a7 as oe,S as re,$ as ne,R as se,U as ie,V as ue,W as de,X as me,aD as ce,Y as fe,Z as ge}from"./index-CHTXMeh8.js";import{_ as ye}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as _e}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as be}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as we}from"./formatTime-DG99nHw2.js";import{d as ve}from"./download-e0EdwhTv.js";import{b as xe,d as he,e as ke}from"./index-DABeXvnV.js";import{_ as Ce}from"./AppForm.vue_vue_type_script_setup_true_lang-BneyX8ik.js";import{g as Ne}from"./index--VQDUPBj.js";import{g as Se}from"./index-CcK5vsAD.js";import"./index-DVe591HI.js";import"./color-DXkOL5Tu.js";import"./el-card-Bdk9qx7q.js";import"./Dialog.vue_vue_type_style_index_0_lang-DH0TiLYN.js";import"./constants-CuOBQ73z.js";const Ve=["src"],Ue=G({name:"SystemApp",__name:"index",setup(Pe){const h=H(),{t:R}=L(),k=i(!0),S=i(0),V=i([]),p=ee({pageNo:1,pageSize:10,appCode:void 0,appName:void 0,status:void 0,createTime:[]}),U=i(),C=i(!1),P=i([]),T=i([]),y=async()=>{k.value=!0;try{const m=await xe(p);V.value=m.list,S.value=m.total}finally{k.value=!1}},b=()=>{p.pageNo=1,y()},Y=()=>{U.value.resetFields(),b()},A=i(),D=(m,o)=>{A.value.open(m,o)},J=async()=>{try{await h.exportConfirm(),C.value=!0;const m=await ke(p);ve.excel(m,"\u79DF\u6237\u5217\u8868.xls")}catch{}finally{C.value=!1}};return ae(async()=>{await y(),P.value=await Ne(),T.value=await Se()}),(m,o)=>{const I=oe,w=re,W=ne,$=se,v=ie,c=ue,q=de,K=be,B=_e,n=me,O=ce,Q=fe,X=ye,x=le("hasPermi"),Z=ge;return r(),f(g,null,[e(K,null,{default:l(()=>[e(q,{class:"-mb-15px",model:t(p),ref_key:"queryFormRef",ref:U,inline:!0,"label-width":"68px"},{default:l(()=>[e(w,{label:"\u5E94\u7528\u7F16\u53F7",prop:"appCode"},{default:l(()=>[e(I,{modelValue:t(p).appCode,"onUpdate:modelValue":o[0]||(o[0]=a=>t(p).appCode=a),placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u7F16\u53F7",clearable:"",onKeyup:z(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(w,{label:"\u5E94\u7528\u540D\u79F0",prop:"appName"},{default:l(()=>[e(I,{modelValue:t(p).appName,"onUpdate:modelValue":o[1]||(o[1]=a=>t(p).appName=a),placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u540D\u79F0",clearable:"",onKeyup:z(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(w,{label:"\u5E94\u7528\u72B6\u6001",prop:"status"},{default:l(()=>[e($,{modelValue:t(p).status,"onUpdate:modelValue":o[2]||(o[2]=a=>t(p).status=a),placeholder:"\u8BF7\u9009\u62E9\u5E94\u7528\u72B6\u6001",clearable:"",class:"!w-240px"},{default:l(()=>[(r(!0),f(g,null,N(t(te)(t(E).COMMON_STATUS),a=>(r(),u(W,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(w,null,{default:l(()=>[e(c,{onClick:b},{default:l(()=>[e(v,{icon:"ep:search",class:"mr-5px"}),d(" \u641C\u7D22 ")]),_:1}),e(c,{onClick:Y},{default:l(()=>[e(v,{icon:"ep:refresh",class:"mr-5px"}),d(" \u91CD\u7F6E ")]),_:1}),_((r(),u(c,{type:"primary",plain:"",onClick:o[3]||(o[3]=a=>D("create"))},{default:l(()=>[e(v,{icon:"ep:plus",class:"mr-5px"}),d(" \u65B0\u589E ")]),_:1})),[[x,["system:tenant:create"]]]),_((r(),u(c,{type:"success",plain:"",onClick:J,loading:t(C)},{default:l(()=>[e(v,{icon:"ep:download",class:"mr-5px"}),d(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[x,["system:tenant:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(K,null,{default:l(()=>[_((r(),u(Q,{data:t(V)},{default:l(()=>[e(n,{label:"\u5E94\u7528\u7C7B\u578B",align:"center",prop:"type"},{default:l(a=>[e(B,{type:t(E).SYSTEM_APP_TYPE,value:a.row.type},null,8,["type","value"])]),_:1}),e(n,{label:"\u6240\u5C5E\u79DF\u6237",align:"center",prop:"tenantId"},{default:l(a=>[(r(!0),f(g,null,N(t(P),s=>(r(),f(g,null,[s.id===a.row.tenantId?(r(),u(O,{type:"success",key:s.id},{default:l(()=>[d(F(s.name),1)]),_:2},1024)):M("",!0)],64))),256))]),_:1}),e(n,{label:"\u5E94\u7528\u5206\u7EC4",align:"center",prop:"groupId"},{default:l(a=>[(r(!0),f(g,null,N(t(T),s=>(r(),f(g,null,[s.id===a.row.groupId?(r(),u(O,{type:"warning",key:s.id},{default:l(()=>[d(F(s.name),1)]),_:2},1024)):M("",!0)],64))),256))]),_:1}),e(n,{label:"\u5E94\u7528\u7F16\u53F7",align:"center",prop:"appCode"}),e(n,{label:"\u5E94\u7528\u540D\u79F0",align:"center",prop:"appName"}),e(n,{label:"\u5E94\u7528\u57DF\u540D",align:"center",prop:"appDomain"}),e(n,{label:"\u63A5\u53E3\u57DF\u540D",align:"center",prop:"apiDomain"}),e(n,{label:"\u5E94\u7528\u8D26\u53F7",align:"center",prop:"appKey"}),e(n,{label:"\u5E94\u7528\u56FE\u6807",align:"center",prop:"logo"},{default:l(a=>[pe("img",{width:"40px",height:"40px",src:a.row.icon},null,8,Ve)]),_:1}),e(n,{label:"\u5907\u6CE8",align:"center",prop:"remark",width:"200"}),e(n,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(we)},null,8,["formatter"]),e(n,{label:"\u64CD\u4F5C",align:"center","min-width":"110",fixed:"right"},{default:l(a=>[_((r(),u(c,{link:"",type:"primary",onClick:s=>D("update",a.row.id)},{default:l(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[x,["system:app:update"]]]),_((r(),u(c,{link:"",type:"danger",onClick:s=>(async j=>{try{await h.delConfirm(),await he(j),h.success(R("common.delSuccess")),await y()}catch{}})(a.row.id)},{default:l(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[x,["system:app:delete"]]])]),_:1})]),_:1},8,["data"])),[[Z,t(k)]]),e(X,{total:t(S),page:t(p).pageNo,"onUpdate:page":o[4]||(o[4]=a=>t(p).pageNo=a),limit:t(p).pageSize,"onUpdate:limit":o[5]||(o[5]=a=>t(p).pageSize=a),onPagination:y},null,8,["total","page","limit"])]),_:1}),e(Ce,{ref_key:"formRef",ref:A,onSuccess:y},null,512)],64)}}});export{Ue as default};