HuiZhenShenQing.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <div style="display: flex">
  3. <div>
  4. <el-button icon="Search" type="primary" @click="chaKanHuiZhenShenQingClick">会诊查询</el-button>
  5. <el-button icon="Plus" type="success" @click="dianJiHuiZhenShenQing">会诊申请</el-button>
  6. <div style="width: 400px">
  7. <xc-table
  8. :final-height="getWindowSize.h - yzHeaderSize"
  9. :local-data="chaKanHuiZhenList"
  10. @rowClick="chaKanHuiZhenDan"
  11. layout='total, prev, next'>
  12. <el-table-column label="申请时间" prop="inputDate" width="70">
  13. <template #default="scope">
  14. {{ scope.row.inputDate + '_' + scope.row.reqTimes }}
  15. </template>
  16. </el-table-column>
  17. <el-table-column label="科室" prop="deptName"></el-table-column>
  18. <el-table-column label="接受日期" prop="hzDate" show-overflow-tooltip></el-table-column>
  19. <el-table-column label="接受医生" prop="hzDoctor2Name"></el-table-column>
  20. <el-table-column label="申请人" prop="inputName" width="60"></el-table-column>
  21. <el-table-column label="申请科室" prop="reqDeptName"></el-table-column>
  22. <el-table-column label="类别" prop="hzLevelName"></el-table-column>
  23. <el-table-column label="医生" prop="hzDoctor1Name"></el-table-column>
  24. <el-table-column label="级别" prop="hzType">
  25. <template #default="scope">
  26. <span>{{ hzTypeName(scope.row.hzType) }}</span>
  27. </template>
  28. </el-table-column>
  29. <el-table-column label="接受意见" prop="hzComment" show-overflow-tooltip></el-table-column>
  30. <el-table-column fixed="left" label="操作" width="50">
  31. <template #default="scope">
  32. <el-popconfirm
  33. cancel-button-text="取消"
  34. confirm-button-text="确定"
  35. icon="InfoFilled"
  36. icon-color="red"
  37. title="确定要删除吗?"
  38. @confirm="shanChuHuiZhenShenQingClick(scope.$index, scope.row)"
  39. >
  40. <template #reference>
  41. <el-button :disabled="scope.row.statusFlag === '2'"
  42. title="删除"
  43. circle
  44. @click.stop.prevent
  45. icon="Delete"
  46. type="danger"/>
  47. </template>
  48. </el-popconfirm>
  49. </template>
  50. </el-table-column>
  51. </xc-table>
  52. </div>
  53. </div>
  54. <div>
  55. <el-tabs type="border-card"
  56. closable
  57. v-model="tabs"
  58. @tab-remove="tabRemove">
  59. <el-tab-pane label="会诊详情"
  60. :name="0">
  61. <print-the-consultation-form ref="daYingHuiZhenRef" :lai-yuan="2"/>
  62. </el-tab-pane>
  63. <el-tab-pane :name="1"
  64. label="添加会诊申请"
  65. v-if="consultationApplication">
  66. <tian-jia-hui-zhen-shen-qing @successfulApplication="successfulApplication"/>
  67. </el-tab-pane>
  68. </el-tabs>
  69. </div>
  70. </div>
  71. </template>
  72. <script setup name="HuiZhenShenQing">
  73. import TianJiaHuiZhenShenQing from '@/components/zhu-yuan-yi-sheng/hui-zhen-shen-qing/TianJiaHuiZhenShenQing.vue'
  74. import {computed, onActivated, ref, watch} from 'vue'
  75. import {chaKanHuiZhenShenQing, shanChuHuiZhenShenQing} from '@/api/case-front-sheet'
  76. import {
  77. consultationApplication,
  78. huanZheXinXi,
  79. youWuXuanZheHuanZhe, yzHeaderSize
  80. } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
  81. import store from '@/store'
  82. import {getHuanZheXinXi} from '@/api/case-front-sheet/jie-shou-hui-zhen'
  83. import XcTable from "@/components/xiao-chan/xc-table/XcTable";
  84. import {BizException, ExceptionEnum} from "@/utils/BizException";
  85. import PrintTheConsultationForm from "@/components/hui-zhen-da-ying/PrintTheConsultationForm.vue";
  86. import {getWindowSize} from "@/utils/window-size";
  87. const windowSize = computed(() => {
  88. return store.state.app.windowSize
  89. })
  90. const chaKanHuiZhenList = ref([])
  91. const tabs = ref(0)
  92. const chaKanHuiZhenShenQingClick = () => {
  93. if (youWuXuanZheHuanZhe()) return
  94. chaKanHuiZhenShenQing(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes).then((res) => {
  95. chaKanHuiZhenList.value = res
  96. })
  97. }
  98. const shanChuHuiZhenShenQingClick = (index, val) => {
  99. shanChuHuiZhenShenQing(val.inpatientNo, val.admissTimes, val.actOrderNo, val.reqTimes).then((res) => {
  100. chaKanHuiZhenList.value.splice(index, 1)
  101. })
  102. }
  103. const daYingHuiZhenRef = ref(null)
  104. const chaKanHuiZhenDan = (val) => {
  105. getHuanZheXinXi(val.admissTimes, val.reqTimes, val.inpatientNo).then((res) => {
  106. setTimeout(() => {
  107. daYingHuiZhenRef.value.huiZhenXinXiXiangQing(res)
  108. }, 100)
  109. })
  110. }
  111. const successfulApplication = () => {
  112. chaKanHuiZhenShenQingClick()
  113. consultationApplication.value = false
  114. tabs.value = 0
  115. }
  116. /**
  117. * 添加会诊申请
  118. *
  119. */
  120. const dianJiHuiZhenShenQing = async () => {
  121. if (youWuXuanZheHuanZhe()) return
  122. if (consultationApplication.value) {
  123. BizException(ExceptionEnum.MESSAGE_ERROR, '请先保存正在编辑的会诊申请')
  124. }
  125. consultationApplication.value = true
  126. tabs.value = 1
  127. }
  128. // 移除标签
  129. const tabRemove = () => {
  130. consultationApplication.value = false
  131. tabs.value = 0
  132. }
  133. watch(
  134. () => huanZheXinXi.value,
  135. () => {
  136. chaKanHuiZhenShenQingClick()
  137. }
  138. )
  139. onActivated(() => {
  140. chaKanHuiZhenShenQingClick()
  141. })
  142. function hzTypeName(val) {
  143. switch (val) {
  144. case '1':
  145. return '主治医师'
  146. case '2':
  147. return '副主任医生'
  148. case '3':
  149. return '主任医生'
  150. }
  151. }
  152. </script>
  153. <style scoped lang="scss"></style>