y595705120 3 gadi atpakaļ
vecāks
revīzija
1d9906ad4d
2 mainītis faili ar 11 papildinājumiem un 5 dzēšanām
  1. 9 3
      src/pages/other/file-search.vue
  2. 2 2
      vue.config.js

+ 9 - 3
src/pages/other/file-search.vue

@@ -32,7 +32,7 @@
 
 
               <el-form-item>
-                <el-button @click="getArticalList" type="primary">搜索</el-button>
+                <el-button @click="handleSearch" type="primary">搜索</el-button>
               </el-form-item>
             </el-form>
           </div>
@@ -134,6 +134,7 @@ export default {
       })
     },
     "searchInfo.category"(val){
+      this.page = 1
       this.getArticalList()
     }
   },
@@ -153,12 +154,17 @@ export default {
       this.pageSize = size
       this.getArticalList()
     },
+    handleSearch(){
+      this.page = 1
+      this.getArticalList()
+    },
     handleCurrentChange(page){
       this.page = page
       this.getArticalList()
     },
     selectDepartment(item){
-      this.departmentId = +item.departmentId
+      this.departmentId = +item.departmentId||0
+      this.page =1
       localStorage.setItem("@departmentId", this.departmentId)
       this.getArticalList()
     },
@@ -168,7 +174,7 @@ export default {
     },
     getArticalList(){
       let param = {
-        departmentId:+this.departmentId,
+        departmentId:+this.departmentId||0,
         keyword: this.searchInfo.keyword,
         category: this.searchInfo.category,
         page: this.page,

+ 2 - 2
vue.config.js

@@ -1,8 +1,8 @@
 'use strict'
 const path = require('path')
 const defaultSettings = require('./src/settings.js')
-// const HOST = "http://smoa.ndjsxh.cn:8888"
-const HOST = "http://localhost:8000"
+const HOST = "http://smoa.ndjsxh.cn:8888"
+// const HOST = "http://localhost:8000"
 function resolve(dir) {
   return path.join(__dirname, dir)
 }