2 lines
5.8 KiB
JavaScript
2 lines
5.8 KiB
JavaScript
import{C as Q,D as q,K as M,L as Z,w as z,F as G,T as H,O as J,b as W,Q as X,R as Y}from"./element-plus.619595c4.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.02c63712.js";import{i as le,f as ae,l as te,b as oe,m as ue}from"./index.adbcc6f1.js";import{u as se}from"./usePaging.6a6670f9.js";import{u as ne}from"./useDictOptions.2130484f.js";import{d as U,s as ie,r as V,Z as re,ap as pe,o as i,c as x,U as e,L as t,u as a,T as me,a9 as de,K as p,R as c,M as f,a as C,S as ce,j as _e,Q as fe,n as B}from"./@vue.18505fe0.js";import"./lodash.0987e768.js";import{_ as be}from"./edit.vue_vue_type_script_setup_true_name_userEdit_lang.c517c1fe.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.6ad9ae30.js";import"./axios.fbe06b45.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.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"./nprogress.316b9a3d.js";import"./vue-clipboard3.f9a42727.js";import"./clipboard.bf37ca4b.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.cee998d0.js";import"./index.122ff80d.js";import"./index.a062bd93.js";import"./index.f9c4a330.js";import"./vuedraggable.4bfa7ed1.js";import"./vue.3bfea163.js";import"./sortablejs.2765eebe.js";const ve={class:"mt-4"},Fe={class:"flex mt-4 justify-end"},we=U({name:"userLists"}),rl=U({...we,setup(De){const b=ie(),v=V(!1),u=re({nickname:"",account:"",mobile:"",is_disable:""}),D=V([]),L=s=>{D.value=s.map(({id:o})=>o)},{dictData:g}=ne("sex_type,system_disable"),{pager:_,getLists:F,resetParams:S,resetPage:$}=se({fetchFun:ue,params:u}),R=async()=>{var s;v.value=!0,await B(),(s=b.value)==null||s.open("add")},T=async s=>{var m,r;let o=await le({id:s.id});v.value=!0,await B(),(m=b.value)==null||m.open("edit"),(r=b.value)==null||r.setFormData(o)},h=async s=>{await ae.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await te({id:s}),F()};return F(),(s,o)=>{const m=Q,r=q,y=M,P=Z,d=z,I=G,E=H,N=oe,n=J,j=W,A=X,K=ee,w=pe("perms"),O=Y;return i(),x("div",null,[e(E,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(I,{class:"mb-[-16px]",model:a(u),inline:""},{default:t(()=>[e(r,{label:"\u7528\u6237\u6635\u79F0",prop:"nickname"},{default:t(()=>[e(m,{class:"w-[280px]",modelValue:a(u).nickname,"onUpdate:modelValue":o[0]||(o[0]=l=>a(u).nickname=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u7528\u6237\u8D26\u53F7",prop:"account"},{default:t(()=>[e(m,{class:"w-[280px]",modelValue:a(u).account,"onUpdate:modelValue":o[1]||(o[1]=l=>a(u).account=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u8D26\u53F7"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u7528\u6237\u7535\u8BDD",prop:"mobile"},{default:t(()=>[e(m,{class:"w-[280px]",modelValue:a(u).mobile,"onUpdate:modelValue":o[2]||(o[2]=l=>a(u).mobile=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u662F\u5426\u7981\u7528",prop:"is_disable"},{default:t(()=>[e(P,{class:"w-[280px]",modelValue:a(u).is_disable,"onUpdate:modelValue":o[3]||(o[3]=l=>a(u).is_disable=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7981\u7528"},{default:t(()=>[e(y,{label:"\u5168\u90E8",value:""}),(i(!0),x(me,null,de(a(g).system_disable,(l,k)=>(i(),p(y,{key:k,label:l.name,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(r,null,{default:t(()=>[e(d,{type:"primary",onClick:a($)},{default:t(()=>[c("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:a(S)},{default:t(()=>[c("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((i(),p(E,{class:"!border-none",shadow:"never"},{default:t(()=>[f((i(),p(d,{type:"primary",onClick:R},{icon:t(()=>[e(N,{name:"el-icon-Plus"})]),default:t(()=>[c(" \u65B0\u589E ")]),_:1})),[[w,["user.user/add"]]]),f((i(),p(d,{disabled:!a(D).length,onClick:o[4]||(o[4]=l=>h(a(D)))},{default:t(()=>[c(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["user.user/delete"]]]),C("div",ve,[e(A,{data:a(_).lists,onSelectionChange:L},{default:t(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"ID",prop:"id",width:"100"}),e(n,{label:"\u5934\u50CF",prop:"avatar",width:"60"},{default:t(({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:t(({row:l})=>[C("span",null,ce(l.sex),1)]),_:1}),e(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:l})=>[f((i(),p(d,{type:"primary",link:"",onClick:k=>T(l)},{default:t(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["user.user/edit"]]]),f((i(),p(d,{type:"danger",link:"",onClick:k=>h(l.id)},{default:t(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["user.user/delete"]]])]),_:1})]),_:1},8,["data"])]),C("div",Fe,[e(K,{modelValue:a(_),"onUpdate:modelValue":o[5]||(o[5]=l=>_e(_)?_.value=l:null),onChange:a(F)},null,8,["modelValue","onChange"])])]),_:1})),[[O,a(_).loading]]),a(v)?(i(),p(be,{key:0,ref_key:"editRef",ref:b,"dict-data":a(g),onSuccess:a(F),onClose:o[6]||(o[6]=l=>v.value=!1)},null,8,["dict-data","onSuccess"])):fe("",!0)])}}});export{rl as default};
|