diff --git a/public/VideoWeb/Build/APP.data.unityweb b/public/VideoWeb/Build/APP.data.unityweb index d98add8..67ae382 100644 Binary files a/public/VideoWeb/Build/APP.data.unityweb and b/public/VideoWeb/Build/APP.data.unityweb differ diff --git a/public/VideoWeb/Build/APP.framework.js.unityweb b/public/VideoWeb/Build/APP.framework.js.unityweb index 09869d8..c08bb40 100644 Binary files a/public/VideoWeb/Build/APP.framework.js.unityweb and b/public/VideoWeb/Build/APP.framework.js.unityweb differ diff --git a/public/VideoWeb/Build/APP.wasm.unityweb b/public/VideoWeb/Build/APP.wasm.unityweb index d259409..89c8076 100644 Binary files a/public/VideoWeb/Build/APP.wasm.unityweb and b/public/VideoWeb/Build/APP.wasm.unityweb differ diff --git a/src/components/newchart/avgChart.vue b/src/components/newchart/avgChart.vue index c2fb5d2..783bf20 100644 --- a/src/components/newchart/avgChart.vue +++ b/src/components/newchart/avgChart.vue @@ -239,8 +239,8 @@ export default { }); } }, - deep: true - // immediate: true + deep: true, + immediate: true } } }; diff --git a/src/components/newchart/barChart.vue b/src/components/newchart/barChart.vue index 19a9908..6716b9f 100644 --- a/src/components/newchart/barChart.vue +++ b/src/components/newchart/barChart.vue @@ -54,11 +54,13 @@ export default { created() {}, methods: { drawBar(newVal) { + let xData = [], + yData = []; if (newVal && newVal.type_data && newVal.type_data.length > 0) { - var xData = newVal.type_data.map((ele) => { + xData = newVal.type_data.map((ele) => { return getNameFromTargetType(ele.name); }); - var yData = newVal.type_data.map((ele) => { + yData = newVal.type_data.map((ele) => { return ele.quantity; }); } @@ -104,9 +106,8 @@ export default { splitArea: { show: false }, - axisLine: { - show: true + show: yData.length == 0 ? false : true }, axisTick: { show: false @@ -154,8 +155,8 @@ export default { }); } }, - deep: true - // immediate: true + deep: true, + immediate: true } } }; diff --git a/src/components/newchart/lineChart.vue b/src/components/newchart/lineChart.vue index b0e1d96..5818f18 100644 --- a/src/components/newchart/lineChart.vue +++ b/src/components/newchart/lineChart.vue @@ -436,8 +436,8 @@ export default { }); } }, - deep: true - // immediate: true + deep: true, + immediate: true } } }; diff --git a/src/components/newchart/thermalChart.vue b/src/components/newchart/thermalChart.vue index 0c3c69e..eb3cf2a 100644 --- a/src/components/newchart/thermalChart.vue +++ b/src/components/newchart/thermalChart.vue @@ -204,8 +204,8 @@ export default { }); } }, - deep: true - // immediate: true + deep: true, + immediate: true } } }; diff --git a/src/main.js b/src/main.js index 46173b9..0bbff4b 100644 --- a/src/main.js +++ b/src/main.js @@ -86,12 +86,13 @@ window.PubScribe = function (topic, number, _callback, other = false, fromName = if (client != null) { console.log('client', client) client.unsubscribe(currentTopics); + console.log("取消上次订阅主题", currentTopics) currentTopics = null; } } if (client == null) { if (other == false) { - console.log("topic", topic) + console.log("首次链接订阅主题topic", topic) currentTopics = topic; client = mqtt.createConnect(() => { client.subscribe(topic, { @@ -126,7 +127,7 @@ window.PubScribe = function (topic, number, _callback, other = false, fromName = }); } else { if (topic != null) { - console.log("topic", topic) + console.log("融合的订阅主题topic", topic) currentTopics = topic; client = mqtt.createConnect(() => { client.subscribe(topic, { @@ -156,7 +157,7 @@ window.PubScribe = function (topic, number, _callback, other = false, fromName = } else { if (topic != null) { - console.log("topic", topic) + console.log("已链接成功后订阅主题topic", topic) currentTopics = topic; mqtt.MySub(() => { client.subscribe(currentTopics, { diff --git a/src/utils/mqttConfig.js b/src/utils/mqttConfig.js index e536b73..4b05e57 100644 --- a/src/utils/mqttConfig.js +++ b/src/utils/mqttConfig.js @@ -16,8 +16,8 @@ class mqttHandle { endpoint: "/mqtt", clean: true, // 保留会话 cleanSession: true, - connectTimeout: 7000, // 超时时间 - reconnectPeriod: 7000, // 重连时间间隔 + connectTimeout: 5000, // 超时时间 + reconnectPeriod: 3000, // 重连时间间隔 host: ip, port: '10087', // 认证信息 @@ -87,6 +87,7 @@ class mqttHandle { this.mqttClient.on('reconnect', (error) => { console.log('正在重连') }) + this.mqttClient.on("error", (error) => { console.log("Connection failed"); }); diff --git a/src/views/AnalysisMain.vue b/src/views/AnalysisMain.vue index 58f233d..bbeb1d6 100644 --- a/src/views/AnalysisMain.vue +++ b/src/views/AnalysisMain.vue @@ -321,7 +321,8 @@ export default { //console.log('this.videoTypeForm.videoType', this.videoTypeForm.videoType); //创建链接,接收数据 if (this.videoTypeForm.videoType == '实时视频') { - this.topicSends = ['hert', 'img0', 'img1', 'img2', 'img3', 'img4', 'img5', 'img6', 'img7', 'Contorl_server']; + // this.topicSends = ['hert', 'img0', 'img1', 'img2', 'img3', 'img4', 'img5', 'img6', 'img7', 'Contorl_server']; + this.topicSends = ['hert', 'Contorl_server']; //console.log('this.videoTypeForm.videoType', this.videoTypeForm.videoType); // console.log('在AnalysisMain分析页面') window.PubScribe(this.topicSends, -1, this.realInfo, false, 'videoId'); diff --git a/src/views/bounced/dataBoard.vue b/src/views/bounced/dataBoard.vue index 9541d44..d3df0f8 100644 --- a/src/views/bounced/dataBoard.vue +++ b/src/views/bounced/dataBoard.vue @@ -81,6 +81,7 @@