评估报告下载

main
wangxiaoshuang 2024-04-23 10:55:53 +08:00
parent e9a3e3a238
commit 07e1f925d3
4 changed files with 59 additions and 124 deletions

View File

@ -160,3 +160,13 @@ export function getSubjectProgress_Export(param) {
data: param
})
}
// 下载阅片报告
export function downLoadReadReport(data) {
return requestDownload({
url: `/ReadingImageTask/downLoadReadReport`,
method: 'post',
responseType: 'blob',
data
})
}

View File

@ -1,40 +0,0 @@
<template>
<el-dialog
:visible.sync="visible"
:title="fileData.name"
:fullscreen="true"
append-to-body
custom-class="base-dialog-wrapper"
>
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
<PreviewFile
v-if="visible"
:file-path="fileData.path"
:file-type="fileData.name"
/>
</div>
</el-dialog>
</template>
<script>
import PreviewFile from "@/components/PreviewFile/index";
export default {
name: "PreviewFileDialog",
components: { PreviewFile },
props: {
fileData: {
required: true,
type: Object,
default: () => {
return {};
},
},
visible: {
required: true,
type: Boolean,
default: false,
},
},
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -219,7 +219,6 @@
hasPermi(['trials:trials-panel:hirVisit:edit']) ||
hasPermi(['trials:trials-panel:hirVisit:submit']) ||
hasPermi(['trials:trials-panel:hirVisit:remove']) ||
hasPermi(['trials:trials-panel:hirVisit:result']) ||
hasPermi(['trials:trials-panel:hirVisit:downlaod'])
"
>
@ -254,53 +253,15 @@
:disabled="Number(scope.row.SubmitState) > 0"
:title="$t('common:button:delete')"
/>
<el-dropdown
style="margin-left: 10px"
v-if="
hasPermi(['trials:trials-panel:hirVisit:result']) ||
hasPermi(['trials:trials-panel:hirVisit:downlaod'])
"
@command="(command) => handleCommand(command, scope.row)"
>
<el-button
class="el-dropdown-link"
circle
icon="el-icon-more"
:title="$t('common:action:action')"
>
</el-button>
<el-dropdown-menu slot="dropdown">
<!--影像数据-->
<!-- <el-dropdown-item
v-hasPermi="['trials:trials-panel:hirVisit:result']"
disabled
command="result"
>{{
$t("trials:trials-panel:hirVisit:ImageData")
}}</el-dropdown-item
> -->
<!--评估报告disabled-->
<el-dropdown-item
v-hasPermi="['trials:trials-panel:hirVisit:result']"
command="showReport"
>{{
$t("trials:trials-panel:hirVisit:EvaluationReport")
}}</el-dropdown-item
>
<!--数据导出-->
<el-dropdown-item
v-hasPermi="['trials:trials-panel:hirVisit:download']"
command="downloadImage"
:disabled="
Number(scope.row.SubmitState) === 0 ||
!scope.row.VisitLatestStudyTime
"
>{{
$t("trials:reading:button:uploadImages")
}}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
<!--下载报告-->
<el-button
v-hasPermi="['trials:trials-panel:hirVisit:download']"
circle
icon="el-icon-download"
:disabled="Number(scope.row.SubmitState) !== 2"
:title="$t('trials:reading:button:download')"
@click="downloadImage(scope.row)"
/>
</template>
</el-table-column>
</el-table>
@ -327,11 +288,6 @@
:visible.sync="visitVisible"
:rowData="rowData"
/>
<!--评估报告-->
<PreviewFileDialog
:visible.sync="previewFileVisible"
:fileData="fileData"
/>
</BaseContainer>
</template>
<script>
@ -339,7 +295,6 @@ import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
import editStudyList from "./components/edit-study-list.vue";
import visitInfo from "./components/visit-info.vue";
import PreviewFileDialog from "@/components/PreviewFileDialog/PreviewFileDialog.vue";
import { deleteSubjectVisit } from "@/api/trials";
import { getPatientSubejctVisitList } from "@/api/trials/visit.js";
import { submitVisitStudyBinding } from "@/api/inspection.js";
@ -368,7 +323,6 @@ export default {
Pagination,
editStudyList,
visitInfo,
PreviewFileDialog,
},
data() {
return {
@ -386,19 +340,12 @@ export default {
// 访
visitVisible: false,
rowData: {},
//
previewFileVisible: false,
fileData: {},
};
},
created() {
this.getList();
},
methods: {
//
handleCommand(command, item) {
this[command](item);
},
//
handleSearch() {
this.getList();
@ -512,23 +459,10 @@ export default {
console.log(err);
}
},
//
result() {},
//
downloadReport() {},
//
async downloadImage(item) {
downloadImage(item.SubjectId, item.SubjectVisitId);
},
//
showReport(item) {
this.fileData = item;
// this.fileData = {
// path: "/System/DocumentToSign/1709623358162_pdf111.pdf1709623358161",
// name: "111111111111111111.pdf",
// };
this.previewFileVisible = true;
},
},
};
</script>

View File

@ -234,13 +234,28 @@
@click="readResult(scope.row)"
:disabled="scope.row.ReadingTaskState !== 2"
/>
<!--下载报告-->
<el-button
circle
icon="el-icon-download"
:title="$t('trials:reading:button:download')"
@click="downloadReport(scope.row)"
/>
<el-dropdown
style="margin-left: 10px"
@command="(command) => handleCommand(command, scope.row)"
>
<el-button
class="el-dropdown-link"
circle
icon="el-icon-more"
:title="$t('common:action:action')"
>
</el-button>
<el-dropdown-menu slot="dropdown">
<!--评估报告disabled-->
<el-dropdown-item command="showReport">{{
$t("trials:trials-panel:hirVisit:EvaluationReport")
}}</el-dropdown-item>
<!--数据导出-->
<el-dropdown-item command="downloadImage">{{
$t("trials:reading:button:uploadImages")
}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
@ -262,6 +277,7 @@ import Pagination from "@/components/Pagination";
import { getPatientVisitTaskList } from "@/api/readManagenent.js";
import { getToken } from "@/utils/auth";
import { getSystemConfirmedCreiterionList } from "@/api/trials";
import { downLoadReadReport } from "@/api/export";
import { downloadImage } from "@/utils/uploadZip.js";
const defaultSearchData = () => {
return {
@ -307,6 +323,21 @@ export default {
this.getSystemConfirmedCreiterionList();
},
methods: {
//
handleCommand(command, item) {
this[command](item);
},
//
async showReport(item) {
let data = {
VisitTaskId: item.Id,
};
try {
let res = await downLoadReadReport(data);
} catch (err) {
console.log(err);
}
},
//
async getSystemConfirmedCreiterionList() {
try {
@ -376,8 +407,8 @@ export default {
console.log(err);
}
},
//
downloadReport(item) {
//
async downloadImage(item) {
downloadImage(item.SubjectId, item.SourceSubjectVisitId);
},
//