2 lines
5.4 KiB
JavaScript
2 lines
5.4 KiB
JavaScript
import{_ as q,C as z,D as Z,K as j,L as G,w as H,F as J,T as W,O as X,Q as Y,R as ee}from"./element-plus.681b9893.js";import{f as te,b as oe}from"./index.6e50aa23.js";import{d as K,s as F,r as h,Z as ae,i as le,n as g,ap as ne,o as u,c as ie,U as e,L as t,u as i,aa as se,R as s,a as re,M as E,K as c,S as pe,Q as L}from"./@vue.18505fe0.js";import{_ as ue}from"./edit.vue_vue_type_script_setup_true_lang.971b2132.js";import{e as me,f as de}from"./department.8db4a0e9.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.466e9fe4.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.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"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.bba2f543.js";import"./useDictOptions.e1bb01b2.js";const ce={class:"department"},_e=K({name:"department"}),vt=K({..._e,setup(fe){const x=F(),_=F(),B=F();let k=!1;const C=h(!1),b=h([]),m=ae({status:"",name:""}),v=h(!1),d=async()=>{C.value=!0,b.value=await me(m),C.value=!1},N=()=>{var a;(a=B.value)==null||a.resetFields(),d()},D=async a=>{var o,n;v.value=!0,await g(),a&&((o=_.value)==null||o.setFormData({pid:a})),(n=_.value)==null||n.open("add")},S=async a=>{var o,n;v.value=!0,await g(),(o=_.value)==null||o.open("edit"),(n=_.value)==null||n.getDetail(a)},P=async a=>{await te.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:a}),d()},R=()=>{k=!k,V(b.value,k)},V=(a,o=!0)=>{var n;for(const r in a)(n=x.value)==null||n.toggleRowExpansion(a[r],o),a[r].children&&V(a[r].children,o)};return le(async()=>{await d(),g(()=>{R()})}),(a,o)=>{const n=z,r=Z,w=j,U=G,p=H,A=J,$=W,I=oe,f=X,M=q,O=Y,y=ne("perms"),Q=ee;return u(),ie("div",ce,[e($,{class:"!border-none",shadow:"never"},{default:t(()=>[e(A,{ref_key:"formRef",ref:B,class:"mb-[-16px]",model:i(m),inline:!0},{default:t(()=>[e(r,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name"},{default:t(()=>[e(n,{class:"w-[280px]",modelValue:i(m).name,"onUpdate:modelValue":o[0]||(o[0]=l=>i(m).name=l),clearable:"",onKeyup:se(d,["enter"])},null,8,["modelValue"])]),_:1}),e(r,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status"},{default:t(()=>[e(U,{class:"w-[280px]",modelValue:i(m).status,"onUpdate:modelValue":o[1]||(o[1]=l=>i(m).status=l)},{default:t(()=>[e(w,{label:"\u5168\u90E8",value:""}),e(w,{label:"\u6B63\u5E38",value:"1"}),e(w,{label:"\u505C\u7528",value:"0"})]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:t(()=>[e(p,{type:"primary",onClick:d},{default:t(()=>[s("\u67E5\u8BE2")]),_:1}),e(p,{onClick:N},{default:t(()=>[s("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e($,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[re("div",null,[E((u(),c(p,{type:"primary",onClick:o[2]||(o[2]=l=>D())},{icon:t(()=>[e(I,{name:"el-icon-Plus"})]),default:t(()=>[s(" \u65B0\u589E ")]),_:1})),[[y,["dept.dept/add"]]]),e(p,{onClick:R},{default:t(()=>[s(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1})]),E((u(),c(O,{ref_key:"tableRef",ref:x,class:"mt-4",size:"large",data:i(b),"row-key":"id","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:t(()=>[e(f,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name","min-width":"150","show-overflow-tooltip":""}),e(f,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status","min-width":"100"},{default:t(({row:l})=>[e(M,{class:"ml-2",type:l.status?"":"danger"},{default:t(()=>[s(pe(l.status_desc),1)]),_:2},1032,["type"])]),_:1}),e(f,{label:"\u6392\u5E8F",prop:"sort","min-width":"100"}),e(f,{label:"\u66F4\u65B0\u65F6\u95F4",prop:"update_time","min-width":"180"}),e(f,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:t(({row:l})=>[E((u(),c(p,{type:"primary",link:"",onClick:T=>D(l.id)},{default:t(()=>[s(" \u65B0\u589E ")]),_:2},1032,["onClick"])),[[y,["dept.dept/add"]]]),E((u(),c(p,{type:"primary",link:"",onClick:T=>S(l)},{default:t(()=>[s(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[y,["dept.dept/edit"]]]),l.pid!==0?E((u(),c(p,{key:0,type:"danger",link:"",onClick:T=>P(l.id)},{default:t(()=>[s(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["dept.dept/delete"]]]):L("",!0)]),_:1})]),_:1},8,["data"])),[[Q,i(C)]])]),_:1}),i(v)?(u(),c(ue,{key:0,ref_key:"editRef",ref:_,onSuccess:d,onClose:o[3]||(o[3]=l=>v.value=!1)},null,512)):L("",!0)])}}});export{vt as default};
|