detail.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <div class="labs">
  3. <div class="labs-header">
  4. <el-descriptions title="基本信息">
  5. <el-descriptions-item label="报告名称">{{
  6. data.reportName
  7. }}</el-descriptions-item>
  8. <el-descriptions-item label="申请医生">{{
  9. data.applyDoctorName
  10. }}</el-descriptions-item>
  11. <el-descriptions-item label="检验号">{{
  12. data.applyId
  13. }}</el-descriptions-item>
  14. <el-descriptions-item label="样本类型">{{
  15. data.sampleTypeRaw
  16. }}</el-descriptions-item>
  17. <el-descriptions-item label="检查时间">{{
  18. data.inspectTime
  19. }}</el-descriptions-item>
  20. <el-descriptions-item label="报告时间">{{
  21. data.reportsTime
  22. }}</el-descriptions-item>
  23. </el-descriptions>
  24. </div>
  25. <div class="labs-bodyer">
  26. <el-descriptions title="报告详情" />
  27. <div v-if="data.dwdLaboratoryReportItemVOs" class="table-list">
  28. <el-table :data="data.dwdLaboratoryReportItemVOs" stripe style="width: 100%">
  29. <el-table-column prop="nameRaw" label="检验" width="180">
  30. <template slot-scope="scope">
  31. <el-button type="text">{{ scope.row.nameRaw }}</el-button>
  32. </template>
  33. </el-table-column>
  34. <el-table-column prop="codeRaw" label="编号" width="100">
  35. <template slot-scope="scope">
  36. {{ scope.row.codeRaw }}
  37. </template>
  38. </el-table-column>
  39. <el-table-column prop="codeRaw" label="结果" width="100">
  40. <template slot-scope="scope">
  41. <sapn
  42. v-if="scope.row.abnormal == '0' && (scope.row.resultValueFlag == 'decline' || scope.row.resultValueFlag == 'rise')">
  43. <span v-if="scope.row.resultValueFlag == 'rise'" style="color: #f56c6c">{{ scope.row.inspectResultRaw }}
  44. ↑</span>
  45. <span v-else-if="scope.row.resultValueFlag == 'decline'" style="color: #f56c6c">{{
  46. scope.row.inspectResultRaw
  47. }} ↓</span>
  48. </sapn>
  49. <span v-else-if="scope.row.abnormal == '1'">
  50. {{
  51. scope.row.inspectResultRaw
  52. }}
  53. <span v-if="scope.row.abnormalIndicator == '升高' || scope.row.abnormalIndicator == '高' || scope.row.abnormalIndicator == '高于极限' " style="color: #f56c6c">
  54. ↑</span>
  55. <span v-else-if="scope.row.abnormalIndicator == '降低' || scope.row.abnormalIndicator == '低' || scope.row.abnormalIndicator == '低于极限' " style="color: #f56c6c"> ↓</span>
  56. </span>
  57. <span v-else>
  58. {{
  59. scope.row.inspectResultRaw
  60. }}
  61. </span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column prop="codeRaw" label="参考范围" width="180">
  65. <template slot-scope="scope">
  66. {{ scope.row.referenceRaw }}
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="unitRaw" label="单位" />
  70. <el-table-column prop="action" label="操作">
  71. <template slot-scope="scope">
  72. <el-button type="text" @click="onTap(scope.row)">查看趋势</el-button>
  73. </template>
  74. </el-table-column>
  75. </el-table>
  76. </div>
  77. </div>
  78. <el-dialog title="提示" :visible.sync="dialogVisible" modal-append-to-body :modal="false" :lock-scroll="true"
  79. width="80%">
  80. <div class="" style="width: 100%">
  81. <LabsLine :data="chartData" />
  82. </div>
  83. </el-dialog>
  84. </div>
  85. </template>
  86. <script>
  87. import { queryLabsItemByStandardCode } from '@/api/labs'
  88. import LabsLine from '@/components/medical/labs/line'
  89. export default {
  90. name: 'LabsReports',
  91. components: { LabsLine },
  92. props: {
  93. data: {
  94. required: true,
  95. type: Object
  96. },
  97. patientId: {
  98. required: true,
  99. type: String
  100. }
  101. },
  102. data() {
  103. return {
  104. dialogVisible: false,
  105. tableData: [],
  106. chartData: []
  107. }
  108. },
  109. watch: {
  110. data: {
  111. deep: true,
  112. handler: function handler() {
  113. //this.getSize();
  114. },
  115. },
  116. },
  117. computed: {},
  118. methods: {
  119. onTap(item) {
  120. const params = {
  121. projectIdStandard: item.projectIdStandard,
  122. endDate: '',
  123. startDate: '',
  124. patientId: this.patientId
  125. }
  126. queryLabsItemByStandardCode(params).then((res) => {
  127. if (res.code === 0 && res.data) {
  128. this.dialogVisible = true
  129. const arr = [res.data]
  130. // console.log(JSON.stringify(arr));
  131. this.chartData = arr
  132. } else {
  133. this.chartData = []
  134. }
  135. })
  136. // console.log(item);
  137. }
  138. }
  139. }
  140. </script>
  141. <style scoped>
  142. .labs-bodyer {
  143. padding-top: 20px;
  144. }
  145. </style>