licp
2024-05-14 511712a8c25db33008d36f6b94ed34c57d3cae0e
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;">我的代办</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>
@@ -439,7 +448,8 @@
        pageSize: 8, // 一页7条
        total: null,
        listLoading: true, // 组件loading的展示,默认为true
        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 代表星期日到星期六
          weekdays.push(day);
        }
        weekdays.reverse()
        weekdays = weekdays.map(m=>{
          let day =''
          switch (m) {
@@ -691,5 +710,8 @@
      })
    },
      },
    deactivated(){
      this.timer&&clearInterval(this.timer)
    }
   }
</script>