2 lines
6.3 KiB
JavaScript
2 lines
6.3 KiB
JavaScript
import{C as H,D as Q,N as Z,O as q,w as J,F as W,K as X,G as Y,o as ee,t as te,H as oe,I as ae}from"./element-plus.8e273e86.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{f as ne,b as ie}from"./index.9cc06e06.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.029773b4.js";import{d as A,s as se,Z as me,r as re,i as pe,ap as de,o as u,c as k,U as e,L as l,u as a,aa as D,T as ce,a9 as _e,K as m,R as d,M as v,a as V,Q as E,j as fe,n as B}from"./@vue.76ce7aa3.js";import{a as x,b as ve,e as be}from"./admin.08734d39.js";import{r as we}from"./role.8bb73217.js";import{a as Fe}from"./useDictOptions.171e2c76.js";import{u as ge}from"./usePaging.f8c888e4.js";import{_ as Ce}from"./edit.vue_vue_type_script_setup_true_lang.1cdd61cd.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.41b9567d.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.34f7638a.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./picker.d3ca42b4.js";import"./index.f49f43a5.js";import"./index.dc18e4cb.js";import"./vuedraggable.1d6c5910.js";import"./vue.6c4d4a7c.js";import"./sortablejs.a0474a26.js";import"./post.1a231415.js";import"./department.9c743917.js";const Ee={class:"admin"},he={class:"mt-4"},ye={class:"flex mt-4 justify-end"},ke=A({name:"admin"}),yt=A({...ke,setup(De){const b=se(),s=me({account:"",name:"",role_id:""}),w=re(!1),{pager:r,getLists:c,resetParams:$,resetPage:C}=ge({fetchFun:x,params:s}),K=n=>{ve({id:n.id,avatar:n.avatar,account:n.account,name:n.name,role_id:n.role_id,job_id:n.job_id,dept_id:n.dept_id,disable:n.disable,multipoint_login:n.multipoint_login}).finally(()=>{c()})},U=async()=>{var n;w.value=!0,await B(),(n=b.value)==null||n.open("add")},z=async n=>{var t,_;w.value=!0,await B(),(t=b.value)==null||t.open("edit"),(_=b.value)==null||_.setFormData(n)},I=async n=>{await ne.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await be({id:n}),c()},{optionsData:L}=Fe({role:{api:we}});return pe(()=>{c()}),(n,t)=>{const _=H,F=Q,h=Z,N=q,f=J,P=ue,R=W,y=X,S=ie,i=Y,T=ee,j=te,O=oe,M=le,g=de("perms"),G=ae;return u(),k("div",Ee,[e(y,{class:"!border-none",shadow:"never"},{default:l(()=>[e(R,{class:"mb-[-16px]",model:a(s),inline:""},{default:l(()=>[e(F,{label:"\u7BA1\u7406\u5458\u8D26\u53F7"},{default:l(()=>[e(_,{modelValue:a(s).account,"onUpdate:modelValue":t[0]||(t[0]=o=>a(s).account=o),class:"w-[280px]",clearable:"",onKeyup:D(a(C),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(F,{label:"\u7BA1\u7406\u5458\u540D\u79F0"},{default:l(()=>[e(_,{modelValue:a(s).name,"onUpdate:modelValue":t[1]||(t[1]=o=>a(s).name=o),class:"w-[280px]",clearable:"",onKeyup:D(a(C),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(F,{label:"\u7BA1\u7406\u5458\u89D2\u8272"},{default:l(()=>[e(N,{class:"w-[280px]",modelValue:a(s).role_id,"onUpdate:modelValue":t[2]||(t[2]=o=>a(s).role_id=o)},{default:l(()=>[e(h,{label:"\u5168\u90E8",value:""}),(u(!0),k(ce,null,_e(a(L).role,(o,p)=>(u(),m(h,{key:p,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(F,null,{default:l(()=>[e(f,{type:"primary",onClick:a(C)},{default:l(()=>t[5]||(t[5]=[d("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(f,{onClick:a($)},{default:l(()=>t[6]||(t[6]=[d("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(P,{class:"ml-2.5","fetch-fun":a(x),params:a(s),"page-size":a(r).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),v((u(),m(y,{class:"mt-4 !border-none",shadow:"never"},{default:l(()=>[v((u(),m(f,{type:"primary",onClick:U},{icon:l(()=>[e(S,{name:"el-icon-Plus"})]),default:l(()=>[t[7]||(t[7]=d(" \u65B0\u589E "))]),_:1})),[[g,["auth/admin/add"]]]),V("div",he,[e(O,{data:a(r).lists,size:"large"},{default:l(()=>[e(i,{label:"ID",prop:"id","min-width":"60"}),t[10]||(t[10]=d("> ")),e(i,{label:"\u5934\u50CF","min-width":"100"},{default:l(({row:o})=>[e(T,{size:50,src:o.avatar},null,8,["src"])]),_:1}),e(i,{label:"\u8D26\u53F7",prop:"account","min-width":"100"}),e(i,{label:"\u540D\u79F0",prop:"name","min-width":"100"}),e(i,{label:"\u89D2\u8272",prop:"role_name","min-width":"100","show-tooltip-when-overflow":""}),e(i,{label:"\u90E8\u95E8",prop:"dept_name","min-width":"100","show-tooltip-when-overflow":""}),e(i,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","min-width":"180"}),e(i,{label:"\u6700\u8FD1\u767B\u5F55\u65F6\u95F4",prop:"login_time","min-width":"180"}),e(i,{label:"\u6700\u8FD1\u767B\u5F55IP",prop:"login_ip","min-width":"120"}),v((u(),m(i,{label:"\u72B6\u6001","min-width":"100"},{default:l(({row:o})=>[o.root!=1?(u(),m(j,{key:0,modelValue:o.disable,"onUpdate:modelValue":p=>o.disable=p,"active-value":0,"inactive-value":1,onChange:p=>K(o)},null,8,["modelValue","onUpdate:modelValue","onChange"])):E("",!0)]),_:1})),[[g,["auth/admin/edit"]]]),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:o})=>[v((u(),m(f,{type:"primary",link:"",onClick:p=>z(o)},{default:l(()=>t[8]||(t[8]=[d(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[g,["auth/admin/edit"]]]),o.root!=1?v((u(),m(f,{key:0,type:"danger",link:"",onClick:p=>I(o.id)},{default:l(()=>t[9]||(t[9]=[d(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[g,["auth/admin/delete"]]]):E("",!0)]),_:1})]),_:1},8,["data"])]),V("div",ye,[e(M,{modelValue:a(r),"onUpdate:modelValue":t[3]||(t[3]=o=>fe(r)?r.value=o:null),onChange:a(c)},null,8,["modelValue","onChange"])])]),_:1})),[[G,a(r).loading]]),a(w)?(u(),m(Ce,{key:0,ref_key:"editRef",ref:b,onSuccess:a(c),onClose:t[4]||(t[4]=o=>w.value=!1)},null,8,["onSuccess"])):E("",!0)])}}});export{yt as default};
|