-
-
+
\ No newline at end of file
+ return true;
+ });
+
+ let formData = {};
+ const queryByIdUrl = '/CEES/ceesDormitoryInfo/queryById';
+ async function initFormData() {
+ let params = { id: props.formData.dataId };
+ const data = await defHttp.get({ url: queryByIdUrl, params });
+ formData = { ...data };
+ //设置表单的值
+ await setFieldsValue(formData);
+ //默认是禁用
+ await setProps({ disabled: formDisabled.value });
+ }
+
+ async function submitForm() {
+ let data = getFieldsValue();
+ let params = Object.assign({}, formData, data);
+ console.log('表单数据', params);
+ await saveOrUpdate(params, true);
+ }
+
+ initFormData();
+
+ return {
+ registerForm,
+ formDisabled,
+ submitForm,
+ };
+ },
+ });
+
diff --git a/src/views/cees/dormitory/components/CeesDormitoryInfoModal.vue b/src/views/cees/dormitory/components/CeesDormitoryInfoModal.vue
index ea96387..a5296f8 100644
--- a/src/views/cees/dormitory/components/CeesDormitoryInfoModal.vue
+++ b/src/views/cees/dormitory/components/CeesDormitoryInfoModal.vue
@@ -1,66 +1,66 @@
-
+
\ No newline at end of file
+ :deep(.ant-calendar-picker) {
+ width: 100%;
+ }
+
diff --git a/src/views/cees/localTeacher/CeesLocalTeacher.data.ts b/src/views/cees/localTeacher/CeesLocalTeacher.data.ts
index bf8acf1..2956212 100644
--- a/src/views/cees/localTeacher/CeesLocalTeacher.data.ts
+++ b/src/views/cees/localTeacher/CeesLocalTeacher.data.ts
@@ -1,63 +1,63 @@
-import {BasicColumn} from '/@/components/Table';
-import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
- {
+ {
title: '用户id',
- align:"center",
- dataIndex: 'userId'
- },
- {
+ align: 'center',
+ dataIndex: 'userId',
+ },
+ {
title: '用户名',
- align:"center",
- dataIndex: 'userName'
- },
- {
+ align: 'center',
+ dataIndex: 'userName',
+ },
+ {
title: '专业id,0表示未选择',
- align:"center",
- dataIndex: 'majorId'
- },
- {
+ align: 'center',
+ dataIndex: 'majorId',
+ },
+ {
title: '用户专业id',
- align:"center",
- dataIndex: 'userMajorId'
- },
- {
+ align: 'center',
+ dataIndex: 'userMajorId',
+ },
+ {
title: '用户专业id',
- align:"center",
- dataIndex: 'teacherId'
- },
- {
+ align: 'center',
+ dataIndex: 'teacherId',
+ },
+ {
title: '手机号',
- align:"center",
- dataIndex: 'phone'
- },
- {
+ align: 'center',
+ dataIndex: 'phone',
+ },
+ {
title: '组id',
- align:"center",
- dataIndex: 'groupId'
- },
- {
+ align: 'center',
+ dataIndex: 'groupId',
+ },
+ {
title: '使用次数',
- align:"center",
- dataIndex: 'numberuse'
- },
- {
- title: '状态:0正常 1禁用',
- align:"center",
- dataIndex: 'status'
- },
+ align: 'center',
+ dataIndex: 'numberuse',
+ },
+ {
+ title: '状态',
+ align: 'center',
+ dataIndex: 'status',
+ },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
- {
- label: "用户名",
- field: 'userName',
- component: 'Input',
- //colProps: {span: 6},
- },
+ {
+ label: '用户名',
+ field: 'userName',
+ component: 'Input',
+ //colProps: {span: 6},
+ },
];
//表单数据
export const formSchema: FormSchema[] = [
@@ -65,119 +65,107 @@ export const formSchema: FormSchema[] = [
label: '用户id',
field: 'userId',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入用户id!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入用户id!' }];
+ },
},
{
label: '用户名',
field: 'userName',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入用户名!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入用户名!' }];
+ },
},
{
label: '专业id,0表示未选择',
field: 'majorId',
component: 'InputNumber',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入专业id,0表示未选择!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入专业id,0表示未选择!' }];
+ },
},
{
label: '用户专业id',
field: 'userMajorId',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入用户专业id!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入用户专业id!' }];
+ },
},
{
label: '用户专业id',
field: 'teacherId',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入用户专业id!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入用户专业id!' }];
+ },
},
{
label: '手机号',
field: 'phone',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入手机号!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入手机号!' }];
+ },
},
{
label: '组id',
field: 'groupId',
component: 'InputNumber',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入组id!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入组id!' }];
+ },
},
{
label: '使用次数',
field: 'numberuse',
component: 'InputNumber',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入使用次数!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入使用次数!' }];
+ },
},
{
- label: '状态:0正常 1禁用',
+ label: '状态',
field: 'status',
- component: 'InputNumber',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入状态:0正常 1禁用!'},
- ];
- },
+ component: 'RadioGroup',
+ componentProps: {
+ options: [
+ { label: '正常', value: 0 },
+ { label: '禁用', value: 1 },
+ ],
+ },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请选择状态!' }];
+ },
+ },
+ // TODO 主键隐藏字段,目前写死为ID
+ {
+ label: '',
+ field: 'id',
+ component: 'Input',
+ show: false,
},
- // TODO 主键隐藏字段,目前写死为ID
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false
- },
];
// 高级查询数据
export const superQuerySchema = {
- userId: {title: '用户id',order: 0,view: 'text', type: 'string',},
- userName: {title: '用户名',order: 1,view: 'text', type: 'string',},
- majorId: {title: '专业id,0表示未选择',order: 2,view: 'number', type: 'number',},
- userMajorId: {title: '用户专业id',order: 3,view: 'text', type: 'string',},
- teacherId: {title: '用户专业id',order: 4,view: 'text', type: 'string',},
- phone: {title: '手机号',order: 5,view: 'text', type: 'string',},
- groupId: {title: '组id',order: 6,view: 'number', type: 'number',},
- numberuse: {title: '使用次数',order: 7,view: 'number', type: 'number',},
- status: {title: '状态:0正常 1禁用',order: 8,view: 'number', type: 'number',},
+ userId: { title: '用户id', order: 0, view: 'text', type: 'string' },
+ userName: { title: '用户名', order: 1, view: 'text', type: 'string' },
+ majorId: { title: '专业id,0表示未选择', order: 2, view: 'number', type: 'number' },
+ userMajorId: { title: '用户专业id', order: 3, view: 'text', type: 'string' },
+ teacherId: { title: '用户专业id', order: 4, view: 'text', type: 'string' },
+ phone: { title: '手机号', order: 5, view: 'text', type: 'string' },
+ groupId: { title: '组id', order: 6, view: 'number', type: 'number' },
+ numberuse: { title: '使用次数', order: 7, view: 'number', type: 'number' },
+ status: { title: '状态:0正常 1禁用', order: 8, view: 'number', type: 'number' },
};
/**
-* 流程表单调用这个方法获取formSchema
-* @param param
-*/
-export function getBpmFormSchema(_formData): FormSchema[]{
+ * 流程表单调用这个方法获取formSchema
+ * @param param
+ */
+export function getBpmFormSchema(_formData): FormSchema[] {
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema;
-}
\ No newline at end of file
+}
diff --git a/src/views/cees/localTeacher/CeesLocalTeacherList.vue b/src/views/cees/localTeacher/CeesLocalTeacherList.vue
index d343bd5..0572d2d 100644
--- a/src/views/cees/localTeacher/CeesLocalTeacherList.vue
+++ b/src/views/cees/localTeacher/CeesLocalTeacherList.vue
@@ -1,93 +1,96 @@
-
-
+
+
- 新增
- 导出
- 导入
-
-
-
-
-
- 删除
-
-
-
- 批量操作
-
-
+ 新增
+ 导出
+ 导入
+
+
+
+
+
+ 删除
+
+
+
+ 批量操作
+
+
-
+
-
+
-
+
+
+ 正常
+ 禁用
+
-
+
-
\ No newline at end of file
+
diff --git a/src/views/cees/student/Student.data.ts b/src/views/cees/student/Student.data.ts
index d8ee1f7..5f4dd25 100644
--- a/src/views/cees/student/Student.data.ts
+++ b/src/views/cees/student/Student.data.ts
@@ -1,16 +1,16 @@
-import {BasicColumn} from '/@/components/Table';
-import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
// 学科映射
const majorMap = {
- 1: '语文',
- 4: '地理',
- 7: '历史',
- 8: '政治',
- };
-
+ 1: '语文',
+ 4: '地理',
+ 7: '历史',
+ 8: '政治',
+};
+
// 根据 majorId 获取学科名称
const isMajor = (majorId) => {
return majorMap[majorId] || '未知学科';
@@ -18,81 +18,78 @@ const isMajor = (majorId) => {
// 学科过滤方法
const filterMajor = (value, row) => {
- console.log(value, row); // 打印过滤值和行数据
+ console.log(value, row); // 打印过滤值和行数据
return row === value;
};
//列表数据
export const columns: BasicColumn[] = [
- {
+ {
title: '学生名',
- align:"center",
- dataIndex: 'userName'
- },
- {
+ align: 'center',
+ dataIndex: 'userName',
+ },
+ {
title: '用户ID',
- align:"center",
- dataIndex: 'userId'
- },
- {
+ align: 'center',
+ dataIndex: 'userId',
+ },
+ {
title: '学号',
- align:"center",
- dataIndex: 'studentId'
- },
- {
+ align: 'center',
+ dataIndex: 'studentId',
+ },
+ {
title: '手机号',
- align:"center",
- dataIndex: 'phone'
- },
- {
+ align: 'center',
+ dataIndex: 'phone',
+ },
+ {
title: '学科',
- align:"center",
+ align: 'center',
dataIndex: 'majorId',
customRender: ({ text }) => {
- return isMajor(text); // 根据 majorId 显示学科名称
- },
- filters: [
- { text: '语文', value: 1 },
- { text: '地理', value: 4 },
- { text: '历史', value: 7 },
- { text: '政治', value: 8 },
- ],
- filterMultiple: false, // 是否支持多选过滤
- //value: 用户选择的过滤值(如 1)。
- onFilter: (value, record) => filterMajor(value, record.majorId), // 过滤方法
- },
- {
+ return isMajor(text); // 根据 majorId 显示学科名称
+ },
+ filters: [
+ { text: '语文', value: 1 },
+ { text: '地理', value: 4 },
+ { text: '历史', value: 7 },
+ { text: '政治', value: 8 },
+ ],
+ filterMultiple: false, // 是否支持多选过滤
+ //value: 用户选择的过滤值(如 1)。
+ onFilter: (value, record) => filterMajor(value, record.majorId), // 过滤方法
+ },
+ {
title: '所属分组',
- align:"center",
- dataIndex: 'groupId'
- },
- {
+ align: 'center',
+ dataIndex: 'groupId',
+ },
+ {
title: '是否第一次阅卷',
- align:"center",
+ align: 'center',
dataIndex: 'checked',
- customRender: ({text}) => {
- return text == 1 ? '是' : '否';
- }
- },
-
- {
+ },
+
+ {
title: '使用次数',
- align:"center",
- dataIndex: 'numberuse'
- },
- {
- title: '状态:0正常 1禁用',
- align:"center",
- dataIndex: 'status'
- },
+ align: 'center',
+ dataIndex: 'numberuse',
+ },
+ {
+ title: '状态',
+ align: 'center',
+ dataIndex: 'status',
+ },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
- {
- label: "用户名",
- field: 'userName',
- component: 'Input',
- //colProps: {span: 6},
- },
+ {
+ label: '用户名',
+ field: 'userName',
+ component: 'Input',
+ //colProps: {span: 6},
+ },
];
//表单数据
export const formSchema: FormSchema[] = [
@@ -100,21 +97,17 @@ export const formSchema: FormSchema[] = [
label: '用户id',
field: 'userId',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入用户id!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入用户id!' }];
+ },
},
{
label: '用户名',
field: 'userName',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入用户名!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入用户名!' }];
+ },
},
{
label: '学科',
@@ -128,116 +121,106 @@ export const formSchema: FormSchema[] = [
{ label: '政治', value: 8 },
],
},
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请选择学科!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请选择学科!' }];
+ },
},
{
label: '用户专业id',
field: 'userMajorId',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入用户专业id!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入用户专业id!' }];
+ },
},
{
label: '学生id',
field: 'studentId',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入学生id!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入学生id!' }];
+ },
},
{
label: '手机号',
field: 'phone',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入手机号!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入手机号!' }];
+ },
},
{
label: '是否第一次阅卷',
field: 'checked',
component: 'RadioGroup',
componentProps: {
- options: [
- { label: '是', value: 1 },
- { label: '否', value: 0 },
- ],
- },
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请选择是否第一次阅卷!'},
- ];
- },
+ options: [
+ { label: '是', value: 0 },
+ { label: '否', value: 1 },
+ ],
+ },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请选择是否第一次阅卷!' }];
+ },
},
{
label: '组id',
field: 'groupId',
component: 'InputNumber',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入组id!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入组id!' }];
+ },
},
{
label: '使用次数',
field: 'numberuse',
component: 'InputNumber',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入使用次数!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入使用次数!' }];
+ },
},
{
- label: '状态:0正常 1禁用',
+ label: '状态',
field: 'status',
- component: 'InputNumber',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入状态:0正常 1禁用!'},
- ];
- },
+ component: 'RadioGroup',
+ componentProps: {
+ options: [
+ { label: '正常', value: 0 },
+ { label: '禁用', value: 1 },
+ ],
+ },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请选择状态!' }];
+ },
+ },
+ // TODO 主键隐藏字段,目前写死为ID
+ {
+ label: '',
+ field: 'id',
+ component: 'Input',
+ show: false,
},
- // TODO 主键隐藏字段,目前写死为ID
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false
- },
];
// 高级查询数据
export const superQuerySchema = {
- userId: {title: '用户id',order: 0,view: 'text', type: 'string',},
- userName: {title: '用户名',order: 1,view: 'text', type: 'string',},
- majorId: {title: '专业id,0表示未选择',order: 2,view: 'number', type: 'number',},
- userMajorId: {title: '用户专业id',order: 3,view: 'text', type: 'string',},
- studentId: {title: '学生id',order: 4,view: 'text', type: 'string',},
- phone: {title: '手机号',order: 5,view: 'text', type: 'string',},
- checked: {title: '是否第一次阅卷',order: 6,view: 'text', type: 'string',},
- groupId: {title: '组id',order: 7,view: 'number', type: 'number',},
- numberuse: {title: '使用次数',order: 8,view: 'number', type: 'number',},
- status: {title: '状态:0正常 1禁用',order: 9,view: 'number', type: 'number',},
+ userId: { title: '用户id', order: 0, view: 'text', type: 'string' },
+ userName: { title: '用户名', order: 1, view: 'text', type: 'string' },
+ majorId: { title: '专业id,0表示未选择', order: 2, view: 'number', type: 'number' },
+ userMajorId: { title: '用户专业id', order: 3, view: 'text', type: 'string' },
+ studentId: { title: '学生id', order: 4, view: 'text', type: 'string' },
+ phone: { title: '手机号', order: 5, view: 'text', type: 'string' },
+ checked: { title: '是否第一次阅卷', order: 6, view: 'text', type: 'string' },
+ groupId: { title: '组id', order: 7, view: 'number', type: 'number' },
+ numberuse: { title: '使用次数', order: 8, view: 'number', type: 'number' },
+ status: { title: '状态:0正常 1禁用', order: 9, view: 'number', type: 'number' },
};
/**
-* 流程表单调用这个方法获取formSchema
-* @param param
-*/
-export function getBpmFormSchema(_formData): FormSchema[]{
+ * 流程表单调用这个方法获取formSchema
+ * @param param
+ */
+export function getBpmFormSchema(_formData): FormSchema[] {
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
return formSchema;
-}
\ No newline at end of file
+}
diff --git a/src/views/cees/student/StudentList.vue b/src/views/cees/student/StudentList.vue
index 5b614d0..7702d49 100644
--- a/src/views/cees/student/StudentList.vue
+++ b/src/views/cees/student/StudentList.vue
@@ -11,13 +11,14 @@
-
+
删除
-
批量操作
-
+ 批量操作
+
@@ -28,157 +29,162 @@
-
+
+
+ 是
+ 否
+
+
+ 正常
+ 禁用
+
-
+