2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
import{G as z,H as G,L as H,M as Q,a6 as Z,N as j,O as J,B as W,C as X,w as Y,D as ee}from"./element-plus.2acb577d.js";import{f as te,b as ae}from"./index.81df6f20.js";import{d as S,s as F,r as g,Z as oe,e as le,n as B,am as ne,o as p,c as se,U as t,L as a,u as s,aa as ie,R as i,a as ue,M as E,K as f,S as re,Q as T}from"./@vue.821a47ec.js";import{_ as pe}from"./edit.vue_vue_type_script_setup_true_lang.53870c00.js";import{d as de,f as me}from"./department.23a87470.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.6bfd3540.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";import"./admin.69833b4a.js";import"./index.f292cd50.js";import"./useDictOptions.4fbfb4d7.js";const fe={class:"department"},ce=S({name:"department"}),Xe=S({...ce,setup(_e){const x=F(),c=F(),D=F();let k=!1;const C=g(!1),b=g([]),d=oe({status:"",name:""}),v=g(!1),m=async()=>{C.value=!0,b.value=await de(d),C.value=!1},h=()=>{var o;(o=D.value)==null||o.resetFields(),m()},V=async o=>{var e,n;v.value=!0,await B(),o&&((e=c.value)==null||e.setFormData({pid:o})),(n=c.value)==null||n.open("add")},K=async o=>{var e,n;v.value=!0,await B(),(e=c.value)==null||e.open("edit"),(n=c.value)==null||n.getDetail(o)},M=async o=>{await te.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:o}),m()},R=()=>{k=!k,$(b.value,k)},$=(o,e=!0)=>{var n;for(const u in o)(n=x.value)==null||n.toggleRowExpansion(o[u],e),o[u].children&&$(o[u].children,e)};return le(async()=>{await m(),B(()=>{R()})}),(o,e)=>{const n=W,u=X,w=z,P=G,r=Y,U=ee,L=H,A=ae,_=Q,I=Z,O=j,y=ne("perms"),q=J;return p(),se("div",fe,[t(L,{class:"!border-none",shadow:"never"},{default:a(()=>[t(U,{ref_key:"formRef",ref:D,class:"mb-[-16px]",model:s(d),inline:!0},{default:a(()=>[t(u,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name"},{default:a(()=>[t(n,{class:"w-[280px]",modelValue:s(d).name,"onUpdate:modelValue":e[0]||(e[0]=l=>s(d).name=l),clearable:"",onKeyup:ie(m,["enter"])},null,8,["modelValue"])]),_:1}),t(u,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status"},{default:a(()=>[t(P,{class:"w-[280px]",modelValue:s(d).status,"onUpdate:modelValue":e[1]||(e[1]=l=>s(d).status=l)},{default:a(()=>[t(w,{label:"\u5168\u90E8",value:""}),t(w,{label:"\u6B63\u5E38",value:"1"}),t(w,{label:"\u505C\u7528",value:"0"})]),_:1},8,["modelValue"])]),_:1}),t(u,null,{default:a(()=>[t(r,{type:"primary",onClick:m},{default:a(()=>e[4]||(e[4]=[i("\u67E5\u8BE2")])),_:1}),t(r,{onClick:h},{default:a(()=>e[5]||(e[5]=[i("\u91CD\u7F6E")])),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(L,{class:"!border-none mt-4",shadow:"never"},{default:a(()=>[ue("div",null,[E((p(),f(r,{type:"primary",onClick:e[2]||(e[2]=l=>V())},{icon:a(()=>[t(A,{name:"el-icon-Plus"})]),default:a(()=>[e[6]||(e[6]=i(" \u65B0\u589E "))]),_:1})),[[y,["dept.dept/add"]]]),t(r,{onClick:R},{default:a(()=>e[7]||(e[7]=[i(" \u5C55\u5F00/\u6298\u53E0 ")])),_:1})]),E((p(),f(O,{ref_key:"tableRef",ref:x,class:"mt-4",size:"large",data:s(b),"row-key":"id","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:a(()=>[t(_,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name","min-width":"150","show-overflow-tooltip":""}),t(_,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status","min-width":"100"},{default:a(({row:l})=>[t(I,{class:"ml-2",type:l.status?"":"danger"},{default:a(()=>[i(re(l.status_desc),1)]),_:2},1032,["type"])]),_:1}),t(_,{label:"\u6392\u5E8F",prop:"sort","min-width":"100"}),t(_,{label:"\u66F4\u65B0\u65F6\u95F4",prop:"update_time","min-width":"180"}),t(_,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:a(({row:l})=>[E((p(),f(r,{type:"primary",link:"",onClick:N=>V(l.id)},{default:a(()=>e[8]||(e[8]=[i(" \u65B0\u589E ")])),_:2},1032,["onClick"])),[[y,["dept.dept/add"]]]),E((p(),f(r,{type:"primary",link:"",onClick:N=>K(l)},{default:a(()=>e[9]||(e[9]=[i(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[y,["dept.dept/edit"]]]),l.pid!==0?E((p(),f(r,{key:0,type:"danger",link:"",onClick:N=>M(l.id)},{default:a(()=>e[10]||(e[10]=[i(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[y,["dept.dept/delete"]]]):T("",!0)]),_:1})]),_:1},8,["data"])),[[q,s(C)]])]),_:1}),s(v)?(p(),f(pe,{key:0,ref_key:"editRef",ref:c,onSuccess:m,onClose:e[3]||(e[3]=l=>v.value=!1)},null,512)):T("",!0)])}}});export{Xe as default};
|