import{E as w}from"./index-CCavIuTY.js";import{E as y}from"./el-tag-C_D80BPW.js";import{a as h,E}from"./el-table-DkdQ6gPU.js";import{v as T}from"./directive-vzjADwzS.js";import{d as x,G as V,K as B,c as C,q as r,s as t,w as o,y as m,da as U,o as k,x as i,f as d,aa as u}from"./index-CGB0A5x_.js";import"./el-scrollbar-p6_f_LH2.js";import"./el-popper-DvBtRO32.js";import"./el-tooltip-l0sNRNKZ.js";import"./el-checkbox-Ci1DH0Aj.js";import{s as N,a as S}from"./status-Dl1fykxa.js";import{_ as D}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./_baseClone-CX1E8HTZ.js";import"./index-DMVRI44M.js";import"./_baseIteratee-uVh0OyD5.js";import"./castArray-Cgg396Sr.js";import"./debounce-Bqww2DS8.js";import"./toNumber-IRhFg6gN.js";import"./index-BPwPlcbL.js";import"./raf-CCivjDro.js";import"./omit-DaFv1hTo.js";const L={class:"user-settings"},$={class:"page-header"},q=x({__name:"UserSettingsView",setup(z){const l=m(!1),n=m([]);async function _(){l.value=!0;try{n.value=await U()}finally{l.value=!1}}return V(_),(c,e)=>{const f=w,a=E,g=y,b=h,v=T;return B((k(),C("section",L,[r("header",$,[e[2]||(e[2]=r("div",null,[r("h1",null,"用户设置"),r("p",null,"管理平台账号、角色状态和页面权限。")],-1)),t(f,{type:"primary",onClick:e[0]||(e[0]=s=>c.$router.push("/user-settings/create"))},{default:o(()=>[...e[1]||(e[1]=[i("创建用户",-1)])]),_:1})]),t(b,{data:n.value},{default:o(()=>[t(a,{prop:"username",label:"账号","min-width":"140"}),t(a,{prop:"display_name",label:"显示名称","min-width":"160"}),t(a,{prop:"role",label:"角色",width:"120"}),t(a,{label:"状态",width:"120"},{default:o(({row:s})=>[t(g,{type:d(N)(s.status),size:"small"},{default:o(()=>[i(u(d(S)(s.status)),1)]),_:2},1032,["type"])]),_:1}),t(a,{label:"权限数",width:"120"},{default:o(({row:s})=>{var p;return[i(u(((p=s.permissions)==null?void 0:p.length)||0),1)]}),_:1}),t(a,{prop:"create_time",label:"创建时间","min-width":"180"})]),_:1},8,["data"])])),[[v,l.value]])}}}),st=D(q,[["__scopeId","data-v-16fa3de4"]]);export{st as default};
