|
@@ -11,13 +11,13 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
return await api.GetObj(row.id);
|
|
|
};
|
|
|
|
|
|
- // const editRequest = async ({ form, row }: EditReq) => {
|
|
|
- // form.id = row.id;
|
|
|
- // return await api.UpdateObj(form);
|
|
|
- // };
|
|
|
- // const delRequest = async ({ row }: DelReq) => {
|
|
|
- // return await api.DelObj(row.id);
|
|
|
- // };
|
|
|
+ const editRequest = async ({ form, row }: EditReq) => {
|
|
|
+ form.id = row.id;
|
|
|
+ return await api.UpdateObj(form);
|
|
|
+ };
|
|
|
+ const delRequest = async ({ row }: DelReq) => {
|
|
|
+ return await api.DelObj(row.id);
|
|
|
+ };
|
|
|
const addRequest = async ({ form }: AddReq) => {
|
|
|
return await api.AddObj(form);
|
|
|
};
|
|
@@ -37,6 +37,8 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
crudOptions: {
|
|
|
request: {
|
|
|
pageRequest,
|
|
|
+ editRequest,
|
|
|
+ delRequest,
|
|
|
addRequest,
|
|
|
getDetail,
|
|
|
},
|
|
@@ -80,6 +82,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写学号' },
|
|
|
rules: [{ required: true, message: '请填写学号' }],
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
username:{
|
|
|
title:'昵称',
|
|
@@ -92,6 +97,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写昵称' },
|
|
|
rules: [{ required: true, message: '请填写昵称' }],
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
name: {
|
|
|
title: '名称',
|
|
@@ -112,6 +120,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
placeholder: '请输入名称',
|
|
|
},
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
password:{
|
|
|
title: '密码',
|
|
@@ -124,6 +135,12 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写密码' },
|
|
|
rules: [{ required: true, message: '请填写密码' }],
|
|
|
},
|
|
|
+ editForm:{
|
|
|
+ show:false,
|
|
|
+ },
|
|
|
+ viewForm:{
|
|
|
+ show:false,
|
|
|
+ }
|
|
|
},
|
|
|
email:{
|
|
|
title: '邮箱',
|
|
@@ -136,6 +153,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写邮箱' },
|
|
|
rules: [{ required: false, message: '请填写邮箱' }],
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
mobile:{
|
|
|
title: '手机号',
|
|
@@ -148,6 +168,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写手机号' },
|
|
|
rules: [{ required: true, message: '请填写手机号' }],
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
gender:{
|
|
|
title: '性别',
|
|
@@ -178,9 +201,11 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
{ label: '学生', value: 0 },
|
|
|
{ label: '教师', value: 1 },
|
|
|
{ label: '校外团体', value: 2 },
|
|
|
+ { label: '学院领导', value: 3 },
|
|
|
],
|
|
|
}),
|
|
|
form: {
|
|
|
+ value:0,
|
|
|
component: { placeholder: '请填写租户' },
|
|
|
rules: [{ required: false, message: '请填写租户' }],
|
|
|
},
|
|
@@ -196,6 +221,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写学院' },
|
|
|
rules: [{ required: false, message: '请填写学院' }],
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
sub_organization:{
|
|
|
title: '专业',
|
|
@@ -208,6 +236,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写专业' },
|
|
|
rules: [{ required: false, message: '请填写专业' }],
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
grade_or_level:{
|
|
|
title: '年级',
|
|
@@ -220,6 +251,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写年级' },
|
|
|
rules: [{ required: false, message: '请填写年级' }],
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
class_or_group:{
|
|
|
title: '班级',
|
|
@@ -232,6 +266,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
component: { placeholder: '请填写班级' },
|
|
|
rules: [{ required: false, message: '请填写班级' }],
|
|
|
},
|
|
|
+ viewForm:{
|
|
|
+ component: { placeholder: '' },
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
|