zenglf
2023-09-28 997835429a1d66643364091e8437ebbbeb8ff97a
src/views/mdc/base/modules/deviceLog/WorkChartModel.vue
@@ -55,7 +55,6 @@
        <div class="checkboxgroup">
          <p>统计参数</p>
          <div class="checkboxgroup_con">
            <a-checkbox-group name="checkboxgroup" :value="option" :options="plainOptions" @change="checkboxOnChange"/>
          </div>
        </div>
@@ -129,13 +128,10 @@
      return current && current > moment().endOf("day");
    },
    initPlainOptions(param) {
      console.log(param)
      let that = this
      let equipment = param.equipmentId
      console.log(equipment)
      getAction(this.url.initPlainOptions,{equipmentId:equipment}).then((res) => {
        if (res.success) {
          let temp = []
          // debugger
          for (var item of res.result) {
@@ -145,7 +141,6 @@
          if(temp.length>0){
            that.option = [temp[0].value]
          }
        }
      })
    },
@@ -207,13 +202,19 @@
      })
    },
    handleCancel() {
      this.visible = false
      this.visible = false;
      this.stratOpen = false;
      this.endOpen = false;
    },
    checkboxOnChange(e) {
      if (e.length <= 3) {
        this.option = e
      } else {
        this.$message.warn('最多只能选择3个')
        // this.$message.warn('最多只能选择3个')
        this.$notification.warning({
          message:'消息',
          description:'最多只能选择三个'
        });
        return false
      }
    },
@@ -337,7 +338,11 @@
      }
      getAction(this.url.workChart, param).then((res) => {
        if(JSON.stringify(res.result) == '[]' || res.result == null){
          this.$message.warning('无数据!')
          // this.$message.warning('无数据!')
          this.$notification.warning({
            message:'消息',
            description:'无数据!'
          });
          this.spinning = false;
          _this.workChart.setOption(option,true)
        }else{