import{t as e}from"./jsx-runtime-NwRKtVrk.js";import{t}from"./button-CM-rzMOH.js";import{q as n}from"./es-Do50EHua.js";import{t as r}from"./tag-C0Yg14A-.js";import{t as i}from"./XinTable-Cyzgse09.js";var a=e(),o=Array.from({length:50},(e,t)=>({id:t+1,name:`用户${t+1}`,email:`user${t+1}@example.com`,age:Math.floor(Math.random()*40)+20,status:+(Math.random()>.3),role:[`管理员`,`编辑`,`访客`][Math.floor(Math.random()*3)],department:[`技术部`,`产品部`,`运营部`,`市场部`][Math.floor(Math.random()*4)],createdAt:new Date(Date.now()-Math.random()*1e10).toLocaleDateString()})),s=()=>(0,a.jsx)(i,{columns:[{title:`序号`,width:60,valueType:`text`,dataIndex:`id`},{dataIndex:`name`,title:`用户名`,width:120,valueType:`text`,required:!0},{dataIndex:`email`,title:`邮箱`,valueType:`text`,width:200,ellipsis:!0},{dataIndex:`age`,title:`年龄`,width:80,valueType:`digit`,sorter:(e,t)=>e.age-t.age,hideInSearch:!0},{dataIndex:`status`,title:`状态`,width:100,valueType:`select`,render:e=>{let t={1:{text:`启用`,color:`green`},0:{text:`禁用`,color:`red`}}[e];return t?(0,a.jsx)(r,{color:t.color,children:t.text}):`-`},filters:[{text:`启用`,value:1},{text:`禁用`,value:0}]},{dataIndex:`role`,title:`角色`,width:100,valueType:`select`,fieldProps:{options:[{label:`管理员`,value:`管理员`},{label:`编辑`,value:`编辑`},{label:`访客`,value:`访客`}]}},{dataIndex:`department`,title:`部门`,width:120,valueType:`select`,fieldProps:{options:[{label:`技术部`,value:`技术部`},{label:`产品部`,value:`产品部`},{label:`运营部`,value:`运营部`},{label:`市场部`,value:`市场部`}]},hideInSearch:!0},{dataIndex:`createdAt`,title:`创建时间`,width:120,hideInForm:!0,hideInSearch:!0}],rowKey:`id`,dataSource:o,accessName:`system.user.list`,api:`/system-user/list`,toolBarRender:e=>[(0,a.jsx)(t,{icon:(0,a.jsx)(n,{}),children:`导出`},`export`),e.columnSetting,e.hideBorder,e.reload,e.columnHeight]});export{s as default};