1、新增图表看板
This commit is contained in:
		
							parent
							
								
									5b5ad82daa
								
							
						
					
					
						commit
						fbe7631373
					
				| 
						 | 
					@ -14,6 +14,7 @@
 | 
				
			||||||
      <third-level-label :title="warningTypeTitle"/>
 | 
					      <third-level-label :title="warningTypeTitle"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <div class="warning-type-pie">
 | 
					      <div class="warning-type-pie">
 | 
				
			||||||
 | 
					        <div class="_bg"></div>
 | 
				
			||||||
        <warning-type-chart :data-source="warningTypeDataSource"/>
 | 
					        <warning-type-chart :data-source="warningTypeDataSource"/>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
| 
						 | 
					@ -109,7 +110,14 @@ export default {
 | 
				
			||||||
    .warning-type-pie {
 | 
					    .warning-type-pie {
 | 
				
			||||||
      flex: 1;
 | 
					      flex: 1;
 | 
				
			||||||
      height: 0;
 | 
					      height: 0;
 | 
				
			||||||
      .bg("~/assets/peakCoalImages/right/warning-type-pie-bg.png", left, 20px);
 | 
					      position: relative;
 | 
				
			||||||
 | 
					      ._bg{
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        width: 314px;
 | 
				
			||||||
 | 
					        height: 313px;
 | 
				
			||||||
 | 
					        background: url("~/assets/peakCoalImages/right/warning-type-pie-bg.png") no-repeat 16px 48px;
 | 
				
			||||||
 | 
					        background-size: 100% 100%;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,7 +84,7 @@ export default {
 | 
				
			||||||
          data: yAxisDataSource,
 | 
					          data: yAxisDataSource,
 | 
				
			||||||
          yAxisIndex: 0, // 通过这个判断左右
 | 
					          yAxisIndex: 0, // 通过这个判断左右
 | 
				
			||||||
          lineStyle: {
 | 
					          lineStyle: {
 | 
				
			||||||
            width: 6,
 | 
					            width: 3,
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        seriesList.push(series)
 | 
					        seriesList.push(series)
 | 
				
			||||||
| 
						 | 
					@ -94,20 +94,21 @@ export default {
 | 
				
			||||||
        legend: {
 | 
					        legend: {
 | 
				
			||||||
          top: 20,
 | 
					          top: 20,
 | 
				
			||||||
          left: '30%',
 | 
					          left: '30%',
 | 
				
			||||||
          itemWidth: 22,
 | 
					          itemWidth: 11,
 | 
				
			||||||
          itemHeight: 22,
 | 
					          itemHeight: 11,
 | 
				
			||||||
          icon: 'circle',
 | 
					          icon: 'circle',
 | 
				
			||||||
          textStyle: {
 | 
					          textStyle: {
 | 
				
			||||||
            color: 'rgba(106,196,255,0.60)',
 | 
					            color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
            fontSize: 30,
 | 
					            fontSize: 15,
 | 
				
			||||||
            padding: [0, 0, 0, 20]
 | 
					            padding: [0, 0, 0, 10]
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {
 | 
					        tooltip: {
 | 
				
			||||||
          trigger: 'axis',
 | 
					          trigger: 'axis',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          top: 100,
 | 
					          top: 50,
 | 
				
			||||||
 | 
					          bottom: 10,
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        xAxis: [
 | 
					        xAxis: [
 | 
				
			||||||
| 
						 | 
					@ -115,7 +116,7 @@ export default {
 | 
				
			||||||
            type: 'category',
 | 
					            type: 'category',
 | 
				
			||||||
            boundaryGap: true,
 | 
					            boundaryGap: true,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            axisLine: {
 | 
					            axisLine: {
 | 
				
			||||||
| 
						 | 
					@ -135,13 +136,13 @@ export default {
 | 
				
			||||||
            type: 'value',
 | 
					            type: 'value',
 | 
				
			||||||
            splitNumber: 5,
 | 
					            splitNumber: 5,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            nameTextStyle: {
 | 
					            nameTextStyle: {
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)',
 | 
					              color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              lineHeight: 40,
 | 
					              lineHeight: 20,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            // 分割线
 | 
					            // 分割线
 | 
				
			||||||
            splitLine: {
 | 
					            splitLine: {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,7 +89,7 @@ export default {
 | 
				
			||||||
          data: yAxisDataSource,
 | 
					          data: yAxisDataSource,
 | 
				
			||||||
          yAxisIndex: 0, // 通过这个判断左右
 | 
					          yAxisIndex: 0, // 通过这个判断左右
 | 
				
			||||||
          lineStyle: {
 | 
					          lineStyle: {
 | 
				
			||||||
            width: 6,
 | 
					            width: 3,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          areaStyle: {
 | 
					          areaStyle: {
 | 
				
			||||||
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
 | 
					            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
 | 
				
			||||||
| 
						 | 
					@ -111,22 +111,23 @@ export default {
 | 
				
			||||||
      let option = {
 | 
					      let option = {
 | 
				
			||||||
        color: color,
 | 
					        color: color,
 | 
				
			||||||
        legend: {
 | 
					        legend: {
 | 
				
			||||||
          top: 20,
 | 
					          top: 10,
 | 
				
			||||||
          right: '10%',
 | 
					          right: '10%',
 | 
				
			||||||
          itemWidth: 22,
 | 
					          itemWidth: 11,
 | 
				
			||||||
          itemHeight: 22,
 | 
					          itemHeight: 11,
 | 
				
			||||||
          icon: 'circle',
 | 
					          icon: 'circle',
 | 
				
			||||||
          textStyle: {
 | 
					          textStyle: {
 | 
				
			||||||
            color: 'rgba(106,196,255,0.60)',
 | 
					            color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
            fontSize: 30,
 | 
					            fontSize: 15,
 | 
				
			||||||
            padding: [0, 0, 0, 20]
 | 
					            padding: [0, 0, 0, 10]
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {
 | 
					        tooltip: {
 | 
				
			||||||
          trigger: 'axis',
 | 
					          trigger: 'axis',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          top: 100,
 | 
					          top: 50,
 | 
				
			||||||
 | 
					          bottom: 10,
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
          left: 0
 | 
					          left: 0
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
| 
						 | 
					@ -135,7 +136,7 @@ export default {
 | 
				
			||||||
            type: 'category',
 | 
					            type: 'category',
 | 
				
			||||||
            boundaryGap: true,
 | 
					            boundaryGap: true,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            axisLine: {
 | 
					            axisLine: {
 | 
				
			||||||
| 
						 | 
					@ -155,12 +156,12 @@ export default {
 | 
				
			||||||
            type: 'value',
 | 
					            type: 'value',
 | 
				
			||||||
            splitNumber: 5,
 | 
					            splitNumber: 5,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            nameTextStyle: {
 | 
					            nameTextStyle: {
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)',
 | 
					              color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              lineHeight: 40,
 | 
					              lineHeight: 40,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            // 分割线
 | 
					            // 分割线
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -85,7 +85,7 @@ export default {
 | 
				
			||||||
          type: 'bar',
 | 
					          type: 'bar',
 | 
				
			||||||
          color: 'transparent',
 | 
					          color: 'transparent',
 | 
				
			||||||
          yAxisIndex: 0,
 | 
					          yAxisIndex: 0,
 | 
				
			||||||
          barWidth: '60',
 | 
					          barWidth: '30',
 | 
				
			||||||
          data: yAxisDataSource,
 | 
					          data: yAxisDataSource,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        let topBar =
 | 
					        let topBar =
 | 
				
			||||||
| 
						 | 
					@ -96,13 +96,12 @@ export default {
 | 
				
			||||||
            color: color[index],
 | 
					            color: color[index],
 | 
				
			||||||
            symbol: 'rect',
 | 
					            symbol: 'rect',
 | 
				
			||||||
            symbolPosition: 'end', // 在数据结尾显示
 | 
					            symbolPosition: 'end', // 在数据结尾显示
 | 
				
			||||||
            symbolSize: [60, 20], // 「树叶大小」
 | 
					            symbolSize: [30, 10], // 「树叶大小」
 | 
				
			||||||
            symbolOffset: ['0', '0'], //「偏移量」
 | 
					            symbolOffset: ['0', '0'], //「偏移量」
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        seriesList.push(topBar)
 | 
					        seriesList.push(topBar)
 | 
				
			||||||
        seriesList.push(series)
 | 
					        seriesList.push(series)
 | 
				
			||||||
        console.log()
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      let option = {
 | 
					      let option = {
 | 
				
			||||||
        color: color,
 | 
					        color: color,
 | 
				
			||||||
| 
						 | 
					@ -110,20 +109,21 @@ export default {
 | 
				
			||||||
          show: false,
 | 
					          show: false,
 | 
				
			||||||
          top: 20,
 | 
					          top: 20,
 | 
				
			||||||
          left: '30%',
 | 
					          left: '30%',
 | 
				
			||||||
          itemWidth: 22,
 | 
					          itemWidth: 11,
 | 
				
			||||||
          itemHeight: 22,
 | 
					          itemHeight: 11,
 | 
				
			||||||
          icon: 'circle',
 | 
					          icon: 'circle',
 | 
				
			||||||
          textStyle: {
 | 
					          textStyle: {
 | 
				
			||||||
            color: 'rgba(106,196,255,0.60)',
 | 
					            color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
            fontSize: 30,
 | 
					            fontSize: 15,
 | 
				
			||||||
            padding: [0, 0, 0, 20]
 | 
					            padding: [0, 0, 0, 10]
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {
 | 
					        tooltip: {
 | 
				
			||||||
          trigger: 'axis',
 | 
					          trigger: 'axis',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          top: 60,
 | 
					          top: 30,
 | 
				
			||||||
 | 
					          bottom: 10,
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        xAxis: [
 | 
					        xAxis: [
 | 
				
			||||||
| 
						 | 
					@ -131,7 +131,7 @@ export default {
 | 
				
			||||||
            type: 'category',
 | 
					            type: 'category',
 | 
				
			||||||
            boundaryGap: true,
 | 
					            boundaryGap: true,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            axisLine: {
 | 
					            axisLine: {
 | 
				
			||||||
| 
						 | 
					@ -151,13 +151,13 @@ export default {
 | 
				
			||||||
            type: 'value',
 | 
					            type: 'value',
 | 
				
			||||||
            splitNumber: 5,
 | 
					            splitNumber: 5,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            nameTextStyle: {
 | 
					            nameTextStyle: {
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)',
 | 
					              color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              lineHeight: 40,
 | 
					              lineHeight: 20,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            // 分割线
 | 
					            // 分割线
 | 
				
			||||||
            splitLine: {
 | 
					            splitLine: {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,7 +89,7 @@ export default {
 | 
				
			||||||
            data: yAxisDataSource,
 | 
					            data: yAxisDataSource,
 | 
				
			||||||
            yAxisIndex: 0, // 通过这个判断左右
 | 
					            yAxisIndex: 0, // 通过这个判断左右
 | 
				
			||||||
            lineStyle: {
 | 
					            lineStyle: {
 | 
				
			||||||
              width: 6,
 | 
					              width: 3,
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        } else if (index == 0) {
 | 
					        } else if (index == 0) {
 | 
				
			||||||
| 
						 | 
					@ -97,7 +97,7 @@ export default {
 | 
				
			||||||
            name: attrNames[index],
 | 
					            name: attrNames[index],
 | 
				
			||||||
            type: 'bar',
 | 
					            type: 'bar',
 | 
				
			||||||
            color: color[index],
 | 
					            color: color[index],
 | 
				
			||||||
            barWidth: '50%',
 | 
					            barWidth: '25%',
 | 
				
			||||||
            data: yAxisDataSource,
 | 
					            data: yAxisDataSource,
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -108,22 +108,23 @@ export default {
 | 
				
			||||||
        color: color,
 | 
					        color: color,
 | 
				
			||||||
        legend: {
 | 
					        legend: {
 | 
				
			||||||
          show: false,
 | 
					          show: false,
 | 
				
			||||||
          top: 20,
 | 
					          top: 10,
 | 
				
			||||||
          left: '30%',
 | 
					          left: '15%%',
 | 
				
			||||||
          itemWidth: 22,
 | 
					          itemWidth: 11,
 | 
				
			||||||
          itemHeight: 22,
 | 
					          itemHeight: 11,
 | 
				
			||||||
          icon: 'circle',
 | 
					          icon: 'circle',
 | 
				
			||||||
          textStyle: {
 | 
					          textStyle: {
 | 
				
			||||||
            color: 'rgba(106,196,255,0.60)',
 | 
					            color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
            fontSize: 30,
 | 
					            fontSize: 15,
 | 
				
			||||||
            padding: [0, 0, 0, 20]
 | 
					            padding: [0, 0, 0, 10]
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {
 | 
					        tooltip: {
 | 
				
			||||||
          trigger: 'axis',
 | 
					          trigger: 'axis',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          top: 60,
 | 
					          top: 30,
 | 
				
			||||||
 | 
					          bottom: 10,
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        xAxis: [
 | 
					        xAxis: [
 | 
				
			||||||
| 
						 | 
					@ -131,7 +132,7 @@ export default {
 | 
				
			||||||
            type: 'category',
 | 
					            type: 'category',
 | 
				
			||||||
            boundaryGap: true,
 | 
					            boundaryGap: true,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            axisLine: {
 | 
					            axisLine: {
 | 
				
			||||||
| 
						 | 
					@ -151,13 +152,13 @@ export default {
 | 
				
			||||||
            type: 'value',
 | 
					            type: 'value',
 | 
				
			||||||
            splitNumber: 5,
 | 
					            splitNumber: 5,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            nameTextStyle: {
 | 
					            nameTextStyle: {
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)',
 | 
					              color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              lineHeight: 40,
 | 
					              lineHeight: 20,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            // 分割线
 | 
					            // 分割线
 | 
				
			||||||
            splitLine: {
 | 
					            splitLine: {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,12 +66,12 @@ export default {
 | 
				
			||||||
        legend: {
 | 
					        legend: {
 | 
				
			||||||
          top: 0,
 | 
					          top: 0,
 | 
				
			||||||
          right: 0,
 | 
					          right: 0,
 | 
				
			||||||
          itemWidth: 22,
 | 
					          itemWidth: 11,
 | 
				
			||||||
          itemHeight: 22,
 | 
					          itemHeight: 11,
 | 
				
			||||||
          icon: 'circle',
 | 
					          icon: 'circle',
 | 
				
			||||||
          textStyle: {
 | 
					          textStyle: {
 | 
				
			||||||
            color: 'rgba(106,196,255,0.60)',
 | 
					            color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
            fontSize: 30,
 | 
					            fontSize: 15,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
| 
						 | 
					@ -79,7 +79,8 @@ export default {
 | 
				
			||||||
          trigger: 'axis',
 | 
					          trigger: 'axis',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          top: 100,
 | 
					          top: 50,
 | 
				
			||||||
 | 
					          bottom: 10,
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        xAxis: [
 | 
					        xAxis: [
 | 
				
			||||||
| 
						 | 
					@ -87,7 +88,7 @@ export default {
 | 
				
			||||||
            type: 'category',
 | 
					            type: 'category',
 | 
				
			||||||
            boundaryGap: true,
 | 
					            boundaryGap: true,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            axisLine: {
 | 
					            axisLine: {
 | 
				
			||||||
| 
						 | 
					@ -109,13 +110,13 @@ export default {
 | 
				
			||||||
            splitNumber: 5,
 | 
					            splitNumber: 5,
 | 
				
			||||||
            name: '单位:t',
 | 
					            name: '单位:t',
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            nameTextStyle: {
 | 
					            nameTextStyle: {
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)',
 | 
					              color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              lineHeight: 40,
 | 
					              lineHeight: 20,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            // 分割线
 | 
					            // 分割线
 | 
				
			||||||
            splitLine: {
 | 
					            splitLine: {
 | 
				
			||||||
| 
						 | 
					@ -137,13 +138,13 @@ export default {
 | 
				
			||||||
            name: '单位:m³',
 | 
					            name: '单位:m³',
 | 
				
			||||||
            splitNumber: 5,
 | 
					            splitNumber: 5,
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)'
 | 
					              color: 'rgba(106,196,255,0.60)'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            nameTextStyle: {
 | 
					            nameTextStyle: {
 | 
				
			||||||
              color: 'rgba(106,196,255,0.60)',
 | 
					              color: 'rgba(106,196,255,0.60)',
 | 
				
			||||||
              fontSize: 30,
 | 
					              fontSize: 15,
 | 
				
			||||||
              lineHeight: 40,
 | 
					              lineHeight: 20,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            // 分割线
 | 
					            // 分割线
 | 
				
			||||||
            splitLine: {
 | 
					            splitLine: {
 | 
				
			||||||
| 
						 | 
					@ -170,7 +171,7 @@ export default {
 | 
				
			||||||
            data: yAxisData1,
 | 
					            data: yAxisData1,
 | 
				
			||||||
            yAxisIndex: 0, // 通过这个判断左右
 | 
					            yAxisIndex: 0, // 通过这个判断左右
 | 
				
			||||||
            lineStyle: {
 | 
					            lineStyle: {
 | 
				
			||||||
              width: 6,
 | 
					              width: 3,
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
| 
						 | 
					@ -182,7 +183,7 @@ export default {
 | 
				
			||||||
            data: yAxisData2,
 | 
					            data: yAxisData2,
 | 
				
			||||||
            yAxisIndex: 1, // 通过这个判断左右
 | 
					            yAxisIndex: 1, // 通过这个判断左右
 | 
				
			||||||
            lineStyle: {
 | 
					            lineStyle: {
 | 
				
			||||||
              width: 6,
 | 
					              width: 3,
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
| 
						 | 
					@ -194,7 +195,7 @@ export default {
 | 
				
			||||||
            data: yAxisData3,
 | 
					            data: yAxisData3,
 | 
				
			||||||
            yAxisIndex: 1, // 通过这个判断左右
 | 
					            yAxisIndex: 1, // 通过这个判断左右
 | 
				
			||||||
            lineStyle: {
 | 
					            lineStyle: {
 | 
				
			||||||
              width: 6,
 | 
					              width: 3,
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,8 +84,8 @@ export default {
 | 
				
			||||||
          left: lefts[i],
 | 
					          left: lefts[i],
 | 
				
			||||||
          top: tops[i],
 | 
					          top: tops[i],
 | 
				
			||||||
          align: aligns[i],
 | 
					          align: aligns[i],
 | 
				
			||||||
          itemWidth: 19,
 | 
					          itemWidth: 10,
 | 
				
			||||||
          itemHeight: 74,
 | 
					          itemHeight: 37,
 | 
				
			||||||
          itemStyle: {
 | 
					          itemStyle: {
 | 
				
			||||||
            color: colorList[i],
 | 
					            color: colorList[i],
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
| 
						 | 
					@ -94,28 +94,28 @@ export default {
 | 
				
			||||||
          textStyle: {
 | 
					          textStyle: {
 | 
				
			||||||
            fontWeight: 'lighter',
 | 
					            fontWeight: 'lighter',
 | 
				
			||||||
            fontSize: 14,
 | 
					            fontSize: 14,
 | 
				
			||||||
            width: 460,
 | 
					            width: 230,
 | 
				
			||||||
            height: 74,
 | 
					            height: 37,
 | 
				
			||||||
            padding: [0, 10, 0, 10],
 | 
					            padding: [0, 10, 0, 10],
 | 
				
			||||||
            backgroundColor: bgColorList[i],
 | 
					            backgroundColor: bgColorList[i],
 | 
				
			||||||
            lineHeight: 74,
 | 
					            lineHeight: 37,
 | 
				
			||||||
            rich: {
 | 
					            rich: {
 | 
				
			||||||
              a: {
 | 
					              a: {
 | 
				
			||||||
                align: 'right',
 | 
					                align: 'right',
 | 
				
			||||||
                color: '#C1DEFF',
 | 
					                color: '#C1DEFF',
 | 
				
			||||||
                fontSize: 42,
 | 
					                fontSize: 17,
 | 
				
			||||||
                fontWeight: 700
 | 
					                fontWeight: 700
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
              b: {
 | 
					              b: {
 | 
				
			||||||
                align: 'left',
 | 
					                align: 'left',
 | 
				
			||||||
                color: '#C1DEFF',
 | 
					                color: '#C1DEFF',
 | 
				
			||||||
                fontSize: 34,
 | 
					                fontSize: 17,
 | 
				
			||||||
                padding: [0, 0, 0, 10]
 | 
					                padding: [0, 0, 0, 10]
 | 
				
			||||||
              },
 | 
					              },
 | 
				
			||||||
              c:{
 | 
					              c:{
 | 
				
			||||||
                align: 'center',
 | 
					                align: 'center',
 | 
				
			||||||
                color: '#C1DEFF',
 | 
					                color: '#C1DEFF',
 | 
				
			||||||
                fontSize: 34,
 | 
					                fontSize: 17,
 | 
				
			||||||
                padding: [0, 0, 0, 10]
 | 
					                padding: [0, 0, 0, 10]
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -155,7 +155,7 @@ export default {
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: 0,
 | 
					              borderRadius: 0,
 | 
				
			||||||
              borderWidth: 10
 | 
					              borderWidth: 5
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            data: pieData1
 | 
					            data: pieData1
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,78 @@
 | 
				
			||||||
 | 
					import {sendMessage} from '@/utils/iframe';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const VISUAL_CONFIG = {width: 9450, height: 3000}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    data() {
 | 
				
			||||||
 | 
					        return {
 | 
				
			||||||
 | 
					            autoStyle: {}
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    computed: {
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    mounted() {
 | 
				
			||||||
 | 
					        this.getAutoStyle()
 | 
				
			||||||
 | 
					        this.initScaleEvent()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    beforeDestroy() {
 | 
				
			||||||
 | 
					        this._removeScaleEvent()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    methods: {
 | 
				
			||||||
 | 
					        getAutoStyle() {
 | 
				
			||||||
 | 
					            const innerHeight = window.innerHeight
 | 
				
			||||||
 | 
					            const innerWidth = window.innerWidth
 | 
				
			||||||
 | 
					            const {scale, origin, position, type} = this.getScale()
 | 
				
			||||||
 | 
					            sendMessage('scale', {scale, type, innerHeight, innerWidth})
 | 
				
			||||||
 | 
					            localStorage.setItem('scale', JSON.stringify({scale, type, innerHeight, innerWidth}))
 | 
				
			||||||
 | 
					            this.autoStyle = {
 | 
				
			||||||
 | 
					                width: VISUAL_CONFIG.width + 'px',
 | 
				
			||||||
 | 
					                height: VISUAL_CONFIG.height + 'px',
 | 
				
			||||||
 | 
					                transform: `scale(${scale})`,
 | 
				
			||||||
 | 
					                transformOrigin: origin,
 | 
				
			||||||
 | 
					                ...position
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        getScale() {
 | 
				
			||||||
 | 
					            let scale = 1
 | 
				
			||||||
 | 
					            // 1 按照高度缩放 2 按照宽度缩放
 | 
				
			||||||
 | 
					            let type = 1
 | 
				
			||||||
 | 
					            let origin = 'top center'
 | 
				
			||||||
 | 
					            const innerWidth = window.innerWidth
 | 
				
			||||||
 | 
					            const innerHeight = window.innerHeight
 | 
				
			||||||
 | 
					            const widthScale = innerWidth / VISUAL_CONFIG.width
 | 
				
			||||||
 | 
					            const scaleHeight = VISUAL_CONFIG.height * widthScale
 | 
				
			||||||
 | 
					            const position = {left: 0, top: 0, marginTop: 0, marginLeft: 0}
 | 
				
			||||||
 | 
					            if (scaleHeight <= innerHeight) {
 | 
				
			||||||
 | 
					                origin = 'left center'
 | 
				
			||||||
 | 
					                scale = widthScale
 | 
				
			||||||
 | 
					                position.left = 0
 | 
				
			||||||
 | 
					                position.top = '50%'
 | 
				
			||||||
 | 
					                position.marginTop = -VISUAL_CONFIG.height / 2 + 'px'
 | 
				
			||||||
 | 
					                position.marginLeft = 0
 | 
				
			||||||
 | 
					                let type = 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                if (scale > 1) {
 | 
				
			||||||
 | 
					                    origin = 'left top'
 | 
				
			||||||
 | 
					                    position.left = 0
 | 
				
			||||||
 | 
					                    position.top = 0
 | 
				
			||||||
 | 
					                    position.marginTop = 0
 | 
				
			||||||
 | 
					                    position.marginLeft = 0
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                scale = innerHeight / VISUAL_CONFIG.height
 | 
				
			||||||
 | 
					                position.left = '50%'
 | 
				
			||||||
 | 
					                position.top = 0
 | 
				
			||||||
 | 
					                position.marginTop = 0
 | 
				
			||||||
 | 
					                position.marginLeft = -VISUAL_CONFIG.width / 2 + 'px'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return {scale, origin, position, type}
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        initScaleEvent() {
 | 
				
			||||||
 | 
					            window.addEventListener('resize', this.getAutoStyle.bind(this))
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        _removeScaleEvent() {
 | 
				
			||||||
 | 
					            window.removeEventListener('resize', this.getAutoStyle.bind(this))
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,86 @@
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					* @description:
 | 
				
			||||||
 | 
					* @component: index
 | 
				
			||||||
 | 
					* @author: wangzhigang11
 | 
				
			||||||
 | 
					* @date: 2023/8/21 19:30
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="index">
 | 
				
			||||||
 | 
					    <div :style="autoStyle" class="iframe-container">
 | 
				
			||||||
 | 
					      <iframe
 | 
				
			||||||
 | 
					          ref="iframe"
 | 
				
			||||||
 | 
					          :src="src"
 | 
				
			||||||
 | 
					          frameborder="0"
 | 
				
			||||||
 | 
					          height="100%"
 | 
				
			||||||
 | 
					          width="100%"
 | 
				
			||||||
 | 
					          marginheight="0"
 | 
				
			||||||
 | 
					          marginwidth="0"
 | 
				
			||||||
 | 
					          scrolling="auto"
 | 
				
			||||||
 | 
					          allowfullscreen="true"
 | 
				
			||||||
 | 
					          webkitallowfullscreen="true"
 | 
				
			||||||
 | 
					          mozallowfullscreen="true"
 | 
				
			||||||
 | 
					      />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import screenScaleMixin from '@/mixins/screen-scale-mixin_v2';
 | 
				
			||||||
 | 
					import {urlJoin} from '@northeast-utils/core'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: 'Index',
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mixins: [
 | 
				
			||||||
 | 
					    screenScaleMixin
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
 | 
					  props: {},
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    src() {
 | 
				
			||||||
 | 
					      const {href} = this.$router.resolve({name: '/visual/PeakCoalView'})
 | 
				
			||||||
 | 
					      return urlJoin(href)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {},
 | 
				
			||||||
 | 
					  created() {
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  beforeDestroy() {
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style>
 | 
				
			||||||
 | 
					#overviewBody {
 | 
				
			||||||
 | 
					  height: 100vh;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
 | 
					<style lang='scss' scoped>
 | 
				
			||||||
 | 
					.index {
 | 
				
			||||||
 | 
					  width: 100vw;
 | 
				
			||||||
 | 
					  height: 100vh;
 | 
				
			||||||
 | 
					  overflow: hidden;
 | 
				
			||||||
 | 
					  background-color: #000;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .iframe-container {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    > iframe {
 | 
				
			||||||
 | 
					      background-color: transparent;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .basin-dialog {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,27 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const onMessage = function (eventName, cb) {
 | 
				
			||||||
 | 
					  window.parent.addEventListener('message', function (e) {  // 监听 message 事件
 | 
				
			||||||
 | 
					    if ( e.data) {
 | 
				
			||||||
 | 
					      const _eventName = e.data.type
 | 
				
			||||||
 | 
					      if (eventName === _eventName) {
 | 
				
			||||||
 | 
					        cb && cb(e.data.data)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function sendMessage (eventName, message) {
 | 
				
			||||||
 | 
					  window.postMessage({
 | 
				
			||||||
 | 
					    type: eventName,
 | 
				
			||||||
 | 
					    data: message
 | 
				
			||||||
 | 
					  }, '/')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function sendSelfMessage (eventName, message) {
 | 
				
			||||||
 | 
					  window.postMessage({
 | 
				
			||||||
 | 
					    type: eventName,
 | 
				
			||||||
 | 
					    data: message
 | 
				
			||||||
 | 
					  }, '/')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					window.sendSelfMessage = sendSelfMessage
 | 
				
			||||||
		Loading…
	
		Reference in New Issue