import{r,W as n}from"./index.CN1lNsL-.js";import{a}from"./authFunction.qG4aq-Mj.js";const o="/api/system/device/category/";function s(e){return r({url:o,method:"get",params:e})}function l(e){return r({url:o+e+"/",method:"get"})}function u(e){return r({url:o,method:"post",data:e})}function h(){return r({url:o,method:"get"})}const i=function({crudExpose:e}){return{crudOptions:{request:{pageRequest:async t=>await s(t),addRequest:async({form:t})=>await u(t),getDetail:async({row:t})=>await l(t.id)},toolbar:{show:!1},rowHandle:{buttons:{remove:{show:!1},edit:{show:!1}}},actionbar:{buttons:{add:{show:a("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:"请输入名称"}}},description:{title:"设备描述",type:"input",column:{minWidth:120},form:{component:{placeholder:"请填写设备描述"},rules:[{required:!1,message:"请填写设备描述"}]}},parent:{title:"父级",type:"input",column:{minWidth:120},form:{component:{placeholder:"请填写设备父级"},rules:[{required:!1,message:"请填写设备父级"}]}},sort:{title:"排序",type:"input",column:{minWidth:120},form:{component:{placeholder:"请填写排序"},rules:[{required:!0,message:"请填写排序"}]}},status:{title:"状态",type:"dict-select",column:{minWidth:120},dict:n({data:[{label:"启用",value:!0},{label:"禁用",value:!1}]}),form:{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:"请填写租户"}]}}}}}},g=Object.freeze(Object.defineProperty({__proto__:null,createCrudOptions:i},Symbol.toStringTag,{value:"Module"}));export{h as G,g as a,i as c};
