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.

125 lines
4.1 KiB

2 years ago
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div style="overflow-y: auto;width:100%;height:465px;">
  3. <table width="100%" style="font-size:14px;">
  4. <tbody v-for="(item, index) of tableData" :key="index">
  5. <tr height="30">
  6. <td style="text-align: center;font-weight: bolder;">{{ item.itemTypeName }}</td>
  7. </tr>
  8. <tr>
  9. <table v-for="(item2, index2) in item.asbitems" :key="index + '-' + index2" width="100%" border="1"
  10. cellspacing="0" bordercolor="#909399" style="border-collapse:collapse;">
  11. <tr height="24" >
  12. <td width="200" class="tdCellClass">{{ item2.asbitemNames }}</td>
  13. <td width="600" class="tdCellClass" colspan="5">{{ '检查日期:' + item2.checkDate.substring(0, 10) + ' 检查医生:' + item2.checkDoctorName
  14. }}</td>
  15. </tr>
  16. <tr style="text-align: center;" height="24">
  17. <td width="200">项目</td>
  18. <td width="270">检查结果</td>
  19. <td width="100">参考值</td>
  20. <td width="100">警告参考值</td>
  21. <td width="80">单位</td>
  22. <td width="50">提示</td>
  23. </tr>
  24. <tr height="24" v-for="(item3, index3) in item2.items" :key="index + '-' + index2 + '-' + index3">
  25. <td class="tdCellClass">{{ item3.itemName }}</td>
  26. <td :style="`color: ${getColorStr(item3.reportFontColor)};`" class="tdCellClass">{{ item3.itemResult }}</td>
  27. <td align="center" class="tdCellClass">{{ item3.referenceRangeValue }}</td>
  28. <td align="center" class="tdCellClass">{{ item3.criticalRangeValue }}</td>
  29. <td align="center" class="tdCellClass">{{ item3.unit }}</td>
  30. <td align="center" class="tdCellClass">{{ item3.resultStatusName }}</td>
  31. </tr>
  32. <tr height="24">
  33. <td colspan="6" class="tdCellClass" v-html="`小结:${mergeSummarys(item2.summarys, 'summary')}`"></td>
  34. </tr>
  35. </table>
  36. </tr>
  37. </tbody>
  38. </table>
  39. </div>
  40. </template>
  41. <script>
  42. import { mapState } from 'vuex';
  43. import Sortable from "sortablejs";
  44. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  45. import { arrayExistObj, getColorStr } from '@/utlis/proFunc';
  46. export default {
  47. components: {},
  48. props: ["patientRegisterId","tabChoosed"],
  49. data() {
  50. return {
  51. tableData: [],
  52. };
  53. },
  54. created() { },
  55. //挂载完成
  56. mounted() {
  57. this.CheckDetails(this.dataTransOpts.tableS.patient_register.id);
  58. },
  59. computed: {
  60. ...mapState(['window', 'dict', 'dataTransOpts', 'doctorCheck', 'sumDoctorCheck']),
  61. },
  62. methods: {
  63. getColorStr,
  64. //获取结果明细
  65. CheckDetails(patientRegisterId) {
  66. if (!patientRegisterId) {
  67. this.tableData = []
  68. return
  69. }
  70. postapi('/api/app/OccupationalDisease/GetDetailResults', { patientRegisterId })
  71. .then((res) => {
  72. console.log("获取结果明细 CheckDetails", res.data);
  73. if (res.code != -1) {
  74. this.tableData = res.data;
  75. }
  76. })
  77. .catch((err) => {
  78. this.$message({ type: "error", message: `操作失败,原因(/api/app/OccupationalDisease/GetDetailResults):${err}` });
  79. });
  80. },
  81. mergeSummarys(array, itemKey) {
  82. let ret = ''
  83. array.forEach((e, i) => {
  84. let splitStr = "<br>"
  85. if (i == 0) splitStr = ""
  86. return ret += splitStr + e[itemKey]
  87. })
  88. return ret
  89. }
  90. },
  91. //监听事件
  92. watch: {
  93. // 虚拟表 触发强制刷新 sumDoctor.M 合并包含:综述、建议、对比、历史等,不包含总检诊断)
  94. "dataTransOpts.plus.OccDisease": {
  95. // immediate:true,
  96. handler(newVal, oldVal) {
  97. console.log(`watch 总检--检查明细结果 newVal: ${newVal}, oldVal: ${oldVal} patientRegisterId: ${this.dataTransOpts.tableS.patient_register.id}`);
  98. if(newVal != oldVal) this.CheckDetails(this.dataTransOpts.tableS.patient_register.id);
  99. }
  100. },
  101. },
  102. };
  103. </script>
  104. <style scoped>
  105. .tdCellClass {
  106. padding: 0 5px;
  107. }
  108. ::v-deep .el-table td.el-table__cell,
  109. .el-table th.el-table__cell.is-leaf {
  110. padding: 0;
  111. }
  112. </style>