fuliqi
2024-12-25 301532b5c1cad2c1d45080bfef86579b20486bf5
src/views/system/check/result/detail/index.vue
@@ -344,11 +344,14 @@
    },
    getAllDay() {
      // const date = new Date();
      // const year = date.getFullYear();
      // const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1);
      // this.date = year + '-' + month;
      const currentDate = this.date.split('-');
      let date = this.date
      if(!this.date) {
        date = new Date();
        const year = date.getFullYear();
        const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1);
        date = year + '-' + month;
      }
      const currentDate = date.split('-');
      const currentYear = currentDate[0];
      const currentMonth = currentDate[1];
      const daysInMonth = new Date(currentYear, currentMonth, 0).getDate();