import{d as k,O as I,k as p,r as g,o as b,x as w,b as o,a as s,t as d,A as B,u as a,c as T,M as $,B as z}from"./vue.1703796278973.js";import{M as x,K as D,a0 as M,ax as O}from"./index.17037962789732.js";import"./index.1703796278973300.js";import"./index.170379627897315.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.170379627897314.js";import"./index.1703796278973304.js";import"./index.1703796278973305.js";import"./index.1703796278973306.js";import{_ as U}from"./index.vue_vue_type_script_setup_true_lang.17037962789733.js";import"./index.170379627897336.js";import{_ as h}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import{_ as j}from"./AddUserDialog.vue_vue_type_script_setup_true_lang.1703796278973.js";import{c as A,d as L}from"./role.1703796278973.js";import{a as N}from"./dayjs.min.1703796278973.js";import{_ as V}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.170379627897333.js";import"./index.170379627897320.js";import"./index.170379627897321.js";import"./permission.1703796278973.js";import"./index.170379627897337.js";import"./system.1703796278973.js";import"./comm.1703796278973.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const Y={class:"role-user-container"},q=k({name:"RoleUser"}),J=k({...q,setup(K){const l=I().params.id,_=[{title:"姓名",dataIndex:"name",key:"name",search:{type:"string"}},{title:"用户名",dataIndex:"username",key:"username",search:{type:"string"}},{title:"创建时间",dataIndex:"createTime",key:"createTime",search:{type:"date"},scopedSlots:!0},{title:"状态",dataIndex:"status",key:"status",search:{type:"select",options:[{label:"正常",value:1},{label:"禁用",value:0}]},scopedSlots:!0},{title:"操作",dataIndex:"action",key:"action",width:"200px",scopedSlots:!0}],f=p({}),y=p({}),n=p([]),i={getList:r=>{const e={...r,terms:[{terms:[{column:"id$in-dimension$role",value:l}]}]};return r.terms[0]&&e.terms.unshift({terms:r.terms[0].terms}),A(e)},unbind:r=>{const e=r||n.value;if(!e.length){x.warning("请勾选数据");return}L(l,e).then(c=>{c.status===200&&(x.success("操作成功"),i.refresh())})},refresh:()=>{y.value.reload(),n.value=[]}},m=p(!1);return(r,e)=>{const c=g("pro-search"),u=g("AIcon"),S=D,v=M,C=U,R=O;return b(),w("div",Y,[o(c,{columns:_,target:"category",onSearch:e[0]||(e[0]=t=>f.value={...t})}),o(R,{ref_key:"tableRef",ref:y,columns:_,request:i.getList,model:"TABLE",params:a(f),rowSelection:{selectedRowKeys:a(n),onChange:t=>n.value=t},onCancelSelect:e[2]||(e[2]=t=>n.value=[]),size:"small",defaultParams:{pageSize:10},pagination:{showSizeChanger:!0,pageSizeOptions:["10","20","50","100"]}},{headerTitle:s(()=>[o(v,null,{default:s(()=>[o(S,{type:"primary",onClick:e[1]||(e[1]=t=>m.value=!0)},{default:s(()=>[o(u,{type:"PlusOutlined"}),d("新增 ")]),_:1}),o(h,{popConfirm:{title:"是否批量解除绑定",onConfirm:()=>i.unbind()}},{default:s(()=>[o(u,{type:"DisconnectOutlined"}),d("批量解绑 ")]),_:1},8,["popConfirm"])]),_:1})]),status:s(t=>[o(C,{status:t.status,text:t.status?"正常":"禁用",statusNames:{1:"success",0:"error"}},null,8,["status","text"])]),createTime:s(t=>[d(B(a(N)(t.createTime).format("YYYY-MM-DD HH:mm:ss")),1)]),action:s(t=>[o(v,{size:16},{default:s(()=>[o(h,{type:"link",tooltip:{title:"解绑"},"pop-confirm":{title:"确认解绑",onConfirm:()=>i.unbind([t.id])}},{default:s(()=>[o(u,{type:"DisconnectOutlined"})]),_:2},1032,["pop-confirm"])]),_:2},1024)]),_:1},8,["request","params","rowSelection"]),a(m)?(b(),T(j,{key:0,visible:a(m),"onUpdate:visible":e[3]||(e[3]=t=>$(m)?m.value=t:null),"role-id":a(l),onRefresh:i.refresh},null,8,["visible","role-id","onRefresh"])):z("",!0)])}}});const Te=V(J,[["__scopeId","data-v-f8393040"]]);export{Te as default};
