diff --git a/.env.development b/.env.development index 8e968ab..8253cfb 100644 --- a/.env.development +++ b/.env.development @@ -7,9 +7,9 @@ ENV = 'development' # 开发环境 # VUE_APP_BASE_API = '/dev-api' # 后台 -# VUE_APP_BASE_API = 'http://192.168.1.222:8080' +VUE_APP_BASE_API = 'http://192.168.1.222:8080' # 云端 -VUE_APP_BASE_API = 'http://106.55.173.225:8090' +# VUE_APP_BASE_API = 'http://106.55.173.225:8090' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/src/views/aircAndWindc/awSysMonitor/index.vue b/src/views/aircAndWindc/awSysMonitor/index.vue index 9a01703..2e26a6e 100644 --- a/src/views/aircAndWindc/awSysMonitor/index.vue +++ b/src/views/aircAndWindc/awSysMonitor/index.vue @@ -130,29 +130,23 @@ -
-
风机变频控制
- - - -
-
+
-
风机运行状态
- - +
风机故障状态:
+
正常
+ +
+
+
风机运行状态:
+ +
不运行
+
+
风机压差:
+
10v
+
+
+
风机手自动状态
-
-
风机故障状态
- - -
@@ -223,6 +205,10 @@
+
风阀反馈
+
11%
+
+
风阀调节
{ this.hadleOperationConrol(item.cpmId, item.curValue); - // 失去焦点 - event.target.blur(); this.currentFocusIndex = ""; }) .catch(() => { diff --git a/src/views/centerairC/deviceStrategy/index.vue b/src/views/centerairC/deviceStrategy/index.vue index 226ed5a..76b00a5 100644 --- a/src/views/centerairC/deviceStrategy/index.vue +++ b/src/views/centerairC/deviceStrategy/index.vue @@ -20,22 +20,21 @@ v-model="children.curValue" placeholder="请输入" size="mini" - @keyup.enter.native="handleEnter(children)" + @keyup.enter.native="handleEnter(children, $event)" @input="handleInput(children)" + @blur="handleBlur()" > -
- - {{ option.pointName }} + + - -
+ + +
{{ children.unit }}
@@ -52,6 +51,7 @@
+
注:请停机状态下选择
@@ -73,6 +73,14 @@ export default { this.getPolicyList(); }, methods: { + // select数组 + getOptions(min, max) { + const options = []; + for (let i = min; i <= max; i++) { + options.push(i); + } + return options; + }, // 如果有radio,则需要改变policy类名的样式了 hasRadioInput(values) { return values.some((child) => child.inputType === "radio"); @@ -140,8 +148,14 @@ export default { children.curValue = parts[0] + "." + parts[1].slice(0, 2); } }, - handleEnter(children) { + // 失去焦点 + handleBlur() { + // this.currentFocusIndex = ""; + }, + handleEnter(children, event) { console.log("请求后端", children); + // 失去焦点 + event.target.blur(); this.$confirm( `确定要修改"${children.pointName}"的数据为:${children.curValue} ${children.unit}吗?`, "提示", @@ -160,25 +174,99 @@ export default { }); }, handleRadioChange(children, item) { - this.$confirm( - `确定要修改"${item.name}"的数据为:${children.curValue} ${children.unit}吗?`, - "提示", - { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - } - ) - .then(() => { - console.log("children.curValue", children.curValue); - if (children.curValue) { - this.hadleOperationConrol(children.cpmId, "1"); + if (children.curValue === "定时模式") { + // 请求设备定时开关的列表数据,保证定时设置有开启状态 + let data = { + systemType: "0", + funPolicyType: "3", + }; + policyListData(data) + .then((res) => { + console.log("策略返回res", res); + if (res.code == 200) { + let timeList = res.rows; + // 定义一个函数来检查 timeList 中是否存在符合条件的对象 + function checkTimeList() { + for (let i = 0; i < timeList.length; i++) { + let values = timeList[i].values; + for (let j = 0; j < values.length; j++) { + if ( + values[j].pointName === "启停标志" && + values[j].curValue === 1 + ) { + return true; + } + } + } + return false; + } + // 调用函数并获取结果 + let result = checkTimeList(); + console.log("是否有开启的标志", result); + if (result) { + // 有开启标志的话就可以开启定时模式 + this.$confirm( + `确定要修改"${item.name}"的数据为:${children.curValue} ${children.unit}吗?`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ) + .then(() => { + console.log("children.curValue", children.curValue); + if (children.curValue) { + this.hadleOperationConrol(children.cpmId, "1"); + } + }) + .catch(() => { + // 用户取消操作,需要更新原来的数据 + children.curValue = "0"; + }); + } else { + this.$confirm( + `当前设备定时开关都为停用状态,是否去开启?`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + } + ) + .then(() => { + // 没有开启标志的话就跳转到设备定时开关去开启 + this.$router.push("/centerairC/strategy/timeSwitch"); + }) + .catch(() => { + // 用户取消操作,需要更新原来的数据 + children.curValue = "0"; + }); + } + } + }) + .catch((error) => {}); + } else { + this.$confirm( + `确定要修改"${item.name}"的数据为:${children.curValue} ${children.unit}吗?`, + "提示", + { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", } - }) - .catch(() => { - // 用户取消操作,需要更新原来的数据 - children.curValue = "0"; - }); + ) + .then(() => { + console.log("children.curValue", children.curValue); + if (children.curValue) { + this.hadleOperationConrol(children.cpmId, "1"); + } + }) + .catch(() => { + // 用户取消操作,需要更新原来的数据 + children.curValue = "0"; + }); + } }, hadleOperationConrol(id, param) { let data = { diff --git a/src/views/centerairC/sysControl/index.vue b/src/views/centerairC/sysControl/index.vue index ff41214..948de21 100644 --- a/src/views/centerairC/sysControl/index.vue +++ b/src/views/centerairC/sysControl/index.vue @@ -30,6 +30,7 @@ :deviceList="hostList" :isNoShowHz="true" @operationControl="hadleOperationConrol" + @upList="getOperationList" >
@@ -49,7 +50,9 @@
@@ -64,6 +67,7 @@
@@ -72,6 +76,7 @@
@@ -182,7 +187,7 @@ export default { !child.name.includes("阀") ) { deviceItem.automaticText = - Number(child.value) == 0 ? true : false; + Number(child.value) == 0 ? false : true; deviceItem.automaticId = child.id; } // 故障报警 @@ -213,6 +218,13 @@ export default { else if (child.paramType === "4") { deviceItem.frequency = child.value; } + // 运行时间 + else if ( + child.paramType === "26" && + !child.name.includes("阀") + ) { + deviceItem.time = child.value; + } // 阀门的-手自动切换 else if ( @@ -220,7 +232,7 @@ export default { child.name.includes("阀") ) { valveItem.automaticText = - Number(child.value) == 0 ? true : false; + Number(child.value) == 0 ? false : true; valveItem.automaticId = child.id; } // 阀门的-手动控制 @@ -232,7 +244,6 @@ export default { Number(child.value) == 0 ? false : true; valveItem.controlId = child.id; } - // 记录阀关到位状态 if ( child.name.includes("阀关到位") && diff --git a/src/views/centerairC/sysControl/listHeader.vue b/src/views/centerairC/sysControl/listHeader.vue index 513f026..200f524 100644 --- a/src/views/centerairC/sysControl/listHeader.vue +++ b/src/views/centerairC/sysControl/listHeader.vue @@ -3,12 +3,13 @@
设备名称
运行状态
-
手动控制
手自动切换
-
本地远程状态
+
手动控制
+
本地远程状态
故障报警
频率调节
频率反馈
+
运行时间
{{ item.name }}
@@ -20,28 +21,28 @@
-
+
+ +
{{ item.time }}小时
@@ -85,6 +91,10 @@ export default { type: Boolean, default: () => false, }, + isNoShowlocalRemote: { + type: Boolean, + default: () => false, + }, }, methods: { // 处理输入事件,过滤非数字字符 @@ -93,8 +103,14 @@ export default { // 实时校验并过滤非数字字符 item.frequencySet = String(item.frequencySet).replace(/[^\d]/g, ""); }, - handleEnter(item) { + // 失去焦点 + handleBlur() { + // this.currentFocusIndex = ""; + }, + handleEnter(item, event) { console.log("请求后端"); + // 失去焦点 + event.target.blur(); this.$confirm( `确定要修改"${item.name}"的频率为:${item.frequencySet} Hz吗?`, "提示", @@ -110,7 +126,7 @@ export default { }) .catch(() => { // 用户取消操作,需要更新原来的频率 - this.getOperationList(); + this.$emit("upList"); }); }, //手动控制 @@ -147,7 +163,7 @@ export default { handleAutomaticText(item) { this.$confirm( `确定要切换设备"${item.name}"的状态为:${ - item.automaticText ? "自动" : "手动 吗?" + item.automaticText ? "手动" : "自动 吗?" }`, "提示", { @@ -161,9 +177,9 @@ export default { console.log("请求后台", item.automaticText); let param = null; if (item.automaticText) { - param = 0; - } else { param = 1; + } else { + param = 0; } this.$emit("operationControl", item.automaticId, param); }) diff --git a/src/views/centerairC/sysControl/vavleheader.vue b/src/views/centerairC/sysControl/vavleheader.vue index 7da8713..cdf7a29 100644 --- a/src/views/centerairC/sysControl/vavleheader.vue +++ b/src/views/centerairC/sysControl/vavleheader.vue @@ -2,8 +2,8 @@
设备名称
-
手动控制
手自动切换
+
手动控制
阀开反馈
阀关反馈
@@ -12,24 +12,24 @@
@@ -93,7 +93,7 @@ export default { handleAutomaticText(item) { this.$confirm( `确定要切换设备"${item.name}"的状态为:${ - item.automaticText ? "自动" : "手动 吗?" + item.automaticText ? "手动" : "自动 吗?" }`, "提示", { @@ -107,9 +107,9 @@ export default { console.log("请求后台", item.automaticText); let param = null; if (item.automaticText) { - param = 0; - } else { param = 1; + } else { + param = 0; } // 触发自定义事件 operationControl,并传递两个参数 this.$emit("operationControl", item.automaticId, param); diff --git a/src/views/centerairC/sysMonitor/index.vue b/src/views/centerairC/sysMonitor/index.vue index e44d8ea..c864bf4 100644 --- a/src/views/centerairC/sysMonitor/index.vue +++ b/src/views/centerairC/sysMonitor/index.vue @@ -81,7 +81,7 @@ src="../../../assets/images/haiwang.png" alt="" /> - +
{{ hostList[0].deviceName }}
@@ -96,6 +96,7 @@ alt="" :class="{ moveClass: hostListRunClass(0) }" /> +
11%
1#冷却水流: @@ -123,6 +124,7 @@ :lineWidth2="100" class="host-line1" > +
{{ hostList[1].deviceName }}
@@ -137,6 +139,7 @@ alt="" :class="{ moveClass: hostListRunClass(1) }" /> +
11%
2#冷却水流: @@ -164,7 +167,7 @@ :lineWidth2="300" class="host-line2" > - +
{{ hostList[2].deviceName }}
@@ -181,6 +184,8 @@ alt="" :class="{ moveClass: hostListRunClass(2) }" /> + +
11%
@@ -210,6 +215,7 @@ :lineWidth2="490" class="host-line3" > +
1#
2#
@@ -282,9 +288,16 @@ {{ freezingPumpHz2 }}Hz
-
3#
-
2#
-
1#
+
3#-1
+
2#-2
+
2#-1
+
1#-2
+
1#-1
+
50Hz
+
50Hz
+
50Hz
+
50Hz
+
50Hz
+ +
20℃
+
20℃
+ +
20kpa
+
20kpa
@@ -1092,6 +1111,38 @@ export default { height: 0.6rem; z-index: 10; } + .freezingInTem { + z-index: 10; + position: absolute; + top: 4.54rem; + right: 5.4rem; + font-size: 0.14rem; + font-weight: bold; + } + .freezingOutTem { + z-index: 10; + position: absolute; + top: 5.2rem; + right: 3.8rem; + font-size: 0.14rem; + font-weight: bold; + } + .freezingInPre { + z-index: 10; + position: absolute; + top: 5rem; + right: 5.3rem; + font-size: 0.14rem; + font-weight: bold; + } + .freezingOutPre { + z-index: 10; + position: absolute; + top: 5.7rem; + right: 3.7rem; + font-size: 0.14rem; + font-weight: bold; + } .host-line1 { position: absolute; left: -0.96rem; @@ -1190,6 +1241,30 @@ export default { transform-style: preserve-3d; transform: translateX(-50%) rotateX(15deg) rotateZ(0deg); } + .hostLoad1 { + z-index: 10; + position: absolute; + top: 6.2rem; + left: 3rem; + font-size: 0.14rem; + font-weight: bold; + } + .hostLoad2 { + z-index: 10; + position: absolute; + top: 5.42rem; + left: 5rem; + font-size: 0.14rem; + font-weight: bold; + } + .hostLoad3 { + z-index: 10; + position: absolute; + top: 4.52rem; + left: 7.1rem; + font-size: 0.14rem; + font-weight: bold; + } .water-flow1 { z-index: 10; position: absolute; @@ -1436,32 +1511,105 @@ export default { font-size: 0.14rem; font-weight: bold; } - .coolingTower1 { + .coolingTower3 { + z-index: 10; + font-size: 0.18rem; + color: #46f1e3; + position: absolute; + top: 1.8rem; + left: 5.05rem; + font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); + } + .coolingTower22 { z-index: 10; font-size: 0.18rem; color: #46f1e3; position: absolute; - top: 1.78rem; - left: 5.1rem; + top: 1.5rem; + left: 5.98rem; font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); } - .coolingTower2 { + .coolingTower21 { z-index: 10; font-size: 0.18rem; color: #46f1e3; position: absolute; - top: 1.42rem; - left: 6.3rem; + top: 1.38rem; + left: 6.42rem; font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); } - .coolingTower3 { + .coolingTower12 { z-index: 10; font-size: 0.18rem; color: #46f1e3; position: absolute; - top: 1.07rem; - left: 7.52rem; + top: 1.1rem; + left: 7.3rem; + font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); + } + .coolingTower11 { + z-index: 10; + font-size: 0.18rem; + color: #46f1e3; + position: absolute; + top: 1rem; + left: 7.7rem; + font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); + } + .colingTowerHz11 { + z-index: 10; + font-size: 0.14rem; + color: #ffffff; + position: absolute; + top: -0.1rem; + left: 7.32rem; + font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); + } + .colingTowerHz12 { + z-index: 10; + font-size: 0.14rem; + color: #ffffff; + position: absolute; + top: 0.033rem; + left: 6.8rem; + font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); + } + .colingTowerHz21 { + z-index: 10; + font-size: 0.14rem; + color: #ffffff; + position: absolute; + top: 0.24rem; + left: 6rem; + font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); + } + .colingTowerHz22 { + z-index: 10; + font-size: 0.14rem; + color: #ffffff; + position: absolute; + top: 0.37rem; + left: 5.5rem; + font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); + } + .colingTowerHz3 { + z-index: 10; + font-size: 0.14rem; + color: #ffffff; + position: absolute; + top: 0.64rem; + left: 4.4rem; font-weight: bold; + transform: rotateX(20deg) rotateY(-25deg) rotateZ(-5deg); } /* 定义灯闪烁的动画 */ @keyframes blink { diff --git a/src/views/centerairC/timeSwitch/index.vue b/src/views/centerairC/timeSwitch/index.vue index c6d3126..d6c8c12 100644 --- a/src/views/centerairC/timeSwitch/index.vue +++ b/src/views/centerairC/timeSwitch/index.vue @@ -19,14 +19,14 @@
:
@@ -34,14 +34,14 @@
:
@@ -51,7 +51,7 @@ active-color="#13ce66" inactive-color="#ff4949" active-text="开启" - inactive-text="禁用" + inactive-text="停用" v-model="item.delayStatus" @change="handleStatus(item)" > @@ -190,7 +190,9 @@ export default { } item[propertyName] = inputValue; }, - handleEnter(item, name) { + handleEnter(item, name, event) { + // 失去焦点 + event.target.blur(); let id = ""; let value = ""; let title = ""; @@ -275,7 +277,7 @@ export default { handleStatus(item) { this.$confirm( `确定要切换"${item.name}"的状态为:${ - item.delayStatus ? "开启" : "禁用 吗?" + item.delayStatus ? "开启" : "停用 吗?" }`, "提示", { diff --git a/src/views/temSys/temMonitor/index.vue b/src/views/temSys/temMonitor/index.vue index b20acaf..aaaf6f4 100644 --- a/src/views/temSys/temMonitor/index.vue +++ b/src/views/temSys/temMonitor/index.vue @@ -1,13 +1,263 @@ - \ No newline at end of file +::-webkit-scrollbar-track { + background: transparent !important; /* 滚动条轨道背景色 */ +} +.custom-tree-node { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + font-size: 14px; + padding-right: 8px; + .tree-left { + .custom-tree-icon { + margin-right: 5px; + } + } +} + +