|
@@ -1,980 +0,0 @@
|
|
|
-// 中国地图配置项
|
|
|
-export var mapSettings = {
|
|
|
- chartSettings: {
|
|
|
- positionJsonLink: './china.json',
|
|
|
- beforeRegisterMapOnce (map) {
|
|
|
- return map
|
|
|
- },
|
|
|
- beforeRegisterMap (map) {
|
|
|
- return map
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- fontSize: 9
|
|
|
- },
|
|
|
- selectedMode: false, // 去掉省份小圆点
|
|
|
- itemStyle: {
|
|
|
- normal: {
|
|
|
- borderColor: '#F06326',
|
|
|
- areaColor: '#FFFFFF'
|
|
|
- }
|
|
|
- }
|
|
|
- // zoom:0.95, // 缩放比例
|
|
|
- },
|
|
|
- chartExtend: {
|
|
|
- tooltip: {
|
|
|
- confine: true,
|
|
|
- backgroundColor: '#fff',
|
|
|
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
|
- type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
|
|
- shadowStyle: {
|
|
|
- color: 'rgba(5,166,243,0.1)'
|
|
|
- },
|
|
|
- z: 3
|
|
|
- },
|
|
|
- textStyle: {
|
|
|
- color: '#171826',
|
|
|
- fontSize: 12
|
|
|
- },
|
|
|
- padding: [8, 12],
|
|
|
- extraCssText: 'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
|
|
|
- formatter: function (params, ticket, callback) {
|
|
|
- if (params.data == null) {
|
|
|
- return params.name + ':0'
|
|
|
- } else {
|
|
|
- return params.name + ':' + params.value
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- grid: {
|
|
|
- height: '280px',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- legend: { // 隐藏图标上方小方块及文字
|
|
|
- selectedMode: false,
|
|
|
- textStyle: {
|
|
|
- color: 'transparent'
|
|
|
- },
|
|
|
- itemWidth: 0,
|
|
|
- itemHeight: 0
|
|
|
- },
|
|
|
- silent: false, // 禁用鼠标点击、滑过事件
|
|
|
- series: {
|
|
|
- showLegendSymbol: false,
|
|
|
- selectedMode: false
|
|
|
- },
|
|
|
- graphic: [
|
|
|
- {
|
|
|
- type: 'group',
|
|
|
- bottom: 54,
|
|
|
- children: [
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'left',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '市场分布数量',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'rect',
|
|
|
- z: 101,
|
|
|
- left: 0,
|
|
|
- bottom: 34,
|
|
|
- shape: {
|
|
|
- width: 84,
|
|
|
- height: 14
|
|
|
- },
|
|
|
- style: {
|
|
|
- stroke: '#FB483D',
|
|
|
- fill: 'transparent',
|
|
|
- lineWidth: 0.5
|
|
|
- }
|
|
|
- },
|
|
|
- rectGroup(0, '#F06326'),
|
|
|
- rectGroup(14, '#F48A5D'),
|
|
|
- rectGroup(28, '#FFB366'),
|
|
|
- rectGroup(42, '#FFCF9F'),
|
|
|
- rectGroup(56, '#FFE7CF'),
|
|
|
- rectGroup(70, '#FFF4EB'),
|
|
|
- {
|
|
|
- type: 'group',
|
|
|
- width: 84,
|
|
|
- bottom: 20,
|
|
|
- children: [
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'left',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '100',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'right',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '0',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- }]
|
|
|
- }
|
|
|
- ],
|
|
|
- visualMap: {
|
|
|
- show: false,
|
|
|
- inRange: { // 定义 在选中范围中 的视觉元素
|
|
|
- color: ['#FFF4EB', '#FFE7CF', '#FFCF9F', '#FFB366', '#F48A5D', '#F06326']
|
|
|
- },
|
|
|
- outOfRange: {
|
|
|
- color: ['#F06326']
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- chart: null
|
|
|
-}
|
|
|
-// 月报本月项目规模分布
|
|
|
-export var mapSettings2 = {
|
|
|
- chartSettings: {
|
|
|
- positionJsonLink: './china.json',
|
|
|
- beforeRegisterMapOnce (map) {
|
|
|
- return map
|
|
|
- },
|
|
|
- beforeRegisterMap (map) {
|
|
|
- return map
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- fontSize: 9
|
|
|
- },
|
|
|
- selectedMode: false,
|
|
|
- itemStyle: {
|
|
|
- normal: {
|
|
|
- borderColor: '#F06326',
|
|
|
- areaColor: '#FFFFFF'
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- chartExtend: {
|
|
|
- tooltip: {
|
|
|
- confine: true,
|
|
|
- backgroundColor: '#fff',
|
|
|
- axisPointer: {
|
|
|
- type: 'shadow',
|
|
|
- shadowStyle: {
|
|
|
- color: 'rgba(5,166,243,0.1)'
|
|
|
- },
|
|
|
- z: 3
|
|
|
- },
|
|
|
- textStyle: {
|
|
|
- color: '#171826',
|
|
|
- fontSize: 12
|
|
|
- },
|
|
|
- padding: [8, 12],
|
|
|
- extraCssText: 'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
|
|
|
- formatter: function (params, ticket, callback) {
|
|
|
- if (params.data == null) {
|
|
|
- return params.name + ':0'
|
|
|
- } else {
|
|
|
- return params.name + ':' + params.value
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- grid: {
|
|
|
- height: '280px',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- legend: {
|
|
|
- selectedMode: false,
|
|
|
- textStyle: {
|
|
|
- color: 'transparent'
|
|
|
- },
|
|
|
- itemWidth: 0,
|
|
|
- itemHeight: 0
|
|
|
- },
|
|
|
- silent: false,
|
|
|
- series: {
|
|
|
- showLegendSymbol: false,
|
|
|
- selectedMode: false
|
|
|
- },
|
|
|
- graphic: [
|
|
|
- {
|
|
|
- type: 'group',
|
|
|
- bottom: 54,
|
|
|
- children: [
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'left',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '单位:万元',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'rect',
|
|
|
- z: 101,
|
|
|
- left: 0,
|
|
|
- bottom: 34,
|
|
|
- shape: {
|
|
|
- width: 84,
|
|
|
- height: 14
|
|
|
- },
|
|
|
- style: {
|
|
|
- stroke: '#FB483D',
|
|
|
- fill: 'transparent',
|
|
|
- lineWidth: 0.5
|
|
|
- }
|
|
|
- },
|
|
|
- rectGroup(0, '#F06326'),
|
|
|
- rectGroup(14, '#F48A5D'),
|
|
|
- rectGroup(28, '#FFB366'),
|
|
|
- rectGroup(42, '#FFCF9F'),
|
|
|
- rectGroup(56, '#FFE7CF'),
|
|
|
- rectGroup(70, '#FFF4EB'),
|
|
|
- {
|
|
|
- type: 'group',
|
|
|
- width: 84,
|
|
|
- bottom: 20,
|
|
|
- children: [
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'left',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '100',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'right',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '0',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- }]
|
|
|
- }
|
|
|
- ],
|
|
|
- visualMap: {
|
|
|
- show: false,
|
|
|
- inRange: {
|
|
|
- color: ['#FFF4EB', '#FFE7CF', '#FFCF9F', '#FFB366', '#F48A5D', '#F06326']
|
|
|
- },
|
|
|
- outOfRange: {
|
|
|
- color: ['#F06326']
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- chart: null
|
|
|
-}
|
|
|
-// 月报本月中标企业注册地分布
|
|
|
-export var mapSettings3 = {
|
|
|
- chartSettings: {
|
|
|
- positionJsonLink: './china.json',
|
|
|
- beforeRegisterMapOnce (map) {
|
|
|
- return map
|
|
|
- },
|
|
|
- beforeRegisterMap (map) {
|
|
|
- return map
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- fontSize: 9
|
|
|
- },
|
|
|
- selectedMode: false,
|
|
|
- itemStyle: {
|
|
|
- normal: {
|
|
|
- borderColor: '#F06326',
|
|
|
- areaColor: '#FFFFFF'
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- chartExtend: {
|
|
|
- tooltip: {
|
|
|
- confine: true,
|
|
|
- backgroundColor: '#fff',
|
|
|
- axisPointer: {
|
|
|
- type: 'shadow',
|
|
|
- shadowStyle: {
|
|
|
- color: 'rgba(5,166,243,0.1)'
|
|
|
- },
|
|
|
- z: 3
|
|
|
- },
|
|
|
- textStyle: {
|
|
|
- color: '#171826',
|
|
|
- fontSize: 12
|
|
|
- },
|
|
|
- padding: [8, 12],
|
|
|
- extraCssText: 'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
|
|
|
- formatter: function (params, ticket, callback) {
|
|
|
- if (params.data == null) {
|
|
|
- return params.name + ':0'
|
|
|
- } else {
|
|
|
- return params.name + ':' + params.value
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- grid: {
|
|
|
- height: '280px',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- legend: {
|
|
|
- selectedMode: false,
|
|
|
- textStyle: {
|
|
|
- color: 'transparent'
|
|
|
- },
|
|
|
- itemWidth: 0,
|
|
|
- itemHeight: 0
|
|
|
- },
|
|
|
- silent: false,
|
|
|
- series: {
|
|
|
- showLegendSymbol: false,
|
|
|
- selectedMode: false
|
|
|
- },
|
|
|
- graphic: [
|
|
|
- {
|
|
|
- type: 'group',
|
|
|
- bottom: 54,
|
|
|
- children: [
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'left',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '单位:个',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- }]
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'rect',
|
|
|
- z: 101,
|
|
|
- left: 0,
|
|
|
- bottom: 34,
|
|
|
- shape: {
|
|
|
- width: 84,
|
|
|
- height: 14
|
|
|
- },
|
|
|
- style: {
|
|
|
- stroke: '#FB483D',
|
|
|
- fill: 'transparent',
|
|
|
- lineWidth: 0.5
|
|
|
- }
|
|
|
- },
|
|
|
- rectGroup(0, '#F06326'),
|
|
|
- rectGroup(14, '#F48A5D'),
|
|
|
- rectGroup(28, '#FFB366'),
|
|
|
- rectGroup(42, '#FFCF9F'),
|
|
|
- rectGroup(56, '#FFE7CF'),
|
|
|
- rectGroup(70, '#FFF4EB'),
|
|
|
- {
|
|
|
- type: 'group',
|
|
|
- width: 84,
|
|
|
- bottom: 20,
|
|
|
- children: [
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'left',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '100',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'text',
|
|
|
- z: 100,
|
|
|
- left: 'right',
|
|
|
- top: 'middle',
|
|
|
- style: {
|
|
|
- fill: '#333',
|
|
|
- text: '0',
|
|
|
- font: '10px Microsoft YaHei'
|
|
|
- }
|
|
|
- }]
|
|
|
- }
|
|
|
- ],
|
|
|
- visualMap: {
|
|
|
- show: false,
|
|
|
- inRange: {
|
|
|
- color: ['#FFF4EB', '#FFE7CF', '#FFCF9F', '#FFB366', '#F48A5D', '#F06326']
|
|
|
- },
|
|
|
- outOfRange: {
|
|
|
- color: ['#F06326']
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- chart: null
|
|
|
-}
|
|
|
-// 中国地图例graphic配置函数
|
|
|
-export function rectGroup (left, color) {
|
|
|
- return {
|
|
|
- type: 'rect',
|
|
|
- z: 100,
|
|
|
- left: left,
|
|
|
- bottom: 34,
|
|
|
- shape: {
|
|
|
- width: 14,
|
|
|
- height: 14
|
|
|
- },
|
|
|
- style: {
|
|
|
- fill: color
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-// 投标决策分析页面:预算分布、中标金额、折扣率分布三个图表配置项(只配置相同部分,不同部分在页面里单独配置)
|
|
|
-export var barChart = {
|
|
|
- chartSettings: {},
|
|
|
- chartExtend: {
|
|
|
- grid: {
|
|
|
- left: 4,
|
|
|
- x: 0,
|
|
|
- y: 20,
|
|
|
- x2: 0,
|
|
|
- bottom: 20
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- axisLabel: {
|
|
|
- interval: 0, // 强制显示x轴所有刻度
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- },
|
|
|
- yAxis (item) {
|
|
|
- item[0].splitLine = {
|
|
|
- lineStyle: {
|
|
|
- type: 'dashed', // y轴背景虚线
|
|
|
- width: 0.5
|
|
|
- }
|
|
|
- }
|
|
|
- item[0].axisLabel = {
|
|
|
- margin: 2,
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- item[1].splitLine = {
|
|
|
- show: false
|
|
|
- }
|
|
|
- item[1].axisLabel = {
|
|
|
- show: false,
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- return item
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'axis',
|
|
|
- confine: true,
|
|
|
- backgroundColor: '#fff',
|
|
|
- axisPointer: {
|
|
|
- type: 'shadow',
|
|
|
- shadowStyle: {},
|
|
|
- z: 3
|
|
|
- },
|
|
|
- textStyle: {
|
|
|
- color: '#171826',
|
|
|
- fontSize: 12
|
|
|
- },
|
|
|
- padding: [7, 12],
|
|
|
- extraCssText: 'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08);transform: translate3d(0,0,0)',
|
|
|
- formatter: function (params) {
|
|
|
- // 移除重复的数据
|
|
|
- for (var i = 0; i < params.length; i++) {
|
|
|
- for (var j = params.length - 1; j > i; j--) {
|
|
|
- if (params[j].data == params[i].data) {
|
|
|
- params.splice(j, 1)
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- var tip = ''
|
|
|
- // eslint-disable-next-line no-redeclare
|
|
|
- for (var i = 0; i < params.length; i++) {
|
|
|
- if (i == 0) {
|
|
|
- tip = params[i].value == 0 ? '' : tip + params[i].seriesName + ':' + params[i].value + '个' + '<br/>'
|
|
|
- } else if (i == 1) {
|
|
|
- if (params[i].value != 0 || params[i].value != '0.00') {
|
|
|
- if (params[i].seriesName === '平均折扣率') {
|
|
|
- tip = tip + params[i].seriesName + ':' + params[i].value + '%' + '<br/>'
|
|
|
- } else {
|
|
|
- tip = tip + params[i].seriesName + ':' + params[i].value + '万元' + '<br/>'
|
|
|
- }
|
|
|
- } else {
|
|
|
- // eslint-disable-next-line no-self-assign
|
|
|
- tip = tip
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return tip
|
|
|
- }
|
|
|
- },
|
|
|
- legend: {
|
|
|
- show: false,
|
|
|
- orient: 'horizontal',
|
|
|
- icon: 'circle',
|
|
|
- bottom: 20,
|
|
|
- align: 'left',
|
|
|
- itemWidth: 8,
|
|
|
- itemHeight: 8,
|
|
|
- itemGap: 20,
|
|
|
- textStyle: {
|
|
|
- fontSize: 11,
|
|
|
- rich: {
|
|
|
- a: {
|
|
|
- fontSize: 16,
|
|
|
- verticalAlign: 'top',
|
|
|
- align: 'center',
|
|
|
- padding: [0, 15, 28, 0]
|
|
|
- },
|
|
|
- b: {
|
|
|
- fontSize: 14,
|
|
|
- align: 'center',
|
|
|
- padding: [0, 15, 0, 0],
|
|
|
- lineHeight: 25
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- formatter: function (name) {
|
|
|
- var wnYuan = ['金额', '项目金额', '项目规划', '项目总预算', '项目总规模']
|
|
|
- var ge = ['数量', '项目数量']
|
|
|
- if (wnYuan.indexOf(name) !== -1) {
|
|
|
- name += '(万元)'
|
|
|
- } else if (ge.indexOf(name) !== -1) {
|
|
|
- name += '(个)'
|
|
|
- }
|
|
|
- return name
|
|
|
- }
|
|
|
- },
|
|
|
- series: {
|
|
|
- barWidth: 20,
|
|
|
- smooth: false,
|
|
|
- symbol: 'none',
|
|
|
- lineStyle: {
|
|
|
- width: 0,
|
|
|
- color: 'rgba(0, 0, 0, 0)' // 线的颜色是透明的
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// 平均折扣率配置
|
|
|
-export var multiBarChart = {
|
|
|
- chartSettings: {
|
|
|
- showLine: ['平均折扣率']
|
|
|
- },
|
|
|
- chartExtend: {
|
|
|
- grid: {
|
|
|
- x: 12,
|
|
|
- y: 20,
|
|
|
- x2: 12
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- splitLine: {
|
|
|
- show: true,
|
|
|
- lineStyle: {
|
|
|
- type: 'dashed', // y轴背景虚线
|
|
|
- width: 0.5
|
|
|
- }
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- axisLabel: {
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'axis',
|
|
|
- confine: true,
|
|
|
- backgroundColor: '#fff',
|
|
|
- axisPointer: {
|
|
|
- type: 'shadow',
|
|
|
- shadowStyle: {
|
|
|
- color: 'rgba(5,166,243,0.1)'
|
|
|
- }
|
|
|
- },
|
|
|
- textStyle: {
|
|
|
- color: '#171826',
|
|
|
- fontSize: 12
|
|
|
- },
|
|
|
- padding: [8, 12],
|
|
|
- extraCssText: 'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
|
|
|
- formatter: function (params) {
|
|
|
- var tip = ''
|
|
|
- for (var i = 0; i < params.length; i++) {
|
|
|
- if (i < 4) {
|
|
|
- tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '<br/>'
|
|
|
- } else {
|
|
|
- tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '%' + '<br/>'
|
|
|
- }
|
|
|
- }
|
|
|
- tip += '<div style="padding-top:2px;text-align:center;color:#9B9CA3;">' + ' - ' + params[0].name.substring(0, params[0].name.lastIndexOf('年')) + ' - ' + '</div>'
|
|
|
- return tip
|
|
|
- }
|
|
|
- },
|
|
|
- legend: {
|
|
|
- orient: 'horizontal',
|
|
|
- bottom: 20,
|
|
|
- icon: 'circle',
|
|
|
- itemWidth: 8,
|
|
|
- itemHeight: 8,
|
|
|
- padding: [0, 6],
|
|
|
- data: ['日期', '0~5%', '5~10%', '10~30%', '30~100%', '平均折扣率'],
|
|
|
- textStyle: {
|
|
|
- fontSize: 11
|
|
|
- }
|
|
|
- },
|
|
|
- series: {
|
|
|
- smooth: false
|
|
|
- },
|
|
|
- color: ['#05A6F3', '#0BD991', '#FF9F40', '#8E6DF2', '#F1D090']
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export var mBarChart = {
|
|
|
- dataEmpty: true,
|
|
|
- chartSettings: {},
|
|
|
- chartExtend: {
|
|
|
- grid: {
|
|
|
- x: 14,
|
|
|
- y: 20,
|
|
|
- x2: 14
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'axis',
|
|
|
- confine: true,
|
|
|
- backgroundColor: '#fff',
|
|
|
- axisPointer: {
|
|
|
- type: 'shadow',
|
|
|
- shadowStyle: {
|
|
|
- color: 'rgba(5,166,243,0.1)'
|
|
|
- }
|
|
|
- },
|
|
|
- textStyle: {
|
|
|
- color: '#171826',
|
|
|
- fontSize: 12
|
|
|
- },
|
|
|
- padding: [8, 12],
|
|
|
- extraCssText: 'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
|
|
|
- z: 3
|
|
|
- },
|
|
|
- legend: {
|
|
|
- orient: 'horizontal',
|
|
|
- icon: 'circle',
|
|
|
- bottom: 10,
|
|
|
- left: 'center',
|
|
|
- itemWidth: 8,
|
|
|
- itemHeight: 8,
|
|
|
- itemGap: 10,
|
|
|
- textStyle: {
|
|
|
- fontSize: 11
|
|
|
- }
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- splitLine: {
|
|
|
- show: true,
|
|
|
- lineStyle: {
|
|
|
- type: 'dashed',
|
|
|
- width: 0.5,
|
|
|
- color: 'rgba(0, 0, 0, 0.08)'
|
|
|
- }
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- axisLabel: {
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- },
|
|
|
- series: {
|
|
|
- barWidth: 20,
|
|
|
- type: 'bar'
|
|
|
- },
|
|
|
- color: ['#9C72F4', '#6B78E8', '#05A6F3', '#2ABED1', '#0BD991', '#C0C4CC', '#B8D4F9', '#444A7A', '#F1D090', '#B8D4F9', '#C09BFC', '#104EA3', '#21CED2', '#FFB901', '#7BBFE5', '#82E9D6', '#62B8FF', '#7E56EE', '#B3E3E7', '#8591FF', '#96C3D8', '#3774E8', '#CDCEFE', '#6BBEF4', '#6E55B4', '#2B82FE', '#FF9A01', '#01C290', '#BAE1A8', '#EB97D8']
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// 月报 (本月项目规模)
|
|
|
-export var barChart2 = {
|
|
|
- chartExtend: {
|
|
|
- grid: {
|
|
|
- left: 4,
|
|
|
- x: 0,
|
|
|
- y: 20,
|
|
|
- x2: 12
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- axisLabel: {
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- },
|
|
|
- yAxis (item) {
|
|
|
- var maxCountList = vNode.data.curMonthScaleData.rows.map(v => {
|
|
|
- return v['项目规模']
|
|
|
- })
|
|
|
- var maxPriceList = vNode.data.curMonthScaleData.rows.map(v => {
|
|
|
- return v['环比增长率(%)-右纵轴']
|
|
|
- })
|
|
|
- var maxCount = Math.ceil(Math.max.apply(null, maxCountList)).toString()
|
|
|
- var maxPrice = Math.ceil(Math.max.apply(null, maxPriceList)).toString()
|
|
|
- var minRight = Math.ceil(Math.min.apply(null, maxPriceList)).toString()
|
|
|
- maxCount = Math.ceil(maxCount / (Math.pow(10, maxCount.length - 1))) * Math.pow(10, maxCount.length - 1)
|
|
|
- maxPrice = Math.ceil(maxPrice / (Math.pow(10, maxPrice.length - 1))) * Math.pow(10, maxPrice.length - 1)
|
|
|
- if (minRight.indexOf('-') > -1) {
|
|
|
- minRight = '-' + Math.ceil(minRight.replace('-', '') / (Math.pow(10, minRight.replace('-', '').length - 1))) * Math.pow(10, minRight.replace('-', '').length - 1)
|
|
|
- } else {
|
|
|
- minRight = 0
|
|
|
- }
|
|
|
- item[0].min = 0
|
|
|
- item[1].min = minRight
|
|
|
- item[0].max = maxCount
|
|
|
- item[0].interval = Math.ceil(maxCount / 5)
|
|
|
- item[1].max = maxPrice
|
|
|
- item[1].interval = Math.ceil((maxPrice - minRight) / 5)
|
|
|
- item[0].splitLine = {
|
|
|
- lineStyle: {
|
|
|
- type: 'dashed',
|
|
|
- width: 0.5
|
|
|
- }
|
|
|
- }
|
|
|
- item[1].splitLine = {
|
|
|
- show: false,
|
|
|
- lineStyle: {
|
|
|
- type: 'dashed',
|
|
|
- width: 0.5
|
|
|
- }
|
|
|
- }
|
|
|
- item[1].axisLabel = {
|
|
|
- show: true,
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- item[0].axisLabel = {
|
|
|
- margin: 2,
|
|
|
- fontSize: 10,
|
|
|
- formatter: function (value, index) {
|
|
|
- return value.toString().replace(/,/, '')
|
|
|
- }
|
|
|
- }
|
|
|
- return item
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'axis',
|
|
|
- confine: true,
|
|
|
- backgroundColor: '#fff',
|
|
|
- axisPointer: {
|
|
|
- type: 'shadow',
|
|
|
- shadowStyle: {
|
|
|
- color: 'rgba(5,166,243,0.1)'
|
|
|
- }
|
|
|
- },
|
|
|
- textStyle: {
|
|
|
- color: '#171826',
|
|
|
- fontSize: 12
|
|
|
- },
|
|
|
- padding: [7, 12],
|
|
|
- extraCssText: 'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
|
|
|
- formatter: function (params) {
|
|
|
- return formatterTip(params)
|
|
|
- }
|
|
|
- },
|
|
|
- legend: {
|
|
|
- show: true,
|
|
|
- orient: 'horizontal',
|
|
|
- icon: 'circle',
|
|
|
- bottom: 20,
|
|
|
- align: 'left',
|
|
|
- itemWidth: 8,
|
|
|
- itemHeight: 8,
|
|
|
- itemGap: 20,
|
|
|
- textStyle: {
|
|
|
- fontSize: 11,
|
|
|
- rich: {
|
|
|
- a: {
|
|
|
- fontSize: 16,
|
|
|
- verticalAlign: 'top',
|
|
|
- align: 'center',
|
|
|
- padding: [0, 15, 28, 0]
|
|
|
- },
|
|
|
- b: {
|
|
|
- fontSize: 14,
|
|
|
- align: 'center',
|
|
|
- padding: [0, 15, 0, 0],
|
|
|
- lineHeight: 25
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- formatter: function (name) {
|
|
|
- if (name == '项目规模') {
|
|
|
- name = name + '(万元)'
|
|
|
- }
|
|
|
- return name
|
|
|
- },
|
|
|
- data: ['项目规模', '环比增长率(%)-右纵轴']
|
|
|
- },
|
|
|
- series: {
|
|
|
- barWidth: 20,
|
|
|
- smooth: false
|
|
|
- },
|
|
|
- color: ['#05A6F3', '#FF9F40']
|
|
|
- }
|
|
|
-}
|
|
|
-// 月报 (本月中标企业中标项目数量分布)
|
|
|
-export var barChart3 = {
|
|
|
- chartExtend: {
|
|
|
- grid: {
|
|
|
- x: 8,
|
|
|
- y: 20,
|
|
|
- x2: 12
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- axisLabel: {
|
|
|
- fontSize: 10,
|
|
|
- formatter: function (val) {
|
|
|
- return val + '个'
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- yAxis (item) {
|
|
|
- var maxCountList = vNode.data.curWinEntCountData.rows.map(v => {
|
|
|
- return v['企业数量']
|
|
|
- })
|
|
|
- var maxPriceList = vNode.data.curWinEntCountData.rows.map(v => {
|
|
|
- return v['累计占比(%)-右纵轴']
|
|
|
- })
|
|
|
- var maxCount = Math.ceil(Math.max.apply(null, maxCountList)).toString()
|
|
|
- var maxPrice = Math.ceil(Math.max.apply(null, maxPriceList)).toString()
|
|
|
- maxCount = Math.ceil(maxCount / (Math.pow(10, maxCount.length - 1))) * Math.pow(10, maxCount.length - 1)
|
|
|
- maxPrice = Math.ceil(maxPrice / (Math.pow(10, maxPrice.length - 1))) * Math.pow(10, maxPrice.length - 1)
|
|
|
- item[0].min = 0
|
|
|
- item[1].min = 0
|
|
|
- item[0].max = maxCount
|
|
|
- item[0].interval = Math.ceil(maxCount / 5)
|
|
|
- item[1].max = maxPrice
|
|
|
- item[1].interval = Math.ceil((maxPrice - 0) / 5)
|
|
|
- item[0].splitLine = {
|
|
|
- lineStyle: {
|
|
|
- type: 'dashed',
|
|
|
- width: 0.5
|
|
|
- }
|
|
|
- }
|
|
|
- item[1].splitLine = {
|
|
|
- show: false,
|
|
|
- lineStyle: {
|
|
|
- type: 'dashed',
|
|
|
- width: 0.5
|
|
|
- }
|
|
|
- }
|
|
|
- item[1].axisLabel = {
|
|
|
- show: true,
|
|
|
- fontSize: 10
|
|
|
- }
|
|
|
- item[0].axisLabel = {
|
|
|
- margin: 2,
|
|
|
- fontSize: 10,
|
|
|
- formatter: function (value, index) {
|
|
|
- return value.toString().replace(/,/, '')
|
|
|
- }
|
|
|
- }
|
|
|
- return item
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'axis',
|
|
|
- confine: true,
|
|
|
- backgroundColor: '#fff',
|
|
|
- axisPointer: {
|
|
|
- type: 'shadow',
|
|
|
- shadowStyle: {
|
|
|
- color: 'rgba(5,166,243,0.1)'
|
|
|
- }
|
|
|
- },
|
|
|
- textStyle: {
|
|
|
- color: '#171826',
|
|
|
- fontSize: 12
|
|
|
- },
|
|
|
- padding: [7, 12],
|
|
|
- extraCssText: 'box-shadow: 0px 4px 16px rgba(8, 31, 38, 0.08)',
|
|
|
- formatter: function (params) {
|
|
|
- return formatterTip(params)
|
|
|
- }
|
|
|
- },
|
|
|
- legend: {
|
|
|
- show: true,
|
|
|
- orient: 'horizontal',
|
|
|
- icon: 'circle',
|
|
|
- bottom: 20,
|
|
|
- align: 'left',
|
|
|
- itemWidth: 8,
|
|
|
- itemHeight: 8,
|
|
|
- itemGap: 20,
|
|
|
- textStyle: {
|
|
|
- fontSize: 11,
|
|
|
- rich: {
|
|
|
- a: {
|
|
|
- fontSize: 16,
|
|
|
- verticalAlign: 'top',
|
|
|
- align: 'center',
|
|
|
- padding: [0, 15, 28, 0]
|
|
|
- },
|
|
|
- b: {
|
|
|
- fontSize: 14,
|
|
|
- align: 'center',
|
|
|
- padding: [0, 15, 0, 0],
|
|
|
- lineHeight: 25
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- formatter: function (name) {
|
|
|
- if (name == '企业数量') {
|
|
|
- name = name + '(个)'
|
|
|
- }
|
|
|
- return name
|
|
|
- },
|
|
|
- data: ['企业数量', '累计占比(%)-右纵轴']
|
|
|
- },
|
|
|
- series: {
|
|
|
- barWidth: 20,
|
|
|
- smooth: false
|
|
|
- },
|
|
|
- color: ['#05A6F3', '#FF9F40']
|
|
|
- }
|
|
|
-}
|
|
|
-// 修改tooltip展示效果函数
|
|
|
-export function formatterTip (params) {
|
|
|
- var tip = ''
|
|
|
- for (var i = 0; i < params.length; i++) { // 这里是自己定义样式, params[i].marker 表示是否显示左边的那个小圆圈
|
|
|
- params[i].value == undefined ? params[i].value = 0 : params[i].value
|
|
|
- params[i].marker = '<span style="display:inline-block;margin-right:5px;border-radius:8px;width:8px;height:8px;background-color:' + params[i].color + '"></span>'
|
|
|
- if (params[i].seriesName === '项目数量' || params[i].seriesName === '企业数量') {
|
|
|
- tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '个' + '<br/>'
|
|
|
- } else if (params[i].seriesName === '环比增长率(%)-右纵轴' || params[i].seriesName === '累计占比(%)-右纵轴') {
|
|
|
- tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '%' + '<br/>'
|
|
|
- } else {
|
|
|
- tip = tip + params[i].marker + params[i].seriesName + ':' + params[i].value + '万元' + '<br/>'
|
|
|
- }
|
|
|
- }
|
|
|
- tip += '<div style="padding-top:2px;text-align:center;color:#9B9CA3;">' + ' - ' + params[0].name + ' - ' + '</div>'
|
|
|
- return tip
|
|
|
-}
|