优化数据管理字段
This commit is contained in:
parent
b181f828dd
commit
9086285b76
|
@ -2,8 +2,14 @@ import { BasicColumn } from '/@/components/Table';
|
||||||
import { FormSchema } from '/@/components/Table';
|
import { FormSchema } from '/@/components/Table';
|
||||||
import { rules } from '/@/utils/helper/validator';
|
import { rules } from '/@/utils/helper/validator';
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
import { schemas } from '../../demo/jeecg/jeecgComponents.data';
|
||||||
//列表数据
|
//列表数据
|
||||||
export const columns: BasicColumn[] = [
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '校区',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'campus',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '教学楼名',
|
title: '教学楼名',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -14,11 +20,11 @@ export const columns: BasicColumn[] = [
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'area',
|
dataIndex: 'area',
|
||||||
},
|
},
|
||||||
{
|
//{
|
||||||
title: '楼层号',
|
// title: '楼层号',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
dataIndex: 'floor',
|
// dataIndex: 'floor',
|
||||||
},
|
//},
|
||||||
{
|
{
|
||||||
title: '教室',
|
title: '教室',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -47,6 +53,21 @@ export const formSchema: FormSchema[] = [
|
||||||
// return [{ required: true, message: '请输入完整的教室名称(例如:崇师楼B区520、理工一511)' }];
|
// return [{ required: true, message: '请输入完整的教室名称(例如:崇师楼B区520、理工一511)' }];
|
||||||
// },
|
// },
|
||||||
//},
|
//},
|
||||||
|
{
|
||||||
|
label: '校区',
|
||||||
|
field: 'campus',
|
||||||
|
component: 'RadioGroup',
|
||||||
|
componentProps: {
|
||||||
|
options: [
|
||||||
|
{ label: '江北', value: '江北' },
|
||||||
|
{ label: '江南', value: '江南' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
dynamicRules: ({ model, schema }) => {
|
||||||
|
return [{ required: true, message: '请选择校区!!' }];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: '教学楼名称',
|
label: '教学楼名称',
|
||||||
field: 'building',
|
field: 'building',
|
||||||
|
@ -55,16 +76,17 @@ export const formSchema: FormSchema[] = [
|
||||||
return [{ required: true, message: '请输入教学楼名称!!' }];
|
return [{ required: true, message: '请输入教学楼名称!!' }];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//{
|
||||||
|
// label: '楼层号',
|
||||||
|
// field: 'floor',
|
||||||
|
// component: 'Input',
|
||||||
|
//},
|
||||||
{
|
{
|
||||||
label: '区域',
|
label: '区域',
|
||||||
field: 'area',
|
field: 'area',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '楼层号',
|
|
||||||
field: 'floor',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '教室',
|
label: '教室',
|
||||||
field: 'roomNumber',
|
field: 'roomNumber',
|
||||||
|
|
|
@ -2,8 +2,19 @@ import { BasicColumn } from '/@/components/Table';
|
||||||
import { FormSchema } from '/@/components/Table';
|
import { FormSchema } from '/@/components/Table';
|
||||||
import { rules } from '/@/utils/helper/validator';
|
import { rules } from '/@/utils/helper/validator';
|
||||||
import { render } from '/@/utils/common/renderUtils';
|
import { render } from '/@/utils/common/renderUtils';
|
||||||
|
import { values } from 'xe-utils';
|
||||||
//列表数据
|
//列表数据
|
||||||
export const columns: BasicColumn[] = [
|
export const columns: BasicColumn[] = [
|
||||||
|
{
|
||||||
|
title: '校区',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'campus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '学院',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'college',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '教师姓名',
|
title: '教师姓名',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -19,10 +30,11 @@ export const columns: BasicColumn[] = [
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'sex',
|
dataIndex: 'sex',
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '校区',
|
title: '类型',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'campus',
|
dataIndex: 'type',
|
||||||
},
|
},
|
||||||
//{
|
//{
|
||||||
// title: '照片地址',
|
// title: '照片地址',
|
||||||
|
@ -34,6 +46,36 @@ export const columns: BasicColumn[] = [
|
||||||
export const searchFormSchema: FormSchema[] = [];
|
export const searchFormSchema: FormSchema[] = [];
|
||||||
//表单数据
|
//表单数据
|
||||||
export const formSchema: FormSchema[] = [
|
export const formSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
label: '校区',
|
||||||
|
field: 'campus',
|
||||||
|
component: 'RadioGroup',
|
||||||
|
componentProps: {
|
||||||
|
options: [
|
||||||
|
{ label: '江北', value: '江北' },
|
||||||
|
{ label: '江南', value: '江南' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
dynamicRules: ({ model, schema }) => {
|
||||||
|
return [{ required: true, message: '请选择校区!!' }];
|
||||||
|
},
|
||||||
|
defaultValue: '江北',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '类型',
|
||||||
|
field: 'type',
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options: [
|
||||||
|
{ label: '教师', value: '教师' },
|
||||||
|
{ label: '研究生', value: '研究生' },
|
||||||
|
{ label: '非教师', value: '非教师' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
dynamicRules: ({ model, schema }) => {
|
||||||
|
return [{ required: true, message: '请选择类型!!' }];
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '教师姓名',
|
label: '教师姓名',
|
||||||
field: 'name',
|
field: 'name',
|
||||||
|
@ -65,10 +107,28 @@ export const formSchema: FormSchema[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '校区',
|
label: '学院',
|
||||||
field: 'campus',
|
field: 'college',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
|
ifShow: ({ model }) => {
|
||||||
|
return model.type === '教师' || model.type === '研究生';
|
||||||
},
|
},
|
||||||
|
dynamicRules: ({ model }) => {
|
||||||
|
return model.type === '教师' || model.type === '研究生' ? [{ required: true, message: '请输入教师/研究生对应的学院!' }] : [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '工号/学号',
|
||||||
|
field: 'code',
|
||||||
|
component: 'Input',
|
||||||
|
ifShow: ({ model }) => {
|
||||||
|
return model.type === '教师' || model.type === '研究生';
|
||||||
|
},
|
||||||
|
dynamicRules: ({ model }) => {
|
||||||
|
return model.type === '教师' || model.type === '研究生' ? [{ required: true, message: '请输入教师工号/学号!' }] : [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
//{
|
//{
|
||||||
// label: '照片地址',
|
// label: '照片地址',
|
||||||
// field: 'photoAddress',
|
// field: 'photoAddress',
|
||||||
|
|
Loading…
Reference in New Issue