guoshipeng
2023-08-03 f93b9f80d69fc1d933c672cf516024e332971e13
src/views/list/devicesBasic.vue
@@ -139,6 +139,7 @@
              <a-input
                v-model="AQIvalue"
                style="width: 100px; margin-left: 15px"
                @blur="ceAQIhandleChange"
              />
            </div>
          </div>
@@ -151,11 +152,12 @@
                style="width: 100px; margin-left: 10px"
                allowClear
                :options="ceAQIoptions"
                @change="ceAQIhandleChange"
                @change="AQIhandleChange"
              ></a-select>
              <a-input
                v-model="ceAQIvaluein"
                style="width: 100px; margin-left: 15px"
                @blur="ceAQIhandleChange"
              />
            </div>
          </div>
@@ -1289,10 +1291,10 @@
    console.log(value);
  }
  private AQIhandleChange(value: string){
    console.log(value);
       this.handleChange2(this.reskey);
  }
  private ceAQIhandleChange(value: string){
    console.log(value);
    this.handleChange2(this.reskey);
  }
  private tablecolumns:TableColumnType<datatable>=[
    {
@@ -1656,8 +1658,11 @@
    }
    this.loadRuleData(1)
  }
  private reskey:any=0
  private handleChange2(res:any){
    // console.log(res.key);
    console.log(res.key);
    this.reskey=res
    console.log(this.reskey);
    if(this.selectvalue1==='请选择因子'){
      this.$message.warning('请先选择因子')
      return
@@ -1675,9 +1680,9 @@
          }else if(this.ceAQIvalue==='-'){
            this.datatable[i].cel=parseFloat(this.datatable[i].cel-Number(this.ceAQIvaluein)).toFixed(2)
          }else if(this.ceAQIvalue==='*'){
            this.datatable[i].cel=parseFloat(this.datatable[i].cel*Number(this.ceAQIvaluein)).toFixed(3)
            this.datatable[i].cel=parseFloat(this.datatable[i].cel*Number(this.ceAQIvaluein)).toFixed(2)
          }else if(this.ceAQIvalue==='/'){
             this.datatable[i].cel=parseFloat(this.datatable[i].cel/Number(this.ceAQIvaluein)).toFixed(2)
             this.datatable[i].cel=parseFloat(this.datatable[i].cel/Number(this.ceAQIvaluein)).toFixed(3)
          }
           this.datatable[i].agehou='ce1*'+this.datatable[i].cel
         }
@@ -1692,18 +1697,18 @@
            }else if(this.AQIvalue1==='-'){
              this.datatable[i].aqi=parseFloat(this.datatable[i].aqi - Number(this.AQIvalue)).toFixed(2)
            } else if(this.AQIvalue1==='*'){
              this.datatable[i].aqi=parseFloat(this.datatable[i].aqi * Number(this.AQIvalue)).toFixed(3)
              this.datatable[i].aqi=parseFloat(this.datatable[i].aqi * Number(this.AQIvalue)).toFixed(2)
            }else if(this.AQIvalue1==='/'){
              this.datatable[i].aqi=parseFloat(this.datatable[i].aqi / Number(this.AQIvalue)).toFixed(2)
              this.datatable[i].aqi=parseFloat(this.datatable[i].aqi / Number(this.AQIvalue)).toFixed(3)
            } 
            if(this.ceAQIvalue==='+'){
             this.datatable[i].cel=parseFloat(this.datatable[i].cel + Number(this.ceAQIvaluein)).toFixed(2)
            }else if(this.ceAQIvalue==='-'){
              this.datatable[i].cel=parseFloat(this.datatable[i].cel - Number(this.ceAQIvaluein)).toFixed(2)
            }else if(this.ceAQIvalue==='*'){
              this.datatable[i].cel=parseFloat(this.datatable[i].cel * Number(this.ceAQIvaluein)).toFixed(3)
              this.datatable[i].cel=parseFloat(this.datatable[i].cel * Number(this.ceAQIvaluein)).toFixed(2)
            }else if(this.ceAQIvalue==='/'){
              this.datatable[i].cel=parseFloat(this.datatable[i].cel / Number(this.ceAQIvaluein)).toFixed(2)
              this.datatable[i].cel=parseFloat(this.datatable[i].cel / Number(this.ceAQIvaluein)).toFixed(3)
            }
            this.datatable[i].agehou='aqi*'+this.datatable[i].aqi+'+'+'ce1*'+this.datatable[i].cel
        }