From 22b1e8c61b4cf049f1c980aea459f3b90620a1b0 Mon Sep 17 00:00:00 2001 From: 晏有为 <13214124+yan-youwei@user.noreply.gitee.com> Date: 星期四, 23 五月 2024 17:26:12 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before --- src/view/notice.vue | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/view/notice.vue b/src/view/notice.vue index a6391f9..99f4985 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 } @@ -180,8 +190,8 @@ }, goNoticeDetail(row){ this.$axios.put(this.$api.informationNotification.triggerModificationStatusToRead+'/'+row.id).then(res => { - this.drawer = false; row.num = Math.random(100); + localStorage.setItem("noticeInfo", JSON.stringify(row)) this.$bus.$emit("change", JSON.stringify(row)); this.$parent.addTab({ v: "娑堟伅璇︽儏", @@ -191,10 +201,12 @@ p: "abcd" },29); this.list = []; + this.keyMap = {}; this.currentPage = 1; this.refresh(); this.$emit('goNoticeDetail') }) + this.drawer = false; }, handleDropdown(e,row){ switch(e){ @@ -217,6 +229,7 @@ } this.$message.success('鍒犻櫎鎴愬姛') this.list = []; + this.keyMap = {}; this.currentPage = 1; this.refresh() }).catch(e => { @@ -226,6 +239,7 @@ }, handleType(){ this.list = []; + this.keyMap = {}; this.currentPage = 1; this.refresh(); }, @@ -240,6 +254,7 @@ } this.$message.success('鎿嶄綔鎴愬姛') this.list = []; + this.keyMap = {}; this.currentPage = 1; this.refresh(); }) -- Gitblit v1.9.3