From cf856c98f7946bfdf253e9e44d576f6d048d4ac1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com>
Date: Fri, 5 Sep 2025 18:16:22 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=20=E8=B5=B4=E6=A0=A1?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=97=AE=E9=A2=98=E8=AE=B0=E5=BD=95=20?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=20=E5=B9=B4=E7=BA=A7?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=BA->=E9=AB=982027=E5=B1=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/hTable/hTable.ts | 32 ++++-
src/components/hTable/index.vue | 69 +++++-----
src/views/exam/classDetails.vue | 1 +
src/views/exam/classExam.vue | 11 +-
src/views/exam/classExamRecord.vue | 14 +-
src/views/exam/index.vue | 22 +++-
src/views/exam/userDetails.vue | 6 +-
src/views/exam/userExam.vue | 3 +-
src/views/student/index.vue | 4 +-
src/views/teacher/index.vue | 3 +-
src/views/toschoolinfomanage/addModal.vue | 59 +++++++--
src/views/toschoolinfomanage/editModal.vue | 145 ++++++++++++++++-----
src/views/toschoolinfomanage/index.vue | 65 +++++++--
13 files changed, 305 insertions(+), 129 deletions(-)
diff --git a/src/components/hTable/hTable.ts b/src/components/hTable/hTable.ts
index 5738664..8902d36 100644
--- a/src/components/hTable/hTable.ts
+++ b/src/components/hTable/hTable.ts
@@ -286,24 +286,39 @@ export interface ConditionalModel {
}
/** 搜索条件 */
-export interface SearchConditions {
+export class SearchConditions {
+ /**
+ *
+ */
+ constructor() {
+ this.show = true;
+ this.showPage = true;
+ this.PageIndex = 0;
+ this.PageSize = 20;
+ this.OrderBy = "Id";
+ this.OrderByType = 1;
+ this.defaultConditions = [];
+ this.Conditions = [];
+ }
/** 是否显示搜索 */
- show: boolean;
+ show?: boolean;
+ /** 显示分页器 */
+ showPage?:boolean;
/** 当前页码 */
- PageIndex: number;
+ PageIndex?: number;
/** 每页大小 */
- PageSize: number;
+ PageSize?: number;
/** 排序字段 */
- OrderBy: string;
+ OrderBy?: string;
/**排序顺序
* @tips 0:升序 1:降序
* @默认 = 1
*/
OrderByType?: 0 | 1;
/** 默认查询条件 */
- defaultConditions: ConditionalModel[];
+ defaultConditions?: ConditionalModel[];
/** 查询条件 */
- Conditions: any[];
+ Conditions?: any[];
}
/** 表格配置 */
@@ -345,6 +360,9 @@ export function intTableData(tValue: TableConfig): TableConfig {
if (!tValue.pageData) tValue.pageData = { total: 0 };
if (tValue.operationTop === undefined) tValue.operationTop = true;
+ //分页查询配置
+ tValue.search= { ...new SearchConditions(), ...tValue.search };
+
// 处理 column 的属性
for (const key in tValue.column) {
tValue.column[key] = { ...new TableColumn(), ...tValue.column[key] };
diff --git a/src/components/hTable/index.vue b/src/components/hTable/index.vue
index a09887f..2cde35e 100644
--- a/src/components/hTable/index.vue
+++ b/src/components/hTable/index.vue
@@ -429,39 +429,6 @@ function fetchPagedData() {