Compare commits
5 Commits
0eae020323
...
a0e97c56ee
Author | SHA1 | Date |
---|---|---|
|
a0e97c56ee | |
|
ba517b48ec | |
|
688972eb23 | |
|
17de0fe53e | |
|
407c084e90 |
|
@ -147,12 +147,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.drawLine();
|
this.drawLine();
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
list: {
|
list: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (newVal ) {
|
if (newVal.length!=0) {
|
||||||
|
|
||||||
// x轴的数据
|
// x轴的数据
|
||||||
this.xData = newVal.map(val => {
|
this.xData = newVal.map(val => {
|
||||||
|
@ -182,7 +182,7 @@ export default {
|
||||||
confine: true
|
confine: true
|
||||||
};
|
};
|
||||||
this.series[0].name = '总量';
|
this.series[0].name = '总量';
|
||||||
|
console.log("折线图",newVal)
|
||||||
// 映射出类型数组
|
// 映射出类型数组
|
||||||
let arr = newVal.map(function(ele) {
|
let arr = newVal.map(function(ele) {
|
||||||
if (ele.type_data != null) {
|
if (ele.type_data != null) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<p class="chartTitle"><span class="titleIcon"></span> {{ componentName }} {{ triggerType }}</p>
|
<p class="chartTitle"><span class="titleIcon"></span> {{ componentName }} {{ triggerType }}</p>
|
||||||
<!-- 触发数据数值渲染 -->
|
<!-- 触发数据数值渲染 -->
|
||||||
<div class="typeContent" v-if="triggerType == '触发' || '周期时刻'">
|
<div class="typeContent" v-if="triggerType == '触发' || '周期时刻'">
|
||||||
<div v-if="dataArr && dataArr.length != 0">
|
<div v-if="dataArr && dataArr.length != 0 && dataArr!=undefined">
|
||||||
<div v-if="title == '类型'" style="display:flex">
|
<div v-if="title == '类型'" style="display:flex">
|
||||||
<el-card v-for="(n, i) in typeValue.type_data" :key="i" style="width: 150px; margin-bottom: 20px; text-align: center">
|
<el-card v-for="(n, i) in typeValue.type_data" :key="i" style="width: 150px; margin-bottom: 20px; text-align: center">
|
||||||
<div>
|
<div>
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-card v-show="echartArr.includes('数值')" style="width: 150px; margin-bottom: 20px; text-align: center">
|
<el-card v-show="echartArr.includes('数值')" style="width: 150px; margin-bottom: 20px; text-align: center">
|
||||||
<div v-if="dataArr">
|
<div v-if="dataArr&& dataArr.length != 0 && dataArr!=undefined">
|
||||||
<div v-if="title == '类型'">
|
<div v-if="title == '类型'">
|
||||||
<span style="font-size: 15px;">类型数量总和</span><br />
|
<span style="font-size: 15px;">类型数量总和</span><br />
|
||||||
<span style="font-size: 30px; font-weight: bold">
|
<span style="font-size: 30px; font-weight: bold">
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="echartArr.includes('表格')">
|
<div v-show="echartArr.includes('表格')">
|
||||||
<div class="tableTitle" v-if="dataArr">
|
<div class="tableTitle" v-if="dataArr&& dataArr.length != 0 && dataArr!=undefined">
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"
|
style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;"
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<div class="border" v-if="echartArr.includes('曲线图')">
|
<div class="border" v-if="echartArr.includes('曲线图')">
|
||||||
<detailDialog />
|
<detailDialog />
|
||||||
<lineChart
|
<lineChart
|
||||||
style="width:100%;"
|
v-if="dataArr && dataArr.length != 0 && dataArr!=undefined"
|
||||||
:componentName="componentName"
|
:componentName="componentName"
|
||||||
:chartName="chartName"
|
:chartName="chartName"
|
||||||
:pageType="pageType"
|
:pageType="pageType"
|
||||||
|
|
|
@ -67,8 +67,8 @@ export default {
|
||||||
// const host = 'ws://49.234.27.18:10087/'; // 一个测试用url,改成给的,ws://broker.emqx.io:8083/mqtt
|
// const host = 'ws://49.234.27.18:10087/'; // 一个测试用url,改成给的,ws://broker.emqx.io:8083/mqtt
|
||||||
var ip = window.location.host.split(":")[0];
|
var ip = window.location.host.split(":")[0];
|
||||||
console.log("ip",ip)
|
console.log("ip",ip)
|
||||||
// const host = `ws://${ip}:10087`;
|
const host = `ws://${ip}:10087`;
|
||||||
const host = 'ws://172.16.1.168:10087/';
|
// const host = 'ws://172.16.1.168:10087/';
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
// 配置
|
// 配置
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
:echartArr="o.presentationForm"
|
:echartArr="o.presentationForm"
|
||||||
:title="o.componentName.split('_')[0]"
|
:title="o.componentName.split('_')[0]"
|
||||||
:chartName="o.combinationName"
|
:chartName="o.combinationName"
|
||||||
:typeValue="typeValue"
|
:typeValue="typeTimeMode"
|
||||||
/>
|
/>
|
||||||
<typeChart
|
<typeChart
|
||||||
v-if="o.timeMode === '周期时刻'"
|
v-if="o.timeMode === '周期时刻'"
|
||||||
|
@ -365,23 +365,28 @@ export default {
|
||||||
sectionArr: [],
|
sectionArr: [],
|
||||||
|
|
||||||
//触发的类型数值看板显示
|
//触发的类型数值看板显示
|
||||||
typeValue: {},
|
typeTimeMode: {},
|
||||||
// 周期时刻的数值看板展示
|
// 周期时刻的数值看板展示
|
||||||
typeCycleTimeData: {},
|
typeCycleTimeData: {},
|
||||||
typeCycleStatistics: {}
|
typeCycleStatistics: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.idVal = this.$route.query.id;
|
this.getNew()
|
||||||
getComponentSection({ VideoId: this.idVal }).then(res => {
|
},
|
||||||
|
methods: {
|
||||||
|
getNew(){
|
||||||
|
// this.idVal = ;
|
||||||
|
getComponentSection({ VideoId: this.$route.query.id }).then(res => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
this.componentList = res.data.data;
|
this.componentList = res.data.data;
|
||||||
this.siftData();
|
this.siftData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
siftData() {
|
siftData() {
|
||||||
|
// this.sectionArr=[]
|
||||||
|
// this.sectionData=[]
|
||||||
this.componentList.forEach(val => {
|
this.componentList.forEach(val => {
|
||||||
this.sectionArr.push(val.combinationName);
|
this.sectionArr.push(val.combinationName);
|
||||||
this.sectionArr = Array.from(new Set(this.sectionArr));
|
this.sectionArr = Array.from(new Set(this.sectionArr));
|
||||||
|
@ -418,6 +423,19 @@ export default {
|
||||||
// sectionBox[i].style.height = '48vh';
|
// sectionBox[i].style.height = '48vh';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
channge(oldVal, newVal){
|
||||||
|
console.log("old",oldVal)
|
||||||
|
console.log("newVal",newVal)
|
||||||
|
if(oldVal=='second'){
|
||||||
|
this.sectionArr=[]
|
||||||
|
this.sectionData=[]
|
||||||
|
this.getNew()
|
||||||
|
}else if(newVal=='second'){
|
||||||
|
this.sectionArr=[]
|
||||||
|
this.sectionData=[]
|
||||||
|
this.getNew()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触发数据的类型数值
|
// 触发数据的类型数值
|
||||||
|
@ -429,7 +447,7 @@ export default {
|
||||||
handler(newVal, oldVal) {},
|
handler(newVal, oldVal) {},
|
||||||
immediate: true
|
immediate: true
|
||||||
},
|
},
|
||||||
|
activeName:'channge',
|
||||||
// 处理过的触发数据
|
// 处理过的触发数据
|
||||||
triggerListData: {
|
triggerListData: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
|
@ -450,7 +468,7 @@ export default {
|
||||||
// 该时间的触发数据
|
// 该时间的触发数据
|
||||||
if (item.type_data != null) {
|
if (item.type_data != null) {
|
||||||
// console.log(item,'461461');
|
// console.log(item,'461461');
|
||||||
this.typeValue = item;
|
this.typeTimeMode = item
|
||||||
}
|
}
|
||||||
ele.trigger.unshift(item);
|
ele.trigger.unshift(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,8 +409,6 @@ export default {
|
||||||
getDataByMqtt(url, topic, cIdNum) {
|
getDataByMqtt(url, topic, cIdNum) {
|
||||||
const clientId = "test_id_" + String(new Date().getTime()); // 用户名
|
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://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 host = 'ws://172.16.1.168:10087/';
|
||||||
|
|
||||||
|
|
|
@ -1029,14 +1029,14 @@ export default {
|
||||||
message: res.data.msg,
|
message: res.data.msg,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
this.$message({
|
// this.$message({
|
||||||
type: 'warning',
|
// type: 'warning',
|
||||||
message: '请点击交通分析,获取最新数据!',
|
// message: '请点击交通分析,获取最新数据!',
|
||||||
showClose: true,
|
// showClose: true,
|
||||||
duration: 0
|
// duration: 0
|
||||||
});
|
// });
|
||||||
}, 5000);
|
// }, 5000);
|
||||||
console.log('startFigureName', this.startFigureName);
|
console.log('startFigureName', this.startFigureName);
|
||||||
document.getElementById('mapModule').contentWindow.postFigureId(JSON.stringify(res.data.data));
|
document.getElementById('mapModule').contentWindow.postFigureId(JSON.stringify(res.data.data));
|
||||||
console.log('this.numberNew', this.numberNew);
|
console.log('this.numberNew', this.numberNew);
|
||||||
|
|
Loading…
Reference in New Issue