{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\bigScreen\\maintenanceInspectionStatisticsAI.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\bigScreen\\maintenanceInspectionStatisticsAI.vue","mtime":1706175429225},{"path":"D:\\jenkins\\workspace\\yhxt-web\\babel.config.js","mtime":1667326389982},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.number.constructor\";\nimport \"core-js/modules/es6.regexp.split\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 _utils from '@/utils.js';\nimport orgData from \"./orgData.json\";\nimport utils from '@/utils'; // thousandBit格式化千分位\nvar BigNumber = require('bignumber.js');\nimport * as echarts from 'echarts';\nimport Title from \"./components/Title.vue\";\nexport default {\n name: 'maintenanceInspectionStatisticsAI',\n components: {\n Title: Title\n },\n data: function data() {\n return {\n nowDate: null,\n options: orgData.list,\n year: new Date().getFullYear(),\n mouth: new Date().getMonth(),\n tableData: [],\n data: [],\n loading: false,\n total: {},\n utils: utils,\n searchForm: {},\n cissueDate: '',\n pickerOption: {\n disabledDate: function disabledDate(time) {\n return time.getTime() > Date.now();\n }\n }\n };\n },\n created: function created() {\n var endDate = utils.formatDate(new Date()).split(' ')[0];\n // 获取当前时间6个月前的时间\n var startDate = this.diffMonth(6).split(' ')[0];\n this.date = [startDate, endDate];\n this.loadData();\n },\n mounted: function mounted() {\n var _this = this; // 声明一个变量指向Vue实例this,保证作用域一致\n this.timer = setInterval(function () {\n _this.nowDate = _utils.formatDate(new Date()); //修改数据date\n }, 1000);\n },\n methods: {\n handleCascaderChange: function handleCascaderChange(val) {},\n handleTimeChange: function handleTimeChange() {},\n back: function back() {\n this.$router.go(-1);\n },\n /**\r\n * @description: 获取当前日期n个月前的日期\r\n * @param {String} n 几个月(为负数则表示前面的日期)\r\n * @return: 日期\r\n */\n diffMonth: function diffMonth(n) {\n var dt = new Date();\n dt.setMonth(dt.getMonth() - Number(n));\n return dt.toLocaleString().replace(/\\//g, '-');\n },\n calculation: function calculation(key, arr) {\n if (!key || arr.length === 0) return 0;\n var total = new BigNumber(0);\n arr.forEach(function (item) {\n if (!item[key]) {\n item[key] = 0;\n }\n // console.log(key + '=', item[key])\n total = total.plus(item[key]);\n });\n if (typeof total == 'undefined') return 0;\n return total.toNumber();\n },\n handleReset: function handleReset() {\n var length = this.data.length - 1;\n if (length === 0) return;\n this.tableData = this.data[this.data.length - 2];\n this.data.splice(length, 1);\n },\n hanldeRowClick: function hanldeRowClick(row) {\n if (row.chirldren.length == 0 && row.roadSegmentId) {\n return this.$router.push({\n name: this.pathName,\n params: {\n value: row,\n type: this.type\n }\n });\n }\n this.tableData = row.chirldren;\n this.data.push(row.chirldren);\n },\n handleCellClick: function handleCellClick(row, column) {\n if (column.columnKey == '1' || column.columnKey == '3' || column.columnKey == '4') {\n this.type = column.columnKey;\n this.pathName = 'roadsideFacilitiesManagement';\n } else {\n this.pathName = column.columnKey;\n }\n },\n updata: function updata(newVal) {\n this.total.name = '总数';\n this.total.bridgeCount = this.calculation('bridgeCount', newVal);\n this.total.allCount = this.calculation('allCount', newVal);\n this.total.bridgeCheckCount = this.calculation('bridgeCheckCount', newVal);\n this.total.bridgeMonthCheckCount = this.calculation('bridgeMonthCheckCount', newVal);\n this.total.culvertMonthCheckCount = this.calculation('culvertMonthCheckCount', newVal);\n this.total.culvertCount = this.calculation('culvertCount', newVal);\n this.total.culvertCheckCount = this.calculation('culvertCheckCount', newVal);\n this.total.sideCount = this.calculation('sideCount', newVal);\n this.total.sideCheckCount = this.calculation('sideCheckCount', newVal);\n this.total.sideMonthCheckCount = this.calculation('sideMonthCheckCount', newVal);\n this.total.tunnelCount = this.calculation('tunnelCount', newVal);\n this.total.tunnelCheckCount = this.calculation('tunnelCheckCount', newVal);\n this.total.tunnelMonthCheckCount = this.calculation('tunnelMonthCheckCount', newVal);\n },\n loadData: function loadData(params) {\n var _this2 = this;\n if (!params) {\n params = '';\n }\n this.loading = true;\n this.$http.get('${yhxt}/bridgeOftenCheck/v1/checkReportVoAI' + params).then(function (res) {\n _this2.tableData = res && res.status == 200 && res.data || [];\n _this2.updata(_this2.tableData);\n _this2.tableData.push(_this2.total);\n _this2.data = [];\n _this2.data.push(_this2.tableData);\n _this2.loading = false;\n _this2.pieCharts(_this2.total);\n _this2.cloumnCharts(_this2.tableData);\n }).catch(function () {\n _this2.loading = false;\n });\n },\n // 去首页\n goIndex: function goIndex() {\n window.location.href = 'http://183.64.175.153:20003/#/business';\n },\n //退出系统\n handleLogout: function handleLogout() {\n var _this3 = this;\n this.$store.dispatch('menu/clearMenus');\n this.$store.dispatch('user/clearUser');\n this.$store.dispatch('menu/setCopyMenus', []); //菜单\n var loginRouthPath = localStorage.getItem(this.$store.state.login.currentUser.account + 'loginRoutePath') || '/login';\n this.$store.dispatch('login/logoutAndCleanUp').then(function () {\n switch (window.ssoConfig.mode) {\n case 'cas':\n case 'oauth':\n window.sessionStorage.removeItem('currentUser');\n window.location.href = window.ssoConfig.logout + '?service=' + window.location.href.split('?')[0];\n break;\n default:\n _this3.$router.push({\n path: loginRouthPath\n });\n break;\n }\n });\n },\n pieCharts: function pieCharts(obj) {\n var chartDom = document.getElementById('pie');\n var myChart = echarts.init(chartDom);\n var data = [{\n name: '结构物总数',\n value: obj.allCount || 0\n }, {\n name: '桥梁总数',\n value: obj.bridgeCount || 0\n }, {\n name: '桥梁检查总数',\n value: obj.bridgeCheckCount || 0\n }, {\n name: '桥梁本月检查总数',\n value: obj.bridgeMonthCheckCount || 0\n }, {\n name: '涵洞总数',\n value: obj.culvertCount || 0\n }, {\n name: '涵洞检查总数',\n value: obj.culvertCheckCount || 0\n }, {\n name: '涵洞本月检查总数',\n value: obj.culvertMonthCheckCount || 0\n }, {\n name: '边坡总数',\n value: obj.sideCount || 0\n }, {\n name: '边坡检查总数',\n value: obj.sideCheckCount || 0\n }, {\n name: '边坡本月检查总数',\n value: obj.sideMonthCheckCount || 0\n }, {\n name: '隧道总数',\n value: obj.tunnelCount || 0\n }, {\n name: '隧道检查总数',\n value: obj.tunnelCheckCount || 0\n }, {\n name: '隧道本月检查总数',\n value: obj.tunnelMonthCheckCount || 0\n }];\n var option;\n var total = new BigNumber(0);\n data.forEach(function (item) {\n total = total.plus(item.value);\n });\n // let formatNumber = num =>\n // num.toString().replace(/(?=(\\B)(\\d{3})+$)/g, ',')\n option = {\n // title: [\n // {\n // text: `{name|总数量}\\n{val|${this.utils.thousandBit(total)}}`,\n // top: 'center',\n // left: 'center',\n // textStyle: {\n // rich: {\n // name: {\n // fontSize: 14,\n // color: '#fff',\n // padding: [10, 0]\n // },\n // val: {\n // fontSize: 32,\n // fontWeight: 'bold',\n // color: '#fff'\n // }\n // }\n // }\n // }\n // ],\n tooltip: {\n trigger: 'item',\n formatter: function formatter(a) {\n return \"\".concat(a.marker, \" \").concat(a.data.name, \" \").concat(a.data.value, \"\\u4E2A \").concat(a.percent, \"%\");\n }\n },\n color: ['#5b8ff9', '#5ad8a6', '#5d7092', '#f6bd16', '#6f5ef9', '#6dc8ec', '#945fb9', '#ff9845', '#1e9493'],\n legend: {\n icon: 'circle',\n orient: 'vertical',\n right: 50,\n top: 'center',\n bottom: 20,\n textStyle: {\n color: '#ccc'\n }\n },\n series: [{\n type: 'pie',\n radius: ['50%', '78%'],\n center: ['40%', '50%'],\n data: data,\n label: {\n // alignTo: 'edge',\n formatter: function formatter(a) {\n return \"{percent|\".concat(a.percent, \"%}\");\n },\n rich: {\n percent: {\n fontSize: 15,\n color: '#fff'\n }\n }\n }\n }]\n };\n option && myChart.setOption(option);\n },\n cloumnCharts: function cloumnCharts(data) {\n var _legend;\n console.log(data);\n data = data.slice(0, 4);\n var chartDom = document.getElementById('column');\n var myChart = echarts.init(chartDom);\n var option;\n var xData = [];\n var seriesData = [];\n for (var i = 0; i < 13; i++) {\n seriesData[i] = [];\n }\n data.forEach(function (item) {\n xData.push(item.name);\n seriesData[0].push(item.allCount);\n seriesData[1].push(item.bridgeCount);\n seriesData[2].push(item.bridgeCheckCount);\n seriesData[3].push(item.bridgeMonthCheckCount);\n seriesData[4].push(item.culvertCount);\n seriesData[5].push(item.culvertCheckCount);\n seriesData[6].push(item.culvertMonthCheckCount);\n seriesData[7].push(item.sideCount);\n seriesData[8].push(item.sideCheckCount);\n seriesData[9].push(item.sideMonthCheckCount);\n seriesData[10].push(item.tunnelCount);\n seriesData[11].push(item.tunnelCheckCount);\n seriesData[12].push(item.tunnelMonthCheckCount);\n });\n option = {\n title: {\n textStyle: {\n color: '#fff'\n }\n },\n grid: {\n left: '10%',\n bottom: '20%'\n },\n legend: (_legend = {\n itemHeight: 10,\n itemWidth: 10,\n bottom: 'bottom'\n }, _defineProperty(_legend, \"bottom\", 10), _defineProperty(_legend, \"textStyle\", {\n color: '#fff'\n }), _legend),\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'none'\n }\n },\n color: ['#5b8ff9', '#5ad8a6', '#5d7092', '#f6bd16', '#6f5ef9', '#6dc8ec', '#945fb9', '#ff9845', '#1e9493'],\n xAxis: {\n type: 'category',\n data: xData,\n axisLabel: {\n fontSize: 14,\n color: '#cefff2'\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: '#fff'\n }\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#fff'\n }\n }\n },\n yAxis: {\n type: 'value',\n splitLine: {\n show: true\n },\n //去除网格线\n axisLabel: {\n textStyle: {\n color: '#fff'\n }\n },\n axisTick: {\n //y轴刻度线\n show: true,\n lineStyle: {\n color: '#fff'\n }\n },\n axisLine: {\n //y轴\n show: false,\n lineStyle: {\n color: '#fff'\n }\n }\n },\n series: [{\n name: '结构物总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[0]\n }, {\n name: '桥梁总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[1]\n }, {\n name: '桥梁检查总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[2]\n }, {\n name: '桥梁本月检查总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[3]\n }, {\n name: '涵洞总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[4]\n }, {\n name: '涵洞检查总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[5]\n }, {\n name: '涵洞本月检查总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[6]\n }, {\n name: '边坡总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[7]\n }, {\n name: '边坡检查总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[8]\n }, {\n name: '边坡本月检查总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[9]\n }, {\n name: '隧道总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[10]\n }, {\n name: '隧道检查总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[11]\n }, {\n name: '隧道本月检查总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: seriesData[12]\n }]\n };\n option && myChart.setOption(option);\n }\n }\n};",null]}