ERP-admin/build/admin/assets/index.5a37de7f.js

2 lines
6.7 KiB
JavaScript

import{C as Z,D as q,K as G,L as H,w as J,F as W,T as X,O as Y,o as ee,t as te,Q as oe,R as ae}from"./element-plus.bccb9376.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.120de7ce.js";import{f as ie,b as ne}from"./index.6230d3f0.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.2ffcec52.js";import{d as A,s as re,Z as ue,r as se,i as pe,ap as de,o as m,c as k,U as e,L as a,u as o,aa as D,T as ce,a9 as _e,K as u,R as d,M as v,a as V,Q as C,j as fe,n as B}from"./@vue.18505fe0.js";import{a as x,_ as ve,b as be,c as he}from"./edit.vue_vue_type_script_setup_true_lang.99586cda.js";import{r as we}from"./role.19682794.js";import{a as Fe}from"./useDictOptions.8bb81951.js";import{u as ge}from"./usePaging.6a6670f9.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.466e9fe4.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.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"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.5030068c.js";import"./picker.135ffdcb.js";import"./index.5c43b8ef.js";import"./index.516ac555.js";import"./vuedraggable.9f282753.js";import"./vue.e5198d72.js";import"./sortablejs.6fa237f8.js";import"./post.eaef633a.js";import"./department.6298a5d0.js";const Ce={class:"admin"},Ee={class:"mt-4"},ye={class:"flex mt-4 justify-end"},ke=A({name:"admin"}),St=A({...ke,setup(De){const b=re(),r=ue({account:"",name:"",role_id:""}),h=se(!1),{pager:s,getLists:c,resetParams:$,resetPage:g}=ge({fetchFun:x,params:r}),K=l=>{be({id:l.id,avatar:l.avatar,account:l.account,name:l.name,role_id:l.role_id,job_id:l.job_id,dept_id:l.dept_id,disable:l.disable,multipoint_login:l.multipoint_login}).finally(()=>{c()})},U=async()=>{var l;h.value=!0,await B(),(l=b.value)==null||l.open("add")},L=async l=>{var i,_;h.value=!0,await B(),(i=b.value)==null||i.open("edit"),(_=b.value)==null||_.setFormData(l)},R=async l=>{await ie.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await he({id:l}),c()},{optionsData:T}=Fe({role:{api:we}});return pe(()=>{c()}),(l,i)=>{const _=Z,w=q,E=G,z=H,f=J,P=me,S=W,y=X,j=ne,n=Y,I=ee,N=te,O=oe,M=le,F=de("perms"),Q=ae;return m(),k("div",Ce,[e(y,{class:"!border-none",shadow:"never"},{default:a(()=>[e(S,{class:"mb-[-16px]",model:o(r),inline:""},{default:a(()=>[e(w,{label:"\u7BA1\u7406\u5458\u8D26\u53F7"},{default:a(()=>[e(_,{modelValue:o(r).account,"onUpdate:modelValue":i[0]||(i[0]=t=>o(r).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(r).name,"onUpdate:modelValue":i[1]||(i[1]=t=>o(r).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(z,{class:"w-[280px]",modelValue:o(r).role_id,"onUpdate:modelValue":i[2]||(i[2]=t=>o(r).role_id=t)},{default:a(()=>[e(E,{label:"\u5168\u90E8",value:""}),(m(!0),k(ce,null,_e(o(T).role,(t,p)=>(m(),u(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($)},{default:a(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(P,{class:"ml-2.5","fetch-fun":o(x),params:o(r),"page-size":o(s).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),v((m(),u(y,{class:"mt-4 !border-none",shadow:"never"},{default:a(()=>[v((m(),u(f,{type:"primary",onClick:U},{icon:a(()=>[e(j,{name:"el-icon-Plus"})]),default:a(()=>[d(" \u65B0\u589E ")]),_:1})),[[F,["auth/admin/add"]]]),V("div",Ee,[e(O,{data:o(s).lists,size:"large"},{default:a(()=>[e(n,{label:"ID",prop:"id","min-width":"60"}),d("> "),e(n,{label:"\u5934\u50CF","min-width":"100"},{default:a(({row:t})=>[e(I,{size:50,src:t.avatar},null,8,["src"])]),_:1}),e(n,{label:"\u8D26\u53F7",prop:"account","min-width":"100"}),e(n,{label:"\u540D\u79F0",prop:"name","min-width":"100"}),e(n,{label:"\u89D2\u8272",prop:"role_name","min-width":"100","show-tooltip-when-overflow":""}),e(n,{label:"\u90E8\u95E8",prop:"dept_name","min-width":"100","show-tooltip-when-overflow":""}),e(n,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","min-width":"180"}),e(n,{label:"\u6700\u8FD1\u767B\u5F55\u65F6\u95F4",prop:"login_time","min-width":"180"}),e(n,{label:"\u6700\u8FD1\u767B\u5F55IP",prop:"login_ip","min-width":"120"}),v((m(),u(n,{label:"\u72B6\u6001","min-width":"100"},{default:a(({row:t})=>[t.root!=1?(m(),u(N,{key:0,modelValue:t.disable,"onUpdate:modelValue":p=>t.disable=p,"active-value":0,"inactive-value":1,onChange:p=>K(t)},null,8,["modelValue","onUpdate:modelValue","onChange"])):C("",!0)]),_:1})),[[F,["auth/admin/edit"]]]),e(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:t})=>[v((m(),u(f,{type:"primary",link:"",onClick:p=>L(t)},{default:a(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[F,["auth/admin/edit"]]]),t.root!=1?v((m(),u(f,{key:0,type:"danger",link:"",onClick:p=>R(t.id)},{default:a(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[F,["auth/admin/delete"]]]):C("",!0)]),_:1})]),_:1},8,["data"])]),V("div",ye,[e(M,{modelValue:o(s),"onUpdate:modelValue":i[3]||(i[3]=t=>fe(s)?s.value=t:null),onChange:o(c)},null,8,["modelValue","onChange"])])]),_:1})),[[Q,o(s).loading]]),o(h)?(m(),u(ve,{key:0,ref_key:"editRef",ref:b,onSuccess:o(c),onClose:i[4]||(i[4]=t=>h.value=!1)},null,8,["onSuccess"])):C("",!0)])}}});export{St as default};