{"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\\dailyMaintenance\\DailyMaintenance.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\dailyMaintenance\\DailyMaintenance.vue","mtime":1681377303690},{"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":315532800000},{"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\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.array.sort\";\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//\nimport utils from '@/utils'; // thousandBit格式化千分位\n\nvar BigNumber = require('bignumber.js');\n\nimport * as echarts from 'echarts';\nexport default {\n name: 'DailyMaintenance',\n data: function data() {\n return {\n tableData: [],\n data: [],\n loading: false,\n cstatus: '',\n year: '',\n total: {},\n utils: utils\n };\n },\n created: function created() {\n this.loadData();\n },\n watch: {\n tableData: function tableData(newVal) {\n this.total.finishCount = this.calculation('finishCount', newVal);\n this.total.distributionCount = this.calculation('distributionCount', newVal);\n this.total.constructionCount = this.calculation('constructionCount', newVal);\n this.total.checkCount = this.calculation('checkCount', newVal);\n this.total.examineCount = this.calculation('examineCount', newVal);\n this.total.overdueCount = this.calculation('overdueCount', newVal);\n this.total.allCount = this.calculation('allCount', newVal);\n this.total.finishMoney = this.calculation('finishMoney', newVal);\n this.pieCharts(this.total, newVal);\n this.cloumnCharts(newVal);\n }\n },\n methods: {\n calculation: function calculation(key, arr) {\n var total = 0;\n if (!key || arr.length === 0) return total;\n arr.forEach(function (item) {\n total += parseInt(item[key]);\n });\n if (total === 0) return 0;\n return utils.thousandBit(total);\n },\n changeYear: function changeYear(val) {\n var _this = this;\n\n if (!val) {\n return this.loadData();\n }\n\n this.loading = true;\n this.$http.post('${yhxt}/workOrderInformation/v1/getWorkCountVo?year=' + val).then(function (res) {\n _this.tableData = res && res.status == 200 && res.data || [];\n _this.data = [];\n\n _this.data.push(_this.tableData);\n\n _this.loading = false;\n });\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.roadId) {\n return this.$router.push({\n name: 'workOrderInfo',\n params: {\n value: row,\n cstatus: this.cstatus\n }\n });\n }\n\n this.tableData = row.chirldren;\n this.data.push(row.chirldren);\n },\n handleCellClick: function handleCellClick(row, column) {\n this.cstatus = column.columnKey;\n },\n loadData: function loadData() {\n var _this2 = this;\n\n this.loading = true;\n this.$http.post('${yhxt}/workOrderInformation/v1/getWorkCountVo?year=' + new Date().getFullYear()).then(function (res) {\n _this2.tableData = res && res.status == 200 && res.data || [];\n _this2.data = [];\n\n _this2.data.push(_this2.tableData);\n\n _this2.loading = false;\n }).catch(function () {\n _this2.loading = false;\n });\n },\n pieCharts: function pieCharts(obj, rows) {\n var chartDom = document.getElementById('pie');\n var myChart = echarts.init(chartDom);\n var data = [{\n name: '已完成',\n value: obj.finishCount || 0\n }, {\n name: '派单',\n value: obj.distributionCount || 0\n }, {\n name: '施工',\n value: obj.constructionCount || 0\n }, {\n name: '验收',\n value: obj.checkCount || 0\n }, {\n name: '审核',\n value: obj.examineCount || 0\n } // {\n // name: '已逾期',\n // value: obj.overdueCount || 0\n // }\n ];\n var innerData = [{\n name: '审核',\n value: this.calculation('examineOverdue', rows)\n }, {\n name: '验收',\n value: this.calculation('checkOverdue', rows)\n }, {\n name: '施工',\n value: this.calculation('constructionOverdue', rows)\n }, {\n name: '派单',\n value: this.calculation('distributionOverdue', rows)\n }];\n innerData = innerData.sort(function (a, b) {\n return b.value - a.value;\n });\n innerData[0].selected = true;\n var option;\n var total = new BigNumber(0);\n data.forEach(function (item) {\n total = total.plus(item.value);\n });\n\n var formatNumber = function formatNumber(num) {\n return num.toString().replace(/(?=(\\B)(\\d{3})+$)/g, ',');\n };\n\n option = {\n // title: [\n // {\n // text: `{name|总数/个}\\n{val|${formatNumber(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: 70,\n top: 'center',\n bottom: 20,\n textStyle: {\n color: '#ccc'\n }\n },\n series: [{\n type: 'pie',\n selectedMode: 'single',\n radius: [0, '50%'],\n label: {\n // show: false,\n formatter: function formatter(a) {\n if (a.value > 0) {\n return \"{name|\".concat(a.name, \"\\u903E\\u671F}\");\n } else {\n return '';\n }\n },\n rich: {\n name: {\n fontSize: 12,\n color: '#fff'\n }\n },\n position: 'inner'\n },\n tooltip: {\n trigger: 'item',\n formatter: function formatter(a) {\n return \"\".concat(a.marker, \" \").concat(a.data.name, \"\\u903E\\u671F \").concat(a.data.value, \"\\u4E2A \").concat(a.percent, \"%\");\n }\n },\n labelLine: {\n show: false\n },\n data: innerData\n }, {\n type: 'pie',\n radius: ['70%', '85%'],\n // center: ['45%', '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\n var chartDom = document.getElementById('column');\n var myChart = echarts.init(chartDom);\n var option;\n var xData = [];\n var finishData = [];\n var distributionData = [];\n var constructionData = [];\n var checkData = [];\n var examineData = [];\n var overdueData = [];\n var allData = [];\n data.forEach(function (item) {\n xData.push(item.name);\n finishData.push(item.finishCount);\n distributionData.push(item.distributionCount);\n constructionData.push(item.constructionCount);\n checkData.push(item.checkCount);\n examineData.push(item.examineCount);\n overdueData.push(item.overdueCount);\n allData.push(item.allCount);\n });\n option = {\n title: {\n textStyle: {\n color: '#fff'\n }\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: finishData\n }, {\n name: '派单中',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: distributionData\n }, {\n name: '施工中',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: constructionData\n }, {\n name: '施工单位验收',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: checkData\n }, {\n name: '审核中',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: examineData\n }, {\n name: '已逾期',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: overdueData\n }, {\n name: '总数',\n type: 'bar',\n stack: 'Ad',\n barWidth: '15%',\n data: allData\n }]\n };\n option && myChart.setOption(option);\n }\n }\n};",null]}