|
@@ -95,6 +95,16 @@
|
|
title="导出日志"
|
|
title="导出日志"
|
|
></el-button>
|
|
></el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="scope.row.resetCreatePdf"
|
|
|
|
+ class="btn-table-icon"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="icon icon-modify"
|
|
|
|
+ :disabled="loading"
|
|
|
|
+ @click="toResetCreatePdf(scope.row)"
|
|
|
|
+ title="重新生成PDF"
|
|
|
|
+ ></el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-else
|
|
class="btn-table-icon"
|
|
class="btn-table-icon"
|
|
type="text"
|
|
type="text"
|
|
icon="icon icon-download-act"
|
|
icon="icon icon-download-act"
|
|
@@ -126,7 +136,7 @@ import {
|
|
DATA_TASK_TYPE,
|
|
DATA_TASK_TYPE,
|
|
DATA_TASK_RESULT
|
|
DATA_TASK_RESULT
|
|
} from "@/constants/enumerate";
|
|
} from "@/constants/enumerate";
|
|
-import { dataTaskList, removeDataTask } from "../api";
|
|
|
|
|
|
+import { dataTaskList, removeDataTask, taskResetPdf } from "../api";
|
|
import { attachmentDownload } from "../../login/api";
|
|
import { attachmentDownload } from "../../login/api";
|
|
import { downloadFileURL } from "@/plugins/utils";
|
|
import { downloadFileURL } from "@/plugins/utils";
|
|
|
|
|
|
@@ -258,6 +268,17 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$message.error("文件下载失败,请重新尝试!");
|
|
this.$message.error("文件下载失败,请重新尝试!");
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ async toResetCreatePdf(row) {
|
|
|
|
+ if (this.loading) return;
|
|
|
|
+
|
|
|
|
+ this.loading = true;
|
|
|
|
+ const res = await taskResetPdf(row.id).catch(() => {});
|
|
|
|
+ this.loading = false;
|
|
|
|
+ if (!res) return;
|
|
|
|
+
|
|
|
|
+ this.$message.success("操作成功!");
|
|
|
|
+ this.getList();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|