zhuzhuanzhuan
2023-08-10 9b3e7c3c47dc27e531a7b954aa2b3ba500c84b78
src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue
@@ -152,10 +152,10 @@
      //   console.log(data); //选中某天
      // },
      changeDate(data) {
        console.log(data); //左右点击切换月份
       // console.log(data); //左右点击切换月份
      },
      clickToday(data) {
        console.log(data); // 跳到了本月
        //console.log(data); // 跳到了本月
      },
      // markChange(){
      //
@@ -200,13 +200,10 @@
        }
      },
      clickDay(today){//选中日期
        // today = this.fun(today)
        console.log("当前选中日期===>", today);
        let existDate = this.selectDate;
        let isExist = true;
        for (var i = 0; i < existDate.length; i++) {
          if (existDate[i].date === today) {
            console.log("当前日期存已在===>",today);
            this.selectDate.splice(i,1);
            this.shiData.splice(i,1);
            this.sendDte.splice(i,1)
@@ -214,7 +211,6 @@
          }
        }
        if (isExist) {//当前日期存在移除
          console.log("不存在-添加===>");
          let tempDate = {date: today, className: "mark1"}
          // let ddd = this.fun(today)
          let ddd = today
@@ -223,8 +219,6 @@
          this.shiData.push(ddd)
          this.sendDte.push(ccc)
        }
        console.log("this.selectDate===>",JSON.stringify(this.selectDate));
        console.log(this.sendDte)
      },
      onSelect(value) {
        console.log(value);
@@ -308,13 +302,20 @@
            let formData = Object.assign(this.model, values)
            formData.dateList = this.sendDte
            console.log(formData)
            postAction(this.url.settingCalendar, formData).then((res) => {
              if (res.success) {
                that.$message.success(res.message)
                // that.$message.success(res.message)
                that.$notification.warning({
                  message:'消息',
                  description:res.message
                });
                that.$emit('ok', res.result)
              } else {
                that.$message.warning(res.message)
                // that.$message.warning(res.message)
                that.$notification.warning({
                  message:'消息',
                  description:res.message
                });
              }
            }).finally(() => {
              that.confirmLoading = false