import{r as s,S as a,W as i}from"./index.CL7yl-Wb.js";import{aH as n}from"./vue.D1BjjNmv.js";const r="/api/system/job_applications/";function l(e){return s({url:"/api/system/question_tag/list",method:"get",params:{...e,tenant_id:a.get("tenant_id")}})}function u(e){return s({url:"/api/system/question_tag/create",method:"post",data:{...e,tenant_id:a.get("tenant_id")}})}function d(e){return s({url:"/api/system/question_tag/update",method:"post",data:{...e,tenant_id:a.get("tenant_id")}})}function c(e){return s({url:"/api/system/question_tag/delete",method:"post",data:{...e,tenant_id:a.get("tenant_id")}})}function q(){return s({url:r,method:"get"})}function m(e){return s({url:"/api/system/question_category/list",method:"get",params:{...e,tenant_id:a.get("tenant_id")}})}const p=function({crudExpose:e}){return n(),{crudOptions:{toolbar:{buttons:{search:{show:!1},refresh:{show:!1},compact:{show:!1},export:{text:"导出",type:"primary",size:"small",icon:"upload",circle:!1,display:!0,show:!1},columns:{show:!1}}},request:{pageRequest:async t=>await l(t),addRequest:async({form:t})=>await u(t),editRequest:async({form:t,row:o})=>(t.id=o.id,await d(t)),delRequest:async({row:t})=>await c({id:t.id})},actionbar:{buttons:{add:{show:!0}}},rowHandle:{fixed:"right",width:200,buttons:{view:{show:!1},edit:{iconRight:"Edit",type:"text",show:!0},remove:{iconRight:"Delete",type:"text",show:!0}}},pagination:{show:!0},table:{rowKey:"id"},search:{show:!0,autoSearch:!1,buttons:{search:{size:"small"},reset:{size:"small"}}},columns:{id:{title:"ID",form:{show:!1},column:{show:!1}},name:{title:"标签名称",search:{show:!0,component:{placeholder:"请输入标签名称"},size:"small",col:{span:3}},type:"input",column:{minWidth:120},form:{rules:[{required:!0,message:"标签名称为必填项"}]}},category_id:{title:"分类",search:{show:!0,size:"small",col:{span:3}},type:"dict-select",column:{minWidth:120,show:!1},dict:i({getData:async()=>{const t=await m({page:1,limit:100,tenant_id:a.get("tenant_id")});return console.log(t.data.items),t.data.items||[]},label:"name",value:"id"}),form:{rules:[{required:!0,message:"分类为必填项"}]}},category_name:{title:"分类名称",column:{minWidth:120},form:{show:!1}},sort:{title:"排序",type:"number",column:{minWidth:80},form:{value:1}},questions_count:{title:"问题数量",type:"number",column:{minWidth:100},form:{show:!1}},create_datetime:{title:"创建时间",type:"datetime",column:{minWidth:160},form:{show:!1}},update_datetime:{title:"更新时间",type:"datetime",column:{minWidth:160},form:{show:!1}},description:{title:"描述",search:{show:!1,component:{placeholder:"请输入描述"}},type:"textarea",column:{minWidth:150,showOverflowTooltip:!0},form:{component:{span:24,placeholder:"请输入标签描述"}}}}}}},b=Object.freeze(Object.defineProperty({__proto__:null,createCrudOptions:p},Symbol.toStringTag,{value:"Module"}));export{q as G,b as a,p as c};
