|
@@ -17,10 +17,10 @@
|
|
|
>
|
|
|
<template #bodyCell="{ column, index }">
|
|
|
<template v-if="column.dataIndex === 'operation'">
|
|
|
- <qm-button type="text" @click="onExportAnswer(index)"
|
|
|
+ <qm-button type="link" @click="onExportAnswer(index)"
|
|
|
>导出扫描答案DBF</qm-button
|
|
|
>
|
|
|
- <qm-button type="text" @click="onExportPackage(index)"
|
|
|
+ <qm-button type="link" @click="onExportPackage(index)"
|
|
|
>导出打包DBF</qm-button
|
|
|
>
|
|
|
</template>
|
|
@@ -33,6 +33,11 @@
|
|
|
:row-data="siteCodeData"
|
|
|
@modified="siteCodeModified"
|
|
|
/>
|
|
|
+ <!-- ExportTaskProgressDialog -->
|
|
|
+ <ExportTaskProgressDialog
|
|
|
+ ref="exportTaskProgressDialogRef"
|
|
|
+ :task="curExportTask"
|
|
|
+ />
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
@@ -42,10 +47,15 @@ import type { TableProps } from "ant-design-vue";
|
|
|
import { SubjectItem } from "@/ap/types/base";
|
|
|
|
|
|
import { subjectList } from "@/ap/base";
|
|
|
-import { markSiteCodeInfo } from "@/ap/resultExport";
|
|
|
+import {
|
|
|
+ markSiteCodeInfo,
|
|
|
+ dbfAnswerExport,
|
|
|
+ dbfPackageExport,
|
|
|
+} from "@/ap/resultExport";
|
|
|
import { markSiteSetParams } from "@/ap/types/resultExport";
|
|
|
|
|
|
import ModifySiteCode from "./ModifySiteCode.vue";
|
|
|
+import ExportTaskProgressDialog from "./ExportTaskProgressDialog.vue";
|
|
|
|
|
|
defineOptions({
|
|
|
name: "DbfExport",
|
|
@@ -53,6 +63,7 @@ defineOptions({
|
|
|
|
|
|
const loading = ref(false);
|
|
|
const dataList = ref<SubjectItem[]>([]);
|
|
|
+const curExportTask = ref({ id: "", name: "" });
|
|
|
|
|
|
const columns: TableProps["columns"] = [
|
|
|
{
|
|
@@ -66,7 +77,12 @@ const columns: TableProps["columns"] = [
|
|
|
{
|
|
|
title: "操作",
|
|
|
dataIndex: "operation",
|
|
|
- width: "180px",
|
|
|
+ width: "240px",
|
|
|
+ customCell: () => {
|
|
|
+ return {
|
|
|
+ class: "operation-cell",
|
|
|
+ };
|
|
|
+ },
|
|
|
},
|
|
|
];
|
|
|
|
|
@@ -90,14 +106,27 @@ async function getData() {
|
|
|
}
|
|
|
|
|
|
async function onExportAnswer(index: number) {
|
|
|
- console.log(index);
|
|
|
+ const record = dataList.value[index];
|
|
|
+ const res = await dbfAnswerExport({
|
|
|
+ examId: "",
|
|
|
+ subjectCode: record.subjectCode,
|
|
|
+ });
|
|
|
+ curExportTask.value = { id: res.taskId, name: "扫描答案DBF" };
|
|
|
+ exportTaskProgressDialogRef.value?.open();
|
|
|
}
|
|
|
|
|
|
async function onExportPackage(index: number) {
|
|
|
- console.log(index);
|
|
|
+ const record = dataList.value[index];
|
|
|
+ const res = await dbfPackageExport({
|
|
|
+ examId: "",
|
|
|
+ subjectCode: record.subjectCode,
|
|
|
+ });
|
|
|
+ curExportTask.value = { id: res.taskId, name: "打包DBF" };
|
|
|
+ exportTaskProgressDialogRef.value?.open();
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ dataList.value = [{ subjectCode: "8956145235", subjectName: "语法基础" }];
|
|
|
// getScanSiteCode()
|
|
|
// getData()
|
|
|
});
|