|
@@ -143,6 +143,7 @@
|
|
|
@click="toDownload"
|
|
|
>批量下载</el-button
|
|
|
>
|
|
|
+ <el-button type="success" @click="viewResult">下载结果</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -215,6 +216,11 @@
|
|
|
ref="ArchivesDetailStudentDialog"
|
|
|
:student="curRow"
|
|
|
></archives-detail-student-dialog>
|
|
|
+ <!-- DataTaskDialog -->
|
|
|
+ <data-task-dialog
|
|
|
+ ref="DataTaskDialog"
|
|
|
+ task-type="PAPER_DOWNLOAD"
|
|
|
+ ></data-task-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -222,11 +228,11 @@
|
|
|
import { documentDetialListPage, documentDetialDownload } from "../api";
|
|
|
import { BOUND_TYPE } from "@/constants/enumerate";
|
|
|
import ArchivesDetailStudentDialog from "./ArchivesDetailStudentDialog.vue";
|
|
|
-import { downloadByApi } from "@/plugins/download";
|
|
|
+import DataTaskDialog from "../../base/components/DataTaskDialog.vue";
|
|
|
|
|
|
export default {
|
|
|
name: "document-detail-dialog",
|
|
|
- components: { ArchivesDetailStudentDialog },
|
|
|
+ components: { ArchivesDetailStudentDialog, DataTaskDialog },
|
|
|
props: {
|
|
|
task: {
|
|
|
type: Object,
|
|
@@ -296,15 +302,11 @@ export default {
|
|
|
if (this.loading) return;
|
|
|
this.loading = true;
|
|
|
|
|
|
- const res = await downloadByApi(() => {
|
|
|
- return documentDetialDownload(this.filter);
|
|
|
- }).catch((e) => {
|
|
|
- this.$message.error(e || "下载失败,请重新尝试!");
|
|
|
- });
|
|
|
+ const res = await documentDetialDownload(this.filter).catch(() => {});
|
|
|
this.loading = false;
|
|
|
|
|
|
if (!res) return;
|
|
|
- this.$message.success("下载成功!");
|
|
|
+ this.$message.success("任务提交成功,结果请在下载结果中查看!");
|
|
|
},
|
|
|
toDetail(row) {
|
|
|
if (!row.bindCount) return;
|
|
@@ -316,6 +318,9 @@ export default {
|
|
|
};
|
|
|
this.$refs.ArchivesDetailStudentDialog.open();
|
|
|
},
|
|
|
+ viewResult() {
|
|
|
+ this.$refs.DataTaskDialog.open();
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|