import{x as p}from"./index-48d043eb.js";import{g as m}from"./system-e3932fd4.js";import"./index-8c77f9cd.js";import"./_commonjsHelpers-042e6b4d.js";import"./hot-cf4dcfeb.js";import"./index-5e5694dd.js";import"./multiTags-d9cd5aad.js";import"./index-4b83e049.js";import"./index-b5591886.js";function D(){const a=Vue.reactive({user:"",status:""}),n=Vue.ref([]),t=Vue.ref(!0),o=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号",type:"index",minWidth:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"部门名称",prop:"name",width:180,align:"left"},{label:"排序",prop:"sort",minWidth:70},{label:"状态",prop:"status",minWidth:100,cellRenderer:({row:e,props:d})=>Vue.createVNode(Vue.resolveComponent("el-tag"),{size:d.size,type:e.status===1?"danger":"success",effect:"plain"},{default:()=>[e.status===0?"关闭":"开启"]})},{label:"创建时间",minWidth:200,prop:"createTime",formatter:({createTime:e})=>dayjs(e).format("YYYY-MM-DD HH:mm:ss")},{label:"备注",prop:"remark",minWidth:200},{label:"操作",fixed:"right",width:160,slot:"operation"}];function r(e){}function l(e){}function s(e){}function u(e){e&&(e.resetFields(),i())}async function i(){t.value=!0;const{data:e}=await m();n.value=p(e),setTimeout(()=>{t.value=!1},500)}return Vue.onMounted(()=>{i()}),{form:a,loading:t,columns:o,dataList:n,onSearch:i,resetForm:u,handleUpdate:r,handleDelete:l,handleSelectionChange:s}}export{D as useDept};