import{W as r}from"./index.BKEMpsLA.js";import{a as o,D as s,U as a,A as l,G as n}from"./api.DDmks2Xr.js";import{a as u}from"./authFunction.DqglRaEG.js";import"./vue.YrNK8sx4.js";const y=function({crudExpose:i}){return{crudOptions:{request:{pageRequest:async e=>await n(e),addRequest:async({form:e})=>await l(e),editRequest:async({form:e,row:t})=>(e.id=t.id,await a(e)),delRequest:async({row:e})=>await s(e.id),getDetail:async({row:e})=>await o(e.id)},form:{wrapper:{buttons:{ok:{text:"提交"}}}},toolbar:{show:!1},rowHandle:{buttons:{remove:{show:!0},edit:{show:!1}}},actionbar:{buttons:{add:{show:u("area:Create")}}},pagination:{show:!1},columns:{_index:{title:"序号",form:{show:!1},column:{type:"index",align:"center",width:"70px",columnSetDisabled:!0}},code:{title:"分类编码",type:"input",column:{minWidth:120},form:{show:!1}},name:{title:"名称",search:{show:!0},treeNode:!0,type:"input",column:{minWidth:120},form:{rules:[{required:!0,message:"名称必填项"}],component:{placeholder:"请输入名称"}},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},description:{title:"设备描述",type:"input",column:{minWidth:120},form:{component:{placeholder:"请填写设备描述"},rules:[{required:!1,message:"请填写设备描述"}]},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},parent:{title:"父级",type:"input",column:{minWidth:120},form:{component:{placeholder:"请填写设备父级"},rules:[{required:!1,message:"请填写设备父级"}]},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},sort:{title:"排序",type:"input",column:{minWidth:120},form:{value:1,show:!1,component:{placeholder:"请填写排序"},rules:[{required:!0,message:"请填写排序"}]},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},status:{title:"状态",type:"dict-select",column:{minWidth:120},dict:r({data:[{label:"启用",value:!0},{label:"禁用",value:!1}]}),form:{component:{placeholder:"请填写状态"},rules:[{required:!0,message:"请填写状态"}]},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},tenant:{title:"租户",type:"input",value:1,column:{show:!1,minWidth:120},form:{show:!1,component:{placeholder:"请填写租户"},rules:[{required:!1,message:"请填写租户"}]}}}}}};export{y as createCrudOptions};
