test_lgq/niucloud/public/admin/assets/user-0507c301.js

2 lines
5.9 KiB
JavaScript
Raw Normal View History

2024-01-24 17:36:08 +08:00
import{d as j,n as z,r as x,h as r,c as _,e as n,w as o,a as g,u as a,N as t,i as p,t as s,y as I,I as h,R,B as y,a8 as C,W as S,X as M,E as W,Y as X,ah as Y,aw as q,aj as A,at as G,$ as H,a0 as J}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{_ as K}from"./member_head-a897263d.js";import{l as O,u as Q}from"./site-ac963391.js";import{g as Z}from"./user-1e1ca1a9.js";import{_ as ee}from"./edit-user.vue_vue_type_script_setup_true_lang-238de6d3.js";/* empty css *//* empty css */import"./index-742b412a.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-5c6c00d9.js";import"./attachment-c69dd9fd.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-9285296e.js";/* empty css */import"./sys-8ead7f22.js";/* empty css */const te={class:"main-container"},ae={class:"flex justify-between items-center"},le={class:"w-[35px] h-[35px] flex items-center justify-center"},oe=["src"],ne={key:1,src:K,class:"w-[35px] rounded-full"},ie={key:0},se={key:1},re={key:0},me={key:1},pe={class:"mt-[16px] flex justify-end"},He=j({__name:"user",setup(ce){const l=z({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{seach:"",user_type:""}}),k=x(),E=m=>{m&&(m.resetFields(),c())},c=(m=1)=>{l.loading=!0,l.page=m,Z({page:l.page,limit:l.limit,username:l.searchParam.seach,user_type:l.searchParam.user_type}).then(i=>{l.loading=!1,l.data=i.data.data,l.total=i.data.total}).catch(()=>{l.loading=!1})};c();const f=x(null),T=()=>{f.value.setFormData(),f.value.showDialog=!0},U=m=>{f.value.setFormData(m),f.value.showDialog=!0},B=m=>{C.confirm(t("userLockTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{O(m).then(()=>{c()}).catch(()=>{})})},D=m=>{C.confirm(t("userUnlockTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{Q(m).then(()=>{c()}).catch(()=>{})})};return(m,i)=>{const N=S,b=M,u=W,P=X,d=Y,v=q,$=A,F=G,L=H,V=J;return r(),_("div",te,[n(L,{class:"box-card !border-none",shadow:"never"},{default:o(()=>[g("div",ae,[n(P,{inline:!0,model:l.searchParam,ref_key:"searchFormRef",ref:k},{default:o(()=>[n(b,{label:a(t)("accountNumber"),prop:"seach"},{default:o(()=>[n(N,{modelValue:l.searchParam.seach,"onUpdate:modelValue":i[0]||(i[0]=e=>l.searchParam.seach=e),class:"input-width",placeholder:a(t)("accountNumberPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),n(b,null,{default:o(()=>[n(u,{type:"primary",onClick:i[1]||(i[1]=e=>c())},{default:o(()=>[p(s(a(t)("search")),1)]),_:1}),n(u,{onClick:i[2]||(i[2]=e=>E(k.value))},{default:o(()=>[p(s(a(t)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"]),n(u,{type:"primary",class:"w-[100px] self-start",onClick:T},{default:o(()=>[p(s(a(t)("addUser")),1)]),_:1})]),g("div",null,[I((r(),h($,{data:l.data,size:"large"},{empty:o(()=>[g("span",null,s(l.loading?"":a(t)("emptyData")),1)]),default:o(()=>[n(d,{label:a(t)("headImg"),width:"100",align:"left"},{default:o(({row:e})=>[g("div",le,[e.head_img?(r(),_("img",{key:0,src:a(R)(e.head_img),class:"w-[35px] rounded-full"},null,8,oe)):(r(),_("img",ne))])]),_:1},8,["label"]),n(d,{prop:"username",label:a(t)("accountNumber"),"min-width":"120","show-overflow-tooltip":""},null,8,["label"]),n(d,{prop:"real_name",label:a(t)("userRealName"),"min-width":"120","show-overflow-tooltip":""},null,8,["label"]),n(d,{