|
@@ -107,9 +107,9 @@
|
|
<el-divider class="form-divider" />
|
|
<el-divider class="form-divider" />
|
|
<div class="part-action">
|
|
<div class="part-action">
|
|
<el-space wrap>
|
|
<el-space wrap>
|
|
- <el-button type="primary" @click="toPage(1)">查询</el-button>
|
|
|
|
- <!--TODO: 待复核数量 -->
|
|
|
|
- <el-button @click="onExport">待复核:0</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="search">查询</el-button>
|
|
|
|
+ <el-button @click="onExport">导出</el-button>
|
|
|
|
+ <el-button @click="onReview">待复核:{{ inspectedCount }}</el-button>
|
|
</el-space>
|
|
</el-space>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -130,12 +130,7 @@
|
|
/>
|
|
/>
|
|
<el-table-column prop="examNumber" label="准考证号" width="150" />
|
|
<el-table-column prop="examNumber" label="准考证号" width="150" />
|
|
<el-table-column prop="secretNumber" label="密号" width="120" />
|
|
<el-table-column prop="secretNumber" label="密号" width="120" />
|
|
- <el-table-column label="状态" width="100" sortable>
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-tag :type="getStatusType(scope.row.status)" size="small">
|
|
|
|
- {{ getStatusText(scope.row.status) }}
|
|
|
|
- </el-tag>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-table-column prop="statusText" label="状态" width="100" sortable>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="rejectReason"
|
|
prop="rejectReason"
|
|
@@ -223,9 +218,10 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { reactive, ref } from 'vue';
|
|
import { reactive, ref } from 'vue';
|
|
import { ElMessage } from 'element-plus';
|
|
import { ElMessage } from 'element-plus';
|
|
- import { getMarkTaskList } from '@/api/mark';
|
|
|
|
|
|
+ import { getMarkInspectedTaskCount, getMarkTaskList } from '@/api/mark';
|
|
import { MarkTaskItem, MarkTaskListFilter } from '@/api/types/mark';
|
|
import { MarkTaskItem, MarkTaskListFilter } from '@/api/types/mark';
|
|
import useTable from '@/hooks/table';
|
|
import useTable from '@/hooks/table';
|
|
|
|
+ import { downloadExport } from '@/utils/download-export';
|
|
|
|
|
|
import RejectTaskDialog from './components/RejectTaskDialog.vue';
|
|
import RejectTaskDialog from './components/RejectTaskDialog.vue';
|
|
|
|
|
|
@@ -259,24 +255,15 @@
|
|
handleSortChange,
|
|
handleSortChange,
|
|
} = useTable<MarkTaskItem>(getMarkTaskList, searchModel, false);
|
|
} = useTable<MarkTaskItem>(getMarkTaskList, searchModel, false);
|
|
|
|
|
|
- // 获取状态类型
|
|
|
|
- function getStatusType(status: string) {
|
|
|
|
- const statusMap: Record<string, string> = {
|
|
|
|
- pending: 'warning',
|
|
|
|
- completed: 'success',
|
|
|
|
- rejected: 'danger',
|
|
|
|
- };
|
|
|
|
- return statusMap[status] || 'info';
|
|
|
|
|
|
+ async function search() {
|
|
|
|
+ await toPage(1);
|
|
|
|
+ await getInspectedCount();
|
|
}
|
|
}
|
|
|
|
|
|
- // 获取状态文本
|
|
|
|
- function getStatusText(status: string) {
|
|
|
|
- const statusMap: Record<string, string> = {
|
|
|
|
- pending: '待评卷',
|
|
|
|
- completed: '已评卷',
|
|
|
|
- rejected: '已打回',
|
|
|
|
- };
|
|
|
|
- return statusMap[status] || status;
|
|
|
|
|
|
+ const inspectedCount = ref(0);
|
|
|
|
+ async function getInspectedCount() {
|
|
|
|
+ const count = await getMarkInspectedTaskCount(searchModel);
|
|
|
|
+ inspectedCount.value = count;
|
|
}
|
|
}
|
|
|
|
|
|
// 查看详情
|
|
// 查看详情
|
|
@@ -291,8 +278,12 @@
|
|
rejectTaskDialogRef.value?.show();
|
|
rejectTaskDialogRef.value?.show();
|
|
}
|
|
}
|
|
|
|
|
|
- function onExport() {
|
|
|
|
- // TODO: 导出任务
|
|
|
|
- ElMessage.info('导出任务');
|
|
|
|
|
|
+ async function onExport() {
|
|
|
|
+ await downloadExport('exportMarkTaskList', searchModel);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function onReview() {
|
|
|
|
+ // TODO: 待复核任务
|
|
|
|
+ ElMessage.info('待复核任务');
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|