Browse Source

后台报告单页面修改列表

master-admin
lzp 2 weeks ago
parent
commit
04c0c8dcf0
  1. 77
      web_admin/src/views/report/view copy.vue
  2. 150
      web_admin/src/views/report/view.vue
  3. 3
      web_admin/vue.config.js

77
web_admin/src/views/report/view copy.vue

@ -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 "./components/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>

150
web_admin/src/views/report/view.vue

@ -1,77 +1,115 @@
<template>
<div class="container" v-loading="loading">
<div v-if="pdfPath">
<pdf :pdfPath="pdfPath"></pdf>
</div>
<div v-else class="zw">未查询到报告单</div>
<div class="app-container">
<el-table v-loading="loading" :data="tableList">
<el-table-column
label="患者名称"
align="center"
prop="patientName"
minWidth="100"
/>
<el-table-column label="性别" align="center" prop="sex" minWidth="100">
<template slot-scope="scope">
<span v-if="scope.row.sex === 0"></span>
<span v-else-if="scope.row.sex === 1"></span>
</template>
</el-table-column>
<el-table-column label="年龄" align="center" prop="age" minWidth="100" />
<el-table-column
label="就诊号"
align="center"
prop="visitNo"
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"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleReport(scope.row)"
:disabled="!scope.row.url"
>查看报告单</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";
export default {
components: {
pdf,
},
name: "Notice",
data() {
return {
loading: false,
loading: true,
total: 0,
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.patient_no,
visitNo: this.$route.query.visit_no,
};
this.getList();
},
methods: {
//
handleDownload() {
if (this.pdfPath) {
window.open(this.pdfPath);
//
handleReport(row) {
if (!row.url) {
this.$modal.msgError("未查询到报告单");
return;
}
console.log("this.qzUrl ", this.qzUrl);
window.open(this.qzUrl + row.url);
},
//
async getExportPdf() {
/** 查询公告列表 */
getList() {
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("查询失败");
});
exportPdf(this.queryParams).then((res) => {
this.tableList = res.data.list || [];
this.loading = false;
});
},
},
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>

3
web_admin/vue.config.js

@ -37,9 +37,10 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8080`,
// target: `http://192.168.1.116:19330`,
// target: "https://nnzjpt.ylinno.com/ruisiCgaAdmin/",
// target: "https://www.ylinno.com/cga/v2/api/admin/",
target: "http://192.168.1.136:19330",
target: "http://113.45.159.249:59001/cga/v2/api/admin/",
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save