import{r}from"./index.ad3efb29.js";import"./vue.adf17aba.js";import"./elementPlus.4833989a.js";import"./echarts.72dc8373.js";const n="/api/system/file/";function o(e){return r({url:n,method:"get",params:e})}function s(e){return r({url:n,method:"post",data:e})}function u(e){return r({url:n+e.id+"/",method:"put",data:e})}function d(e){return r({url:n+e+"/",method:"delete",data:{id:e}})}const b=function({crudExpose:e}){return{crudOptions:{actionbar:{buttons:{add:{show:!1}}},request:{pageRequest:async t=>await o(t),addRequest:async({form:t})=>await s(t),editRequest:async({form:t,row:a})=>(t.id=a.id,await u(t)),delRequest:async({row:t})=>await d(t.id)},rowHandle:{fixed:"right",width:200,buttons:{view:{show:!1},edit:{iconRight:"Edit",type:"text"},remove:{iconRight:"Delete",type:"text"}}},columns:{_index:{title:"序号",form:{show:!1},column:{align:"center",width:"70px",columnSetDisabled:!0,formatter:t=>{let a=t.index??1,i=e.crudBinding.value.pagination;return((i.currentPage??1)-1)*i.pageSize+a+1}}},search:{title:"关键词",column:{show:!1},search:{show:!0,component:{props:{clearable:!0},placeholder:"请输入关键词"}},form:{show:!1,component:{props:{clearable:!0}}}},name:{title:"文件名称",search:{show:!0},type:"input",column:{minWidth:120},form:{component:{placeholder:"请输入文件名称"}}},url:{title:"文件地址",type:"file-uploader",search:{disabled:!0},column:{minWidth:200}},md5sum:{title:"文件MD5",search:{disabled:!0},column:{minWidth:120},form:{disabled:!1}}}}}};export{b as createCrudOptions};
