1
0

index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <script>
  2. import CheckDetailReport from "@/views/work/patient/check/checkProjectDetailReport.vue";
  3. import {
  4. OBR_INIT_VALUE,
  5. } from "@/views/work/patient/check/checkInitValues";
  6. import service from "@/utils/request";
  7. export default {
  8. components: { CheckDetailReport },
  9. name: "PatientCheck",
  10. props: {
  11. checkWindowShow: {
  12. type: Boolean,
  13. default: false,
  14. },
  15. patientInfo: {
  16. type: Object,
  17. default: function () {
  18. return {
  19. id: "",
  20. name: "",
  21. };
  22. },
  23. },
  24. },
  25. data() {
  26. return {
  27. testData: null,
  28. /**
  29. * 当前检查项目相关信息
  30. * @property {number} obxTotal - 患者检查项目总数
  31. * @property {import('./index').ObxList} pageObxList - 当前要查看的患者的所有检查项目,注意是分页后的某一的结果
  32. * @property {import('./index').Obr} obr - 当前需要查看的详细检测报告
  33. */
  34. currentCheckInfo: {
  35. obxTotal: 0,
  36. pageObxList: [],
  37. obxQueryParams: {
  38. pageNum: 0,
  39. pageSize: 0,
  40. },
  41. obr: OBR_INIT_VALUE,
  42. },
  43. };
  44. },
  45. watch: {
  46. checkWindowShow: {
  47. handler: function (newVal) {
  48. // console.log(`checkWindowShow的值被设为${newVal}`)
  49. if(newVal) {
  50. service.get(`work/result/list`)
  51. .then(res => {
  52. this.currentCheckInfo.pageObxList = res.rows
  53. })
  54. }
  55. }
  56. }
  57. },
  58. methods: {
  59. showDetailReport (obrId) {
  60. service.get(`work/request/patid/${this.patientInfo.id}`)
  61. .then(res => {
  62. this.currentCheckInfo.obr = res.rows.find(item => item.id === obrId)
  63. console.log(this.currentCheckInfo.obr)
  64. })
  65. }
  66. }
  67. };
  68. </script>
  69. <template>
  70. <div class="patient-check-projects">
  71. <el-dialog
  72. :title="`${patientInfo.name}的检测项目相关信息`"
  73. :visible="checkWindowShow"
  74. :before-close="() => $emit('update:checkWindowShow', false)"
  75. width="80%"
  76. top="5%"
  77. center
  78. >
  79. <el-tabs value="1">
  80. <el-tab-pane label="检测项目表" name="1" style="height: 400px">
  81. <div id="patient-check-projects-list">
  82. <el-table
  83. width="75vw"
  84. stripe
  85. :data="currentCheckInfo.pageObxList"
  86. >
  87. <el-table-column
  88. label="诊断名称"
  89. align="center"
  90. prop="mecTechObsProject"
  91. ></el-table-column>
  92. <el-table-column
  93. label="项目信息结果"
  94. align="center"
  95. prop="result"
  96. ></el-table-column>
  97. <el-table-column
  98. label="项目单位"
  99. align="center"
  100. prop="unitCode"
  101. ></el-table-column>
  102. <el-table-column
  103. label="结果参考值"
  104. align="center"
  105. prop="result"
  106. ></el-table-column>
  107. <el-table-column
  108. label="高低标志"
  109. align="center"
  110. prop="sign"
  111. ></el-table-column>
  112. <el-table-column
  113. label="微生物观察分类"
  114. align="center"
  115. prop="obsClassification"
  116. ></el-table-column>
  117. <el-table-column
  118. label="检验方法"
  119. align="center"
  120. prop="testMethod"
  121. ></el-table-column>
  122. <el-table-column label="操作" align="center">
  123. <template slot-scope="scope">
  124. <el-button
  125. type="text"
  126. icon="el-icon-search"
  127. @click="showDetailReport(scope.row.obrId)"
  128. >
  129. 查看详细检验报告
  130. </el-button>
  131. </template>
  132. </el-table-column>
  133. </el-table>
  134. <pagination
  135. :total="currentCheckInfo.obxTotal"
  136. :page.sync="currentCheckInfo.obxQueryParams.pageNum"
  137. :limit.sync="currentCheckInfo.obxQueryParams.pageSize"
  138. @pagination="
  139. "
  140. />
  141. </div>
  142. </el-tab-pane>
  143. <el-tab-pane
  144. label="详细检测报告"
  145. name="2"
  146. style="height: 400px"
  147. >
  148. <check-detail-report :obr="currentCheckInfo.obr" />
  149. </el-tab-pane>
  150. </el-tabs>
  151. <span slot="footer" class="dialog-footer">
  152. <el-button
  153. type="primary"
  154. @click="$emit('update:checkWindowShow', false)"
  155. >确 定</el-button
  156. >
  157. </span>
  158. </el-dialog>
  159. </div>
  160. </template>