{"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\\projectStatementDetail.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\BigScreen\\components\\subComponents\\projectStatementDetail.vue","mtime":1741679454700},{"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 \"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 apiList from '@/api/bigScreen/majorView.js';\nimport monthlyProgressDialog from \"./monthlyProgressDialog.vue\";\nimport ExcelJS from 'exceljs';\nexport default {\n projectName: 'reportOverview',\n components: {\n monthlyProgressDialog: monthlyProgressDialog\n },\n props: {\n tableOptions: {\n type: Object,\n default: function _default() {\n return {};\n }\n }\n },\n data: function data() {\n return {\n loading: false,\n loadingColor: 'rgba(7, 45, 98,.4)',\n dataReady: false,\n tableData: [],\n planTypeDetails: [],\n workbook: null,\n projectName: '',\n projectCategory: ''\n };\n },\n mounted: function mounted() {\n var _this = this;\n\n this.getData();\n this.$bus.$on('changeDate', function (searchDate) {\n _this.getData();\n });\n this.$bus.$on('monthExportExcel', function (comp) {\n if (comp === 'projectStatementDetail') {\n _this.clickExport();\n }\n });\n },\n created: function created() {\n this.projectName = this.$route.query.projectName || '';\n this.$emit('searchDateChange');\n },\n methods: {\n openDetails: function openDetails(item, index) {\n var statusText = item[\"target\".concat(index)].statusText;\n\n if (statusText === '不涉及') {\n this.$message.warning('暂无涉及数据');\n } else {\n this.$refs.monthlyProgressDialog.open(item, index);\n }\n },\n getData: function getData() {\n var _this2 = this;\n\n this.loading = true;\n this.tableData = [];\n var data = JSON.parse(sessionStorage.getItem('searchDate'));\n data.projectCategory = this.projectCategory;\n apiList.getAccelerateImplementationDetails(data, function (res) {\n if (res.data) {\n var _data = JSON.parse(JSON.stringify(res.data));\n\n _data.forEach(function (item) {\n item.unitName = item.statusVoList[0].unitName;\n item.progressFinishRate = item.progressFinishRate ? item.progressFinishRate : 0;\n item.progressUnFinishRate = (item.progressUnFinishRate ? item.progressUnFinishRate : 0) + item.progressFinishRate;\n\n if (item.statusVoList) {\n item.statusVoList.forEach(function (eml) {\n eml.planType === 1 ? item.target1 = eml : eml.planType === 2 ? item.target2 = eml : eml.planType === 4 ? item.target3 = eml : eml.planType === 5 ? item.target4 = eml : eml.planType === 3 ? item.target5 = eml : eml.planType === 12 ? item.target6 = eml : eml.planType === 7 ? item.target7 = eml : eml.planType === 8 ? item.target8 = eml : eml.planType === 10 ? item.target9 = eml : '';\n });\n }\n });\n\n _this2.tableData = _data;\n\n _this2.$nextTick(function () {\n _this2.tableData.forEach(function (item, index) {\n if (item.projectName === _this2.projectName) {\n _this2.$refs.myTable.setCurrentRow(item);\n\n var highlightLines = _this2.$refs.myTable.$el.querySelectorAll('.el-table__body tbody .el-table__row');\n\n var scrollTop = 0;\n\n for (var i = 0; i < highlightLines.length; i++) {\n if (i === index) {\n break;\n }\n\n scrollTop += highlightLines[i].offsetHeight;\n }\n\n _this2.$refs.myTable.bodyWrapper.scrollTop = scrollTop;\n }\n });\n });\n\n _this2.exportToExcel();\n }\n\n _this2.loading = false;\n });\n },\n setStyle: function setStyle(value, row) {\n // 'background:#a0a0a0;color:#333;font-weight:900;font-size: 24px;' : 'display: none;'\n var style = value.indexOf('已完成') !== -1 || value.indexOf('年实施') !== -1 ? 'background :#38a846;font-weight: bold;' : value.indexOf('推进中') !== -1 ? 'background:#00b0f0;font-weight: bold;' : value.indexOf('未启动') !== -1 ? 'background:rgba(232, 232, 232, .85);font-weight: bold;' : value.indexOf('未完成') !== -1 ? 'background:#f43308;font-weight: bold;' : value.indexOf('不涉及') !== -1 ? 'background:#a0a0a0;font-weight: bold;color:#fff' : '';\n return style + 'user-select:none;color:#383838;';\n },\n exportToExcel: function exportToExcel() {\n var columns = [{\n title: '项目名称',\n dataIndex: 'projectName'\n }, {\n title: '主责单位',\n dataIndex: 'unitName'\n }, {\n title: '专项小组',\n dataIndex: 'groupName'\n }, {\n title: '项目进度',\n dataIndex: 'progressFinishRate'\n }, {\n title: '组建\\n工作专班',\n dataIndex: \"target1\"\n }, {\n title: '开展\\n调查研究',\n dataIndex: \"target2\"\n }, {\n title: '制定\\n改革方案',\n dataIndex: \"target3\"\n }, {\n title: '出台\\n配套政策',\n dataIndex: \"target4\"\n }, {\n title: '向上\\n争取支持',\n dataIndex: \"target5\"\n }, {\n title: '开展\\n试点示范',\n dataIndex: \"target6\"\n }, {\n title: '上线\\n重大应用',\n dataIndex: \"target7\"\n }, {\n title: '开展\\n督导指导',\n dataIndex: \"target8\"\n }, {\n title: '总结\\n推广经验',\n dataIndex: \"target9\"\n }];\n var workbook = new ExcelJS.Workbook();\n var worksheet = workbook.addWorksheet('Sheet1');\n var data = JSON.parse(JSON.stringify(this.tableData));\n var headerRow = worksheet.addRow(columns.map(function (column) {\n return column.title;\n }));\n headerRow.eachCell(function (cell) {\n cell.font = {\n bold: true,\n size: 14\n };\n cell.alignment = {\n horizontal: \"center\",\n // 水平居中\n vertical: 'middle' // 垂直居中\n\n };\n cell.border = {\n top: {\n style: 'thin'\n },\n left: {\n style: 'thin'\n },\n bottom: {\n style: 'thin'\n },\n right: {\n style: 'thin'\n }\n };\n cell.alignment = {\n wrapText: true,\n vertical: 'middle',\n horizontal: 'center'\n };\n });\n data.forEach(function (rowData) {\n var newRow = worksheet.addRow(columns.map(function (column) {\n if (column.title === '项目进度') {\n console.log(rowData);\n return rowData[column.dataIndex] + '%' || \"\";\n }\n\n if (column.dataIndex.indexOf('target') !== -1) {\n return rowData[column.dataIndex].statusText || \"\";\n } else {\n return rowData[column.dataIndex] || \"\";\n }\n }));\n newRow.eachCell(function (cell, rowNum) {\n cell.border = {\n top: {\n style: 'thin'\n },\n left: {\n style: 'thin'\n },\n bottom: {\n style: 'thin'\n },\n right: {\n style: 'thin'\n }\n };\n cell.alignment = {\n wrapText: true\n };\n\n if (rowNum > 3) {\n cell.fill = returnColor(cell.value);\n }\n\n cell.alignment.vertical = 'middle';\n cell.alignment.horizontal = 'center';\n });\n });\n var columnWidths = {\n A: 32,\n B: 13,\n C: 15,\n D: 15,\n E: 15,\n F: 15,\n G: 15,\n H: 15,\n I: 15,\n J: 15,\n K: 15,\n L: 15,\n M: 15\n };\n Object.keys(columnWidths).forEach(function (columnLetter) {\n worksheet.getColumn(columnLetter).width = columnWidths[columnLetter];\n });\n\n function returnColor(value) {\n var argb = value.indexOf('已完成') !== -1 || value.indexOf('年实施') !== -1 ? '38a846' : value.indexOf('推进中') !== -1 ? '00b0f0' : value.indexOf('未启动') !== -1 ? 'e8e8e8' : value.indexOf('未完成') !== -1 ? 'f43308' : value.indexOf('不涉及') !== -1 ? 'a0a0a0' : '';\n return {\n type: 'pattern',\n pattern: 'solid',\n fgColor: {\n argb: argb\n }\n };\n }\n\n this.workbook = workbook;\n },\n clickExport: function clickExport() {\n this.workbook.xlsx.writeBuffer().then(function (buffer) {\n var blob = new Blob([buffer], {\n type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n });\n var url = window.URL.createObjectURL(blob);\n var a = document.createElement('a');\n a.href = url;\n a.download = '月度计划进展.xlsx';\n a.click();\n window.URL.revokeObjectURL(url);\n });\n }\n }\n};",null]}