Przeglądaj źródła

fetchData params search

changjiaming 5 miesięcy temu
rodzic
commit
e9e81cd7f9

+ 7 - 4
src/views/creditManage/resolutionManage/index.vue

@@ -18,7 +18,7 @@
                 <el-input v-model="search.fastSearch" style="width: 350px" placeholder="请输入项目名称/主企业名称/核心企业名称/业务编号" clearable />
               </div>
               <div class="leftBtn">
-                <el-button type="primary" @click="page = 1, fetchData()">查询</el-button>
+                <el-button type="primary" @click="fetchData('search')">查询</el-button>
               </div>
             </template>
           </div>
@@ -67,7 +67,7 @@ export default {
     }
   },
   mounted() {
-    this.fetchData()
+    this.fetchData('search')
     this.getStatusList()
   },
   methods: {
@@ -80,7 +80,10 @@ export default {
         this.statusList = data || []
       })
     },
-    fetchData() {
+    fetchData(type) {
+      if(type == 'search') {
+        this.page = 1
+      }
       request({
         url: this.activeName == 'all' ? '/creditResolution/allList' : '/businessProcessingTask/doMyPendingList',
         data: {
@@ -100,7 +103,7 @@ export default {
       this.search.status = ''
       this.activeName = tab.name
       this.page = 1
-      this.fetchData()
+      this.fetchData('search')
     },
     handlerOperate(type, row) {
       if (type === 'see') {

+ 7 - 4
src/views/purchaseContractManagement/index.vue

@@ -33,7 +33,7 @@
                   <el-input v-model="search.fastSearch" style="width: 300px" placeholder="请输入项目名称/主企业名称/核心企业名称" clearable></el-input>
                 </div>
                 <div class="leftBtn">
-                  <el-button type="primary" @click="fetchData">查询</el-button>
+                  <el-button type="primary" @click="fetchData('search')">查询</el-button>
                 </div>
               </template>
             </div>
@@ -88,11 +88,14 @@ export default {
     ])
   },
   mounted() {
-    this.fetchData()
+    this.fetchData('search')
     this.getStatusList()
   },
   methods: {
-    fetchData() {
+    fetchData(type) {
+      if(type == 'search') {
+        this.page = 1
+      }
       request({
         url: '/businessProcessingTask/doDifferenceList',
         params: {
@@ -194,7 +197,7 @@ export default {
       this.search.status = ''
       this.search.fastsearch = ''
       this.page = 1
-      this.fetchData()
+      this.fetchData('search')
     },
     timeAxisClick(row) {
       this.timeAxisParams.businessKey = row.id

+ 7 - 4
src/views/settlementManagement/index.vue

@@ -33,7 +33,7 @@
                   <el-input v-model="search.fastSearch" style="width: 300px" placeholder="请输入项目名称/主企业名称/核心企业名称" clearable></el-input>
                 </div>
                 <div class="leftBtn">
-                  <el-button type="primary" @click="fetchData">查询</el-button>
+                  <el-button type="primary" @click="fetchData('search')">查询</el-button>
                 </div>
               </template>
             </div>
@@ -89,11 +89,14 @@ export default {
     ])
   },
   mounted() {
-    this.fetchData()
+    this.fetchData('search')
     this.getStatusList()
   },
   methods: {
-    fetchData() {
+    fetchData(type) {
+      if(type == 'search') {
+        this.page = 1
+      }
       request({
         url: this.activeName == 'pending' ? '/businessProcessingTask/doMyPendingList' : '/businessProcessingTask/doList',
         method: this.activeName == 'pending' ? 'post' : 'get',
@@ -183,7 +186,7 @@ export default {
     handleTabClick(tab) {
       this.activeName = tab.name
       this.page = 1
-      this.fetchData()
+      this.fetchData('search')
     },
     timeAxisClick(row) {
       this.timeAxisParams.businessKey = row.id