|
@@ -322,30 +322,7 @@
|
|
|
},
|
|
|
// 下拉选择
|
|
|
clickSelectItem(item, index) {
|
|
|
- this.staticData = '';
|
|
|
- this.datavalue='';
|
|
|
- // this.dataname='';
|
|
|
-
|
|
|
-
|
|
|
- /** 数组对象去重方法一 */
|
|
|
-
|
|
|
- // let obj1 = {};
|
|
|
- // let res1 = [];
|
|
|
- // this.indicator.forEach((item)=> {
|
|
|
- // if(!obj1[item.color]) {
|
|
|
- // res1.push(item);
|
|
|
- // obj1[item.color] = true;
|
|
|
- // }
|
|
|
- // });
|
|
|
- // console.log(res1);
|
|
|
- // this.indicator=res1;
|
|
|
- // console.log('this.indicator');
|
|
|
- // console.log(this.indicator);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // this.indicator=null;
|
|
|
+ this.staticData = '';
|
|
|
this.selectedCode = item.owner_code;
|
|
|
uni.setStorageSync('selectedCode', item.owner_code);
|
|
|
uni.setStorageSync('selectedName', item.owner_name);
|
|
@@ -386,16 +363,15 @@
|
|
|
// console.log(res.data.data[0])
|
|
|
this.staticData = res.data.data[0];
|
|
|
|
|
|
- var data = res.data.data[0]
|
|
|
+ // var data = res.data.data[0]
|
|
|
|
|
|
- var datavalue = [data.fire_water_count, data.alarm_host_count, data
|
|
|
- .electrical_fire_count, data.other_count, data.video_monitoring_count
|
|
|
+ var datavalue = [this.staticData.fire_water_count, this.staticData.alarm_host_count, this.staticData.electrical_fire_count, this.staticData.other_count, this.staticData.video_monitoring_count
|
|
|
]
|
|
|
var dataname = ['消防水系统', '报警主机', '电气火灾', '其他', '监控视频']
|
|
|
var color = ['#3C8BF0', '#06CDF8', '#0ECB70', '#6744EF', '#FFD803'];
|
|
|
|
|
|
- var aa = [data.fire_water_count, data.alarm_host_count, data
|
|
|
- .electrical_fire_count, data.other_count, data.video_monitoring_count
|
|
|
+ var aa = [this.staticData.fire_water_count, this.staticData.alarm_host_count, this.staticData
|
|
|
+ .electrical_fire_count, this.staticData.other_count, this.staticData.video_monitoring_count
|
|
|
]
|
|
|
aa.sort(function(a, b) {
|
|
|
return a - b;
|
|
@@ -413,10 +389,7 @@
|
|
|
color: color[ind]
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
- console.log('父组件staticData.alarm_host_count')
|
|
|
- console.log(this.staticData.alarm_host_count)
|
|
|
+ this.indicator=this.indicator.slice(-5)
|
|
|
},
|
|
|
// 未处理告警请求
|
|
|
async getHandleData(param = {}) {
|