Browse Source

机柜优化

develop
wangsixiang 2 weeks ago
parent
commit
2b6ac9c33b
  1. 52
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/AirConditioning.vue
  2. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue

52
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/AirConditioning.vue

@ -148,37 +148,38 @@
Message.error("请求失败,请稍后再试"); Message.error("请求失败,请稍后再试");
}); });
}, },
validateInput(value) { // validateInput(value) {
const intValue = parseInt(value, 10); // const intValue = parseInt(value, 10);
const limits = this.rangeLimits[this.controlObject]; // const limits = this.rangeLimits[this.controlObject];
if (isNaN(intValue) || intValue < limits.min || intValue > limits.max) { // if (isNaN(intValue) || intValue < limits.min || intValue > limits.max) {
this.errorMessage = `请输入 ${limits.min}-${limits.max} 之间的数字`; // this.errorMessage = ` ${limits.min}-${limits.max} `;
if(this.controlObject=='000D'&&this.OOODValue!=''){ // if(this.controlObject=='000D'&&this.OOODValue!=''){
this.errorMessage += ` 当前值为:`+this.OOODValue; // this.errorMessage += ` :`+this.OOODValue;
this.openingPoint = this.OOODValue; // this.openingPoint = this.OOODValue;
}else if(this.controlObject=='000E'&&this.OOOEValue!=''){ // }else if(this.controlObject=='000E'&&this.OOOEValue!=''){
this.errorMessage += ` 当前值为:`+this.OOOEValue; // this.errorMessage += ` :`+this.OOOEValue;
this.openingPoint = this.OOOEValue; // this.openingPoint = this.OOOEValue;
}else if(this.controlObject=='000F'&&this.OOOFValue!=''){ // }else if(this.controlObject=='000F'&&this.OOOFValue!=''){
this.errorMessage += ` 当前值为:`+this.OOOFValue; // this.errorMessage += ` :`+this.OOOFValue;
this.openingPoint = this.OOOFValue; // this.openingPoint = this.OOOFValue;
}else if(this.controlObject=='0010'&&this.OO1OValue!=''){ // }else if(this.controlObject=='0010'&&this.OO1OValue!=''){
this.errorMessage += ` 当前值为:`+this.OO1OValue; // this.errorMessage += ` :`+this.OO1OValue;
this.openingPoint = this.OO1OValue; // this.openingPoint = this.OO1OValue;
} // }
} else { // } else {
this.errorMessage = ''; // this.errorMessage = '';
this.openingPoint = ''; // this.openingPoint = '';
} // }
}, // },
onControlObjectChange(value) { onControlObjectChange(value) {
console.log(value) console.log(value)
// //
const inputValue = parseInt(this.openingPoint, 10); const inputValue = parseInt(this.openingPoint, 10);
const limits = this.rangeLimits[value]; 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} 之间的数字`; this.errorMessage = `请选择 ${limits.min}-${limits.max} 之间的数字`;
console.log(this.OOOEValue)
if(value=='000D'&&this.OOODValue!=''){ if(value=='000D'&&this.OOODValue!=''){
this.errorMessage += ` 当前值为:` this.errorMessage += ` 当前值为:`
this.openingPoint = this.OOODValue; this.openingPoint = this.OOODValue;
@ -192,7 +193,8 @@
this.errorMessage += ` 当前值为:` this.errorMessage += ` 当前值为:`
this.openingPoint = this.OO1OValue; this.openingPoint = this.OO1OValue;
} }
} else { // }
else {
this.errorMessage = ''; this.errorMessage = '';
this.openingPoint = ''; this.openingPoint = '';
} }

33
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/IntegratedCabinet/components/DeviceControlDialog.vue

@ -8,17 +8,20 @@
</div> </div>
<div class="control-unit"> <div class="control-unit">
<span>雷电计数清零</span> <span>雷电计数清零</span>
<el-switch active-color="#01AAFD" inactive-color="#bbbbbb" v-model="lightningReset" active-text="开启" inactive-text="关闭" @change="lightningResetZero"></el-switch> <Button style="margin-left: 5px" @click.native="lightningResetZero"></Button>
<!-- <el-switch active-color="#01AAFD" inactive-color="#bbbbbb" v-model="lightningReset" active-text="开启" inactive-text="关闭" @change="lightningResetZero"></el-switch> -->
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="control-unit"> <div class="control-unit">
<span>系统复位</span> <span>系统复位</span>
<el-switch active-color="#01AAFD" inactive-color="#bbbbbb" v-model="recloserReset" active-text="开启" inactive-text="关闭" @change="recloserResetSwitch"></el-switch> <Button style="margin-left: 5px" @click.native="recloserResetSwitch"></Button>
<!-- <el-switch active-color="#01AAFD" inactive-color="#bbbbbb" v-model="recloserReset" active-text="开启" inactive-text="关闭" @change="recloserResetSwitch"></el-switch> -->
</div> </div>
<div class="control-unit"> <div class="control-unit">
<span>令重合闸复位</span> <span>令重合闸复位</span>
<el-switch active-color="#01AAFD" inactive-color="#bbbbbb" v-model="reclosing" active-text="开启" inactive-text="关闭" @change="reclosingSwitch"></el-switch> <Button style="margin-left: 5px" @click.native="reclosingSwitch"></Button>
<!-- <el-switch active-color="#01AAFD" inactive-color="#bbbbbb" v-model="reclosing" active-text="开启" inactive-text="关闭" @change="reclosingSwitch"></el-switch> -->
</div> </div>
</div> </div>
</div> </div>
@ -26,6 +29,7 @@
</template> </template>
<script> <script>
import Button from "@screen/components/Buttons/Button.vue";
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue'; import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import DeviceParams from "./DeviceParams.vue"; import DeviceParams from "./DeviceParams.vue";
@ -36,6 +40,7 @@
Dialog, Dialog,
DeviceParams, DeviceParams,
Switcher, Switcher,
Button,
}, },
model: { model: {
prop: "visible", prop: "visible",
@ -153,15 +158,15 @@
}, },
lightningResetZero(e){ lightningResetZero(e){
if(e==false){ // if(e==false){
return this.lightningReset =e // return this.lightningReset =e
} // }
let text = e ==true? "开启一次" : "关闭"; let text = e ==true? "开启一次" : "关闭";
console.log(e); console.log(e);
this.$modal.confirm('确认要"' + text + '"雷电计数清零?该操作会导致设备重启,请谨慎操作').then(() => { this.$modal.confirm('确认要"' + text + '"雷电计数清零?该操作会导致设备重启,请谨慎操作').then(() => {
if(e==false){ // if(e==false){
return this.lightningReset =e // return this.lightningReset =e
} // }
return request({ return request({
url: `/business/device/functions/${this.dialogData.iotDeviceId}/TL`, url: `/business/device/functions/${this.dialogData.iotDeviceId}/TL`,
method: "post", method: "post",
@ -170,18 +175,18 @@
.then((result)=>{ .then((result)=>{
if (result.code != 200) { if (result.code != 200) {
Message.error("操作失败"); Message.error("操作失败");
this.lightningReset =!e // this.lightningReset =!e
return; return;
} }
this.$modal.msgSuccess(text + "成功,请重新打开设备弹窗"); this.$modal.msgSuccess(text + "成功,请重新打开设备弹窗");
this.lightningReset=e // this.lightningReset=e
}).catch((error)=>{ }).catch((error)=>{
console.error('请求失败:', error); console.error('请求失败:', error);
this.lightningReset = !e; // this.lightningReset = !e;
}); });
}).catch((error) => { }).catch((error) => {
console.log(e) console.log(e)
this.lightningReset =!e // this.lightningReset =!e
}); });
}, },
@ -287,7 +292,7 @@
flex-shrink: 0; /* 防止名字在容器宽度不足时缩小 */ flex-shrink: 0; /* 防止名字在容器宽度不足时缩小 */
white-space: nowrap; /* 防止名字换行 */ white-space: nowrap; /* 防止名字换行 */
/* 减少名称和开关之间的空白,可以调整这个值 */ /* 减少名称和开关之间的空白,可以调整这个值 */
margin-right: 5px; /* 之前是10px,现在改为5px */ margin-right: 0px; /* 之前是10px,现在改为5px */
} }
.el-switch { .el-switch {

Loading…
Cancel
Save