zenglf
2023-09-28 997835429a1d66643364091e8437ebbbeb8ff97a
src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue
@@ -15,7 +15,7 @@
                <a-input placeholder="输入设备名称查询" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="5" :sm="5" :xs="5">
            <a-col :md="4" :sm="4" :xs="4">
              <a-form-item label="日期">
                <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' @change="dataChange"/>
              </a-form-item>
@@ -38,7 +38,7 @@
                </a-select>小时
              </a-form-item>
            </a-col>
            <a-col :md="2" :sm="3" :xs="3">
            <a-col :md="3" :sm="3" :xs="3">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
            </a-col>
            <!--<a-col :md="2" :sm="2" :xs="2">-->
@@ -276,39 +276,47 @@
        }
      },
      searchQuery(){
        this.spaceTime = []
        this.useingRates = []
        if(this.queryParams.typeTree == "1"){
          this.queryParams.parentId =  this.queryParamEquip.parentId
          // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
        if(this.queryParam.dateTime){
          this.spaceTime = []
          this.useingRates = []
          if(this.queryParams.typeTree == "1"){
            this.queryParams.parentId =  this.queryParamEquip.parentId
            // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
        }else{
          this.queryParams.parentId = this.queryParamEquip.parentId
          // this.queryParams.equipmentId = ""
        }
        this.AnalysisList = [];
        //获取查询条件
        this.queryParam.parentId = this.queryParams.parentId;
        this.queryParam.equipmentId = this.queryParams.equipmentId;
        this.queryParam.typeTree = this.queryParams.typeTree
        getAction(this.url.dayUtilizationRate,this.queryParam).then((res) => {
          if(res.success){
            this.spaceTime=res.result.dateList
            for(var i = 0;i<res.result.dayRateDto.length;i++){
              this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
            }
            this.drawTu()
          }else{
            // this.$message.warning(res.message)
            this.$notification.warning({
              message:'消息',
              description:res.message
            });
            this.queryParams.parentId = this.queryParamEquip.parentId
            // this.queryParams.equipmentId = ""
          }
        }).finally(() => {
          this.loading = false
        })
          this.AnalysisList = [];
          //获取查询条件
          this.queryParam.parentId = this.queryParams.parentId;
          this.queryParam.equipmentId = this.queryParams.equipmentId;
          this.queryParam.typeTree = this.queryParams.typeTree
          getAction(this.url.dayUtilizationRate,this.queryParam).then((res) => {
            if(res.success){
              this.spaceTime=res.result.dateList
              for(var i = 0;i<res.result.dayRateDto.length;i++){
                this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
              }
              this.drawTu()
            }else{
              // this.$message.warning(res.message)
              this.$notification.warning({
                message:'消息',
                description:res.message
              });
            }
          }).finally(() => {
            this.loading = false
          })
        }else{
          this.$notification.warning({
            message:'消息',
            description:'请选择时间'
          });
        }
      },
      searchReset() {
        this.spaceTime = []