完善 学生考试流程
This commit is contained in:
parent
077450e404
commit
733b406eb7
|
|
@ -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[];
|
||||
/** 查询条件 */
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ const tableData: TableConfig = {
|
|||
btnType: "custom",
|
||||
btnStyle: "primary",
|
||||
custom: {
|
||||
title: "考试班级详情", // 弹出框title
|
||||
title: "考试学生班级详情", // 弹出框title
|
||||
src: "exam/userDetails", // 组件路径
|
||||
width: "1600px", // 弹框宽度
|
||||
height: "800px" // 弹框高度
|
||||
|
|
|
|||
|
|
@ -0,0 +1,116 @@
|
|||
<script setup lang="ts">
|
||||
import ahTable from "@/components/hTable/index.vue";
|
||||
import { ConditionalType, TableConfig } from "@/components/hTable/hTable";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { fa } from "element-plus/es/locales.mjs";
|
||||
import { hTableAPI } from "@/api/hTable";
|
||||
import { getenum } from "@/api/enum";
|
||||
import { ruleRequired, ruleRequiredNumber } from "@/utils/rules";
|
||||
const ControllerName = "ExamClassInfo";
|
||||
|
||||
defineOptions({
|
||||
name: "ClassExam"
|
||||
});
|
||||
|
||||
const props = defineProps<{
|
||||
data: any;
|
||||
}>();
|
||||
|
||||
function searchCallback(data) {}
|
||||
const table = ref<{ initTable: (config: TableConfig) => void }>();
|
||||
const tableData: TableConfig = {
|
||||
apiUrl: ControllerName,
|
||||
selectColumn: false, // 列表选择
|
||||
border: false, // 是否显示表格边框
|
||||
searchCallback: searchCallback,
|
||||
search: {
|
||||
// 查询条件
|
||||
show: true,
|
||||
PageIndex: 0,
|
||||
PageSize: 20,
|
||||
OrderBy: "Id", // 排序
|
||||
defaultConditions: [], // 默认查询条件
|
||||
Conditions: []
|
||||
},
|
||||
operationColumn: true, // 显示操作按钮
|
||||
operationColumnData: [
|
||||
{
|
||||
topBtn: false, // 头部按钮
|
||||
show: true,
|
||||
label: "学生成绩详情",
|
||||
btnType: "custom",
|
||||
btnStyle: "primary",
|
||||
custom: {
|
||||
title: "考试学生班级详情", // 弹出框title
|
||||
src: "exam/userDetails", // 组件路径
|
||||
width: "1600px", // 弹框宽度
|
||||
height: "800px" // 弹框高度
|
||||
}
|
||||
}
|
||||
],
|
||||
column: {
|
||||
// 行数据
|
||||
schoolName: {
|
||||
label: "学校",
|
||||
search: true,
|
||||
searchType: ConditionalType.Like, // 搜索类型
|
||||
add: false, // 字段允许添加
|
||||
edit: false, // 字段允许修改
|
||||
width: "180px"
|
||||
},
|
||||
grade: {
|
||||
label: "年级",
|
||||
width: "100px",
|
||||
custom: s => `${s.gradeYear}${s.gradeLevel}`,
|
||||
search: true,
|
||||
add: false, // 字段允许添加
|
||||
edit: false // 字段允许修改
|
||||
},
|
||||
className: {
|
||||
label: "班级",
|
||||
width: "150px",
|
||||
search: true,
|
||||
searchType: ConditionalType.Like, // 搜索类型
|
||||
add: false, // 字段允许添加
|
||||
edit: false // 字段允许修改
|
||||
},
|
||||
peopleCount: {
|
||||
label: "参考人数",
|
||||
width: "100px",
|
||||
search: false,
|
||||
add: false, // 字段允许添加
|
||||
edit: false // 字段允许修改
|
||||
},
|
||||
entryPerson: {
|
||||
label: "录入人",
|
||||
width: "200px",
|
||||
search: true,
|
||||
add: false, // 字段允许添加
|
||||
edit: false // 字段允许修改
|
||||
},
|
||||
createTime: {
|
||||
label: "录入时间",
|
||||
width: "200px",
|
||||
search: true,
|
||||
add: false, // 字段允许添加
|
||||
edit: false // 字段允许修改
|
||||
}
|
||||
},
|
||||
data: [],
|
||||
pageData: {
|
||||
total: 0
|
||||
},
|
||||
selectRows: []
|
||||
};
|
||||
|
||||
const showTable = ref(false);
|
||||
onMounted(async () => {
|
||||
//初始化数据原
|
||||
|
||||
showTable.value = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div><ahTable v-if="showTable" ref="table" :tableConfig="tableData" /></div>
|
||||
</template>
|
||||
|
|
@ -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];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div><ahTable v-if="showTable" ref="table" :tableConfig="tableData" /></div>
|
||||
<div>
|
||||
<div class="p-[10px] text-[1.5rem]">
|
||||
<strong>学校:</strong>{{ exam.schoolName }}
|
||||
<strong>年级:</strong>{{ exam.gradeLevel + exam.gradeYear }}
|
||||
<strong>班级:</strong>{{ exam.className }}
|
||||
<strong>考试名称:</strong>{{ exam.examName }}
|
||||
<!-- <strong>考试类型:</strong>{{exam.className}}
|
||||
<strong>试卷类型:</strong>{{exam.className}} -->
|
||||
</div>
|
||||
<ahTable v-if="showTable" ref="table" :tableConfig="tableData" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue