This commit is contained in:
chengdandan 2023-02-22 14:51:33 +08:00
parent ffd9b35f5f
commit 390216761c
5 changed files with 53 additions and 32 deletions

View File

@ -147,13 +147,13 @@ export default {
}
},
mounted() {
this.drawLine();
// this.drawLine();
},
watch: {
list: {
handler(newVal) {
if (newVal ) {
// x
this.xData = newVal.map(val => {
return val.time;

View File

@ -737,9 +737,9 @@ export default {
OnSceneload(newV) {
var ip = window.location.host;
this.ipData = 'http://' + ip.split(':')[0] + ':5000';
// document.getElementById('mapModule').contentWindow.getIpData(this.ipData);
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.$refs.analysisWeb.contentWindow.getDianwei(this.$route.query.id);
this.unityDone = true;
},
handleDeleteDian(row, idx) {
@ -1046,8 +1046,8 @@ export default {
// 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 host = `ws://${ip}:10087`;
// const host = 'ws://172.16.1.168:10087/';
const options = {
//
// IP

View File

@ -350,12 +350,23 @@ export default {
typeValue: {},
//
typeCycleTimeData: {},
typeCycleStatistics: {}
typeCycleStatistics: {},
nw:'1'
};
},
created() {
this.idVal = this.$route.query.id;
getComponentSection({ VideoId: this.idVal }).then((res) => {
this.sectionData=[]
this.sectionArr=[]
// if(this.nw=='second'){
// }
// this.getNEW()
},
methods: {
getNEW(){
getComponentSection({ VideoId: this.$route.query.id }).then((res) => {
if (res.data.code == 200) {
this.componentList = res.data.data
this.siftData()
@ -377,13 +388,10 @@ export default {
} else if (res.data.code == 404) {
}
});
},
methods: {
},
siftData() {
// this.sectionData=[]
// this.sectionArr=[]
this.sectionArr=[]
this.sectionData=[]
this.componentList.forEach((val) => {
this.sectionArr.push(val.combinationName);
this.sectionArr = Array.from(new Set(this.sectionArr));
@ -427,7 +435,13 @@ export default {
}
},
channge(oldVal,newVal){
if (newVal == "second") {
this.getNEW()
}else if(oldVal == "second"){
this.getNEW()
}
}
//
@ -435,22 +449,25 @@ export default {
mounted() {
},
watch: {
activeName: {
handler(newVal) {
console.log("newVal",newVal)
if (newVal == "second") {
getComponentSection({ VideoId: this.$route.query.id }).then(res => {
// if (res.data.code == 200) {
this.componentList = res.data.data;
this.siftData();
// } else if (res.data.code == 404) {
// }
});
}
// activeName: {
// handler(newVal) {
// console.log("newVal",newVal)
// if (newVal == "second") {
// // getComponentSection({ VideoId: this.$route.query.id }).then(res => {
// // if (res.data.code == 200) {
// // this.componentList = res.data.data;
// // this.siftData();
// // } else if (res.data.code == 404) {
// // }
// // });
// // this.nw=newVal
// this.getNEW()
// }
},
immediate: true
},
// },
// immediate: true
// },
activeName:'channge',
//
triggerData: {
handler(newVal, oldVal) {

View File

@ -409,7 +409,10 @@ export default {
getDataByMqtt(url, topic, cIdNum) {
const clientId = "test_id_" + String(new Date().getTime()); //
// const host = 'ws://49.234.27.18:10087/'; // urlws://broker.emqx.io:8083/mqtt
const host = 'ws://172.16.1.168:10087/';
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

@ -172,7 +172,7 @@
<el-checkbox label="时间曲线图" name="type"></el-checkbox>
<el-checkbox label="直方图" name="presentation" v-if="componentForm.componentType == '类型'"></el-checkbox>
<el-checkbox label="饼状图" name="presentation" v-if="componentForm.componentType == '类型'"></el-checkbox>
<el-checkbox label="均值图" name="presentation" v-if="componentForm.componentType != '拥堵'"></el-checkbox>
<el-checkbox label="均值图" name="presentation" v-if="componentForm.componentType != '拥堵'||componentForm.componentType != '流量'||componentForm.componentType != '类型'||componentForm.componentType != '延误'"></el-checkbox>
</el-checkbox-group>
<!-- <el-checkbox-group v-model="componentForm.presentation" @change="handlePresentation">
<el-checkbox v-for="item in sectionals" :label="item.graphicName" :key="item.graphicId" >{{item.graphicName}}</el-checkbox>
@ -623,6 +623,7 @@ export default {
const temp = utf8decoder.decode(u8arr); //
var detId = [];
const msgN = JSON.parse(temp);
// console.log("trigger_msgN",msgN)
this.triggerListData = msgN;
} catch (error) {}
break;