yuwandanmian 1 年之前
父节点
当前提交
ff12ff9afb
共有 2 个文件被更改,包括 13 次插入7 次删除
  1. 1 1
      src/router/index.js
  2. 12 6
      src/views/search/index.vue

+ 1 - 1
src/router/index.js

@@ -80,7 +80,7 @@ export const constantRoutes = [
       },
       },
       {
       {
         path: '/search',
         path: '/search',
-        name: 'homePage',
+        name: 'Search',
         component: () => import('@/views/search/index'),
         component: () => import('@/views/search/index'),
         hidden: true,//不在导航栏展示
         hidden: true,//不在导航栏展示
         meta: { title: '住院病历查询', keepAlive: 1},
         meta: { title: '住院病历查询', keepAlive: 1},

+ 12 - 6
src/views/search/index.vue

@@ -165,7 +165,7 @@
         <el-button class="btn2" @click="searchBtn(1)">检索</el-button>
         <el-button class="btn2" @click="searchBtn(1)">检索</el-button>
       </div>
       </div>
       <!-- 专业检索 -->
       <!-- 专业检索 -->
-      <ProfessionSearchVue v-if="choice == 2" @search="handleProfessionSearch" @export="handelExport" @reset="handleReset" />
+      <ProfessionSearchVue v-if="choice == 2" @search="handleProfessionSearchFn" @export="handelExport" @reset="handleReset" />
     </div>
     </div>
     <div class="tableBox">
     <div class="tableBox">
       <div class="flextab" style="margin: 0; margin-bottom: 30px; display: block">
       <div class="flextab" style="margin: 0; margin-bottom: 30px; display: block">
@@ -638,6 +638,7 @@ export default {
       this.multipleSelection = val;
       this.multipleSelection = val;
     },
     },
     SizeChangeEvent(val) {
     SizeChangeEvent(val) {
+      console.log(this.choice, 'this.choice', val)
       this.paginationData.pageSize = val;
       this.paginationData.pageSize = val;
       const num = this.lock ? 1 : 0;
       const num = this.lock ? 1 : 0;
       if (this.choice == 2) {
       if (this.choice == 2) {
@@ -646,7 +647,8 @@ export default {
         this.funQuery(num);
         this.funQuery(num);
       }
       }
     },
     },
-    pageHasChanged() {
+    pageHasChanged(val) {
+      this.paginationData.currentPage = val
       const num = this.lock ? 1 : 0;
       const num = this.lock ? 1 : 0;
       if (this.choice == 2) {
       if (this.choice == 2) {
         this.handleProfessionSearch(this.professionSearchData)
         this.handleProfessionSearch(this.professionSearchData)
@@ -770,10 +772,14 @@ export default {
       }
       }
     },
     },
     // 专业检索
     // 专业检索
-    handleProfessionSearch(params) {
+    handleProfessionSearchFn(params) {
       this.paginationData.currentPage = 1
       this.paginationData.currentPage = 1
+      this.handleProfessionSearch(params)
+    },
+    handleProfessionSearch(params) {
       this.professionSearchData = params
       this.professionSearchData = params
-      this.$axios3.post('/bl/serach', params).then(res => {
+      const { pageSize, currentPage } = this.paginationData
+      this.$axios3.post('/bl/serach', {...params, page_size: pageSize, page: currentPage }).then(res => {
         this.tableData = res.data.list || [];
         this.tableData = res.data.list || [];
         this.tableDataDetails = res.data.detail || [];
         this.tableDataDetails = res.data.detail || [];
         this.paginationData.total = res.data.total;
         this.paginationData.total = res.data.total;
@@ -817,14 +823,14 @@ export default {
     },
     },
     // 重置
     // 重置
     handleReset() {
     handleReset() {
+      this.paginationData.currentPage = 1
       this.handleProfessionSearch({})
       this.handleProfessionSearch({})
     },
     },
     // 检索类型变化
     // 检索类型变化
     handleRadioChange(val) {
     handleRadioChange(val) {
       if (val == 2) {
       if (val == 2) {
+      this.paginationData.currentPage = 1
         this.handleProfessionSearch({})
         this.handleProfessionSearch({})
-      } else {
-        // this.professionSearchData = {}
       }
       }
     }
     }
   },
   },