2 lines
6.3 KiB
JavaScript
2 lines
6.3 KiB
JavaScript
import{B as q,C as G,M as H,N as J,w as W,D as X,I as Y,O as Z,o as ee,t as te,P as oe,Q as ae}from"./element-plus.9c2fdfa8.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import{f as ne,b as ie}from"./index.5be037e5.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.af353895.js";import{d as $,s as ue,$ as se,r as re,j as pe,af as de,o as m,c as y,U as e,L as a,M as v,u as o,K as s,Q as C,a8 as D,T as ce,a7 as _e,R as d,a as V,k as fe,n as B}from"./@vue.53f8d7c3.js";import{a as x,b as ve,e as be}from"./admin.5be1a20b.js";import{r as he}from"./role.141b0c9d.js";import{a as we}from"./useDictOptions.aa9aa458.js";import{u as Fe}from"./usePaging.c22e2b6f.js";import{_ as ge}from"./edit.vue_vue_type_script_setup_true_lang.17b74518.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.47b8af7d.js";import"./axios.96be3cef.js";import"./vue-router.e2f4a118.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.efc99072.js";import"./color.e83714e9.js";import"./clone.fb54e01d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.b4b577c6.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";import"./index.da6dd366.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";import"./picker.150ddd55.js";import"./index.2baf2542.js";import"./index.a870c3ad.js";import"./index.77cf5d3d.js";import"./index.vue_vue_type_script_setup_true_lang.aa03e8e3.js";import"./vue3-video-play.65ddc377.js";import"./vuedraggable.56692cd2.js";import"./vue.5c6e0f1f.js";import"./sortablejs.4c4a59a1.js";import"./post.299f64a3.js";import"./department.a4fc1e0d.js";const Ce={class:"admin"},Ee={class:"mt-4"},ke={class:"flex mt-4 justify-end"},ye=$({name:"admin"}),Bt=$({...ye,setup(De){const b=ue(),u=se({account:"",name:"",role_id:""}),h=re(!1),{pager:r,getLists:c,resetParams:A,resetPage:g}=Fe({fetchFun:x,params:u}),U=l=>{ve({id:l.id,account:l.account,name:l.name,role_id:l.role_id,disable:l.disable,multipoint_login:l.multipoint_login}).finally(()=>{c()})},K=async()=>{var l;h.value=!0,await B(),(l=b.value)==null||l.open("add")},P=async l=>{var n,_;h.value=!0,await B(),(n=b.value)==null||n.open("edit"),(_=b.value)==null||_.setFormData(l)},z=async l=>{await ne.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await be({id:l}),c()},{optionsData:I}=we({role:{api:he}});return pe(()=>{c()}),(l,n)=>{const _=q,w=G,E=H,L=J,f=W,N=me,R=X,k=Y,S=ie,i=Z,T=ee,M=te,O=oe,j=le,F=de("perms"),Q=ae;return m(),y("div",Ce,[e(k,{class:"!border-none",shadow:"never"},{default:a(()=>[e(R,{class:"mb-[-16px]",model:o(u),inline:""},{default:a(()=>[e(w,{label:"\u7BA1\u7406\u5458\u8D26\u53F7"},{default:a(()=>[e(_,{modelValue:o(u).account,"onUpdate:modelValue":n[0]||(n[0]=t=>o(u).account=t),class:"w-[280px]",clearable:"",onKeyup:D(o(g),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(w,{label:"\u7BA1\u7406\u5458\u540D\u79F0"},{default:a(()=>[e(_,{modelValue:o(u).name,"onUpdate:modelValue":n[1]||(n[1]=t=>o(u).name=t),class:"w-[280px]",clearable:"",onKeyup:D(o(g),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(w,{label:"\u7BA1\u7406\u5458\u89D2\u8272"},{default:a(()=>[e(L,{class:"w-[280px]",modelValue:o(u).role_id,"onUpdate:modelValue":n[2]||(n[2]=t=>o(u).role_id=t)},{default:a(()=>[e(E,{label:"\u5168\u90E8",value:""}),(m(!0),y(ce,null,_e(o(I).role,(t,p)=>(m(),s(E,{key:p,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(w,null,{default:a(()=>[e(f,{type:"primary",onClick:o(g)},{default:a(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(f,{onClick:o(A)},{default:a(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(N,{class:"ml-2.5","fetch-fun":o(x),params:o(u),"page-size":o(r).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),v((m(),s(k,{class:"mt-4 !border-none",shadow:"never"},{default:a(()=>[v((m(),s(f,{type:"primary",onClick:K},{icon:a(()=>[e(S,{name:"el-icon-Plus"})]),default:a(()=>[d(" \u65B0\u589E ")]),_:1})),[[F,["auth.admin/add"]]]),V("div",Ee,[e(O,{data:o(r).lists,size:"large"},{default:a(()=>[e(i,{label:"ID",prop:"id","min-width":"60"}),d("> "),e(i,{label:"\u5934\u50CF","min-width":"100"},{default:a(({row:t})=>[e(T,{size:50,src:t.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((m(),s(i,{label:"\u72B6\u6001","min-width":"100"},{default:a(({row:t})=>[t.root!=1?(m(),s(M,{key:0,modelValue:t.disable,"onUpdate:modelValue":p=>t.disable=p,"active-value":0,"inactive-value":1,onChange:p=>U(t)},null,8,["modelValue","onUpdate:modelValue","onChange"])):C("",!0)]),_:1})),[[F,["auth.admin/edit"]]]),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:t})=>[v((m(),s(f,{type:"primary",link:"",onClick:p=>P(t)},{default:a(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[F,["auth.admin/edit"]]]),t.root!=1?v((m(),s(f,{key:0,type:"danger",link:"",onClick:p=>z(t.id)},{default:a(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[F,["auth.admin/delete"]]]):C("",!0)]),_:1})]),_:1},8,["data"])]),V("div",ke,[e(j,{modelValue:o(r),"onUpdate:modelValue":n[3]||(n[3]=t=>fe(r)?r.value=t:null),onChange:o(c)},null,8,["modelValue","onChange"])])]),_:1})),[[Q,o(r).loading]]),o(h)?(m(),s(ge,{key:0,ref_key:"editRef",ref:b,onSuccess:o(c),onClose:n[4]||(n[4]=t=>h.value=!1)},null,8,["onSuccess"])):C("",!0)])}}});export{Bt as default};
|