diff --git a/src/views/cees/dormitory/CeesDormitoryInfo.data.ts b/src/views/cees/dormitory/CeesDormitoryInfo.data.ts
index 8616172..0ad4119 100644
--- a/src/views/cees/dormitory/CeesDormitoryInfo.data.ts
+++ b/src/views/cees/dormitory/CeesDormitoryInfo.data.ts
@@ -2,6 +2,8 @@ import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
+import { usePermission } from '/@/hooks/web/usePermission';
+const { hasPermission } = usePermission();
//列表数据
export const columns: BasicColumn[] = [
{
@@ -24,9 +26,34 @@ export const columns: BasicColumn[] = [
align: 'center',
dataIndex: 'dormitoryStatus',
},
+ {
+ title: '所属学科',
+ align: 'center',
+ dataIndex: 'majorId',
+ },
];
//查询数据
-export const searchFormSchema: FormSchema[] = [];
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '宿舍信息',
+ field: 'dormitory',
+ component: 'Input',
+ },
+ {
+ label: '所属学科',
+ field: 'majorId',
+ component: 'Select',
+ componentProps: {
+ options: [
+ { label: '语文', value: 1 },
+ { label: '地理', value: 4 },
+ ],
+ },
+ ifShow: ({ values }) => {
+ return hasPermission('dormitory:majorId:select');
+ }
+ },
+];
//表单数据
export const formSchema: FormSchema[] = [
{
@@ -74,6 +101,22 @@ export const formSchema: FormSchema[] = [
return [{ required: true, message: '请选择宿舍状态' }];
},
},
+ {
+ label: '所属学科',
+ field: 'majorId',
+ component: 'Select',
+ componentProps: {
+ options: [
+ { label: '语文', value: 1 },
+ { label: '地理', value: 4 },
+ { label: '历史', value: 7 },
+ { label: '政治', value: 8 },
+ ],
+ },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请选择所属学科!' }];
+ },
+ },
// TODO 主键隐藏字段,目前写死为ID
{
label: '',
diff --git a/src/views/cees/dormitory/CeesDormitoryInfoList.vue b/src/views/cees/dormitory/CeesDormitoryInfoList.vue
index 2a90d9b..afaf8b3 100644
--- a/src/views/cees/dormitory/CeesDormitoryInfoList.vue
+++ b/src/views/cees/dormitory/CeesDormitoryInfoList.vue
@@ -38,7 +38,9 @@
未满
已满
-
+
+ {{ record.majorIdDescription }}
+
diff --git a/src/views/cees/group/CeesGroup.data.ts b/src/views/cees/group/CeesGroup.data.ts
index 4e126fe..25f964d 100644
--- a/src/views/cees/group/CeesGroup.data.ts
+++ b/src/views/cees/group/CeesGroup.data.ts
@@ -3,10 +3,6 @@ import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { usePermission } from '/@/hooks/web/usePermission';
-
-//import { getRowUser } from '/@/views/cees/group/CeesGroup.api';
-//列表数据
-
const { hasPermission } = usePermission();
export const columns: BasicColumn[] = [
@@ -52,6 +48,22 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
//colProps: {span: 6},
},
+ {
+ label: '学科',
+ field: 'majorId',
+ component: 'Select',
+ componentProps: {
+ options: [
+ { label: '语文', value: 1 },
+ { label: '地理', value: 4 },
+ { label: '历史', value: 7 },
+ { label: '政治', value: 8 },
+ ],
+ },
+ ifShow: ({ values }) => {
+ return hasPermission('group:majorId:select');
+ },
+ }
];
//表单数据
export const formSchema: FormSchema[] = [
diff --git a/src/views/cees/localTeacher/CeesLocalTeacher.data.ts b/src/views/cees/localTeacher/CeesLocalTeacher.data.ts
index 4dc1d1e..86003a0 100644
--- a/src/views/cees/localTeacher/CeesLocalTeacher.data.ts
+++ b/src/views/cees/localTeacher/CeesLocalTeacher.data.ts
@@ -3,6 +3,8 @@ import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { ref, onMounted, reactive } from 'vue';
+import { usePermission } from '/@/hooks/web/usePermission';
+const { hasPermission } = usePermission();
const groupOptions = ref();
// 创建一个简单的事件总线
@@ -94,6 +96,9 @@ export const searchFormSchema: FormSchema[] = [
{ label: '政治', value: 8 },
],
},
+ ifShow: ({ values }) => {
+ return hasPermission('localTeacher:majorId:select');
+ },
},
];
//表单数据
@@ -138,9 +143,9 @@ export const formSchema: FormSchema[] = [
componentProps: {
options: groupOptions, // 动态设置分组选项
},
- dynamicRules: ({ model, schema }) => {
- return [{ required: true, message: '请选择分组!' }];
- },
+ //dynamicRules: ({ model, schema }) => {
+ // return [{ required: true, message: '请选择分组!' }];
+ //},
},
//{
// label: '使用次数',
diff --git a/src/views/cees/student/Student.data.ts b/src/views/cees/student/Student.data.ts
index e0b151f..56cde7f 100644
--- a/src/views/cees/student/Student.data.ts
+++ b/src/views/cees/student/Student.data.ts
@@ -5,6 +5,8 @@ import { ref,reactive } from 'vue';
import { render } from '/@/utils/common/renderUtils';
import {defHttp} from '/@/utils/http/axios';
import { getOption } from 'showdown';
+import { usePermission } from '/@/hooks/web/usePermission';
+const { hasPermission } = usePermission();
const groupOptions=ref()
// 创建一个简单的事件总线
@@ -92,6 +94,9 @@ export const searchFormSchema: FormSchema[] = [
{ label: '政治', value: 8 },
],
},
+ ifShow: ({ values }) => {
+ return hasPermission('student:majorId:select');
+ }
}
];
//表单数据
@@ -165,9 +170,9 @@ export const formSchema: FormSchema[] = [
componentProps: {
options: groupOptions, // 动态设置分组选项
},
- dynamicRules: ({ model, schema }) => {
- return [{ required: true, message: '请选择分组!' }];
- },
+ //dynamicRules: ({ model, schema }) => {
+ // return [{ required: true, message: '请选择分组!' }];
+ //},
},
//{
// label: '使用次数',
diff --git a/src/views/cees/waiTeacher/CeesWaiTeacher.data.ts b/src/views/cees/waiTeacher/CeesWaiTeacher.data.ts
index 9b6e3c6..cb9faef 100644
--- a/src/views/cees/waiTeacher/CeesWaiTeacher.data.ts
+++ b/src/views/cees/waiTeacher/CeesWaiTeacher.data.ts
@@ -3,6 +3,8 @@ import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { ref, onMounted, reactive } from 'vue';
+import { usePermission } from '/@/hooks/web/usePermission';
+const { hasPermission } = usePermission();
const groupOptions = ref();
@@ -107,7 +109,10 @@ export const searchFormSchema: FormSchema[] = [
{ label: '政治', value: 8 },
],
},
- }
+ ifShow: ({ values }) => {
+ return hasPermission('waiTeacher:majorId:select');
+ },
+ },
];
//表单数据
export const formSchema: FormSchema[] = [
@@ -277,9 +282,9 @@ export const formSchema: FormSchema[] = [
componentProps: {
options: groupOptions, // 动态设置分组选项
},
- dynamicRules: ({ model, schema }) => {
- return [{ required: true, message: '请选择分组!' }];
- },
+ //dynamicRules: ({ model, schema }) => {
+ // return [{ required: true, message: '请选择分组!' }];
+ //},
},
{