licp
2024-12-26 943f66294cae53cb1617b237ec992691e01f516b
src/components/view/index-index.vue
@@ -372,18 +372,18 @@
              <el-date-picker
                v-model="time.week"
                type="week"
                format="yyyy-MM-dd"
                format="yyyy 第 WW 周"
                placeholder="选择周" size="mini" v-if="type=='周'" @change="m=>changeTime(type,m)" style="width: 130px;">
              </el-date-picker>
              <el-date-picker
                v-model="time.month"
                type="month"
                placeholder="选择月" format="yyyy-MM-dd" size="mini" v-if="type=='月'" @change="m=>changeTime(type,m)" style="width: 130px;">
                placeholder="选择月" size="mini" v-if="type=='月'" @change="m=>changeTime(type,m)" style="width: 130px;">
              </el-date-picker>
              <el-date-picker
                v-model="time.year"
                type="year"
                placeholder="选择年" format="yyyy-MM-dd" size="mini" v-if="type=='年'" @change="m=>changeTime(type,m)" style="width: 130px;">
                placeholder="选择年" size="mini" v-if="type=='年'" @change="m=>changeTime(type,m)" style="width: 130px;">
              </el-date-picker>
            </div>
            <!-- <span style="cursor: pointer;font-size: 12px;
@@ -889,10 +889,10 @@
            case '月':
              const year = new Date(this.time.month).getFullYear();
              const month = new Date(this.time.month).getMonth();
              const day = new Date(year, month + 1, 0).getDate(); //
              // 设置起始日期和结束日期
              this.startTime = new Date(year, month, 1).toISOString().slice(0, 10); // 月初
              this.endTime = new Date(year, month + 1, 0).toISOString().slice(0, 10); // 月末
              this.startTime = `${year}-${month + 1}-01`
              this.endTime = `${year}-${month + 1}-${day}` // 月末
              break;
            case '年':
              const year0 = new Date(this.time.year).getFullYear();
@@ -907,6 +907,7 @@
          // 设置起始日期和结束日期
          this.startTime = new Date(year, month, 1).toISOString().slice(0, 10); // 月初
          this.endTime = new Date(year, month + 1, 0).toISOString().slice(0, 10); // 月末
          this.time.month = new Date()
        }
        this.initEchart()
      },