20230222
This commit is contained in:
parent
ffd9b35f5f
commit
390216761c
|
@ -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;
|
||||
|
|
|
@ -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/'; // 一个测试用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://172.16.1.168:10087/';
|
||||
const host = `ws://${ip}:10087`;
|
||||
// const host = 'ws://172.16.1.168:10087/';
|
||||
const options = {
|
||||
// 配置
|
||||
// 测试:订阅本机IP
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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/'; // 一个测试用url,改成给的,ws://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 = {
|
||||
// 配置
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue