diff --git a/.env.development b/.env.development index 1f0b7c3..93b0761 100644 --- a/.env.development +++ b/.env.development @@ -11,3 +11,7 @@ VUE_APP_ST_MQTT_URL = 192.168.1.210 VUE_APP_ST_MQTT_PORT = 61614 VUE_APP_CT_MQTT_URL = vip.shuziweidao.com VUE_APP_CT_MQTT_PORT = 61614 +VUE_APP_LED_MQTT_URL = dev.yixiong-tech.com +VUE_APP_LED_MQTT_PORT = 18083 +VUE_APP_LED_MQTT_USERNAME = test +VUE_APP_LED_MQTT_PASSWORD = Yx123456 \ No newline at end of file diff --git a/.env.production b/.env.production index a58ef22..378785d 100644 --- a/.env.production +++ b/.env.production @@ -10,3 +10,7 @@ VUE_APP_ST_MQTT_URL = 192.168.1.210 VUE_APP_ST_MQTT_PORT = 61614 VUE_APP_CT_MQTT_URL = vip.shuziweidao.com VUE_APP_CT_MQTT_PORT = 61614 +VUE_APP_LED_MQTT_URL = dev.yixiong-tech.com +VUE_APP_LED_MQTT_PORT = 18083 +VUE_APP_LED_MQTT_USERNAME = test +VUE_APP_LED_MQTT_PASSWORD = Yx123456 diff --git a/package-lock.json b/package-lock.json index 6c42293..07c8af7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "process": "^0.11.10", "regenerator-runtime": "^0.14.1", "stream-browserify": "^3.0.0", + "swiper": "^5.4.5", "url": "^0.11.4", "util": "^0.12.5", "vue": "^2.6.14", @@ -4812,6 +4813,15 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/dom7": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz", + "integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==", + "license": "MIT", + "dependencies": { + "ssr-window": "^2.0.0" + } + }, "node_modules/domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz", @@ -9877,6 +9887,12 @@ "node": ">= 6" } }, + "node_modules/ssr-window": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz", + "integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A==", + "license": "MIT" + }, "node_modules/ssri": { "version": "8.0.1", "resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz", @@ -10070,6 +10086,24 @@ "node": ">= 10" } }, + "node_modules/swiper": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/swiper/-/swiper-5.4.5.tgz", + "integrity": "sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "dom7": "^2.1.5", + "ssr-window": "^2.0.0" + }, + "engines": { + "node": ">= 4.7.0" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/vladimirkharlampidi" + } + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz", @@ -14655,6 +14689,14 @@ } } }, + "dom7": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz", + "integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==", + "requires": { + "ssr-window": "^2.0.0" + } + }, "domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz", @@ -18378,6 +18420,11 @@ } } }, + "ssr-window": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz", + "integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A==" + }, "ssri": { "version": "8.0.1", "resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz", @@ -18531,6 +18578,15 @@ } } }, + "swiper": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/swiper/-/swiper-5.4.5.tgz", + "integrity": "sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==", + "requires": { + "dom7": "^2.1.5", + "ssr-window": "^2.0.0" + } + }, "tapable": { "version": "2.2.1", "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz", diff --git a/package.json b/package.json index 417e0d0..8df1aa6 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "process": "^0.11.10", "regenerator-runtime": "^0.14.1", "stream-browserify": "^3.0.0", + "swiper": "^5.4.5", "url": "^0.11.4", "util": "^0.12.5", "vue": "^2.6.14", diff --git a/src/assets/images/bigScreen/noData.png b/src/assets/images/bigScreen/noData.png new file mode 100644 index 0000000..74aa723 Binary files /dev/null and b/src/assets/images/bigScreen/noData.png differ diff --git a/src/assets/images/bigScreen/user.png b/src/assets/images/bigScreen/user.png new file mode 100644 index 0000000..d1859bd Binary files /dev/null and b/src/assets/images/bigScreen/user.png differ diff --git a/src/assets/images/led/headerNew.png b/src/assets/images/led/headerNew.png new file mode 100644 index 0000000..13a255e Binary files /dev/null and b/src/assets/images/led/headerNew.png differ diff --git a/src/utils/mqtt.js b/src/utils/mqtt.js index 1422a45..432a12f 100644 --- a/src/utils/mqtt.js +++ b/src/utils/mqtt.js @@ -3,11 +3,10 @@ import {getServeUrl} from "@/utils/serveUrl"; let mqttClient = null; -export const initMqtt = (clientId, topic, type) => { - console.log(getServeUrl(type + 'MqttUrl')); +export const initMqtt = (clientId, topic, type, {username='sw_mqtt', password='150326sw@', head='ws'}) => { return new Promise((resolve, reject) => { const url = { - head: "ws", // 必须是 ws 或 wss (mqtt:// 或 mqtts:// 必须让后端开放websocket服务) + head: head, // 必须是 ws 或 wss (mqtt:// 或 mqtts:// 必须让后端开放websocket服务) host: getServeUrl(type + 'MqttUrl'), // 服务地址 port: getServeUrl(type + 'MqttPORT'), // 服务端口 tailPath: "mqtt", // 服务路径 @@ -15,8 +14,8 @@ export const initMqtt = (clientId, topic, type) => { const options = { clientId: clientId, - username: "sw_mqtt", - password: "150326sw@", + username: username, + password: password, // keepalive: 60, clean: true, cleanSession: true, diff --git a/src/utils/serveUrl.js b/src/utils/serveUrl.js index 30e64ad..51c5b61 100644 --- a/src/utils/serveUrl.js +++ b/src/utils/serveUrl.js @@ -19,6 +19,12 @@ const getServeUrl = function(type) { case 'ctMqttPORT': serveUrl = process.env.VUE_APP_CT_MQTT_PORT; break; + case 'ledMqttUrl': + serveUrl = process.env.VUE_APP_LED_MQTT_URL; + break; + case 'ledMqttPORT': + serveUrl = process.env.VUE_APP_LED_MQTT_PORT; + break; } return serveUrl; }; diff --git a/src/views/dataBoard/dataBoard.vue b/src/views/dataBoard/dataBoard.vue index 85991da..0395b91 100644 --- a/src/views/dataBoard/dataBoard.vue +++ b/src/views/dataBoard/dataBoard.vue @@ -8,27 +8,45 @@
- 陈*夏 89分 第一名;
-
- 张* 88分 第一名;
-
- 陈知夏 86分 第一名;
+
+
@@ -78,54 +92,352 @@
{{index+1}}
+
+
+
+
+
+
+
+
+
+
+