|
@@ -12,6 +12,35 @@
|
|
>
|
|
>
|
|
<template #title> 任务进度 </template>
|
|
<template #title> 任务进度 </template>
|
|
|
|
|
|
|
|
+ <a-descriptions
|
|
|
|
+ :data="taskInfo"
|
|
|
|
+ title="任务详情"
|
|
|
|
+ :align="{ label: 'right' }"
|
|
|
|
+ :column="1"
|
|
|
|
+ />
|
|
|
|
+ <a-collapse v-if="taskFilterInfo.length">
|
|
|
|
+ <a-collapse-item header="筛选条件">
|
|
|
|
+ <a-descriptions
|
|
|
|
+ :data="taskFilterInfo"
|
|
|
|
+ title=""
|
|
|
|
+ :align="{ label: 'right' }"
|
|
|
|
+ :column="1"
|
|
|
|
+ />
|
|
|
|
+ </a-collapse-item>
|
|
|
|
+ </a-collapse>
|
|
|
|
+
|
|
|
|
+ <a-descriptions title="进度" :column="1" :align="{ label: 'right' }">
|
|
|
|
+ <a-descriptions-item label="任务总数">
|
|
|
|
+ {{ total }}
|
|
|
|
+ </a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="完成数量">
|
|
|
|
+ {{ finishCount }}
|
|
|
|
+ </a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="总体进度">
|
|
|
|
+ <a-progress :percent="progressNum" :stroke-width="10" />
|
|
|
|
+ </a-descriptions-item>
|
|
|
|
+ </a-descriptions>
|
|
|
|
+
|
|
<template #footer>
|
|
<template #footer>
|
|
<a-button v-if="progressNum >= 1" type="primary" @click="close"
|
|
<a-button v-if="progressNum >= 1" type="primary" @click="close"
|
|
>确定</a-button
|
|
>确定</a-button
|
|
@@ -29,10 +58,14 @@
|
|
import { PICTURE_TYPE } from '@/constants/enumerate';
|
|
import { PICTURE_TYPE } from '@/constants/enumerate';
|
|
import { useUserStore } from '@/store';
|
|
import { useUserStore } from '@/store';
|
|
import { TrackConfigType } from '@/store/modules/app/types';
|
|
import { TrackConfigType } from '@/store/modules/app/types';
|
|
|
|
+ import { TrackExportDetailListFilter } from '@/api/types/task';
|
|
|
|
+ import { objTypeOf } from '@/utils/utils';
|
|
|
|
|
|
import { modalConfirm } from '../../../utils/arco';
|
|
import { modalConfirm } from '../../../utils/arco';
|
|
import { TrackTaskData } from '../../../../electron/db/models/trackTask';
|
|
import { TrackTaskData } from '../../../../electron/db/models/trackTask';
|
|
|
|
|
|
|
|
+ type FilterDataType = TrackExportDetailListFilter | string[];
|
|
|
|
+
|
|
defineOptions({
|
|
defineOptions({
|
|
name: 'ModifySet',
|
|
name: 'ModifySet',
|
|
});
|
|
});
|
|
@@ -47,6 +80,7 @@
|
|
const PROGRESS_KEY = 'progress';
|
|
const PROGRESS_KEY = 'progress';
|
|
|
|
|
|
const taskInfo = ref<DescData[]>([]);
|
|
const taskInfo = ref<DescData[]>([]);
|
|
|
|
+ const taskFilterInfo = ref<DescData[]>([]);
|
|
const task = ref<TrackTaskData>({} as TrackTaskData);
|
|
const task = ref<TrackTaskData>({} as TrackTaskData);
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
const finishCount = ref(0);
|
|
const finishCount = ref(0);
|
|
@@ -98,6 +132,11 @@
|
|
|
|
|
|
task.value = res;
|
|
task.value = res;
|
|
const trackConfig = JSON.parse(res.trackConfig) as TrackConfigType;
|
|
const trackConfig = JSON.parse(res.trackConfig) as TrackConfigType;
|
|
|
|
+ const filterData = res.filterData
|
|
|
|
+ ? (JSON.parse(res.filterData) as FilterDataType)
|
|
|
|
+ : null;
|
|
|
|
+ updateTaskFilerInfo(filterData);
|
|
|
|
+
|
|
taskInfo.value = [
|
|
taskInfo.value = [
|
|
{
|
|
{
|
|
value: res.semesterName,
|
|
value: res.semesterName,
|
|
@@ -142,6 +181,64 @@
|
|
window.electron.startWinProcess(2, getExportUrl());
|
|
window.electron.startWinProcess(2, getExportUrl());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function updateTaskFilerInfo(data: FilterDataType | null) {
|
|
|
|
+ taskFilterInfo.value = [];
|
|
|
|
+ if (!data) return;
|
|
|
|
+
|
|
|
|
+ if (objTypeOf(data) === 'array') {
|
|
|
|
+ taskFilterInfo.value = [
|
|
|
|
+ {
|
|
|
|
+ value: (data as string[]).join(),
|
|
|
|
+ label: '选择的学生',
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (Object.keys(data as TrackExportDetailListFilter).length === 2) return;
|
|
|
|
+
|
|
|
|
+ const datas = data as Required<TrackExportDetailListFilter>;
|
|
|
|
+ // 设置的详情数据
|
|
|
|
+ taskFilterInfo.value = [
|
|
|
|
+ {
|
|
|
|
+ label: '学院',
|
|
|
|
+ value: datas.college,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '专业',
|
|
|
|
+ value: datas.majorName,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '班级',
|
|
|
|
+ value: datas.className,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '姓名',
|
|
|
|
+ value: datas.studentName,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '学号',
|
|
|
|
+ value: datas.studentCode,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '学号区间',
|
|
|
|
+ value: `${datas.startStudentCode}~${datas.endStudentCode}`,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '成绩区间',
|
|
|
|
+ value: `${datas.startScore}~${datas.endScore}`,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '客观题分区间',
|
|
|
|
+ value: `${datas.objectiveStartScore}~${datas.objectiveEndScore}`,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '主观题分区间',
|
|
|
|
+ value: `${datas.subjectiveStartScore}~${datas.subjectiveEndScore}`,
|
|
|
|
+ },
|
|
|
|
+ ].filter((item) => item.value && item.value !== '~');
|
|
|
|
+ }
|
|
|
|
+
|
|
async function toCancel() {
|
|
async function toCancel() {
|
|
const confirmRes = await modalConfirm(
|
|
const confirmRes = await modalConfirm(
|
|
'提示',
|
|
'提示',
|