7 changed files with 268 additions and 60 deletions
-
24src/components/occDisease/ImageTextReport.vue
-
119src/components/sumDoctorCheck/CheckDetails.vue
-
156src/components/sumDoctorCheck/CheckDetailsBak.vue
-
3src/components/sumDoctorCheck/SumItems.vue
-
22src/components/sumDoctorCheck/SumSug.vue
-
2src/views/diagnosis/diagnosis.vue
-
2src/views/doctorCheck/sumDoctorCheck.vue
@ -0,0 +1,156 @@ |
|||
<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" class="tdCellClass">{{ item2.asbitemNames }}</td> |
|||
<td width="604" class="tdCellClass" colspan="7">{{ '检查日期:' + item2.checkDate.substring(0, 10) + ' 检查医生:' + item2.checkDoctorName |
|||
}}</td> |
|||
</tr> |
|||
|
|||
<tr style="text-align: center;" height="24"> |
|||
<td width="200">项目</td> |
|||
<td width="270">本次结果</td> |
|||
<td width="270">上次结果</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 class="tdCellClass">{{ item3.itemName }}</td> |
|||
<td :style="`color: ${getColorStr(item3.reportFontColor)};`" class="tdCellClass">{{ item3.itemResult }}</td> |
|||
<td :style="`color: ${getColorStr(item3.previousReportFontColor)};`" class="tdCellClass">{{ item3.previousItemResult }}</td> |
|||
<td :style="`color: ${getColorStr(item3.previousTwoReportFontColor)};`" class="tdCellClass">{{ item3.previousTwoItemResult }}</td> |
|||
<td align="center" class="tdCellClass">{{ item3.referenceRangeValue }}</td> |
|||
<td align="center" class="tdCellClass">{{ item3.criticalRangeValue }}</td> |
|||
<td align="center" class="tdCellClass">{{ item3.unit }}</td> |
|||
<td align="center" class="tdCellClass">{{ item3.resultStatusName }}</td> |
|||
</tr> |
|||
|
|||
<tr height="24"> |
|||
<td colspan="8" class="tdCellClass" v-html="`小结:${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, getColorStr } from '@/utlis/proFunc'; |
|||
export default { |
|||
components: {}, |
|||
props: ["patientRegisterId","tabChoosed","refParams",], |
|||
data() { |
|||
return { |
|||
tableData: [], |
|||
}; |
|||
}, |
|||
|
|||
created() { }, |
|||
|
|||
//挂载完成 |
|||
mounted() { |
|||
this.CheckDetails(this.dataTransOpts.tableS.patient_register.id); |
|||
}, |
|||
|
|||
computed: { |
|||
...mapState(['window', 'dict', 'dataTransOpts', 'doctorCheck', 'sumDoctorCheck']), |
|||
|
|||
divHeight() { |
|||
let tableHeight = 465 |
|||
switch (this.refParams.place) { |
|||
case 'summary': //总检处 |
|||
tableHeight = (this.window.pageHeight < 600 ? 600 : this.window.pageHeight) - 195 |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
return tableHeight |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
getColorStr, |
|||
//获取结果明细 |
|||
CheckDetails(patientRegisterId) { |
|||
if (!patientRegisterId) { |
|||
this.tableData = [] |
|||
return |
|||
} |
|||
|
|||
//console.log(`/api/app/sumsummaryreport/getdetailedresultslist?PatientRegisterId=${patientRegisterId}`) |
|||
|
|||
postapi('/api/app/SumSummaryReport/GetDetailResults', { patientRegisterId }) |
|||
.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, i) => { |
|||
//let splitStr = "<br>" |
|||
if (i == 0){ |
|||
ret = e[itemKey] |
|||
}else if (i==1) { |
|||
ret = `1.${ret} ${Number(i)+1}.${e[itemKey]}` |
|||
} else { |
|||
ret += ` ${Number(i)+1}.${e[itemKey]}` |
|||
} |
|||
}) |
|||
return ret |
|||
} |
|||
}, |
|||
|
|||
//监听事件 |
|||
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.tabChoosed == '2' |
|||
if(newVal != oldVal){ |
|||
if(this.refParams.place == 'doctor'){ |
|||
this.CheckDetails(this.dataTransOpts.tableS.patient_register.id); |
|||
}else{ |
|||
if(this.tabChoosed == '2') this.CheckDetails(this.dataTransOpts.tableS.patient_register.id); |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
|
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
.tdCellClass { |
|||
padding: 0 5px; |
|||
} |
|||
|
|||
::v-deep .el-table td.el-table__cell, |
|||
.el-table th.el-table__cell.is-leaf { |
|||
padding: 0; |
|||
} |
|||
</style> |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue