2 lines
5.5 KiB
JavaScript
2 lines
5.5 KiB
JavaScript
import{I as G,y as H,G as J,H as Q,w as W,D as X,C as Y,L as Z,V as ee,M as te,N as oe}from"./element-plus.517d4382.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{f as le,a as ne}from"./index.8b1962e9.js";import{d as L,s as b,r as R,a0 as se,j as ie,n as g,ai as ue,o as m,c as re,V as e,M as o,L as _,u as s,S as $,aa as pe,a as T,O as v,T as i,U as me,k as de}from"./@vue.ab566ce7.js";import{_ as ce}from"./edit.vue_vue_type_script_setup_true_lang.b9ed5194.js";import{u as _e}from"./usePaging.f6660143.js";import{e as fe,f as Ee}from"./department.b8dec04d.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.1d82ee7c.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.b17dae19.js";import"./organization.5e75830a.js";import"./index.vue_vue_type_style_index_0_lang.c7aef442.js";import"./common.9d529cba.js";const ve={class:"department"},Ce=i("\u67E5\u8BE2"),he=i("\u91CD\u7F6E"),ye=i(" \u65B0\u589E "),ke=i(" \u5C55\u5F00/\u6298\u53E0 "),be=i(" \u65B0\u589E "),ge=i(" \u7F16\u8F91 "),we=i(" \u5220\u9664 "),Fe={class:"flex justify-end mt-4"},Be=L({name:"department"}),Et=L({...Be,setup(Ve){const w=b(),f=b(),N=b();let y=!1;const P=R([]),d=se({status:"",name:"",leader:"",org_name:"",mobile:""}),C=R(!1),{pager:E,getLists:c,resetPage:xe,resetParams:S}=_e({fetchFun:fe,params:d}),F=async l=>{var t,n;C.value=!0,await g(),l&&((t=f.value)==null||t.setFormData({pid:l})),(n=f.value)==null||n.open("add")},U=async l=>{var t,n;C.value=!0,await g(),(t=f.value)==null||t.open("edit"),(n=f.value)==null||n.getDetail(l)},A=async l=>{await le.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ee({id:l}),c()},B=()=>{y=!y,V(P.value,y)},V=(l,t=!0)=>{var n;for(const u in l)(n=w.value)==null||n.toggleRowExpansion(l[u],t),l[u].children&&V(l[u].children,t)};return ie(async()=>{c(),g(()=>{B()})}),(l,t)=>{const n=G,u=H,k=J,I=Q,r=W,K=X,x=Y,M=ne,p=Z,j=ee,O=te,q=ae,h=ue("perms"),z=oe;return m(),re("div",ve,[e(x,{class:"!border-none",shadow:"never"},{default:o(()=>[e(K,{ref_key:"formRef",ref:N,class:"mb-[-16px]",model:d,inline:!0},{default:o(()=>[e(u,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name"},{default:o(()=>[e(n,{class:"w-[280px]",modelValue:d.name,"onUpdate:modelValue":t[0]||(t[0]=a=>d.name=a),clearable:"",onKeyup:pe(s(c),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(u,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status"},{default:o(()=>[e(I,{class:"w-[280px]",modelValue:d.status,"onUpdate:modelValue":t[1]||(t[1]=a=>d.status=a)},{default:o(()=>[e(k,{label:"\u5168\u90E8",value:""}),e(k,{label:"\u6B63\u5E38",value:"1"}),e(k,{label:"\u505C\u7528",value:"0"})]),_:1},8,["modelValue"])]),_:1}),e(u,null,{default:o(()=>[e(r,{type:"primary",onClick:s(c)},{default:o(()=>[Ce]),_:1},8,["onClick"]),e(r,{onClick:s(S)},{default:o(()=>[he]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),e(x,{class:"!border-none mt-4",shadow:"never"},{default:o(()=>[T("div",null,[v((m(),_(r,{type:"primary",onClick:t[2]||(t[2]=a=>F())},{icon:o(()=>[e(M,{name:"el-icon-Plus"})]),default:o(()=>[ye]),_:1})),[[h,["dept.dept/add"]]]),e(r,{onClick:B},{default:o(()=>[ke]),_:1})]),v((m(),_(O,{ref_key:"tableRef",ref:w,class:"mt-4",size:"large",data:s(E).lists,"row-key":"id","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:o(()=>[e(p,{label:"\u90E8\u95E8\u540D\u79F0",prop:"name","min-width":"150","show-overflow-tooltip":""}),e(p,{label:"\u90E8\u95E8\u72B6\u6001",prop:"status","min-width":"100"},{default:o(({row:a})=>[e(j,{class:"ml-2",type:a.status?"":"danger"},{default:o(()=>[i(me(a.status==1?"\u6B63\u5E38":"\u7981\u7528"),1)]),_:2},1032,["type"])]),_:1}),e(p,{label:"\u8D1F\u8D23\u4EBA",prop:"leader","min-width":"150","show-overflow-tooltip":""}),e(p,{label:"\u6240\u5C5E\u7EC4\u7EC7",prop:"org_name","min-width":"150","show-overflow-tooltip":""}),e(p,{label:"\u6392\u5E8F",prop:"sort","min-width":"100"}),e(p,{label:"\u66F4\u65B0\u65F6\u95F4",prop:"create_time","min-width":"180"}),e(p,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:o(({row:a})=>[v((m(),_(r,{type:"primary",link:"",onClick:D=>F(a.id)},{default:o(()=>[be]),_:2},1032,["onClick"])),[[h,["dept.dept/add"]]]),v((m(),_(r,{type:"primary",link:"",onClick:D=>U(a)},{default:o(()=>[ge]),_:2},1032,["onClick"])),[[h,["dept.dept/edit"]]]),a.pid!==0?v((m(),_(r,{key:0,type:"danger",link:"",onClick:D=>A(a.id)},{default:o(()=>[we]),_:2},1032,["onClick"])),[[h,["dept.dept/delete"]]]):$("",!0)]),_:1})]),_:1},8,["data"])),[[z,s(E).loading]]),T("div",Fe,[e(q,{modelValue:s(E),"onUpdate:modelValue":t[3]||(t[3]=a=>de(E)?E.value=a:null),onChange:s(c)},null,8,["modelValue","onChange"])])]),_:1}),C.value?(m(),_(ce,{key:0,ref_key:"editRef",ref:f,onSuccess:s(c),onClose:t[4]||(t[4]=a=>C.value=!1)},null,8,["onSuccess"])):$("",!0)])}}});export{Et as default};
|