2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
import{B as q,C as z,Q as O,R as Q,w as G,D as H,I as J,K as W,a0 as X,L as Y,M as Z}from"./element-plus.0e78cb27.js";import{f as ee,b as te}from"./index.e36afc36.js";import{d as K,s as b,r as w,$ as ae,j as oe,n as F,af as le,o as r,c as se,U as e,L as t,K as m,R as T,a9 as ne,a as ie,M as f,S as n,T as ue}from"./@vue.e8706010.js";import{_ as re}from"./edit.vue_vue_type_script_setup_true_lang.a53d31ca.js";import{e as pe,f as de}from"./department.1ce53f7f.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.29c53eac.js";import"./dayjs.d871e3e1.js";import"./axios.263e335e.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.e8c2b926.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.49c13ae5.js";import"./color.6f36a052.js";import"./clone.0bac550d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.762f2b8b.js";import"./ms.a9ae1d6d.js";import"./nprogress.f7d60be2.js";import"./vue-clipboard3.536bdb56.js";import"./clipboard.cadf3e40.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";import"./index.c552a3cf.js";import"./useDictOptions.c6448087.js";const me={class:"department"},ce=n("\u67E5\u8BE2"),_e=n("\u91CD\u7F6E"),fe=n(" \u65B0\u589E "),ve=n(" \u5C55\u5F00/\u6298\u53E0 "),Ee=n(" \u65B0\u589E "),ye=n(" \u7F16\u8F91 "),ke=n(" \u5220\u9664 "),he=K({name:"department"}),st=K({...he,setup(Ce){const g=b(),c=b(),B=b();let y=!1;const k=w(!1),h=w([]),p=ae({status:"",name:""}),v=w(!1),d=async()=>{k.value=!0,h.value=await pe(p),k.value=!1},L=()=>{var o;(o=B.value)==null||o.resetFields(),d()},x=async o=>{var a,s;v.value=!0,await F(),o&&((a=c.value)==null||a.setFormData({pid:o})),(s=c.value)==null||s.open("add")},N=async o=>{var a,s;v.value=!0,await F(),(a=c.value)==null||a.open("edit"),(s=c.value)==null||s.getDetail(o)},S=async o=>{await ee.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:o}),d()},D=()=>{y=!y,R(h.value,y)},R=(o,a=!0)=>{var s;for(const i in o)(s=g.value)==null||s.toggleRowExpansion(o[i],a),o[i].children&&R(o[i].children,a)};return oe(async()=>{await d(),F(()=>{D()})}),(o,a)=>{const s=q,i=z,C=O,I=Q,u=G,M=H,V=J,P=te,_=W,U=X,A=Y,E=le("perms"),j=Z;return r(),se("div",me,[e(V,{class:"!border-none",shadow:"never"},{default:t(()=>[e(M,{ref_key:"formRef",ref:B,class:"mb-[-16px]",model:p,inline:!0},{default:t(()=>[e(i,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:p.name,"onUpdate:modelValue":a[0]||(a[0]=l=>p.name=l),clearable:"",onKeyup:ne(d,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(i,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status"},{default:t(()=>[e(I,{class:"w-[280px]",modelValue:p.status,"onUpdate:modelValue":a[1]||(a[1]=l=>p.status=l)},{default:t(()=>[e(C,{label:"\u5168\u90E8",value:""}),e(C,{label:"\u6B63\u5E38",value:"1"}),e(C,{label:"\u505C\u7528",value:"0"})]),_:1},8,["modelValue"])]),_:1}),e(i,null,{default:t(()=>[e(u,{type:"primary",onClick:d},{default:t(()=>[ce]),_:1}),e(u,{onClick:L},{default:t(()=>[_e]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(V,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[ie("div",null,[f((r(),m(u,{type:"primary",onClick:a[2]||(a[2]=l=>x())},{icon:t(()=>[e(P,{name:"el-icon-Plus"})]),default:t(()=>[fe]),_:1})),[[E,["dept.dept/add"]]]),e(u,{onClick:D},{default:t(()=>[ve]),_:1})]),f((r(),m(A,{ref_key:"tableRef",ref:g,class:"mt-4",size:"large",data:h.value,"row-key":"id","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:t(()=>[e(_,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name","min-width":"150","show-overflow-tooltip":""}),e(_,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status","min-width":"100"},{default:t(({row:l})=>[e(U,{class:"ml-2",type:l.status?"":"danger"},{default:t(()=>[n(ue(l.status_desc),1)]),_:2},1032,["type"])]),_:1}),e(_,{label:"\u6392\u5E8F",prop:"sort","min-width":"100"}),e(_,{label:"\u66F4\u65B0\u65F6\u95F4",prop:"update_time","min-width":"180"}),e(_,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:t(({row:l})=>[f((r(),m(u,{type:"primary",link:"",onClick:$=>x(l.id)},{default:t(()=>[Ee]),_:2},1032,["onClick"])),[[E,["dept.dept/add"]]]),f((r(),m(u,{type:"primary",link:"",onClick:$=>N(l)},{default:t(()=>[ye]),_:2},1032,["onClick"])),[[E,["dept.dept/edit"]]]),l.pid!==0?f((r(),m(u,{key:0,type:"danger",link:"",onClick:$=>S(l.id)},{default:t(()=>[ke]),_:2},1032,["onClick"])),[[E,["dept.dept/delete"]]]):T("",!0)]),_:1})]),_:1},8,["data"])),[[j,k.value]])]),_:1}),v.value?(r(),m(re,{key:0,ref_key:"editRef",ref:c,onSuccess:d,onClose:a[3]||(a[3]=l=>v.value=!1)},null,512)):T("",!0)])}}});export{st as default};
|