|
@@ -211,14 +211,14 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<template v-if="scope.row.aiMark">
|
|
<template v-if="scope.row.aiMark">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="checkPrivilege('link', 'EnableAiMark', 'MarkManage')"
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
type="text"
|
|
type="text"
|
|
@click="handleAiStatusUpdate(scope.row)"
|
|
@click="handleAiStatusUpdate(scope.row)"
|
|
- >{{
|
|
|
|
- scope.row.aiStatus === "ENABLE" ? "终止" : "开启"
|
|
|
|
- }}智能评卷</el-button
|
|
|
|
|
|
+ >{{ scope.row.enableAi ? "终止" : "开启" }}智能评卷</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="checkPrivilege('link', 'ResetAiMarkTask', 'MarkManage')"
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
type="text"
|
|
type="text"
|
|
@click="handleAiReset(scope.row)"
|
|
@click="handleAiReset(scope.row)"
|
|
@@ -300,7 +300,7 @@ export default {
|
|
this.openClassMark = res.classMark;
|
|
this.openClassMark = res.classMark;
|
|
},
|
|
},
|
|
async handleAiStatusUpdate(row) {
|
|
async handleAiStatusUpdate(row) {
|
|
- const actionName = row.aiStatus === "ENABLE" ? "终止" : "开启";
|
|
|
|
|
|
+ const actionName = row.enableAi ? "终止" : "开启";
|
|
const confirm = await this.$confirm(
|
|
const confirm = await this.$confirm(
|
|
`确定要${actionName}AI智能评卷任务?`,
|
|
`确定要${actionName}AI智能评卷任务?`,
|
|
"提示",
|
|
"提示",
|
|
@@ -310,18 +310,12 @@ export default {
|
|
).catch(() => {});
|
|
).catch(() => {});
|
|
if (confirm !== "confirm") return;
|
|
if (confirm !== "confirm") return;
|
|
|
|
|
|
- try {
|
|
|
|
- await markProgressQuestionAiStatusUpdate({
|
|
|
|
- examId: this.baseInfo.examId,
|
|
|
|
- paperNumber: this.baseInfo.paperNumber,
|
|
|
|
- questionId: row.questionId,
|
|
|
|
- aiStatus: row.aiStatus === "ENABLE" ? "DISABLE" : "ENABLE",
|
|
|
|
- });
|
|
|
|
- this.$message.success("操作成功");
|
|
|
|
- this.initData();
|
|
|
|
- } catch (e) {
|
|
|
|
- this.$message.error(e || "操作失败");
|
|
|
|
- }
|
|
|
|
|
|
+ await markProgressQuestionAiStatusUpdate({
|
|
|
|
+ questionId: row.questionId,
|
|
|
|
+ enableAi: !row.enableAi,
|
|
|
|
+ });
|
|
|
|
+ this.$message.success("操作成功");
|
|
|
|
+ this.initData();
|
|
},
|
|
},
|
|
async handleAiReset(row) {
|
|
async handleAiReset(row) {
|
|
const confirm = await this.$confirm(
|
|
const confirm = await this.$confirm(
|
|
@@ -333,17 +327,9 @@ export default {
|
|
).catch(() => {});
|
|
).catch(() => {});
|
|
if (confirm !== "confirm") return;
|
|
if (confirm !== "confirm") return;
|
|
|
|
|
|
- try {
|
|
|
|
- await markProgressQuestionAiReset({
|
|
|
|
- examId: this.baseInfo.examId,
|
|
|
|
- paperNumber: this.baseInfo.paperNumber,
|
|
|
|
- questionId: row.questionId,
|
|
|
|
- });
|
|
|
|
- this.$message.success("重置成功");
|
|
|
|
- this.initData();
|
|
|
|
- } catch (e) {
|
|
|
|
- this.$message.error(e || "重置失败");
|
|
|
|
- }
|
|
|
|
|
|
+ await markProgressQuestionAiReset(row.questionId);
|
|
|
|
+ this.$message.success("重置成功");
|
|
|
|
+ this.initData();
|
|
},
|
|
},
|
|
async getList() {
|
|
async getList() {
|
|
const datas = {
|
|
const datas = {
|