You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

123 lines
3.8 KiB

<template>
<div :style="'overflow: scroll;width:100%;height:' + divHeight + 'px;'">
<table width="100%" style="font-size:14px;">
<tbody v-for="(item, index) of tableData" :key="index">
<tr height="30">
<td style="text-align: center;font-weight: bolder;">{{ item.itemTypeName }}</td>
</tr>
<tr>
<table v-for="(item2, index2) in item.asbitems" :key="index + '-' + index2" width="100%" border="1"
cellspacing="0" bordercolor="#909399" style="border-collapse:collapse;">
<tr height="24">
<td width="200">{{ item2.asbitemName }}</td>
<td width="604" colspan="5">{{ '检查日期:' + item2.checkDate + ' 检查医生:' + item2.checkDoctorName }}</td>
</tr>
<tr style="text-align: center;" height="24">
<td width="200">项目</td>
<td width="270">结果</td>
<td width="100">参考值</td>
<td width="100">警告参考值</td>
<td width="80">单位</td>
<td width="50">提示</td>
</tr>
<tr height="24" v-for="(item3, index3) in item2.items" :key="index + '-' + index2 + '-' + index3">
<td>{{ item3.itemName }}</td>
<td>{{ item3.itemResult }}</td>
<td>{{ item3.referenceRangeValue }}</td>
<td>{{ item3.criticalRangeValue }}</td>
<td>{{ item3.unit }}</td>
<td>{{ item3.resultStatusName }}</td>
</tr>
<tr height="24">
<td colspan="6">小结{{ mergeSummarys(item2.summarys, 'summary') }}</td>
</tr>
</table>
</tr>
</tbody>
</table>
</div>
</template>
<script>
import { mapState } from 'vuex';
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj } from '@/utlis/proFunc';
export default {
components: {},
props: ["patientRegisterId"],
data() {
return {
tableData: [],
};
},
created() { },
//挂载完成
mounted() {
this.CheckDetails(this.dataTransOpts.tableS.patient_register.id);
},
computed: {
...mapState(['window', 'dict','dataTransOpts', 'doctorCheck', 'sumDoctorCheck']),
divHeight() {
let tempHeight = this.window.pageHeight < 600 ? 600 : this.window.pageHeight
return tempHeight - 195
},
},
methods: {
//获取结果明细
CheckDetails(RegisterId) {
if (!RegisterId) {
this.tableData = []
return
}
console.log(`/api/app/sumsummaryreport/getdetailedresultslist?PatientRegisterId=${RegisterId}`)
getapi(`/api/app/sumsummaryreport/getdetailedresultslist?PatientRegisterId=${RegisterId}`)
.then((res) => {
console.log("获取结果明细 CheckDetails", res.data);
if (res.code != -1) {
this.tableData = res.data;
}
})
.catch((err) => {
this.$message({ type: "error", message: `操作失败,原因:${err}` });
});
},
mergeSummarys(array, itemKey) {
let ret = ''
array.forEach(e => {
return ret += ';' + e[itemKey]
})
return ret.substring(1, ret.length)
}
},
//监听事件
watch: {
// 虚拟表 触发强制刷新 (sumDoctor.M 合并包含:综述、建议、对比、历史等,不包含总检诊断)
"dataTransOpts.refresh.sumDoctor.M": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 总检--检查明细结果 newVal: ${newVal}, oldVal: ${oldVal} patientRegisterId: ${this.dataTransOpts.tableS.patient_register.id}`);
this.CheckDetails(this.dataTransOpts.tableS.patient_register.id);
}
},
},
};
</script>
<style scoped>
::v-deep .el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf {
padding: 0;
}
</style>