|
@@ -48,15 +48,21 @@
|
|
|
width="70"
|
|
|
:index="indexMethod"
|
|
|
></el-table-column>
|
|
|
- <el-table-column prop="name" label="类别"></el-table-column>
|
|
|
+ <el-table-column prop="type" label="类别"></el-table-column>
|
|
|
<el-table-column prop="status" label="状态"> </el-table-column>
|
|
|
<el-table-column prop="result" label="结果" width="100">
|
|
|
</el-table-column>
|
|
|
- <el-table-column class-name="action-column" label="操作" width="120px">
|
|
|
+ <el-table-column prop="createTime" label="创建时间" width="180">
|
|
|
+ <span slot-scope="scope">{{
|
|
|
+ scope.row.createTime | timestampFilter
|
|
|
+ }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createName" label="创建人"></el-table-column>
|
|
|
+ <el-table-column class-name="action-column" label="操作" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- v-if="checkPrivilege('link', 'export')"
|
|
|
- type="primary"
|
|
|
+ v-if="scope.row.hasReportFile && checkPrivilege('link', 'export')"
|
|
|
+ type="text"
|
|
|
class="btn-primary"
|
|
|
:disabled="loading"
|
|
|
@click="toDonwloadLog(scope.row)"
|
|
@@ -82,8 +88,9 @@
|
|
|
|
|
|
<script>
|
|
|
import { STMMS_SYNC_TYPE, DATA_TASK_RESULT } from "@/constants/enumerate";
|
|
|
-import { syncResultListPage, downloadSyncLogs } from "../api";
|
|
|
-import { downloadFileURL } from "@/plugins/utils";
|
|
|
+import { syncResultListPage } from "../api";
|
|
|
+import { attachmentDownload } from "../../login/api";
|
|
|
+import { downloadByUrl } from "@/plugins/download";
|
|
|
|
|
|
export default {
|
|
|
name: "sync-manage",
|
|
@@ -103,7 +110,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- // this.getList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
async getList() {
|
|
@@ -126,13 +133,13 @@ export default {
|
|
|
if (this.loading) return;
|
|
|
|
|
|
this.loading = true;
|
|
|
- const res = await downloadSyncLogs({
|
|
|
+ const res = await attachmentDownload({
|
|
|
id: row.id,
|
|
|
- type: "REPORT"
|
|
|
+ type: "SYNC_REPORT"
|
|
|
}).catch(() => {});
|
|
|
+ this.loading = false;
|
|
|
|
|
|
if (!res) {
|
|
|
- this.loading = false;
|
|
|
this.$message.error("文件下载失败,请重新尝试!");
|
|
|
return;
|
|
|
}
|
|
@@ -143,17 +150,9 @@ export default {
|
|
|
window.open(url);
|
|
|
return;
|
|
|
}
|
|
|
- let result = true;
|
|
|
- await downloadFileURL(url).catch(() => {
|
|
|
- result = false;
|
|
|
- });
|
|
|
- this.loading = false;
|
|
|
|
|
|
- if (result) {
|
|
|
- this.$message.success("文件下载成功!");
|
|
|
- } else {
|
|
|
- this.$message.error("文件下载失败,请重新尝试!");
|
|
|
- }
|
|
|
+ downloadByUrl(url);
|
|
|
+ this.$message.success("文件下载成功!");
|
|
|
}
|
|
|
}
|
|
|
};
|