Home.vue 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <el-container>
  3. <el-container>
  4. <el-aside style="width:auto !important;">
  5. <Overview v-show="xianShiLieBiao" :showSelection="false"/>
  6. </el-aside>
  7. <el-main>
  8. <huan-zhe-xin-xi v-show="basicPatientInformation"></huan-zhe-xin-xi>
  9. <el-row v-show="xianShiLieBiao" class="tabs">
  10. <template v-for="item in pathList">
  11. <el-col :span="3" :style="currentPagePosition(item.path)" class="tab-item" @click="handleClick(item.path)">
  12. <span> {{ item.title }}</span>
  13. </el-col>
  14. </template>
  15. </el-row>
  16. <router-view v-slot="{ Component }">
  17. <keep-alive>
  18. <component :is="Component"/>
  19. </keep-alive>
  20. </router-view>
  21. </el-main>
  22. </el-container>
  23. </el-container>
  24. </template>
  25. <script name="Home" setup>
  26. import store from '@/store'
  27. import {computed, ref, watch} from "vue";
  28. import HuanZheXinXi from "@/components/zhu-yuan-yi-sheng/HuanZheXinXi.vue";
  29. import router from "@/router";
  30. import Overview from '@/components/medical-insurance/patient-overview/Index.vue'
  31. const tableHeight = computed(() => {
  32. return store.state.app.windowSize.h
  33. })
  34. const xianShiLieBiao = ref(true)
  35. const basicPatientInformation = ref(true)
  36. watch(() => router.currentRoute.value.path, () => {
  37. xianShiLieBiao.value = !router.currentRoute.value.meta.blankPage;
  38. basicPatientInformation.value = router.currentRoute.value.path !== '/inpatient/zhuYuanYiSheng/electronicMedicalRecord'
  39. })
  40. const handleClick = (path) => {
  41. store.commit('app/setYzPath', path)
  42. router.push(path)
  43. }
  44. let pathList = $ref([
  45. {path: '/inpatient/zhuYuanYiSheng/yiZhuLuRu', title: '医嘱录入'},
  46. {path: '/inpatient/zhuYuanYiSheng/huiZhenShenQing', title: '会诊申请'},
  47. {path: '/inpatient/zhuYuanYiSheng/jianChaShenQing', title: '检查申请'},
  48. {path: '/inpatient/zhuYuanYiSheng/jianYanShenQing', title: '检验申请'},
  49. {path: '/inpatient/zhuYuanYiSheng/shouShuShenQing', title: '查看手术'},
  50. {path: '/inpatient/zhuYuanYiSheng/caoYaoYiZhu', title: '查看草药医嘱'},
  51. ])
  52. onActivated(() => {
  53. router.push(store.state.app.yiZhuLuRu.path)
  54. basicPatientInformation.value = router.currentRoute.value.path !== '/inpatient/zhuYuanYiSheng/electronicMedicalRecord'
  55. })
  56. const currentPagePosition = (val) => {
  57. if (router.currentRoute.value.path === val) {
  58. return {
  59. backgroundColor: 'white',
  60. color: '#0a84fd'
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. :deep(el-tabs el-tabs--top demo-tabs) {
  67. background-color: white;
  68. }
  69. .tabs {
  70. background-color: #e5e7eb;
  71. border-radius: 4px;
  72. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  73. margin: 3px;
  74. }
  75. .tab-item {
  76. line-height: 30px;
  77. text-align: center;
  78. &:hover span {
  79. color: #0a84fd;
  80. cursor: pointer;
  81. }
  82. }
  83. </style>