import{D as r,U as l,A as n,a as i}from"./api.DTCXdPzK.js";import{W as a}from"./index.CL7yl-Wb.js";import"./vue.D1BjjNmv.js";const w=function({crudExpose:o}){return{crudOptions:{request:{pageRequest:async e=>await i(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 r(e.id)},view:{dialog:{footer:!1,footerBuild:()=>null}},actionbar:{buttons:{add:{text:"新增标签",icon:"Plus",type:"primary",show:!0}}},search:{show:!0,layout:"auto",autoSearch:!1,buttons:{search:{size:"small"},reset:{size:"small"}}},rowHandle:{fixed:"right",width:260,buttons:{view:{iconRight:"View",type:"text",show:!0},edit:{iconRight:"Edit",type:"text",show:!0},remove:{iconRight:"Delete",type:"text",show:!0}}},form:{col:{span:24},labelWidth:"110px",wrapper:{is:"el-dialog",width:"600px",title:"标签信息"},defaultValue:{color:"#4A90E2",is_system:!1,status:!0},display:"flex",labelPosition:"right"},columns:{_index:{title:"序号",form:{show:!1},column:{align:"center",width:"70px",columnSetDisabled:!0,formatter:e=>{let t=e.index??1,s=o.crudBinding.value.pagination;return((s.currentPage??1)-1)*s.pageSize+t+1}}},name:{title:"标签名称",search:{show:!0,component:{props:{clearable:!0},placeholder:"请输入标签名称"}},form:{rules:[{required:!0,message:"请输入标签名称"},{max:50,message:"标签名称不能超过50个字符"}],component:{span:24,props:{clearable:!0,placeholder:"请输入标签名称"}}},column:{minWidth:120}},description:{title:"标签描述",search:{show:!1},form:{rules:[{max:200,message:"标签描述不能超过200个字符"}],component:{span:24,name:"el-input",type:"textarea",props:{rows:3,placeholder:"请输入标签描述"}}},column:{minWidth:200,showOverflowTooltip:!0}},employment_status:{title:"标签类型",search:{show:!0},type:"dict-select",dict:a({data:[{label:"在职",value:1},{label:"在外",value:2}]}),form:{value:1,component:{span:24}}},color:{title:"标签颜色",search:{show:!1},form:{show:!1,rules:[{required:!0,message:"请选择标签颜色"}],component:{span:24,name:"el-color-picker",props:{showAlpha:!1}}},column:{show:!1,width:80,component:{name:"el-tag",props:e=>({color:e.row.color,effect:"plain"})}}},is_system:{title:"系统标签",search:{show:!0},type:"dict-select",dict:a({data:[{label:"是",value:!0},{label:"否",value:!1}]}),form:{value:!1,component:{span:24}},column:{width:160,formatter:e=>e.row.is_system?"是":"否",component:{name:"el-tag",props:e=>({type:e.row.is_system?"":"info",effect:"plain",round:!0})}}},status:{title:"状态",search:{show:!1},type:"dict-radio",dict:a({data:[{label:"启用",value:!0},{label:"禁用",value:!1}]}),form:{show:!1,value:!0,component:{show:!1,span:24}},column:{show:!1,width:160,formatter:e=>e.row.status?"启用":"禁用",component:{name:"el-tag",props:e=>({type:e.row.status?"":"info",effect:"plain",round:!0})}}}}}}};export{w as createCrudOptions};
