let ecData = [ { color: ['#2E9AE2', 'transparent'], value: '75', value1: '25', name: '煤矿运输', txt: '' }, { color: ['#02FDFE', 'transparent'], value: '75', value1: '25', name: '钢铁运输', txt: '' }, { color: ['#1EEBBC', 'transparent'], value: '75', value1: '25', name: '其他领域', txt: '' }, { color: ['#2E9AE2', 'transparent'], value: '75', value1: '25', name: '港口运输', txt: '' }, { color: ['#1EEBBC', 'transparent'], value: '75', value1: '25', name: '站台运输', txt: '' }, ] // 节能减排数据 export const setOption1 = { color: ecData[0].color, tooltip: { show: false }, series: [ { type: 'pie', clockWise: false, radius: [40, 43], avoidLabelOverlap: false, itemStyle: { normal: { color: '#2E9AE2', shadowColor: '#2E9AE2', shadowBlur: 0, label: { show: true, }, labelLine: { show: true, }, }, }, hoverAnimation: false, label: { show: false, }, labelLine: { show: false }, data: [ { value: Number(ecData[0].value), name: ecData[0].name, label: { normal: { formatter: function (params) { let num = ecData[0].value; return ["{a|" + num + "%}", "{b|" + ecData[0].name + "\n" + ecData[0].txt + "}"].join("\n"); }, rich: { a: { color: "#fff", fontWeight: 500, fontSize: 16, lineHeight: 20, align: "center", }, b: { color: "#ccc", fontSize: 10, }, }, position: "center", show: true, textStyle: { fontSize: "20", fontWeight: "bold", color: ecData[0].color[0], //跟随其他颜色 }, }, }, itemStyle: { emphasis: { color: ecData[0].color[0], }, }, }, { value: Number(ecData[0].value1), name: '轨道', label: { show: false, }, labelLine: { show: false, }, itemStyle: { normal: { color: ecData[0].color[1], }, }, }, ] } ] } export const setOption2 = { color: ecData[1].color, tooltip: { show: false }, series: [ { type: 'pie', clockWise: false, radius: [40, 43], avoidLabelOverlap: false, itemStyle: { normal: { color: ecData[1].color[0], shadowColor: ecData[1].color[0], shadowBlur: 0, label: { show: true, }, labelLine: { show: true, }, }, }, hoverAnimation: false, label: { show: false, }, labelLine: { show: false }, data: [ { value: Number(ecData[1].value), name: ecData[1].name, label: { normal: { formatter: function (params) { let num = ecData[1].value; return ["{a|" + num + "%}", "{b|" + ecData[1].name + "}"].join("\n"); }, rich: { a: { color: "#fff", fontWeight: 500, fontSize: 16, lineHeight: 20, align: "center", }, b: { color: "#ccc", fontSize: 10, }, }, position: "center", show: true, textStyle: { fontSize: "20", fontWeight: "bold", color: ecData[1].color[0], //跟随其他颜色 }, }, }, itemStyle: { emphasis: { color: ecData[1].color[0], }, }, }, { value: Number(ecData[1].value1), name: '轨道', label: { show: false, }, labelLine: { show: false, }, itemStyle: { normal: { color: ecData[1].color[1], }, }, }, ] } ] } export const setOption3 = { color: ecData[2].color, tooltip: { show: false }, series: [ { type: 'pie', clockWise: false, radius: [40, 43], avoidLabelOverlap: false, itemStyle: { normal: { color: ecData[2].color[0], shadowColor: ecData[2].color[0], shadowBlur: 0, label: { show: true, }, labelLine: { show: true, }, }, }, hoverAnimation: false, label: { show: false, }, labelLine: { show: false }, data: [ { value: Number(ecData[2].value), name: ecData[2].name, label: { normal: { formatter: function (params) { let num = ecData[2].value; return ["{a|" + num + "%}", "{b|" + ecData[2].name + "}"].join("\n"); }, rich: { a: { color: "#fff", fontWeight: 500, fontSize: 16, lineHeight: 20, align: "center", }, b: { color: "#ccc", fontSize: 10, }, }, position: "center", show: true, textStyle: { fontSize: "20", fontWeight: "bold", color: ecData[2].color[0], //跟随其他颜色 }, }, }, itemStyle: { emphasis: { color: ecData[2].color[0], }, }, }, { value: Number(ecData[2].value1), name: '轨道', label: { show: false, }, labelLine: { show: false, }, itemStyle: { normal: { color: ecData[2].color[1], }, }, }, ] } ] } export const setOption4 = { color: ecData[3].color, tooltip: { show: false }, series: [ { type: 'pie', clockWise: false, radius: [40, 43], avoidLabelOverlap: false, itemStyle: { normal: { color: ecData[3].color[0], shadowColor: ecData[3].color[0], shadowBlur: 0, label: { show: true, }, labelLine: { show: true, }, }, }, hoverAnimation: false, label: { show: false, }, labelLine: { show: false }, data: [ { value: Number(ecData[3].value), name: ecData[3].name, label: { normal: { formatter: function (params) { let num = ecData[3].value; return ["{a|" + num + "%}", "{b|" + ecData[3].name + "}"].join("\n"); }, rich: { a: { color: "#fff", fontWeight: 500, fontSize: 16, lineHeight: 20, align: "center", }, b: { color: "#ccc", fontSize: 10, }, }, position: "center", show: true, textStyle: { fontSize: "20", fontWeight: "bold", color: ecData[3].color[0], //跟随其他颜色 }, }, }, itemStyle: { emphasis: { color: ecData[3].color[0], }, }, }, { value: Number(ecData[3].value1), name: '轨道', label: { show: false, }, labelLine: { show: false, }, itemStyle: { normal: { color: ecData[3].color[1], }, }, }, ] } ] } export const setOption5 = { color: ecData[4].color, tooltip: { show: false }, series: [ { type: 'pie', clockWise: false, radius: [40, 43], avoidLabelOverlap: false, itemStyle: { normal: { color: ecData[4].color[0], shadowColor: ecData[4].color[0], shadowBlur: 0, label: { show: true, }, labelLine: { show: true, }, }, }, hoverAnimation: false, label: { show: false, }, labelLine: { show: false }, data: [ { value: Number(ecData[4].value), name: ecData[4].name, label: { normal: { formatter: function (params) { let num = ecData[4].value; return ["{a|" + num + "%}", "{b|" + ecData[4].name + "}"].join("\n"); }, rich: { a: { color: "#fff", fontWeight: 500, fontSize: 16, lineHeight: 20, align: "center", }, b: { color: "#ccc", fontSize: 10, }, }, position: "center", show: true, textStyle: { fontSize: "20", fontWeight: "bold", color: ecData[4].color[0], //跟随其他颜色 }, }, }, itemStyle: { emphasis: { color: ecData[4].color[0], }, }, }, { value: Number(ecData[4].value1), name: '轨道', label: { show: false, }, labelLine: { show: false, }, itemStyle: { normal: { color: ecData[4].color[1], }, }, }, ] } ] } let seriesData = ['535','354','285','487','624','482','395','324','487'] let xAxisData = ['00:00','03:00','06:00','09:00','12:00','15:00','18:00','21:00','24:00'] export const lineOption = { backgroundColor:"transparent", tooltip: { show:false }, grid: { top: '18%', left: '2%', right: '10%', bottom: '5%', containLabel: true }, legend: { show:false, }, xAxis: { boundaryGap: true, data: xAxisData, axisLine: { lineStyle: { color: "rgba(117, 168, 202, 0.4)" } }, axisTick: { show: false }, axisLabel: { color: '#fff' } }, yAxis: [{ name: '单位:万元', type: "value", inverse: false, splitLine: { show: true, lineStyle: { color: 'rgba(117, 168, 202, 0.3)', type: 'dashed' } }, axisLine: { show: false, lineStyle: { color: "#0A5C95" } }, axisLabel: { formatter: "{value}", textStyle: { color: '#89BFE5', fontSize: 12 } }, nameTextStyle: { color: '#89BFE5', padding: [0, 0, 0, 15], fontSize: 12 }, axisTick: { show: false } }], series: [ { name: '客户今日请求量', type: "line", symbol: 'circle', //设定为实心点 showAllSymbol: true, symbolSize: 0, smooth: true, itemStyle: { normal: { color: `#02D6D9`, lineStyle: { //线的颜色 color: `#02D6D9`, width: 1.5 }, areaStyle: { //新版渐变色实现 color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: 'rgba(58, 147, 255, 0.5)' }, { offset: 1, color: 'rgba(2,214,217, 0.1)' } ] } }, } }, data: seriesData }, ] } export const userList = [ { "projectName": "开采", "position": "四川乐山", "type": "通信服务", "sn": "011K", "deviceType": "数通模块", "time": "2h", "number": "5" }, { "projectName": "海上采能", "position": "山东威海", "type": "通信服务", "sn": "209M", "deviceType": "数通模块", "time": "2h", "number": "1" }, { "projectName": "复垦", "position": "四川雅安", "type": "通信服务", "sn": "901C", "deviceType": "数通模块", "time": "2h", "number": "2" }, { "projectName": "开采", "position": "内蒙古包头", "type": "通信服务", "sn": "008C", "deviceType": "数通模块", "time": "1h", "number": "4" }, { "projectName": "传媒", "position": "浙江杭州", "type": "通信服务", "sn": "310A", "deviceType": "数通模块", "time": "2h", "number": "2" }, { "projectName": "驾驶", "position": "四川眉山", "type": "通信服务", "sn": "800B", "deviceType": "数通模块", "time": "2h", "number": "5" }, { "projectName": "开采", "position": "陕西运城", "type": "卫星地图", "sn": "100G", "deviceType": "数通模块", "time": "2h", "number": "11" }, { "projectName": "光伏储能", "position": "新疆库尔勒", "type": "通信服务", "sn": "005R", "deviceType": "数通模块", "time": "1.5h", "number": "8" }, { "projectName": "开采", "position": "云南丽江", "type": "通信服务", "sn": "113U", "deviceType": "数通模块", "time": "2h", "number": "0" }, { "projectName": "开采", "position": "四川雅安", "type": "通信服务", "sn": "467W", "deviceType": "数通模块", "time": "1.5h", "number": "2" } ]