engineering/public/admin/assets/index.93d452b5.js
2024-03-04 15:04:21 +08:00

2 lines
6.3 KiB
JavaScript

import{I as H,y as W,G as q,H as J,w as Q,D as X,C as Y,L as Z,o as ee,t as te,M as oe,N as ae}from"./element-plus.258bf9e7.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{f as ne,a as ie}from"./index.ec401e3b.js";import{_ as se}from"./index.vue_vue_type_style_index_0_lang.e91ff55f.js";import{d as A,s as ue,a0 as me,r as re,j as pe,ai as de,o as s,c as k,V as e,M as o,O as h,u as n,L as m,S as C,aa as V,W as ce,a8 as _e,a as D,k as fe,T as d,n as B}from"./@vue.ab566ce7.js";import{a as x,b as he,e as ve}from"./admin.d095da9c.js";import{r as be}from"./role.e57751c2.js";import{a as we}from"./useDictOptions.c644f395.js";import{u as Fe}from"./usePaging.f6660143.js";import{_ as ge}from"./edit.vue_vue_type_script_setup_true_lang.98a050d4.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.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.9492d03b.js";import"./picker.4547601e.js";import"./index.59cb12da.js";import"./index.7a6cc892.js";import"./index.vue_vue_type_script_setup_true_lang.84fcd2ee.js";import"./file.vue_vue_type_style_index_0_scoped_5ccc0f84_lang.e4e8877b.js";import"./vue3-video-play.b66b1487.js";import"./vuedraggable.05ef589e.js";import"./vue.6436c619.js";import"./sortablejs.81b741d7.js";import"./post.3d3b6aec.js";import"./department.1c914e1a.js";import"./organization.f0387125.js";const Ce={class:"admin"},Ee=d("\u67E5\u8BE2"),ye=d("\u91CD\u7F6E"),ke=d(" \u65B0\u589E "),Ve={class:"mt-4"},De=d("> "),Be=d(" \u7F16\u8F91 "),xe=d(" \u5220\u9664 "),Ae={class:"flex mt-4 justify-end"},$e=A({name:"admin"}),Lt=A({...$e,setup(Le){const v=ue(),u=me({account:"",name:"",role_id:""}),b=re(!1),{pager:r,getLists:c,resetParams:$,resetPage:g}=Fe({fetchFun:x,params:u}),L=a=>{he({id:a.id,account:a.account,name:a.name,role_id:a.role_id,disable:a.disable,multipoint_login:a.multipoint_login}).finally(()=>{c()})},S=async()=>{var a;b.value=!0,await B(),(a=v.value)==null||a.open("add")},U=async a=>{var l,_;b.value=!0,await B(),(l=v.value)==null||l.open("edit"),(_=v.value)==null||_.setFormData(a)},z=async a=>{await ne.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ve({id:a}),c()},{optionsData:I}=we({role:{api:be}});return pe(()=>{c()}),(a,l)=>{const _=H,w=W,E=q,K=J,f=Q,N=se,P=X,y=Y,T=ie,i=Z,R=ee,M=te,O=oe,j=le,F=de("perms"),G=ae;return s(),k("div",Ce,[e(y,{class:"!border-none",shadow:"never"},{default:o(()=>[e(P,{class:"mb-[-16px]",model:u,inline:""},{default:o(()=>[e(w,{label:"\u7BA1\u7406\u5458\u8D26\u53F7"},{default:o(()=>[e(_,{modelValue:u.account,"onUpdate:modelValue":l[0]||(l[0]=t=>u.account=t),class:"w-[280px]",clearable:"",onKeyup:V(n(g),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(w,{label:"\u7BA1\u7406\u5458\u540D\u79F0"},{default:o(()=>[e(_,{modelValue:u.name,"onUpdate:modelValue":l[1]||(l[1]=t=>u.name=t),class:"w-[280px]",clearable:"",onKeyup:V(n(g),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(w,{label:"\u7BA1\u7406\u5458\u89D2\u8272"},{default:o(()=>[e(K,{class:"w-[280px]",modelValue:u.role_id,"onUpdate:modelValue":l[2]||(l[2]=t=>u.role_id=t)},{default:o(()=>[e(E,{label:"\u5168\u90E8",value:""}),(s(!0),k(ce,null,_e(n(I).role,(t,p)=>(s(),m(E,{key:p,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(w,null,{default:o(()=>[e(f,{type:"primary",onClick:n(g)},{default:o(()=>[Ee]),_:1},8,["onClick"]),e(f,{onClick:n($)},{default:o(()=>[ye]),_:1},8,["onClick"]),e(N,{class:"ml-2.5","fetch-fun":n(x),params:u,"page-size":n(r).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),h((s(),m(y,{class:"mt-4 !border-none",shadow:"never"},{default:o(()=>[h((s(),m(f,{type:"primary",onClick:S},{icon:o(()=>[e(T,{name:"el-icon-Plus"})]),default:o(()=>[ke]),_:1})),[[F,["auth.admin/add"]]]),D("div",Ve,[e(O,{data:n(r).lists,size:"large"},{default:o(()=>[e(i,{label:"ID",prop:"id","min-width":"60"}),De,e(i,{label:"\u5934\u50CF","min-width":"100"},{default:o(({row:t})=>[e(R,{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"}),h((s(),m(i,{label:"\u72B6\u6001","min-width":"100"},{default:o(({row:t})=>[t.root!=1?(s(),m(M,{key:0,modelValue:t.disable,"onUpdate:modelValue":p=>t.disable=p,"active-value":0,"inactive-value":1,onChange:p=>L(t)},null,8,["modelValue","onUpdate:modelValue","onChange"])):C("",!0)]),_:1})),[[F,["auth.admin/edit"]]]),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[h((s(),m(f,{type:"primary",link:"",onClick:p=>U(t)},{default:o(()=>[Be]),_:2},1032,["onClick"])),[[F,["auth.admin/edit"]]]),t.root!=1?h((s(),m(f,{key:0,type:"danger",link:"",onClick:p=>z(t.id)},{default:o(()=>[xe]),_:2},1032,["onClick"])),[[F,["auth.admin/delete"]]]):C("",!0)]),_:1})]),_:1},8,["data"])]),D("div",Ae,[e(j,{modelValue:n(r),"onUpdate:modelValue":l[3]||(l[3]=t=>fe(r)?r.value=t:null),onChange:n(c)},null,8,["modelValue","onChange"])])]),_:1})),[[G,n(r).loading]]),b.value?(s(),m(ge,{key:0,ref_key:"editRef",ref:v,onSuccess:n(c),onClose:l[4]||(l[4]=t=>b.value=!1)},null,8,["onSuccess"])):C("",!0)])}}});export{Lt as default};