|
@@ -0,0 +1,479 @@
|
|
|
+const airportName = ['BPM数据', 'BSM数据', '航班数据', '异常行李数据', '不符合规范数据']
|
|
|
+
|
|
|
+const colors = ['#a5d6a7', '#6f9dea', '#ffcc80', '#66b5f7', '#b39ddb']
|
|
|
+
|
|
|
+const checkAlls = [
|
|
|
+ {
|
|
|
+ label: '全国',
|
|
|
+ value: '全国'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '东北地区',
|
|
|
+ value: '东北地区'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '中南地区',
|
|
|
+ value: '中南地区'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '华东地区',
|
|
|
+ value: '华东地区'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '华北地区',
|
|
|
+ value: '华北地区'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '新疆',
|
|
|
+ value: '新疆'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '西南地区',
|
|
|
+ value: '西南地区'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '西北地区',
|
|
|
+ value: '西北地区'
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+const checkAccess = [
|
|
|
+ {
|
|
|
+ label: '总数据条数',
|
|
|
+ value: '总数据条数'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'BPM数据',
|
|
|
+ value: 'BPM数据'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'BSM数据',
|
|
|
+ value: 'BSM数据'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '航班数据',
|
|
|
+ value: '航班数据'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '异常行李数据',
|
|
|
+ value: '异常行李数据'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '不符合规范数据',
|
|
|
+ value: '不符合规范数据'
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+const checkLuggage = [
|
|
|
+ {
|
|
|
+ label: '总行李量',
|
|
|
+ value: '总行李量'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '离港行李量',
|
|
|
+ value: '离港行李量'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '进港行李量',
|
|
|
+ value: '进港行李量'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '中转行李量',
|
|
|
+ value: '中转行李量'
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+const checkNodes = [
|
|
|
+ {
|
|
|
+ label: '标准内节点',
|
|
|
+ value: '标准内节点'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '标准外节点',
|
|
|
+ value: '标准外节点'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '基本节点',
|
|
|
+ value: '基本节点'
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+const barOption = {
|
|
|
+ title: {
|
|
|
+ // text: 'Referer of a Website',
|
|
|
+ subtext: '',
|
|
|
+ left: '45%',
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'axis',
|
|
|
+ axisPointer: {
|
|
|
+ type: 'shadow'
|
|
|
+ },
|
|
|
+ position: ['50%', '50%']
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ left: 10,
|
|
|
+ top: 75,
|
|
|
+ itemWidth: 10,
|
|
|
+ itemHeight: 10,
|
|
|
+ textStyle: {
|
|
|
+ color: '#888'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ left: '30%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ top: '20%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: [],
|
|
|
+ axisTick: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+
|
|
|
+ ]
|
|
|
+}
|
|
|
+
|
|
|
+const pieOption = {
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item'
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ orient: 'vertical',
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ right: '0%',
|
|
|
+ name: '',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ["85%", "100%"],
|
|
|
+ center: ["70%", "50%"],
|
|
|
+ hoverAnimation: false,
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ position: 'left'
|
|
|
+ },
|
|
|
+ color: [],
|
|
|
+ data: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "",
|
|
|
+ type: "pie",
|
|
|
+ hoverAnimation: false,
|
|
|
+ radius: ["65%", "85%"],
|
|
|
+ center: ["70%", "50%"],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ color: [],
|
|
|
+ labelLine: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ data: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "",
|
|
|
+ type: "pie",
|
|
|
+ // silent:true,
|
|
|
+ center: ["70%", "50%"],
|
|
|
+ radius: ["45%", "65%"],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ color: [],
|
|
|
+ hoverAnimation: false,
|
|
|
+ labelLine: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ data: [],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "总量",
|
|
|
+ type: "pie",
|
|
|
+ // silent:true,
|
|
|
+ center: ["70%", "50%"],
|
|
|
+ radius: ["0%", "40%"],
|
|
|
+ avoidLabelOverlap: false,
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ label: {
|
|
|
+ formatter: `{b}\n{c}`,
|
|
|
+ show: true,
|
|
|
+ position: 'center'
|
|
|
+ },
|
|
|
+ hoverAnimation: false,
|
|
|
+ labelLine: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ data: [],
|
|
|
+ },
|
|
|
+ ]
|
|
|
+}
|
|
|
+
|
|
|
+function randomData () {
|
|
|
+ return Math.round(Math.random() * 1000)
|
|
|
+}
|
|
|
+const mapOption = {
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
+ // formatter: function (item) {
|
|
|
+ // if (item.data && item.data.index) {
|
|
|
+ // const html = `<div>
|
|
|
+ // <div>机场三字码 ${item.data.index}</div>
|
|
|
+ // <div>${item.data.name} ${item.data.value}</div>
|
|
|
+ // </div>`
|
|
|
+ // return html
|
|
|
+ // } else {
|
|
|
+ // return `<div style="width:400px">
|
|
|
+ // <div>${item.data.airportname}</div>
|
|
|
+ // <div style='display:flex'><div style='margin-right:20px'>机场三字码:${item.data.airport}</div><div>机场简称:${item.data.airportname}</div></div>
|
|
|
+ // <div style='display:flex'><div style='margin-right:20px'>国内总量:${item.data.dombag}</div><div>国际总量:${item.data.intbag}</div></div>
|
|
|
+ // <div style='display:flex'><div style='margin-right:50px'>离港总量:${item.data.outbag}</div><div style='margin-right:50px'>进港总量:${item.data.inbag}</div><div>中转总量:${item.data.transfer}</div></div>
|
|
|
+ // <div style='display:flex'><div style='margin-right:50px'>正常行李量:${item.data.normal}</div><div style='margin-right:50px'>特殊行李量:${item.data.special}</div><div>异常行李量:${item.data.exception}</div></div>
|
|
|
+ // </div>`
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ orient: 'vertical',
|
|
|
+ left: '6%',
|
|
|
+ top: '8%',
|
|
|
+ itemWidth: 10,
|
|
|
+ itemHeight: 10,
|
|
|
+ textStyle: {
|
|
|
+ color: '#888'
|
|
|
+ },
|
|
|
+ data: ['已建', '在建', '未建']
|
|
|
+ },
|
|
|
+ visualMap: {
|
|
|
+ min: 0,
|
|
|
+ max: 2500,
|
|
|
+ left: 'left',
|
|
|
+ top: 'bottom',
|
|
|
+ text: ['高', '低'],
|
|
|
+ color: ['#164190', '#a6c2f2'],
|
|
|
+ calculable: true
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '已建',
|
|
|
+ type: 'map',
|
|
|
+ mapType: 'china',
|
|
|
+ roam: false,
|
|
|
+ color: '#4fc267',
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: [
|
|
|
+ { name: '北京', value: randomData() },
|
|
|
+ { name: '天津', value: randomData() },
|
|
|
+ { name: '上海', value: randomData() },
|
|
|
+ { name: '重庆', value: randomData() },
|
|
|
+ { name: '河北', value: randomData() },
|
|
|
+ { name: '河南', value: randomData() },
|
|
|
+ { name: '云南', value: randomData() },
|
|
|
+ { name: '辽宁', value: randomData() },
|
|
|
+ { name: '黑龙江', value: randomData() },
|
|
|
+ { name: '湖南', value: randomData() },
|
|
|
+ { name: '安徽', value: randomData() },
|
|
|
+ { name: '山东', value: randomData() },
|
|
|
+ { name: '新疆', value: randomData() },
|
|
|
+ { name: '江苏', value: randomData() },
|
|
|
+ { name: '浙江', value: randomData() },
|
|
|
+ { name: '江西', value: randomData() },
|
|
|
+ { name: '湖北', value: randomData() },
|
|
|
+ { name: '广西', value: randomData() },
|
|
|
+ { name: '甘肃', value: randomData() },
|
|
|
+ { name: '山西', value: randomData() },
|
|
|
+ { name: '内蒙古', value: randomData() },
|
|
|
+ { name: '陕西', value: randomData() },
|
|
|
+ { name: '吉林', value: randomData() },
|
|
|
+ { name: '福建', value: randomData() },
|
|
|
+ { name: '贵州', value: randomData() },
|
|
|
+ { name: '广东', value: randomData() },
|
|
|
+ { name: '青海', value: randomData() },
|
|
|
+ { name: '西藏', value: randomData() },
|
|
|
+ { name: '四川', value: randomData() },
|
|
|
+ { name: '宁夏', value: randomData() },
|
|
|
+ { name: '海南', value: randomData() },
|
|
|
+ { name: '台湾', value: randomData() },
|
|
|
+ { name: '香港', value: randomData() },
|
|
|
+ { name: '澳门', value: randomData() }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '在建',
|
|
|
+ type: 'map',
|
|
|
+ mapType: 'china',
|
|
|
+ color: '#ffcc80',
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: [
|
|
|
+ { name: '北京', value: randomData() },
|
|
|
+ { name: '天津', value: randomData() },
|
|
|
+ { name: '上海', value: randomData() },
|
|
|
+ { name: '重庆', value: randomData() },
|
|
|
+ { name: '河北', value: randomData() },
|
|
|
+ { name: '安徽', value: randomData() },
|
|
|
+ { name: '新疆', value: randomData() },
|
|
|
+ { name: '浙江', value: randomData() },
|
|
|
+ { name: '江西', value: randomData() },
|
|
|
+ { name: '山西', value: randomData() },
|
|
|
+ { name: '内蒙古', value: randomData() },
|
|
|
+ { name: '吉林', value: randomData() },
|
|
|
+ { name: '福建', value: randomData() },
|
|
|
+ { name: '广东', value: randomData() },
|
|
|
+ { name: '西藏', value: randomData() },
|
|
|
+ { name: '四川', value: randomData() },
|
|
|
+ { name: '宁夏', value: randomData() },
|
|
|
+ { name: '香港', value: randomData() },
|
|
|
+ { name: '澳门', value: randomData() }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '未建',
|
|
|
+ type: 'map',
|
|
|
+ mapType: 'china',
|
|
|
+ color: '#666',
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ show: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: [
|
|
|
+ { name: '北京', value: randomData() },
|
|
|
+ { name: '天津', value: randomData() },
|
|
|
+ { name: '上海', value: randomData() },
|
|
|
+ { name: '广东', value: randomData() },
|
|
|
+ { name: '台湾', value: randomData() },
|
|
|
+ { name: '香港', value: randomData() },
|
|
|
+ { name: '澳门', value: randomData() }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+};
|
|
|
+
|
|
|
+const scatterOption = {
|
|
|
+ tooltip: {
|
|
|
+ position: 'top'
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ left: 200,
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ top: '20%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ series: []
|
|
|
+}
|
|
|
+
|
|
|
+const LuggageOption = {
|
|
|
+ color: ['#7569BE'],
|
|
|
+ title: {
|
|
|
+ // text: 'Referer of a Website',
|
|
|
+ subtext: '',
|
|
|
+ left: '0%',
|
|
|
+ top: 0
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: "axis",
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ left: 10,
|
|
|
+ top: 75,
|
|
|
+ itemWidth: 10,
|
|
|
+ itemHeight: 10,
|
|
|
+ textStyle: {
|
|
|
+ color: '#888'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ left: '18%',
|
|
|
+ right: '4%',
|
|
|
+ bottom: '3%',
|
|
|
+ top: '5%',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: ['总量', '离港总量', '进港总量', '中转总量', '不正常行李量', '特殊行李量'],
|
|
|
+ axisTick: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ interval: 0,
|
|
|
+ formatter: function (value) {
|
|
|
+ var ret = "";//拼接加\n返回的类目项
|
|
|
+ var valLength = value.length;//X轴类目项的文字个数
|
|
|
+ var maxLength = value.length > 4 ? 3 : 2;//每项显示文字个数
|
|
|
+ var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
|
|
|
+ if (rowN > 1)//如果类目项的文字大于5,
|
|
|
+ {
|
|
|
+ for (var i = 0; i < rowN; i++) {
|
|
|
+ var temp = "";//每次截取的字符串
|
|
|
+ var start = i * maxLength;//开始截取的位置
|
|
|
+ var end = start + maxLength;//结束截取的位置
|
|
|
+ //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
|
|
|
+ temp = value.substring(start, end) + "\n";
|
|
|
+ ret += temp; //凭借最终的字符串
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ axisLine: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // color:['#ccc','red'],
|
|
|
+ yAxis: {
|
|
|
+ type: 'value',
|
|
|
+ },
|
|
|
+ color: ['#3a79e3', '#ffcc80'],
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '国内',
|
|
|
+ barWidth: 20,
|
|
|
+ data: [120, 200, 150, 80, 70, 110],
|
|
|
+ type: 'bar',
|
|
|
+ stack: 'total',
|
|
|
+ z: "-1",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '国际',
|
|
|
+ barWidth: 20,
|
|
|
+ data: [120, 200, 150, 80, 70, 110],
|
|
|
+ type: 'bar',
|
|
|
+ stack: 'total',
|
|
|
+ }]
|
|
|
+}
|
|
|
+
|
|
|
+export { airportName, colors, checkAlls, checkLuggage, checkNodes, checkAccess, barOption, pieOption, mapOption, scatterOption, LuggageOption }
|