Sfoglia il codice sorgente

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

wy 1 anno fa
parent
commit
31fbc05d02
1 ha cambiato i file con 11 aggiunte e 8 eliminazioni
  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();
 					})
 				}
-				
+
 			}
 		}
 	}