From 77f7281ff7cee541aaa51339512e6443b7d89e42 Mon Sep 17 00:00:00 2001
From: YANGDL <114714267@qq.com>
Date: 星期二, 05 一月 2021 12:04:25 +0800
Subject: [PATCH] 修改eslint配置增加mock配置
---
src/components/mapmodules/SafetyIndexBar.js | 222 ++++++++++++++++++++++++++++---------------------------
1 files changed, 112 insertions(+), 110 deletions(-)
diff --git a/src/components/mapmodules/SafetyIndexBar.js b/src/components/mapmodules/SafetyIndexBar.js
index 5e306cc..ed5cdef 100644
--- a/src/components/mapmodules/SafetyIndexBar.js
+++ b/src/components/mapmodules/SafetyIndexBar.js
@@ -1,120 +1,122 @@
import echarts from 'echarts'
-function drawSafetyBar(carDataArray, shipDataArray, plateDataArray) {
- let myChart = echarts.init(document.getElementById('safetyBarIndex'))
- myChart.setOption({
- color: ['#3398DB'],
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 鍧愭爣杞存寚绀哄櫒锛屽潗鏍囪酱瑙﹀彂鏈夋晥
- type: 'shadow' // 榛樿涓虹洿绾匡紝鍙�変负锛�'line' | 'shadow'
- },
- textStyle: {
- color: '#33FF90'
- },
- extraCssText: 'background-color: rgba(73,177,231, 0.1);'
+function drawSafetyBar (carDataArray, shipDataArray, plateDataArray) {
+ const myChart = echarts.init(document.getElementById('safetyBarIndex'))
+ myChart.setOption({
+ color: ['#3398DB'],
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: { // 鍧愭爣杞存寚绀哄櫒锛屽潗鏍囪酱瑙﹀彂鏈夋晥
+ type: 'shadow' // 榛樿涓虹洿绾匡紝鍙�変负锛�'line' | 'shadow'
+ },
+ textStyle: {
+ color: '#33FF90'
+ },
+ extraCssText: 'background-color: rgba(73,177,231, 0.1);'
+ },
+ legend: {
+ data: ['鑸硅埗', '杞﹁締'],
+ top: '6%',
+ right: '4%',
+ textStyle: {
+ color: '#33FFF8'
+ }
+ },
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: [
+ {
+ type: 'category',
+ data: plateDataArray,
+ axisTick: {
+ alignWithLabel: true
},
- legend: {
- data: ['鑸硅埗', '杞﹁締'],
- top: '6%',
- right: '4%',
- textStyle: {
- color: '#33FFF8'
- }
+ axisLabel: {
+ color: '#33FFF8'
},
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
+ splitLine: {
+ show: false
+ }
+ }
+ ],
+ yAxis: [
+ {
+ type: 'value',
+ axisLabel: {
+ color: '#33FFF8'
},
- xAxis: [
- {
- type: 'category',
- data: plateDataArray,
- axisTick: {
- alignWithLabel: true
- },
- axisLabel: {
- color: '#33FFF8'
- },
- splitLine: {
- show: false
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- axisLabel: {
- color: '#33FFF8'
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: [ '#315070' ],
- width: 1,
- type: 'dashed'
- }
- }
- }
- ],
- series: [
- {
- name: '鑸硅埗',
- type: 'bar',
- barWidth: '12%',
- color: 'rgb(88,228,239)',
- itemStyle: {
- normal: {
- label: {
- show: true, // 寮�鍚樉绀�
- position: 'top', // 鍦ㄤ笂鏂规樉绀�
- textStyle: { // 鏁板�兼牱寮�
- color: '#ffffff',
- fontSize: 12
- }
- },
- barBorderRadius: [15, 15, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#00ACFE' },
- { offset: 0.5, color: '#034B88' },
- { offset: 1, color: '#051A4C' }
- ])
- }
- },
- data: shipDataArray
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: ['#315070'],
+ width: 1,
+ type: 'dashed'
+ }
+ }
+ }
+ ],
+ series: [
+ {
+ name: '鑸硅埗',
+ type: 'bar',
+ barWidth: '12%',
+ color: 'rgb(88,228,239)',
+ itemStyle: {
+ normal: {
+ label: {
+ show: true, // 寮�鍚樉绀�
+ position: 'top', // 鍦ㄤ笂鏂规樉绀�
+ textStyle: { // 鏁板�兼牱寮�
+ color: '#ffffff',
+ fontSize: 12
+ }
},
- {
- name: '杞﹁締',
- type: 'bar',
- barWidth: '12%',
- color: 'rgb(73,117,231)',
- itemStyle: {
- normal: {
- label: {
- show: true, // 寮�鍚樉绀�
- position: 'top', // 鍦ㄤ笂鏂规樉绀�
- textStyle: { // 鏁板�兼牱寮�
- color: '#ffffff',
- fontSize: 12
- }
- },
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
- { offset: 0, color: '#FED700' },
- { offset: 0.5, color: '#846B03' },
- { offset: 1, color: '#423105' }
- ]),
- barBorderRadius: [ 15, 15, 0, 0 ]
- }
- },
- data: carDataArray
- }
- ]
- })
- window.addEventListener('resize', () => { myChart.resize() })
+ barBorderRadius: [15, 15, 0, 0],
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ { offset: 0, color: '#00ACFE' },
+ { offset: 0.5, color: '#034B88' },
+ { offset: 1, color: '#051A4C' }
+ ])
+ }
+ },
+ data: shipDataArray
+ },
+ {
+ name: '杞﹁締',
+ type: 'bar',
+ barWidth: '12%',
+ color: 'rgb(73,117,231)',
+ itemStyle: {
+ normal: {
+ label: {
+ show: true, // 寮�鍚樉绀�
+ position: 'top', // 鍦ㄤ笂鏂规樉绀�
+ textStyle: { // 鏁板�兼牱寮�
+ color: '#ffffff',
+ fontSize: 12
+ }
+ },
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ { offset: 0, color: '#FED700' },
+ { offset: 0.5, color: '#846B03' },
+ { offset: 1, color: '#423105' }
+ ]),
+ barBorderRadius: [15, 15, 0, 0]
+ }
+ },
+ data: carDataArray
+ }
+ ]
+ })
+ window.addEventListener('resize', () => {
+ myChart.resize()
+ })
}
export default {
- drawSafetyBar
+ drawSafetyBar
}
--
Gitblit v1.8.0