|
@@ -1,9 +1,12 @@
|
|
<template>
|
|
<template>
|
|
<div class="m-b-16px">
|
|
<div class="m-b-16px">
|
|
- <qm-button type="primary" :icon="h(SettingOutlined)" @click="onSetSiteCode"
|
|
|
|
- >设置扫描点代码</qm-button
|
|
|
|
- >
|
|
|
|
- <a-tag v-if="siteCodeData.scanSite" class="m-l-12px" color="blue"
|
|
|
|
|
|
+ <a-button type="primary" @click="onSetSiteCode">
|
|
|
|
+ <template #icon><SettingOutlined /></template>设置扫描点代码
|
|
|
|
+ </a-button>
|
|
|
|
+ <a-tag
|
|
|
|
+ v-if="siteCodeData.scanSite"
|
|
|
|
+ class="m-l-12px ant-tag-big"
|
|
|
|
+ color="blue"
|
|
>扫描点代码:{{ siteCodeData.scanSite }}</a-tag
|
|
>扫描点代码:{{ siteCodeData.scanSite }}</a-tag
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -41,11 +44,11 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
-import { ref, h, onMounted } from "vue";
|
|
|
|
|
|
+import { ref, onMounted } from "vue";
|
|
import { SettingOutlined } from "@ant-design/icons-vue";
|
|
import { SettingOutlined } from "@ant-design/icons-vue";
|
|
import type { TableProps } from "ant-design-vue";
|
|
import type { TableProps } from "ant-design-vue";
|
|
import { SubjectItem } from "@/ap/types/base";
|
|
import { SubjectItem } from "@/ap/types/base";
|
|
-import { subjectList } from "@/ap/base";
|
|
|
|
|
|
+import { getSubjectList } from "@/ap/base";
|
|
import {
|
|
import {
|
|
markSiteCodeInfo,
|
|
markSiteCodeInfo,
|
|
dbfAnswerExport,
|
|
dbfAnswerExport,
|
|
@@ -70,11 +73,11 @@ const curExportTask = ref({ id: "", name: "" });
|
|
const columns: TableProps["columns"] = [
|
|
const columns: TableProps["columns"] = [
|
|
{
|
|
{
|
|
title: "科目代码",
|
|
title: "科目代码",
|
|
- dataIndex: "subjectCode",
|
|
|
|
|
|
+ dataIndex: "code",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "科目名称",
|
|
title: "科目名称",
|
|
- dataIndex: "subjectName",
|
|
|
|
|
|
+ dataIndex: "name",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "操作",
|
|
title: "操作",
|
|
@@ -91,7 +94,7 @@ const columns: TableProps["columns"] = [
|
|
const siteCodeData = ref({} as markSiteSetParams);
|
|
const siteCodeData = ref({} as markSiteSetParams);
|
|
async function getScanSiteCode() {
|
|
async function getScanSiteCode() {
|
|
const res = await markSiteCodeInfo({ examId: userStore.curExam.id });
|
|
const res = await markSiteCodeInfo({ examId: userStore.curExam.id });
|
|
- siteCodeData.value = { scanSite: res.scanSite, examId: userStore.curExam.id };
|
|
|
|
|
|
+ siteCodeData.value = { scanSite: res, examId: userStore.curExam.id };
|
|
}
|
|
}
|
|
|
|
|
|
const modifySiteCodeRef = ref();
|
|
const modifySiteCodeRef = ref();
|
|
@@ -103,15 +106,16 @@ function siteCodeModified(data: markSiteSetParams) {
|
|
}
|
|
}
|
|
|
|
|
|
async function getData() {
|
|
async function getData() {
|
|
- const res = await subjectList({ examId: userStore.curExam.id });
|
|
|
|
|
|
+ const res = await getSubjectList({ examId: userStore.curExam.id });
|
|
dataList.value = res || [];
|
|
dataList.value = res || [];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const exportTaskProgressDialogRef = ref();
|
|
async function onExportAnswer(index: number) {
|
|
async function onExportAnswer(index: number) {
|
|
const record = dataList.value[index];
|
|
const record = dataList.value[index];
|
|
const res = await dbfAnswerExport({
|
|
const res = await dbfAnswerExport({
|
|
examId: userStore.curExam.id,
|
|
examId: userStore.curExam.id,
|
|
- subjectCode: record.subjectCode,
|
|
|
|
|
|
+ subjectCode: record.code,
|
|
});
|
|
});
|
|
curExportTask.value = { id: res.taskId, name: "扫描答案DBF" };
|
|
curExportTask.value = { id: res.taskId, name: "扫描答案DBF" };
|
|
exportTaskProgressDialogRef.value?.open();
|
|
exportTaskProgressDialogRef.value?.open();
|
|
@@ -121,15 +125,14 @@ async function onExportPackage(index: number) {
|
|
const record = dataList.value[index];
|
|
const record = dataList.value[index];
|
|
const res = await dbfPackageExport({
|
|
const res = await dbfPackageExport({
|
|
examId: userStore.curExam.id,
|
|
examId: userStore.curExam.id,
|
|
- subjectCode: record.subjectCode,
|
|
|
|
|
|
+ subjectCode: record.code,
|
|
});
|
|
});
|
|
curExportTask.value = { id: res.taskId, name: "打包DBF" };
|
|
curExportTask.value = { id: res.taskId, name: "打包DBF" };
|
|
exportTaskProgressDialogRef.value?.open();
|
|
exportTaskProgressDialogRef.value?.open();
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- dataList.value = [{ subjectCode: "8956145235", subjectName: "语法基础" }];
|
|
|
|
- // getScanSiteCode()
|
|
|
|
- // getData()
|
|
|
|
|
|
+ getScanSiteCode();
|
|
|
|
+ getData();
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|