1 |
- import{d as Y,P as Z,r as _,x as j,b as B,a4 as G,o,c as M,f as a,A as e,a as t,F as N,R as H,C as p,D as u,k as y,E as K,a3 as L,n as $,a9 as aa,V as ea,S as la,U as ta,Q as ra,J as sa,W as _a,X as oa,Y as ua,Z as na,_ as ca,__tla as pa}from"./index-f6fb8e95.js";import{_ as ia,__tla as ma}from"./DictTag-81730a57.js";import{_ as da,__tla as fa}from"./ContentWrap-96bb70ec.js";import{a as ya,D as O,__tla as ha}from"./dict-c9a7f6a4.js";import{d as va,__tla as ba}from"./formatTime-ddd96ac8.js";import{h as ka}from"./tree-0af4953a.js";import{b as wa,d as xa,__tla as Ca}from"./index-5b8dd9e6.js";import Sa,{__tla as ga}from"./DeptForm-6d0e47fb.js";import{g as Ua,__tla as Va}from"./index-28b98e3d.js";import{u as Ta,__tla as za}from"./useMessage-3b767a67.js";import"./color-6e929987.js";import{__tla as Da}from"./el-card-8db16709.js";import{__tla as Ma}from"./Dialog-ac2b0e4e.js";import{__tla as Na}from"./el-tree-select-25b2ed74.js";import"./constants-c811e5ff.js";let P,Oa=Promise.all([(()=>{try{return pa}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Na}catch{}})()]).then(async()=>{P=ca(Y({name:"SystemDept",__name:"index",setup(Pa){const C=Ta(),{t:R}=Z(),h=_(!0),S=_(),s=j({pageNo:1,pageSize:100,name:void 0,status:void 0}),g=_(),v=_(!0),b=_(!0),U=_([]),i=async()=>{h.value=!0;try{const m=await wa(s);S.value=ka(m)}finally{h.value=!1}},A=()=>{b.value=!1,v.value=!v.value,$(()=>{b.value=!0})},V=()=>{i()},F=()=>{s.pageNo=1,g.value.resetFields(),V()},T=_(),z=(m,r)=>{T.value.open(m,r)};return B(async()=>{await i(),U.value=await Ua()}),(m,r)=>{const I=aa,k=ea,J=la,q=ta,d=ra,n=sa,E=_a,D=da,c=oa,Q=ia,W=ua,w=G("hasPermi"),X=na;return o(),M(N,null,[a(D,null,{default:e(()=>[a(E,{class:"-mb-15px",model:t(s),ref_key:"queryFormRef",ref:g,inline:!0,"label-width":"68px"},{default:e(()=>[a(k,{label:"\u90E8\u95E8\u540D\u79F0",prop:"title"},{default:e(()=>[a(I,{modelValue:t(s).name,"onUpdate:modelValue":r[0]||(r[0]=l=>t(s).name=l),placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0",clearable:"",class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(k,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status"},{default:e(()=>[a(q,{modelValue:t(s).status,"onUpdate:modelValue":r[1]||(r[1]=l=>t(s).status=l),placeholder:"\u8BF7\u9009\u62E9\u90E8\u95E8\u72B6\u6001",clearable:"",class:"!w-240px"},{default:e(()=>[(o(!0),M(N,null,H(t(ya)(t(O).COMMON_STATUS),l=>(o(),p(J,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(k,null,{default:e(()=>[a(n,{onClick:V},{default:e(()=>[a(d,{icon:"ep:search",class:"mr-5px"}),u(" \u641C\u7D22")]),_:1}),a(n,{onClick:F},{default:e(()=>[a(d,{icon:"ep:refresh",class:"mr-5px"}),u(" \u91CD\u7F6E")]),_:1}),y((o(),p(n,{type:"primary",plain:"",onClick:r[2]||(r[2]=l=>z("create"))},{default:e(()=>[a(d,{icon:"ep:plus",class:"mr-5px"}),u(" \u65B0\u589E ")]),_:1})),[[w,["system:dept:create"]]]),a(n,{type:"danger",plain:"",onClick:A},{default:e(()=>[a(d,{icon:"ep:sort",class:"mr-5px"}),u(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(D,null,{default:e(()=>[t(b)?y((o(),p(W,{key:0,data:t(S),"row-key":"id","default-expand-all":t(v)},{default:e(()=>[a(c,{prop:"name",label:"\u90E8\u95E8\u540D\u79F0"}),a(c,{prop:"leader",label:"\u8D1F\u8D23\u4EBA"},{default:e(l=>{var f;return[u(K((f=t(U).find(x=>x.id===l.row.leaderUserId))==null?void 0:f.nickname),1)]}),_:1}),a(c,{prop:"sort",label:"\u6392\u5E8F"}),a(c,{prop:"status",label:"\u72B6\u6001"},{default:e(l=>[a(Q,{type:t(O).COMMON_STATUS,value:l.row.status},null,8,["type","value"])]),_:1}),a(c,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(va)},null,8,["formatter"]),a(c,{label:"\u64CD\u4F5C",align:"center"},{default:e(l=>[y((o(),p(n,{link:"",type:"primary",onClick:f=>z("update",l.row.id)},{default:e(()=>[u(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[w,["system:dept:update"]]]),y((o(),p(n,{link:"",type:"danger",onClick:f=>(async x=>{try{await C.delConfirm(),await xa(x),C.success(R("common.delSuccess")),await i()}catch{}})(l.row.id)},{default:e(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["system:dept:delete"]]])]),_:1})]),_:1},8,["data","default-expand-all"])),[[X,t(h)]]):L("",!0)]),_:1}),a(Sa,{ref_key:"formRef",ref:T,onSuccess:i},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/dept/index.vue"]])});export{Oa as __tla,P as default};
|