评估报告修改

main
wangxiaoshuang 2024-04-26 10:51:18 +08:00
parent 0b1a6bc216
commit 1e93a76838
7 changed files with 84 additions and 49 deletions

View File

@ -164,7 +164,7 @@ export function getSubjectProgress_Export(param) {
// 下载阅片报告
export function downLoadReadReport(data) {
return requestDownload({
url: `/ReadingImageTask/downLoadReadReport`,
url: `/ReadingImageTask/getVisitReadReportUrl`,
method: 'post',
responseType: 'blob',
data
@ -173,9 +173,8 @@ export function downLoadReadReport(data) {
// 预览阅片报告
export function showReadReport(data) {
return request({
url: `/ReadingImageTask/downLoadReadReport`,
url: `/ReadingImageTask/getVisitReadReportUrl`,
method: 'post',
responseType: 'blob',
data
})
}

View File

@ -1,64 +1,78 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator-class="el-icon-arrow-right">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
<span v-else-if="item.name === 'TrialsPanel'" class="no-redirect">{{ item.meta.title }}</span>
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
<span
v-if="item.redirect === 'noRedirect' || index == levelList.length - 1"
class="no-redirect"
>{{ $t(`trials:system:menu:${item.meta.title}`) }}</span
>
<span v-else-if="item.name === 'TrialsPanel'" class="no-redirect">{{
$t(`trials:system:menu:${item.meta.title}`)
}}</span>
<a v-else @click.prevent="handleLink(item)">{{
$t(`trials:system:menu:${item.meta.title}`)
}}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</template>
<script>
import pathToRegexp from 'path-to-regexp'
import pathToRegexp from "path-to-regexp";
export default {
data() {
return {
levelList: null
}
levelList: null,
};
},
watch: {
$route() {
this.getBreadcrumb()
}
this.getBreadcrumb();
},
},
created() {
this.getBreadcrumb()
this.getBreadcrumb();
},
methods: {
getBreadcrumb() {
const matched = this.$route.matched.filter(item => item.meta && item.meta.title)
matched.map(item => {
if (item.name === 'TrialsPanel') {
item.meta.title = this.$route.query.trialCode //
const matched = this.$route.matched.filter(
(item) => item.meta && item.meta.title
);
matched.map((item) => {
if (item.name === "TrialsPanel") {
item.meta.title = this.$route.query.trialCode; //
}
})
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
});
this.levelList = matched.filter(
(item) => item.meta && item.meta.title && item.meta.breadcrumb !== false
);
},
isDashboard(route) {
const name = route && route.name
const name = route && route.name;
if (!name) {
return false
return false;
}
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
return (
name.trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase()
);
},
pathCompile(path) {
const { params } = this.$route
var toPath = pathToRegexp.compile(path)
return toPath(params)
const { params } = this.$route;
var toPath = pathToRegexp.compile(path);
return toPath(params);
},
handleLink(item) {
const { redirect, path } = item
const { redirect, path } = item;
if (redirect) {
this.$router.push(redirect)
return
this.$router.push(redirect);
return;
}
this.$router.push(this.pathCompile(path))
}
}
}
this.$router.push(this.pathCompile(path));
},
},
};
</script>
<style lang="scss" scoped>

View File

@ -10,11 +10,11 @@
>
<el-card class="Basic" shadow="never" size="small">
<el-form-item label="医院名称: " prop="HospitalName">
<el-input v-model="hospital.HospitalName" :disabled="disabled" />
<el-input v-model.trim="hospital.HospitalName" :disabled="disabled" />
</el-form-item>
<el-form-item label="医院编码: " prop="HospitalCode">
<el-input
v-model="hospital.HospitalCode"
v-model.trim="hospital.HospitalCode"
:disabled="disabled || hasPermi(['role:oa'])"
/>
</el-form-item>

View File

@ -254,11 +254,11 @@ export default {
);
this.fileList.push({
name: param.file.name,
path: this.$getObjectName(res.url),
fullPath: this.$getObjectName(res.url),
url: this.$getObjectName(res.url),
path: res.name,
fullPath: res.name,
url: res.name,
});
this.form.Path = this.$getObjectName(res.url);
this.form.Path = res.name;
this.form.FileName = param.file.name;
this.loading = false;
},
@ -268,11 +268,13 @@ export default {
this.fileList = [];
if (Object.keys(data).length) {
this.form = { ...data };
console.log(this.form);
if (this.form.FileName) {
this.fileList[0] = {
name: this.form.FileName,
path: this.form.FilePath,
fullPath: this.form.FullFilePath,
path: this.form.Path,
fullPath: this.form.Path,
url: this.form.Path,
};
}
this.$set(

View File

@ -273,7 +273,7 @@
>
<template slot-scope="scope">
<a
:href="OSSclientConfig.basePath + scope.row.FullFilePath"
:href="OSSclientConfig.basePath + scope.row.Path"
target="_blank"
style="color: #428bca"
>{{ scope.row.FileName }}</a

View File

@ -372,12 +372,18 @@ export default {
try {
this.reportBtnLoading = true;
let res = await showReadReport(data);
let urlPdf = window.URL.createObjectURL(new Blob([res]))
this.viewVisible = true
this.fileData = {
path: encodeURIComponent(urlPdf),
name:'评估报告.pdf'
};
// let urlPdf = window.URL.createObjectURL(new Blob([res]))
if(res.IsSuccess){
this.viewVisible = true;
let href = this.OSSclientConfig.basePath + res.Result;
let fileName =
res.Result.split("/")[res.Result.split("/").length - 1];
a.download = fileName;
this.fileData = {
path:href,
name:fileName
};
}
this.reportBtnLoading = false;
this.previewFileVisible = true;
} catch (err) {

View File

@ -278,7 +278,7 @@ import { getPatientVisitTaskList } from "@/api/readManagenent.js";
import { getToken } from "@/utils/auth";
// import { getSystemConfirmedCreiterionList } from "@/api/trials";
import { getTrialCriterionList } from "@/api/trials/reading";
import { downLoadReadReport } from "@/api/export";
import { showReadReport } from "@/api/export";
import { downloadImage } from "@/utils/uploadZip.js";
const defaultSearchData = () => {
return {
@ -342,7 +342,21 @@ export default {
if (!this.reportFlag[item.Id]) {
this.reportFlag[item.Id] = true;
}
let res = await downLoadReadReport(data);
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;