bug修改
This commit is contained in:
parent
e42ece6210
commit
8b96a47daa
|
@ -86,6 +86,7 @@
|
||||||
<div class="border" v-if="echartArr.includes('曲线图')">
|
<div class="border" v-if="echartArr.includes('曲线图')">
|
||||||
<detailDialog />
|
<detailDialog />
|
||||||
<lineChart
|
<lineChart
|
||||||
|
style="width:100%;"
|
||||||
:componentName="componentName"
|
:componentName="componentName"
|
||||||
:chartName="chartName"
|
:chartName="chartName"
|
||||||
:pageType="pageType"
|
:pageType="pageType"
|
||||||
|
|
|
@ -3,11 +3,15 @@
|
||||||
<el-empty v-show="componentList.length == 0" :image-size="400"></el-empty>
|
<el-empty v-show="componentList.length == 0" :image-size="400"></el-empty>
|
||||||
<!-- <p class="title" style="margin-bottom: 20px;font-size: 20px;font-weight: 400;">数据看板</p> -->
|
<!-- <p class="title" style="margin-bottom: 20px;font-size: 20px;font-weight: 400;">数据看板</p> -->
|
||||||
<el-scrollbar class="scrollbar">
|
<el-scrollbar class="scrollbar">
|
||||||
<div class="dataBoard" ref='dataBoard' v-if="activeName == 'second'">
|
<div class="dataBoard" ref="dataBoard" v-if="activeName == 'second'">
|
||||||
<!-- 断面 -->
|
<!-- 断面 -->
|
||||||
<div class="plate1" ref="plate1">
|
<div class="plate1" ref="plate1">
|
||||||
<div :class="sectionData.length <= 2 ? 'sectionBox' : 'section'" ref="section"
|
<div
|
||||||
v-for="(s, i) in sectionData" :key="s.analogAreaComponentId">
|
:class="sectionData.length <= 2 ? 'sectionBox' : 'section'"
|
||||||
|
ref="section"
|
||||||
|
v-for="(s, i) in sectionData"
|
||||||
|
:key="s.analogAreaComponentId"
|
||||||
|
>
|
||||||
<template>
|
<template>
|
||||||
<div ref="sectionContent" >
|
<div ref="sectionContent" >
|
||||||
<div>
|
<div>
|
||||||
|
@ -16,40 +20,62 @@
|
||||||
</p>
|
</p>
|
||||||
<span class="downPull1" data-num="1" @click="sectionHandle(i)"></span>
|
<span class="downPull1" data-num="1" @click="sectionHandle(i)"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<el-collapse v-model="s.children[0].analogAreaComponentId">
|
||||||
<div v-for="o in s.children" :key="o.analogAreaComponentId">
|
<div v-for="o in s.children" :key="o.analogAreaComponentId">
|
||||||
|
<el-collapse-item :title=o.componentName :name="o.analogAreaComponentId" >
|
||||||
<!-- <OD v-if="o.componentName.includes('OD')" :pageType="o.graphicType" triggerType="触发"
|
<OD
|
||||||
:componentName="o.componentName" :echartArr="o.presentationForm"
|
v-if="o.componentName.includes('OD')"
|
||||||
:dataArr="o.trigger" :title="o.componentName.split('_')[0]"
|
:pageType="o.graphicType"
|
||||||
:chartName='o.combinationName' />
|
triggerType="触发"
|
||||||
<typeChart v-else :pageType="o.graphicType" :triggerType="o.timeMode"
|
|
||||||
:componentName="o.componentName"
|
:componentName="o.componentName"
|
||||||
:dataArr="o.timeMode == '触发' ? o.trigger : o.cycleTimeData"
|
:echartArr="o.presentationForm"
|
||||||
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]"
|
:dataArr="o.trigger"
|
||||||
:chartName='o.combinationName'
|
:title="o.componentName.split('_')[0]"
|
||||||
:typeValue="o.timeMode == '触发' ? typeValue : typeCycleTimeData" /> -->
|
:chartName="o.combinationName"
|
||||||
<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-if="o.timeMode === '触发'" :pageType="o.graphicType" :triggerType="o.timeMode"
|
<typeChart
|
||||||
:componentName="o.componentName" :dataArr="o.trigger"
|
v-if="o.timeMode === '触发'"
|
||||||
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]"
|
:pageType="o.graphicType"
|
||||||
:chartName="o.combinationName" :typeValue="typeValue" />
|
:triggerType="o.timeMode"
|
||||||
<typeChart v-if="o.timeMode === '周期时刻'" :pageType="o.graphicType"
|
:componentName="o.componentName"
|
||||||
:triggerType="o.timeMode" :componentName="o.componentName"
|
:dataArr="o.trigger"
|
||||||
:dataArr="o.cycleTimeData" :echartArr="o.presentationForm"
|
:echartArr="o.presentationForm"
|
||||||
:title="o.componentName.split('_')[0]" :chartName="o.combinationName"
|
:title="o.componentName.split('_')[0]"
|
||||||
:typeValue="typeCycleTimeData" />
|
:chartName="o.combinationName"
|
||||||
|
:typeValue="typeValue"
|
||||||
|
/>
|
||||||
|
<typeChart
|
||||||
|
v-if="o.timeMode === '周期时刻'"
|
||||||
|
:pageType="o.graphicType"
|
||||||
|
:triggerType="o.timeMode"
|
||||||
|
:componentName="o.componentName"
|
||||||
|
:dataArr="o.cycleTimeData"
|
||||||
|
:echartArr="o.presentationForm"
|
||||||
|
:title="o.componentName.split('_')[0]"
|
||||||
|
:chartName="o.combinationName"
|
||||||
|
:typeValue="typeCycleTimeData"
|
||||||
|
/>
|
||||||
<!-- 周期统计的组件 -->
|
<!-- 周期统计的组件 -->
|
||||||
<typeChart v-if="o.timeMode === '周期统计'" :pageType="o.graphicType"
|
<typeChart
|
||||||
:triggerType="o.timeMode" :componentName="o.componentName"
|
style="width: 100%;"
|
||||||
:dataArr="o.cycleStatistics" :echartArr="o.presentationForm"
|
v-if="o.timeMode === '周期统计'"
|
||||||
:title="o.componentName.split('_')[0]" :chartName="o.combinationName"
|
:pageType="o.graphicType"
|
||||||
:typeValue="typeCycleStatistics" />
|
:triggerType="o.timeMode"
|
||||||
|
:componentName="o.componentName"
|
||||||
|
:dataArr="o.cycleStatistics"
|
||||||
|
:echartArr="o.presentationForm"
|
||||||
|
:title="o.componentName.split('_')[0]"
|
||||||
|
:chartName="o.combinationName"
|
||||||
|
:typeValue="typeCycleStatistics"
|
||||||
|
/>
|
||||||
|
</el-collapse-item>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- :data="triggerList.length != 0 ? triggerList : tableData" -->
|
|
||||||
|
</el-collapse>
|
||||||
|
|
||||||
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,10 +126,11 @@ export default {
|
||||||
default() {
|
default() {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
acticveName: '1',
|
||||||
title1: '01断面',
|
title1: '01断面',
|
||||||
title2: '01区域',
|
title2: '01区域',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
@ -322,8 +349,6 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
idVal: '',
|
idVal: '',
|
||||||
//组件数组
|
//组件数组
|
||||||
componentList: [],
|
componentList: [],
|
||||||
|
@ -332,16 +357,12 @@ export default {
|
||||||
|
|
||||||
sectionData: [],
|
sectionData: [],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 单个区域或者断面的表格触发数据
|
// 单个区域或者断面的表格触发数据
|
||||||
tableList: [],
|
tableList: [],
|
||||||
|
|
||||||
|
|
||||||
// 路线数据
|
// 路线数据
|
||||||
headWay: [],
|
headWay: [],
|
||||||
|
|
||||||
|
|
||||||
tripData: [],
|
tripData: [],
|
||||||
|
|
||||||
sectionArr: [],
|
sectionArr: [],
|
||||||
|
@ -355,41 +376,22 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.idVal = this.$route.query.id;
|
this.idVal = this.$route.query.id;
|
||||||
getComponentSection({ VideoId: this.idVal }).then((res) => {
|
getComponentSection({ VideoId: this.idVal }).then(res => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
console.log(res.data.data, '11111111111111111');
|
this.componentList = res.data.data;
|
||||||
this.componentList = res.data.data
|
this.siftData();
|
||||||
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: {
|
methods: {
|
||||||
|
|
||||||
siftData() {
|
siftData() {
|
||||||
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));
|
||||||
});
|
});
|
||||||
this.sectionData = this.sectionArr.map((item) => {
|
this.sectionData = this.sectionArr.map(item => {
|
||||||
item = { title: item, children: [] };
|
item = { title: item, children: [] };
|
||||||
this.componentList.forEach((val) => {
|
this.componentList.forEach(val => {
|
||||||
if (item.title == val.combinationName) {
|
if (item.title == val.combinationName) {
|
||||||
item.children.push(val);
|
item.children.push(val);
|
||||||
}
|
}
|
||||||
|
@ -404,69 +406,58 @@ export default {
|
||||||
let downPulls1 = document.querySelectorAll('.downPull1');
|
let downPulls1 = document.querySelectorAll('.downPull1');
|
||||||
// 断面的小图标
|
// 断面的小图标
|
||||||
downPulls1[i].dataset.num++;
|
downPulls1[i].dataset.num++;
|
||||||
|
|
||||||
if (downPulls1[i].dataset.num % 2 == 0) {
|
if (downPulls1[i].dataset.num % 2 == 0) {
|
||||||
downPulls1[i].style.cssText = 'transform: rotate(180deg);transition: all 0.5s linear;';
|
downPulls1[i].style.cssText = 'transform: rotate(180deg);transition: all 0.5s linear;';
|
||||||
sections[i].style.height = 'auto';
|
// sections[i].style.height = 'auto';
|
||||||
if (sectionBox[i] != undefined) {
|
if (sectionBox[i] != undefined) {
|
||||||
sectionBox[i].style.height = 'auto';
|
// sectionBox[i].style.height = 'auto';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
downPulls1[i].style.cssText = 'transition: all 0.5s linear;';
|
downPulls1[i].style.cssText = 'transition: all 0.5s linear;';
|
||||||
sections[i].style.height = '500px';
|
// sections[i].style.height = '500px';
|
||||||
if (sectionBox[i] != undefined) {
|
if (sectionBox[i] != undefined) {
|
||||||
sectionBox[i].style.height = '48vh'
|
// sectionBox[i].style.height = '48vh';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 触发数据的类型数值
|
// 触发数据的类型数值
|
||||||
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
},
|
||||||
|
mounted() {},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
// 触发的原始数据
|
// 触发的原始数据
|
||||||
triggerData: {
|
triggerData: {
|
||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {},
|
||||||
},
|
|
||||||
immediate: true
|
immediate: true
|
||||||
},
|
},
|
||||||
|
|
||||||
// 处理过的触发数据
|
// 处理过的触发数据
|
||||||
triggerListData: {
|
triggerListData: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
this.triggerList = newVal
|
this.triggerList = newVal;
|
||||||
// 触发数据
|
// 触发数据
|
||||||
// console.log(newVal, 'triggerlistData');
|
// console.log(newVal, 'triggerlistData');
|
||||||
|
|
||||||
this.componentList.forEach(ele => {
|
this.componentList.forEach(ele => {
|
||||||
if (ele.trigger == undefined && ele.timeMode == '触发') {
|
if (ele.trigger == undefined && ele.timeMode == '触发') {
|
||||||
ele.trigger = []
|
ele.trigger = [];
|
||||||
}
|
}
|
||||||
newVal.forEach(item => {
|
newVal.forEach(item => {
|
||||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
|
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
|
||||||
if (ele.trigger.length == 10) {
|
if (ele.trigger.length == 10) {
|
||||||
ele.trigger.pop()
|
ele.trigger.pop();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
item.time = item.time.split('.')[0]
|
item.time = item.time.split('.')[0];
|
||||||
// 该时间的触发数据
|
// 该时间的触发数据
|
||||||
if (item.type_data != null) {
|
if (item.type_data != null) {
|
||||||
// console.log(item,'461461');
|
// console.log(item,'461461');
|
||||||
this.typeValue = item
|
this.typeValue = item;
|
||||||
}
|
}
|
||||||
ele.trigger.unshift(item)
|
ele.trigger.unshift(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
console.log(this.sectionData,'触发的筛选数据');
|
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
},
|
},
|
||||||
|
@ -478,24 +469,27 @@ export default {
|
||||||
if (newVal.length != 0) {
|
if (newVal.length != 0) {
|
||||||
this.componentList.forEach(ele => {
|
this.componentList.forEach(ele => {
|
||||||
if (ele.cycleTimeData == undefined && ele.timeMode == '周期时刻') {
|
if (ele.cycleTimeData == undefined && ele.timeMode == '周期时刻') {
|
||||||
ele.cycleTimeData = []
|
ele.cycleTimeData = [];
|
||||||
}
|
}
|
||||||
newVal.forEach(item => {
|
newVal.forEach(item => {
|
||||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期时刻' && ele.analogAreaGraphId == item.graphical_id) {
|
if (
|
||||||
|
ele.analogAreaComponentId == item.component_id &&
|
||||||
|
ele.timeMode == '周期时刻' &&
|
||||||
|
ele.analogAreaGraphId == item.graphical_id
|
||||||
|
) {
|
||||||
if (ele.cycleTimeData.length == 10) {
|
if (ele.cycleTimeData.length == 10) {
|
||||||
ele.cycleTimeData.slice(ele.cycleTimeData.length-1,0)
|
ele.cycleTimeData.slice(ele.cycleTimeData.length - 1, 0);
|
||||||
} else {
|
} else {
|
||||||
item.time = item.time.split('.')[0]
|
item.time = item.time.split('.')[0];
|
||||||
if (item.type_data != null) {
|
if (item.type_data != null) {
|
||||||
// 周期时刻的类型数据
|
// 周期时刻的类型数据
|
||||||
this.typeCycleTimeData = item
|
this.typeCycleTimeData = item;
|
||||||
}
|
}
|
||||||
ele.cycleTimeData.unshift(item)
|
ele.cycleTimeData.unshift(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
console.log(this.sectionData, '455');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
|
@ -516,19 +510,14 @@ export default {
|
||||||
ele.cycleStatistics = [];
|
ele.cycleStatistics = [];
|
||||||
}
|
}
|
||||||
newVal.forEach(item => {
|
newVal.forEach(item => {
|
||||||
if (
|
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期统计') {
|
||||||
ele.analogAreaComponentId == item.component_id &&
|
|
||||||
ele.timeMode == '周期统计'
|
|
||||||
) {
|
|
||||||
if (ele.cycleStatistics.length == 10) {
|
if (ele.cycleStatistics.length == 10) {
|
||||||
ele.cycleStatistics.pop();
|
ele.cycleStatistics.pop();
|
||||||
} else {
|
} else {
|
||||||
item.time = item.time.split('.')[0]
|
item.time = item.time.split('.')[0];
|
||||||
if (item.type_data != null) {
|
if (item.type_data != null) {
|
||||||
|
|
||||||
//周期时刻的类型数据
|
//周期时刻的类型数据
|
||||||
this.typeCycleStatistics = item;
|
this.typeCycleStatistics = item;
|
||||||
|
|
||||||
}
|
}
|
||||||
ele.cycleStatistics.unshift(item);
|
ele.cycleStatistics.unshift(item);
|
||||||
}
|
}
|
||||||
|
@ -536,9 +525,8 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log(this.sectionData, '周期统计筛选数据');
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
// activeName: {
|
// activeName: {
|
||||||
// handler(newVal) {
|
// handler(newVal) {
|
||||||
// if (newVal == "second") {
|
// if (newVal == "second") {
|
||||||
|
@ -554,10 +542,7 @@ export default {
|
||||||
// },
|
// },
|
||||||
// immediate: true
|
// immediate: true
|
||||||
// }
|
// }
|
||||||
},
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -577,7 +562,7 @@ export default {
|
||||||
|
|
||||||
/deep/ .el-scrollbar__view {
|
/deep/ .el-scrollbar__view {
|
||||||
display: inline-block !important;
|
display: inline-block !important;
|
||||||
width: 100%
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .el-scrollbar__wrap {
|
/deep/ .el-scrollbar__wrap {
|
||||||
|
@ -591,7 +576,6 @@ export default {
|
||||||
.dataBoard {
|
.dataBoard {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataBoard .region,
|
.dataBoard .region,
|
||||||
|
@ -600,7 +584,7 @@ export default {
|
||||||
border: 1px solid #e4e7ed;
|
border: 1px solid #e4e7ed;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
height: 500px;
|
height: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: all 1s;
|
transition: all 1s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -608,7 +592,7 @@ export default {
|
||||||
|
|
||||||
.dataBoard .sectionBox {
|
.dataBoard .sectionBox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 48vh;
|
height: auto;
|
||||||
border: 1px solid #e4e7ed;
|
border: 1px solid #e4e7ed;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
|
Loading…
Reference in New Issue