text: import{_ as e}from"./TableImg.840b2332.js";import{f as o}from"./BasicForm.d12ec528.js";import{u as i}from"./useTable.14907d98.js";import{g as t,d as n}from"./account.e598a6c0.js";import{_ as s}from"./PageWrapper.0a593267.js";import{b as a}from"./useModal.40813107.js";import r from"./AccountModal.bb67b9ed.js";import d from"./PasswordModal.ba4e4b1e.js";import c from"./SetGroupModal.11ea100d.js";import{c as l,s as u}from"./account.data.be685cbd.js";import{k as p,bp as m,bw as b,cf as f,r as g,K as j,o as h,n as w,q as S,Q as v,Y as M}from"./vendor.9d9efc92.js";/* empty css              *//* empty css              *//* empty css              *//* empty css              */import"./useForm.831c770a.js";import"./index.68bdfa67.js";/* empty css              *//* empty css              *//* empty css              */import"./uuid.c53863e7.js";import"./useWindowSizeFn.0534066c.js";import"./onMountedOrActivated.b73559bc.js";/* empty css              */import"./useSortable.86f4c026.js";import"./useExpose.0886c4eb.js";/* empty css              *//* empty css              */import"./CountdownInput.69c99d5f.js";/* empty css              *//* empty css              */import"./download.684fb6a2.js";import"./StrengthMeter.e21abcab.js";import"./usePageContext.a9e23595.js";/* empty css              */import"./group.b6e09fcc.js";var x=p({name:"Account",components:{BasicTable:e,PageWrapper:s,AccountModal:r,PasswordModal:d,SetGroupModal:c,TableAction:o,Avatar:m,Image:b,UserOutlined:f},setup(){const[e,{openModal:o}]=a(),[s,{openModal:r}]=a(),[d,{openModal:c}]=a(),p=g(""),m=g(!1),[b,{reload:f}]=i({title:"列表",api:t,columns:l,formConfig:{labelWidth:120,schemas:u,showAdvancedButton:!1,showResetButton:!1,autoSubmitOnEnter:!0},canColDrag:!0,useSearchForm:!0,bordered:!0,showIndexColumn:!1,actionColumn:{width:160,title:"操作",dataIndex:"action",slots:{customRender:"action"},fixed:!1}});return{registerTable:b,registerModal:e,registerPasswordModal:s,registerSetGroupModal:d,previewImage:p,previewImageVisible:m,previewImageHandle:function(e){e&&(p.value=e,m.value=!0)},previewImageVisibleChange:function(e,o){m.value=e},handleCreate:function(){o(!0,{isUpdate:!1})},handleEdit:function(e){o(!0,{record:e,isUpdate:!0})},handleSetPassword:function(e){r(!0,{record:e,isUpdate:!0})},handleSetGroup:function(e){c(!0,{record:e,isUpdate:!0})},handleDelete:function(e){n([e.id]).then((e=>{f()}))},handleSuccess:function(){f()},handlePasswordSuccess:function(){f()},handleSetGroupSuccess:function(){f()}}}});const C=M(" 新增 "),I={style:{width:"0",height:"0",overflow:"hidden"}};x.render=function(e,o,i,t,n,s){const a=j("a-button"),r=j("TableAction"),d=j("UserOutlined"),c=j("Avatar"),l=j("BasicTable"),u=j("Image"),p=j("AccountModal"),m=j("PasswordModal"),b=j("SetGroupModal");return h(),w("div",null,[S(l,{onRegister:e.registerTable},{toolbar:v((()=>[S(a,{type:"primary",onClick:e.handleCreate},{default:v((()=>[C])),_:1},8,["onClick"])])),action:v((({record:o})=>[S(r,{actions:[{title:"分配组",icon:"ant-design:usergroup-add",onClick:e.handleSetGroup.bind(null,o)},{title:"设置密码",icon:"ant-design:setting-outlined",onClick:e.handleSetPassword.bind(null,o)},{title:"修改",icon:"clarity:note-edit-line",onClick:e.handleEdit.bind(null,o)},{title:"删除",icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:"是否确认删除",confirm:e.handleDelete.bind(null,o)}}]},null,8,["actions"])])),imageRender:v((({record:o})=>[S(c,{src:o.image,onClick:i=>e.previewImageHandle(o.image)},{icon:v((()=>[S(d)])),_:2},1032,["src","onClick"])])),_:1},8,["onRegister"]),S("div",I,[S(u,{width:0,height:0,src:e.previewImage,preview:{visible:e.previewImageVisible,onVisibleChange:e.previewImageVisibleChange}},null,8,["src","preview"])]),S(p,{onRegister:e.registerModal,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"]),S(m,{onRegister:e.registerPasswordModal,onSuccess:e.handlePasswordSuccess},null,8,["onRegister","onSuccess"]),S(b,{onRegister:e.registerSetGroupModal,onSuccess:e.handleSetGroupSuccess},null,8,["onRegister","onSuccess"])])};export default x;
  