import{r as o,W as l}from"./index.BKEMpsLA.js";import{a}from"./authFunction.DqglRaEG.js";const r="/api/system/app_user/";function s(e){return o({url:r+"?user_type=0",method:"get",params:e})}function u(e){return o({url:r+e+"/",method:"get"})}function i(e){return o({url:r,method:"post",data:e})}function m(e){return o({url:r+e.id+"/",method:"put",data:e})}function c(e){return o({url:r+e+"/",method:"delete",data:{id:e}})}function v(){return o({url:r,method:"get"})}const d=function({crudExpose:e}){return{crudOptions:{request:{pageRequest:async t=>await s(t),editRequest:async({form:t,row:n})=>(t.id=n.id,await m(t)),delRequest:async({row:t})=>await c(t.id),addRequest:async({form:t})=>await i(t),getDetail:async({row:t})=>await u(t.id)},actionbar:{buttons:{add:{show:a("area:Create")}}},form:{wrapper:{buttons:{ok:{text:"提交"}}}},pagination:{show:!1},columns:{_index:{title:"序号",form:{show:!1},column:{type:"index",align:"center",width:"70px",columnSetDisabled:!0}},user_code:{title:"学号",type:"input",column:{minWidth:120},form:{component:{placeholder:"请填写学号"},rules:[{required:!0,message:"请填写学号"}]},viewForm:{component:{placeholder:""}}},username:{title:"账号名",type:"input",column:{show:!1,minWidth:120},form:{component:{placeholder:"请填写账号名"},rules:[{required:!0,message:"请填写账号名"}]},viewForm:{component:{placeholder:""}}},name:{title:"名称",search:{show:!0},treeNode:!0,type:"input",column:{minWidth:120},form:{rules:[{required:!0,message:"名称必填项"}],component:{placeholder:"请输入名称"}},viewForm:{component:{placeholder:""}}},password:{title:"密码",type:"input",column:{minWidth:120,show:!1},form:{component:{placeholder:"请填写密码"},rules:[{required:!0,message:"请填写密码"}]},editForm:{show:!1},viewForm:{show:!1}},email:{title:"邮箱",type:"input",column:{show:!1,minWidth:120},form:{component:{placeholder:"请填写邮箱"},rules:[{required:!1,message:"请填写邮箱"}]},viewForm:{component:{placeholder:""}}},mobile:{title:"手机号",type:"input",column:{show:!1,minWidth:120},form:{component:{placeholder:"请填写手机号"},rules:[{required:!0,message:"请填写手机号"}]},viewForm:{component:{placeholder:""}}},gender:{title:"性别",type:"dict-select",column:{show:!1,minWidth:120},dict:l({data:[{label:"男",value:1},{label:"女",value:2}]}),form:{component:{placeholder:"请选择性别"},rules:[{required:!0,message:"请选择性别"}]}},user_type:{title:"用户类型",type:"dict-select",column:{minWidth:120},dict:l({data:[{label:"学生",value:0},{label:"教师",value:1},{label:"校外团体",value:2},{label:"学院领导",value:3}]}),form:{value:0,component:{placeholder:"请填写租户"},rules:[{required:!1,message:"请填写租户"}]}},organization:{title:"学院",type:"input",column:{show:!0,minWidth:120},form:{component:{placeholder:"请填写学院"},rules:[{required:!1,message:"请填写学院"}]},viewForm:{component:{placeholder:""}}},sub_organization:{title:"专业",type:"input",column:{show:!0,minWidth:120},form:{component:{placeholder:"请填写专业"},rules:[{required:!1,message:"请填写专业"}]},viewForm:{component:{placeholder:""}}},grade_or_level:{title:"年级",type:"input",column:{show:!0,minWidth:120},form:{component:{placeholder:"请填写年级"},rules:[{required:!1,message:"请填写年级"}]},viewForm:{component:{placeholder:""}}},class_or_group:{title:"班级",type:"input",column:{show:!0,minWidth:120},form:{component:{placeholder:"请填写班级"},rules:[{required:!1,message:"请填写班级"}]},viewForm:{component:{placeholder:""}}}}}}},b=Object.freeze(Object.defineProperty({__proto__:null,createCrudOptions:d},Symbol.toStringTag,{value:"Module"}));export{v as G,b as a,d as c};
