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.

122 lines
3.8 KiB

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