From 84a94783ba79ecdce9b9a854f230465830bc8c46 Mon Sep 17 00:00:00 2001
From: Qi <3194726156@qq.com>
Date: Mon, 9 Jun 2025 22:54:03 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=BB=84=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/cees/group/CeesGroup.data.ts | 70 ++---
src/views/cees/group/CeesGroupList.vue | 296 +++++++++---------
.../cees/group/components/CeesGroupForm.vue | 124 ++++----
.../cees/group/components/CeesGroupModal.vue | 110 +++----
4 files changed, 296 insertions(+), 304 deletions(-)
diff --git a/src/views/cees/group/CeesGroup.data.ts b/src/views/cees/group/CeesGroup.data.ts
index a18e62a..650a326 100644
--- a/src/views/cees/group/CeesGroup.data.ts
+++ b/src/views/cees/group/CeesGroup.data.ts
@@ -1,17 +1,17 @@
-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';
import { usePermission } from '/@/hooks/web/usePermission';
const { hasPermission } = usePermission();
export const columns: BasicColumn[] = [
- {
+ {
title: '组名',
- align:"center",
+ align: 'center',
dataIndex: 'name',
- width: 150
- },
+ width: 150,
+ },
// {
// title: '分组',
// align: 'center',
@@ -36,10 +36,10 @@ export const columns: BasicColumn[] = [
},
{
title: '评卷地点',
- align: "center",
+ align: 'center',
dataIndex: 'markingLocation',
- width: 200
- }
+ width: 200,
+ },
// {
// title: '专业id',
// align:"center",
@@ -74,7 +74,7 @@ export const searchFormSchema: FormSchema[] = [
label: '评卷地点',
field: 'markingLocation',
component: 'Input',
- }
+ },
];
//表单数据
export const formSchema: FormSchema[] = [
@@ -82,11 +82,9 @@ export const formSchema: FormSchema[] = [
label: '组名',
field: 'name',
component: 'Input',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入分组名!'},
- ];
- },
+ dynamicRules: ({ model, schema }) => {
+ return [{ required: true, message: '请输入分组名!' }];
+ },
},
{
label: '学科',
@@ -100,40 +98,42 @@ export const formSchema: FormSchema[] = [
{ label: '政治', value: 8 },
],
},
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请选择学科!'},
- ];
+ dynamicRules: ({ model, schema }) => {
+ if (!hasPermission('majorId:edit')) {
+ // 没有权限,不添加校验规则
+ return [];
+ }
+ return [{ required: true, message: '请选择学科!' }];
},
show: ({ values }) => {
return hasPermission('majorId:edit');
- }
+ },
},
{
label: '评卷地点',
field: 'markingLocation',
component: 'Input',
},
- // TODO 主键隐藏字段,目前写死为ID
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false
- },
+ // TODO 主键隐藏字段,目前写死为ID
+ {
+ label: '',
+ field: 'id',
+ component: 'Input',
+ show: false,
+ },
];
// 高级查询数据
export const superQuerySchema = {
- name: {title: '组名',order: 0,view: 'text', type: 'string',},
- majorId: {title: '专业id',order: 1,view: 'number', type: 'number',},
+ name: { title: '组名', order: 0, view: 'text', type: 'string' },
+ majorId: { title: '专业id', order: 1, 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/group/CeesGroupList.vue b/src/views/cees/group/CeesGroupList.vue
index 6134857..c629414 100644
--- a/src/views/cees/group/CeesGroupList.vue
+++ b/src/views/cees/group/CeesGroupList.vue
@@ -7,8 +7,7 @@
新增
导出
导入
- 批量删除
-
+ 批量删除
@@ -20,11 +19,10 @@
-
-
+
-
+