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.

114 lines
3.7 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
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div :style="'overflow: scroll;font-size: 14px;width:100%;height:' + divHeight + 'px;'">
  3. <table width="100%">
  4. <tbody v-for="(item, index) of tableData" :key="index">
  5. <tr height="40">
  6. <td width="100" class="tdCellClass">体检次数</td>
  7. <td width="100" class="tdCellClass">{{ item.medicalTimes }}</td>
  8. <td width="200" class="tdCellClass">总检医生{{ item.summaryDoctor }}</td>
  9. <td class="tdCellClass">总检日期{{ item.summaryDate }}</td>
  10. </tr>
  11. <tr height="10">
  12. <td colspan="4"></td>
  13. </tr>
  14. <tr height="40">
  15. <td width="100" class="tdCellClass" style="vertical-align: top;">检查综述</td>
  16. <td colspan="3" class="tdCellClass" v-html="item.sumSummarys"></td>
  17. </tr>
  18. <tr height="20">
  19. <td colspan="4"></td>
  20. </tr>
  21. <tr height="40">
  22. <td width="100" class="tdCellClass" style="vertical-align: top;">医生建议</td>
  23. <td colspan="3" class="tdCellClass" v-html="item.sumSuggestions"></td>
  24. </tr>
  25. </tbody>
  26. </table>
  27. </div>
  28. </template>
  29. <script>
  30. import { mapState } from 'vuex';
  31. import Sortable from "sortablejs";
  32. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  33. import { arrayExistObj } from '@/utlis/proFunc';
  34. export default {
  35. components: {},
  36. props: ["patientId","tabChoosed"],
  37. data() {
  38. return {
  39. tableData: [], //显示数据
  40. };
  41. },
  42. created() { },
  43. //挂载完成
  44. mounted() {
  45. // if(this.patientId){
  46. // this.SumHistory(this.patientId);
  47. // }
  48. this.SumHistory(this.patientId)
  49. },
  50. computed: {
  51. ...mapState(['window', 'dict','dataTransOpts', 'doctorCheck', 'sumDoctorCheck']),
  52. divHeight() {
  53. let tempHeight = this.window.pageHeight < 600 ? 600 : this.window.pageHeight
  54. return tempHeight - 195
  55. },
  56. },
  57. methods: {
  58. //获取历次综述
  59. // {
  60. // "medicalTimes": 3,
  61. // "summaryDoctor": "admin",
  62. // "summaryDate": "7/24/2023",
  63. // "sumSummarys": "* 乙肝两对半:\n(01)无免疫\n* 身高体重:\n(01)重度脂肪肝\n* 血常规:\n(01)白细胞计数升高\n* 心电图:\n(01)右眼近视\n",
  64. // "sumSuggestions": "* 乙肝两对半:\n(01)接种疫苗\n* 身高体重:\n(01)减肥、锻炼\n* 血常规:\n(01)注意休息\n* 心电图:\n(01)护眼及注意用眼卫生\n"
  65. // },
  66. SumHistory(patientId) {
  67. this.tableData = []
  68. if (!patientId) return
  69. console.log(`/api/app/sumsummaryreport/gethistoricalreviewlist?PatientId=${patientId}`)
  70. getapi(`/api/app/sumsummaryreport/gethistoricalreviewlist?PatientId=${patientId}`)
  71. .then((res) => {
  72. console.log("获取历次综述 SumHistory", res.data);
  73. if (res.code != -1) {
  74. this.tableData = res.data;
  75. }
  76. })
  77. .catch((err) => {
  78. this.$message({ type: "error", message: `操作失败,原因:${err}` });
  79. });
  80. },
  81. lreplaceAll(str) {
  82. return str.replaceAll('*', "<br/>")
  83. },
  84. },
  85. //监听事件
  86. watch: {
  87. // 虚拟表 触发强制刷新 (sumDoctor.M 合并包含:综述、建议、对比、历史等,不包含总检诊断)
  88. "dataTransOpts.refresh.sumDoctor.M":{
  89. // immediate:true,
  90. handler(newVal, oldVal) {
  91. console.log(`watch 总检--历次综述建议 newVal: ${newVal}, oldVal: ${oldVal} patientId: ${this.patientId}`);
  92. if(newVal != oldVal && this.tabChoosed == '6') this.SumHistory(this.patientId)
  93. }
  94. },
  95. },
  96. };
  97. </script>
  98. <style scoped>
  99. ::v-deep .el-table td.el-table__cell,
  100. .el-table th.el-table__cell.is-leaf {
  101. padding: 0;
  102. }
  103. .tdCellClass {
  104. padding: 0 5px;
  105. }
  106. </style>