{"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\\specialProjectManagement\\SpecialProjectManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\specialProjectManagement\\SpecialProjectManagement.vue","mtime":1708539240961},{"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 \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.function.name\";\nimport _typeof from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/typeof.js\";\nimport \"core-js/modules/es6.regexp.split\";\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\nimport utils from '@/utils'; // thousandBit格式化千分位\nvar BigNumber = require('bignumber.js');\nimport * as echarts from 'echarts';\nexport default {\n name: 'specialProjectManagement',\n data: function data() {\n return {\n tableData: [],\n data: [],\n loading: false,\n year: new Date(),\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.projectMoney = this.calculation('projectMoney', newVal);\n this.total.contractMoney = this.calculation('contractMoney', newVal);\n this.total.progress = this.calculation('progress', newVal) + '%';\n this.total.payMoney = this.calculation('payMoney', newVal);\n this.cloumnCharts(newVal);\n this.pieCharts(newVal);\n }\n },\n methods: {\n reset: function reset() {\n this.year = '';\n this.loadData();\n },\n calculation: function calculation(key, arr) {\n var total = new BigNumber(0);\n if (!key || arr.length === 0) return total.toFixed(2);\n arr.forEach(function (item) {\n if (key == 'progress') {\n total = total.plus(item[key].split('%')[0]);\n } else {\n total = total.plus(item[key]);\n }\n });\n if (key == 'progress') {\n var num = this.tableData.length || 1;\n total = total.div(num);\n }\n if (total === 0) return 0.0;\n return utils.thousandBit(total.toFixed(2));\n },\n changeYear: function changeYear(val) {\n var _this = this;\n if (!val) {\n return this.loadData();\n }\n this.loading = true;\n this.$http.post('${yhxt}/bizEngineeringProject/v1/getProjectCountVo?year=' + val).then(function (res) {\n _this.tableData = res && res.status == 200 && res.data || [];\n _this.data = [];\n _this.data.push(_this.tableData);\n _this.loading = false;\n });\n },\n findinfo: function findinfo() {\n var _this2 = this;\n var val = this.year;\n this.loading = true;\n this.$http.post('${yhxt}/bizEngineeringProject/v1/getProjectCountVo?year=' + val).then(function (res) {\n _this2.tableData = res && res.status == 200 && res.data || [];\n _this2.data = [];\n _this2.data.push(_this2.tableData);\n _this2.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 (_typeof(this.year) == 'object') {\n this.year = this.year.getFullYear();\n }\n if (row.chirldren.length == 0 && row.roadSegmentId) {\n return this.$router.push({\n name: 'projectManagementChildren',\n params: {\n value: row,\n year: this.year\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.label\n },\n loadData: function loadData() {\n var _this3 = this;\n this.loading = true;\n this.$http.post('${yhxt}/bizEngineeringProject/v1/getProjectCountVo?year=' + new Date().getFullYear()).then(function (res) {\n _this3.tableData = res && res.status == 200 && res.data || [];\n _this3.data = [];\n _this3.data.push(_this3.tableData);\n _this3.loading = false;\n }).catch(function () {\n _this3.loading = false;\n });\n },\n cloumnCharts: function cloumnCharts(data) {\n var _legend;\n var chartDom = document.getElementById('column');\n var myChart = echarts.init(chartDom);\n var source = [];\n var obj = {\n run: '年度预算金额',\n finish: '合同预算金额',\n temporary: '计量支付'\n };\n data.forEach(function (item) {\n var _source$push;\n source.push((_source$push = {\n product: item.name\n }, _defineProperty(_source$push, obj.run, item.projectMoney), _defineProperty(_source$push, obj.finish, item.contractMoney), _defineProperty(_source$push, obj.temporary, item.payMoney), _source$push));\n });\n var option;\n option = {\n title: {\n textStyle: {\n color: '#fff'\n }\n },\n grid: {\n top: '20%',\n left: '10%',\n right: '10%',\n bottom: '20%'\n },\n legend: (_legend = {\n itemHeight: 10,\n itemWidth: 10,\n bottom: 'bottom'\n }, _defineProperty(_legend, \"bottom\", '8%'), _defineProperty(_legend, \"textStyle\", {\n color: '#fff'\n }), _legend),\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'none'\n }\n },\n color: ['#68c1e5', '#56d0a3', '#16ffae', '#00e6f6', '#578bf1', '#6255f8', '#0282b9', '#596d90', '#6a5cf1'],\n dataset: {\n dimensions: ['product', '年度预算金额', '合同预算金额', '计量支付'],\n source: source\n },\n xAxis: {\n type: 'category',\n axisLabel: {\n fontSize: 14,\n color: '#B8C2CC'\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: '#B8C2CC'\n }\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#274561'\n }\n }\n },\n yAxis: {\n name: '单位:万元',\n nameTextStyle: {\n color: '#B8C2CC',\n nameLocation: 'start',\n fontSize: 18,\n fontWeight: 700\n },\n type: 'value',\n splitLine: {\n show: false\n },\n //去除网格线\n axisLabel: {\n textStyle: {\n color: '#B8C2CC'\n }\n },\n axisTick: {\n //y轴刻度线\n show: true,\n lineStyle: {\n color: '#B8C2CC'\n }\n },\n axisLine: {\n //y轴\n show: true,\n lineStyle: {\n color: '#274561'\n }\n }\n },\n series: [{\n type: 'bar',\n itemStyle: {\n color: '#578af0'\n },\n barWidth: '15%',\n showBackground: true,\n backgroundStyle: {\n color: 'rgba(34, 73, 107, 0.5)'\n }\n }, {\n type: 'bar',\n itemStyle: {\n color: '#56cfa2'\n },\n barWidth: '15%',\n showBackground: true,\n backgroundStyle: {\n color: 'rgba(34, 73, 107, 0.5)'\n }\n }, {\n type: 'bar',\n itemStyle: {\n color: '#56cfa2'\n },\n barWidth: '15%',\n showBackground: true,\n backgroundStyle: {\n color: 'rgba(34, 73, 107, 0.5)'\n }\n }]\n };\n option && myChart.setOption(option);\n },\n pieCharts: function pieCharts(data) {\n var chartDom = document.getElementById('pie');\n var myChart = echarts.init(chartDom);\n var data_ = [];\n data.forEach(function (item) {\n data_.push({\n name: item.name,\n value: item.projectMoney || 0\n });\n });\n var option;\n var total = this.calculation('projectMoney', data);\n var formatNumber = function formatNumber(num) {\n return num.toString().replace(/(?=(\\B)(\\d{3})+$)/g, ',');\n };\n option = {\n title: [{\n text: \"{name|\\u5E74\\u5EA6\\u9884\\u7B97\\u91D1\\u989D\\u7EDF\\u8BA1/\\u4E07\\u5143}\\n{val|\".concat(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 tooltip: {\n trigger: 'item',\n formatter: function formatter(a) {\n return \"\".concat(a.marker, \" \").concat(a.data.name, \" \").concat(a.data.value, \"\\u4E07\\u5143 \").concat(a.percent, \"%\");\n }\n },\n color: ['#578bf1', '#6255f8', '#68c1e5', '#56d0a3', '#16ffae', '#00e6f6', '#0282b9', '#596d90', '#6a5cf1'],\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 radius: ['40%', '60%'],\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 minMargin: 5,\n edgeDistance: 80,\n rich: {\n percent: {\n fontSize: 15,\n color: '#fff'\n }\n }\n }\n }]\n };\n option && myChart.setOption(option);\n }\n }\n};",null]}