{"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\\deviceMonitor.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\sfz-lh-fvue\\src\\views\\BigScreen\\deviceMonitor.vue","mtime":1715713737010},{"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.array.sort\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport _defineProperty from \"D:/jenkins/workspace/sfz-lh-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 * 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 name: 'deviceMonitor',\n data: function data() {\n var _ref;\n\n return _ref = {\n test: [],\n utils: utils,\n loadingColor: 'rgba(6, 46, 106, 0.01)',\n pageQuery: {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n },\n thisMenuValue: '',\n totalAmount: '',\n EquipmentCountData: [],\n statusData: [],\n // 设备系统分布数据\n SystemData: [// {\n // name: '',\n // amount: 0,\n // systemType: 4,\n // imgUrl: require('../../assets/img/bigScreen/icon-power.png'),\n // },\n {\n name: '',\n amount: 0,\n systemType: 2,\n // imgUrl: require('../../assets/img/bigScreen/icon-electromechanical.png'),\n imgUrl: require(\"../../assets/img/bigScreen/icon-power.png\")\n }, {\n name: '',\n amount: 0,\n systemType: 1,\n imgUrl: require(\"../../assets/img/bigScreen/icon-platform.png\")\n }, {\n name: '',\n amount: 0,\n systemType: 3,\n imgUrl: require(\"../../assets/img/bigScreen/icon-monitor.png\")\n }, {\n name: '',\n amount: 0,\n systemType: 4,\n imgUrl: require(\"../../assets/img/bigScreen/icon-charge.png\")\n }],\n systemType: [],\n // 故障维修数据\n ServiceData: [],\n state: [],\n // 设备类型数据\n pieChart: null,\n deviceType: [],\n pieData: [],\n pieOption: null,\n // 故障统计数据\n faultPieChart: null,\n level: [],\n faultPieData: [],\n faultPieOption: null,\n curIndex: 0,\n faultPiecurIndex: 0,\n // 故障分析数据\n analysisChartOptionSource: null,\n analysisChartResource: null,\n analysisChartDataResource: [{\n name: '17.47',\n value: ['17.47', 60]\n }, {\n name: '17.47',\n value: ['17.47', 50]\n }, {\n name: '17.47',\n value: ['17.47', 55]\n }, {\n name: '17.47',\n value: ['17.47', 48]\n }, {\n name: '17.47',\n value: ['17.47', 56]\n }, {\n name: '17.47',\n value: ['17.47', 43]\n }],\n // 巡检数据\n scrollheader: [{\n name: '序号',\n width: '4%'\n }, {\n name: '巡检人员',\n width: '24%'\n }, {\n name: '内容',\n width: '24%'\n }, {\n name: '状态',\n width: '24%'\n }, {\n name: '时间',\n width: '24%'\n }],\n scrollListData: [],\n // 设备状态\n scrollHeaderDeviceStatus: [{\n name: '序号',\n width: '5%'\n }, {\n name: '编码',\n width: '19%'\n }, {\n name: '名称',\n width: '19%'\n }, {\n name: '类型',\n width: '19%'\n }, {\n name: '位置',\n width: '19%'\n }, {\n name: '状态',\n width: '19%'\n }],\n scrollHeaderDeviceStatusList: [],\n loadObj: {\n warnInfoData: false,\n scrollHeaderDeviceStatusList: false,\n scrollListData: false,\n faultPieData: false,\n pieData: false,\n barChartDeviceData: false,\n raderChart: false\n }\n }, _defineProperty(_ref, \"loadingColor\", 'rgba(6, 46, 106, 0.01)'), _defineProperty(_ref, \"warnData\", {\n num: 0,\n finished: 0,\n unfinished: 0\n }), _defineProperty(_ref, \"rateData\", [{\n name: '设备在线率',\n value: 0\n }, {\n name: '设备离线率',\n value: 0\n }, {\n name: '设备故障率',\n value: 0\n }, {\n name: '故障处置率',\n value: 0\n } // {\n // name: '维修及时率',\n // value: 0,\n // },\n ]), _defineProperty(_ref, \"warnInfoData\", []), _defineProperty(_ref, \"isOne\", 1), _defineProperty(_ref, \"isTwo\", 2), _defineProperty(_ref, \"isThree\", 3), _defineProperty(_ref, \"isFour\", 4), _defineProperty(_ref, \"analysis\", {\n data: ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'],\n value: []\n }), _defineProperty(_ref, \"monthLogNum\", ''), _defineProperty(_ref, \"lastmonthLogNum\", ''), _defineProperty(_ref, \"qoq\", ''), _defineProperty(_ref, \"direction\", true), _defineProperty(_ref, \"params\", {}), _defineProperty(_ref, \"tollStationId\", ''), _defineProperty(_ref, \"barChartDevice\", null), _defineProperty(_ref, \"barDeviceHitchSeriesData\", []), _defineProperty(_ref, \"barDeviceHitchYAxisData\", []), _defineProperty(_ref, \"raderChart\", null), _defineProperty(_ref, \"raderChartOptionSource\", null), _defineProperty(_ref, \"raderIndicatorData\", []), _defineProperty(_ref, \"raderSeriesData\", []), _defineProperty(_ref, \"loadingColor\", 'rgba(6, 46, 106, 0.01)'), _ref;\n },\n computed: {\n optionSingleHeightTime: function optionSingleHeightTime() {\n return {\n step: 0.3,\n limitMoveNum: 1,\n // 开始无缝滚动的数据量 this.dataList.length\n openWatch: true // 开启数据实时监控刷新dom\n\n };\n }\n },\n mounted: function mounted() {},\n activated: function activated() {\n // 组件keepalive 页面显示时重新加载数据\n this.getData();\n },\n methods: {\n initData: function initData() {\n var _this = this;\n\n this.pieData = [];\n this.faultPieData = [];\n this.EquipmentCountData = [];\n this.statusData = utils.getDictItemsFromCache('sbzt');\n this.statusData.forEach(function (item) {\n _this.EquipmentCountData.push({\n amount: 0,\n name: item.name,\n status: item.value\n });\n });\n this.systemType = utils.getDictItemsFromCache('xtly');\n this.systemType.forEach(function (item) {\n for (var i = 0; i < _this.SystemData.length; i++) {\n if (_this.SystemData[i].systemType == item.sequence) _this.SystemData[i].name = item.name;\n }\n });\n this.deviceType = utils.getDictItemsFromCache('sblx');\n this.deviceType.forEach(function (item) {\n _this.pieData.push({\n value: 0,\n name: item.name,\n deviceType: item.sequence\n });\n });\n this.level = utils.getDictItemsFromCache('gzjb');\n this.level.forEach(function (item) {\n _this.faultPieData.push({\n value: 0,\n name: item.name,\n level: item.sequence\n });\n });\n this.state = utils.getDictItemsFromCache('wxzt');\n this.state.forEach(function (item) {\n _this.ServiceData.push({\n value: 0,\n name: item.name,\n state: item.sequence\n });\n });\n this.barDeviceHitchYAxisData = [];\n this.barDeviceHitchSeriesData = [];\n this.raderIndicatorData = [];\n this.raderSeriesData = [];\n },\n getData: function getData() {\n this.tollStationId = sessionStorage.getItem('tollStationId');\n this.initData();\n this.getDeviceStatusData();\n this.getAmonutData();\n this.getSystemData();\n this.getTypeData();\n this.getRateData();\n this.getStatisticsData(); // this.getAnalysisData()\n\n this.getRepairData();\n this.getWarnInfo();\n this.getInspectLog();\n this.getHitchLogData();\n this.getHandleTime();\n },\n // 设备类型图\n drawPieChart: function drawPieChart() {\n var _this2 = this;\n\n this.pieData.forEach(function (i) {\n i.name = i.name + '--' + i.value + '个';\n }); // chart 已存在则为更新数据\n\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('section3-pie-chart'));\n this.pieOption = {\n title: {\n text: this.pieData[0].value + ' 个',\n subtext: this.pieData[0].name.split('--')[0],\n left: '30%',\n x: 'center',\n y: '38%',\n textAlign: 'center',\n textStyle: {\n color: '#fff',\n fontSize: '20px',\n lineHeight: 5\n },\n subtextStyle: {\n color: '#fff',\n fontSize: '12px'\n }\n },\n // color: ['#699BFF', '#F4DE79'],\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 type: 'scroll',\n orient: 'vertical',\n right: -3,\n top: 5,\n bottom: 5,\n data: this.pieData,\n itemGap: 8,\n itemWidth: 16,\n itemHeight: 8,\n pageIconSize: 11,\n pageTextStyle: {\n color: '#ffffff',\n fontSize: 10\n },\n textStyle: {\n color: '#ffffff',\n fontSize: 10\n },\n pageIconColor: 'rgba(249, 248, 248, 1)'\n },\n series: [{\n name: '设备类型',\n type: 'pie',\n radius: ['77%', '94%'],\n center: ['32%', '50%'],\n data: this.pieData,\n label: {\n show: false\n },\n itemStyle: {\n borderColor: '#050B12',\n borderWidth: 2\n }\n }]\n };\n this.pieOption && this.pieChart.setOption(this.pieOption);\n window.addEventListener('resize', function () {\n return _this2.pieChart.resize();\n });\n this.intervalPie();\n }\n\n this.pieChart.dispatchAction({\n type: 'highlight',\n seriesIndex: 0,\n dataIndex: this.curIndex\n });\n },\n // 故障统计图\n drawfaultPieChart: function drawfaultPieChart() {\n var _this3 = this;\n\n // chart 已存在则为更新数据\n if (this.faultPieChart) {\n this.faultPieOption.series[0].data = this.faultPieData;\n this.faultPieChart.setOption(this.faultPieOption);\n } else {\n // chart 不存在则为初始化数据和图表\n this.faultPieChart = echarts.init(document.getElementById('section4-pie-chart'));\n this.faultPieOption = {\n title: {\n text: this.faultPieData[0].value + ' 个',\n subtext: this.faultPieData[0].name,\n x: 'center',\n y: '38%',\n textStyle: {\n color: '#fff',\n fontSize: '20px',\n lineHeight: 5\n },\n subtextStyle: {\n color: '#fff',\n fontSize: '12px'\n }\n },\n color: ['#F35675', '#FF884D', '#F4DE79', '#699BFF'],\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 series: [{\n name: '故障统计',\n type: 'pie',\n radius: ['77%', '94%'],\n center: ['50%', '50%'],\n data: this.faultPieData,\n label: {\n show: false\n },\n itemStyle: {\n borderColor: '#0D1722',\n borderWidth: 4\n }\n }]\n };\n this.faultPieOption && this.faultPieChart.setOption(this.faultPieOption);\n window.addEventListener('resize', function () {\n return _this3.faultPieChart.resize();\n });\n this.intervalFaultPie();\n }\n\n this.faultPieChart.dispatchAction({\n type: 'highlight',\n seriesIndex: 0,\n dataIndex: this.faultPiecurIndex\n });\n },\n intervalPie: function intervalPie() {\n var _this4 = this;\n\n setInterval(function () {\n _this4.pieChart.dispatchAction({\n type: 'downplay',\n seriesIndex: 0,\n dataIndex: _this4.curIndex\n });\n\n _this4.curIndex++;\n\n if (_this4.curIndex >= _this4.pieData.length) {\n _this4.curIndex = 0;\n }\n\n _this4.pieChart.dispatchAction({\n type: 'highlight',\n seriesIndex: 0,\n dataIndex: _this4.curIndex\n });\n }, 3000);\n },\n intervalFaultPie: function intervalFaultPie() {\n var _this5 = this;\n\n setInterval(function () {\n _this5.faultPieChart.dispatchAction({\n type: 'downplay',\n seriesIndex: 0,\n dataIndex: _this5.faultPiecurIndex\n });\n\n _this5.faultPiecurIndex++;\n\n if (_this5.faultPiecurIndex >= _this5.faultPieData.length) {\n _this5.faultPiecurIndex = 0;\n }\n\n _this5.faultPieChart.dispatchAction({\n type: 'highlight',\n seriesIndex: 0,\n dataIndex: _this5.faultPiecurIndex\n }); // 故障统计跟随变化统计数量已经名称\n\n\n _this5.faultPieOption.title.text = _this5.faultPieData[_this5.faultPiecurIndex].value + ' 个';\n _this5.faultPieOption.title.subtext = _this5.faultPieData[_this5.faultPiecurIndex].name;\n _this5.faultPieOption && _this5.faultPieChart.setOption(_this5.faultPieOption);\n _this5.pieOption.title.text = _this5.pieData[_this5.faultPiecurIndex].value + ' 个';\n _this5.pieOption.title.subtext = _this5.pieData[_this5.faultPiecurIndex].name.split('--')[0];\n _this5.pieOption && _this5.pieChart.setOption(_this5.pieOption);\n }, 3000);\n },\n // 故障分析折线图\n drawanalysisChartResource: function drawanalysisChartResource() {\n var _this6 = this;\n\n // chart 已存在则为更新数据\n if (this.analysisChartResource) {\n this.analysisChartOptionSource.series[0].data = this.analysis.data;\n this.analysisChartResource.setOption(this.analysisChartOptionSource);\n } else {\n var _tooltip;\n\n // chart 不存在则为初始化数据和图表\n this.analysisChartResource = echarts.init(document.getElementById('analysis-chart'));\n this.analysisChartOptionSource = {\n // dataset: {\n // source: this.analysisChartDataResource,\n // },\n color: ['#00FFFF'],\n tooltip: (_tooltip = {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n }\n }, _defineProperty(_tooltip, \"confine\", true), _defineProperty(_tooltip, \"position\", 'bottom'), _defineProperty(_tooltip, \"formatter\", '故障分析
' + '{b} : {c}'), _tooltip),\n grid: [{\n top: '18%',\n left: '10%',\n right: '6%',\n bottom: '20%'\n }],\n xAxis: {\n type: 'category',\n axisTick: {\n show: false\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 fontSize: 12,\n padding: 2\n },\n splitLine: {\n show: true,\n lineStyle: {\n type: 'dashed',\n color: 'rgba(255,255,255,0.05)'\n }\n },\n data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']\n },\n yAxis: {\n // max: 100,\n // min: 0,\n // interval: 25,\n nameTextStyle: {\n color: 'rgba(255,255,255,0.6)',\n padding: [0, 0, 0, 8]\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 fontSize: 12,\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: true,\n lineStyle: {\n type: 'dashed',\n color: 'rgba(255,255,255,0.05)'\n }\n }\n },\n series: [{\n type: 'line',\n showBackground: true,\n smooth: true,\n symbol: 'none',\n data: this.analysis.data\n }]\n };\n this.analysisChartOptionSource && this.analysisChartResource.setOption(this.analysisChartOptionSource);\n window.addEventListener('resize', function () {\n return _this6.analysisChartResource.resize();\n });\n }\n },\n // 获取本月\n getDate: function getDate() {\n var currentDate = new Date();\n var currentMonth = currentDate.getMonth() + 1;\n\n for (var i = 0; i < this.analysis.value.length; i++) {\n if (this.analysis.value[i].month == currentMonth) {\n this.monthLogNum = this.analysis.value[i].amount;\n }\n\n if (this.analysis.value[i].month == currentMonth - 1) {\n this.lastmonthLogNum = this.analysis.value[i].amount;\n }\n }\n\n if (this.monthLogNum >= this.lastmonthLogNum) {\n this.qoq = (this.monthLogNum - this.lastmonthLogNum) / this.lastmonthLogNum * 100;\n this.direction = true;\n } else {\n this.qoq = (this.lastmonthLogNum - this.monthLogNum) / this.lastmonthLogNum * 100;\n this.direction = false;\n }\n },\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 // 获取设备数据\n getAmonutData: function getAmonutData() {\n var _this7 = this;\n\n var params = {\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 commonAPI.getDeviceAmonut(params).then(function (res) {\n if (res.value) {\n res.value.forEach(function (item) {\n if (item) {\n if (item.status && item.status !== undefined) for (var i = 0; i < _this7.EquipmentCountData.length; i++) {\n if (_this7.EquipmentCountData[i].status == item.status) _this7.EquipmentCountData[i].amount = item.amount;\n }\n\n if (item.totalAmount && item.totalAmount !== undefined) {\n _this7.totalAmount = item.totalAmount;\n }\n }\n });\n }\n });\n },\n // 获取系统分布\n getSystemData: function getSystemData() {\n var _this8 = this;\n\n commonAPI.getDeviceBySystem(this.tollStationId, this.pageQuery).then(function (res) {\n if (res.value) {\n res.value.forEach(function (item) {\n if (item) {\n if (item.systemType && item.systemType !== undefined) for (var i = 0; i < _this8.SystemData.length; i++) {\n if (_this8.SystemData[i].systemType == item.systemType) _this8.SystemData[i].amount = item.amount;\n }\n }\n });\n }\n });\n },\n // 获取设备类型\n getTypeData: function getTypeData() {\n var _this9 = this;\n\n this.loadObj.pieData = true;\n commonAPI.getDeviceByType(this.tollStationId, this.pageQuery).then(function (res) {\n if (res.value) {\n res.value.forEach(function (item) {\n if (item) {\n if (item.deviceType && item.deviceType !== undefined) for (var i = 0; i < _this9.pieData.length; i++) {\n if (_this9.pieData[i].deviceType == item.deviceType) _this9.pieData[i].value = item.amount;\n }\n }\n });\n }\n }).finally(function () {\n _this9.loadObj.pieData = false;\n\n _this9.drawPieChart();\n });\n },\n // 获取设备率\n getRateData: function getRateData() {\n var _this10 = this;\n\n commonAPI.getDeviceRate(this.tollStationId, this.pageQuery).then(function (res) {\n var reg = /^(.*\\..{2}).*$/;\n\n if (res.value) {\n res.value.forEach(function (item) {\n if (item) {\n if (item.offlineRate && item.offlineRate !== undefined) {\n var number = item.offlineRate * 100;\n number = String(number).replace(reg, '$1');\n _this10.rateData[1].value = number;\n }\n\n if (item.errorRate && item.errorRate !== undefined) {\n var number2 = item.errorRate * 100;\n number2 = String(number2).replace(reg, '$1');\n _this10.rateData[2].value = number2;\n }\n\n if (item.onlineRate && item.onlineRate !== undefined) {\n var number3 = item.onlineRate * 100;\n number3 = String(number3).replace(reg, '$1');\n _this10.rateData[0].value = number3;\n }\n\n if (item.disposeRate && item.disposeRate !== undefined) {\n var number4 = item.disposeRate * 100;\n number4 = String(number4).replace(reg, '$1');\n _this10.rateData[3].value = number4;\n } // if (\n // item.timeRate &&\n // item.timeRate !== undefined\n // ) {\n // let number5 = item.timeRate * 100\n // number5 = String(number5).replace(reg, '$1')\n // this.rateData[4].value = number5\n // }\n\n\n if (item.totalAmount && item.totalAmount !== undefined) {\n _this10.warnData.num = item.totalAmount;\n }\n\n if (item.status !== undefined) {\n if (item.status == 1) {\n _this10.warnData.finished = item.amount;\n } else {\n _this10.warnData.unfinished = item.amount;\n }\n }\n }\n });\n }\n });\n },\n // 获取故障统计\n getStatisticsData: function getStatisticsData() {\n var _this11 = this;\n\n this.loadObj.faultPieData = true;\n commonAPI.gethitchStatistics(this.tollStationId, this.pageQuery).then(function (res) {\n if (res.value) {\n res.value.forEach(function (item) {\n if (item) {\n if (item.level && item.level !== undefined) {\n for (var i = 0; i < _this11.faultPieData.length; i++) {\n if (_this11.faultPieData[i].level == item.level) _this11.faultPieData[i].value = item.amount;\n }\n }\n }\n });\n }\n }).finally(function () {\n _this11.loadObj.faultPieData = false;\n\n _this11.drawfaultPieChart();\n });\n },\n // 获取故障分析\n getAnalysisData: function getAnalysisData() {\n var _this12 = this;\n\n commonAPI.gethitchAnalysis(this.tollStationId, this.pageQuery).then(function (res) {\n if (res.value) {\n _this12.analysis.value = res.value;\n res.value.forEach(function (item) {\n if (item) {\n for (var i = 0; i < _this12.analysis.data.length; i++) {\n if (i == item.month - 1) {\n _this12.analysis.data[i] = item.amount;\n }\n }\n }\n });\n\n _this12.drawanalysisChartResource();\n\n _this12.getDate();\n }\n });\n },\n // 获取维修情况\n getRepairData: function getRepairData() {\n var _this13 = this;\n\n commonAPI.gethitchRepair(this.tollStationId, this.pageQuery).then(function (res) {\n if (res.value) {\n res.value.forEach(function (item) {\n if (item) {\n if (item.state && item.state !== undefined) for (var i = 0; i < _this13.state.length; i++) {\n if (_this13.ServiceData[i].state == item.state) _this13.ServiceData[i].value = item.amount;\n }\n }\n });\n }\n });\n },\n // 获取预警信息\n getWarnInfo: function getWarnInfo() {\n var _this14 = this;\n\n this.loadObj.warnInfoData = true;\n this.warnInfoData = [];\n commonAPI.getWarnInfo(this.pageQuery).then(function (res) {\n if (res.value) {\n _this14.warnInfoData = res.value.rows;\n\n _this14.warnInfoData.push([]);\n }\n }).finally(function () {\n _this14.loadObj.warnInfoData = false;\n });\n },\n // 获取巡检动态数据\n getInspectLog: function getInspectLog() {\n var _this15 = this;\n\n commonAPI.getInspectLog(this.tollStationId, this.pageQuery).then(function (res) {\n if (res.value) {\n for (var i = 0; i < res.value.rows.length; i++) {\n var obj = {};\n obj = {\n id: i + 1,\n name: res.value.rows[i].inspectUserName,\n work: res.value.rows[i].inspectContent,\n status: res.value.rows[i].state,\n time: res.value.rows[i].inspectDate\n };\n\n _this15.scrollListData.push(obj);\n }\n }\n });\n },\n // 设备状态数据\n getDeviceStatusData: function getDeviceStatusData() {\n var _this16 = this;\n\n this.loadObj.scrollHeaderDeviceStatusList = true;\n this.scrollHeaderDeviceStatusList = [];\n commonAPI.getDeviceStatus().then(function (res) {\n if (res.value && res.value.rows) {\n _this16.scrollHeaderDeviceStatusList = res.value.rows;\n }\n }).finally(function () {\n _this16.loadObj.scrollHeaderDeviceStatusList = false;\n });\n },\n // 获取故障排名数据\n getHitchLogData: function getHitchLogData() {\n var _this17 = this;\n\n this.loadObj.barChartDeviceData = true;\n var deviceType = utils.getDictItemsFromCache('sblx');\n var hitchData = [];\n commonAPI.getHitchLog(this.tollStationId).then(function (res) {\n var resp = res.value;\n deviceType.forEach(function (item) {\n resp.forEach(function (i) {\n if (i.type == item.value) {\n hitchData.push({\n name: item.name,\n value: i.amount\n });\n }\n });\n });\n hitchData.sort(function (a, b) {\n a.value - b.value;\n });\n hitchData.forEach(function (i) {\n _this17.barDeviceHitchYAxisData.push(i.name);\n\n _this17.barDeviceHitchSeriesData.push(i.value);\n });\n }).finally(function () {\n _this17.drawBarChartDevice();\n\n _this17.loadObj.barChartDeviceData = false;\n });\n },\n // 图形设备故障排名\n drawBarChartDevice: function drawBarChartDevice() {\n var _this18 = this;\n\n // chart 已存在则为更新数据\n if (this.barChartDevice) {\n this.barChartDeviceOption.series[0].data = this.barDeviceHitchSeriesData;\n this.barChartDeviceOption.yAxis.data = this.barDeviceHitchYAxisData;\n this.barChartDevice.setOption(this.barChartDeviceOption);\n } else {\n // chart 不存在则为初始化数据和图表\n this.barChartDevice = echarts.init(document.getElementById('bar-chart-Device'));\n this.barChartDeviceOption = {\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: '3%',\n left: '22%',\n right: '8%',\n bottom: '3%'\n }],\n xAxis: {\n type: 'value',\n show: false\n },\n yAxis: {\n type: 'category',\n data: this.barDeviceHitchYAxisData,\n axisLabel: {\n show: true,\n color: 'rgba(255,255,255,0.8)'\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#808080'\n }\n },\n splitLine: {\n show: false\n }\n },\n series: [{\n type: 'bar',\n barWidth: 12,\n data: this.barDeviceHitchSeriesData,\n label: {\n normal: {\n show: true,\n position: 'right',\n formatter: '{c}',\n textStyle: {\n color: '#fff'\n }\n }\n },\n itemStyle: {\n borderRadius: [0, 5, 5, 0],\n color: new echarts.graphic.LinearGradient(1, 0, 0, 1, [{\n offset: 0,\n color: '#8AC4FF'\n }, {\n offset: 0.6,\n color: '#135f88'\n }, {\n offset: 1,\n color: 'rgba(19, 94, 134, 0.2)'\n }])\n }\n }]\n };\n this.barChartDeviceOption && this.barChartDevice.setOption(this.barChartDeviceOption);\n window.addEventListener('resize', function () {\n return _this18.barChartDevice.resize();\n });\n }\n },\n // 故障平均处理时间\n getHandleTime: function getHandleTime() {\n var _this19 = this;\n\n this.loadObj.raderChart = true;\n var deviceType = utils.getDictItemsFromCache('sblx');\n commonAPI.getHandleTime(this.tollStationId).then(function (res) {\n var resp = res.value;\n deviceType.forEach(function (item) {\n resp.forEach(function (i) {\n if (item.value == i.type) {\n _this19.raderIndicatorData.push({\n text: item.name\n });\n\n _this19.raderSeriesData.push(i.handleHours);\n }\n });\n });\n }).finally(function () {\n _this19.loadObj.raderChart = false;\n\n _this19.drawRaderChartTime();\n });\n },\n // 故障平均处理时间图形\n drawRaderChartTime: function drawRaderChartTime() {\n var _this20 = this;\n\n // chart 已存在则为更新数据\n if (this.raderChart) {\n this.raderChartOptionSource.radar[0].indicator = this.raderIndicatorData;\n this.raderChartOptionSource.series[0].data[0].value = this.raderSeriesData;\n this.raderChart.setOption(this.raderChartOptionSource);\n } else {\n var _tooltip2;\n\n // chart 不存在则为初始化数据和图表\n this.raderChart = echarts.init(document.getElementById('rader-chart-time'));\n this.raderChartOptionSource = {\n color: ['#00FFFF'],\n tooltip: (_tooltip2 = {\n trigger: 'axis',\n backgroundColor: 'rgba(13, 79, 145, 0.9)',\n borderColor: '#3399FF',\n confine: true,\n textStyle: {\n color: '#fff'\n }\n }, _defineProperty(_tooltip2, \"confine\", true), _defineProperty(_tooltip2, \"position\", 'bottom'), _tooltip2),\n radar: [{\n indicator: this.raderIndicatorData,\n center: ['50%', '50%'],\n radius: 70,\n axisLine: {\n lineStyle: {\n color: '#84bff9'\n }\n },\n splitLine: {\n lineStyle: {\n color: '#325d88'\n }\n },\n splitArea: {\n areaStyle: {\n color: ['rgba(0, 35, 67, 0.8)']\n }\n }\n }],\n series: [{\n type: 'radar',\n tooltip: {\n trigger: 'item'\n },\n areaStyle: {\n color: 'rgba(77, 144, 194, 1)'\n },\n data: [{\n value: this.raderSeriesData,\n name: '故障平均处理时间(小时)'\n }]\n }]\n };\n this.raderChartOptionSource && this.raderChart.setOption(this.raderChartOptionSource);\n window.addEventListener('resize', function () {\n return _this20.raderChart.resize();\n });\n }\n }\n }\n};",null]}