From 511712a8c25db33008d36f6b94ed34c57d3cae0e Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期二, 14 五月 2024 14:15:24 +0800 Subject: [PATCH] 优化首页 --- src/components/view/index-index.vue | 61 ++++++++++++++++++++++++------ 1 files changed, 48 insertions(+), 13 deletions(-) diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue index f74e1ec..b688f28 100644 --- a/src/components/view/index-index.vue +++ b/src/components/view/index-index.vue @@ -241,7 +241,16 @@ text-align: left; margin-bottom: 10px; } - + >>>.is-selected .el-calendar-day{ + background: #3A7BFA !important; + color: #fff !important; + border-radius: 4px; + } + >>>.el-calendar-day:hover{ + background: #3A7BFA !important; + color: #fff !important; + border-radius: 4px; + } </style> <template> @@ -280,8 +289,8 @@ <img src="../../../static/img/index-0.svg" alt=""> </div> <div class="mun"> - <p style="font-size: 20px;">254</p> - <p style="font-size: 14px;margin-bottom: 10px;">鎴戠殑浠e姙</p> + <p style="font-size: 20px;">0</p> + <p style="font-size: 14px;margin-bottom: 10px;">鎴戠殑寰呭姙</p> </div> </div> <div class="right-1-item"> @@ -289,7 +298,7 @@ <img src="../../../static/img/index-1.svg" alt=""> </div> <div class="mun"> - <p style="font-size: 20px;">254</p> + <p style="font-size: 20px;">0</p> <p style="font-size: 14px;margin-bottom: 10px;">宸插姙浜嬪疁</p> </div> </div> @@ -298,7 +307,7 @@ <img src="../../../static/img/index-2.svg" alt=""> </div> <div class="mun"> - <p style="font-size: 20px;">254</p> + <p style="font-size: 20px;">0</p> <p style="font-size: 14px;margin-bottom: 10px;">鍓╀綑寰呭姙</p> </div> </div> @@ -307,7 +316,7 @@ <img src="../../../static/img/index-3.svg" alt=""> </div> <div class="mun"> - <p style="font-size: 20px;">254</p> + <p style="font-size: 20px;">0</p> <p style="font-size: 14px;margin-bottom: 10px;">杩戞湡浜嬪疁</p> </div> </div> @@ -332,8 +341,8 @@ <span> {{ data.day.split('-').slice(2)+'' }} </span> - <el-badge v-if="data.isSelected" is-dot class="item"> - </el-badge> + <!-- <el-badge v-if="data.isSelected" is-dot class="item"> + </el-badge> --> </template> </el-calendar> </div> @@ -361,7 +370,7 @@ <p>{{ m.theme }}</p> </div> <div class="list3-item-info"> - <p style="width: 73%;-webkit-line-clamp: 1;" class="ellipsis-multiline"> + <p style="width: 73%;-webkit-line-clamp: 1;cursor: pointer;" class="ellipsis-multiline" @click="goNoticeDetail(m)"> <!-- 缂栧彿<span style="color:#3A7BFA;"> SB20240101-001 </span>鐨勮澶囧皢浜�2023-09-09 11:11:11杩囨湡 --> {{ m.content }} </p> @@ -439,7 +448,8 @@ pageSize: 8, // 涓�椤�7鏉� total: null, listLoading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue - finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡 + finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡 + timer:null } }, watch:{ @@ -458,12 +468,20 @@ setInterval(() => { this.nowTime() }, 1000) - this.init(); this.weekdays = this.getWeekdaysForNextWeek() - this.getScheduleByMe() + this.init(); this.currentPage = 1; this.list = []; this.getList(); + this.getScheduleByMe() + this.timer&&clearInterval(this.timer) + this.timer = setInterval(() => { + this.init(); + this.currentPage = 1; + this.list = []; + this.getList(); + this.getScheduleByMe() + },1000*60*10) }, methods: { getList(){ @@ -623,10 +641,11 @@ let weekdays = []; for (let i = 0; i < 7; i++) { let date = new Date(); - date.setDate(date.getDate() + i); // 浠婂ぉ涔嬪悗鐨勬棩瀛� + date.setDate(date.getDate() - i); // 浠婂ぉ涔嬪悗鐨勬棩瀛� let day = date.getDay(); // 0-6 浠h〃鏄熸湡鏃ュ埌鏄熸湡鍏� weekdays.push(day); } + weekdays.reverse() weekdays = weekdays.map(m=>{ let day ='' switch (m) { @@ -677,6 +696,22 @@ }) }) }, + goNoticeDetail(row){ + this.$axios.put(this.$api.informationNotification.triggerModificationStatusToRead+'/'+row.id).then(res => { + row.num = Math.random(100); + this.$bus.$emit("change", JSON.stringify(row)); + this.$parent.addTab({ + v: "娑堟伅璇︽儏", + i: "el-icon-s-tools", + u: "notice-detail", + k:35, + p: "abcd" + },29); + }) + }, }, + deactivated(){ + this.timer&&clearInterval(this.timer) + } } </script> -- Gitblit v1.9.3