ERP-admin/build/admin/assets/index.f306f88e.js

2 lines
4.8 KiB
JavaScript

import{a2 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.9990c39e.js";import{f as te,b as ae}from"./index.9424646f.js";import{d as K,s as F,r as h,Z as oe,i as le,n as g,ap as ne,o as p,c as se,U as e,L as t,u as s,aa as ie,R as i,a as ue,M as E,K as c,S as re,Q as L}from"./@vue.18505fe0.js";import{_ as pe}from"./edit.vue_vue_type_script_setup_true_lang.63871adf.js";import{e as de,f as me}from"./department.c369cb5c.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.ef95d8c0.js";import"./axios.77245e3c.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.be6e4bb5.js";import"./vue-router.886c5f5a.js";import"./pinia.a969beab.js";import"./css-color-function.6061d63f.js";import"./color.1580a89c.js";import"./clone.4ed29f58.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.b29ee5e2.js";import"./vue-clipboard3.15c43b43.js";import"./clipboard.4a3580c9.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.1fdb40b8.js";import"./useDictOptions.d0c29343.js";const ce={class:"department"},_e=K({name:"department"}),We=K({..._e,setup(fe){const x=F(),_=F(),B=F();let k=!1;const C=h(!1),b=h([]),d=oe({status:"",name:""}),v=h(!1),m=async()=>{C.value=!0,b.value=await de(d),C.value=!1},N=()=>{var o;(o=B.value)==null||o.resetFields(),m()},D=async o=>{var a,n;v.value=!0,await g(),o&&((a=_.value)==null||a.setFormData({pid:o})),(n=_.value)==null||n.open("add")},S=async o=>{var a,n;v.value=!0,await g(),(a=_.value)==null||a.open("edit"),(n=_.value)==null||n.getDetail(o)},P=async o=>{await te.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:o}),m()},R=()=>{k=!k,V(b.value,k)},V=(o,a=!0)=>{var n;for(const u in o)(n=x.value)==null||n.toggleRowExpansion(o[u],a),o[u].children&&V(o[u].children,a)};return le(async()=>{await m(),g(()=>{R()})}),(o,a)=>{const n=z,u=Z,w=j,U=G,r=H,A=J,$=W,I=ae,f=X,M=q,O=Y,y=ne("perms"),Q=ee;return p(),se("div",ce,[e($,{class:"!border-none",shadow:"never"},{default:t(()=>[e(A,{ref_key:"formRef",ref:B,class:"mb-[-16px]",model:s(d),inline:!0},{default:t(()=>[e(u,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name"},{default:t(()=>[e(n,{class:"w-[280px]",modelValue:s(d).name,"onUpdate:modelValue":a[0]||(a[0]=l=>s(d).name=l),clearable:"",onKeyup:ie(m,["enter"])},null,8,["modelValue"])]),_:1}),e(u,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status"},{default:t(()=>[e(U,{class:"w-[280px]",modelValue:s(d).status,"onUpdate:modelValue":a[1]||(a[1]=l=>s(d).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(u,null,{default:t(()=>[e(r,{type:"primary",onClick:m},{default:t(()=>[i("\u67E5\u8BE2")]),_:1}),e(r,{onClick:N},{default:t(()=>[i("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e($,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[ue("div",null,[E((p(),c(r,{type:"primary",onClick:a[2]||(a[2]=l=>D())},{icon:t(()=>[e(I,{name:"el-icon-Plus"})]),default:t(()=>[i(" \u65B0\u589E ")]),_:1})),[[y,["dept.dept/add"]]]),e(r,{onClick:R},{default:t(()=>[i(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1})]),E((p(),c(O,{ref_key:"tableRef",ref:x,class:"mt-4",size:"large",data:s(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(()=>[i(re(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((p(),c(r,{type:"primary",link:"",onClick:T=>D(l.id)},{default:t(()=>[i(" \u65B0\u589E ")]),_:2},1032,["onClick"])),[[y,["dept.dept/add"]]]),E((p(),c(r,{type:"primary",link:"",onClick:T=>S(l)},{default:t(()=>[i(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[y,["dept.dept/edit"]]]),l.pid!==0?E((p(),c(r,{key:0,type:"danger",link:"",onClick:T=>P(l.id)},{default:t(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["dept.dept/delete"]]]):L("",!0)]),_:1})]),_:1},8,["data"])),[[Q,s(C)]])]),_:1}),s(v)?(p(),c(pe,{key:0,ref_key:"editRef",ref:_,onSuccess:m,onClose:a[3]||(a[3]=l=>v.value=!1)},null,512)):L("",!0)])}}});export{We as default};