|
@@ -144,24 +144,24 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
}
|
|
|
},
|
|
|
username:{
|
|
|
- title:'账号名',
|
|
|
+ title:'用户名',
|
|
|
type:'input',
|
|
|
column: {
|
|
|
show: false,
|
|
|
minWidth: 120,
|
|
|
},
|
|
|
form: {
|
|
|
- component: { placeholder: '请填写账号名' },
|
|
|
- rules: [{ required: true, message: '请填写账号名' }],
|
|
|
+ component: { placeholder: '请填写用户名' },
|
|
|
+ rules: [{ required: true, message: '请填写用户名' }],
|
|
|
},
|
|
|
viewForm:{
|
|
|
component: { placeholder: '' },
|
|
|
}
|
|
|
},
|
|
|
name: {
|
|
|
- title: '名称',
|
|
|
+ title: '姓名',
|
|
|
search: {
|
|
|
- show: true,
|
|
|
+ show: false,
|
|
|
},
|
|
|
treeNode: true,
|
|
|
type: 'input',
|
|
@@ -171,10 +171,10 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
form: {
|
|
|
rules: [
|
|
|
// 表单校验规则
|
|
|
- { required: true, message: '名称必填项' },
|
|
|
+ { required: true, message: '姓名必填项' },
|
|
|
],
|
|
|
component: {
|
|
|
- placeholder: '请输入名称',
|
|
|
+ placeholder: '请输入姓名',
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -260,24 +260,31 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
data: [
|
|
|
{ label: '学生', value: 0 },
|
|
|
{ label: '教师', value: 1 },
|
|
|
- { label: '校外团体', value: 2 },
|
|
|
+ { label: '外部用户', value: 2 },
|
|
|
{ label: '学院领导', value: 3 },
|
|
|
],
|
|
|
}),
|
|
|
form: {
|
|
|
- component: { placeholder: '请填写租户' },
|
|
|
+ component: { placeholder: '请选择用户类型' },
|
|
|
|
|
|
|
|
|
|
|
|
- rules: [{ required: false, message: '请填写租户' }],
|
|
|
+ rules: [{ required: false, message: '请选择用户类型' }],
|
|
|
},
|
|
|
},
|
|
|
+ organization_ref:{
|
|
|
+ title: '组织架构',
|
|
|
+ type: "dict-cascader",
|
|
|
+ column: {
|
|
|
+ show: false,
|
|
|
+ }
|
|
|
+ },
|
|
|
/* 组织架构*/
|
|
|
- /* organization_detail:{
|
|
|
+ organization_detail:{
|
|
|
title: '组织架构',
|
|
|
- type: 'input',
|
|
|
+ type: 'dict-cascader',
|
|
|
column: {
|
|
|
- show: true,
|
|
|
+ show: false,
|
|
|
minWidth: 200,
|
|
|
formatter: ({ row, value }: { row: any; value: any }) => {
|
|
|
// 如果有 organization_detail 对象,显示 full_path
|
|
@@ -296,16 +303,20 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
viewForm:{
|
|
|
component: { placeholder: '' },
|
|
|
}
|
|
|
- }, */
|
|
|
+ },
|
|
|
organization:{
|
|
|
title: '学院',
|
|
|
type: 'input',
|
|
|
+ search:{
|
|
|
+ show:true
|
|
|
+ },
|
|
|
column: {
|
|
|
show: true,
|
|
|
minWidth: 200,
|
|
|
formatter: ({ row, value }: { row: any; value: any }) => {
|
|
|
// 如果有 organization_detail 对象,显示 parent_chain 的第二项(专业)
|
|
|
if (row.organization_detail && row.organization_detail.parent_chain && row.organization_detail.parent_chain.length >= 2) {
|
|
|
+ if(!row.organization_detail.parent_chain[0]) return
|
|
|
const major = row.organization_detail.parent_chain[0]; // 第二项是专业
|
|
|
return major.name || major.code || '';
|
|
|
}
|
|
@@ -322,6 +333,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
}, */
|
|
|
},
|
|
|
form: {
|
|
|
+ show:false,
|
|
|
component: { placeholder: '请填写学院' },
|
|
|
rules: [{ required: false, message: '请填写学院' }],
|
|
|
},
|
|
@@ -332,12 +344,16 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
sub_organization:{
|
|
|
title: '专业',
|
|
|
type: 'input',
|
|
|
+ search:{
|
|
|
+ show:true
|
|
|
+ },
|
|
|
column: {
|
|
|
show: true,
|
|
|
minWidth: 120,
|
|
|
formatter: ({ row, value }: { row: any; value: any }) => {
|
|
|
// 如果有 organization_detail 对象,显示 parent_chain 的第二项(专业)
|
|
|
if (row.organization_detail && row.organization_detail.parent_chain && row.organization_detail.parent_chain.length >= 2) {
|
|
|
+ if(!row.organization_detail.parent_chain[1]) return
|
|
|
const major = row.organization_detail.parent_chain[1]; // 第二项是专业
|
|
|
return major.name || major.code || '';
|
|
|
}
|
|
@@ -346,6 +362,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
},
|
|
|
},
|
|
|
form: {
|
|
|
+ show:false,
|
|
|
component: { placeholder: '请填写专业' },
|
|
|
rules: [{ required: false, message: '请填写专业' }],
|
|
|
},
|
|
@@ -356,12 +373,16 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
grade_or_level:{
|
|
|
title: '年级',
|
|
|
type: 'input',
|
|
|
+ search:{
|
|
|
+ show:true
|
|
|
+ },
|
|
|
column: {
|
|
|
show: true,
|
|
|
minWidth: 120,
|
|
|
formatter: ({ row, value }: { row: any; value: any }) => {
|
|
|
// 如果有 organization_detail 对象,显示 parent_chain 的第二项(专业)
|
|
|
if (row.organization_detail && row.organization_detail.parent_chain && row.organization_detail.parent_chain.length >= 2) {
|
|
|
+ if(!row.organization_detail.parent_chain[2]) return
|
|
|
const major = row.organization_detail.parent_chain[2]; // 第二项是专业
|
|
|
return major.name || major.code || '';
|
|
|
}
|
|
@@ -370,6 +391,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
},
|
|
|
},
|
|
|
form: {
|
|
|
+ show:false,
|
|
|
component: { placeholder: '请填写年级' },
|
|
|
rules: [{ required: false, message: '请填写年级' }],
|
|
|
},
|
|
@@ -380,6 +402,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
class_or_group:{
|
|
|
title: '班级',
|
|
|
type: 'input',
|
|
|
+ search:{
|
|
|
+ show:true
|
|
|
+ },
|
|
|
column: {
|
|
|
show: true,
|
|
|
minWidth: 120,
|
|
@@ -393,6 +418,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
|
|
|
},
|
|
|
},
|
|
|
form: {
|
|
|
+ show:false,
|
|
|
component: { placeholder: '请填写班级' },
|
|
|
rules: [{ required: false, message: '请填写班级' }],
|
|
|
},
|