From 2b6ac9c33b4a2a67a62d50cbda48c7b3f83221fe Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Sat, 9 Nov 2024 14:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E6=9F=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AirConditioning.vue | 52 ++++++++++--------- .../components/DeviceControlDialog.vue | 33 +++++++----- 2 files changed, 46 insertions(+), 39 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/AirConditioning.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/AirConditioning.vue index 2c7c7c43..ce1a4744 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/AirConditioning.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/AirConditioning.vue @@ -148,37 +148,38 @@ Message.error("请求失败,请稍后再试"); }); }, - validateInput(value) { - const intValue = parseInt(value, 10); - const limits = this.rangeLimits[this.controlObject]; - if (isNaN(intValue) || intValue < limits.min || intValue > limits.max) { - this.errorMessage = `请输入 ${limits.min}-${limits.max} 之间的数字`; - if(this.controlObject=='000D'&&this.OOODValue!=''){ - this.errorMessage += ` 当前值为:`+this.OOODValue; - this.openingPoint = this.OOODValue; - }else if(this.controlObject=='000E'&&this.OOOEValue!=''){ - this.errorMessage += ` 当前值为:`+this.OOOEValue; - this.openingPoint = this.OOOEValue; - }else if(this.controlObject=='000F'&&this.OOOFValue!=''){ - this.errorMessage += ` 当前值为:`+this.OOOFValue; - this.openingPoint = this.OOOFValue; - }else if(this.controlObject=='0010'&&this.OO1OValue!=''){ - this.errorMessage += ` 当前值为:`+this.OO1OValue; - this.openingPoint = this.OO1OValue; - } - } else { - this.errorMessage = ''; - this.openingPoint = ''; - } - }, + // validateInput(value) { + // const intValue = parseInt(value, 10); + // const limits = this.rangeLimits[this.controlObject]; + // if (isNaN(intValue) || intValue < limits.min || intValue > limits.max) { + // this.errorMessage = `请输入 ${limits.min}-${limits.max} 之间的数字`; + // if(this.controlObject=='000D'&&this.OOODValue!=''){ + // this.errorMessage += ` 当前值为:`+this.OOODValue; + // this.openingPoint = this.OOODValue; + // }else if(this.controlObject=='000E'&&this.OOOEValue!=''){ + // this.errorMessage += ` 当前值为:`+this.OOOEValue; + // this.openingPoint = this.OOOEValue; + // }else if(this.controlObject=='000F'&&this.OOOFValue!=''){ + // this.errorMessage += ` 当前值为:`+this.OOOFValue; + // this.openingPoint = this.OOOFValue; + // }else if(this.controlObject=='0010'&&this.OO1OValue!=''){ + // this.errorMessage += ` 当前值为:`+this.OO1OValue; + // this.openingPoint = this.OO1OValue; + // } + // } else { + // this.errorMessage = ''; + // this.openingPoint = ''; + // } + // }, onControlObjectChange(value) { console.log(value) // 当选择变化时,检查当前输入值是否仍在新的范围内 const inputValue = parseInt(this.openingPoint, 10); const limits = this.rangeLimits[value]; - if (isNaN(inputValue) || inputValue < limits.min || inputValue > limits.max) { + // if (isNaN(inputValue) || inputValue < limits.min || inputValue > limits.max) { this.errorMessage = `请选择 ${limits.min}-${limits.max} 之间的数字`; + console.log(this.OOOEValue) if(value=='000D'&&this.OOODValue!=''){ this.errorMessage += ` 当前值为:` this.openingPoint = this.OOODValue; @@ -192,7 +193,8 @@ this.errorMessage += ` 当前值为:` this.openingPoint = this.OO1OValue; } - } else { + // } + else { this.errorMessage = ''; this.openingPoint = ''; } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue index abe1fd13..47d52e60 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue @@ -8,17 +8,20 @@