From e59a71579f6afd21c76f9d45c3b3f09c28d03c41 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 27 五月 2024 14:37:22 +0800 Subject: [PATCH] 合并冲突 --- src/view/notice.vue | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/view/notice.vue b/src/view/notice.vue index a6391f9..bc84174 100644 --- a/src/view/notice.vue +++ b/src/view/notice.vue @@ -4,7 +4,7 @@ title="娑堟伅閫氱煡" :visible.sync="drawer" :direction="direction" - :before-close="handleClose" style="height: 100vh;z-index: 9999999;"> + :before-close="handleClose" style="height: 100vh;z-index: 9999999;" size="450px"> <div class="head"> <div class="head-search"> <label>娑堟伅绫诲瀷锛�</label> @@ -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