2 changed files with 227 additions and 46 deletions
@ -0,0 +1,77 @@ |
|||
<template> |
|||
<div class="container" v-loading="loading"> |
|||
<div v-if="pdfPath"> |
|||
<pdf :pdfPath="pdfPath"></pdf> |
|||
</div> |
|||
<div v-else class="zw">未查询到报告单</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { exportPdf } from "@/api/report.js"; |
|||
import pdf from "./pdf.vue"; |
|||
export default { |
|||
components: { |
|||
pdf, |
|||
}, |
|||
data() { |
|||
return { |
|||
loading: false, |
|||
qzUrl: process.env.VUE_APP_BASE_API, |
|||
pdfPath: null, |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 下载 |
|||
handleDownload() { |
|||
if (this.pdfPath) { |
|||
window.open(this.pdfPath); |
|||
} |
|||
}, |
|||
// 查询 |
|||
async getExportPdf() { |
|||
this.loading = true; |
|||
exportPdf({ |
|||
patientNo: this.$route.query.patient_no, |
|||
emplCode: this.$route.query.empl_code, |
|||
}) |
|||
.then((res) => { |
|||
this.loading = false; |
|||
this.pdfPath = null; |
|||
if (res.data) { |
|||
this.$modal.msgSuccess("查询成功"); |
|||
this.pdfPath = this.qzUrl + res.data; |
|||
} |
|||
}) |
|||
.catch((error) => { |
|||
this.loading = false; |
|||
this.$modal.msgError("查询失败"); |
|||
}); |
|||
}, |
|||
}, |
|||
created() { |
|||
let deptId = this.$route.query.deptId || 106; |
|||
localStorage.setItem("hospitalId", deptId); |
|||
this.getExportPdf(); |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.zw { |
|||
font-size: 100px; |
|||
color: #b0b0b0; |
|||
} |
|||
.container { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
height: 100vh; |
|||
padding: 16px; |
|||
background: url("back.png"); |
|||
background-size: cover; |
|||
background-repeat: no-repeat; |
|||
} |
|||
</style> |
|||
<style></style> |
|||
@ -1,77 +1,181 @@ |
|||
<template> |
|||
<div class="container" v-loading="loading"> |
|||
<div v-if="pdfPath"> |
|||
<pdf :pdfPath="pdfPath"></pdf> |
|||
<div class="app-container"> |
|||
<!-- 透明度 --> |
|||
<div |
|||
class="patient-info" |
|||
:style="{ opacity: patientInfo.patientName ? 1 : 0 }" |
|||
> |
|||
<span> {{ patientInfo.patientName || "未知" }}</span> |
|||
<span class="fg">/</span> |
|||
<span> |
|||
<span v-if="patientInfo.sex === 0">男</span |
|||
><span v-else-if="patientInfo.sex === 1">女</span><span v-else>-</span> |
|||
</span> |
|||
<span class="fg">/</span> |
|||
<span>{{ patientInfo.birthDate || "-" }}</span> |
|||
<span class="fg">/</span> |
|||
<span>{{ patientInfo.idCard || "-" }}</span> |
|||
</div> |
|||
<div v-else class="zw">未查询到报告单</div> |
|||
<el-table v-loading="loading" :data="tableList" empty-text="未查询到报告单"> |
|||
<el-table-column |
|||
label="就诊类型" |
|||
align="center" |
|||
prop="visitType" |
|||
minWidth="100" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.visitType === '0'">门诊</span> |
|||
<span v-else-if="scope.row.visitType === '1'">住院</span> |
|||
<span v-else>-</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="就诊号" |
|||
align="center" |
|||
prop="visitNo" |
|||
minWidth="100" |
|||
/> |
|||
<el-table-column |
|||
label="部门" |
|||
align="center" |
|||
prop="department" |
|||
minWidth="100" |
|||
/> |
|||
<el-table-column |
|||
label="评估医生" |
|||
align="center" |
|||
prop="assessor" |
|||
minWidth="100" |
|||
/> |
|||
<el-table-column |
|||
label="评估时间" |
|||
align="center" |
|||
prop="assessTime" |
|||
minWidth="100" |
|||
/> |
|||
<el-table-column label="操作" align="center" fixed="right"> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-document" |
|||
@click="handleReport(scope.row)" |
|||
> |
|||
查看报告单 |
|||
</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { exportPdf } from "@/api/report.js"; |
|||
import pdf from "./components/pdf.vue"; |
|||
import { exportPdf, queryPdfUrl } from "@/api/report.js"; |
|||
|
|||
export default { |
|||
components: { |
|||
pdf, |
|||
}, |
|||
name: "Notice", |
|||
|
|||
data() { |
|||
return { |
|||
loading: false, |
|||
loading: true, |
|||
total: 0, |
|||
patientInfo: {}, |
|||
tableList: [], |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
param: {}, |
|||
}, |
|||
qzUrl: process.env.VUE_APP_BASE_API, |
|||
pdfPath: null, |
|||
}; |
|||
}, |
|||
created() { |
|||
let deptId = this.$route.query.hid || 106; |
|||
localStorage.setItem("hospitalId", deptId); |
|||
// 参数 |
|||
this.queryParams.param = { |
|||
patientNo: this.$route.query.patientNo, |
|||
visitNo: this.$route.query.visitNo, |
|||
}; |
|||
|
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
// 下载 |
|||
handleDownload() { |
|||
if (this.pdfPath) { |
|||
window.open(this.pdfPath); |
|||
} |
|||
// 查看报告单 |
|||
handleReport(row) { |
|||
queryPdfUrl({ |
|||
param: { |
|||
reportId: row.reportId, |
|||
evaluationId: row.evaluationId, |
|||
version: 0, // 导出类型 0医生版 1个人版 2阳性版 |
|||
assessorId: row.assessorId, |
|||
}, |
|||
}).then((res) => { |
|||
if (!res.data) { |
|||
this.$modal.msgError("未查询到报告单"); |
|||
return; |
|||
} |
|||
window.open(this.qzUrl + res.data); |
|||
}); |
|||
}, |
|||
// 查询 |
|||
async getExportPdf() { |
|||
/** 查询公告列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
exportPdf({ |
|||
patientNo: this.$route.query.patient_no, |
|||
emplCode: this.$route.query.empl_code, |
|||
}) |
|||
exportPdf(this.queryParams) |
|||
.then((res) => { |
|||
this.tableList = res.data.list || []; |
|||
this.patientInfo = res.data.list[0] || {}; |
|||
this.total = res.data.total || 0; |
|||
this.loading = false; |
|||
this.pdfPath = null; |
|||
if (res.data) { |
|||
this.$modal.msgSuccess("查询成功"); |
|||
this.pdfPath = this.qzUrl + res.data; |
|||
} |
|||
}) |
|||
.catch((error) => { |
|||
.catch(() => { |
|||
console.log("导出失败"); |
|||
this.loading = false; |
|||
this.$modal.msgError("查询失败"); |
|||
}); |
|||
}, |
|||
}, |
|||
created() { |
|||
let deptId = 176; |
|||
localStorage.setItem("hospitalId", deptId); |
|||
this.getExportPdf(); |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.zw { |
|||
font-size: 100px; |
|||
color: #b0b0b0; |
|||
.app-container { |
|||
width: 80%; |
|||
margin: 0 auto; |
|||
margin-top: 100px; |
|||
/* height: 100vh; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: center; */ |
|||
} |
|||
.container { |
|||
|
|||
.patient-info { |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
height: 100vh; |
|||
padding: 16px; |
|||
background: url("./back.png"); |
|||
background-size: cover; |
|||
background-repeat: no-repeat; |
|||
line-height: 120px; |
|||
margin-bottom: 20px; |
|||
font-size: 20px; |
|||
color: #222; |
|||
/* background: #f8f8f9; */ |
|||
border: 1px solid #dfe6ec; |
|||
} |
|||
|
|||
.fg { |
|||
margin: 0 10px; |
|||
} |
|||
/*屏蔽表头单元格背景色(背景设置为透明)*/ |
|||
>>> .el-table .el-table__header-wrapper th, |
|||
>>> .el-table .el-table__fixed-header-wrapper th { |
|||
background-color: #409eff; |
|||
color: #fff; |
|||
} |
|||
</style> |
|||
<style></style> |
|||
<style lang="less"></style> |
|||
|
|||
Loading…
Reference in new issue