|  | @@ -269,18 +269,67 @@
 | 
											
												
													
														|  |          })
 |  |          })
 | 
											
												
													
														|  |        },
 |  |        },
 | 
											
												
													
														|  |        getPage2echarts02(){
 |  |        getPage2echarts02(){
 | 
											
												
													
														|  | -        page2echarts02().then(res=>{
 |  | 
 | 
											
												
													
														|  | 
 |  | +        let param = {
 | 
											
												
													
														|  | 
 |  | +          smallNumber:this.xiaobaninput,
 | 
											
												
													
														|  | 
 |  | +          cityId:this.vuexSelectCity,
 | 
											
												
													
														|  | 
 |  | +          countyId:this.vuexSelectDistrict,
 | 
											
												
													
														|  | 
 |  | +          townId:this.vuexSelectStreet,
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        page2echarts02(param).then(res=>{
 | 
											
												
													
														|  |            // console.log('res',res);
 |  |            // console.log('res',res);
 | 
											
												
													
														|  |            // this.page2Char2 = res.data;
 |  |            // this.page2Char2 = res.data;
 | 
											
												
													
														|  | 
 |  | +          //  console.log('this.page2Char2.series', this.page2Char2.series);
 | 
											
												
													
														|  |            
 |  |            
 | 
											
												
													
														|  | -          // this.page2Char2.xAxis[0] = [];
 |  | 
 | 
											
												
													
														|  | -          // this.page2Char2.series[0] = [];
 |  | 
 | 
											
												
													
														|  | -          // res.data&&res.data.forEach(element=>{
 |  | 
 | 
											
												
													
														|  | -          //   this.page2Char2.xAxis[0].push(element.smallNumber);
 |  | 
 | 
											
												
													
														|  | -          //   this.page2Char2.series[0].push({
 |  | 
 | 
											
												
													
														|  | 
 |  | +          this.page2Char2.xAxis.data = [];
 | 
											
												
													
														|  | 
 |  | +          this.page2Char2.series = [];
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -          //   });
 |  | 
 | 
											
												
													
														|  | -          // })
 |  | 
 | 
											
												
													
														|  | 
 |  | +          const rows  = res.rows;
 | 
											
												
													
														|  | 
 |  | +          console.log(rows)
 | 
											
												
													
														|  | 
 |  | +          // x坐标
 | 
											
												
													
														|  | 
 |  | +           this.page2Char2.xAxis.data = rows.map(item => {
 | 
											
												
													
														|  | 
 |  | +            return item.smallNumber
 | 
											
												
													
														|  | 
 |  | +          })
 | 
											
												
													
														|  | 
 |  | +          console.log('x坐标',  this.page2Char2.xAxis.data)
 | 
											
												
													
														|  | 
 |  | +          // 获取所有项
 | 
											
												
													
														|  | 
 |  | +          let seriesList = rows.map(item => {
 | 
											
												
													
														|  | 
 |  | +            return item.treeList
 | 
											
												
													
														|  | 
 |  | +          })
 | 
											
												
													
														|  | 
 |  | +          // 数组扁平化
 | 
											
												
													
														|  | 
 |  | +          seriesList = seriesList.flat()
 | 
											
												
													
														|  | 
 |  | +          // 去重
 | 
											
												
													
														|  | 
 |  | +          let obj = {};
 | 
											
												
													
														|  | 
 |  | +              seriesList = seriesList.reduce((newArr, next) => {
 | 
											
												
													
														|  | 
 |  | +                obj[next.name] ? "" : (obj[next.name] = true && newArr.push(next));
 | 
											
												
													
														|  | 
 |  | +                return newArr;
 | 
											
												
													
														|  | 
 |  | +              }, []);
 | 
											
												
													
														|  | 
 |  | +              seriesList = seriesList.map(item => {
 | 
											
												
													
														|  | 
 |  | +                return {
 | 
											
												
													
														|  | 
 |  | +                  name : item.name,
 | 
											
												
													
														|  | 
 |  | +              type: 'bar',
 | 
											
												
													
														|  | 
 |  | +              stack: 'total',
 | 
											
												
													
														|  | 
 |  | +              label: {
 | 
											
												
													
														|  | 
 |  | +                show: false
 | 
											
												
													
														|  | 
 |  | +              },
 | 
											
												
													
														|  | 
 |  | +              emphasis: {
 | 
											
												
													
														|  | 
 |  | +                focus: 'series'
 | 
											
												
													
														|  | 
 |  | +              },
 | 
											
												
													
														|  | 
 |  | +                  data: []
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +              })
 | 
											
												
													
														|  | 
 |  | +              console.log(seriesList)
 | 
											
												
													
														|  | 
 |  | +              rows.forEach(item => {
 | 
											
												
													
														|  | 
 |  | +            seriesList.forEach((jtem, index) => {
 | 
											
												
													
														|  | 
 |  | +              let num = 0
 | 
											
												
													
														|  | 
 |  | +              item.treeList.map(ktem => {
 | 
											
												
													
														|  | 
 |  | +                if (ktem.name.indexOf(jtem.name) > (-1)) {
 | 
											
												
													
														|  | 
 |  | +                  num = ktem.value
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +              })
 | 
											
												
													
														|  | 
 |  | +              seriesList[index].data.push(num)
 | 
											
												
													
														|  | 
 |  | +            })
 | 
											
												
													
														|  | 
 |  | +          })
 | 
											
												
													
														|  | 
 |  | +          console.log(seriesList)
 | 
											
												
													
														|  | 
 |  | +          this.page2Char2.series = seriesList;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |            let charUuid = this.$refs.page2Char2.mid;
 |  |            let charUuid = this.$refs.page2Char2.mid;
 | 
											
												
													
														|  |            this.$refs.page2Char2.intChar(charUuid)
 |  |            this.$refs.page2Char2.intChar(charUuid)
 | 
											
										
											
												
													
														|  | @@ -336,7 +385,12 @@
 | 
											
												
													
														|  |          })
 |  |          })
 | 
											
												
													
														|  |        },
 |  |        },
 | 
											
												
													
														|  |         getPage6echarts01(){
 |  |         getPage6echarts01(){
 | 
											
												
													
														|  | -        page6echarts01().then(res=>{
 |  | 
 | 
											
												
													
														|  | 
 |  | +        let param = {
 | 
											
												
													
														|  | 
 |  | +          cityId:this.vuexSelectCity,
 | 
											
												
													
														|  | 
 |  | +          countyId:this.vuexSelectDistrict,
 | 
											
												
													
														|  | 
 |  | +          townId:this.vuexSelectStreet,
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        page6echarts01(param).then(res=>{
 | 
											
												
													
														|  |            // console.log('res',res);
 |  |            // console.log('res',res);
 | 
											
												
													
														|  |            // this.page6Char1 = res.data;
 |  |            // this.page6Char1 = res.data;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -351,9 +405,6 @@
 | 
											
												
													
														|  |              this.page6Char1.series[2].data.push(element.pestCount);
 |  |              this.page6Char1.series[2].data.push(element.pestCount);
 | 
											
												
													
														|  |            })
 |  |            })
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -          console.log('this.page6Char1.xAxis[0].data',this.page6Char1.xAxis[0].data);
 |  | 
 | 
											
												
													
														|  | -          console.log('this.page6Char1.series',this.page6Char1.series);
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |            let charUuid = this.$refs.page6Char1.mid;
 |  |            let charUuid = this.$refs.page6Char1.mid;
 | 
											
												
													
														|  |            this.$refs.page6Char1.intChar(charUuid)
 |  |            this.$refs.page6Char1.intChar(charUuid)
 | 
											
												
													
														|  |          }).catch(err=>{
 |  |          }).catch(err=>{
 |