{"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\\MajorReformProjects\\QuaObj\\components\\QuaObjDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorReformProjects\\QuaObj\\components\\QuaObjDialog.vue","mtime":1744686695569},{"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/web.dom.iterable\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 UploadFile from '@/components/uploadFile/index.vue';\nimport FileList from '@/components/uploadFile/FileList.vue';\nimport RecordPopover from '@/components/dialog/RecordPopover.vue';\nimport apiList from '@/api/MajorReformProjects/QuaObj';\nimport publicApi from '@/api/publicApi';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport moment from 'moment';\nimport RejectInfoDialog from '@/components/dialog/RejectInfoBlockDialog.vue';\nexport default {\n name: 'QuaObjDialog',\n components: {\n RejectInfoDialog: RejectInfoDialog,\n RecordPopover: RecordPopover,\n UploadFile: UploadFile,\n FileList: FileList\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n title: '',\n projectInfo: {},\n // 项目基础信息\n status: null,\n // 审核状态\n btnType: '',\n // 按钮类型 'read, audit, save'\n type: '',\n // 弹窗类型 0待更新 1责任审核 2市级确认\n formVisible: false,\n // 弹窗展示flag\n showDetails: false,\n // 查看详情flag\n saveLoading: false,\n // 保存按钮flag\n markLoading: false,\n reqLoading: false,\n activeCollapse: '1',\n disabled: false,\n historyFillDate: '',\n loadingHistory: false,\n loadType: '',\n fillDate: '',\n loading: false,\n loadingDefault: false,\n approvalComments: '',\n // 驳回理由\n approvalCommentsList: [],\n targetHistoryData: [],\n targetData: [],\n columnData: [{\n label: '目标名称',\n key: 'reformQuantitativeObjectives',\n type: 'show'\n }, {\n label: '是否错月数据',\n key: 'fillType',\n type: 'show',\n width: '100'\n }, {\n label: '当年目标值',\n key: 'reformQuantitativeObjectivesYear',\n type: 'show',\n width: '100'\n }, {\n label: '当月目标值',\n key: 'reformQuantitativeObjectivesMouth',\n type: 'show',\n width: '100'\n }, {\n label: '目标单位',\n key: 'reformQuantitativeObjectivesUnit',\n width: '80',\n type: 'show'\n }, {\n label: '当月进度之值',\n key: 'pushProgress',\n width: '120',\n type: 'entry',\n ui: 'input'\n }, {\n label: '填报时间',\n type: 'entry',\n key: 'pushDate',\n width: '120',\n ui: 'date'\n }],\n pickerOptions: {\n disabledDate: function disabledDate(time) {\n return time.getTime() > Date.now();\n }\n },\n pilotProjectFill: null,\n // history\n pilotProjectFillHistory: null,\n idArr: [],\n reqFillDate: '',\n fileIndex: 0,\n isFiles: true\n };\n },\n created: function created() {// this.getNowDate()\n },\n methods: {\n openUploade: function openUploade(index) {\n this.fileIndex = index;\n this.$refs.uploadFile.open('ProjectBrand');\n },\n setAipher: function setAipher() {\n this.$set(this.targetData[this.fileIndex], 'classified', 1);\n },\n setFileList: function setFileList(file) {\n file.id = file.response.fileId;\n\n if (this.targetData[this.fileIndex].files) {\n this.targetData[this.fileIndex].files.push(file);\n } else {\n this.$set(this.targetData[this.fileIndex], 'files', []);\n this.targetData[this.fileIndex].files.push(file);\n }\n\n this.$set(this.targetData[this.fileIndex], 'classified', 0);\n },\n changeFileList: function changeFileList(data, index) {\n this.targetData[index].files = data;\n },\n changehisToryDate: function changehisToryDate(date) {\n this.historyFillDate = date + '-01';\n this.loadHistoryData();\n },\n // 获取当前时间\n getNowDate: function getNowDate() {\n var _this = this;\n\n return new Promise(function (resolve) {\n publicApi.getNowDate(function (res) {\n if (res) {\n var serverTime = Date.parse(res);\n var arr = res.split(' ');\n var dateArr = arr[0].split('-');\n var year = dateArr[0];\n var month = dateArr[1];\n var date = ''; // debugger\n // if (month === '05' || month == '10') {\n\n if (month % 2 !== 0 || month == 9 || month == 12) {\n var time = \"\".concat(year, \"-\").concat(month, \"-31 18:00:00\");\n console.log(time);\n\n if (serverTime <= Date.parse(time)) {\n var newMonth = month < 2 ? 12 : month - 1;\n\n if (newMonth < 10) {\n newMonth = '0' + newMonth;\n }\n\n date = (newMonth === 12 ? year - 1 : year) + '-' + newMonth;\n } else {\n date = year + '-' + month;\n }\n } else {\n var _time = \"\".concat(year, \"-\").concat(month, \"-30 18:00:00\");\n\n if (serverTime <= Date.parse(_time)) {\n var _newMonth = month < 2 ? 12 : month - 1;\n\n if (_newMonth < 10) {\n _newMonth = '0' + _newMonth;\n }\n\n date = year + '-' + _newMonth;\n } else {\n date = year + '-' + month;\n }\n }\n\n var _this$projectInfo = _this.projectInfo,\n id = _this$projectInfo.id,\n projectId = _this$projectInfo.projectId,\n fillDate = _this$projectInfo.fillDate;\n\n if (id) {\n var data = {\n projectId: projectId,\n fillDate: fillDate,\n flowType: 1,\n nowDate: date + '-' + '01'\n };\n publicApi.setFillingTime(data, function (res) {\n var time = res.value === -1 ? fillDate : data.nowDate;\n resolve(time);\n });\n } else {\n resolve(date + '-' + '01');\n }\n }\n });\n });\n },\n // type 0 待更新 1责任审核 2市级确认 3 其他\n openForm: function openForm(item, title, type, btnType) {\n console.log(item, '9999999999999');\n\n if (title == '详情' || title == '审核') {\n this.showDetails = true;\n }\n\n this.btnType = btnType;\n this.status = item.status;\n this.projectInfo = item;\n this.title = title;\n this.type = type;\n\n if (type == 0) {\n // 待更新\n this.loadProjectData(item);\n } else if ((this.status == 7 || this.status == 6 || this.status == 4 || this.status == 2) && title !== '详情') {\n // 新一轮更新\n this.loadProjectData(item);\n this.getLastMonth();\n this.loadHistoryData(); // this.changehisToryDate(this.fillDate)\n } else {\n // 审核 更新 编辑 详情...\n this.loadAuditData();\n this.getLastMonth();\n this.loadHistoryData(); // this.changehisToryDate(this.fillDate)\n // this.loadProjectData()\n // this.loadAuditData('new')\n // this.getLastMonth()\n // this.loadHistoryData()\n } // else {\n // this.loadAuditData()\n // this.getLastMonth()\n // this.loadHistoryData()\n // }\n\n\n this.formVisible = true;\n },\n // 获取待审核信息\n loadAuditData: function loadAuditData(type) {\n var _this2 = this;\n\n // 待审核数据\n this.loading = true;\n apiList.getAuditData(this.projectInfo.id, function (res) {\n if (res) {\n _this2.idArr = res.pilotQuantitativeObjectivesPushList.map(function (item) {\n return {\n id: item.id,\n objectivesMeasuresId: item.objectivesMeasuresId,\n pushProgress: item.pushProgress\n };\n });\n _this2.approvalComments = res.pilotProjectFill && res.pilotProjectFill.approvalComments || '';\n\n if (_this2.approvalComments) {\n _this2.approvalCommentsList = _this2.approvalComments.split('$_$');\n }\n\n if (res.pilotProjectFill && res.pilotProjectFill.fillYear && res.pilotProjectFill.fillMonth) {\n var _res$pilotProjectFill = res.pilotProjectFill,\n fillYear = _res$pilotProjectFill.fillYear,\n fillMonth = _res$pilotProjectFill.fillMonth;\n fillMonth = fillMonth < 10 ? \"0\".concat(fillMonth) : fillMonth;\n _this2.reqFillDate = fillYear + '-' + fillMonth;\n } // 非更新时查询本次更新数据\n\n\n if (!type) {\n _this2.targetData = res.pilotQuantitativeObjectivesPushList;\n _this2.fillDate = res.pilotProjectFill && res.pilotProjectFill.fillDate;\n _this2.pilotProjectFill = res.pilotProjectFill;\n }\n\n _this2.loading = false;\n }\n });\n },\n getLastMonth: function getLastMonth() {\n //当前日期的前一个月\n var time = new Date();\n var year = time.getFullYear();\n var month = time.getMonth();\n\n if (month == 0) {\n month = 12;\n year = year - 1;\n }\n\n if (month < 10) {\n month = '0' + month;\n }\n\n this.historyFillDate = this.reqFillDate == '' ? year + '-' + month + '-01' : this.reqFillDate + '-01';\n },\n // 获取历史信息\n loadHistoryData: function loadHistoryData() {\n var _this3 = this;\n\n // 待审核数据\n this.loadingHistory = true;\n var data = {\n fillDate: this.historyFillDate,\n projectId: this.projectInfo.projectId\n };\n this.pilotProjectFillHistory = null;\n apiList.getHistoryData(data, function (res) {\n if (res) {\n if (res.pilotProjectFillHistory) {\n _this3.pilotProjectFillHistory = res.pilotProjectFillHistory;\n _this3.pilotProjectFillHistory.approvalComments = res.pilotProjectFillHistory && res.pilotProjectFillHistory.approvalComments ? res.pilotProjectFillHistory.approvalComments.split('$_$') : [];\n }\n\n _this3.targetHistoryData = res.pilotProjectFillHistory && res.pilotQuantitativeObjectivesPushHistoryList;\n _this3.loadingHistory = false;\n }\n });\n },\n // 获取项目初始化信息\n loadProjectData: function loadProjectData() {\n var _this4 = this;\n\n this.getNowDate().then(function (res) {\n console.log(res); // if (item.id) {\n // let { fillYear, fillMonth } = item\n // fillMonth = fillMonth > 10 ? fillMonth : '0' + fillMonth\n // this.fillDate = item.status === 2 || item.status === 4 ? fillYear + '-' + fillMonth : res\n // } else {\n // this.fillDate = res\n // }\n\n _this4.fillDate = res;\n var data = {\n fillDate: res,\n projectId: _this4.projectInfo.projectId\n };\n _this4.loading = true;\n apiList.getDefaultQuaObj(data, function (res) {\n if (res && res.pilotQuantitativeObjectivesList) {\n var tempData = res.pilotQuantitativeObjectivesList;\n tempData.forEach(function (item) {\n item.pushDate = moment().format('YYYY-MM-DD');\n item.passFail = false;\n var reqFillDate = _this4.reqFillDate + '-01';\n\n if (_this4.idArr.length && data.fillDate == reqFillDate) {\n _this4.idArr.forEach(function (idObj) {\n if (item.id == idObj.objectivesMeasuresId) {\n item.pushProgress = idObj.pushProgress;\n }\n });\n }\n });\n _this4.targetData = tempData;\n }\n\n _this4.loading = false;\n });\n });\n },\n // 组织提交数据\n farmatter: function farmatter() {\n var _this5 = this;\n\n // debugger\n var id = this.pilotProjectFill && this.pilotProjectFill.id;\n var data = {\n pilotProjectFill: {\n id: id ? id : '',\n fillDate: this.fillDate,\n projectId: this.projectInfo.projectId,\n projectName: this.projectInfo.projectName\n },\n pilotQuantitativeObjectivesPushList: []\n };\n this.targetData.forEach(function (item) {\n if (_this5.fillDate !== '2024-01-01' || item.fillType != 2) {\n if (!item.pushProgress) {\n item.passFail = true;\n data = false;\n } else {\n if (!item.files && !item.classified) {\n _this5.isFiles = false;\n data = false;\n } else {\n if (item.files) {\n if (!item.files.length) {\n _this5.isFiles = false;\n data = false;\n }\n }\n }\n }\n }\n\n if (data) {\n if (_this5.status == 2 || _this5.status == 4 || _this5.status == 6 || _this5.status == 7 || _this5.status == undefined) {\n // 初始化的数据 没有id\n data.pilotQuantitativeObjectivesPushList.push({\n objectivesMeasuresId: item.id,\n pushDate: item.pushDate,\n pushProgress: item.pushProgress || '',\n files: item.files || [],\n classified: item.classified || 0\n });\n } else {\n // 编辑数据 整个回传\n _this5.idArr.forEach(function (idObj) {\n if (item.id == idObj.objectivesMeasuresId) {\n item.objectivesMeasuresId = item.id;\n item.id = idObj.id;\n }\n });\n\n if (!item.objectivesMeasuresId) {\n item.objectivesMeasuresId = item.id;\n }\n\n data.pilotQuantitativeObjectivesPushList.push(item);\n }\n }\n });\n this.$forceUpdate();\n return data;\n },\n // 表单提交保存\n saveGetNowDate: function saveGetNowDate(status) {\n var _this6 = this;\n\n this.getNowDate().then(function (res) {\n if (res === _this6.fillDate) {\n _this6.submit(status);\n } else {\n var oldTime = _this6.fillDate.slice(0, _this6.fillDate.length - 3);\n\n var newTime = res.slice(0, res.length - 3);\n var msg = \"\\u5F53\\u524D\\u65F6\\u95F4\\u5DF2\\u8D85\\u51FA\".concat(oldTime, \"\\u6708\\u6570\\u636E\\u53EF\\u586B\\u62A5\\u65F6\\u95F4\\uFF0C\\u786E\\u8BA4\\u4FDD\\u5B58\\u4E3A\").concat(newTime, \"\\u6708\\u6570\\u636E\\u5417\\uFF1F\");\n\n _this6.$confirm(msg, _this6.$t('common.tips'), {\n confirmButtonText: _this6.$t('common.confirm'),\n cancelButtonText: _this6.$t('common.cancel'),\n type: 'error'\n }).then(function () {\n _this6.fillDate = res;\n\n _this6.submit(status);\n });\n }\n });\n },\n submit: function submit(status) {\n var _this7 = this;\n\n var api = apiList.save,\n message = '保存为草稿成功';\n\n if (status) {\n api = apiList.saveAndSubmit;\n message = '保存并上报成功';\n }\n\n this.saveLoading = true;\n var data = this.farmatter();\n\n if (data) {\n api(data, function (res) {\n if (res.state) {\n _this7.$message.success(message);\n\n _this7.$parent.reload();\n\n _this7.handleClose();\n } else {\n _this7.$message.warning(res.message);\n }\n\n _this7.saveLoading = false;\n });\n } else {\n if (this.isFiles) {\n this.$message.warning('请填写目标推进值');\n } else {\n this.$message.warning('请上传相关佐证材料');\n }\n\n this.saveLoading = false;\n }\n },\n handleVerify: function handleVerify() {\n var _this8 = this;\n\n this.saveLoading = true;\n console.log(this.type);\n var data = {\n flowType: this.projectInfo.flowType,\n id: this.projectInfo.id,\n status: this.type == 1 ? 3 : this.type == 2 ? 5 : 7 //3-责任单位领导审核通过 5-市委改革办审核通过\n\n };\n apiList.verify(data, function (res) {\n if (res.state) {\n _this8.$message.success('审核通过成功');\n\n _this8.$parent.reload();\n\n _this8.handleClose();\n } else {\n _this8.$message.warning(res.message);\n }\n\n _this8.saveLoading = false;\n });\n },\n // 审核驳回\n handleReject: function handleReject() {\n var _this9 = this;\n\n this.saveLoading = true;\n var status = this.type == 1 ? 2 : this.type == 2 ? 4 : 6; // 2-审核驳回 4-确认驳回\n\n var message = '确认驳回吗?';\n this.btnLoading = true;\n this.$confirm(message, this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'error'\n }).then(function () {\n _this9.$refs.rejectInfoDialog.open('/majorProjects/pilotQuantitativeObjectivesPush/v1/quantitativeObjectivesPushExamine', status);\n }).catch(function () {\n _this9.saveLoading = false;\n });\n },\n // 处理填写的驳回意见\n sendRejectInfo: function sendRejectInfo(rejectInfo, api, status) {\n var _this10 = this;\n\n if (!rejectInfo) {\n this.saveLoading = false;\n return;\n }\n\n var data = {\n flowType: this.projectInfo.flowType,\n approvalComments: rejectInfo,\n id: this.projectInfo.id,\n status: status //3-责任单位领导审核通过 5-市委改革办审核通过\n\n };\n apiList.verify(data, function (res) {\n if (res.state) {\n _this10.$message.success('驳回成功');\n\n _this10.$parent.reload();\n\n _this10.handleClose();\n } else {\n _this10.$message.warning(res.message);\n }\n\n _this10.saveLoading = false;\n });\n },\n handleClose: function handleClose() {\n this.saveLoading = false;\n this.formVisible = false;\n this.showDetails = false;\n this.approvalComments = '';\n this.approvalCommentsList = [];\n this.targetHistoryData = [];\n this.targetData = [];\n this.pilotProjectFill = null;\n this.pilotProjectFillHistory = null;\n this.fillDate = \"\";\n }\n }\n};",null]}