import{W as r,r as o}from"./index.Df8UJ10K.js";import{a as s,D as a,U as l,A as n,G as u}from"./api._lNgVYz0.js";import"./vue.D1BjjNmv.js";const g=function({crudExpose:i}){return{crudOptions:{request:{pageRequest:async e=>await u(e),addRequest:async({form:e})=>await n(e),editRequest:async({form:e,row:t})=>(e.id=t.id,await l(e)),delRequest:async({row:e})=>await a(e.id),getDetail:async({row:e})=>await s(e.id)},form:{wrapper:{buttons:{ok:{text:"提交",show:o(e=>e.mode!=="view")}}}},toolbar:{show:!1},rowHandle:{buttons:{remove:{show:!0},edit:{show:!0}}},actionbar:{buttons:{add:{show:!0}}},pagination:{show:!0},columns:{_index:{title:"序号",form:{show:!1},column:{type:"index",align:"center",width:"70px",columnSetDisabled:!0}},keyword:{title:"关键字搜索",search:{show:!0,type:"input"},type:"input",form:{component:{placeholder:"请输入"},show:!1},column:{show:!1}},code:{title:"分类编码",type:"input",column:{show:!1,minWidth:120},form:{show:!1}},name:{title:"分类名称",search:{show:!1},treeNode:!0,type:"input",column:{},form:{rules:[{required:!0,message:"名称必填项"}],component:{placeholder:"请输入名称"}},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},description:{title:"分类描述",type:"input",column:{width:800},form:{component:{placeholder:"请填写分类描述"},rules:[{required:!1,message:"请填写分类描述"}]},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},parent:{title:"设备父级",type:"input",column:{show:!1,minWidth:120},form:{show:!1,component:{placeholder:"请填写设备父级"},rules:[{required:!1,message:"请填写设备父级"}]},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},sort:{title:"排序",type:"input",column:{show:!1,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",search:{show:!0},column:{width:120},dict:r({data:[{label:"启用",value:!0},{label:"禁用",value:!1,color:"danger"}]}),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{g as createCrudOptions};
