Compare commits
4 Commits
ed3fbc8c7a
...
0978f5d2bf
Author | SHA1 | Date |
---|---|---|
|
0978f5d2bf | |
|
73b29f7af1 | |
|
de30027f02 | |
|
31fb608988 |
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
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
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
File diff suppressed because one or more lines are too long
|
@ -6,9 +6,14 @@
|
|||
export default {
|
||||
name: 'barChart', //均值图图组件
|
||||
props: {
|
||||
list: Array,
|
||||
default() {
|
||||
return [];
|
||||
list: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
typeValue: {
|
||||
type:Object,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -93,7 +98,7 @@ export default {
|
|||
itemStyle: {
|
||||
color: '#DF8414'
|
||||
},
|
||||
data: [arr[arr.length-1].avg],
|
||||
data: [10],
|
||||
zlevel: 11
|
||||
},
|
||||
{
|
||||
|
@ -116,7 +121,7 @@ export default {
|
|||
itemStyle: {
|
||||
color: '#0E76AF'
|
||||
},
|
||||
data: [arr[arr.length-1].med],
|
||||
data: [30],
|
||||
zlevel: 11
|
||||
},
|
||||
{
|
||||
|
@ -124,7 +129,7 @@ export default {
|
|||
type: 'bar',
|
||||
barWidth: 150,
|
||||
barGap: '-100%',
|
||||
data: [arr[arr.length-1].min],
|
||||
data: [20],
|
||||
label: {
|
||||
show: true,
|
||||
position: 'bottom',
|
||||
|
@ -147,7 +152,7 @@ export default {
|
|||
type: 'bar',
|
||||
barWidth: 150,
|
||||
barGap: '-100%',
|
||||
data:[arr[arr.length-1].max],
|
||||
data: [200],
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
|
@ -175,16 +180,16 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.drawBar()
|
||||
},
|
||||
watch:{
|
||||
list:{
|
||||
handler(newVal){
|
||||
if(newVal){
|
||||
this.drawBar(newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
watch: {
|
||||
// typeValue: {
|
||||
// handler(newVal) {
|
||||
// if (newVal) {
|
||||
// this.drawBar(newVal);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -128,7 +128,7 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.drawBar()
|
||||
},
|
||||
watch: {
|
||||
typeValue: {
|
||||
|
|
|
@ -72,6 +72,7 @@ export default {
|
|||
lineHeight: '30'
|
||||
}
|
||||
},
|
||||
legend:{},
|
||||
grid: {
|
||||
left: '2%',
|
||||
right: '4%',
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
|
||||
<div id="pieChart" ref="pieChart" style="width:100%;height:300px;"></div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -20,8 +18,8 @@ export default {
|
|||
chartName: {
|
||||
type: String
|
||||
},
|
||||
typeValue:{
|
||||
type:Object
|
||||
typeValue: {
|
||||
type: Object
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -31,11 +29,23 @@ export default {
|
|||
// 图例数据
|
||||
legend: [],
|
||||
// pie图数据
|
||||
seriesData: []
|
||||
seriesData: [
|
||||
{
|
||||
name: '机动车',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: '非机动车',
|
||||
value: 0
|
||||
}, {
|
||||
name: '行人',
|
||||
value: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
drawPie() {
|
||||
|
@ -49,11 +59,11 @@ export default {
|
|||
'#FFC722'
|
||||
];
|
||||
let option = {
|
||||
title:{
|
||||
show:true,
|
||||
text:this.componentName + '-' + this.chartName + '-' + '饼状图',
|
||||
textStyle:{
|
||||
lineHeight:'30',
|
||||
title: {
|
||||
show: true,
|
||||
text: this.componentName + '-' + this.chartName + '-' + '饼状图',
|
||||
textStyle: {
|
||||
lineHeight: '30',
|
||||
}
|
||||
},
|
||||
color: color,
|
||||
|
@ -111,7 +121,7 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.drawPie();
|
||||
},
|
||||
watch: {
|
||||
typeValue: {
|
||||
|
@ -120,6 +130,7 @@ export default {
|
|||
this.legend = newVal.type_data.map(ele => {
|
||||
return ele.name
|
||||
});
|
||||
this.seriesData = []
|
||||
newVal.type_data.forEach(ele => {
|
||||
this.seriesData.push({
|
||||
name: ele.name,
|
||||
|
@ -127,13 +138,11 @@ export default {
|
|||
})
|
||||
})
|
||||
this.drawPie()
|
||||
this.seriesData = []
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
|
@ -69,6 +69,14 @@
|
|||
|
||||
</div>
|
||||
<div v-show="echartArr.includes('表格')">
|
||||
<div class="tableTitle">
|
||||
<div class="">
|
||||
|
||||
</div>
|
||||
<div class="tableTime">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="pageType == '断面'" style="margin-bottom: 20px; border: 1px solid #e4e7ed">
|
||||
<tableShow :msg="dataArr" :type="triggerType" />
|
||||
</div>
|
||||
|
|
|
@ -422,7 +422,7 @@ export default {
|
|||
handler(newVal) {
|
||||
this.triggerList = newVal
|
||||
// 触发数据
|
||||
// console.log(newVal, 'triggerlistData');
|
||||
console.log(newVal, 'triggerlistData');
|
||||
|
||||
this.componentList.forEach(ele => {
|
||||
if (ele.trigger == undefined && ele.timeMode == '触发') {
|
||||
|
|
Loading…
Reference in New Issue