yuwandanmian 2 жил өмнө
parent
commit
0ce38f8a92

+ 15 - 0
src/router/index.js

@@ -242,6 +242,21 @@ export const constantRoutes = [
       },
     ]
   },
+
+  {
+    path: '/embedIndex',
+    component: AppMain,
+    redirect: '/embedIndex-home',
+    children: [
+      {
+        path: '/embedIndex-home',
+        name: 'EmbedIndexHome',
+        component: () => import('@/views/embedIndex/index'),
+        meta: { keepAlive:true },
+        hidden: true
+      }
+    ]
+  },
 ];
 
 const createRouter = () =>

+ 7 - 5
src/views/allcase/caseIndex.vue

@@ -3,7 +3,7 @@
     <el-row :gutter="16">
       <!-- 左侧菜单 -->
       <el-col :span="8">
-        <div class="box_wrapper">
+        <div class="box_wrapper" :style="{'height': boxWrapperHeight}">
           <el-input placeholder="输入关键字进行过滤" v-model="filterText"></el-input>
           <el-tree
             class="filter-tree"
@@ -23,7 +23,7 @@
       </el-col>
       <!-- 右侧列表 -->
       <el-col :span="16">
-        <div class="box_wrapper">
+        <div class="box_wrapper" :style="{'height': boxWrapperHeight}">
           <el-form :inline="true" :model="formInline" class="demo-form-inline">
             <el-form-item label="查询时间">
               <el-date-picker
@@ -572,8 +572,10 @@ export default {
       return this.$route.query.type === 'children' ? this.cMenus : this.menus
     },
     judgeEdit() {
-      console.log(this.greenColorMenus.includes(this.ruleId))
       return this.greenColorMenus.includes(this.ruleId) && !!this.tableData.length
+    },
+    boxWrapperHeight() {
+      return this.$route.path === '/embedIndex-home' ? '815px' : '885px'
     }
   },
   watch: {
@@ -706,9 +708,9 @@ export default {
   .box_wrapper {
     padding: 16px;
     background: #fff;
-    height: calc(100vh - 82px);
     border-radius: 5px;
-    overflow-y: scroll;
+    overflow-x: hidden;
+    overflow-y: auto;
   }
 }
 .filter-tree {

+ 10 - 5
src/views/allcase/caseIndexAnalysis.vue

@@ -3,7 +3,7 @@
     <el-row :gutter="16">
       <!-- 左侧菜单 -->
       <el-col :span="8">
-        <div class="box_wrapper">
+        <div class="box_wrapper" :style="{'height': boxWrapperHeight}">
           <el-input placeholder="输入关键字进行过滤" v-model="filterText"></el-input>
           <el-tree
             class="filter-tree"
@@ -23,7 +23,7 @@
       </el-col>
       <!-- 右侧列表 -->
       <el-col :span="16">
-        <div class="box_wrapper">
+        <div class="box_wrapper" :style="{'height': boxWrapperHeight}">
           <el-form :inline="true" :model="formInline" class="demo-form-inline">
             <el-form-item label="">
               <el-date-picker v-model="formInline.start_time" type="date" :picker-options="pickerOptions1" placeholder="开始日期"></el-date-picker>
@@ -252,6 +252,11 @@ export default {
       rankData: [],
     };
   },
+  computed: {
+    boxWrapperHeight() {
+      return this.$route.path === '/embedIndex-home' ? '815px' : '885px'
+    }
+  },
   methods: {
     // 菜单筛选
     filterNode(value, data) {
@@ -274,7 +279,7 @@ export default {
         this.getList();
         this.getRankList();
       } else {
-        this.$message.error('请完善指标和出院时间!');
+        this.$message.error('请选择指标!');
       }
     },
     // 获取科室排名
@@ -423,9 +428,9 @@ export default {
   .box_wrapper {
     padding: 16px;
     background: #fff;
-    height: calc(100vh - 82px);
     border-radius: 5px;
-    overflow-y: scroll;
+    overflow-x: hidden;
+    overflow-y: auto;
   }
 }
 .filter-tree {

+ 70 - 0
src/views/embedIndex/index.vue

@@ -0,0 +1,70 @@
+<template>
+  <div class="box">
+    <div class="box_wrapper">
+      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+        <el-tab-pane label="指标分析" name="0">
+          <CaseIndexAnalysis />
+        </el-tab-pane>
+        <el-tab-pane label="病案指标" name="1">
+          <CaseIndex />
+        </el-tab-pane>
+      </el-tabs>
+      <el-button class="layout-btn" @click="onLayout">
+        退出
+      </el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { setToken } from '@/utils/auth';
+import CaseIndexAnalysis from '@/views/allcase/caseIndexAnalysis.vue'
+import CaseIndex from '@/views/allcase/caseIndex.vue'
+
+export default {
+  components: {
+    CaseIndexAnalysis,
+    CaseIndex
+  },
+  data() {
+    return {
+      activeName: '0',
+    };
+  },
+  methods: {
+    handleClick(tab, event) {
+      console.log(tab.name);
+      this.activeName = tab.name
+    },
+    onLayout() {
+      setToken('');
+      sessionStorage.removeItem("route")
+      this.$router.push(`/login`);
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-tabs__nav-scroll{
+	width: 320px;
+	margin:0 auto
+}
+.box {
+  user-select: none;
+  padding: 16px;
+  .box_wrapper {
+    padding: 16px;
+    padding: 16px;
+    background: #fff;
+    border-radius: 5px;
+    position: relative;
+  }
+  .layout-btn {
+    position: absolute;
+    --size: 16px;
+    top: var(--size);
+    right: var(--size);
+  }
+}
+</style>

+ 10 - 3
src/views/login/index.vue

@@ -108,19 +108,26 @@ export default {
                 const routes = JSON.parse(sessionStorage.getItem('route'))
                 let bSwitch = 0
                 for(let i=0; i<routes.length; i++) {
-                  if(routes[i].path === '/hospital') {
+                  if(routes[i].path === '/embedIndex') {
+                    bSwitch = 2
+                    break
+                  } else if(routes[i].path === '/hospital') {
                     bSwitch = 1
                     break
                   } else {
                     bSwitch = 0
+                    break
                   }
                 }
-                if (bSwitch) {
+                if (bSwitch === 1) {
                   this.$router.push({ path: '/hospital'});
+                } else if (bSwitch === 2) {
+                  this.$router.push({ path: '/embedIndex' });
                 } else {
                   this.$router.push(this.redirect || '/');
                 }
-              }).catch(() => {
+              }).catch((e) => {
+                console.log(e)
                 this.$message.error('获取导航菜单失败!');
               })
             }).catch(() => {