{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\BigScreen\\components\\subComponents\\projectTrendChart.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\BigScreen\\components\\subComponents\\projectTrendChart.vue","mtime":1702263619964},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _defineProperty from \"D:/jenkins/workspace/reform-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.object.keys\";\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//\nimport * as echarts from 'echarts';\nimport apiList from '@/api/bigScreen/projectSub.js';\nexport default {\n name: 'projectTrendChart',\n data: function data() {\n return {\n loadingColor: 'rgba(6, 46, 106, 1)',\n loading: false,\n trendChart: null,\n trendChartOption: null,\n legendData: [],\n xAxisData: [],\n seriesData: [],\n valueData: [],\n rateData: null\n };\n },\n beforeDestroy: function beforeDestroy() {\n this.$bus.$off('changeDate');\n },\n mounted: function mounted() {\n var _this = this;\n\n this.$emit('searchDateChange');\n this.loadData();\n this.$bus.$on('changeDate', function () {\n _this.loadData();\n });\n },\n methods: {\n initTrendChart: function initTrendChart() {\n var _this2 = this,\n _xAxis;\n\n var chartDom = document.getElementById('trend-chart');\n this.trendChart = echarts.init(chartDom);\n this.trendChartOption = {\n tooltip: {\n trigger: 'axis',\n backgroundColor: 'rgba(6, 47, 107, 1)',\n borderColor: 'rgba(2, 115, 233, 1)',\n textStyle: {\n color: '#fff',\n fontSize: 18\n },\n formatter: function formatter(arg) {\n var str = arg[0].axisValue + '
';\n arg.forEach(function (item) {\n if (Object.keys(_this2.valueData[item.dataIndex]).length) {\n str = str + '' + item.seriesName + '' + '
' + '   月度实际累计完成值' + ' : ' + item.data + '
' + item.marker + '已完成当月目标值/未完成当月目标值' + ' : ' + _this2.valueData[item.dataIndex][item.seriesName].addValue + '/' + _this2.valueData[item.dataIndex][item.seriesName].unStartAddValue + '
' + '   已完成年度目标值/未完成年度目标值' + ' : ' + _this2.valueData[item.dataIndex][item.seriesName].value + '/' + _this2.valueData[item.dataIndex][item.seriesName].unStartValue + '
';\n } else {\n str = str + '' + item.seriesName + '' + '
' + '   月度实际完成值' + ' : ' + item.data + '
' + item.marker + '已完成当月目标值/未完成当月目标值' + ' : ' + 0 + '/' + 0 + '
' + '   已完成年度目标值/未完成年度目标值' + ' : ' + 0 + '/' + 0 + '
';\n }\n });\n return str;\n }\n },\n legend: {\n top: '0',\n left: 'center',\n type: 'plain',\n icon: 'rect',\n inactiveColor: '#333333',\n itemWidth: 20,\n itemHeight: 6,\n textStyle: {\n color: '#B1E3FF',\n fontSize: 16\n },\n data: this.legendData\n },\n grid: {\n left: '1%',\n right: '2%',\n bottom: '2%',\n containLabel: true\n },\n xAxis: (_xAxis = {\n type: 'category'\n }, _defineProperty(_xAxis, \"type\", 'category'), _defineProperty(_xAxis, \"boundaryGap\", ['0%', '0%']), _defineProperty(_xAxis, \"axisLine\", {\n lineStyle: {\n color: 'rgba(154,199,220, 0.2)'\n }\n }), _defineProperty(_xAxis, \"axisLabel\", {\n color: '#D7F1FF',\n align: 'center',\n fontSize: 16,\n padding: [0, 0, 0, 10]\n }), _defineProperty(_xAxis, \"boundaryGap\", false), _defineProperty(_xAxis, \"data\", this.xAxisData), _defineProperty(_xAxis, \"splitLine\", {\n show: false\n }), _xAxis),\n yAxis: {\n type: 'value',\n axisLabel: {\n color: '#D7F1FF',\n interval: 0,\n showMinLabel: true,\n showMaxLabel: true,\n fontSize: 16\n },\n axisLine: {\n lineStyle: {\n color: 'rgba(154,199,220, 0.2)'\n }\n },\n splitLine: {\n lineStyle: {\n color: 'rgba(154,199,220, 0.2)'\n }\n }\n },\n series: this.seriesData\n };\n this.trendChartOption && this.trendChart.setOption(this.trendChartOption);\n window.addEventListener('resize', function () {\n return _this2.trendChart.resize();\n });\n },\n loadData: function loadData() {\n var _this3 = this;\n\n this.loading = true;\n this.$nextTick(this.initTrendChart());\n var data = JSON.parse(sessionStorage.getItem('searchDate'));\n data.projectId = this.$route.query.id;\n this.getTwoRate(data);\n apiList.getTrendChartData(data, function (res) {\n _this3.xAxisData = res.map(function (item) {\n if (item.month < 10) {\n item.date = item.year + '/0' + item.month;\n } else {\n item.date = item.year + '/' + item.month;\n }\n\n return item.date;\n });\n\n _this3.xAxisData.reverse();\n\n _this3.legendData = res[0].quantitativeObjectivesVoList.map(function (item) {\n return item.objectIvesName;\n });\n var arr = res.map(function (item) {\n var obj = {};\n item.quantitativeObjectivesVoList.forEach(function (item1) {\n obj[item1.objectIvesName] = item1;\n });\n return obj;\n });\n _this3.valueData = JSON.parse(JSON.stringify(arr.reverse()));\n\n _this3.legendData.forEach(function (item, index) {\n _this3.seriesData[index] = {\n name: item,\n stack: 'Total',\n type: 'line',\n data: arr.map(function (item1) {\n return item1[item] ? item1[item].addValue : 0;\n })\n };\n });\n\n _this3.initTrendChart();\n\n _this3.loading = false;\n });\n },\n getTwoRate: function getTwoRate(data) {\n var _this4 = this;\n\n apiList.getTwoRate(data, function (res) {\n _this4.rateData = res;\n });\n }\n }\n};",null]}