代码提交

This commit is contained in:
luoshiwen 2023-02-22 14:52:14 +08:00
commit 7087614b09
24 changed files with 145 additions and 73 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1 @@
http://172.16.1.168:5000

View File

@ -0,0 +1,20 @@
{
"code": 200,
"msg": "成功",
"data": [{
"graphicId": "35fb0709596841e5b005fb1bc33a0fa4",
"graphicName": "测试区域",
"graphicType": "区域",
"coordinate": "218.6106 984.2285,453.5649 994.1006,267.9708 820.3528,218.6106 984.2285"
}, {
"graphicId": "957eb7cba61240f5a099ee6080bd29f0",
"graphicName": "测试路线2",
"graphicType": "轨迹",
"coordinate": "157.404 236.9287,179.1225 260.6216,192.9433 300.1097,202.8154 329.7258,214.6618 357.3675,222.5594 392.9068,236.3803 424.4973,258.0987 446.2157,289.6892 465.9598,317.3309 485.7039,350.8958 503.4735,382.4863 509.3967,420 517.2943,467.3858 521.2432,508.8483 525.192,556.234 525.192,599.671 525.192,631.2614 525.192,662.8519 513.3455,690.4936 499.5247,712.2121 477.8062,724.0585 444.2413,728.0073 412.6508,745.777 386.9836,775.3931 377.1115,806.9836 379.0859"
}, {
"graphicId": "7c24aa16e12840859164780d71827f5f",
"graphicName": "测试线2",
"graphicType": "断面",
"coordinate": "437.7697 642.6563,880.0366 737.4278"
}]
}

View File

@ -0,0 +1 @@
{"Keys":["com.unity.services.core.version"],"Values":[{"m_Value":"1.3.1","m_IsReadOnly":true}]}

View File

@ -1 +1 @@
http://127.0.0.1:5000
ws://172.16.1.168:10087/

View File

@ -131,6 +131,13 @@
function getDianwei(string){
unityInstanceA.SendMessage('GameManager','ReceptionVideoIdSececeTwo',JSON.stringify(string));
}
//获取ip
function getIpData(string){
console.log("获取ip",string)
if(unityInstanceA!=null){
unityInstanceA.SendMessage('GameManager','SetIP', string);
}
}
function setPOS(string){
console.log(string,'123');
unityInstanceA.SendMessage('GameManager','WebToUnityDot',JSON.stringify(string));

View File

@ -153,6 +153,7 @@ export default {
list: {
handler(newVal) {
if (newVal ) {
// x
this.xData = newVal.map(val => {
return val.time;
@ -288,6 +289,9 @@ export default {
},
immediate: true
},
typeValue(newVal){
}
}
};
</script>

View File

@ -1,6 +1,6 @@
<template
<template>
<!-- 触发类型 -->
<div class="setion" v-if="isRefer">
<div class="setion" >
<p class="chartTitle"><span class="titleIcon"></span> {{ componentName }} {{ triggerType }}</p>
<!-- 触发数据数值渲染 -->
<div class="typeContent">
@ -33,7 +33,7 @@
<!-- <span style="font-size: 30px; font-weight: bold">{{ typeValue.speed }}</span> -->
<span style="font-size: 30px; font-weight: bold">{{ dataArr[0].speed }}</span>
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '流量' && dataArr">
<div style="font-size: 30px; font-weight: bold" v-if="title == '流量'">
<span style="font-size: 15px;">流量</span><br />
<span style="font-size: 30px; font-weight: bold">{{ dataArr[0].flow }}</span>
</div>
@ -149,7 +149,9 @@ export default {
watch: {
//
dataArr: {
handler(newVal) { },
handler(newVal) {
console.log("dataArr",newVal)
},
immediate: true
},

View File

@ -735,6 +735,10 @@ export default {
// this.$set(this.coordinateTableData, index, row);
},
OnSceneload(newV) {
var ip = window.location.host;
this.ipData = 'http://' + ip.split(':')[0] + ':5000';
// document.getElementById('mapModule').contentWindow.getIpData(this.ipData);
this.$refs.analysisWeb.contentWindow.getIpData('http://172.16.1.168:5000');
this.$refs.analysisWeb.contentWindow.getDianwei(this.$route.query.id);
this.unityDone = true;
},
@ -1040,6 +1044,9 @@ export default {
// document.getElementById("mapModule").contentWindow.getDestination(1)
const clientId = 'test_id_' + String(new Date().getTime()); //
// const host = 'ws://49.234.27.18:10087/'; // urlws://broker.emqx.io:8083/mqtt
var ip = window.location.host.split(":")[0];
console.log("ip",ip)
// const host = `ws://${ip}:10087`;
const host = 'ws://172.16.1.168:10087/';
const options = {
//

View File

@ -65,6 +65,9 @@ export default {
const clientId = "test_id_" + String(new Date().getTime()); //
// const host = 'ws://49.234.27.18:10087/'; // urlws://broker.emqx.io:8083/mqtt
var ip = window.location.host.split(":")[0];
console.log("ip",ip)
// const host = `ws://${ip}:10087`;
const host = 'ws://172.16.1.168:10087/';
const options = {

View File

@ -1,6 +1,6 @@
<template>
<div ref="box" class="box">
<el-empty v-show="componentList.length == 0" :image-size="400"></el-empty>
<el-empty v-show="sectionData.length == 0" :image-size="400"></el-empty>
<!-- <p class="title" style="margin-bottom: 20px;font-size: 20px;font-weight: 400;">数据看板</p> -->
<el-scrollbar class="scrollbar">
<div class="dataBoard" ref='dataBoard' v-if="activeName == 'second'">
@ -17,17 +17,6 @@
<span class="downPull1" data-num="1" @click="sectionHandle(i)"></span>
</div>
<div v-for="o in s.children" :key="o.analogAreaComponentId">
<!-- <OD v-if="o.componentName.includes('OD')" :pageType="o.graphicType" triggerType="触发"
:componentName="o.componentName" :echartArr="o.presentationForm"
:dataArr="o.trigger" :title="o.componentName.split('_')[0]"
:chartName='o.combinationName' />
<typeChart v-else :pageType="o.graphicType" :triggerType="o.timeMode"
:componentName="o.componentName"
:dataArr="o.timeMode == '触发' ? o.trigger : o.cycleTimeData"
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]"
:chartName='o.combinationName'
:typeValue="o.timeMode == '触发' ? typeValue : typeCycleTimeData" /> -->
<OD v-if="o.componentName.includes('OD')" :pageType="o.graphicType" triggerType="触发"
:componentName="o.componentName" :echartArr="o.presentationForm"
:dataArr="o.trigger" :title="o.componentName.split('_')[0]"
@ -354,50 +343,57 @@ export default {
};
},
created() {
this.idVal = this.$route.query.id;
getComponentSection({ VideoId: this.idVal }).then((res) => {
if (res.data.code == 200) {
this.componentList = res.data.data
this.siftData()
//
// this.componentList.forEach((val) => {
// this.sectionArr.push(val.combinationName);
// this.sectionArr = Array.from(new Set(this.sectionArr));
// });
// this.sectionData = this.sectionArr.map((item) => {
// item = { title: item, children: [] };
// this.componentList.forEach((val) => {
// if (item.title == val.combinationName) {
// item.children.push(val);
// }
// });
// return item;
// });
console.log(this.sectionData, '455');
} else if (res.data.code == 404) {
}
});
// this.idVal = this.$route.query.id;
// getComponentSection({ VideoId: this.idVal }).then((res) => {
// if (res.data.code == 200) {
// this.componentList = res.data.data
// console.log(res.data.data);
// this.siftData()
// //
// // this.componentList.forEach((val) => {
// // this.sectionArr.push(val.combinationName);
// // this.sectionArr = Array.from(new Set(this.sectionArr));
// // });
// // this.sectionData = this.sectionArr.map((item) => {
// // item = { title: item, children: [] };
// // this.componentList.forEach((val) => {
// // if (item.title == val.combinationName) {
// // item.children.push(val);
// // }
// // });
// // return item;
// // });
// console.log(this.sectionData, '455');
// } else if (res.data.code == 404) {
// }
// });
},
methods: {
siftData() {
this.componentList.forEach((val) => {
siftData(list) {
this.sectionData = []
this.sectionArr = []
list.forEach((val) => {
this.sectionArr.push(val.combinationName);
this.sectionArr = Array.from(new Set(this.sectionArr));
});
this.sectionData = this.sectionArr.map((item) => {
if (item.children == undefined) {
item = { title: item, children: [] };
}
this.componentList.forEach((val) => {
list.forEach((val) => {
if (item.title == val.combinationName) {
item.children.push(val);
}
});
return item;
});
console.log(this.sectionData, '筛选数据');
},
//
sectionHandle(i) {
@ -430,9 +426,35 @@ export default {
},
mounted() {
getComponentSection({ VideoId: this.$route.query.id }).then(res => {
if (res.data.code == 200) {
console.log(res.data.data, '请求数据');
this.componentList = res.data.data;
this.siftData(this.componentList);
} else if (res.data.code == 404) {
}
});
},
watch: {
watch: {
activeName: {
handler(newVal) {
console.log("newVal", newVal)
if (newVal == "second") {
getComponentSection({ VideoId: this.$route.query.id }).then(res => {
if (res.data.code == 200) {
console.log(res.data.data, '请求数据');
this.componentList = res.data.data;
this.siftData(this.componentList);
} else if (res.data.code == 404) {
}
});
}
},
immediate: true
},
//
triggerData: {
handler(newVal, oldVal) {
@ -445,30 +467,33 @@ export default {
handler(newVal) {
this.triggerList = newVal
//
// console.log(newVal, 'triggerlistData');
this.componentList.forEach(ele => {
if (ele.trigger == undefined && ele.timeMode == '触发') {
ele.trigger = []
}
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
if (ele.trigger.length == 10) {
ele.trigger.pop()
} else {
item.time = item.time.split('.')[0]
//
if (item.type_data != null) {
// console.log(item,'461461');
this.typeValue = item
}
ele.trigger.unshift(item)
}
console.log(newVal, 'triggerlistData');
if (newVal && this.sectionData.length!=0) {
this.componentList.forEach(ele => {
if (ele.trigger == undefined && ele.timeMode == '触发') {
ele.trigger = []
}
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
if (ele.trigger.length == 10) {
ele.trigger.pop()
} else {
item.time = item.time.split('.')[0]
//
if (item.type_data != null) {
// console.log(item,'461461');
this.typeValue = item
}
ele.trigger.unshift(item)
}
}
})
})
})
console.log(this.sectionData, '触发的筛选数据');
}
// console.log(this.sectionData, '');
},
immediate: true
},
@ -477,7 +502,7 @@ export default {
handler(newVal) {
//
console.log(newVal, '440');
if (newVal.length != 0) {
if (newVal.length != 0 && this.sectionData) {
this.componentList.forEach(ele => {
if (ele.cycleTimeData == undefined && ele.timeMode == '周期时刻') {
ele.cycleTimeData = []
@ -512,7 +537,7 @@ export default {
handler(newVal) {
console.log(newVal, '周期统计');
if (newVal.length != 0) {
if (newVal.length != 0&& this.sectionData) {
this.componentList.forEach(ele => {
if (ele.cycleStatistics == undefined && ele.timeMode == '周期统计') {
ele.cycleStatistics = [];
@ -541,7 +566,7 @@ export default {
console.log(this.sectionData, '周期统计筛选数据');
}
},
},