|
@@ -140,7 +140,7 @@
|
|
|
<el-table-column
|
|
|
class-name="action-column"
|
|
|
label="操作"
|
|
|
- width="160px"
|
|
|
+ width="200px"
|
|
|
fixed="right"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
@@ -162,6 +162,17 @@
|
|
|
@click="toResetCreatePdf(scope.row)"
|
|
|
>重新生成</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ checkPrivilege('link', 'createPdf') &&
|
|
|
+ scope.row.status === 'RUNNING'
|
|
|
+ "
|
|
|
+ class="btn-danger"
|
|
|
+ type="text"
|
|
|
+ :disabled="loading"
|
|
|
+ @click="toStopCreatePdf(scope.row)"
|
|
|
+ >中止</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -225,7 +236,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { DATA_TASK_STATUS, DATA_TASK_RESULT } from "@/constants/enumerate";
|
|
|
-import { pdfBuildListPage } from "../api";
|
|
|
+import { pdfBuildListPage, stopPrintTaskPdf } from "../api";
|
|
|
import pickerOptions from "@/constants/datePickerOptions";
|
|
|
import { getPrintTaskPdf, rebuildPrintTaskPdf } from "@/modules/print/api";
|
|
|
|
|
@@ -337,6 +348,17 @@ export default {
|
|
|
this.padViewDialogVisible = true;
|
|
|
}
|
|
|
},
|
|
|
+ async toStopCreatePdf(row) {
|
|
|
+ const action = await this.$confirm(`确定要中止该印刷任务吗?`, "提示", {
|
|
|
+ type: "warning",
|
|
|
+ }).catch(() => {});
|
|
|
+ if (action !== "confirm") return;
|
|
|
+
|
|
|
+ const res = await stopPrintTaskPdf(row.id).catch(() => {});
|
|
|
+ if (!res) return;
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
async rebuildPdf(item) {
|
|
|
const action = await this.$confirm(
|
|
|
`确定要重新生成该印刷任务PDF吗?`,
|