|
@@ -162,6 +162,13 @@
|
|
|
@click="toCancel(scope.row)"
|
|
|
>作废</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ v-if="checkPrivilege('link', 'restart')"
|
|
|
+ class="btn-danger"
|
|
|
+ type="text"
|
|
|
+ @click="toRestart(scope.row)"
|
|
|
+ >打回</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -211,6 +218,7 @@ import {
|
|
|
downloadPaper,
|
|
|
paperAndCardBatchExport,
|
|
|
cancelTaskPaper,
|
|
|
+ restartTaskPaper,
|
|
|
} from "../api";
|
|
|
import pickerOptions from "@/constants/datePickerOptions";
|
|
|
import { downloadByApi } from "@/plugins/download";
|
|
@@ -350,6 +358,18 @@ export default {
|
|
|
this.$message.success("操作成功!");
|
|
|
this.getList();
|
|
|
},
|
|
|
+ async toRestart(row) {
|
|
|
+ const res = await this.$confirm("确定要打回当前命题任务吗", "提示", {
|
|
|
+ type: "warning",
|
|
|
+ }).catch(() => {});
|
|
|
+ if (res !== "confirm") return;
|
|
|
+
|
|
|
+ const result = await restartTaskPaper(row.id).catch(() => {});
|
|
|
+
|
|
|
+ if (!result) return;
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
toEdit(row) {
|
|
|
this.curPaper = row;
|
|
|
this.editType = "EDIT";
|