diff --git a/src/views/trials/trials-panel/reading/read-task/index.vue b/src/views/trials/trials-panel/reading/read-task/index.vue index 79390f3..dd18eb8 100644 --- a/src/views/trials/trials-panel/reading/read-task/index.vue +++ b/src/views/trials/trials-panel/reading/read-task/index.vue @@ -252,6 +252,28 @@ sortable="custom" show-overflow-tooltip /> + + + + - - - - + + + + @@ -631,6 +654,8 @@ import BaseContainer from "@/components/BaseContainer"; import Pagination from "@/components/Pagination"; import ChatForm from "./components/ChatForm"; import { getToken } from "@/utils/auth"; +import { showReadReport } from "@/api/export"; +import { downloadImage } from "@/utils/uploadZip.js"; const searchDataDefault = () => { return { SubjectCode: "", @@ -694,6 +719,7 @@ export default { TrialReadingCriterionId: "0", openWindow: null, auditRecordVisible: false, + reportFlag: {}, }; }, watch: { @@ -713,6 +739,54 @@ export default { } }, methods: { + // 下拉菜单操作 + handleCommand(command, item) { + this[command](item); + }, + // 评估报告 + async showReport(item) { + if (this.reportFlag[item.Id]) return; + let data = { + VisitTaskId: item.Id, + }; + try { + if (!this.reportFlag.hasOwnProperty(item.Id)) { + this.$set(this.reportFlag, item.Id, true); + } + if (!this.reportFlag[item.Id]) { + this.reportFlag[item.Id] = true; + } + let res = await showReadReport(data); + if (res.IsSuccess) { + let a = document.createElement("a"); + let href = this.OSSclientConfig.basePath + res.Result; + let fileName = + res.Result.split("/")[res.Result.split("/").length - 1]; + a.download = fileName; + a.href = href; + a.click(); + URL.revokeObjectURL(href); + this.$nextTick(() => { + a = null; + href = null; + }); + } + this.reportFlag[item.Id] = false; + } catch (err) { + this.reportFlag[item.Id] = false; + console.log(err); + } + }, + // 下载影像 + async downloadImage(item) { + let res = await downloadImage( + this.$route.query.trialId, + item.SourceSubjectVisitId + ); + if (res) { + item.PackState = res; + } + }, getTrialCriterionList() { getTrialCriterionList(this.trialId) .then((res) => {