Home.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <emr-dual-screen v-if="isOpenDualScreen"/>
  3. <emr-control-rule/>
  4. <div style="color:#000;">
  5. <div class="yz__header">
  6. <huan-zhe-xin-xi
  7. :huan-zhe-xin-xi="patientInfo"/>
  8. </div>
  9. <div class="yz__main" style="overflow: auto">
  10. <div style="width: 158px" v-show="!isOpenDualScreen">
  11. <patient-list/>
  12. </div>
  13. <div ref="mainRef" class="resident_doctor__main"
  14. :style="{width: isOpenDualScreen ? '50%' : '100%'}">
  15. <div class="tag">
  16. <div v-for="(item,index) in pathList"
  17. :style="currentPagePosition(item.path)"
  18. @click="item.func? item.func(index) : handleClick(item.path,item.disable)">
  19. <span>
  20. {{ item.title }}
  21. </span>
  22. </div>
  23. <div @click="downloadGuide" style="background-color: red;color: white">
  24. <span>操作指南 {{ fileName }}</span>
  25. </div>
  26. </div>
  27. <router-view v-slot="{ Component }">
  28. <keep-alive>
  29. <component :is="Component"/>
  30. </keep-alive>
  31. </router-view>
  32. </div>
  33. </div>
  34. </div>
  35. </template>
  36. <script name="Home" setup>
  37. import store from '@/store'
  38. import {computed, ref} from "vue";
  39. import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
  40. import router from "@/router";
  41. import {
  42. dualScreenSrc,
  43. huanZheXinXi as patientInfo,
  44. isOpenDualScreen,
  45. jcTree,
  46. jyTree,
  47. winsize,
  48. youWuXuanZheHuanZhe
  49. } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
  50. import PatientList from "@/components/zhu-yuan-yi-sheng/public/PatientList";
  51. import {getDrgIntelligentGrouping} from "@/api/zhu-yuan-yi-sheng/emr-patient";
  52. import {getJyJcZdTree} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
  53. import {ElMessageBox} from "element-plus";
  54. import {getOperationGuide} from "@/api/public-api";
  55. import {xcMessage} from "@/utils/xiaochan-element-plus";
  56. import {isDev} from "@/utils/public";
  57. import EmrDualScreen from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/EmrDualScreen.vue";
  58. import {getEmrUrl} from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
  59. import EmrControlRule from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/emrControlRule.vue";
  60. const windowSize = computed(() => {
  61. return store.state.app.windowSize
  62. })
  63. const width = store.state.app.windowSize.w - 158 + 'px'
  64. let fileName = $ref('v1.1.0')
  65. const handleClick = (path, disable) => {
  66. if (disable && !isDev) {
  67. xcMessage.info('该功能在开发中。。。')
  68. } else {
  69. router.push(path);
  70. }
  71. }
  72. let pathList = $ref([
  73. {path: '/inpatient/zhuYuanYiSheng/yiZhuLuRu', title: '医嘱录入'},
  74. {path: '/inpatient/zhuYuanYiSheng/yiZhuLuRu?pattern=takeMedicine', title: '出院带药'},
  75. {path: '/inpatient/zhuYuanYiSheng/huiZhenShenQing', title: '会诊申请'},
  76. {path: '/inpatient/zhuYuanYiSheng/jianChaShenQing', title: '检查申请'},
  77. {path: '/inpatient/zhuYuanYiSheng/jianYanShenQing', title: '检验申请'},
  78. {path: '/inpatient/zhuYuanYiSheng/shouShuShenQing', title: '查看手术'},
  79. {path: '/inpatient/zhuYuanYiSheng/caoYaoYiZhu', title: '查看草药医嘱'},
  80. {
  81. path: 'dualScreen',
  82. title: '双屏模式', func: () => {
  83. if (youWuXuanZheHuanZhe()) return
  84. isOpenDualScreen.value = !isOpenDualScreen.value
  85. dualScreenSrc.value = getEmrUrl(patientInfo.value.inpatientNo, patientInfo.value.admissTimes, 1)
  86. }
  87. },
  88. {
  89. title: '电子病历', func: () => {
  90. if (patientInfo.value.inpatientNo) {
  91. let query = {
  92. patNo: patientInfo.value.inpatientNo,
  93. times: patientInfo.value.admissTimes,
  94. state: 1
  95. };
  96. let te = JSON.stringify(query)
  97. window.open(window.location.origin + '/myEmrEditor/' + window.btoa(te), '_blank');
  98. } else {
  99. window.open(window.location.origin + '/myEmrEditor/', '_blank');
  100. }
  101. }
  102. },
  103. {
  104. title: 'DRG 预分组', func: () => {
  105. if (youWuXuanZheHuanZhe()) return
  106. getDrgIntelligentGrouping(patientInfo.value.inpatientNo, patientInfo.value.admissTimes).then((res) => {
  107. window.open(res)
  108. })
  109. }
  110. },
  111. {
  112. title: '病历模板', func: () => {
  113. window.open('http://webhis.thyy.cn:9281/', '_blank')
  114. },
  115. disable: true
  116. }
  117. ])
  118. const currentPagePosition = (val) => {
  119. if (router.currentRoute.value.href === val) {
  120. return {
  121. backgroundColor: '#0a84fd',
  122. color: '#fff'
  123. }
  124. }
  125. if (val === 'download') {
  126. return {
  127. backgroundColor: 'red',
  128. color: '#fff'
  129. }
  130. }
  131. if (val === 'dualScreen') {
  132. return {
  133. backgroundColor: '#E6A23C',
  134. color: '#fff'
  135. }
  136. }
  137. }
  138. // 点击下载操作指南,先查询一遍最新的。
  139. const downloadGuide = () => {
  140. getOperationGuide("住院医生教程").then((res) => {
  141. fileName = res
  142. ElMessageBox.confirm('请选择线上预览版本还是下载操作指南', '提示', {
  143. cancelButtonText: '下载',
  144. confirmButtonText: '线上预览',
  145. distinguishCancelAndClose: true
  146. }).then(() => {
  147. window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生教程/住院医生操作指南 ${fileName}.pdf`, '_blank')
  148. }).catch((e) => {
  149. if (e === 'cancel') {
  150. window.open(`http://webhis.thyy.cn:8080/download/操作指南/住院医生教程/住院医生操作指南 ${fileName}.docx`, '_blank')
  151. }
  152. })
  153. })
  154. }
  155. const mainRef = ref()
  156. onMounted(async () => {
  157. getOperationGuide("住院医生教程").then((res) => {
  158. fileName = res
  159. })
  160. await nextTick()
  161. winsize.value.main = mainRef.value.clientWidth
  162. getJyJcZdTree().then((res) => {
  163. jyTree.value = res.jy
  164. jcTree.value = res.jc
  165. })
  166. })
  167. </script>
  168. <style lang="scss" scoped>
  169. .yz__header {
  170. position: relative;
  171. .yz__close {
  172. position: absolute;
  173. right: 0;
  174. border: 1px solid;
  175. }
  176. }
  177. .yz__main {
  178. display: flex;
  179. .tag {
  180. display: flex;
  181. width: 100%;
  182. div {
  183. padding: 5px;
  184. border: 1px solid;
  185. cursor: pointer;
  186. }
  187. .download {
  188. }
  189. }
  190. }
  191. :deep(el-tabs el-tabs--top demo-tabs) {
  192. background-color: white;
  193. }
  194. .tabs {
  195. background-color: #e5e7eb;
  196. border-radius: 4px;
  197. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  198. margin: 3px;
  199. }
  200. .tab-item {
  201. line-height: 30px;
  202. text-align: center;
  203. &:hover span {
  204. color: #0a84fd;
  205. cursor: pointer;
  206. }
  207. }
  208. .main {
  209. overflow: auto;
  210. }
  211. .resident_doctor__main {
  212. width: 100%;
  213. overflow: auto;
  214. position: relative;
  215. .doctor_main__setup {
  216. cursor: pointer;
  217. position: absolute;
  218. right: 4px;
  219. border: 1px solid;
  220. padding: 5px;
  221. top: 3px;
  222. border-radius: 4px;
  223. background-color: #0a84fd;
  224. color: white;
  225. }
  226. }
  227. </style>