zhuzhuanzhuan
2023-08-16 f156d473fb0c4ba31671b169bdb5c3a61f933ebf
src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
@@ -4,7 +4,7 @@
    <div style="width: 100%; height: 44px; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="4" :sm="4" :xs="4">
          <a-col :md="5" :sm="5" :xs="5">
            <a-form-item label="名称">
              <a-input placeholder="输入设备名称查询" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>
            </a-form-item>
@@ -125,7 +125,7 @@
        url: {
          getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid',
          dayStatisticalRate:'/mdc/efficiencyReport/dayStatisticalRate',
          getBaseTree: '/mdc/mdcequipment/loadTree',
          getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction',
        },
      }
    },
@@ -230,7 +230,6 @@
              containLabel: true
            },
          legend:{
            //设置默认不显示
            selected:{
                "曲线":false,
            },
@@ -562,14 +561,14 @@
            if(res.success){
              // console.log(res);
              this.StatCharOpeningRate = res.result.openRate;
              this.StatCharUsedRate = res.result.usedRate;
              this.StatCharUsedRate = res.result.utilizationRate;
              this.UtilizationHeight = res.result.openRate;
              this.StatCharUsedopeningRate = res.result.usedopeningRate;
              this.StartupHeight = res.result.usedopeningRate;
              this.openingLong = this.getTime(res.result.openingLong)
              this.waitingLong = this.getTime(res.result.waitingLong);
              this.processLong = this.getTime(res.result.processingLong);
              this.closedLong = this.getTime(res.result.closedLong);
              this.StatCharUsedopeningRate = res.result.StartupHeight;
              this.StartupHeight = res.result.StartupHeight;
              this.openingLong = this.getTime(res.result.openLong)
              this.waitingLong = this.getTime(res.result.waitLong);
              this.processLong = this.getTime(res.result.processLong);
              this.closedLong = this.getTime(res.result.closeLong);
              this.totalLong = parseInt(this.openingLong) + parseInt(this.closedLong);
              this.draw();
            }
@@ -586,9 +585,13 @@
        getAction(this.url.getBaseTree).then((res) => {
          if (res.success) {
            // console.log(res.result[0].entity.tierName)
            _this.$set(this.queryParam, 'tierName', res.result[0].entity.tierName)
            _this.$set(this.queryParam, 'tierName', res.result[0].title)
          } else {
            this.$message.warn(res.message)
            // this.$message.warn(res.message)
            this.$notification.warning({
              message:'消息',
              description:res.message
            });
          }
        }).finally(() => {
          this.loading = false
@@ -621,16 +624,16 @@
    watch: {
      equip(val) {
          // console.log(val);
          if (val.entity && val.entity.equipmentId) {
            this.$set(this.queryParam, 'tierName', val.entity.tierName)
            this.$set(this.queryParam, 'equipmentId', val.entity.equipmentId)
          if (val && val.equipmentId) {
            this.$set(this.queryParam, 'tierName', val.title)
            this.$set(this.queryParam, 'equipmentId', val.equipmentId)
            this.queryParams.parentId = ''
            this.queryParams.equipmentIds = val.entity.equipmentId
            this.queryParams.equipmentId = val.equipmentId
            this.searchQuery()
          }else{
            this.queryParams.parentId = val.entity.id
            this.queryParams.equipmentIds = ''
            this.$set(this.queryParam, 'tierName', val.entity.tierName)
            this.queryParams.parentId = val.key
            this.queryParams.equipmentId = ''
            this.$set(this.queryParam, 'tierName', val.title)
            this.searchQuery()
            }
            this.searchQuery()