阅片人已阅列表,增加下载报告、下载影像
parent
aef3c8e924
commit
88e559bdaa
|
@ -252,6 +252,28 @@
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
|
<!-- 打包状态 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="PackState"
|
||||||
|
:label="$t('trials:hirVisit:table:PackState')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag
|
||||||
|
:type="
|
||||||
|
Number(scope.row.PackState) === 0
|
||||||
|
? 'danger'
|
||||||
|
: Number(scope.row.PackState) === 1
|
||||||
|
? 'warning'
|
||||||
|
: 'success'
|
||||||
|
"
|
||||||
|
>{{
|
||||||
|
$fd("PackState", Number(scope.row.PackState) || 0)
|
||||||
|
}}</el-tag
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- 申请状态 -->
|
<!-- 申请状态 -->
|
||||||
<!-- <el-table-column
|
<!-- <el-table-column
|
||||||
v-if="!hasPermi(['role:air'])"
|
v-if="!hasPermi(['role:air'])"
|
||||||
|
@ -283,7 +305,7 @@
|
||||||
<!--操作-->
|
<!--操作-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('common:action:action')"
|
:label="$t('common:action:action')"
|
||||||
min-width="100"
|
min-width="140"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
v-if="
|
v-if="
|
||||||
hasPermi([
|
hasPermi([
|
||||||
|
@ -312,22 +334,23 @@
|
||||||
icon="el-icon-collection"
|
icon="el-icon-collection"
|
||||||
@click="openApplyReReading(scope.row)"
|
@click="openApplyReReading(scope.row)"
|
||||||
/>
|
/>
|
||||||
<!-- 下载报告 -->
|
<!--评估报告-->
|
||||||
<!-- <el-button
|
<el-button
|
||||||
v-hasPermi="['trials:readTask:report']"
|
circle
|
||||||
circle
|
v-hasPermi="['trials:readTask:report']"
|
||||||
:title="$t('trials:reading:button:uploadReport')"
|
icon="el-icon-document"
|
||||||
icon="el-icon-collection"
|
:title="$t('trials:trials-panel:hirVisit:EvaluationReport')"
|
||||||
@click="handleReadImage(scope.row)"
|
@click="handleCommand('showReport', scope.row)"
|
||||||
/> -->
|
:disabled="scope.row.ReadingTaskState !== 2"
|
||||||
<!-- 审核记录 -->
|
/>
|
||||||
<!-- <el-button
|
<!--下载影像-->
|
||||||
v-hasPermi="['trials:readTask:auditRecord']"
|
<el-button
|
||||||
circle
|
circle
|
||||||
:title="$t('trials:auditRecord:table:auditRecords')"
|
v-hasPermi="['trials:readTask:report']"
|
||||||
icon="el-icon-collection"
|
icon="el-icon-download"
|
||||||
@click="handleReadImage(scope.row)"
|
:title="$t('trials:reading:button:uploadImages')"
|
||||||
/> -->
|
@click="handleCommand('downloadImage', scope.row)"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -631,6 +654,8 @@ import BaseContainer from "@/components/BaseContainer";
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
import ChatForm from "./components/ChatForm";
|
import ChatForm from "./components/ChatForm";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
import { showReadReport } from "@/api/export";
|
||||||
|
import { downloadImage } from "@/utils/uploadZip.js";
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
SubjectCode: "",
|
SubjectCode: "",
|
||||||
|
@ -694,6 +719,7 @@ export default {
|
||||||
TrialReadingCriterionId: "0",
|
TrialReadingCriterionId: "0",
|
||||||
openWindow: null,
|
openWindow: null,
|
||||||
auditRecordVisible: false,
|
auditRecordVisible: false,
|
||||||
|
reportFlag: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -713,6 +739,54 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
||||||
getTrialCriterionList(this.trialId)
|
getTrialCriterionList(this.trialId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue