diff --git a/src/components/hTable/hTable.ts b/src/components/hTable/hTable.ts index f000c78..c650c2b 100644 --- a/src/components/hTable/hTable.ts +++ b/src/components/hTable/hTable.ts @@ -62,7 +62,7 @@ export interface OperationButton { * @param row 当前行数据 * @param handleReloadPaged 父表单刷新函数 */ - click?: (obj, row, handleReloadPaged: (reload: boolean) => void) => void; + click?: (obj, row, handleReloadPaged: (reload?: boolean) => void) => void; /** 按钮类型 */ btnType?: "add" | "edit" | "del" | "custom"; /** 按钮样式 */ @@ -182,6 +182,11 @@ export interface SearchConditions { PageSize: number; /** 排序字段 */ OrderBy: string; + /**排序顺序 + * @tips 0:升序 1:降序 + * @默认 = 1 + */ + OrderByType?: 0 | 1; /** 默认查询条件 */ defaultConditions: ConditionalModel[]; /** 查询条件 */ diff --git a/src/views/exam/classDetails.vue b/src/views/exam/classDetails.vue index 1304807..c00839e 100644 --- a/src/views/exam/classDetails.vue +++ b/src/views/exam/classDetails.vue @@ -68,7 +68,7 @@ const tableData: TableConfig = { btnType: "custom", btnStyle: "primary", custom: { - title: "考试班级详情", // 弹出框title + title: "考试学生班级详情", // 弹出框title src: "exam/userDetails", // 组件路径 width: "1600px", // 弹框宽度 height: "800px" // 弹框高度 diff --git a/src/views/exam/classExam.vue b/src/views/exam/classExam.vue new file mode 100644 index 0000000..433f53e --- /dev/null +++ b/src/views/exam/classExam.vue @@ -0,0 +1,116 @@ + + + diff --git a/src/views/exam/userDetails.vue b/src/views/exam/userDetails.vue index 2e0fd78..52bdcb3 100644 --- a/src/views/exam/userDetails.vue +++ b/src/views/exam/userDetails.vue @@ -17,7 +17,6 @@ const props = defineProps<{ }>(); function searchCallback(data) {} - const table = ref<{ initTable: (config: TableConfig) => void }>(); const tableData: TableConfig = { apiUrl: ControllerName, @@ -28,8 +27,9 @@ const tableData: TableConfig = { // 查询条件 show: true, PageIndex: 0, - PageSize: 20, - OrderBy: "Id", // 排序 + PageSize: 60, + OrderBy: "AssignRanking", // 排序 + OrderByType: 0, defaultConditions: [], // 默认查询条件 Conditions: [] }, @@ -39,13 +39,21 @@ const tableData: TableConfig = { // 操作按钮 topBtn: true, // 是头部按钮 label: "成绩升序", - btnStyle: "primary" + btnStyle: "primary", + click: (o, r, c) => { + tableData.search.OrderByType = 1; + c(); + } }, { // 操作按钮 topBtn: true, // 是头部按钮 label: "成绩降序", - btnStyle: "primary" + btnStyle: "primary", + click: (o, r, c) => { + tableData.search.OrderByType = 0; + c(); + } }, { topBtn: false, // 头部按钮 @@ -140,8 +148,19 @@ onMounted(async () => { showTable.value = true; }); +const exam = props.data[0];