评估报告修改

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) { export function downLoadReadReport(data) {
return requestDownload({ return requestDownload({
url: `/ReadingImageTask/downLoadReadReport`, url: `/ReadingImageTask/getVisitReadReportUrl`,
method: 'post', method: 'post',
responseType: 'blob', responseType: 'blob',
data data
@ -173,9 +173,8 @@ export function downLoadReadReport(data) {
// 预览阅片报告 // 预览阅片报告
export function showReadReport(data) { export function showReadReport(data) {
return request({ return request({
url: `/ReadingImageTask/downLoadReadReport`, url: `/ReadingImageTask/getVisitReadReportUrl`,
method: 'post', method: 'post',
responseType: 'blob',
data data
}) })
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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