riku
2024-11-04 069da66fbe2748d51b1f3bc63f9ae00e660083c6
src/views/fysp/data-product/ProdDailyReport.vue
@@ -246,7 +246,7 @@
      handler(nV, oV) {
        // this.getCanClickDay();
      },
      deep: true,
      deep: true
      // immediate: true
    }
  },
@@ -255,16 +255,29 @@
  },
  methods: {
    disabledDate(time) {
      this.getCanClickDay()
      this.getCanClickDay();
      let disabled =
        this.canClickDay.filter((item) => {
          let date = dayjs(time)
          let itemDay = new Date(item)
          console.log("curr preview time canClickDay", itemDay.getFullYear(), itemDay.getMonth(), itemDay.getDate());
          console.log("curr preview time date", date.year(), date.month(), date.date());
          return date.year() == itemDay.getFullYear() && date.month() == itemDay.getMonth() && date.date() == itemDay.getDate()
        })
          .length == 0;
          let date = dayjs(time);
          let itemDay = new Date(item);
          console.log(
            'curr preview time canClickDay',
            itemDay.getFullYear(),
            itemDay.getMonth(),
            itemDay.getDate()
          );
          console.log(
            'curr preview time date',
            date.year(),
            date.month(),
            date.date()
          );
          return (
            date.year() == itemDay.getFullYear() &&
            date.month() == itemDay.getMonth() &&
            date.date() == itemDay.getDate()
          );
        }).length == 0;
      return !disabled;
    },
    getSelectedCityname() {
@@ -301,13 +314,15 @@
          .map((topTask) => {
            taskApi.fetchDayTasks(topTask.tguid).then((res) => {
              res.forEach((r) => {
                let formSearchDate = dayjs(this.formSearch.time)
                let date = new Date()
                dayjs(date).year(formSearchDate.year()).month(formSearchDate.month()).date(Number(r.date.slice(8, 10)))
                let formSearchDate = dayjs(this.formSearch.time);
                let date = new Date();
                dayjs(date)
                  .year(formSearchDate.year())
                  .month(formSearchDate.month())
                  .date(Number(r.date.slice(8, 10)));
                this.canClickDay.push(date);
              });
              console.log("this.canClickDay", this.canClickDay);
              console.log('this.canClickDay', this.canClickDay);
            });
          });
      });