2 lines
6.2 KiB
JavaScript
2 lines
6.2 KiB
JavaScript
import{G as H,H as Q,L as Z,M as q,N as J,O as W,B as X,C as Y,w as ee,D as te,o as oe,t as ae}from"./element-plus.2acb577d.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as ne,b as ie}from"./index.81df6f20.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.804ffc77.js";import{d as A,s as se,Z as me,r as re,e as pe,am 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,i as fe,n as B}from"./@vue.821a47ec.js";import{a as x,b as ve,e as be}from"./admin.69833b4a.js";import{r as we}from"./role.6a962ddd.js";import{a as Fe}from"./useDictOptions.4fbfb4d7.js";import{u as ge}from"./usePaging.23706826.js";import{_ as Ce}from"./edit.vue_vue_type_script_setup_true_lang.08389069.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.6bfd3540.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.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.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";import"./index.f292cd50.js";import"./picker.c51c629b.js";import"./index.c82c3401.js";import"./index.8caf87ac.js";import"./vuedraggable.38fc8f37.js";import"./vue.93503b42.js";import"./sortablejs.f19edb47.js";import"./post.6b27df48.js";import"./department.23a87470.js";const Ee={class:"admin"},he={class:"mt-4"},ye={class:"flex mt-4 justify-end"},ke=A({name:"admin"}),gt=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}),U=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()})},K=async()=>{var n;w.value=!0,await B(),(n=b.value)==null||n.open("add")},L=async n=>{var t,_;w.value=!0,await B(),(t=b.value)==null||t.open("edit"),(_=b.value)==null||_.setFormData(n)},z=async n=>{await ne.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await be({id:n}),c()},{optionsData:N}=Fe({role:{api:we}});return pe(()=>{c()}),(n,t)=>{const _=X,F=Y,h=H,P=Q,f=ee,R=ue,S=te,y=Z,T=ie,i=q,I=oe,j=ae,M=J,O=le,g=de("perms"),G=W;return u(),k("div",Ee,[e(y,{class:"!border-none",shadow:"never"},{default:l(()=>[e(S,{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(P,{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(N).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(R,{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:K},{icon:l(()=>[e(T,{name:"el-icon-Plus"})]),default:l(()=>[t[7]||(t[7]=d(" \u65B0\u589E "))]),_:1})),[[g,["auth/admin/add"]]]),V("div",he,[e(M,{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(I,{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=>U(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=>L(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=>z(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(O,{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{gt as default};
|