From 2caf6c0b519300a24788b7cd8d57fb0c1f0b1a0e Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 14 五月 2024 18:03:18 +0800
Subject: [PATCH] 优化

---
 src/components/view/a6-device-overview.vue |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/components/view/a6-device-overview.vue b/src/components/view/a6-device-overview.vue
index 196ea2e..1e8995e 100644
--- a/src/components/view/a6-device-overview.vue
+++ b/src/components/view/a6-device-overview.vue
@@ -148,11 +148,11 @@
 			</div>
 			<div class="search_thing" style="padding-left: 30px;">
 				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
-				<el-button size="small" type="primary" @click="currentPage= 1,list=[],finishLoding = false,refreshTable()">鏌� 璇�</el-button>
+				<el-button size="small" type="primary" @click="currentPage= 1,keyMap = {},list=[],finishLoding = false,refreshTable()">鏌� 璇�</el-button>
 			</div>
 		</div>
 		<div class="table" v-loading="loading">
-      <scroll-pagination @load="refreshTable" :finishLoding="finishLoding">
+      <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list">
         <ul class="card">
         <li v-for="(m,i) in list" :key="i">
           <el-image class="img" :src="javaApi+'/img/'+m.imageUpload">
@@ -218,17 +218,27 @@
         pageSize: 16, // 涓�椤�16鏉�
         total: '',
         loading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
-        finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+        finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+        keyMap: {}
 			}
 		},
     created() {
       this.selectEnumByCategory()
+      this.keyMap = {};
       this.currentPage = 1;
       this.list = [];
       this.refreshTable();
     },
 		methods: {
 			refreshTable() {
+        const key = `_${this.currentPage}`
+        const value = this.keyMap[key]
+        // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+        if(value) {
+          return
+        }
+        // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+        this.keyMap[key] = 'temp'
         if(this.currentPage==1){
           this.loading = true
         }
@@ -284,6 +294,7 @@
 				})
 			},
 			refresh() {
+        this.keyMap = {};
         this.currentPage= 1;
         this.list=[];
         this.finishLoding = false;

--
Gitblit v1.9.3