diff --git a/ruoyi-ui/public/demo/jsPlugin-1.2.0.min.js b/ruoyi-ui/public/demo/jsPlugin-1.2.0.min.js index 4ade91b..f3f5257 100644 --- a/ruoyi-ui/public/demo/jsPlugin-1.2.0.min.js +++ b/ruoyi-ui/public/demo/jsPlugin-1.2.0.min.js @@ -6237,14 +6237,14 @@ } else { g = w[S].szId } - var u = '
'; + var u = '
'; for (var f = 0; f < w[_]; f++) { e = r + (f % l === l - 1 ? i : 0); t = o + (f + l >= Math.pow(l, 2) ? n : 0); var h = a + (f % l === l - 1 ? i : 0); var c = s + (f + l >= Math.pow(l, 2) ? n : 0); if (f === 1) { - u += '
' + '' + (f === 0 ? '' : "") + '' + '' + (f === 0 ? '' : "") + '' + '' + (f === 0 ? '' : "") + ' { NProgress.start() diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index e57d85d..2403c1e 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -92,6 +92,12 @@ export const constantRoutes = [ name: 'Board3', meta: { title: '看板3', icon: 'dashboard' } }, + { + path: 'index3', + component: () => import('@/views/board/index3'), + name: 'Board4', + meta: { title: '看板4', icon: 'dashboard' } + }, ] }, { diff --git a/ruoyi-ui/src/views/board/index.vue b/ruoyi-ui/src/views/board/index.vue index 751a5e7..79ab1d8 100644 --- a/ruoyi-ui/src/views/board/index.vue +++ b/ruoyi-ui/src/views/board/index.vue @@ -592,28 +592,27 @@ export default { }, methods: { getData() { - // 创建一个新的WebSocket实例 + + const socket = new WebSocket('ws://192.168.2.165:7181/ws'); -// 当WebSocket打开时触发 socket.onopen = function (event) { console.log('WebSocket 连接已打开'); }; -// 当服务器发送消息时触发 socket.onmessage = function (event) { - if (event.data.AlarmInfo) { - this.AlarmInfo = event.data.AlarmInfo + let data = JSON.parse(event.data) + if (data.AlarmInfo) { + this.AlarmInfo = data.AlarmInfo } - if (event.data.DeviceInfo) { - this.DeviceInfo = event.data.DeviceInfo + if (data.DeviceInfo) { + this.DeviceInfo = data.DeviceInfo } - if (event.data.TemParam) { - this.TemParam = event.data.TemParam + if (data.TemParam) { + this.TemParam = data.TemParam } }; -// 当WebSocket关闭时触发 socket.onclose = function (event) { console.log('WebSocket 连接已关闭'); }; diff --git a/ruoyi-ui/src/views/board/index2.vue b/ruoyi-ui/src/views/board/index2.vue index da9c3b7..30758d9 100644 --- a/ruoyi-ui/src/views/board/index2.vue +++ b/ruoyi-ui/src/views/board/index2.vue @@ -8,14 +8,14 @@
智能巡检
无线测温
动力环境
-
1
-
30
-
15
+
{{ data1.num1 }}
+
{{ data1.num2 }}
+
{{ data1.num3 }}
13℃ + style="font-weight: 600;font-size:1.3vw;">{{ data2.num1 }}℃
30℃ + style="font-weight: 600;font-size:1.3vw;">{{ data2.num2 }}℃
温度
湿度
@@ -23,9 +23,9 @@
410-1烟感
410-2烟感
噪声
-
40db +
{{ data2.num4 }}db
-
60 +
{{ data2.num3 }}
设备监控
@@ -72,7 +72,7 @@ >
- {{ item.value1 }} + {{ item.recordTime }}
{{ item.value2 }} @@ -98,6 +98,12 @@ + diff --git a/ruoyi-ui/src/views/board/monitor/monitor2.vue b/ruoyi-ui/src/views/board/monitor/monitor2.vue index 3823b1b..71ff474 100644 --- a/ruoyi-ui/src/views/board/monitor/monitor2.vue +++ b/ruoyi-ui/src/views/board/monitor/monitor2.vue @@ -1,7 +1,7 @@