From d8582c971ebab6460e6c66dde4d8a419096dd759 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期三, 15 五月 2024 14:04:45 +0800
Subject: [PATCH] 权限修改
---
src/components/view/index-index.vue | 75 +++++++++++++++++++++++++++++++------
1 files changed, 62 insertions(+), 13 deletions(-)
diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue
index 9c462d6..7c0fc28 100644
--- a/src/components/view/index-index.vue
+++ b/src/components/view/index-index.vue
@@ -241,7 +241,31 @@
text-align: left;
margin-bottom: 10px;
}
-
+ >>>.el-calendar-day span{
+ display: inline-block;
+ width: 30px;
+ height: 30px;
+ line-height: 30px;
+ text-align: center;
+ border-radius: 4px;
+ }
+ >>>.is-selected{
+ background: transparent !important;
+ }
+ >>>.is-selected .el-calendar-day{
+ background: transparent !important;
+ }
+ >>>.is-selected .el-calendar-day span{
+ background: #3A7BFA !important;
+ color: #fff !important;
+ }
+ >>>.el-calendar-day:hover{
+ background: transparent;
+ }
+ >>>.el-calendar-day span:hover{
+ background: #3A7BFA !important;
+ color: #fff !important;
+ }
</style>
<template>
@@ -280,8 +304,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 +313,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 +322,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 +331,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 +356,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>
@@ -354,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="">
@@ -439,7 +463,9 @@
pageSize: 8, // 涓�椤�7鏉�
total: null,
listLoading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
- finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+ timer:null,
+ keyMap:{},
}
},
watch:{
@@ -447,6 +473,7 @@
this.getScheduleByMe()
},
currentIndex(){
+ this.keyMap = {}
this.currentPage = 1;
this.list = [];
this.getList();
@@ -458,15 +485,33 @@
setInterval(() => {
this.nowTime()
}, 1000)
- this.init();
this.weekdays = this.getWeekdaysForNextWeek()
- this.getScheduleByMe()
+ this.init();
this.currentPage = 1;
+ this.keyMap = {}
this.list = [];
this.getList();
+ this.getScheduleByMe()
+ this.timer&&clearInterval(this.timer)
+ this.timer = setInterval(() => {
+ this.init();
+ this.currentPage = 1;
+ this.keyMap = {}
+ this.list = [];
+ this.getList();
+ this.getScheduleByMe()
+ },1000*60*10)
},
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
}
@@ -623,10 +668,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) {
@@ -691,5 +737,8 @@
})
},
},
+ deactivated(){
+ this.timer&&clearInterval(this.timer)
+ }
}
</script>
--
Gitblit v1.9.3