Quellcode durchsuchen

设备监控弹窗条件判断修改

wy vor 1 Jahr
Ursprung
Commit
31fbc05d02
1 geänderte Dateien mit 11 neuen und 8 gelöschten Zeilen
  1. 11 8
      pages/equipment-monitoring/components/manual.vue

+ 11 - 8
pages/equipment-monitoring/components/manual.vue

@@ -15,9 +15,9 @@
 						:max-temperature="item.maxTemperature" :max-cell-voltage="item.maxCellVoltage" index
 						:min-cell-voltage="item.minCellVoltage" :soh="item.soh" :store-state="item.storeState"
 						:charger-info-vo="item.chargerInfoVo" :class="box_num == index ? 'slect_box':''"
-						:chgType='item.chgType' :batInfoOneVo="item.batInfoOneVo" :batInfoTwoVo='item.batInfoTwoVo' 
-						:chargerInfoOneVo="item.chargerInfoOneVo" :chargerInfoTwoVo="item.chargerInfoTwoVo" 
-						:showCodeNum='item.showCodeNum' @ExchangeMessage='ExchangeMessage'/>
+						:chgType='item.chgType' :batInfoOneVo="item.batInfoOneVo" :batInfoTwoVo='item.batInfoTwoVo'
+						:chargerInfoOneVo="item.chargerInfoOneVo" :chargerInfoTwoVo="item.chargerInfoTwoVo"
+						:showCodeNum='item.showCodeNum' @ExchangeMessage='ExchangeMessage' />
 				</view>
 
 			</scroll-view>
@@ -105,16 +105,19 @@
 					powerNum: datas.powerNum,
 					powerType: datas.setType
 				}
-				if(data.gunNo=='' || data.powerNum=='' || data.powerNum=='' ){
-					this.ExchangeMessage('warn','请填写完整')
-				}else{
+				if (data.powerType == 0) {
+					data.powerNum = undefined
+				}
+				if (data.gunNo == '' || data.powerType == '' || data.powerType && data.powerNum == "") {
+					this.ExchangeMessage('warn', '请填写完整')
+				} else {
 					this.$http.getlimitPower(data).then(res => {
 						this.ExchangeMessage(res.code === 0 ? 'success' : 'error',
 							res.code === 0 ? '设置功率下发成功!' : '设置功率下发失败!')
-							this.$refs.showRight.close();
+						this.$refs.showRight.close();
 					})
 				}
-				
+
 			}
 		}
 	}