浏览代码

病案指标 keepalive 问题

yuwandanmian 2 年之前
父节点
当前提交
c413649b8c
共有 2 个文件被更改,包括 19 次插入3 次删除
  1. 11 1
      src/views/allcase/caseIndex.vue
  2. 8 2
      src/views/allcase/caseIndexList.vue

+ 11 - 1
src/views/allcase/caseIndex.vue

@@ -490,7 +490,17 @@ export default {
   watch: {
     filterText(val) {
       this.$refs.tree.filter(val);
-    }
+    },
+    // $route(to, from) {
+    //   console.log(to.path, from.path)
+    //   if (from.path !== '/caseIndexList') {
+    //     console.log(1111)
+    //     this.$router.go(0)
+    //     console.log(1111)
+    //   } else {
+    //     console.log(2222)
+    //   }
+    // }
   },
   methods: {
     // 病案指标列表跳转

+ 8 - 2
src/views/allcase/caseIndexList.vue

@@ -37,7 +37,11 @@
       </div>
       <!-- 列表 -->
       <el-table :data="tableData" style="width: 100%">
-        <el-table-column type="index" label="序号" align="center" width="80"></el-table-column>
+        <el-table-column type="index" label="序号" align="center" width="80">
+          <template slot-scope="scope">
+            <span>{{ scope.$index + 1 +  (paginationData.currentPage - 1) * paginationData.pageSize }}</span>
+          </template>
+        </el-table-column>
         <el-table-column prop="" label="住院号" width="120">
           <template slot-scope="scope">
             <span class="link" @click="toPage(scope.row)">{{ scope.row.AAA28 }}</span>
@@ -106,7 +110,9 @@ export default {
     $route(to, from) {
       if (from.path === '/caseIndex' && to.path === '/caseIndexList') {
         this.tableData = []
-        this.$router.go(0)
+        this.paginationData.currentPage = 1
+        this.paginationData.pageSize = 10
+        this.getList()
       }
     }
   },