From 88e559bdaa6040bf19e3883076714189f5512684 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Sat, 11 May 2024 14:03:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=85=E7=89=87=E4=BA=BA=E5=B7=B2=E9=98=85?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E3=80=81=E4=B8=8B=E8=BD=BD=E5=BD=B1=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trials-panel/reading/read-task/index.vue | 108 +++++++++++++++--- 1 file changed, 91 insertions(+), 17 deletions(-) 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) => {