ERP-admin/build/admin/assets/index.9f90dfe3.js

2 lines
5.8 KiB
JavaScript

import{C as O,D as q,J,K as Q,w as Z,F as z,L as G,M as H,b as W,N as X,O as Y}from"./element-plus.f1cfb480.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.dacce304.js";import{f as le,l as oe,b as ae,m as te}from"./index.52f16d07.js";import{u as ue}from"./usePaging.77fa9d39.js";import{u as se}from"./useDictOptions.4d097b09.js";import{d as U,s as ne,r as V,Z as ie,ap as re,o as i,c as B,U as e,L as a,u as o,T as pe,a9 as me,K as r,R as d,M as f,a as D,S as de,j as ce,Q as _e,n as x}from"./@vue.663bc523.js";import"./lodash.403d4198.js";import{_ as fe}from"./edit.vue_vue_type_script_setup_true_name_userEdit_lang.4e751724.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.4b5afb22.js";import"./@element-plus.8b1118e2.js";import"./dayjs.3f38f327.js";import"./axios.18becb61.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.58fac957.js";import"./pinia.068f0ef2.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.e6143ca6.js";import"./color.d79aa98b.js";import"./clone.a63396d9.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.48cb4095.js";import"./vue-clipboard3.6d09ff6e.js";import"./clipboard.564aa4b9.js";import"./echarts.8485a033.js";import"./zrender.b2f30540.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.85e4ac8b.js";import"./picker.0f66ac39.js";import"./index.6c86ef69.js";import"./index.d049a720.js";import"./index.52b1645e.js";import"./vuedraggable.917b44c2.js";import"./vue.648d3a8e.js";import"./sortablejs.86ceda0b.js";const be={class:"mt-4"},ve={class:"flex mt-4 justify-end"},Fe=U({name:"userLists"}),sl=U({...Fe,setup(we){const b=ne(),v=V(!1),u=ie({nickname:"",account:"",mobile:"",is_disable:""}),k=V([]),L=s=>{k.value=s.map(({id:t})=>t)},{dictData:E}=se("sex_type,system_disable"),{pager:c,getLists:F,resetParams:S,resetPage:$}=ue({fetchFun:te,params:u}),N=async()=>{var s;v.value=!0,await x(),(s=b.value)==null||s.open("add")},P=async s=>{var t,p;v.value=!0,await x(),(t=b.value)==null||t.open("edit"),(p=b.value)==null||p.setFormData(s)},g=async s=>{await le.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await oe({id:s}),F()};return F(),(s,t)=>{const p=O,_=q,h=J,R=Q,m=Z,T=z,y=G,I=ae,n=H,j=W,A=X,K=ee,w=re("perms"),M=Y;return i(),B("div",null,[e(y,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(T,{class:"mb-[-16px]",model:o(u),inline:""},{default:a(()=>[e(_,{label:"\u7528\u6237\u6635\u79F0",prop:"nickname"},{default:a(()=>[e(p,{class:"w-[280px]",modelValue:o(u).nickname,"onUpdate:modelValue":t[0]||(t[0]=l=>o(u).nickname=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u7528\u6237\u8D26\u53F7",prop:"account"},{default:a(()=>[e(p,{class:"w-[280px]",modelValue:o(u).account,"onUpdate:modelValue":t[1]||(t[1]=l=>o(u).account=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u8D26\u53F7"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u7528\u6237\u7535\u8BDD",prop:"mobile"},{default:a(()=>[e(p,{class:"w-[280px]",modelValue:o(u).mobile,"onUpdate:modelValue":t[2]||(t[2]=l=>o(u).mobile=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u662F\u5426\u7981\u7528",prop:"is_disable"},{default:a(()=>[e(R,{class:"w-[280px]",modelValue:o(u).is_disable,"onUpdate:modelValue":t[3]||(t[3]=l=>o(u).is_disable=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7981\u7528"},{default:a(()=>[e(h,{label:"\u5168\u90E8",value:""}),(i(!0),B(pe,null,me(o(E).system_disable,(l,C)=>(i(),r(h,{key:C,label:l.name,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(_,null,{default:a(()=>[e(m,{type:"primary",onClick:o($)},{default:a(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(m,{onClick:o(S)},{default:a(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((i(),r(y,{class:"!border-none",shadow:"never"},{default:a(()=>[f((i(),r(m,{type:"primary",onClick:N},{icon:a(()=>[e(I,{name:"el-icon-Plus"})]),default:a(()=>[d(" \u65B0\u589E ")]),_:1})),[[w,["user.user/add"]]]),f((i(),r(m,{disabled:!o(k).length,onClick:t[4]||(t[4]=l=>g(o(k)))},{default:a(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["user.user/delete"]]]),D("div",be,[e(A,{data:o(c).lists,onSelectionChange:L},{default:a(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"\u4E3B\u952E",prop:"id","show-overflow-tooltip":""}),e(n,{label:"\u5934\u50CF",prop:"avatar","show-overflow-tooltip":""},{default:a(({row:l})=>[e(j,{src:l.avatar,style:{width:"50px",height:"50px"}},null,8,["src"])]),_:1}),e(n,{label:"\u771F\u5B9E\u59D3\u540D",prop:"real_name","show-overflow-tooltip":""}),e(n,{label:"\u7528\u6237\u6635\u79F0",prop:"nickname","show-overflow-tooltip":""}),e(n,{label:"\u7528\u6237\u8D26\u53F7",prop:"account","show-overflow-tooltip":""}),e(n,{label:"\u7528\u6237\u7535\u8BDD",prop:"mobile","show-overflow-tooltip":""}),e(n,{label:"\u7528\u6237\u6027\u522B",prop:"sex"},{default:a(({row:l})=>[D("span",null,de(l.sex==1?"\u7537":"\u5973"),1)]),_:1}),e(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[f((i(),r(m,{type:"primary",link:"",onClick:C=>P(l)},{default:a(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["user.user/edit"]]]),f((i(),r(m,{type:"danger",link:"",onClick:C=>g(l.id)},{default:a(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["user.user/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",ve,[e(K,{modelValue:o(c),"onUpdate:modelValue":t[5]||(t[5]=l=>ce(c)?c.value=l:null),onChange:o(F)},null,8,["modelValue","onChange"])])]),_:1})),[[M,o(c).loading]]),o(v)?(i(),r(fe,{key:0,ref_key:"editRef",ref:b,"dict-data":o(E),onSuccess:o(F),onClose:t[6]||(t[6]=l=>v.value=!1)},null,8,["dict-data","onSuccess"])):_e("",!0)])}}});export{sl as default};