pengjun 2 years ago
parent
commit
1353463ce5
  1. 44
      src/components/sumDoctorCheck/CheckDetails.vue
  2. 39
      src/components/sumDoctorCheck/SumItems.vue

44
src/components/sumDoctorCheck/CheckDetails.vue

@ -8,14 +8,15 @@
<tr> <tr>
<table v-for="(item2, index2) in item.asbitems" :key="index + '-' + index2" width="100%" border="1" <table v-for="(item2, index2) in item.asbitems" :key="index + '-' + index2" width="100%" border="1"
cellspacing="0" bordercolor="#909399" style="border-collapse:collapse;"> cellspacing="0" bordercolor="#909399" style="border-collapse:collapse;">
<tr height="24">
<td width="200">{{ item2.asbitemNames }}</td>
<td width="604" colspan="7">{{ '检查日期:' + item2.checkDate.substring(0,10) + ' 检查医生:' + item2.checkDoctorName }}</td>
<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>
<tr style="text-align: center;" height="24"> <tr style="text-align: center;" height="24">
<td width="200">项目</td>
<td width="270">结果</td>
<td width="200">项目</td>
<td width="270">本次结果</td>
<td width="270">上次结果</td> <td width="270">上次结果</td>
<td width="270">上上次结果</td> <td width="270">上上次结果</td>
<td width="100">参考值</td> <td width="100">参考值</td>
@ -23,20 +24,19 @@
<td width="80">单位</td> <td width="80">单位</td>
<td width="50">提示</td> <td width="50">提示</td>
</tr> </tr>
<tr height="24" v-for="(item3, index3) in item2.items" :key="index + '-' + index2 + '-' + index3">
<td>{{ item3.itemName }}</td>
<td :style="`color: ${getColorStr(item3.reportFontColor)};`">{{ item3.itemResult }}</td>
<td :style="`color: ${getColorStr(item3.previousReportFontColor)};`">{{ item3.previousItemResult }}</td>
<td :style="`color: ${getColorStr(item3.previousTwoReportFontColor)};`">{{ item3.previousTwoItemResult }}</td>
<td align="center">{{ item3.referenceRangeValue }}</td>
<td align="center">{{ item3.criticalRangeValue }}</td>
<td align="center">{{ item3.unit }}</td>
<td align="center">{{ item3.resultStatusName }}</td>
<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>
<tr height="24"> <tr height="24">
<td colspan="8" v-html="`小结:${mergeSummarys(item2.summarys, 'summary')}`"></td>
<td colspan="8" class="tdCellClass" v-html="`小结:${mergeSummarys(item2.summarys, 'summary')}`"></td>
</tr> </tr>
</table> </table>
</tr> </tr>
@ -48,7 +48,7 @@
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import Sortable from "sortablejs"; import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj,getColorStr } from '@/utlis/proFunc';
import { arrayExistObj, getColorStr } from '@/utlis/proFunc';
export default { export default {
components: {}, components: {},
props: ["patientRegisterId"], props: ["patientRegisterId"],
@ -96,13 +96,13 @@ export default {
}); });
}, },
mergeSummarys(array, itemKey) { mergeSummarys(array, itemKey) {
let ret = '' let ret = ''
array.forEach((e,i) => {
array.forEach((e, i) => {
let splitStr = "<br>" let splitStr = "<br>"
if(i == 0) splitStr = ""
if (i == 0) splitStr = ""
return ret += splitStr + e[itemKey] return ret += splitStr + e[itemKey]
}) })
return ret return ret
@ -124,6 +124,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.tdCellClass {
padding: 0 5px;
}
::v-deep .el-table td.el-table__cell, ::v-deep .el-table td.el-table__cell,
.el-table th.el-table__cell.is-leaf { .el-table th.el-table__cell.is-leaf {
padding: 0; padding: 0;

39
src/components/sumDoctorCheck/SumItems.vue

@ -37,26 +37,30 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
--> -->
<table width="100%" style="font-size:14px;text-align: center;border-collapse:collapse;" border="1"
cellspacing="0" bordercolor="#909399" >
<col width="150">
<col width="50">
<col width="80">
<table width="100%" style="font-size:14px;text-align: center;border-collapse:collapse;" border="1" cellspacing="0"
bordercolor="#909399">
<colgroup>
<col width="150">
<col width="50">
<col width="80">
<col width="120" v-for="(item, index) of tableCols" :key="index">
</colgroup>
<thead> <thead>
<tr height="30"> <tr height="30">
<td width="150">项目</td>
<td width="50">单位</td>
<td width="80">参考范围</td>
<td v-for="(item, index) of tableCols" :key="index" min-width="150">{{ item.substring(0, 10) }}</td>
<td>项目</td>
<td>单位</td>
<td>参考范围</td>
<td v-for="(item, index) of tableCols" :key="index">{{ item.substring(0, 10) }}</td>
</tr> </tr>
</thead> </thead>
<tbody v-for="(item, index) of tableData" :key="index"> <tbody v-for="(item, index) of tableData" :key="index">
<tr height="30"> <tr height="30">
<td style="text-align: left;font-weight: bolder;"><div style="padding: 0 5px;">{{ item.itemName }}</div></td>
<td>{{ item.unitName }}</td>
<td>{{ item.referenceRangeValue }}</td>
<td v-for="(item2, index2) of tableCols" :key="index2" min-width="150">{{ item[item2] }}</td>
</tr>
<td class="tdCellClass" style="text-align: left;font-weight: bolder;">{{ item.itemName }}</td>
<td class="tdCellClass">{{ item.unitName }}</td>
<td class="tdCellClass">{{ item.referenceRangeValue }}</td>
<td class="tdCellClass" v-for="(item2, index2) of tableCols" :key="index2"
:style="`color: ${getColorStr(item[item2 + '_color'])};`" v-html="item[item2]"></td>
</tr>
</tbody> </tbody>
</table> </table>
@ -67,7 +71,7 @@
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import Sortable from "sortablejs"; import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj } from '@/utlis/proFunc';
import { arrayExistObj, getColorStr } from '@/utlis/proFunc';
export default { export default {
components: {}, components: {},
props: ["patientId"], props: ["patientId"],
@ -97,6 +101,7 @@ export default {
}, },
methods: { methods: {
getColorStr,
// //
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
//console.log('tableRowClassName',rowIndex,row) //console.log('tableRowClassName',rowIndex,row)
@ -275,5 +280,9 @@ export default {
</script> </script>
<style scoped> <style scoped>
@import '../../assets/css/global_table.css'; @import '../../assets/css/global_table.css';
.tdCellClass {
padding: 0 5px;
}
</style> </style>
Loading…
Cancel
Save