{"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":1683339949550},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 RecordPopover from '@/components/dialog/RecordPopover.vue';\nimport apiList from '@/api/MajorReformProjects/QuaObj';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport moment from 'moment';\nimport RejectInfoDialog from '@/components/dialog/RejectInfoDialog.vue';\nexport default {\n name: 'QuaObjDialog',\n components: {\n RejectInfoDialog: RejectInfoDialog,\n RecordPopover: RecordPopover\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: moment().format('YYYY-MM'),\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: '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: '160',\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 };\n },\n created: function created() {},\n methods: {\n change: function change(date) {\n this.loadProjectData();\n },\n changehisToryDate: function changehisToryDate(date) {\n this.historyFillDate = date + '-01';\n this.loadHistoryData();\n },\n // type 0 待更新 1责任审核 2市级确认 3 其他\n openForm: function openForm(item, title, type, btnType) {\n console.log(item);\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();\n } else if (this.status == 5 || this.status == 4 || this.status == 2) {\n // 新一轮更新\n this.loadProjectData();\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 if (this.title == '详情' || this.title == '审核') {\n this.showDetails = true;\n }\n\n this.formVisible = true;\n },\n // 获取待审核信息\n loadAuditData: function loadAuditData(type) {\n var _this = this;\n\n // 待审核数据\n this.loading = true;\n apiList.getAuditData(this.projectInfo.id, function (res) {\n if (res) {\n _this.idArr = res.pilotQuantitativeObjectivesPushList.map(function (item) {\n return {\n id: item.id,\n objectivesMeasuresId: item.objectivesMeasuresId,\n pushProgress: item.pushProgress\n };\n });\n _this.approvalComments = res.pilotProjectFill && res.pilotProjectFill.approvalComments || '';\n\n if (_this.approvalComments) {\n _this.approvalCommentsList = _this.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 _this.reqFillDate = fillYear + '-' + fillMonth;\n } // 非更新时查询本次更新数据\n\n\n if (!type) {\n _this.targetData = res.pilotQuantitativeObjectivesPushList;\n _this.fillDate = res.pilotProjectFill && res.pilotProjectFill.fillDate.slice(0, 7);\n _this.pilotProjectFill = res.pilotProjectFill;\n }\n\n _this.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 _this2 = 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 _this2.pilotProjectFillHistory = res.pilotProjectFillHistory;\n _this2.pilotProjectFillHistory.approvalComments = res.pilotProjectFillHistory && res.pilotProjectFillHistory.approvalComments ? res.pilotProjectFillHistory.approvalComments.split('$_$') : [];\n }\n\n _this2.targetHistoryData = res.pilotProjectFillHistory && res.pilotQuantitativeObjectivesPushHistoryList;\n _this2.loadingHistory = false;\n }\n });\n },\n // 获取项目初始化信息\n loadProjectData: function loadProjectData() {\n var _this3 = this;\n\n var data = {\n fillDate: this.fillDate + '-01',\n projectId: this.projectInfo.projectId\n };\n this.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 = _this3.reqFillDate + '-01';\n\n if (_this3.idArr.length && data.fillDate == reqFillDate) {\n _this3.idArr.forEach(function (idObj) {\n if (item.id == idObj.objectivesMeasuresId) {\n item.pushProgress = idObj.pushProgress;\n }\n });\n }\n });\n _this3.targetData = tempData;\n }\n\n _this3.loading = false;\n });\n },\n // 组织提交数据\n farmatter: function farmatter() {\n var _this4 = 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 + '-01',\n projectId: this.projectInfo.projectId,\n projectName: this.projectInfo.projectName\n },\n pilotQuantitativeObjectivesPushList: []\n };\n this.targetData.forEach(function (item) {\n if (!item.pushProgress) {\n item.passFail = true;\n data = false;\n }\n\n if (data) {\n if (_this4.status == 2 || _this4.status == 4 || _this4.status == 5 || _this4.status == undefined) {\n // 初始化的数据 没有id\n data.pilotQuantitativeObjectivesPushList.push({\n objectivesMeasuresId: item.id,\n pushDate: item.pushDate,\n pushProgress: item.pushProgress\n });\n } else {\n // 编辑数据 整个回传\n _this4.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 submit: function submit(status) {\n var _this5 = 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 console.log(data);\n\n if (data) {\n api(data, function (res) {\n if (res.state) {\n _this5.$message.success(message);\n\n _this5.$parent.reload();\n\n _this5.handleClose();\n } else {\n _this5.$message.warning(res.message);\n }\n\n _this5.saveLoading = false;\n });\n } else {\n this.saveLoading = false;\n this.$message.warning('请填写目标推进值');\n }\n },\n handleVerify: function handleVerify() {\n var _this6 = this;\n\n this.saveLoading = true;\n var data = {\n flowType: this.projectInfo.flowType,\n id: this.projectInfo.id,\n status: this.type == 1 ? 3 : 5 //3-责任单位领导审核通过 5-市委改革办审核通过\n\n };\n apiList.verify(data, function (res) {\n if (res.state) {\n _this6.$message.success('审核通过成功');\n\n _this6.$parent.reload();\n\n _this6.handleClose();\n } else {\n _this6.$message.warning(res.message);\n }\n\n _this6.saveLoading = false;\n });\n },\n // 审核驳回\n handleReject: function handleReject() {\n var _this7 = this;\n\n this.saveLoading = true;\n var status = this.type == 1 ? 2 : 4; // 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: 'success'\n }).then(function () {\n _this7.$refs.rejectInfoDialog.open('/majorProjects/pilotQuantitativeObjectivesPush/v1/quantitativeObjectivesPushExamine', status);\n }).catch(function () {\n _this7.saveLoading = false;\n });\n },\n // 处理填写的驳回意见\n sendRejectInfo: function sendRejectInfo(rejectInfo, api, status) {\n var _this8 = 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 _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 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 = moment().format('YYYY-MM');\n }\n }\n};",null]}