| | |
| | | components: {}, |
| | | props:{ |
| | | size: Number, |
| | | dep: Number |
| | | }, |
| | | setup(props) { |
| | | const userInfo = useUserInfo() |
| | |
| | | option = { |
| | | legend: { |
| | | data: ['注意线', '警告线', '危险线', 'SPI预警指数值'], |
| | | top: '0', |
| | | left: 'center', |
| | | top: '2%', |
| | | right: '6%', |
| | | textStyle:{ |
| | | color: '#fff', |
| | | fontSize: fontSize(12) |
| | | color: '#999', |
| | | fontSize: fontSize(14) |
| | | } |
| | | }, |
| | | color: ['rgba(216,55,55)','rgba(235,194,80)','rgba(147,208,81)'], |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | grid: { |
| | | left: '4%', |
| | | right: '4%', |
| | | bottom: '5%', |
| | | left: '8%', |
| | | right: '8%', |
| | | bottom: '4%', |
| | | }, |
| | | xAxis: [ |
| | | { |
| | |
| | | axisLine:{ |
| | | show: true, |
| | | lineStyle:{ |
| | | color: '#fff' |
| | | color: '#999' |
| | | } |
| | | }, |
| | | splitLine:{ |
| | | show: true, |
| | | lineStyle:{ |
| | | type: 'dashed', |
| | | color: 'rgba(255,255,255,.4)' |
| | | color: '#999' |
| | | } |
| | | }, |
| | | axisLabel:{ |
| | | color: '#fff' |
| | | color: '#999', |
| | | } |
| | | } |
| | | ], |
| | |
| | | ], |
| | | series: [ |
| | | { |
| | | name: '危险线', |
| | | data: [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000], |
| | | type: 'line', |
| | | lineStyle:{ |
| | | width: 0 |
| | | }, |
| | | areaStyle: { |
| | | color: { |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [ |
| | | { |
| | | offset: 0.1, |
| | | color: "rgba(216,55,55)", // 线处的颜色 |
| | | }, |
| | | { |
| | | offset: 0.9, |
| | | color: "rgba(216,55,55,.1)", // 坐标轴处的颜色 |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | showSymbol: false, |
| | | // stack: 'Total', |
| | | smooth: true |
| | | }, |
| | | { |
| | | name: '警告线', |
| | | data: [750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750], |
| | | type: 'line', |
| | | lineStyle:{ |
| | | width: 0 |
| | | }, |
| | | areaStyle: { |
| | | color: { |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [ |
| | | { |
| | | offset: 0.1, |
| | | color: "rgba(235,194,80)", // 线处的颜色 |
| | | }, |
| | | { |
| | | offset: 0.9, |
| | | color: "rgba(235,194,80,.1)", // 坐标轴处的颜色 |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | showSymbol: false, |
| | | // stack: 'Total', |
| | | smooth: true |
| | | }, |
| | | { |
| | | name: '注意线', |
| | | data: [500, 500, 500, 500, 500, 500, 500,500, 500, 500, 500, 500], |
| | | type: 'line', |
| | |
| | | }, |
| | | }, |
| | | showSymbol: false, |
| | | stack: 'Total', |
| | | smooth: true |
| | | }, |
| | | { |
| | | name: '警告线', |
| | | data: [250, 250, 250, 250, 250, 250, 250,250, 250, 250, 250, 250], |
| | | type: 'line', |
| | | lineStyle:{ |
| | | width: 0 |
| | | }, |
| | | areaStyle: { |
| | | color: { |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [ |
| | | { |
| | | offset: 0.1, |
| | | color: "rgba(235,194,80)", // 线处的颜色 |
| | | }, |
| | | { |
| | | offset: 0.9, |
| | | color: "rgba(235,194,80,.6)", // 坐标轴处的颜色 |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | showSymbol: false, |
| | | stack: 'Total', |
| | | smooth: true |
| | | }, |
| | | { |
| | | name: '危险线', |
| | | data: [250, 250, 250, 250, 250, 250, 250,250, 250, 250, 250, 250], |
| | | type: 'line', |
| | | lineStyle:{ |
| | | width: 0 |
| | | }, |
| | | areaStyle: { |
| | | color: { |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [ |
| | | { |
| | | offset: 0.1, |
| | | color: "rgba(216,55,55)", // 线处的颜色 |
| | | }, |
| | | { |
| | | offset: 0.9, |
| | | color: "rgba(216,55,55,.6)", // 坐标轴处的颜色 |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | showSymbol: false, |
| | | stack: 'Total', |
| | | // stack: 'Total', |
| | | smooth: true |
| | | }, |
| | | { |
| | |
| | | triggerLineEvent: true, |
| | | label:{ |
| | | show: true, |
| | | color: '#fff', |
| | | color: '#23E5E5', |
| | | fontSize: fontSize(12) |
| | | }, |
| | | lineStyle:{ |
| | |
| | | .charts-cont{ |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 5%; |
| | | padding: 2%; |
| | | position: relative; |
| | | |
| | | .spi{ |