src/views/mdc/base/modules/deviceLog/LogInfo.vue
@@ -16,7 +16,8 @@
          </a-col>
          <a-col :md="6" :sm="6">
            <a-form-item label="日期">
              <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" format='YYYY-MM-DD'/>
              <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange"
                             format='YYYY-MM-DD'/>
            </a-form-item>
          </a-col>
          <a-col :md="3" :sm="3">
@@ -150,7 +151,8 @@
        </a-tabs>
      </div>
    </div>
    <work-chart-model ref="workChartModel"></work-chart-model>
    <work-chart-model ref="workChartModel" :collectTime="this.queryParams.collectTime"
                      :equipment="this.equipment"></work-chart-model>
    <work-history-model ref="workHistoryModel"></work-history-model>
  </div>
</template>
@@ -182,7 +184,7 @@
        middleTime: '',
        queryParam:{},
        queryParams: {
          collectTime:undefined,
          collectTime: undefined
        },
        loadingstayus:false,
        loadingrunStatus:false,
@@ -225,20 +227,20 @@
      },
      disabledDate(current){
        //Can not slect days before today and today
        return current && current > moment().subtract('days', 0);
        return current && current > moment().subtract('days', 0)
      },
      queryChart() {
        // this.normal = []
        // this.waring = []
        this.loadingstayus = true;
        this.loadingrunStatus = true;
        this.loadingstayus = true
        this.loadingrunStatus = true
        this.loadingwarnStatus = true
        getAction(this.url.list, this.queryParams).then((res) => {
          this.normalList = []
          this.waringList = []
          this.runList = []
          this.loadingstayus = false;
          this.loadingrunStatus = false;
          this.loadingstayus = false
          this.loadingrunStatus = false
          this.loadingwarnStatus = false
          this.normal = []
          this.waring = []
@@ -329,8 +331,8 @@
          if(!this.queryParams.equipmentId||!this.queryParams.equipmentName){
            this.$notification.warning({
              message:'消息',
              description:"请选择设备"
            });
              description: '请选择设备'
            })
            return false
          }
          this.queryChart()
@@ -339,8 +341,8 @@
          console.log('触发提示')
          this.$notification.warning({
            message:'消息',
            description:"请选择时间"
          });
            description: '请选择时间'
          })
        }
        // this.queryList()
      },
@@ -358,13 +360,14 @@
          // this.$message.warning("请选择设备进行查询")
          this.$notification.warning({
            message:'消息',
            description:"请选择设备进行查询"
          });
            description: '请选择设备进行查询'
          })
        }else{
          // 判断是否点击设备日志表格行的数据,此时为点击表格数据为false
          this.$refs.workChartModel.isClicklogListRow = false
          this.$refs.workChartModel.add(this.equipment)
          this.$refs.workChartModel.title = '工作曲线'
        }
      },
      openHistoryChart() {
        // console.log(this.equipment);
@@ -372,8 +375,8 @@
          // this.$message.warning("请选择设备进行查询")
          this.$notification.warning({
            message:'消息',
            description:"请选择设备进行查询"
          });
            description: '请选择设备进行查询'
          })
          // console.log(1111)
        } else{
          this.$refs.workHistoryModel.add(this.equipment)
@@ -391,7 +394,7 @@
          this.$notification.warning({
            message:'消息',
            description:'请选择今天以及今天之前的日期!!'
          });
          })
        }else{
          this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD')
          this.searchQuery()
@@ -415,14 +418,14 @@
              _this.$notification.warning({
                message:'消息',
                description:'请联系管理员,开放设备权限!'
              });
              })
            }
          }else{
            // this.$message.warning(res.message)
            _this.$notification.warning({
              message:'消息',
              description:res.message
            });
            })
          }
        })
@@ -431,13 +434,12 @@
    created() {
      this.queryParams.collectTime = moment()
      this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
      this.initEquipment();
      this.initEquipment()
      // this.queryTreeData();
    },
    watch: {
      equement(val) {
        console.log('通过watch触发')
        if (val && val.equipmentId) {
          this.$set(this.queryParams, 'equipmentName', val.equipmentName)
          this.$set(this.queryParams, 'equipmentId', val.equipmentId)
@@ -492,6 +494,7 @@
  #mdcLogShow > div {
    flex: 1;
  }
  /*.mdcLogShowOne{*/
    /*position: absolute;*/
  /*}*/