{"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\\MonthlyPlan\\components\\MonthlyPlanDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorReformProjects\\MonthlyPlan\\components\\MonthlyPlanDialog.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/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport _toConsumableArray from \"D:/jenkins/workspace/reform-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport \"core-js/modules/es6.object.is\";\nimport \"core-js/modules/es6.array.find\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport _defineProperty from \"D:/jenkins/workspace/reform-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.split\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 filePreview from '@/components/FilePreview/filePreview.vue';\nimport FileList from '@/components/uploadFile/newFileList.vue';\nimport apiList from '@/api/MajorReformProjects/MonthlyPlan';\nimport publicApi from '@/api/publicApi';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport moment from 'moment';\nimport RejectInfoBlockDialog from '@/components/dialog/RejectInfoBlockDialog.vue';\nimport req from '@/request.js';\nimport utils from '@/utils.js';\nvar portal = window.context.portal;\nexport default {\n name: 'MonthlyPlanDialog',\n components: {\n RejectInfoBlockDialog: RejectInfoBlockDialog,\n FileList: FileList,\n filePreview: filePreview,\n UploadFile: UploadFile\n },\n mixins: [TableMixin],\n data: function data() {\n var _this = this;\n\n // 验证函数\n var validate = function validate(rule, value, callback) {\n var index = rule.fullField.split('.')[1];\n var isOver = _this.formData.pilotMeasuresPushList[index].isOver; // 当为空值且为必填时,抛出错误,反之通过校验 defaultFileList\n\n if (rule.type == '附件') {\n var classified = _this.formData.pilotMeasuresPushList[index].classified;\n var fileList = _this.formData.pilotMeasuresPushList[index].defaultFileList;\n console.log(isOver == 3 && classified == '' && (!fileList || !fileList.length), classified);\n\n if (isOver == 3 && classified == '' && (!fileList || !fileList.length)) {\n callback(new Error(\"\\u8BA1\\u5212\\u5DF2\\u5B8C\\u6210\\uFF0C\\u8BF7\\u4E0A\\u4F20\".concat(rule.type, \"\\u6216\\u9009\\u62E9\\u5185\\u7F51\\u4E0A\\u4F20\")));\n } else {\n callback();\n }\n } else {\n if (!value && isOver == 3) {\n callback(new Error(\"\\u8BA1\\u5212\\u5DF2\\u5B8C\\u6210\\uFF0C\\u8BF7\\u8F93\\u5165\".concat(rule.type)));\n } else {\n callback();\n }\n }\n };\n\n return {\n activities: [],\n activeName: '',\n form: {},\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 loadType: '',\n activeCollapse: ['1', '3'],\n disabled: false,\n fillDate: moment().format('YYYY-MM'),\n loading: false,\n approvalComments: '',\n // 驳回理由\n approvalCommentsList: [],\n formData: {\n pilotProjectFill: {\n projectId: '',\n projectName: ''\n },\n pilotMeasuresPushList: [],\n pilotSpecificSchedulePushList: [{\n resultName: '',\n //成果的名称\n measuresPlanType: 1,\n //成果的类型\n basis: '',\n //相关依据\n defaultFileList: [],\n //附件\n classified: '',\n //文件涉密\n pushDate: '' //成果形成时间\n\n }]\n },\n pickerOptions: {\n disabledDate: function disabledDate(time) {\n return time.getTime() > Date.now();\n }\n },\n rules: {\n isOver: [{\n required: true,\n message: '请选择是否完成',\n trigger: 'change'\n }],\n completedWork: [{\n validator: validate,\n type: '已完成工作'\n }],\n problems: [{\n validator: validate,\n type: '存在问题'\n }],\n // workPlan: [{validator: validate, type: '下一步工作计划'}],\n workPlan: [{\n required: true,\n message: '请输入下一步工作计划',\n trigger: 'blur'\n }],\n hasFile: [{\n validator: validate,\n type: '附件',\n trigger: 'change'\n }]\n },\n addFileIndex: null,\n uploadType: '',\n historyFillDate: null,\n routeName: '',\n checkIds: [],\n removeIds: [],\n czwtOptions: []\n };\n },\n created: function created() {\n this.czwtOptions = utils.getDictItemsFromCache('yd_czwt');\n this.routeName = this.$route.name;\n },\n methods: {\n // setFillingTime() {\n // publicApi.setFillingTime(data, res => {\n // console.log(res);\n // })\n // },\n getNowDate: function getNowDate() {\n var _this2 = 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 = ''; // 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\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 _this2$projectInfo = _this2.projectInfo,\n projectId = _this2$projectInfo.projectId,\n fillDate = _this2$projectInfo.fillDate;\n var reqData = {\n projectId: projectId,\n fillDate: fillDate,\n flowType: 2,\n nowDate: date + '-' + '01'\n };\n\n if (fillDate) {\n publicApi.setFillingTime(reqData, function (res) {\n var time = res.value === -1 ? reqData.fillDate : reqData.nowDate;\n resolve(time);\n });\n } else {\n resolve(reqData.nowDate);\n }\n }\n });\n });\n },\n // 文件相关\n openUploade: function openUploade(index, type, uploadType) {\n this.uploadType = uploadType;\n this.addFileIndex = index;\n this.$refs.uploadFile.open(type);\n },\n setFileList: function setFileList(file) {\n var formatFile = _objectSpread(_objectSpread({}, file), {}, {\n id: file.response.fileId\n });\n\n if (this.formData[this.uploadType][this.addFileIndex].defaultFileList) {\n this.formData[this.uploadType][this.addFileIndex].defaultFileList.push(formatFile);\n } else {\n this.$set(this.formData[this.uploadType][this.addFileIndex], 'defaultFileList', []);\n this.formData[this.uploadType][this.addFileIndex].defaultFileList.push(formatFile);\n }\n\n if (this.uploadType == 'pilotMeasuresPushList') {\n this.formData[this.uploadType][this.addFileIndex].hasFile = true;\n this.$refs.form.validate('hasFile');\n }\n\n console.log(this.formData);\n },\n changeFileList: function changeFileList(data, index, type) {\n this.formData[type][index].defaultFileList = data;\n\n if (type == 'pilotMeasuresPushList') {\n if (!this.formData[type][index].defaultFileList.length) {\n this.formData[type][index].hasFile = false;\n }\n\n this.$refs.form.validate('hasFile');\n }\n\n console.log(this.formData);\n },\n setAipher: function setAipher() {\n if (this.uploadType == 'pilotMeasuresPushList') {\n this.$refs.form.validate('hasFile');\n }\n\n this.$set(this.formData[this.uploadType][this.addFileIndex], 'classified', '文件涉密,已通过内网邮件上传。');\n this.$set(this.formData[this.uploadType][this.addFileIndex], 'hasFile', true);\n console.log(this.formData);\n },\n deleteTag: function deleteTag(index, type) {\n this.$set(this.formData[type][index], 'classified', '');\n\n if (type == 'pilotMeasuresPushList') {\n this.$refs.form.validate('hasFile');\n }\n\n console.log(this.formData);\n },\n idExist: function idExist(id) {\n if (!this.checkIds.includes(id) || this.checkIds && !this.checkIds.length) {\n this.removeIds.push(id);\n }\n },\n // ------------\n addTableData: function addTableData() {\n var data = {\n resultName: '',\n //成果的名称\n measuresPlanType: 1,\n //成果的类型\n basis: '',\n //相关依据\n defaultFileList: [],\n //附件\n classified: '',\n //文件涉密\n pushDate: '' //成果形成时间\n\n };\n this.formData.pilotSpecificSchedulePushList.push(data);\n },\n deleteTableData: function deleteTableData(item, index) {\n this.formData.pilotSpecificSchedulePushList.splice(index, 1);\n },\n // 批量删除附件\n saveRemoveFiles: function saveRemoveFiles() {\n var ids = this.removeIds.join(',');\n req.remove(portal + \"/file/v1/?ids=\".concat(ids)).then(function (res) {});\n },\n // type 0 待更新 1责任审核 2市级确认 3 其他\n openForm: function openForm(item, title, type, btnType) {\n var _this3 = this;\n\n this.reqLoading = true;\n this.btnType = btnType;\n this.status = item.status;\n this.projectInfo = item;\n this.title = title;\n this.type = type;\n\n if (title === '待更新' || title === '编辑' || title === '更新') {\n this.getNowDate().then(function (res) {\n _this3.fillDate = res;\n });\n } else {\n this.fillDate = item.fillDate;\n }\n\n if (type == 0) {\n // 待更新\n this.loadProjectData();\n this.reqLoading = false;\n } else {\n // 审核 更新 编辑 详情...\n this.loadAuditData();\n this.getHistoryDetail(item.projectId);\n }\n\n if (this.title == '详情') {\n this.showDetails = true;\n }\n\n this.formVisible = true;\n },\n getFlag: function getFlag(item) {\n return item.isOver == 3 && (item.planType == 5 || item.planType == 4 || item.planType == 6 || item.planType == 7);\n },\n // 获取待审核信息\n loadAuditData: function loadAuditData(type) {\n var _this4 = this;\n\n // 待审核数据\n this.loading = true;\n apiList.getAuditData(this.projectInfo.id, function (res) {\n console.log(res);\n\n if (res) {\n _this4.approvalComments = res.pilotProjectFill && res.pilotProjectFill.approvalComments || '';\n\n if (_this4.approvalComments) {\n _this4.approvalCommentsList = _this4.approvalComments.split('$_$');\n }\n\n if (res && res.pilotMeasuresPushList) {\n res.pilotMeasuresPushList.forEach(function (item) {\n item.isOpen = false;\n\n if (item.defaultFileList && item.defaultFileList.length) {\n item.hasFile = true;\n } else {\n item.hasFile = false;\n }\n\n if (item.isOver == 1 && item.status == 7) {\n item.disabled = true;\n } else {\n item.disabled = false;\n }\n\n if (!_this4.getFlag(item)) {\n var problemArr = item.problems ? item.problems.split('key_value') : [];\n\n if (!problemArr.length) {\n item.problemKeys = [];\n item.problems = '';\n } else {\n var problemKeyArr = problemArr[0].split('key_key') || [];\n\n if (problemArr.length > 1) {\n item.problemKeys = problemKeyArr;\n item.problems = problemArr[1];\n } else {\n var obj = problemKeyArr.find(function (item) {\n return Object.is(item - 0, NaN);\n });\n\n if (obj) {\n item.problemKeys = ['4'];\n item.problems = problemArr[0];\n } else {\n item.problemKeys = problemKeyArr;\n item.problems = '';\n }\n }\n }\n }\n });\n _this4.formData.pilotMeasuresPushList = res.pilotMeasuresPushList;\n }\n\n if (res && res.pilotSpecificSchedulePushList) {\n res.pilotSpecificSchedulePushList.forEach(function (item) {\n if (item.status == 7) {\n item.disabled = true;\n } else {\n item.disabled = false;\n }\n });\n res.pilotSpecificSchedulePushList[0].disabled = true;\n _this4.formData.pilotSpecificSchedulePushList = res.pilotSpecificSchedulePushList;\n }\n\n if (res && res.pilotProjectFill) {\n _this4.formData.pilotProjectFill = res.pilotProjectFill;\n }\n\n _this4.loading = false;\n _this4.reqLoading = false;\n }\n });\n },\n // 查询历史审核信息\n getHistoryDetail: function getHistoryDetail(id) {\n var _this5 = this;\n\n apiList.getHistoryDetailById(id, function (res) {\n if (res.pilotMeasuresPushHistoryList && res.pilotMeasuresPushHistoryList.length) {\n _this5.historyFillDate = res;\n res.pilotMeasuresPushHistoryList.forEach(function (item) {\n var arr = item.defaultFileList && item.defaultFileList.map(function (file) {\n return file.id;\n }) || [];\n _this5.checkIds = [].concat(_toConsumableArray(arr), _toConsumableArray(_this5.checkIds));\n });\n }\n\n if (res.pilotProjectFillHistory && res.pilotProjectFillHistory.approvalComments) {\n _this5.historyFillDate.pilotProjectFillHistory.approvalComments = res.pilotProjectFillHistory.approvalComments.split('$_$');\n }\n\n _this5.reqLoading = false;\n });\n },\n // 获取项目初始化信息\n loadProjectData: function loadProjectData() {\n var _this6 = this;\n\n var data = {\n projectId: this.projectInfo.projectId\n };\n this.loading = true;\n this.formData.pilotMeasuresPushList = [];\n apiList.getDefaultQuaObj(data, function (res) {\n if (res && res.pilotSpecificScheduleList) {\n var tempData = res.pilotSpecificScheduleList.map(function (item) {\n var data = {\n measuresId: item.id,\n planType: item.planType,\n planYear: item.planYear,\n planQuarter: item.planQuarter,\n planMonth: item.planMonth,\n planContent: item.planContent,\n isOver: item.isOver || 1,\n isOpen: false\n };\n return data;\n });\n _this6.formData.pilotMeasuresPushList = tempData;\n }\n\n _this6.markLoading = false;\n _this6.loading = false;\n });\n },\n // 表单提交保存\n submit: function submit(status) {\n var _this7 = this;\n\n // this.saveLoading = true\n var api = apiList.save,\n message = '保存为草稿成功';\n\n if (status) {\n api = apiList.saveAndSubmit;\n message = '保存并上报成功';\n }\n\n var data = JSON.parse(JSON.stringify(this.formData));\n var flag = true;\n var isOver = 0;\n data.pilotMeasuresPushList.forEach(function (item) {\n item.classified = item.defaultFileList && item.defaultFileList.length ? '' : item.classified;\n\n if (item.isOver == 3) {\n var isFile = !item.defaultFileList ? false : !item.defaultFileList.length ? false : true;\n\n if (!item.classified && !isFile || !item.completedWork) {\n flag = false;\n\n _this7.expend(item);\n\n _this7.$nextTick(function () {\n _this7.$refs.form.validate(function (valid) {});\n });\n\n return;\n }\n } // if (item.isOver == 2) {\n // if (!item.workPlan) {\n // flag = false\n // isOver = 2\n // this.expend(item)\n // this.$nextTick(() => {\n // this.$refs.form.validate((valid) => { })\n // })\n // return\n // }\n // }\n\n\n var problemsStr = item.problemKeys ? item.problemKeys.join('key_key') : '';\n item.problems = !problemsStr ? item.problems : problemsStr + 'key_value' + item.problems;\n });\n this.$refs.form.validate(function (valid) {\n if (valid && flag) {\n var msg = status ? '保存并上报' : '保存为草稿';\n\n _this7.$confirm(\"\\u786E\\u8BA4\".concat(msg, \"?\"), '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this7.markLoading = true;\n\n _this7.getNowDate().then(function (res) {\n if (!data.pilotProjectFill.id) {\n data.pilotProjectFill = {\n projectId: _this7.projectInfo.projectId,\n projectName: _this7.projectInfo.projectName\n };\n }\n\n if (data.pilotProjectFill.status == 2 || data.pilotProjectFill.status == 4 || data.pilotProjectFill.status == 6 || data.pilotProjectFill.status == 7) {\n data.pilotProjectFill = {\n projectId: _this7.projectInfo.projectId,\n projectName: _this7.projectInfo.projectName\n };\n var pilotMeasuresPushList = data.pilotMeasuresPushList.map(function (item) {\n return {\n hasFile: item.hasFile,\n isOver: item.isOver,\n measuresId: item.measuresId,\n planContent: item.planContent,\n planQuarter: item.planQuarter,\n planMonth: item.planMonth,\n planType: item.planType,\n planYear: item.planYear,\n problems: item.problems,\n workPlan: item.workPlan,\n completedWork: item.completedWork,\n classified: item.classified,\n defaultFileList: item.defaultFileList\n };\n });\n data.pilotMeasuresPushList = pilotMeasuresPushList;\n }\n\n data.pilotProjectFill.fillDate = res;\n api(data, function (res) {\n if (res.state) {\n _this7.removeIds.length && _this7.saveRemoveFiles();\n\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.markLoading = false;\n });\n }); // if (this.status == 4) {\n // data.pilotProjectFill.fillDate = this.projectInfo.fillDate\n // api(data, (res) => {\n // if (res.state) {\n // this.removeIds.length && this.saveRemoveFiles()\n // this.$message.success(message)\n // this.$parent.reload()\n // this.handleClose()\n // } else {\n // this.$message.warning(res.message)\n // }\n // this.markLoading = false\n // })\n // } else {\n // this.getNowDate().then(res => {\n // let date = res + '-' + '01'\n // data.pilotProjectFill.fillDate = date\n // api(data, (res) => {\n // if (res.state) {\n // this.removeIds.length && this.saveRemoveFiles()\n // this.$message.success(message)\n // this.$parent.reload()\n // this.handleClose()\n // } else {\n // this.$message.warning(res.message)\n // }\n // this.markLoading = false\n // })\n // })\n // }\n\n });\n } else {\n if (!valid) {\n _this7.$message.warning('计划内容填写不规范,请核查!');\n } else {\n if (!flag) {\n var _msg = isOver == 2 ? '推进中' : '已完成';\n\n _this7.$message.warning(\"\".concat(_msg, \"\\u4EFB\\u52A1\\u8BA1\\u5212\\u5185\\u5BB9\\u586B\\u5199\\u6709\\u8BEF,\\u8BF7\\u6838\\u67E5\\uFF01\"));\n }\n }\n\n _this7.saveLoading = false;\n }\n });\n },\n handleVerify: function handleVerify() {\n var _this8 = this;\n\n var data = JSON.parse(JSON.stringify(this.formData));\n var monthList = data.pilotMeasuresPushList;\n var flag = true;\n var isOver = 0;\n monthList.forEach(function (item) {\n if (item.isOver == 3) {\n var isFile = !item.defaultFileList ? false : !item.defaultFileList.length ? false : true;\n\n if (!item.classified && !isFile || !item.completedWork) {\n flag = false;\n return;\n }\n } // if (item.isOver == 2) {\n // if (!item.workPlan) {\n // flag = false\n // isOver = 2\n // return\n // }\n // }\n\n });\n this.$refs.form.validate(function (valid) {\n if (valid && flag) {\n var status = _this8.type == 1 ? 3 : _this8.type == 2 ? 5 : 7; //3-责任单位领导审核通过 5-市委改革办审核通过\n\n var message = '确认通过吗?';\n _this8.btnLoading = true;\n\n _this8.$confirm(message, _this8.$t('common.tips'), {\n confirmButtonText: _this8.$t('common.confirm'),\n cancelButtonText: _this8.$t('common.cancel'),\n type: 'success'\n }).then(function () {\n _this8.markLoading = true;\n\n if (!_this8.formData.pilotProjectFill.id) {\n _this8.formData.pilotProjectFill = _this8.projectInfo;\n }\n\n var data = JSON.parse(JSON.stringify(_this8.formData));\n data.pilotMeasuresPushList.forEach(function (item) {\n var problemsStr = item.problemKeys ? item.problemKeys.join('key_key') : '';\n item.problems = !problemsStr ? item.problems : problemsStr + 'key_value' + item.problems;\n });\n data.pilotProjectFill.status = status;\n apiList.saveAndCommit(data, function (res) {\n if (res.state) {\n _this8.removeIds.length && _this8.saveRemoveFiles();\n\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.markLoading = false;\n _this8.saveLoading = false;\n });\n });\n } else {\n if (!valid) {\n _this8.$message.warning('计划内容填写不规范,请核查!');\n } else {\n if (!flag) {\n var msg = isOver == 2 ? '推进中' : '已完成';\n\n _this8.$message.warning(\"\".concat(msg, \"\\u4EFB\\u52A1\\u8BA1\\u5212\\u5185\\u5BB9\\u586B\\u5199\\u6709\\u8BEF,\\u8BF7\\u6838\\u67E5\\uFF01\"));\n }\n }\n\n _this8.saveLoading = false;\n }\n }); // this.saveLoading = true\n // let data = {\n // id: this.projectInfo.id,\n // status: this.type == 1 ? 3 : 5 //3-责任单位领导审核通过 5-市委改革办审核通过\n // }\n // apiList.verify(data, res => {\n // if (res.state) {\n // this.$message.success('审核通过成功')\n // this.$parent.reload()\n // this.handleClose()\n // } else {\n // this.$message.warning(res.message)\n // }\n // this.saveLoading = false\n // })\n },\n // 审核驳回\n handleReject: function handleReject() {\n var _this9 = this;\n\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: 'success'\n }).then(function () {\n _this9.$refs.RejectInfoBlockDialog.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 this.markLoading = true;\n\n if (!rejectInfo) {\n this.markLoading = false;\n this.saveLoading = false;\n return;\n }\n\n if (!this.formData.pilotProjectFill.id) {\n this.formData.pilotProjectFill = this.projectInfo; // this.formData.pilotProjectFill = {\n // projectId: this.projectInfo.projectId,\n // projectName: this.projectInfo.projectName\n // }\n }\n\n var data = JSON.parse(JSON.stringify(this.formData));\n data.pilotMeasuresPushList.forEach(function (item) {\n var problemsStr = item.problemKeys ? item.problemKeys.join('key_key') : '';\n item.problems = !problemsStr ? item.problems : problemsStr + 'key_value' + item.problems;\n });\n data.pilotProjectFill.approvalComments = rejectInfo;\n data.pilotProjectFill.status = status; // let data = {\n // approvalComments: rejectInfo,\n // id: this.projectInfo.id,\n // status: status //3-责任单位领导审核通过 5-市委改革办审核通过\n // }\n\n apiList.saveAndCommit(data, function (res) {\n if (res.state) {\n _this10.removeIds.length && _this10.saveRemoveFiles();\n\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.markLoading = false;\n _this10.saveLoading = false;\n });\n },\n handleClose: function handleClose() {\n this.removeIds = [];\n this.saveLoading = false;\n this.formVisible = false;\n this.showDetails = false;\n this.approvalComments = '';\n this.approvalCommentsList = [];\n this.historyFillDate = null;\n this.fillDate = '';\n this.formData = {\n pilotProjectFill: {\n projectId: '',\n projectName: ''\n },\n pilotMeasuresPushList: [],\n pilotSpecificSchedulePushList: [{\n resultName: '',\n //成果的名称\n measuresPlanType: 1,\n //成果的类型\n basis: '',\n //相关依据\n defaultFileList: [],\n //附件\n classified: '',\n //文件涉密\n pushDate: '' //成果形成时间\n\n }]\n };\n },\n expend: function expend(row) {\n row.isOpen = !row.isOpen;\n var $table = this.$refs.myTable;\n this.formData.pilotMeasuresPushList.map(function (item) {\n item.expansion = !item.expansion; // if (row.measuresId != item.measuresId) {\n // $table.toggleRowExpansion(item, false)\n // item.expansion = false\n // } else {\n // item.expansion = !item.expansion\n // }\n });\n $table.toggleRowExpansion(row);\n },\n historyExpend: function historyExpend(row) {\n var $table = this.$refs.myHistoryTable;\n this.historyFillDate.pilotMeasuresPushHistoryList.map(function (item) {\n if (row.measuresId != item.measuresId) {\n $table.toggleRowExpansion(item, false);\n item.expansion = false;\n } else {\n item.expansion = !item.expansion;\n }\n });\n $table.toggleRowExpansion(row);\n }\n }\n};",null]}