moreShopAdmin/build/admin/assets/index.2d79b358.js

2 lines
6.3 KiB
JavaScript

import{C as Q,D as Z,J as q,K as G,w as H,F as W,L as X,M as Y,o as ee,t as te,N as oe,O as ae}from"./element-plus.91c68cc0.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{f as ne,b as ie}from"./index.d12b3af4.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.d134accc.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,_ as ve,b as be,c as we}from"./edit.vue_vue_type_script_setup_true_lang.74c6c926.js";import{r as Fe}from"./role.91f5501d.js";import{a as ge}from"./useDictOptions.1f11cf62.js";import{u as Ce}from"./usePaging.f8c888e4.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.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.e03c2e5b.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./picker.bb96af0c.js";import"./index.f2e66d1e.js";import"./index.839c505b.js";import"./vuedraggable.c04c7c0c.js";import"./vue.3299ef77.js";import"./sortablejs.c62bcaf8.js";import"./post.ed50fa39.js";import"./department.638acde9.js";const Ee={class:"admin"},he={class:"mt-4"},ye={class:"flex mt-4 justify-end"},ke=A({name:"admin"}),ht=A({...ke,setup(De){const b=se(),s=me({account:"",name:"",role_id:""}),w=re(!1),{pager:r,getLists:c,resetParams:$,resetPage:C}=Ce({fetchFun:x,params:s}),K=n=>{be({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")},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 we({id:n}),c()},{optionsData:N}=ge({role:{api:Fe}});return pe(()=>{c()}),(n,t)=>{const _=Q,F=Z,h=q,P=G,f=H,R=ue,S=W,y=X,T=ie,i=Y,j=ee,I=te,M=oe,O=le,g=de("perms"),J=ae;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:U},{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(j,{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(I,{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=>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})),[[J,a(r).loading]]),a(w)?(u(),m(ve,{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{ht as default};