- {{ this.chartName + '-' + this.componentName + '-' + '表格' + '-' + triggerType }}
+ style="width: 10px;height:10px;border-radius: 50%;background-color: #3297ff;display: inline-block;vertical-align: middle;margin-right: 8px;">
+ {{ this.chartName + '-' + this.componentName + '-' + '表格' + '-' +
+ triggerType }}
{{ dataArr[0].time ? dataArr[0].time : '' }}
@@ -84,16 +85,8 @@
-
+
@@ -146,8 +139,8 @@ export default {
valueShow: {}
};
},
- created() {
- console.log(this.title+'TYPECHARTdataArr', this.dataArr)
+ created() {
+ console.log(this.title + 'TYPECHARTdataArr', this.dataArr)
},
methods: {
// 计算类型的数值
@@ -155,8 +148,10 @@ export default {
computed: {
// 获取类型的总数量
- getTotal(){
-
+ getTotal() {
+ return this.dataArr[0].type_data((pre, cur) => {
+ return pre + cur
+ }, 0)
}
},
mounted() { },
@@ -164,17 +159,17 @@ export default {
// 监听触发数据
dataArr: {
handler(newVal) {
-
+
},
immediate: true
},
typeValue: {
handler(newVal) {
-
-
+
+
},
- immediate:true
+ immediate: true
}
// cycleTimeData: {
// handler(newVal) {
diff --git a/src/views/bounced/dataBoard.vue b/src/views/bounced/dataBoard.vue
index df10d186..e37cc1b5 100644
--- a/src/views/bounced/dataBoard.vue
+++ b/src/views/bounced/dataBoard.vue
@@ -339,7 +339,10 @@ export default {
typeTimeMode: {},
// 周期时刻的数值看板展示
typeCycleTimeData: {},
- typeCycleStatistics: {}
+ typeCycleStatistics: {},
+
+ // 各个组件分类
+ classify: []
};
},
// beforeCeated(){
@@ -360,8 +363,8 @@ export default {
});
},
siftData() {
- // this.sectionArr=[]
- // this.sectionData=[]
+ this.sectionArr=[]
+ this.sectionData=[]
this.componentList.forEach(val => {
this.sectionArr.push(val.combinationName);
this.sectionArr = Array.from(new Set(this.sectionArr));
@@ -371,6 +374,7 @@ export default {
this.acticveName = [];
this.componentList.forEach(val => {
if (item.title == val.combinationName) {
+ this.classify.push(val)
item.children.push(val);
}
this.acticveName.push(val.analogAreaComponentId);
@@ -396,7 +400,7 @@ export default {
downPulls1[i].style.cssText = 'transition: all 0.5s linear;';
// sections[i].style.height = '500px';
if (sectionBox[i] != undefined) {
- // sectionBox[i].style.height = '48vh';
+
}
}
},
@@ -418,6 +422,15 @@ export default {
},
mounted() { },
watch: {
+ // acticveName: {
+ // handler(newVal) {
+ // if (newVal != 'second') {
+ // // 组件数据赋空
+ // this.classify = []
+ // }
+ // }
+
+ // },
// 触发的原始数据
triggerData: {
handler(newVal, oldVal) { },
@@ -432,12 +445,12 @@ export default {
console.log(newVal, 'triggerlistData');
var _this = this
if (newVal.length != 0 && _this.sectionData) {
- _this.componentList.forEach(ele => {
+ _this.classify.forEach((ele, index) => {
if (ele.trigger == undefined && ele.timeMode == '触发') {
ele.trigger = [];
}
- newVal.forEach((item, i) => {
+ newVal.forEach((item) => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
if (ele.trigger.length == 10) {
ele.trigger.splice(newVal.length - 1, 1);
@@ -449,8 +462,11 @@ export default {
}
ele.trigger.unshift(item);
_this.$nextTick(() => {
- if (_this.$refs.typeChartRef[i].$refs.lineChartRef.drawLine) {
- _this.$refs.typeChartRef[i].$refs.lineChartRef.drawLine(ele.trigger, ele.componentName.split('_')[0])
+ console.log(index, '满足条件的索引');
+ console.log(_this.$refs.typeChartRef[index], index, '...........');
+ if (_this.$refs.typeChartRef[index] != undefined) {
+ console.log(_this.$refs.typeChartRef[index].dataArr, '数据');
+ _this.$refs.typeChartRef[index].$refs.lineChartRef.drawLine(ele.trigger, ele.componentName.split('_')[0])
}
})