Эх сурвалжийг харах

Merge branch 'master' of http://182.44.34.170:8081/jiankun/q-baqd

zdl 1 жил өмнө
parent
commit
a83dac22c7

+ 3 - 5
src/layout/components/AppMain.vue

@@ -45,13 +45,11 @@ export default {
       });
     },
     t_title(e){
-      
-      this.isRouterAlive = false;
+      this.t_name = e;
       this.$nextTick(function () {
-        this.isRouterAlive = true;
-        this.t_name = e;
-       console.log(this.t_name)
+        this.t_name = '';
       });
+      console.log(this.t_name)
     }
 
   },

+ 16 - 13
src/layout/components/Breadcrumb.vue

@@ -54,12 +54,20 @@ export default {
     //当路由变更时,执行打开页面的方法
     $route: {
       handler(v) {
-        this.openPage(v);
+        let new_route = {};
+        for(let key in v){
+          new_route[key] = v[key];
+        }
+        new_route.t_name = this.t_name;
+
+        this.openPage(new_route);
       },
       immediate: true,
     },
+    
   },
   mounted() {
+    this.t_name = this.t_name;
     //添加点击关闭右键菜单
     window.addEventListener("click", this.closeContextMenu);
   },
@@ -85,33 +93,28 @@ export default {
     //打开页面
     openPage(route) {
       this.contextMenuTargetPageRoute = route;
-      let new_route = {};
-      for(let key in route){
-        new_route[key] = route[key];
-      }
-      new_route.t_name = this.t_name;
-      console.log(new_route)
-      if (new_route.name == this.blankRouteName) {
+      if (route.name == this.blankRouteName) {
         return;
       }
       let isExist = this.openedPageRouters.some(
-        (item) => item.fullPath == new_route.fullPath
+        (item) => item.fullPath == route.fullPath
       );
       if (!isExist) {
         let openedPageRoute = this.openedPageRouters.find(
-          (item) => item.path == new_route.path
+          (item) => item.path == route.path
         );
         //判断页面是否支持不同参数多开页面功能,如果不支持且已存在path值一样的页面路由,那就替换它
-        if (!new_route.meta.canMultipleOpen && openedPageRoute != null) {
+        if (!route.meta.canMultipleOpen && openedPageRoute != null) {
           this.delRouteCache(openedPageRoute.fullPath);
           this.openedPageRouters.splice(
             this.openedPageRouters.indexOf(openedPageRoute),
             1,
-            new_route
+            route
           );
         } else {
-          this.openedPageRouters.push(new_route);
+          this.openedPageRouters.push(route);
         }
+        console.log(route)
         this.bottomScrollClick();
       }
     },

+ 3 - 3
src/views/outpatient/case/index.vue

@@ -120,7 +120,7 @@
             </el-table-column>
             <el-table-column prop="" label="门诊号">
               <template slot-scope="scope">
-                <span class="blue" @click="funGoto(scope.row.BLBH)">
+                <span class="blue" @click="funGoto(scope.row.BLBH,scope.row.xm)">
                   {{ scope.row.mzh }}
                 </span>
               </template>
@@ -239,7 +239,7 @@ import { dateFormat } from '@/utils/index'
       this.getList(0)
     },
     methods: {
-      funGoto(blbh) {
+      funGoto(blbh,xm) {
       const { path } = this.$route;
       let toPath;
       if (path === '/whitelist-search') {
@@ -247,7 +247,7 @@ import { dateFormat } from '@/utils/index'
       } else {
         toPath = '/outpatientMedicalRecordDetail';
       }
-      this.$router.push({ path: toPath, query: { blbh, from: 'search' } })
+      this.$router.push({ path: toPath, query: { blbh,xm, from: 'search' } })
       },
       selectInfo() {
         this.$axios.post('/get_omr_department_list').then(res => {

+ 1 - 2
src/views/outpatient/control/detail.vue

@@ -104,6 +104,7 @@ export default {
   },
   created() {
     this.getDetails()
+    this.t_title(this.$route.query.xm);
     if (!this.$route.query.from) {
       this.getCaseQualityResults();
     }
@@ -128,8 +129,6 @@ export default {
     getDetails() {
       this.$axios.post('/omr_zk/omr_info', { blbh: this.$route.query.blbh }).then(res => {
         this.data = res.data;
-        this.t_title(res.data.xm);
-
       });
     }
   }