import{d as Z,a0 as $,r as n,A as j,b as E,a1 as H,o as r,c as x,k as a,B as t,a as l,F as C,i as z,a2 as I,a3 as L,N as A,O as d,P as f,g as u,Q as aa,J as ea,a4 as la,a5 as ta,a6 as sa,R as oa,S as pa,a7 as ra,U as ia,V as na,W as ua,X as ca,Y as da,Z as ma,$ as fa}from"./index-BP6bNRoi.js";import{_ as ya}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as ba}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as _a}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as ga}from"./formatTime-DwR9f7DP.js";import{d as va}from"./download-e0EdwhTv.js";import{g as wa}from"./dict.type-FYuZ3DI6.js";import{_ as ka}from"./DictDataForm.vue_vue_type_script_setup_true_lang-BuK30qO4.js";import"./index-BZESAUPP.js";import"./color-DXkOL5Tu.js";import"./el-card-bU92WWV4.js";import"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";import"./constants-CuOBQ73z.js";const xa=Z({name:"SystemDictData",__name:"index",setup(Ca){const g=aa(),{t:F}=ea(),P=$(),v=n(!0),S=n(0),T=n([]),s=j({pageNo:1,pageSize:10,label:"",status:void 0,dictType:P.params.dictType}),h=n(),w=n(!1),V=n(),m=async()=>{v.value=!0;try{const i=await la(s);T.value=i.list,S.value=i.total}finally{v.value=!1}},k=()=>{s.pageNo=1,m()},q=()=>{h.value.resetFields(),k()},U=n(),N=(i,o)=>{U.value.open(i,o,s.dictType)},D=async()=>{try{await g.exportConfirm(),w.value=!0;const i=await sa(s);va.excel(i,"\u5B57\u5178\u6570\u636E.xls")}catch{}finally{w.value=!1}};return E(async()=>{await m(),V.value=await wa()}),(i,o)=>{const O=fa,M=oa,y=pa,W=ra,b=ia,c=na,B=ua,R=_a,p=ca,G=ba,J=da,K=ya,_=H("hasPermi"),Q=ma;return r(),x(C,null,[a(R,null,{default:t(()=>[a(B,{class:"-mb-15px",model:l(s),ref_key:"queryFormRef",ref:h,inline:!0,"label-width":"68px"},{default:t(()=>[a(y,{label:"\u5B57\u5178\u540D\u79F0",prop:"dictType"},{default:t(()=>[a(M,{modelValue:l(s).dictType,"onUpdate:modelValue":o[0]||(o[0]=e=>l(s).dictType=e),class:"!w-240px"},{default:t(()=>[(r(!0),x(C,null,z(l(V),e=>(r(),u(O,{key:e.type,label:e.name,value:e.type},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(y,{label:"\u5B57\u5178\u6807\u7B7E",prop:"label"},{default:t(()=>[a(W,{modelValue:l(s).label,"onUpdate:modelValue":o[1]||(o[1]=e=>l(s).label=e),placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u6807\u7B7E",clearable:"",onKeyup:I(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(y,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[a(M,{modelValue:l(s).status,"onUpdate:modelValue":o[2]||(o[2]=e=>l(s).status=e),placeholder:"\u6570\u636E\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(r(!0),x(C,null,z(l(L)(l(A).COMMON_STATUS),e=>(r(),u(O,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(y,null,{default:t(()=>[a(c,{onClick:k},{default:t(()=>[a(b,{icon:"ep:search",class:"mr-5px"}),d(" \u641C\u7D22")]),_:1}),a(c,{onClick:q},{default:t(()=>[a(b,{icon:"ep:refresh",class:"mr-5px"}),d(" \u91CD\u7F6E")]),_:1}),f((r(),u(c,{type:"primary",plain:"",onClick:o[3]||(o[3]=e=>N("create"))},{default:t(()=>[a(b,{icon:"ep:plus",class:"mr-5px"}),d(" \u65B0\u589E ")]),_:1})),[[_,["system:dict:create"]]]),f((r(),u(c,{type:"success",plain:"",onClick:D,loading:l(w)},{default:t(()=>[a(b,{icon:"ep:download",class:"mr-5px"}),d(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[_,["system:dict:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(R,null,{default:t(()=>[f((r(),u(J,{data:l(T)},{default:t(()=>[a(p,{label:"\u5B57\u5178\u7F16\u7801",align:"center",prop:"id"}),a(p,{label:"\u5B57\u5178\u6807\u7B7E",align:"center",prop:"label"}),a(p,{label:"\u5B57\u5178\u952E\u503C",align:"center",prop:"value"}),a(p,{label:"\u5B57\u5178\u6392\u5E8F",align:"center",prop:"sort"}),a(p,{label:"\u72B6\u6001",align:"center",prop:"status"},{default:t(e=>[a(G,{type:l(A).COMMON_STATUS,value:e.row.status},null,8,["type","value"])]),_:1}),a(p,{label:"\u989C\u8272\u7C7B\u578B",align:"center",prop:"colorType"}),a(p,{label:"CSS Class",align:"center",prop:"cssClass"}),a(p,{label:"\u5907\u6CE8",align:"center",prop:"remark","show-overflow-tooltip":""}),a(p,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:l(ga)},null,8,["formatter"]),a(p,{label:"\u64CD\u4F5C",align:"center"},{default:t(e=>[f((r(),u(c,{link:"",type:"primary",onClick:X=>N("update",e.row.id)},{default:t(()=>[d(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[_,["system:dict:update"]]]),f((r(),u(c,{link:"",type:"danger",onClick:X=>(async Y=>{try{await g.delConfirm(),await ta(Y),g.success(F("common.delSuccess")),await m()}catch{}})(e.row.id)},{default:t(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[_,["system:dict:delete"]]])]),_:1})]),_:1},8,["data"])),[[Q,l(v)]]),a(K,{total:l(S),page:l(s).pageNo,"onUpdate:page":o[4]||(o[4]=e=>l(s).pageNo=e),limit:l(s).pageSize,"onUpdate:limit":o[5]||(o[5]=e=>l(s).pageSize=e),onPagination:m},null,8,["total","page","limit"])]),_:1}),a(ka,{ref_key:"formRef",ref:U,onSuccess:m},null,512)],64)}}});export{xa as default};
|