{"remainingRequest":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\BigScreen\\operationFees.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\BigScreen\\operationFees.vue","mtime":1715713737026},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport moment from 'moment';\nimport * as echarts from 'echarts';\nimport headline from \"./headline.vue\";\nimport VueSeamlessScroll from 'vue-seamless-scroll';\nimport commonAPI from '@/api/bigScreen/common.js';\nimport utils from '@/utils';\nexport default {\n components: {\n headline: headline,\n VueSeamlessScroll: VueSeamlessScroll\n },\n data: function data() {\n return {\n activeSearchType: 'year',\n totalSearchType: [{\n label: '年',\n key: 'year'\n }, {\n label: '月',\n key: 'month'\n }],\n activeCarType: 1,\n totalCarType: [{\n label: '出口',\n key: 1\n }, {\n label: '入口',\n key: 2\n }],\n totalTransaction: 0,\n // 54505.33,\n totalCar: '00000000',\n totalCarDaily: '00000000',\n totalDayIncome: '00000000',\n totalIncome: '00000000',\n TransactionDaily: '00000000',\n ETC: 0,\n NonETC: 0,\n Cash: 0,\n NonCash: 0,\n reductionChart: null,\n reductionData: [],\n reductionOption: null,\n loadObj: {\n payTypeData: false,\n scrollListData: false,\n barChartBLData: false,\n barChartBRData: false,\n barChartTData: false,\n PieData: false,\n yujueChartData: false\n },\n loadingColor: 'rgba(6, 46, 106, 0.01)',\n scrollheader: [{\n name: '序号',\n width: '26%'\n }, {\n name: '门架',\n width: '48%'\n }, {\n name: '状态',\n width: '26%'\n }],\n scrollListData: [],\n // 图表\n barChartBL: null,\n barChartBLOption: null,\n barChartBLData: [// ['toll', '今年', '去年'],\n // ['1月', 21, 22],\n ],\n barChartBLData1: [],\n barChartBLData2: [],\n barChartBR: null,\n barChartBROption: null,\n barChartBRData: [// ['traffic', '今年', '去年'],\n // ['1月', 2542, 2962],\n ],\n lineChart: null,\n lineChartOption: null,\n lineChartData: [// ['type', '客车', '货车', '专项作业车', '其他'],\n // ['1月', 42, 62, 16, 3],\n ],\n barChartT: null,\n barChartTOption: null,\n barChartTData: [],\n yujueChart: null,\n yujueChartOption: null,\n yujueChartData: [{\n name: '车牌识别准确率',\n value: 0,\n color: '#66CCFF'\n }, {\n name: 'OBU标签交易成功率',\n value: 0,\n color: '#F7C47D'\n }, {\n name: 'CPC交易成功率',\n value: 0,\n color: '#699BFF'\n }],\n year: moment().format('YYYY'),\n month: moment().format('MM'),\n tollStationId: '',\n PieChart: null,\n PieData: [],\n PieOption: null,\n PiecurIndex: 0,\n timer: '',\n data: '',\n test: []\n };\n },\n computed: {\n optionSingleHeightTime: function optionSingleHeightTime() {\n return {\n step: 0.35,\n limitMoveNum: this.scrollListData.length,\n // 开始无缝滚动的数据量 this.dataList.length\n openWatch: true // 开启数据实时监控刷新dom\n\n };\n }\n },\n mounted: function mounted() {},\n activated: function activated() {\n this.getDate();\n },\n methods: {\n changeTotalSearchType: function changeTotalSearchType(key) {\n this.activeSearchType = key;\n this.getChargeTotal(key);\n this.getCarTypeList();\n\n if (key == 'year') {\n this.hide();\n } else {\n this.showTip();\n }\n },\n changeTotalCarType: function changeTotalCarType(key) {\n this.activeCarType = key;\n this.getCarTypeList(key);\n this.clear();\n this.intervalFaultPie();\n },\n getData: function getData() {\n this.tollStationId = sessionStorage.getItem('tollStationId');\n this.getToll(); // 获取通行费同比\n\n this.getCarFlow(); // 获取车流量同比\n\n this.getReduction(); // 获取减免通行费\n\n this.getChargeTotal('year'); // 时间维度查询收费和通行数据\n\n this.getCarList(); // 获取车辆记录\n\n this.getCarTypeList(); // 获取车辆类型\n\n this.getPayType(); // 支付方式\n\n this.getRecognitionRate(); // 门架识别率\n\n this.showTip();\n },\n getDate: function getDate(val) {\n if (val) {\n this.year = val.slice(0, 4);\n this.month = val.slice(5, 7);\n }\n\n this.getData();\n },\n getToll: function getToll() {\n var _this = this;\n\n var data = this.qs.stringify({\n year: this.year,\n stationId: this.tollStationId\n });\n this.loadObj.barChartBLData = true;\n this.barChartBLData1 = [];\n this.barChartBLData2 = [];\n commonAPI.getToll(data).then(function (res) {\n if (res.value) {\n for (var i = 0; i < 12; i++) {\n _this.barChartBLData1.push(0);\n\n _this.barChartBLData2.push(0);\n }\n\n var current = res.value.current ? res.value.current : [];\n var last = res.value.last ? res.value.last : [];\n current.forEach(function (jn) {\n _this.barChartBLData1[parseInt(jn.monthNumber) - 1] = jn.actualityMoney;\n });\n last.forEach(function (jn) {\n _this.barChartBLData2[parseInt(jn.monthNumber) - 1] = jn.actualityMoney;\n });\n }\n\n _this.loadObj.barChartBLData = false;\n\n _this.drawBarChartBL();\n });\n },\n getCarFlow: function getCarFlow() {\n var _this2 = this;\n\n var data = this.qs.stringify({\n year: this.year,\n stationId: this.tollStationId\n });\n this.loadObj.barChartBRData = true;\n this.barChartBRData1 = [];\n this.barChartBRData2 = [];\n commonAPI.getCarFlow(data).then(function (res) {\n if (res.value) {\n for (var i = 0; i < 12; i++) {\n _this2.barChartBRData1.push(0);\n\n _this2.barChartBRData2.push(0);\n }\n\n var current = res.value.current ? res.value.current : [];\n var last = res.value.last ? res.value.last : [];\n current.forEach(function (jn) {\n _this2.barChartBRData1[parseInt(jn.monthNumber) - 1] = jn.amount;\n });\n last.forEach(function (jn) {\n _this2.barChartBRData2[parseInt(jn.monthNumber) - 1] = jn.amount;\n });\n }\n\n _this2.loadObj.barChartBRData = false;\n\n _this2.drawBarChartBR();\n });\n },\n getReduction: function getReduction() {\n var _this3 = this;\n\n var data = this.qs.stringify({\n year: this.year,\n stationId: this.tollStationId\n });\n this.loadObj.barChartTData = true;\n this.barChartTData = [];\n commonAPI.getReduction(data).then(function (res) {\n if (res.value) {\n for (var i = 0; i < 12; i++) {\n _this3.barChartTData.push(0);\n }\n\n var current = res.value.current ? res.value.current : [];\n current.forEach(function (jn) {\n _this3.barChartTData[parseInt(jn.monthNumber) - 1] = jn.reductionMoney;\n });\n }\n\n _this3.loadObj.barChartTData = false;\n\n _this3.drawBarChartT();\n });\n },\n getPayType: function getPayType() {\n var _this4 = this;\n\n this.loadObj.payTypeData = true;\n var queryData = {\n pageBean: {\n page: 1,\n pageSize: -1\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'toll_station_id_',\n relation: 'AND',\n value: this.tollStationId\n }]\n };\n this.ETC = 0;\n this.NonETC = 0;\n this.Cash = 0;\n this.NonCash = 0;\n commonAPI.getPayType(queryData).then(function (res) {\n if (res.value) {\n _this4.ETC = 0;\n _this4.NonETC = 0;\n _this4.Cash = 0;\n _this4.NonCash = 0;\n commonAPI.getPayType(queryData).then(function (res) {\n if (res.value) {\n _this4.ETC = res.value.ETC ? _this4.formatNum(res.value.ETC) : 0;\n _this4.NonETC = res.value.NonETC ? _this4.formatNum(res.value.NonETC) : 0;\n _this4.Cash = res.value.Cash ? _this4.formatNum(res.value.Cash) : 0;\n _this4.NonCash = res.value.NonCash ? _this4.formatNum(res.value.NonCash) : 0;\n }\n\n _this4.loadObj.payTypeData = false;\n });\n }\n\n _this4.loadObj.payTypeData = false;\n });\n },\n formatNum: function formatNum(val) {\n var num = 0;\n num = parseFloat((val * 100).toFixed(2));\n return num;\n },\n getRecognitionRate: function getRecognitionRate() {\n var _this5 = this;\n\n var queryData = {\n pageBean: {\n page: 1,\n pageSize: -1\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'toll_station_id_',\n relation: 'AND',\n value: this.tollStationId\n }]\n };\n this.loadObj.yujueChartData = true;\n this.yujueChartData[0].value = 0;\n this.yujueChartData[1].value = 0;\n this.yujueChartData[2].value = 0;\n commonAPI.getRecognitionRate(queryData).then(function (res) {\n if (res.value) {\n var _res$value = res.value,\n _res$value$vehicleIde = _res$value.vehicleIdentifyRate,\n vehicleIdentifyRate = _res$value$vehicleIde === void 0 ? 0 : _res$value$vehicleIde,\n _res$value$obuIdentif = _res$value.obuIdentifyRate,\n obuIdentifyRate = _res$value$obuIdentif === void 0 ? 0 : _res$value$obuIdentif,\n _res$value$cpcIdentif = _res$value.cpcIdentifyRate,\n cpcIdentifyRate = _res$value$cpcIdentif === void 0 ? 0 : _res$value$cpcIdentif;\n _this5.yujueChartData[0].value = parseFloat(vehicleIdentifyRate.toFixed(2));\n _this5.yujueChartData[1].value = parseFloat(obuIdentifyRate.toFixed(2));\n _this5.yujueChartData[2].value = parseFloat(cpcIdentifyRate.toFixed(2));\n }\n\n _this5.drawYujueChart();\n\n _this5.loadObj.yujueChartData = false;\n });\n },\n getCarTypeList: function getCarTypeList(key) {\n var _this6 = this;\n\n if (key) {\n this.activeCarType = key;\n }\n\n if (this.activeSearchType == 'year') {\n this.data = this.qs.stringify({\n stationId: this.tollStationId,\n doorWay: this.activeCarType\n });\n } else if (this.activeSearchType == 'month') {\n this.data = this.qs.stringify({\n stationId: this.tollStationId,\n month: this.month,\n doorWay: this.activeCarType\n });\n }\n\n this.loadObj.PieData = true;\n this.carType = utils.getDictItemsFromCache('cllx');\n this.PieData = [];\n this.carType.forEach(function (item) {\n var obj = {\n name: item.name,\n type: item.value,\n value: 0\n };\n\n _this6.PieData.push(obj);\n });\n commonAPI.getCarTypeList(this.data).then(function (res) {\n if (res.value) {\n var data = res.value;\n data.forEach(function (item) {\n for (var i = 0; i < _this6.PieData.length; i++) {\n if (item.carType == _this6.PieData[i].type && item.year == _this6.year) {\n _this6.PieData[i].value = item.carFlow;\n }\n }\n });\n _this6.PiecurIndex = 0;\n\n _this6.drawPieChart();\n\n _this6.loadObj.PieData = false;\n }\n });\n },\n getCarList: function getCarList() {\n var _this7 = this;\n\n this.loadObj.scrollListData = true;\n this.scrollListData = [];\n var queryData = {\n pageBean: {\n page: 1,\n pageSize: -1\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'toll_station_id_',\n relation: 'AND',\n value: this.tollStationId\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'type',\n relation: 'AND',\n value: 14\n }]\n };\n commonAPI.getDeviceList(queryData).then(function (res) {\n if (res.value) {\n _this7.scrollListData = res.value.rows || [];\n console.log(_this7.scrollListData);\n _this7.loadObj.scrollListData = false;\n }\n });\n },\n getChargeTotal: function getChargeTotal(type) {\n var _this8 = this;\n\n var startTime, endTime;\n\n if (type == 'year') {\n startTime = this.year + '-01-01 00:00:00';\n endTime = this.year + '-12-31 23:59:59';\n } else if (type == 'month') {\n var date = new Date(this.year, this.month, 0);\n var endDay = date.format('dd');\n startTime = this.year + '-' + this.month + '-01 00:00:00';\n endTime = this.year + '-' + this.month + '-' + endDay + ' 23:59:59';\n }\n\n var queryData = {\n pageBean: {\n page: 1,\n pageSize: -1\n },\n querys: [{\n group: 'main',\n operation: 'BETWEEN',\n parentGroup: '',\n property: 'start_time_',\n relation: 'AND',\n value: [startTime, endTime]\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'toll_station_id_',\n relation: 'AND',\n value: this.tollStationId\n }]\n };\n commonAPI.getChargeTotal(queryData).then(function (res) {\n if (res.value) {\n var data = res.value;\n\n if (data) {\n if (data.transfficCarNum !== undefined) {\n _this8.totalCar = _this8.addZero(data.transfficCarNum + '');\n } else {\n _this8.totalCar = '00000000';\n }\n\n if (data.augTransfficCarNum !== undefined) {\n _this8.totalCarDaily = _this8.addZero(Math.round(data.augTransfficCarNum) + '');\n } else {\n _this8.totalCarDaily = '00000000';\n }\n\n if (data.incomeCostPlan !== undefined) {\n _this8.totalIncome = _this8.addZero(data.incomeCostPlan + '');\n } else {\n _this8.totalIncome = '00000000';\n }\n\n if (data.augTotalMoney !== undefined) {\n _this8.TransactionDaily = _this8.addZero(data.augTotalMoney + '');\n } else {\n _this8.TransactionDaily = '00000000';\n }\n\n if (data.totalMoney !== undefined) {\n _this8.totalTransaction = data.totalMoney;\n } else {\n _this8.totalTransaction = 0;\n }\n }\n }\n });\n },\n addZero: function addZero(data) {\n var str = data;\n var temp = str.replace(',', '0');\n var gap = 8 - temp.length;\n\n for (var i = 0; i <= gap; i++) {\n str = '0' + str;\n }\n\n return str;\n },\n drawYujueChart: function drawYujueChart() {\n var _this9 = this;\n\n // chart 已存在则为更新数据\n if (this.yujueChart) {\n // this.yujueChartOption.dataset.source = this.yujueChartData\n this.yujueChart.setOption(this.yujueChartOption);\n } else {\n // chart 不存在则为初始化数据和图表\n this.yujueChart = echarts.init(document.getElementById('yujue-chart'));\n var _color = ['102, 204, 255', '255, 218, 129', '66, 229, 164', '105, 155, 255'];\n this.yujueChartOption = {\n polar: {\n radius: ['10%', '96%']\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n textStyle: {\n color: '#fff'\n },\n confine: true,\n position: 'bottom',\n formatter: '{b0}: {c0}%' // valueFormatter: (value) => value + '%',\n\n },\n angleAxis: {\n show: false,\n startAngle: 90,\n // 最小值是0°处的数值,最大值是360°处的数值,避免出现弧度为0和2PI的数据\n min: 0,\n max: function max(value) {\n return value.max * 1.5;\n }\n },\n color: _color,\n radiusAxis: {\n type: 'category',\n axisLabel: {\n interval: 0,\n color: '#fff',\n fontSize: 12\n },\n axisLine: {\n show: false\n },\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: 'rgba(17, 51, 68, 0.8)'\n }\n },\n data: this.yujueChartData.map(function (item) {\n return item.name;\n })\n },\n series: [{\n type: 'bar',\n coordinateSystem: 'polar',\n barWidth: 10,\n itemStyle: {\n barBorderRadius: 10,\n color: function color(params) {\n return {\n type: 'linear',\n x: 0.5,\n y: 0,\n x2: 0.5,\n y2: 1,\n colorStops: [{\n offset: 1,\n color: \"rgb(\".concat(_color[params.dataIndex], \")\")\n }, {\n offset: 0.2,\n color: \"rgba(\".concat(_color[params.dataIndex], \", 0.3)\")\n }, {\n offset: 0,\n color: \"rgba(\".concat(_color[params.dataIndex], \", 0.1)\")\n }]\n };\n }\n },\n emphasis: {\n itemStyle: {\n shadowBlur: 4,\n shadowColor: 'rgba(255, 255, 255, 0.6)'\n }\n },\n data: this.yujueChartData\n }, {\n type: 'custom',\n coordinateSystem: 'polar',\n silent: true,\n renderItem: function renderItem(params, api) {\n // 给定维度上的值。\n var values = [api.value(0), api.value(1), api.value(2)]; // 对于polar坐标系,还会包含其他信息:polar: [x, y, radius, angle]\n\n var coord = api.coord(values);\n return {\n type: 'text',\n position: [3 * Math.sin(coord[3]), 3 * Math.cos(coord[3])],\n silent: true,\n rotation: coord[3] + Math.PI / 2,\n origin: [coord[0], coord[1]],\n style: {\n text: api.value(1) + '%',\n fill: \"rgb(\".concat(_color[params.dataIndex], \")\"),\n fontSize: 12,\n textAlign: 'right',\n textVerticalAlign: 'middle',\n x: coord[0],\n y: coord[1]\n }\n };\n },\n data: this.yujueChartData\n }]\n };\n this.yujueChartOption && this.yujueChart.setOption(this.yujueChartOption);\n window.addEventListener('resize', function () {\n return _this9.yujueChart.resize();\n });\n }\n },\n drawBarChartT: function drawBarChartT() {\n var _this10 = this;\n\n // chart 已存在则为更新数据\n if (this.barChartT) {\n this.barChartTOption.series[0].data = this.barChartTData;\n this.barChartT.setOption(this.barChartTOption);\n } else {\n // chart 不存在则为初始化数据和图表\n this.barChartT = echarts.init(document.getElementById('reduction-bar'));\n this.barChartTOption = {\n legend: {\n show: true,\n textStyle: {\n color: '#fff'\n }\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n textStyle: {\n color: '#fff'\n },\n confine: true,\n position: 'bottom',\n valueFormatter: function valueFormatter(value) {\n return value + '元';\n }\n },\n grid: [{\n top: '18%',\n left: '12%',\n right: '6%',\n bottom: '12%'\n }],\n xAxis: {\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n formatter: function formatter(val) {\n if (val >= 1 && parseInt(val, 10) === val || val == 0) {\n return val;\n } else {\n return;\n }\n }\n },\n splitLine: {\n show: false\n }\n },\n yAxis: {\n name: '单位(元)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 20]\n },\n type: 'category',\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)'\n },\n data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']\n },\n series: [{\n type: 'bar',\n barWidth: 6,\n label: {\n show: true,\n position: 'right',\n color: '#fff'\n },\n itemStyle: {\n borderRadius: [0, 5, 5, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{\n offset: 0,\n color: '#8AC4FF'\n }, {\n offset: 0.8,\n color: '#2d547f'\n }, {\n offset: 1,\n color: 'rgba(46, 85, 128,0.3)'\n }])\n },\n data: this.barChartTData\n }]\n };\n this.barChartTOption && this.barChartT.setOption(this.barChartTOption);\n window.addEventListener('resize', function () {\n return _this10.barChartT.resize();\n });\n }\n },\n drawBarChartBL: function drawBarChartBL() {\n var _this11 = this;\n\n // chart 已存在则为更新数据\n if (this.barChartBL) {\n this.barChartBLOption.series[0].data = this.barChartBLData1;\n this.barChartBLOption.series[1].data = this.barChartBLData2;\n this.barChartBL.setOption(this.barChartBLOption);\n } else {\n // chart 不存在则为初始化数据和图表\n this.barChartBL = echarts.init(document.getElementById('bar-chart-bl'));\n this.barChartBLOption = {\n legend: {\n show: true,\n textStyle: {\n color: '#fff'\n },\n itemHeight: 6,\n data: [{\n name: '今年通行费',\n itemStyle: {\n color: '#55EDB0'\n }\n }, {\n name: '去年通行费',\n itemStyle: {\n color: '#FFDA81'\n }\n }]\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n textStyle: {\n color: '#fff'\n },\n confine: true,\n position: 'bottom',\n valueFormatter: function valueFormatter(value) {\n return value + '元';\n }\n },\n grid: [{\n top: '18%',\n left: '5%',\n right: '0',\n bottom: '12%'\n }],\n xAxis: {\n type: 'category',\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)'\n },\n data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']\n },\n yAxis: {\n name: '单位(元)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 20]\n },\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n formatter: function formatter(val) {\n if (val >= 1 && parseInt(val, 10) === val || val == 0) {\n return val;\n } else {\n return;\n }\n }\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n type: 'line',\n name: '今年通行费',\n showSymbol: true,\n color: '#55EDB0',\n smooth: true,\n data: this.barChartBLData1,\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(85, 237, 176,0.3)'\n }, {\n offset: 1,\n color: 'rgba(85, 237, 176,0)'\n }])\n }\n }, {\n type: 'line',\n name: '去年通行费',\n showSymbol: true,\n color: '#FFDA81',\n smooth: true,\n data: this.barChartBLData2,\n areaStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: 'rgba(255, 218, 129,0.3)'\n }, {\n offset: 1,\n color: 'rgba(255, 218, 129,0)'\n }])\n }\n }]\n };\n this.barChartBLOption && this.barChartBL.setOption(this.barChartBLOption);\n window.addEventListener('resize', function () {\n return _this11.barChartBL.resize();\n });\n }\n },\n drawBarChartBR: function drawBarChartBR() {\n var _this12 = this;\n\n // chart 已存在则为更新数据\n if (this.barChartBR) {\n this.barChartBROption.series[0].data = this.barChartBRData1;\n this.barChartBROption.series[1].data = this.barChartBRData2;\n this.barChartBR.setOption(this.barChartBROption);\n } else {\n // chart 不存在则为初始化数据和图表\n this.barChartBR = echarts.init(document.getElementById('bar-chart-br'));\n this.barChartBROption = {\n dataset: {\n source: this.barChartBRData\n },\n legend: {\n show: true,\n textStyle: {\n color: '#fff'\n },\n itemHeight: 6,\n data: [{\n name: '今年',\n itemStyle: {\n color: '#FFDA81'\n }\n }, {\n name: '去年',\n itemStyle: {\n opacity: 0\n }\n }]\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n textStyle: {\n color: '#fff'\n },\n confine: true,\n position: 'bottom',\n valueFormatter: function valueFormatter(value) {\n return value + '辆';\n }\n },\n grid: [{\n top: '18%',\n left: '8%',\n right: '0',\n bottom: '12%'\n }],\n xAxis: {\n type: 'category',\n axisTick: {\n show: false,\n alignWithLabel: true\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)'\n },\n data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']\n },\n yAxis: {\n name: '单位(辆)',\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 20]\n },\n type: 'value',\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.6)',\n formatter: function formatter(val) {\n if (val >= 1 && parseInt(val, 10) === val || val == 0) {\n return val;\n } else {\n return;\n }\n }\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n type: 'bar',\n barWidth: 12,\n name: '今年',\n data: this.barChartBRData1,\n itemStyle: {\n borderRadius: [5, 5, 0, 0],\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: '#FFDA81'\n }, {\n offset: 0.6,\n color: '#6e6549'\n }, {\n offset: 1,\n color: 'rgba(110, 101, 73, 0.2)'\n }])\n }\n }, {\n type: 'line',\n name: '去年',\n showSymbol: false,\n color: '#FD9854',\n smooth: true,\n data: this.barChartBRData2\n }]\n };\n this.barChartBROption && this.barChartBR.setOption(this.barChartBROption);\n window.addEventListener('resize', function () {\n return _this12.barChartBR.resize();\n });\n }\n },\n // 统计图\n drawPieChart: function drawPieChart() {\n var _this13 = this;\n\n // chart 已存在则为更新数据\n if (this.PieChart) {\n this.PieOption.series[0].data = this.PieData;\n this.PieOption.legend.data = this.PieData;\n this.PieChart.setOption(this.PieOption);\n } else {\n // chart 不存在则为初始化数据和图表\n this.PieChart = echarts.init(document.getElementById('line-chart-right'));\n this.PieOption = {\n color: ['#198CFF', '#00D4FF', '#55EDB0', '#C9AC66'],\n title: {\n text: this.PieData[0].value + ' 辆',\n subtext: this.PieData[0].name,\n left: '36%',\n // top: '35%',\n textAlign: 'center',\n x: 'center',\n y: '33%',\n textStyle: {\n color: '#fff',\n fontSize: '18px' // lineHeight: 3,\n\n },\n subtextStyle: {\n color: '#fff',\n fontSize: '12px',\n align: 'center'\n }\n },\n tooltip: {\n trigger: 'item',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n },\n formatter: '{a}
{b} : {c}个 ({d}%)'\n },\n legend: {\n selectedMode: false,\n type: 'scroll',\n orient: 'vertical',\n right: 5,\n top: 18,\n bottom: 18,\n data: this.PieData,\n itemGap: 8,\n itemHeight: 9,\n itemWidth: 16,\n pageIconSize: 11,\n pageTextStyle: {\n color: '#ffffff',\n fontSize: 9\n },\n textStyle: {\n color: '#ffffff',\n fontSize: 9\n },\n pageIconColor: 'rgba(249, 248, 248, 1)'\n },\n series: [{\n name: '各类车辆通行统计',\n type: 'pie',\n radius: ['60%', '70%'],\n center: ['38%', '50%'],\n data: this.PieData,\n label: {\n show: false\n },\n itemStyle: {\n borderColor: '#0D1722',\n borderWidth: 4\n }\n }]\n };\n this.PieOption && this.PieChart.setOption(this.PieOption);\n window.addEventListener('resize', function () {\n return _this13.PieChart.resize();\n });\n this.intervalFaultPie();\n }\n\n this.PieChart.dispatchAction({\n type: 'highlight',\n seriesIndex: 0,\n dataIndex: this.PiecurIndex\n });\n },\n clear: function clear() {\n clearInterval(this.timer);\n },\n intervalFaultPie: function intervalFaultPie() {\n var _this14 = this;\n\n this.timer = setInterval(function () {\n _this14.PieChart.dispatchAction({\n type: 'downplay',\n seriesIndex: 0,\n dataIndex: _this14.PiecurIndex\n });\n\n _this14.PiecurIndex++;\n\n if (_this14.PiecurIndex >= _this14.PieData.length) {\n _this14.PiecurIndex = 0;\n }\n\n _this14.PieChart.dispatchAction({\n type: 'highlight',\n seriesIndex: 0,\n dataIndex: _this14.PiecurIndex\n }) // 故障统计跟随变化统计数量已经名称\n ;\n\n _this14.PieOption.title.text = _this14.PieData[_this14.PiecurIndex].value + ' 辆', _this14.PieOption.title.subtext = _this14.PieData[_this14.PiecurIndex].name, _this14.PieOption && _this14.PieChart.setOption(_this14.PieOption);\n }, 3000);\n },\n formatStatus: function formatStatus(status) {\n var label;\n\n if (status == 1) {\n label = '正常';\n } else if (status == 2) {\n label = '离线';\n } else if (status == 3) {\n label = '故障';\n }\n\n return label;\n },\n showTip: function showTip() {\n var a = this.month.replace(/\\b(0+)/gi, '') + '月';\n var b = this.month.replace(/\\b(0+)/gi, '');\n this.barChartBL && this.barChartBL.dispatchAction({\n type: 'showTip',\n seriesIndex: 0,\n dataIndex: b - 1,\n name: a\n });\n this.barChartBR && this.barChartBR.dispatchAction({\n type: 'showTip',\n seriesIndex: 0,\n dataIndex: b - 1,\n name: a\n });\n this.barChartT && this.barChartT.dispatchAction({\n type: 'showTip',\n seriesIndex: 0,\n dataIndex: b - 1,\n name: a\n });\n },\n // 重新渲染后隐藏 tooltip 和 axisPointer\n hide: function hide() {\n // 隐藏 tooltip\n this.barChartBL.dispatchAction({\n type: 'hideTip'\n });\n this.barChartBR.dispatchAction({\n type: 'hideTip'\n });\n this.barChartT.dispatchAction({\n type: 'hideTip'\n });\n }\n }\n};",null]}