diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 9ce5484..0909f35 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -300,6 +300,12 @@ .table-title .title-text { font-size: 16px; margin-left: 15px; + display: flex; + align-items: center; +} + +.table-title .title-text img { + margin-right: 5px; } .index { @@ -413,8 +419,16 @@ white-space: nowrap; } +.index .header .header-warning { + width: 75px; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + .index .header .header-right { - width: 335px; + width: 260px; display: flex; align-items: center; padding-right: 20px; diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index b42427d..1d53707 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -327,6 +327,11 @@ .title-text { font-size: 16px; margin-left: 15px; + display: flex; + align-items: center; + img{ + margin-right: 5px; + } } } @@ -440,9 +445,15 @@ } } - + .header-warning{ + width: 75px; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + } .header-right { - width: 335px; + width: 260px; display: flex; align-items: center; padding-right: 20px; diff --git a/src/assets/img/sunrise.png b/src/assets/img/sunrise.png new file mode 100644 index 0000000..4f425ea Binary files /dev/null and b/src/assets/img/sunrise.png differ diff --git a/src/assets/img/sunset.png b/src/assets/img/sunset.png new file mode 100644 index 0000000..3c3d597 Binary files /dev/null and b/src/assets/img/sunset.png differ diff --git a/src/assets/img/warning.gif b/src/assets/img/warning.gif new file mode 100644 index 0000000..e3a2a0a Binary files /dev/null and b/src/assets/img/warning.gif differ diff --git a/src/views/index.vue b/src/views/index.vue index 3c97861..a271fb0 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -4,7 +4,11 @@
+
+
+ +
@@ -93,7 +97,8 @@ export default { loading: true,//页面加载 IDTimer: null, deviceId: '', - limitUserId: [] + limitUserId: [], + statusData:[] } }, watch: { @@ -188,7 +193,8 @@ export default { //获取设备 getEqbyid(selTrue) { var userInfo =localStorage.getItem('userInfo')? JSON.parse(localStorage.getItem('userInfo')):{userid:-1} - this.api.getEqbyid(userInfo.userid).then((res) => { + var store=this.$store.state + this.api.getEqbyid(userInfo.userid).then((res) => { if (res.data.code == 200) { this.$store.state.equipmentList = res.data.data.map((item, index) => { return { @@ -242,7 +248,15 @@ export default { }) this.gerRouter() this.getByid() - + var data = { + deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, + }; + this.api.getControlGetState(data).then(res=>{ + if(res.data.code==200){ + this.statusData = res.data.data; + + } + }) } }) }, diff --git a/src/views/page/alarmSettings.vue b/src/views/page/alarmSettings.vue index 3c5fff5..da19e08 100644 --- a/src/views/page/alarmSettings.vue +++ b/src/views/page/alarmSettings.vue @@ -428,8 +428,7 @@ export default { regAddress: code, num: el.target.value, }; //避免开启多个计时器 - if (this.timer) { - this.timer && clearInterval(this.timer); + if (store.nowInput != el.target.value) { this.changeData(data); } diff --git a/src/views/page/realTime.vue b/src/views/page/realTime.vue index 6f578db..01f6dae 100644 --- a/src/views/page/realTime.vue +++ b/src/views/page/realTime.vue @@ -92,8 +92,8 @@
设备运行状态 -
日出:{{ sunrise }}
-
日落:{{ sunset }}
+
日出:{{ sunrise }}
+
日落:{{ sunset }}
diff --git a/src/views/page/sunroofControl.vue b/src/views/page/sunroofControl.vue index a207b87..c150f55 100644 --- a/src/views/page/sunroofControl.vue +++ b/src/views/page/sunroofControl.vue @@ -58,6 +58,12 @@ +
+
+
PID计算结果
+ +
@@ -193,6 +199,7 @@ export default { data() { return { inputData: [], + statusData:[], startList: [21250, 21273, 21296, 21319],//每个阀门的起始参数 indexs: 1, actList1: [], @@ -330,6 +337,7 @@ export default { var data = { deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, }; + var equipmentId = store.equipmentList[store.equipmentIndex - 1].deviceId this.api.readskylight(data).then(res => { if (res.data.code == 200) { this.inputData = res.data.data; @@ -344,6 +352,12 @@ export default { this.getActive1() } }) + this.api.getControlGetState(data).then(res=>{ + if(res.data.code==200){ + this.statusData = res.data.data; + + } + }) }, //二进制转换后的补全 padString(str, length) {