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/b2-standard.vue           |   55 +++++++++-
 src/components/tool/scroll-paging.vue         |   21 +++-
 src/view/notice.vue                           |   18 +++
 src/components/tool/value-table.vue           |    6 +
 src/components/view/a6-device-overview.vue    |   17 ++
 src/components/view/b3-classes.vue            |   23 ++++
 src/components/view/a6-device-management.vue  |   86 ++++++++++++++---
 src/components/view/a6-personnel-overview.vue |   17 ++
 src/components/view/index-index.vue           |   16 ++
 9 files changed, 219 insertions(+), 40 deletions(-)

diff --git a/src/components/tool/scroll-paging.vue b/src/components/tool/scroll-paging.vue
index 41b2e10..367409d 100644
--- a/src/components/tool/scroll-paging.vue
+++ b/src/components/tool/scroll-paging.vue
@@ -2,14 +2,14 @@
   <div class="scroll-pagination"  ref="content" @scroll="onScroll">
     <slot></slot>
     <el-button
-        v-if="isLoding"
+        v-show="isLoding"
         type="text"
         style="display: flex; margin: 0 auto; color: #909399"
         ><i class="el-icon-loading" style="font-size:20px"></i
       ></el-button>
     <el-button
       type="text"
-      v-if="finishLoding"
+      v-show="finishLoding"
       style="display: flex; margin: 0 auto; color: #909399"
       >宸茬粡娌℃湁鏇村鍟</el-button
     >
@@ -23,6 +23,18 @@
     finishLoding: {
       type:Boolean,
       default:false
+    },
+    list:{
+      type:Array,
+      default:()=>[]
+    }
+  },
+  watch: {
+    list:{
+      deep:true,
+      handler(){
+        this.isLoding = false
+      }
     }
   },
   data() {
@@ -32,7 +44,7 @@
   },
   created(){
     // 闃叉姈
-    this.onScroll = this.debounce(this.scrollFn,2000);
+    this.onScroll = this.debounce(this.scrollFn,500);
     // 鑺傛祦
     // this.onScroll = this.throttle(this.scrollFn,1000);
   },
@@ -55,8 +67,7 @@
       this.isLoding = true
       setTimeout(() => {
         this.$emit('load')
-        this.isLoding = false
-      }, 1000)
+      }, 500)
     },
     debounce(func, delay) {
       let timer = null;
diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue
index 097a84d..de2c1b3 100644
--- a/src/components/tool/value-table.vue
+++ b/src/components/tool/value-table.vue
@@ -95,6 +95,12 @@
     align-items: center;
     justify-content: center;
   }
+  .el-table__empty-text{
+    text-align: left;
+    width: 100%;
+    display: inline-block;
+    margin-left: 20px;
+  }
 </style>
 
 <template>
diff --git a/src/components/view/a6-device-management.vue b/src/components/view/a6-device-management.vue
index 7d41b6b..7fc51d6 100644
--- a/src/components/view/a6-device-management.vue
+++ b/src/components/view/a6-device-management.vue
@@ -107,14 +107,14 @@
 							</div>
 						</el-image>
 						<!-- 琛ㄥ崟 -->
-						<el-form :label-position="labelPosition" :model="formData" label-width="100px">
+						<el-form :label-position="labelPosition" :model="formData" label-width="120px">
 							<el-form-item label="浠櫒鍚嶇О:" required>
 							<el-input :disabled="isUp" v-model="formData.deviceName" size="small"></el-input>
 										</el-form-item>
-							<el-form-item label="浠櫒鍚嶇ОEN:">
+							<el-form-item label="浠櫒鍚嶇ОEN:" required>
 								<el-input :disabled="isUp" v-model="formData.enDeviceName" size="small"></el-input>
 											</el-form-item>
-							<el-form-item label="瑙勬牸鍨嬪彿:">
+							<el-form-item label="瑙勬牸鍨嬪彿:" required>
 								<el-input :disabled="isUp" v-model="formData.specificationModel" size="small"></el-input>
 											</el-form-item>
 							<el-form-item label="鐢熶骇鍘傚:">
@@ -132,7 +132,7 @@
 							<el-form-item label="鍑哄巶缂栧彿:">
 							<el-input :disabled="isUp" v-model="formData.factoryNo" size="small"></el-input>
 							</el-form-item>
-							<el-form-item label="绠$悊缂栧彿:">
+							<el-form-item label="绠$悊缂栧彿:" required>
 							<el-input :disabled="isUp" v-model="formData.managementNumber" size="small"></el-input>
 							</el-form-item>
 							<el-form-item label="璐疆鏃ユ湡:">
@@ -140,7 +140,7 @@
 												format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="閫夋嫨鏃ユ湡">
 											</el-date-picker>
 										</el-form-item>
-							<el-form-item label="鍚敤鏃ユ湡:">
+							<el-form-item label="鍚敤鏃ユ湡:" required>
 											<el-date-picker :disabled="isUp" style="width:100%" v-model="formData.activationDate" type="date"
 												format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="閫夋嫨鏃ユ湡">
 											</el-date-picker>
@@ -205,13 +205,13 @@
             <el-form-item label="鍗曚环(涓囧厓):">
               <el-input :disabled="isUp" v-model="formData.unitPrice" size="small"></el-input>
             </el-form-item>
-            <el-form-item label="褰撳墠鐘舵��:">
+            <el-form-item label="褰撳墠鐘舵��:" required>
 							<el-select :disabled="isUp" v-model="formData.deviceStatus" placeholder="璇烽�夋嫨" size="small" style="width:100%">
 								<el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value">
 								</el-option>
 							</el-select>
 						</el-form-item>
-            <el-form-item label="鏍″噯鍛ㄦ湡锛堟湀锛�:">
+            <el-form-item label="鏍″噯鍛ㄦ湡锛堟湀锛�:" required>
               <el-input :disabled="isUp" v-model="formData.calibrationDate" size="small"></el-input>
             </el-form-item>
 						<el-form-item label="鍥剧墖:">
@@ -258,14 +258,14 @@
 							</div>
 						</el-image>
 						<!-- 琛ㄥ崟 -->
-						<el-form :label-position="labelPosition" :model="formData2" label-width="100px">
-							<el-form-item label="浠櫒鍚嶇О:">
+						<el-form :label-position="labelPosition" :model="formData2" label-width="120px">
+							<el-form-item label="浠櫒鍚嶇О:" required>
                 <el-input v-model="formData2.deviceName" size="small"></el-input>
 							</el-form-item>
-              <el-form-item label="浠櫒鍚嶇ОEN:">
+              <el-form-item label="浠櫒鍚嶇ОEN:" required>
                 <el-input v-model="formData2.enDeviceName" size="small"></el-input>
 							</el-form-item>
-              <el-form-item label="瑙勬牸鍨嬪彿:">
+              <el-form-item label="瑙勬牸鍨嬪彿:" required>
                 <el-input v-model="formData2.specificationModel" size="small"></el-input>
 							</el-form-item>
               <el-form-item label="鐢熶骇鍘傚:">
@@ -286,7 +286,7 @@
             <el-form-item label="鍑哄巶缂栧彿:">
               <el-input v-model="formData2.factoryNo" size="small"></el-input>
             </el-form-item>
-            <el-form-item label="绠$悊缂栧彿:">
+            <el-form-item label="绠$悊缂栧彿:" required>
               <el-input v-model="formData2.managementNumber" size="small"></el-input>
             </el-form-item>
             <el-form-item label="璐疆鏃ユ湡:">
@@ -294,7 +294,7 @@
 								format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="閫夋嫨鏃ユ湡">
 							</el-date-picker>
 						</el-form-item>
-            <el-form-item label="鍚敤鏃ユ湡:">
+            <el-form-item label="鍚敤鏃ユ湡:" required>
 							<el-date-picker style="width:100%" v-model="formData2.activationDate" type="date"
 								format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="閫夋嫨鏃ユ湡">
 							</el-date-picker>
@@ -348,13 +348,13 @@
             <el-form-item label="鍗曚环(涓囧厓):">
               <el-input v-model="formData2.unitPrice" size="small"></el-input>
             </el-form-item>
-            <el-form-item label="褰撳墠鐘舵��:">
+            <el-form-item label="褰撳墠鐘舵��:" required>
 							<el-select v-model="formData2.deviceStatus" placeholder="璇烽�夋嫨" size="small" style="width:100%">
 								<el-option v-for="item in deviceStatusList" :key="item.id" :label="item.label" :value="item.value">
 								</el-option>
 							</el-select>
 						</el-form-item>
-            <el-form-item label="鏍″噯鍛ㄦ湡锛堟湀锛�:">
+            <el-form-item label="鏍″噯鍛ㄦ湡锛堟湀锛�:" required>
               <el-input v-model="formData2.calibrationDate" size="small"></el-input>
             </el-form-item>
 						<el-form-item label="鍥剧墖:">
@@ -667,6 +667,34 @@
 				}
 			},
 			submitForm() {
+        if(!this.formData.deviceName){
+          this.$message.error('鏈緭鍏ヤ华鍣ㄥ悕绉�')
+          return
+        }
+        if(!this.formData.enDeviceName){
+          this.$message.error('鏈緭鍏ヤ华鍣ㄥ悕绉癊N')
+          return
+        }
+        if(!this.formData.specificationModel){
+          this.$message.error('鏈緭鍏ヨ鏍煎瀷鍙�')
+          return
+        }
+        if(!this.formData.managementNumber){
+          this.$message.error('鏈緭鍏ョ鐞嗙紪鍙�')
+          return
+        }
+        if(!this.formData.activationDate){
+          this.$message.error('鏈緭鍏ュ惎鐢ㄦ棩鏈�')
+          return
+        }
+        if(!this.formData.deviceStatus){
+          this.$message.error('鏈�夋嫨褰撳墠鐘舵��')
+          return
+        }
+        if(!this.formData.calibrationDate){
+          this.$message.error('鏈緭鍏ユ牎鍑嗗懆鏈燂紙鏈堬級')
+          return
+        }
 				delete this.formData.createTime
 				delete this.formData.updateTime
 				delete this.formData.createUser
@@ -693,6 +721,34 @@
 				})
 			},
 			submitForm2() {
+        if(!this.formData2.deviceName){
+          this.$message.error('鏈緭鍏ヤ华鍣ㄥ悕绉�')
+          return
+        }
+        if(!this.formData2.enDeviceName){
+          this.$message.error('鏈緭鍏ヤ华鍣ㄥ悕绉癊N')
+          return
+        }
+        if(!this.formData2.specificationModel){
+          this.$message.error('鏈緭鍏ヨ鏍煎瀷鍙�')
+          return
+        }
+        if(!this.formData2.managementNumber){
+          this.$message.error('鏈緭鍏ョ鐞嗙紪鍙�')
+          return
+        }
+        if(!this.formData2.activationDate){
+          this.$message.error('鏈緭鍏ュ惎鐢ㄦ棩鏈�')
+          return
+        }
+        if(!this.formData2.deviceStatus){
+          this.$message.error('鏈�夋嫨褰撳墠鐘舵��')
+          return
+        }
+        if(!this.formData2.calibrationDate){
+          this.$message.error('杈撳叆鏍″噯鍛ㄦ湡锛堟湀锛�')
+          return
+        }
 				this.upLoad2 = true;
         this.formData2.insProductIds = this.formData2.insProductIds.join()
 				this.$axios.post(this.$api.deviceScope.addDeviceParameter, this.formData2, {
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;
diff --git a/src/components/view/a6-personnel-overview.vue b/src/components/view/a6-personnel-overview.vue
index 52b9a24..48f969c 100644
--- a/src/components/view/a6-personnel-overview.vue
+++ b/src/components/view/a6-personnel-overview.vue
@@ -87,11 +87,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,list=[],finishLoding = false,keyMap = {},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" style="margin-top: 10px;">
         <li v-for="(m,i) in list" :key="i">
           <el-image style="width: 80px;
@@ -143,16 +143,26 @@
         pageSize: 16, // 涓�椤�16鏉�
         total: '',
         loading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
-        finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+        finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+        keyMap: {}
 			}
 		},
     created() {
+      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
         }
@@ -187,6 +197,7 @@
 				})
 			},
 			refresh() {
+        this.keyMap = {};
         this.currentPage= 1;
         this.list=[];
         this.finishLoding = false;
diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue
index 9725c6b..87e822c 100644
--- a/src/components/view/b2-standard.vue
+++ b/src/components/view/b2-standard.vue
@@ -6,7 +6,7 @@
 
   .left {
     width: 270px;
-    height: calc(100% - 40px - 30px);
+    height: calc(100% - 40px - 10px);
     background-color: white;
     padding: 15px;
   }
@@ -38,8 +38,8 @@
   }
 
   .right .title {
-    height: 50px;
-    line-height: 50px;
+    height: 30px;
+    line-height: 30px;
     padding: 0 10px;
     background-color: white;
   }
@@ -51,7 +51,7 @@
 
   .product_table {
     border-top: 1px solid #ebeef5;
-    height: calc(100% - 275px);
+    height: calc(100% - 235px);
     margin-top: 5px;
     background-color: white;
     user-select: none;
@@ -67,6 +67,17 @@
   }
   >>>.el-table__body-wrapper{
     height: calc(100% - 46px) !important;
+  }
+  >>>.header-class{
+    height: 40px !important;
+  }
+  >>>.header-class th.el-table__cell>.cell{
+    line-height: 14px !important;
+    padding-top: 0 !important;
+    padding-bottom: 0 !important;
+  }
+  >>>.el-table__row{
+    height: 30px !important;
   }
 </style>
 <style>
@@ -146,7 +157,7 @@
       </el-row>
       <el-row class="standard_table" v-loading="tableLoad">
         <el-table class="el-table" :data="standardList" style="width: 100%;height: 220px !important;" height="220" tooltip-effect="dark"
-          highlight-current-row @row-click="rowClick" ref="standard">
+          highlight-current-row @row-click="rowClick" ref="standard" header-row-class-name="header-class">
           <el-table-column prop="code" label="鏍囧噯缂栧彿" show-overflow-tooltip width="200">
             <template slot-scope="scope">
               <span style="color: red;font-size: 14px;">{{scope.row['code']}}</span>
@@ -167,8 +178,12 @@
         <el-table :data="pagedData" ref="productTable" style="width: 100%;" height="100%" tooltip-effect="dark" stripe
           :fit="true" border
           @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"
-          @select="upProductSelect" @select-all="handleAll">
-          <el-table-column type="selection" width="65">
+          @select="upProductSelect"
+          @select-all="handleAll"
+          class="productTable"
+          @filter-change="filterChange"
+          header-row-class-name="header-class">
+          <el-table-column type="selection" width="65" >
           </el-table-column>
           <el-table-column prop="model" label="鍨嬪彿" min-width="120" show-overflow-tooltip></el-table-column>
           <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column>
@@ -444,12 +459,14 @@
         total:0,
         pageSize:100,
         currentPage:1,
+        productLists:[],
       }
     },
     computed: {
       pagedData() {
         const start = (this.currentPage - 1) * this.pageSize;
         const end = start + this.pageSize;
+        this.total = this.productList.length;
         return this.productList.slice(start, end);
       },
     },
@@ -945,8 +962,8 @@
           id: row.id,
           tree: this.selectTree
         }).then(res => {
+          this.productLists = this.HaveJson(res.data)
           this.productList = res.data
-          this.total = this.productList.length;
           // setTimeout(() => {
           //   this.productList.forEach(a => {
           //     if (a.state == 1) this.toggleSelection(a)
@@ -983,9 +1000,16 @@
           }
           // this.$message.success('宸蹭繚瀛�')
         })
+        this.productLists.map(item => {
+          if(row.id == item.id){
+              item.state = row.state;
+            }
+          return item
+        })
       },
       filterHandler(value, row, column) {
         const property = column['property'];
+        // console.log(222222222222,row[property],value)
         return row[property] === value;
       },
       handleAll(e) {
@@ -1077,6 +1101,21 @@
       handleCurrentChange(val) {
         this.currentPage = val;
       },
+      filterChange(e){
+        let arr =[];
+        for (let key in e){
+          arr = e[key]
+        }
+        if(arr.length>0){
+          let arr0 = this.HaveJson(this.productLists).filter(item=>{
+            return arr.find(value=>item.sonLaboratory==value)!==undefined
+          })
+          this.productList = this.HaveJson(arr0)
+        }else{
+          this.productList = this.HaveJson(this.productLists)
+        }
+        // productLists
+      }
     }
   }
 </script>
diff --git a/src/components/view/b3-classes.vue b/src/components/view/b3-classes.vue
index 61a4050..684829a 100644
--- a/src/components/view/b3-classes.vue
+++ b/src/components/view/b3-classes.vue
@@ -49,7 +49,7 @@
     </div>
   </div>
   <div class="center" v-loading="pageLoading">
-    <scroll-pagination @load="init" :finishLoding="finishLoding" v-show="query.month&&list.length>0" style="height: 100%;" :key="'123'">
+    <scroll-pagination @load="init" :finishLoding="finishLoding" v-show="query.month&&list.length>0" style="height: 100%;" :key="'123'" :list="list">
       <div class="clearfix">
         <div class="fixed-left">
           <div class="content-title" style="padding-left: 16px;box-sizing: border-box;">
@@ -101,7 +101,7 @@
         </div>
       </div>
     </scroll-pagination>
-    <scroll-pagination @load="initYear" :finishLoding="finishLoding" v-show="!query.month&&yearList.length>0" style="width: 100%;" :key="'111'">
+    <scroll-pagination @load="initYear" :finishLoding="finishLoding" v-show="!query.month&&yearList.length>0" style="width: 100%;" :key="'111'" :list="yearList">
       <div class="clearfix year-table">
       <div class="fixed-left">
         <div class="content-title" style="padding-left: 16px;box-sizing: border-box;">
@@ -288,6 +288,7 @@
       monthList:[],
       yearList:[],
       downLoading:false,
+      keyMap:{},
     }
   },
   watch: {
@@ -332,6 +333,7 @@
     refresh(){
       this.list = [];
       this.yearList = []
+      this.keyMap = {};
       this.currentPage = 1
       this.query = {
         userName:'',
@@ -346,6 +348,7 @@
       }
     },
     refreshTable(){
+      this.keyMap = {};
       this.currentPage = 1
       if(this.query.month){
         this.list = [];
@@ -356,6 +359,14 @@
       }
     },
     init(){
+      const key = `_${this.currentPage}`
+      const value = this.keyMap[key]
+      // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+      if(value) {
+        return
+      }
+      // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+      this.keyMap[key] = 'temp'
       if(this.currentPage==1){
         this.pageLoading = true
       }
@@ -406,6 +417,14 @@
         })
     },
     initYear(){
+      const key = `_${this.currentPage}`
+      const value = this.keyMap[key]
+      // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+      if(value) {
+        return
+      }
+      // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+      this.keyMap[key] = 'temp'
       // pageYear
       if(this.currentPage==1){
         this.pageLoading = true
diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue
index 4ccf7c5..7c0fc28 100644
--- a/src/components/view/index-index.vue
+++ b/src/components/view/index-index.vue
@@ -378,7 +378,7 @@
             <div class="tab-item" style="cursor: pointer;" :class="{active:currentIndex==5}" @click="currentIndex=5">閫氱煡閫氬憡</div>
           </div>
           <div class="right-3-list" v-loading="listLoading">
-            <scroll-pagination @load="getList" :finishLoding="finishLoding">
+            <scroll-pagination @load="getList" :finishLoding="finishLoding" :list="list">
               <div class="list3-item" v-for="(m,i) in list" :key="i">
               <div class="list3-item-title">
                 <img src="../../../static/img/index-tip.svg" alt="">
@@ -464,7 +464,8 @@
         total: null,
         listLoading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
         finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
-        timer:null
+        timer:null,
+        keyMap:{},
 			}
 		},
     watch:{
@@ -472,6 +473,7 @@
         this.getScheduleByMe()
       },
       currentIndex(){
+        this.keyMap = {}
         this.currentPage = 1;
         this.list = [];
         this.getList();
@@ -486,6 +488,7 @@
       this.weekdays = this.getWeekdaysForNextWeek()
       this.init();
       this.currentPage = 1;
+      this.keyMap = {}
       this.list = [];
       this.getList();
       this.getScheduleByMe()
@@ -493,6 +496,7 @@
       this.timer = setInterval(() => {
         this.init();
         this.currentPage = 1;
+        this.keyMap = {}
         this.list = [];
         this.getList();
         this.getScheduleByMe()
@@ -500,6 +504,14 @@
 		},
 		methods: {
       getList(){
+        const key = `_${this.currentPage}`
+        const value = this.keyMap[key]
+        // 濡傛灉value瀛樺湪锛岃〃绀虹紦瀛樻湁鍊硷紝閭d箞闃绘璇锋眰
+        if(value) {
+          return
+        }
+        // value涓嶅瓨鍦紝琛ㄧず绗竴娆¤姹�,璁剧疆鍗犱綅
+        this.keyMap[key] = 'temp'
         if(this.currentPage==1){
           this.listLoading = true
         }
diff --git a/src/view/notice.vue b/src/view/notice.vue
index a6391f9..be68420 100644
--- a/src/view/notice.vue
+++ b/src/view/notice.vue
@@ -34,7 +34,7 @@
       </el-dropdown>
     </div>
     <div class="notice-content" v-loading="loading">
-      <scroll-pagination @load="refresh" :finishLoding="finishLoding">
+      <scroll-pagination @load="refresh" :finishLoding="finishLoding" :list="list">
         <div class="notice-content-item" v-for="(m,i) in list" :key="i">
           <div class="btns" v-if="m">
             <!-- v-if="m.messageType==2||m.messageType==3" -->
@@ -125,17 +125,27 @@
       pageSize: 8, // 涓�椤�7鏉�
       total: null,
       loading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
-      finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+      finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+      keyMap:{}
     }
   },
   mounted(){
     this.getTypeDicts();
     this.currentPage = 1;
+    this.keyMap = {};
     this.list = [];
     this.refresh();
   },
   methods:{
     refresh(){
+      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
       }
@@ -191,6 +201,7 @@
           p: "abcd"
         },29);
         this.list = [];
+        this.keyMap = {};
         this.currentPage = 1;
         this.refresh();
         this.$emit('goNoticeDetail')
@@ -217,6 +228,7 @@
           }
           this.$message.success('鍒犻櫎鎴愬姛')
           this.list = [];
+          this.keyMap = {};
           this.currentPage = 1;
           this.refresh()
         }).catch(e => {
@@ -226,6 +238,7 @@
     },
     handleType(){
       this.list = [];
+      this.keyMap = {};
       this.currentPage = 1;
       this.refresh();
     },
@@ -240,6 +253,7 @@
         }
         this.$message.success('鎿嶄綔鎴愬姛')
         this.list = [];
+        this.keyMap = {};
         this.currentPage = 1;
         this.refresh();
       })

--
Gitblit v1.9.3