|
|
@@ -18,7 +18,7 @@ |
|
|
|
</template> |
|
|
|
<template #toolbar> |
|
|
|
<n-button @click="handleReported"> |
|
|
|
{{ reportStatus ? '修改并生成报告': '提交并生成报告' }} |
|
|
|
{{ isReported ? '修改并生成报告': '提交并生成报告' }} |
|
|
|
</n-button> |
|
|
|
</template> |
|
|
|
</DataTable> |
|
|
@@ -37,7 +37,7 @@ import HeadSearch from '@/components/Search/index.vue' |
|
|
|
import DataTable from '@/components/DataTable/index.vue' |
|
|
|
import ConfirmModal from './components/ConfirmModal.vue' |
|
|
|
import PositionDrawer from './components/PositionDrawer.vue' |
|
|
|
import { getQuestionList, generateReport } from '@/api/task/index.js' |
|
|
|
import { getQuestionList, generateReport, questionAnalyze } from '@/api/task/index.js' |
|
|
|
import { unref, reactive, toRefs, provide } from 'vue' |
|
|
|
export default { |
|
|
|
name: 'QuestionPage', |
|
|
@@ -133,7 +133,12 @@ export default { |
|
|
|
if (res.code === 0) { |
|
|
|
const { confirm, notreviewed } = res.data |
|
|
|
if (notreviewed === 0) { |
|
|
|
generateReport(props.data.id) |
|
|
|
await generateReport(props.data.id) |
|
|
|
.then(res => { |
|
|
|
if (res.code === 0) { |
|
|
|
data.isReported = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
$dialog.confirm( |
|
|
|
{ |
|
|
@@ -141,7 +146,14 @@ export default { |
|
|
|
title: '提示', |
|
|
|
showIcon: false, |
|
|
|
content: `已核实${confirm}条,未核实${notreviewed}条,是否提交并生成报告?`, |
|
|
|
confirm: generateReport(props.data.id) |
|
|
|
confirm: () => { |
|
|
|
generateReport(props.data.id) |
|
|
|
.then(res => { |
|
|
|
if (res.code === 0) { |
|
|
|
data.isReported = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
} |