diff --git a/public/VideoWeb/Build/APP.data.unityweb b/public/VideoWeb/Build/APP.data.unityweb index 65a13bc..ac30a3b 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 e1c2c7c..4b0bd60 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 dac6faf..eaebedb 100644 Binary files a/public/VideoWeb/Build/APP.wasm.unityweb and b/public/VideoWeb/Build/APP.wasm.unityweb differ diff --git a/public/VideoWeb/index.html b/public/VideoWeb/index.html index f477df8..d826370 100644 --- a/public/VideoWeb/index.html +++ b/public/VideoWeb/index.html @@ -38,7 +38,7 @@ var canvas = document.querySelector("#unity-canvas"); var loadingBar = document.querySelector("#unity-loading-bar"); var progressBarFull = document.querySelector("#unity-progress-bar-full"); - var fullscreenButton = document.querySelector("#unity-fullscreen-button"); + // var fullscreenButton = document.querySelector("#unity-fullscreen-button"); var warningBanner = document.querySelector("#unity-warning"); var black = document.querySelector("#black"); // Shows a temporary message banner/ribbon for a few seconds, or diff --git a/src/components/chart/lineChart.vue b/src/components/chart/lineChart.vue index 6a86f59..328f32d 100644 --- a/src/components/chart/lineChart.vue +++ b/src/components/chart/lineChart.vue @@ -25,6 +25,18 @@ export default { name: 'lineChart', //折线图组件 props: { + itemData: { + type: Object, + default() { + return {}; + } + }, + originalDataArr: { + type: Array, + default() { + return []; + } + }, list: { type: Array, default() { @@ -78,6 +90,7 @@ export default { }; }, created() { + // console.log(this.componentName + '-' + JSON.stringify(this.itemData)); // console.log( this.componentName + '-' + this.chartName + '-' + '曲线图','40'); }, @@ -237,18 +250,32 @@ export default { }); series[0].data = mapNR1; } else if (title === '速度') { + let unit = 'km/h'; + if (this.originalDataArr.length > 0) { + if (this.originalDataArr[0].speed >= 0) { + unit = 'km/h'; + } else { + unit = 'pix/s'; + } + } this.tooltip = { - formatter: '{a} {b}:{c}km/h', + formatter: `{a} {b}:{c}${unit}`, show: true, confine: true }; - this.name = 'km/h'; - // console.log("newVal",newVal) + this.name = unit; + // console.log(this.status + '-速度-' + JSON.stringify(newVal)); series[0].data = newVal.map((val) => { + if (val.speed == -1) { + return '-'; + } return val.speed; }); } else if (title === '流量') { - this.name = '辆/10秒'; + this.name = '辆'; + if (this.status != '实时触发') { + this.name = `辆/${this.itemData.cycleInterval}${this.itemData.unit}`; + } series[0].data = newVal.map((ele) => { return ele.in_flow + ele.out_flow; }); @@ -268,6 +295,9 @@ export default { }); } else if (title === '排队数') { this.name = '辆'; + if (this.status != '实时触发') { + this.name = `辆/${this.itemData.cycleInterval}${this.itemData.unit}`; + } series[0].data = newVal.map((val) => { // return val.n_queue; if (timeMode == '固定间隔') { @@ -278,6 +308,9 @@ export default { }); } else if (title === '检测数') { this.name = '辆'; + if (this.status != '实时触发') { + this.name = `辆/${this.itemData.cycleInterval}${this.itemData.unit}`; + } series[0].data = newVal.map((val) => { if (timeMode == '固定间隔') { return val.ave_stay; diff --git a/src/components/sensorFusion/echartsLine.vue b/src/components/sensorFusion/echartsLine.vue index cd146aa..f9f3c93 100644 --- a/src/components/sensorFusion/echartsLine.vue +++ b/src/components/sensorFusion/echartsLine.vue @@ -1,456 +1,480 @@ diff --git a/src/components/sensorFusion/echartsPie.vue b/src/components/sensorFusion/echartsPie.vue index cd783eb..dc47f8c 100644 --- a/src/components/sensorFusion/echartsPie.vue +++ b/src/components/sensorFusion/echartsPie.vue @@ -56,9 +56,6 @@ export default { initEcharts() { let seriesData = null; let myChart = this.chart; - - console.log('initEcharts',this.dataList) - if (this.timeMode == "实时触发") { seriesData = null; this.renameField(this.dataList[0].type_data, "quantity", "value"); diff --git a/src/components/target/typeChart.vue b/src/components/target/typeChart.vue index b7c3160..694ae32 100644 --- a/src/components/target/typeChart.vue +++ b/src/components/target/typeChart.vue @@ -214,19 +214,21 @@
- +
- +
0) { + let newlist = JSON.parse(JSON.stringify(this.newDataArr)); + for (const item of newlist) { + if (!isNaN(item.speed) && (item.speed !== -1 || item.speed === 0)) { + item.speed = Math.abs(item.speed); + } else { + item.speed = '-'; + } + + if (!isNaN(item.flow) && (item.headway !== -1 || item.headway === 0)) { + item.flow = item.flow; + } else { + item.flow = '-'; + } + + if (!isNaN(item.headway) && (item.headway !== -1 || item.headway === 0)) { + item.headway = item.headway; + } else { + item.headway = '-'; + } + + if (!isNaN(item.n_stay) && (item.n_stay !== -1 || item.n_stay === 0)) { + item.n_stay = item.n_stay; + } else { + item.n_stay = '-'; + } + + if (!isNaN(item.n_queue) && (item.n_queue !== -1 || item.n_queue === 0)) { + item.n_queue = item.n_queue; + } else { + item.n_queue = '-'; + } + if (!isNaN(item.ave_queue) && (item.ave_queue !== -1 || item.ave_queue === 0)) { + item.n_queue = item.ave_queue; + } else { + item.ave_queue = '-'; + } + + if (!isNaN(item.ave_delay) && (item.ave_delay !== -1 || item.ave_delay === 0)) { + item.ave_delay = item.ave_delay; + } else { + item.ave_delay = '-'; + } + if (!isNaN(item.in_spd) && (item.in_spd !== -1 || item.in_spd === 0)) { + item.in_spd = item.in_spd; + } else { + item.in_spd = '-'; + } + if (!isNaN(item.out_spd) && (item.out_spd !== -1 || item.out_spd === 0)) { + item.out_spd = item.out_spd; + } else { + item.out_spd = '-'; + } + arr.push(Object.assign({}, item)); + } + } + // console.log('triggerType',this.triggerType) + // console.log('newDataArrAbs2', arr); + return arr; + } }, mounted() {}, watch: { diff --git a/src/views/AnalysisMain.vue b/src/views/AnalysisMain.vue index 01300d6..25c13b0 100644 --- a/src/views/AnalysisMain.vue +++ b/src/views/AnalysisMain.vue @@ -239,14 +239,14 @@ export default { //离开当前页面后执行 destroyed: function () { - // console.log("离开当前页") + // //console.log("离开当前页") // client.end(); }, created() { this.getVideoList(); }, mounted() { - console.log(localStorage.getItem('roleName'), 'session存储'); + //console.log(localStorage.getItem('roleName'), 'session存储'); if (localStorage.getItem('roleName') == '系统管理员') { this.disable = false; } else { @@ -260,7 +260,7 @@ export default { if (newVal) { newVal.forEach((item) => { if (item.status == '加载中') { - console.log('加载中', item); + //console.log('加载中', item); setTimeout(() => { this.getVideoList(); }, 10000); @@ -291,14 +291,14 @@ export default { } }) .catch((err) => { - console.log(err); + //console.log(err); }); }, changeChepai() {}, //传输视频源类型 SetVideoMode(val) { getSetVideoMode({ Mode: val }).then((res) => { - console.log('res', res); + //console.log('res', res); }); }, changeRadio() { @@ -307,21 +307,21 @@ export default { //获取视频源类型 getVideoType() { getVideoMode().then((res) => { - console.log('res', res.data.data); + //console.log('res', res.data.data); this.videoTypeForm.videoType = res.data.data; }); }, /** 创建mqtt */ createMqtt() { - console.log('this.videoTypeForm.videoType', this.videoTypeForm.videoType); + //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']; - console.log('this.videoTypeForm.videoType', this.videoTypeForm.videoType); + //console.log('this.videoTypeForm.videoType', this.videoTypeForm.videoType); window.PubScribe(this.topicSends, -1, this.realInfo, false, 'videoId'); window.publish('Custom', JSON.stringify({ type: 'getImage', videoid: 'all' })); } else if (this.videoTypeForm.videoType == '离线视频') { - console.log('this.videoTypeForm.videoType', this.videoTypeForm.videoType); + //console.log('this.videoTypeForm.videoType', this.videoTypeForm.videoType); this.topicSends = ['VideoStatusData']; window.PubScribe(this.topicSends, '001', this.realInfo, false, 'videoId'); } @@ -335,7 +335,7 @@ export default { }, /** 实时数据分类 */ realInfo(topic, message) { - // console.log("topic",topic) + // //console.log("topic",topic) switch (topic) { // 接收托片 case 'img0': @@ -355,7 +355,7 @@ export default { // var newArr = [] //msg为转换后的JSON数据 if (msg.rate == 'low') { - // console.log('msg', msg); + // //console.log('msg', msg); if (this.videoList.length != 0) { for (let i = 0; i < this.videoList.length; i++) { if (msg.id == this.videoList[i].id) { @@ -399,7 +399,7 @@ export default { // } // this.imgUrl3 = 'data:image/png;base64,' + msg.pic; - // console.log("imageUrl", imageUrl) + // //console.log("imageUrl", imageUrl) } catch (error) {} break; case 'hert': @@ -408,7 +408,7 @@ export default { const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 const msg = JSON.parse(temp); //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据 - // console.log("hert", msg) //msg为转换后的JSON数据 + // //console.log("hert", msg) //msg为转换后的JSON数据 if (msg == '') { } } catch (error) {} @@ -419,7 +419,7 @@ export default { const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 const msg = JSON.parse(temp); //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据 - console.log('VideoStatusData', msg); //msg为转换后的JSON数据 + //console.log('VideoStatusData', msg); //msg为转换后的JSON数据 this.changeStatus(msg); } catch (error) {} break; @@ -437,7 +437,7 @@ export default { this.videoList[i].numSatus = parseFloat(numSatusN.toFixed(2)); } else if (msg.type == 'video_analyzed' && msg.video_id == this.videoList[i].id) { //已分析 - console.log('已分析'); + //console.log('已分析'); this.videoList[i].videoAnalysisStatus = '已分析'; var ip = window.location.host; var ipData = 'http://' + ip.split(':')[0]; @@ -445,11 +445,11 @@ export default { this.videoList[i].img = ipData + msg.pic_path; } else if (msg.type == 'video_analyse_unusual' && msg.video_id == this.videoList[i].id) { //分析异常 - console.log('分析异常'); + //console.log('分析异常'); this.videoList[i].videoAnalysisStatus = '分析异常'; } else if (msg.type == 'video_loading' && msg.video_id == this.videoList[i].id) { //分析异常 - console.log('加载中'); + //console.log('加载中'); this.videoList[i].videoAnalysisStatus = '加载中'; } } @@ -503,10 +503,10 @@ export default { informationInfo(data, item) { if (data == '新增') { var random = this.generateMixed(3); - console.log('random', random); - // console.log("this.file",this.file) + //console.log('random', random); + // //console.log("this.file",this.file) // this.file = undefined - console.log('this.$refs.inputer', this.$refs.inputer); + //console.log('this.$refs.inputer', this.$refs.inputer); (this.form = { radio: '', videoName: '视频' + random, @@ -519,7 +519,7 @@ export default { } }, open(item) { - console.log('item', item); + //console.log('item', item); this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -527,7 +527,7 @@ export default { }) .then(() => { getDeleteShipjk({ VideoId: item }).then((res) => { - console.log('res', res); + //console.log('res', res); this.$message({ type: 'success', message: '删除成功!' @@ -543,7 +543,7 @@ export default { }); }, openRight(item) { - console.log('item', item); + //console.log('item', item); startVideoAnalysis(item.id).then((res) => { // if (res.data.msg == '请求成功') { @@ -569,7 +569,7 @@ export default { // commit(form) { - console.log('form', form); + //console.log('form', form); let formData = new FormData(); formData.append('VideoName', form.videoName); formData.append('VideoType', this.videoTypeForm.videoType); @@ -585,7 +585,7 @@ export default { url: serverUrl.dataUrl, data: formData }).then((res) => { - console.log('提交按钮', res); + //console.log('提交按钮', res); if (res.data.msg == '添加成功') { this.$message({ message: res.data.msg, @@ -623,7 +623,7 @@ export default { applicationBtn() { // this.createMqtt() getApplication().then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { const loading = this.$loading({ lock: true, @@ -653,7 +653,7 @@ export default { //停止 stopAlgorithmBtn() { getStopAlgorithm().then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { this.getVideoList(); this.$message({ @@ -671,7 +671,7 @@ export default { }, load(event) { let size = null; - console.log(this.file, 'this.file.size'); + //console.log(this.file, 'this.file.size'); if (this.file == undefined) { this.$message.warning('请上传文件!!!'); } else { @@ -702,7 +702,7 @@ export default { background: 'rgba(0, 0, 0, 0.7)' }); - console.log('loadingN', loadingN.text); + //console.log('loadingN', loadingN.text); let count = arrFile.length; let filename = this.file.name + '~' + this.guid(); for (var i = 0; i < count; i++) { @@ -755,7 +755,7 @@ export default { } }) .catch((e) => { - console.log(e); + //console.log(e); }); } this.clearShownWarnings(); @@ -763,13 +763,13 @@ export default { } }, goToPage(videoAnalysisStatus, id, num, name, type, status, msg, videoPath) { - console.log('id', id); - console.log('num', num); - console.log('name', name); - console.log('type', type); - console.log('status', status); - console.log('msg', msg); - console.log('videoAnalysisStatus', videoAnalysisStatus); + //console.log('id', id); + //console.log('num', num); + //console.log('name', name); + //console.log('type', type); + //console.log('status', status); + //console.log('msg', msg); + //console.log('videoAnalysisStatus', videoAnalysisStatus); if (type == '离线视频') { if (videoAnalysisStatus != '已分析') { } else if (videoAnalysisStatus == '已分析') { @@ -804,7 +804,7 @@ export default { //获取视频数据 getVideoList() { getGetShipjk().then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.msg == '成功') { // if(val=='重启'){ setTimeout(() => { @@ -820,7 +820,7 @@ export default { } else { this.SetVideoMode(this.videoTypeForm.videoType); } - // console.log("this.videoTypeForm.videoType",this.videoTypeForm.videoType) + // //console.log("this.videoTypeForm.videoType",this.videoTypeForm.videoType) var arr = []; var ip = window.location.host; var ipData = 'http://' + ip.split(':')[0]; @@ -866,7 +866,7 @@ export default { } }); this.videoList = arr; - console.log('arrarrarrarr', this.videoList); + //console.log('arrarrarrarr', this.videoList); if (this.videoList.length == '0') { this.videoTypeShow = true; } else { @@ -874,7 +874,7 @@ export default { } //图片更新 let highPicList = sessionStorage.getItem('highPicList') ? JSON.parse(sessionStorage.getItem('highPicList')) : []; - console.log(highPicList, 'highPicList'); + //console.log(highPicList, 'highPicList'); if (this.videoList.length != 0 && highPicList.length > 0) { for (let i = 0; i < this.videoList.length; i++) { for (let j = 0; j < highPicList.length; j++) { @@ -889,10 +889,10 @@ export default { }, handleRemove(file, fileList) { - console.log(file, fileList); + //console.log(file, fileList); }, handlePreview(file) { - console.log(file); + //console.log(file); }, handleExceed(files, fileList) { this.$message.warning( diff --git a/src/views/bounced/analysisConfiguration.vue b/src/views/bounced/analysisConfiguration.vue index 3a4e88d..8ed0e7a 100644 --- a/src/views/bounced/analysisConfiguration.vue +++ b/src/views/bounced/analysisConfiguration.vue @@ -1458,7 +1458,7 @@ export default { // 测试:订阅本机IP // host: host, // port: port, - // host:"172.16.1.168:10086", + // host:"ç", keepalive: 60, // 心跳时间,默认60s,设置为0禁用 username: "admin", // 用户名(可选) password: "123456", // 密码(可选) diff --git a/src/views/bounced/analysisPreview.vue b/src/views/bounced/analysisPreview.vue index e368a3c..e8585ea 100644 --- a/src/views/bounced/analysisPreview.vue +++ b/src/views/bounced/analysisPreview.vue @@ -67,7 +67,7 @@ export default { // const host = 'ws://49.234.27.18:10087/'; // 一个测试用url,改成给的,ws://broker.emqx.io:8083/mqtt var ip = window.location.host.split(":")[0]; console.log("ip",ip) - const host = `ws://${ip}:10087`; + const host = `ws://${ip}:10087`; // const host = 'ws://172.16.1.168:10087/'; const options = { diff --git a/src/views/bounced/dataBoard.vue b/src/views/bounced/dataBoard.vue index 5ed61dd..17c51dc 100644 --- a/src/views/bounced/dataBoard.vue +++ b/src/views/bounced/dataBoard.vue @@ -25,6 +25,7 @@ { if (res.data.code == 200) { - console.log(res.data.data, '组件的数据'); + //console.log(res.data.data, '组件的数据'); this.componentList = res.data.data; this.siftData(); } @@ -200,7 +203,7 @@ export default { this.sectionData = []; this.classify = []; this.componentList.forEach((val) => { - // console.log("val",val) + // //console.log("val",val) this.sectionArr.push(val.combinationName); this.sectionArr = Array.from(new Set(this.sectionArr)); }); @@ -225,7 +228,7 @@ export default { }, // 组件图标点击下拉事件 sectionHandle(i) { - let sections = document.querySelectorAll('.section'); + // let sections = document.querySelectorAll('.section'); let sectionBox = document.querySelectorAll('.sectionBox'); let downPulls1 = document.querySelectorAll('.downPull1'); // 断面的小图标 @@ -293,12 +296,12 @@ export default { }, componentList: { handler(newVal) { - console.log('componentList', newVal); + //console.log('componentList', newVal); if (newVal != undefined && newVal.length != 0) { newVal.forEach((ele) => { if (ele.timeMode == '固定间隔' && this.$route.query.type == '实时视频') { - console.log('实时视频', '固定间隔'); + //console.log('实时视频', '固定间隔'); this.$nextTick(() => { // var thatNN = this; ele.cycleStatisticsData.forEach((item) => { @@ -308,13 +311,13 @@ export default { }); if (this.$refs.typeChartRef2 != undefined) { // // 轮循固定时刻生成的各类组件 - console.log('轮循固定时刻生成的各类组件') + //console.log('轮循固定时刻生成的各类组件') this.getRef(this.$refs.typeChartRef2, ele.timeMode); } }); } if (ele.timeMode == '固定时刻' && this.$route.query.type == '实时视频') { - console.log('实时视频', '固定时刻'); + //console.log('实时视频', '固定时刻'); this.$nextTick(() => { ele.cycleTimeData.forEach((item) => { if (item.type_data != null) { @@ -396,8 +399,8 @@ export default { cycleHistoryData: { handler(newVal) { // debugger - console.log('历史', newVal); - // console.log("历史",oldVal) + //console.log('历史', newVal); + // //console.log("历史",oldVal) if (newVal != undefined) { // newVal.forEach(ele => { if (newVal.CycleStatisticsData) { @@ -460,9 +463,9 @@ export default { // 处理过的触发数据 triggerListData: { handler(newVal) { - // console.log("newVal",newVal,'流量数据') + // //console.log("newVal",newVal,'流量数据') this.triggerList = newVal; - // console.log("oldVal",oldVal) + // //console.log("oldVal",oldVal) // 触发数据 var _this = this; if (newVal.length != 0 && _this.sectionData) { @@ -472,8 +475,8 @@ export default { } newVal.forEach((item) => { if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '实时触发') { - // console.log(ele.analogAreaComponentId, 'analogAreaComponentId'); - // console.log(item.component_id, 'component_id'); + // //console.log(ele.analogAreaComponentId, 'analogAreaComponentId'); + // //console.log(item.component_id, 'component_id'); if (ele.trigger.length == 10) { ele.trigger.pop(); } @@ -494,7 +497,7 @@ export default { _this.$nextTick(() => { if (_this.$refs.typeChartRef != undefined) { for (let i = 0; i < _this.$refs.typeChartRef.length; i++) { - // console.log(_this.$refs.typeChartRef[i], '触发接收的表格数据'); + // //console.log(_this.$refs.typeChartRef[i], '触发接收的表格数据'); let itemTypeChart = _this.$refs.typeChartRef[i]; if (itemTypeChart.dataArr != undefined && itemTypeChart.dataArr.length != 0) { if (itemTypeChart.echartArr.includes('时间曲线图')) { @@ -549,7 +552,7 @@ export default { cycleTimeData: { handler(newVal) { // 监听到打印固定时刻数据 - // console.log(newVal, '固定时刻数据'); + // //console.log(newVal, '固定时刻数据'); if (newVal != undefined && newVal.length != 0 && this.sectionData) { var thatN = this; @@ -576,7 +579,7 @@ export default { // thatN.$nextTick(() => { if (thatN.$refs.typeChartRef1 != undefined) { - // console.log("thatN.$refs.typeChartRef1",thatN.$refs.typeChartRef1) + // //console.log("thatN.$refs.typeChartRef1",thatN.$refs.typeChartRef1) // 轮循固定时刻生成的各类组件 for (let i = 0; i < thatN.$refs.typeChartRef1.length; i++) { let itemTypeChartRef1 = thatN.$refs.typeChartRef1[i]; @@ -654,7 +657,7 @@ export default { // // ele.cycleTimeData.unshift(item); // // _thatN.$nextTick(() => { // if (_thatN.$refs.typeChartRef1 != undefined) { - // // console.log("thatN.$refs.typeChartRef1",_thatN.$refs.typeChartRef1) + // // //console.log("thatN.$refs.typeChartRef1",_thatN.$refs.typeChartRef1) // // 轮循固定时刻生成的各类组件 // for (let i = 0; i < _thatN.$refs.typeChartRef1.length; i++) { // let itemTypeChartRef1 = thatN.$refs.typeChartRef1[i] @@ -697,7 +700,7 @@ export default { //固定间隔 cycleStatisticsData: { handler(newVal) { - console.log('固定间隔', newVal); + //console.log('固定间隔', newVal); if (newVal != undefined && newVal.length != 0 && this.sectionData) { var that = this; that.classify.forEach((ele, index) => { @@ -741,13 +744,13 @@ export default { if (itemTypeChartRef2.echartArr.includes('表格')) { that.$refs.typeChartRef2[i].getDataArr(that.$refs.typeChartRef2[i].dataArr); } - // console.log(item,'组件数据'); + // //console.log(item,'组件数据'); if ( itemTypeChartRef2.echartArr.includes('直方图') && itemTypeChartRef2.$refs.barChartRef.drawBar ) { // 数据改变重新渲染柱状图 - // console.log(item, '组件'); + // //console.log(item, '组件'); itemTypeChartRef2.$refs.barChartRef.drawBar(itemTypeChartRef2.dataArr[0]); } if ( @@ -786,7 +789,7 @@ export default { // if (_that.$refs.typeChartRef2 != undefined) { // for (let i = 0; i < _that.$refs.typeChartRef2.length; i++) { // let itemTypeChartRef2 = _that.$refs.typeChartRef2[i]; - // // console.log(_this.$refs.typeChartRef[i], '触发接收的表格数据'); + // // //console.log(_this.$refs.typeChartRef[i], '触发接收的表格数据'); // if (itemTypeChartRef2.length != 0 && itemTypeChartRef2.dataArr != undefined && itemTypeChartRef2.dataArr.length != 0) { // // this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr, _this.$refs.typeChartRe2f[i].componentName.split('_')[0]) // if (itemTypeChartRef2.echartArr.includes('时间曲线图')) { @@ -795,10 +798,10 @@ export default { // if (itemTypeChartRef2.echartArr.includes('数值')) { // _that.$refs.typeChartRef2[i].getDataArr(_that.$refs.typeChartRef2[i].dataArr) // } - // // console.log(item,'组件数据'); + // // //console.log(item,'组件数据'); // if (itemTypeChartRef2.echartArr.includes('直方图') && itemTypeChartRef2.$refs.barChartRef.drawBar) { // // 数据改变重新渲染柱状图 - // // console.log(item, '组件'); + // // //console.log(item, '组件'); // itemTypeChartRef2.$refs.barChartRef.drawBar(itemTypeChartRef2.dataArr[0]) // } // if (itemTypeChartRef2.echartArr.includes('饼状图') && itemTypeChartRef2.$refs.pieChartRef.drawPie) { @@ -827,7 +830,7 @@ export default { //周期统计实时累计数据主题 cycleAccumulateData: { handler(newVal) { - console.log('周期统计实时累计数据主题', newVal); + //console.log('周期统计实时累计数据主题', newVal); if (newVal != undefined && newVal.length != 0 && this.sectionData) { var that = this; that.classify.forEach((ele, index) => { @@ -858,7 +861,7 @@ export default { itemTypeChartRef2.dataArr != undefined && itemTypeChartRef2.dataArr.length != 0 ) { - console.log('itemTypeChartRef2.echartArr',itemTypeChartRef2.echartArr) + //console.log('itemTypeChartRef2.echartArr',itemTypeChartRef2.echartArr) if (itemTypeChartRef2.echartArr.includes('数值')) { //只需要修改数值组件 that.$refs.typeChartRef2[i].getcycleAccumulateDataArr([item]); diff --git a/src/views/index.vue b/src/views/index.vue index 0c18713..10e99f5 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -919,7 +919,7 @@ export default { //离开当前页面后执行 destroyed: function () { - //console.log("离开当前页") + ////console.log("离开当前页") // client.publish('msg_stream',JSON.stringify({"msg_flag":-1})) //client.end(); }, @@ -993,7 +993,7 @@ export default { }, //场景选择 sceneChange(val) { - console.log(val, '车道场景选择'); + //console.log(val, '车道场景选择'); if (val != 1) { this.perception.place = '0'; } @@ -1092,7 +1092,7 @@ export default { 'TargetAnalysisStatusData', 'TrafficAnalysisStatusData', //目标数量 - 'simulator_target-' + this.$route.query.id + // 'simulator_target-' + this.$route.query.id ]; window.PubScribe(this.topicSends, '001', this.realInfo); setTimeout(() => { @@ -1120,7 +1120,7 @@ export default { 'img7', 'Contorl_server', //目标数量 - 'simulator_target-' + this.$route.query.id + // 'simulator_target-' + this.$route.query.id ]; window.PubScribe(this.topicSends, this.number, this.realInfo, false, this.$route.query.id); } @@ -1131,7 +1131,7 @@ export default { //获取视频分析,交通分析状态数据 getAnalysisStatus() { getVideoStatus(this.$route.query.id).then((res) => { - console.log('res.data', res.data); + //console.log('res.data', res.data); //视频分析状态 if (res.data.data.videoAnalysisStatus == '未分析') { this.disabledTrafficAnalysis = true; @@ -1169,9 +1169,9 @@ export default { }); }, getInterface(data1, data2, data3) { - console.log('data1', data1); //接口组件id - console.log('data2', data2); //组件id - console.log('data3', data2); //类型 + //console.log('data1', data1); //接口组件id + //console.log('data2', data2); //组件id + //console.log('data3', data2); //类型 this.data1 = data1; this.data2 = data2; this.data3 = data3; @@ -1183,14 +1183,14 @@ export default { getJierfData() .then((res) => { this.interfaceOptions = res.data.data; - console.log('this.interfaceOptions', this.interfaceOptions); + //console.log('this.interfaceOptions', this.interfaceOptions); }) .catch((err) => { _this.$message.error(err.msg); }); }, handleInterfaceOptions(val) { - console.log('val', val); + //console.log('val', val); var startSectionIdArr = []; var startSectionNameArr = []; val.forEach((item) => { @@ -1239,8 +1239,8 @@ export default { window.publish('GetCycleHistory', 'Get-' + this.$route.query.id); }, getZhuanFaMQTT(topic, msg) { - // console.log("topic",topic) - // console.log("msg",msg) + // //console.log("topic",topic) + // //console.log("msg",msg) window.publish(topic, msg); }, //分析视频按钮 @@ -1271,7 +1271,7 @@ export default { trafficAnalysisBtn() { startTrafficAnalysis(this.$route.query.id).then((res) => { // - console.log('res.data', res.data.data); + //console.log('res.data', res.data.data); if (res.data.code == 200) { this.$message({ message: res.data.msg, @@ -1325,15 +1325,15 @@ export default { analysisData() { var ip = window.location.host.split(':')[0]; // var ip = '172.16.1.168'; //http://172.16.1.168 - console.log('ip', ip); + //console.log('ip', ip); getAnalysisData(this.$route.query.id, ip).then((res) => { - console.log('res.data.data视频分析结果', res.data.data); + //console.log('res.data.data视频分析结果', res.data.data); // if(res.data.data.TrafficAnalysisStatus=='分析异常'){ // this.videoAnalysisStatus = '分析异常' // }else { - console.log('this.videoAnalysisStatusNew', res.data.data.trafficAnalysisStatus); + //console.log('this.videoAnalysisStatusNew', res.data.data.trafficAnalysisStatus); this.videoAnalysisStatusNew = res.data.data.trafficAnalysisStatus; - console.log('this.videoAnalysisStatusNew', this.videoAnalysisStatusNew); + //console.log('this.videoAnalysisStatusNew', this.videoAnalysisStatusNew); var numSatusNew = ''; this.analysis.videoTotalFrames = Number(res.data.data.videoTotalFrames); if (res.data.data.trafficFrameNumber == '') { @@ -1358,16 +1358,16 @@ export default { this.imageUrlToBase64(res.data.data.picPath); }); // this.OnSceneN() - console.log(this.analysis, ' this.analysis'); + //console.log(this.analysis, ' this.analysis'); }, //分析结束传参 postTraffic() { var ip = window.location.host.split(':')[0]; // var ip = '172.16.1.168'; //http://172.16.1.168:5000 - console.log('ip', ip); + //console.log('ip', ip); getAnalysisData(this.$route.query.id, ip).then((res) => { - console.log('res.data.data', res.data.data); + //console.log('res.data.data', res.data.data); this.analysis.trafficAnalysisPath1 = res.data.data.trafficAnalysisPath1; this.analysis.trafficAnalysisPath2 = res.data.data.trafficAnalysisPath2; document @@ -1393,7 +1393,7 @@ export default { const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 const msg = JSON.parse(temp); //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据 - // console.log(msg, 'msg接受一张高频图片'); + // //console.log(msg, 'msg接受一张高频图片'); // document.getElementById('mapModule').contentWindow.getDestination(JSON.stringify(msg)); if (msg.rate == 'high') { document.getElementById('mapModule').contentWindow.getDestination(JSON.stringify(msg)); @@ -1456,12 +1456,13 @@ export default { const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - // console.log("msgN",msgN) + // //console.log("msgN",msgN) this.triggerData = msgN; if (temp.length != 0) { for (let i = 0; i < msgN.length; i++) { if (msgN[i].event != 'empty') { - detId.push(msgN[i].det_id); + // detId.push(msgN[i].det_id); + detId.push(msgN[i]); } } document.getElementById('mapModule').contentWindow.getChuFa(JSON.stringify(detId)); @@ -1470,67 +1471,66 @@ export default { break; case 'trigger-' + this.$route.query.id: try { - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - // console.log("trigger_msgN",msgN) + // //console.log("trigger_msgN",msgN) // msgN.forEach(item => { - // console.log("item.name",item.name) + // //console.log("item.name",item.name) // }) this.triggerListData = msgN; } catch (error) {} break; case 'cycle_time-' + this.$route.query.id: try { - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - console.log('固定时刻', msgN); + //console.log('固定时刻', msgN); this.cycleTimeData = msgN; } catch (error) {} break; case 'cycle_history-' + this.$route.query.id: try { - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - console.log('历史数据', msgN); + //console.log('历史数据', msgN); this.cycleHistoryData = msgN; } catch (error) {} break; case 'cycle_statistics-' + this.$route.query.id: try { - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - // console.log("固定间隔",msgN) + //console.log("cycle_statistics-固定间隔1",temp) + // //console.log("cycle_statistics-固定间隔2",msgN) this.cycleStatisticsData = msgN; - - // this.cycleStatisticsData = msgN; } catch (error) {} break; case 'cycle_accumulate-' + this.$route.query.id: try { //周期统计实时累计数据主题 - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - console.log('周期统计实时累计数据主题', msgN); + //console.log('cycle_accumulate-周期统计实时累计数据主题', msgN); this.cycleAccumulateData = msgN; } catch (error) {} break; @@ -1540,7 +1540,7 @@ export default { const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 const msg = JSON.parse(temp); //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据 - // console.log("VideoStatusData", msg) //msg为转换后的JSON数据 + // //console.log("VideoStatusData", msg) //msg为转换后的JSON数据 this.changeStatus(msg); } catch (error) {} break; @@ -1550,7 +1550,7 @@ export default { const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 const msg = JSON.parse(temp); //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据 - console.log(msg, '目标监测'); + //console.log(msg, '目标监测'); this.targetAnalysisStatusData = msg; } catch (error) {} break; @@ -1560,7 +1560,7 @@ export default { const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 const msg = JSON.parse(temp); //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据 - console.log(msg, '交通分析'); + //console.log(msg, '交通分析'); this.trafficAnalysisStatusData = msg; } catch (error) {} break; @@ -1570,6 +1570,7 @@ export default { const u8arr = new Uint8Array(message); const temp = utf8decoder1.decode(u8arr); // 将二进制数据转为字符串 const msg = JSON.parse(temp); + //console.log('simulator_target-目标数量', msg); document.getElementById('mapModule').contentWindow.getTargetNumber(JSON.stringify(msg)); } catch (error) {} break; @@ -1577,10 +1578,10 @@ export default { this.receiveNews = ''; }, // handleClick(tab, event) { - // console.log(tab, event); + // //console.log(tab, event); // }, changeCompany(val) { - console.log('val', val); + //console.log('val', val); if (val == '小时') { this.max = '24'; this.componentForm.cycleInterval = 1; @@ -1604,11 +1605,11 @@ export default { this.videoAnalysisStatus = '已分析'; this.numSatus = 100; //已分析 - console.log('已分析'); + //console.log('已分析'); this.postTraffic(); } else if (msg.type == 'traffic_analyse_unusual' && msg.video_id == this.$route.query.id) { //分析异常 - console.log('分析异常'); + //console.log('分析异常'); this.videoAnalysisStatus = '分析异常'; } }, @@ -1641,18 +1642,18 @@ export default { }, // //新增组件根据组件id获取单个组件数据 getSingleComponentIdN(id, type, name) { - console.log('id', id); - console.log('type', type); - console.log('name', name); + //console.log('id', id); + //console.log('type', type); + //console.log('name', name); this.closeEditShow = false; this.closeComponentShow = true; this.componentId = id; this.componentForm.componentType = type; this.componentTitle = type; getComponentData({ AnalogAreaComponentId: id }).then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { - console.log('res', res.data.data); + //console.log('res', res.data.data); this.component = true; if (res.data.data.company != '') { this.componentForm.company = res.data.data.company; @@ -1662,10 +1663,10 @@ export default { if (res.data.data.timeMode != '') { this.componentForm.timeMode = res.data.data.timeMode; } else { - console.log('this.componentForm.timeMode', this.componentForm.timeMode); - console.log('this.componentForm.componentType', this.componentForm.componentType); + //console.log('this.componentForm.timeMode', this.componentForm.timeMode); + //console.log('this.componentForm.componentType', this.componentForm.componentType); if (this.componentForm.componentType == '延误' || this.componentForm.componentType == '拥堵') { - console.log('this.componentForm.timeMode', this.componentForm.timeMode); + //console.log('this.componentForm.timeMode', this.componentForm.timeMode); this.componentForm.timeMode = '固定间隔'; } else { this.componentForm.timeMode = '实时触发'; @@ -1696,12 +1697,12 @@ export default { // this.componentForm.typeFiltering = res.data.data.typeFiltering // this.componentForm.type = res.data.data.type if (res.data.data.startSectionIds != '') { - console.log('startSectionIds', res.data.data.startSectionIds); + //console.log('startSectionIds', res.data.data.startSectionIds); var startSectionIdArr = []; var startSectionArr = []; startSectionIdArr = res.data.data.startSectionIds.split(','); - console.log('this.sectionals', this.sectionals); - console.log('startSectionIdArr', startSectionIdArr); + //console.log('this.sectionals', this.sectionals); + //console.log('startSectionIdArr', startSectionIdArr); startSectionIdArr.forEach((item) => { this.sectionals.forEach((items) => { if (item == items.graphicId) { @@ -1718,12 +1719,12 @@ export default { this.componentForm.startSection = startSectionArr; } if (res.data.data.endSectionIds != '') { - console.log('endSectionIds', res.data.data.endSectionIds); + //console.log('endSectionIds', res.data.data.endSectionIds); var endSectionIdArr = []; var endSectionArr = []; endSectionIdArr = res.data.data.endSectionIds.split(','); - console.log('this.sectionals', this.sectionals); - console.log('endSectionIdArr', endSectionIdArr); + //console.log('this.sectionals', this.sectionals); + //console.log('endSectionIdArr', endSectionIdArr); endSectionIdArr.forEach((item) => { this.sectionals.forEach((items) => { if (item == items.graphicId) { @@ -1753,13 +1754,13 @@ export default { } else { // this.componentForm.type = ["机动车", "非机动车", "行人"]; } - console.log('this.componentForm', this.componentForm); + //console.log('this.componentForm', this.componentForm); } }); }, //修改模拟区组件、图形 getSimulationAreaEdit(id, type, componentType, name, number) { - console.log('number', number); + //console.log('number', number); this.numberNew = number; if (type == '图形') { this.form.id = id; @@ -1800,9 +1801,9 @@ export default { this.componentForm.componentType = componentType; this.componentTitle = componentType; getComponentData({ AnalogAreaComponentId: id }).then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { - console.log('res', res.data.data); + //console.log('res', res.data.data); this.component = true; if (res.data.data.company != '') { this.componentForm.company = res.data.data.company; @@ -1839,12 +1840,12 @@ export default { this.componentForm.presentationForm = res.data.data.presentationForm; // this.componentForm.type = res.data.data.type if (res.data.data.startSectionIds != '') { - console.log('startSectionIds', res.data.data.startSectionIds); + //console.log('startSectionIds', res.data.data.startSectionIds); var startSectionIdArr = []; var startSectionArr = []; startSectionIdArr = res.data.data.startSectionIds.split(','); - console.log('this.sectionals', this.sectionals); - console.log('startSectionIdArr', startSectionIdArr); + //console.log('this.sectionals', this.sectionals); + //console.log('startSectionIdArr', startSectionIdArr); startSectionIdArr.forEach((item) => { this.sectionals.forEach((items) => { if (item == items.graphicId) { @@ -1855,12 +1856,12 @@ export default { }); } if (res.data.data.endSectionIds != '') { - console.log('endSectionIds', res.data.data.endSectionIds); + //console.log('endSectionIds', res.data.data.endSectionIds); var endSectionIdArr = []; var endSectionArr = []; endSectionIdArr = res.data.data.endSectionIds.split(','); - console.log('this.sectionals', this.sectionals); - console.log('endSectionIdArr', endSectionIdArr); + //console.log('this.sectionals', this.sectionals); + //console.log('endSectionIdArr', endSectionIdArr); endSectionIdArr.forEach((item) => { this.sectionals.forEach((items) => { if (item == items.graphicId) { @@ -1891,7 +1892,7 @@ export default { //获取所有断面数据 getAllSectionalData(VideoId) { getSectionalData({ VideoId: VideoId }).then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { this.sectionals = res.data.data; } @@ -1908,10 +1909,10 @@ export default { return type; }, getFigureD(item, index, indexNew) { - console.log('图形类型', item); - console.log('初始图形名称', index); + //console.log('图形类型', item); + //console.log('初始图形名称', index); this.startFigureName = index; - console.log('图形位置', indexNew); + //console.log('图形位置', indexNew); this.dialogFormVisible = true; this.switchValue = 0; this.typeCheckList = [ @@ -1940,12 +1941,12 @@ export default { //双击图形修改图形名称弹框 getModifyTheNameN(data, number) { this.orderShow = true; - console.log('data', data); - console.log('number', number); + //console.log('data', data); + //console.log('number', number); this.numberNew = number; var arr = []; arr = data.split(','); - console.log('arr', arr); + //console.log('arr', arr); this.form.id = arr[0]; // this.form.name = arr[1]; // this.form.type = arr[2]; @@ -1982,7 +1983,7 @@ export default { }, //新增、编辑图形确认按钮 onSubmit(form) { - console.log('form', form); + //console.log('form', form); //新增 if ( this.switchValue == 1 && @@ -2062,7 +2063,7 @@ export default { url: serverUrl.addFigure, data: formData }).then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { this.$message({ @@ -2180,7 +2181,7 @@ export default { url: serverUrl.editFigure, data: formData }).then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { this.$message({ message: res.data.msg, @@ -2194,9 +2195,9 @@ export default { // duration: 0 // }); // }, 5000); - console.log('startFigureName', this.startFigureName); + //console.log('startFigureName', this.startFigureName); document.getElementById('mapModule').contentWindow.postFigureId(JSON.stringify(res.data.data)); - console.log('this.numberNew', this.numberNew); + //console.log('this.numberNew', this.numberNew); if (form.type == '断面') { document .getElementById('mapModule') @@ -2225,7 +2226,7 @@ export default { }, //编辑组件 onSubmitComponent(componentForm) { - console.log(componentForm, 'ffffffffff'); + //console.log(componentForm, 'ffffffffff'); if (componentForm.timeMode != '实时触发' && componentForm.company == '') { this.$message.warning('请选择必选项'); return false; @@ -2277,7 +2278,7 @@ export default { formData.append('presentationForm', '矩阵图'); } else if (componentForm.componentType == '类型') { - console.log(componentForm.type, 'componentForm.type'); + //console.log(componentForm.type, 'componentForm.type'); //名称 formData.append('componentName', componentForm.componentName); //单位 @@ -2309,7 +2310,7 @@ export default { url: serverUrl.editComponent, data: formData }).then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { this.$message({ message: res.data.msg, @@ -2331,7 +2332,7 @@ export default { }, //新增编辑组件取消 closeComponent(componentForm) { - console.log('componentForm', componentForm); + //console.log('componentForm', componentForm); this.component = false; let formData = new FormData(); @@ -2384,7 +2385,7 @@ export default { url: serverUrl.editComponent, data: formData }).then((res) => { - console.log('res', res); + //console.log('res', res); if (res.data.code == 200) { this.$message({ @@ -2409,7 +2410,7 @@ export default { }, //新增、编辑图形取消按钮 closeFigure(form) { - console.log('form', form); + //console.log('form', form); if (form.id != '') { this.dialogFormVisible = false; document.getElementById('mapModule').contentWindow.closeEdit(JSON.stringify(form.type + ',' + form.id)); @@ -2428,7 +2429,7 @@ export default { } }, closeComponentForm(componentForm) { - console.log('111', componentForm); + //console.log('111', componentForm); if (this.closeComponentShow == false) { this.component = false; document.getElementById('mapModule').contentWindow.editComponent(''); @@ -2447,7 +2448,7 @@ export default { }, //改变起点 handleCheckedStartSection(value) { - console.log('改变起点', value); + //console.log('改变起点', value); var startSectionIdArr = []; var startSectionNameArr = []; value.forEach((item) => { @@ -2465,7 +2466,7 @@ export default { }, //改变终点 handleCheckedendSection(value) { - console.log('改变终点', value); + //console.log('改变终点', value); var endSectionIdArr = []; var endSectionNameArr = []; value.forEach((item) => { @@ -2475,8 +2476,8 @@ export default { endSectionNameArr.push(items.graphicName); let newendSectionId = endSectionIdArr.join(','); let newEndSectionName = endSectionNameArr.join(','); - console.log('newendSectionId', newendSectionId); - console.log('newEndSectionName', newEndSectionName); + //console.log('newendSectionId', newendSectionId); + //console.log('newEndSectionName', newEndSectionName); this.componentForm.endSectionIds = newendSectionId; this.componentForm.endSectionNames = newEndSectionName; } @@ -2485,14 +2486,14 @@ export default { }, //修改展现形式 handlePresentation(value) { - console.log('展现形式', value); + //console.log('展现形式', value); let presentation = value.join(','); this.componentForm.presentationForm = presentation; - console.log('this.componentForm.presentationForm', this.componentForm.presentationForm); + //console.log('this.componentForm.presentationForm', this.componentForm.presentationForm); }, //类型数据 handleTypeData(value) { - console.log('类型数据', value); + //console.log('类型数据', value); let type = value.join(','); this.componentForm.typeData = type; }, @@ -2504,7 +2505,7 @@ export default { handleSearch() { this.modelOthers = true; this.$refs.htModels.finbBox(this.inputVal); - console.log(this.$refs.htModels, 'asdasdasd'); + //console.log(this.$refs.htModels, 'asdasdasd'); this.inputVal = ''; }, handleRow(val) { @@ -2518,7 +2519,7 @@ export default { methods: '' }).then((res) => { this.weatherItem = res.data.lives[0]; - console.log(this.weatherItem, 'asdsads'); + //console.log(this.weatherItem, 'asdsads'); }); } }, diff --git a/src/views/sensorFusion/index.vue b/src/views/sensorFusion/index.vue index 3314a37..be02ef5 100644 --- a/src/views/sensorFusion/index.vue +++ b/src/views/sensorFusion/index.vue @@ -602,6 +602,7 @@ >
--> + > 关闭 @@ -1774,7 +1777,7 @@ export default { // this.addTriggerDataField(this.intersectionList); //mqtt订阅 this.getMqtt(); - console.log(this.intersectionList, 'this.intersectionList'); + //console.log(this.intersectionList, 'this.intersectionList'); //开发路口默认展开第一个 if (this.intersectionList.length > 0) { let children = this.intersectionList[0].children || []; @@ -1789,7 +1792,7 @@ export default { // } // } // } - // console.log(this.intersectionName, 'intersectionName'); + // //console.log(this.intersectionName, 'intersectionName'); }); }, //每个都添加option @@ -1834,7 +1837,7 @@ export default { for (let i = 0; i < this.threeData.length; i++) { this.addParentSort = this.threeData[i].sort; } - console.log(this.threeData, 'this.threeData'); + //console.log(this.threeData, 'this.threeData'); } else { this.$message.warning(res.data.msg); } @@ -1907,7 +1910,7 @@ export default { }, //折叠面板点击展开事件 handleCollapseChange(val) { - console.log(val, '折叠面板展开事件', this.intersectionName); + //console.log(val, '折叠面板展开事件', this.intersectionName); this.intersectionName = val; }, handleNodeClick(nodeData) {}, @@ -1964,7 +1967,7 @@ export default { allowDrop(draggingNode, dropNode, type) { //注掉的是同级拖拽 if (draggingNode.level === dropNode.level) { - console.log('拖拽'); + //console.log('拖拽'); return type === 'prev' || type === 'next'; } else { // 不同级进行处理 @@ -1998,7 +2001,7 @@ export default { } }) .catch((err) => { - console.log(err); + //console.log(err); }); }, //将子组件得名称统一 @@ -2062,7 +2065,7 @@ export default { key.data = key.data.filter((d) => d.videoName != '数值'); }); }); - console.log(this.addChildThreeData, ' this.addChildThreeData'); + //console.log(this.addChildThreeData, ' this.addChildThreeData'); }); this.addThreeNodeData.data = data; this.addThreeNodeData.node = node; @@ -2192,14 +2195,14 @@ export default { //给节点赋值 this.addThreeChildData.data = data; this.addThreeChildData.node = node; - console.log(this.addThreeChildData.data, 'this.addThreeChildData.node', this.addThreeChildData.node); + //console.log(this.addThreeChildData.data, 'this.addThreeChildData.node', this.addThreeChildData.node); }, //最子节点添加 addChildNode() { this.checkDataList = []; //给添加多选的赋值 - console.log(this.checkDataList, 'this.checkDataList'); + //console.log(this.checkDataList, 'this.checkDataList'); let params = { ParentId: '', Name: '', @@ -2270,7 +2273,7 @@ export default { } }) .catch((err) => { - console.log(err); + //console.log(err); }); // } }, @@ -2299,7 +2302,7 @@ export default { } }) .catch((err) => { - console.log(err); + //console.log(err); }); }) .catch(() => { @@ -2339,7 +2342,7 @@ export default { }, //普通输入框添加节点 addThreeNode() { - console.log(this.addThreeNodeData.data, 'this.addThreeNodeData.data'); + //console.log(this.addThreeNodeData.data, 'this.addThreeNodeData.data'); let params = { ParentId: '', Name: '', @@ -2386,13 +2389,13 @@ export default { } }) .catch((err) => { - console.log(err); + //console.log(err); }); } }, // //获得焦点 focus(event) { - // console.log(event); + // //console.log(event); event.currentTarget.select(); }, //修改功能 inp @@ -2401,7 +2404,7 @@ export default { }, //失去焦点后 alters(node, data) { - console.log(data.label, '失去焦点'); + //console.log(data.label, '失去焦点'); data.showInput = false; const label = document.getElementById(data.duocgqrhpzId); const changeinput = document.querySelector('.input' + data.duocgqrhpzId); @@ -2424,11 +2427,11 @@ export default { } }) .catch((err) => { - console.log(err); + //console.log(err); }); }, alter(node, data) { - console.log(data, '编辑', this.threeData); + //console.log(data, '编辑', this.threeData); data.showInput = true; const label = document.getElementById(data.duocgqrhpzId); const changeinput = document.querySelector('.input' + data.duocgqrhpzId); @@ -2444,42 +2447,53 @@ export default { //鼠标悬浮 showTooltip(id) { // const hover = document.querySelector('.hovered' + id); - const title = document.querySelector('.tooltip' + id); - this.$nextTick(() => { - title.style.position = 'absolute'; - title.style.display = 'block'; - title.style.backgroundColor = '#f7f7f7'; - title.style.border = '1px solid #ccc'; - }); + if (id) { + const title = document.querySelector('.tooltip' + id); + + this.$nextTick(() => { + title.style.position = 'absolute'; + title.style.display = 'block'; + title.style.backgroundColor = '#f7f7f7'; + title.style.border = '1px solid #ccc'; + }); + } }, //鼠标移出 hideTooltip(id) { - const title = document.querySelector('.tooltip' + id); - this.$nextTick(() => { - // this.hovered = false; - title.style.display = 'none'; - }); + // const title = document.querySelector('.tooltip' + id); + if (id) { + const title = document.querySelector('.tooltip' + id); + + this.$nextTick(() => { + // this.hovered = false; + title.style.display = 'none'; + }); + } }, //二级鼠标悬浮 showCardtip(id) { // const hover = document.querySelector('.hovered' + id); - const title = document.querySelector('.cardTitle1' + id); - this.$nextTick(() => { - title.style.position = 'absolute'; - title.style.display = 'block'; - title.style.backgroundColor = '#f7f7f7'; - title.style.border = '1px solid #ccc'; - // title.style.top = '120px'; - title.style.width = '110px'; - }); + if (id) { + const title = document.querySelector('.cardTitle1' + id); + this.$nextTick(() => { + title.style.position = 'absolute'; + title.style.display = 'block'; + title.style.backgroundColor = '#f7f7f7'; + title.style.border = '1px solid #ccc'; + // title.style.top = '120px'; + title.style.width = '110px'; + }); + } }, //二级鼠标移出 hideCardtip(id) { - const title = document.querySelector('.cardTitle1' + id); - this.$nextTick(() => { - // this.hovered = false; - title.style.display = 'none'; - }); + if (id) { + const title = document.querySelector('.cardTitle1' + id); + this.$nextTick(() => { + // this.hovered = false; + title.style.display = 'none'; + }); + } }, //单选按钮选择事件 @@ -2490,7 +2504,7 @@ export default { // this.chatShowIndex = index; let count = index - 1; let elements = document.querySelectorAll('[class^="echarts"]'); - let echarts = document.querySelector('.echarts' + count); + // let echarts = document.querySelector('.echarts' + count); elements.forEach((element) => { this.setZIndex(element, count); }); @@ -2514,7 +2528,7 @@ export default { // this.getSensorFusionData(); // }) // .catch((err) => { - // console.log(err); + // //console.log(err); // }); }, //确认按钮 @@ -2752,19 +2766,19 @@ export default { //mqtt订阅 realInfo(topic, message, videoId) { let dataList = this.intersectionList; - // console.log(topic, message, 'mqtt数据', videoId); + // //console.log(topic, message, 'mqtt数据', videoId); for (let i = 0; i < this.topicVideoIdList.length; i++) { switch (topic) { // 接收托片 case 'trigger-' + this.topicVideoIdList[i].videoId: try { - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - // console.log(msgN,'msgN'); + // //console.log(msgN,'msgN'); for (let j = 0; j < msgN.length; j++) { const locations = this.findLocationById(this.intersectionList, msgN[j].component_id); //处理speed正负值和-1,卡片区在html上处理了,数据源不做处理 @@ -2803,7 +2817,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }); // } //卡片区 @@ -2856,7 +2871,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }); } else if (msgN[j].component_type == '速度') { //卡片区 @@ -2876,6 +2892,7 @@ export default { this.addOrUpdateArrayItem(this.triggerSpeedData, { time: msgN[j].time, speed: newSpeed, + originalSpeed: msgN[j].speed, avg: msgN[j].avg, max: msgN[j].max, med: msgN[j].med, @@ -2897,7 +2914,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }); } else if (msgN[j].component_type == '类型') { let map = { @@ -2941,7 +2959,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }); } else if (msgN[j].component_type == '检测数') { let map = { @@ -2982,7 +3001,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }); } else if (msgN[j].component_type == '排队数') { let map = { @@ -3018,7 +3038,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }); } else if (msgN[j].component_type == 'OD') { //图表区 @@ -3039,14 +3060,14 @@ export default { break; case 'cycle_time-' + this.topicVideoIdList[i].videoId: try { - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 const msgN = JSON.parse(temp); - console.log('固定时刻', msgN); + //console.log('固定时刻', msgN); for (let j = 0; j < msgN.length; j++) { - const locations = this.findLocationById(this.intersectionList, msgN[j].component_id); + const locations = this.findLocationById(this.intersectionList, msgN[j].component_id); //处理speed正负值和-1,卡片区在html上处理了,数据源不做处理 let newSpeed = '-'; if ((msgN[j].speed && msgN[j].speed != -1) || msgN[j].speed === 0) { @@ -3066,7 +3087,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.timeDataCharts( @@ -3088,7 +3110,7 @@ export default { msgN[j].component_id, map ); - console.log(this.intersectionList, 'this.intersectionList'); + //console.log(this.intersectionList, 'this.intersectionList'); }); } else if (msgN[j].component_type == '速度') { //卡片区 @@ -3117,7 +3139,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.timeDataCharts( @@ -3154,7 +3177,8 @@ export default { n_stay: msgN[j].n_stay, n_queue: msgN[j].n_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.timeDataCharts( @@ -3188,16 +3212,16 @@ export default { break; case 'cycle_statistics-' + this.topicVideoIdList[i].videoId: try { - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - console.log('固定间隔', msgN, this.topicVideoIdList[i].videoId); + //console.log('固定间隔', msgN, this.topicVideoIdList[i].videoId); // this.cycleStatisticsData = msgN; for (let j = 0; j < msgN.length; j++) { - //处理speed正负值和-1,卡片区在html上处理了,数据源不做处理 + //处理speed正负值和-1,卡片区在html上处理了,数据源不做处理 let newSpeed = '-'; if ((msgN[j].speed && msgN[j].speed != -1) || msgN[j].speed === 0) { newSpeed = Math.abs(msgN[j].speed); @@ -3216,7 +3240,8 @@ export default { n_stay: msgN[j].ave_stay, n_queue: msgN[j].ave_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.cycleStatisticsDataCharts( @@ -3266,7 +3291,8 @@ export default { ave_stay: msgN[j].ave_stay, ave_queue: msgN[j].ave_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.cycleStatisticsDataCharts( @@ -3303,7 +3329,8 @@ export default { ave_stay: msgN[j].ave_stay, ave_queue: msgN[j].ave_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.cycleStatisticsDataCharts( @@ -3340,7 +3367,8 @@ export default { ave_stay: msgN[j].ave_stay, ave_queue: msgN[j].ave_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.cycleStatisticsDataCharts( @@ -3376,7 +3404,8 @@ export default { ave_stay: msgN[j].ave_stay, ave_queue: msgN[j].ave_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.cycleStatisticsDataCharts( @@ -3408,7 +3437,8 @@ export default { ave_stay: msgN[j].ave_stay, ave_queue: msgN[j].ave_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.cycleStatisticsDataCharts( @@ -3440,7 +3470,8 @@ export default { ave_stay: msgN[j].ave_stay, ave_queue: msgN[j].ave_queue, occ: msgN[j].occ, - speed: newSpeed + speed: newSpeed, + originalSpeed: msgN[j].speed }; this.$nextTick(() => { this.cycleStatisticsDataCharts( @@ -3472,16 +3503,16 @@ export default { break; case 'cycle_accumulate-' + this.topicVideoIdList[i].videoId: try { - // console.log("trigger_msgN",message) + // //console.log("trigger_msgN",message) const utf8decoder = new TextDecoder(); const u8arr = new Uint8Array(message); const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串 var detId = []; const msgN = JSON.parse(temp); - console.log('固定间隔cycle_accumulate', msgN); + // //console.log('固定间隔cycle_accumulate', msgN); // this.cycleStatisticsData = msgN; for (let j = 0; j < msgN.length; j++) { - //处理speed正负值和-1,卡片区在html上处理了,数据源不做处理 + //处理speed正负值和-1,卡片区在html上处理了,数据源不做处理 let newSpeed = '-'; if ((msgN[j].speed && msgN[j].speed != -1) || msgN[j].speed === 0) { newSpeed = Math.abs(msgN[j].speed); @@ -3601,7 +3632,7 @@ export default { chartsPie, //饼图 chartsBar, //柱状图 MeanValue, //均值图 - thermalOD, //OD + thermalOD //OD } };