{"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\\ReformPilotManage\\components\\MunicipalPilotDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformPilotManage\\components\\MunicipalPilotDialog.vue","mtime":1687936910001},{"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.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport _toConsumableArray from \"D:/jenkins/workspace/reform-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"core-js/modules/web.dom.iterable\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 pilot from '@/api/pilotprojects';\nimport FormResultsDialog from \"./FormResultsDialog\";\nimport filePreview from '@/components/FilePreview/filePreview.vue';\nimport UploadFile from '@/components/uploadFile/index.vue';\nimport FileList from '@/components/uploadFile/newFileList.vue';\nimport RejectInfoDialog from '@/components/dialog/RejectInfoDialog.vue';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport req from '@/request.js';\nimport utils from '@/utils.js';\nvar portal = window.context.portal;\nexport default {\n name: 'MunicipalPilotDialog',\n components: {\n FormResultsDialog: FormResultsDialog,\n filePreview: filePreview,\n UploadFile: UploadFile,\n RejectInfoDialog: RejectInfoDialog,\n FileList: FileList\n },\n mixins: [TableMixin],\n data: function data() {\n var _this = this;\n\n var checkUnitName = function checkUnitName(rule, value, callback) {\n if (_this.unitValue && !_this.unitValue.length) {\n return callback(new Error('请选择市级主管部门'));\n } else {\n callback();\n }\n };\n\n var checkAcceptanceTime = function checkAcceptanceTime(rule, value, callback) {\n if (_this.parameter.timePeriod == 1) {\n if (!value) {\n return callback(new Error('请根据文件规定的试点期限选择验收时间'));\n } else {\n callback();\n }\n } else {\n callback();\n }\n };\n\n var checkInvs = function checkInvs(rule, value, callback) {\n if (!_this.districtValue.length) {\n return callback(new Error('请选择部署该试点项目的文件中明确的所有参与试点区县'));\n } else {\n callback();\n }\n };\n\n var checkDocNo = function checkDocNo(rule, value, callback) {\n var _this$parameter = _this.parameter,\n docNum = _this$parameter.docNum,\n docYear = _this$parameter.docYear,\n docName = _this$parameter.docName;\n\n if (!docNum || !docYear || !docName) {\n return callback(new Error('请输入完整的试点文件文号'));\n } else {\n var docNo = \"\".concat(docName, \"\\u3010\").concat(docYear, \"\\u3011\").concat(docNum, \"\\u53F7\");\n var data = {\n docNo: docNo,\n id: _this.parameter.id || ''\n };\n pilot.munCheckDocNo(data, function (res) {\n if (res) {\n return callback();\n } else {\n return callback(new Error('该试点文件文号已存在,请勿重复录入'));\n }\n });\n }\n };\n\n return {\n myDialog: {\n title: '新增'\n },\n classified: 0,\n //0代表不涉密, 1代表涉密\n options: [{\n value: 0,\n label: '长期'\n }, {\n value: 1,\n label: '限时'\n }],\n showDetail: false,\n reqLoading: false,\n markLoading: false,\n fileList: [],\n treeData: [],\n unitValue: [],\n formIsShow: true,\n activeCollapse1: ['1', '2', '3'],\n visible: false,\n rules: {\n timePeriod: [{\n required: true,\n message: '请选择试点期限',\n trigger: 'change'\n }],\n leadUnitIds: [{\n required: true,\n message: '请选择市级牵头部门',\n trigger: 'change'\n }],\n groupName: [{\n required: true,\n message: '请选择专项小组',\n trigger: 'change'\n }],\n unitName: [{\n required: true,\n validator: checkUnitName,\n trigger: 'change'\n }],\n taskDetails: [{\n required: true,\n message: '请条目式总结提炼部署该试点项目文件中关于试点任务的描述',\n trigger: 'blur'\n }],\n documentBasis: [{\n required: true,\n message: '请输入部署该试点项目的文件名称',\n trigger: 'blur'\n }],\n pilotProjectName: [{\n required: true,\n message: '请输入试点项目名称',\n trigger: 'blur'\n }],\n pilotLevel: [{\n required: true,\n message: '请选择试点层级',\n trigger: 'blur'\n }],\n invs: [{\n required: true,\n validator: checkInvs,\n trigger: 'change'\n }],\n pilotSupervisor: [{\n required: true,\n message: '请选择国家级主管部委',\n trigger: 'blur'\n }],\n pilotField: [{\n required: true,\n message: '请选择所属领域',\n trigger: 'blur'\n }],\n pilotRunway: [{\n required: true,\n message: '请选择所属跑道',\n trigger: 'blur'\n }],\n startTime: [{\n required: true,\n message: '请选择部署该试点项目的文件印发时间',\n trigger: 'blur'\n }],\n acceptanceTime: [{\n required: true,\n // message: '请根据文件规定的试点期限选择验收时间',\n validator: checkAcceptanceTime,\n trigger: 'blur'\n }],\n pilotTarget: [{\n required: true,\n message: '请条目式总结提炼部署该试点项目文件中关于目标的描述',\n trigger: 'blur'\n }],\n docNo: [{\n required: true,\n validator: checkDocNo,\n trigger: 'blur'\n }]\n },\n queryParam: {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n },\n parameter: {},\n updateInfo: {},\n rules2: {\n propulsiveStatus: [{\n required: true,\n message: '请选择推进状态',\n trigger: 'change'\n }],\n actualTime: [{\n required: true,\n message: '请选择验收时间',\n trigger: 'change'\n }]\n },\n reqData: {\n pageBean: {\n page: 1,\n pageSize: 10,\n showTotal: true\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: '',\n relation: 'AND',\n value: {}\n }]\n },\n tableData: [],\n pickerOptions: {\n disabledDate: function disabledDate(time) {\n return time.getTime() > Date.now();\n }\n },\n pickerOptions2: {\n disabledDate: function disabledDate(time) {\n return time.getTime() < new Date(_this.parameter.startTime);\n }\n },\n groupList: [],\n RunwaOoptions: [],\n fileType: '',\n saveType: '',\n status: 0,\n histroyData: null,\n recordOptions: [],\n // 历史验收材料附件ids \n checkIds: [],\n // 历史成果附件ids\n reslultIds: [],\n isRequest: true,\n removeIds: []\n };\n },\n created: function created() {\n this.treeData = JSON.parse(sessionStorage.getItem('responsibilityTree'));\n this.recordOptions = utils.getDictItemsFromCache('sd_tjzt');\n this.getGroupList();\n },\n methods: {\n // 查询列表\n // 拼接试点文件文号\n closeMenu: function closeMenu() {\n var _this$parameter2 = this.parameter,\n docNum = _this$parameter2.docNum,\n docYear = _this$parameter2.docYear,\n docName = _this$parameter2.docName;\n\n if (docNum && docYear && docName) {\n this.parameter.docNo = \"\".concat(docName, \"\\u3010\").concat(docYear, \"\\u3011\").concat(docNum, \"\\u53F7\");\n }\n },\n munNameChange: function munNameChange(e) {\n var _this2 = this;\n\n this.$nextTick(function () {\n _this2.parameter.leadUnitName = _this2.$refs['cascader'].getCheckedNodes()[0] && _this2.$refs['cascader'].getCheckedNodes()[0].label;\n });\n },\n unitChange: function unitChange() {\n var _this3 = this;\n\n this.$nextTick(function () {\n var nodesObj = _this3.$refs['unitCascader'].getCheckedNodes();\n\n if (nodesObj.length) {\n _this3.parameter.unitCode = nodesObj[0].data.code;\n _this3.parameter.unitName = nodesObj[0].label;\n _this3.parameter.unitId = nodesObj[0].data.id;\n _this3.parameter.unitGrade = nodesObj[0].data.grade;\n } else {\n _this3.parameter.unitCode = '';\n _this3.parameter.unitName = '';\n _this3.parameter.unitId = '';\n _this3.parameter.unitGrade = '';\n }\n });\n },\n // 获取专项小组列表\n getGroupList: function getGroupList() {\n var _this4 = this;\n\n var data = JSON.parse(JSON.stringify(this.queryParam));\n data.pageBean.pageSize = -1;\n req.post(portal + \"/fill/bizSpecialGroup/v1/queryPageList\", data).then(function (res) {\n res.data.rows.forEach(function (item) {\n return item.check = false;\n });\n _this4.groupList = res.data.rows.filter(function (item) {\n return item.groupType === 2;\n });\n });\n },\n // 专项小组变化\n groupChange: function groupChange(e) {\n var groupObj = {};\n this.groupList.forEach(function (item) {\n if (item.groupName === e) {\n groupObj = item;\n }\n });\n this.parameter.pilotField = groupObj.groupField ? groupObj.groupField + '' : '';\n this.unitValue = this.getParentsById(this.treeData, groupObj.orgId);\n this.unitChange();\n this.getRunwaOoptions(this.parameter.pilotField);\n this.$set(this.parameter, 'pilotRunway', '');\n },\n // 根据所属领域获取所属跑道\n getRunwaOoptions: function getRunwaOoptions(pilotField) {\n var _this5 = this;\n\n var arr = utils.getDictItemsFromCache('ggbb_ssly');\n arr.forEach(function (item) {\n if (item.value == pilotField) {\n _this5.RunwaOoptions = item.lowerDic['ggbb_sspd'];\n }\n });\n },\n // ------------文件相关--------------\n openUploade: function openUploade(fileType, type) {\n this.fileType = fileType;\n this.saveType = type;\n this.$refs.uploadFile.open('Pilot');\n },\n // 文件涉密\n setAipher: function setAipher(val) {\n if (val) {\n if (this.fileType === 'pilot') {\n this.$set(this.parameter, 'classified', '1');\n } else {\n this.$set(this.updateInfo, 'classified', '1');\n }\n\n if (this.saveType === 'Auto') {\n this.handlSaveOrUpdate();\n }\n }\n },\n // 上传附件\n setFileList: function setFileList(file) {\n if (this.fileType === 'pilot') {\n this.parameter.files ? this.parameter.files.push(file) : this.$set(this.parameter, 'files', [file]);\n this.parameter.classified = '';\n } else {\n this.updateInfo.files ? this.updateInfo.files.push(file) : this.$set(this.updateInfo, 'files', [file]);\n this.updateInfo.classified = '';\n }\n },\n changeFileList: function changeFileList(arr, type) {\n if (type === 'pilot') {\n this.parameter.files = arr; // this.$set(this.parameter, 'files', arr)\n } else if (type === 'record') {\n this.updateInfo.files = arr; // this.$set(this.parameter1, 'files', arr)\n }\n },\n idExist: function idExist(id) {\n if (!this.checkIds.includes(id)) {\n this.removeIds.push(id);\n } // if (this.checkIds.includes(id)) {\n // this.isRequest = false\n // } else {\n // this.isRequest = true\n // }\n\n },\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 console.log(res);\n });\n },\n getParentsByName: function getParentsByName(list, name) {\n var _iterator = _createForOfIteratorHelper(list),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n\n if (item.name == name) {\n return [item.id];\n }\n\n if (item.children) {\n var node = this.getParentsByName(item.children, name);\n\n if (node !== undefined) {\n node.unshift(item.id);\n return node;\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n getParentsById: function getParentsById(list, id) {\n var _iterator2 = _createForOfIteratorHelper(list),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var item = _step2.value;\n\n if (item.id == id) {\n return [item.id];\n }\n\n if (item.children) {\n var node = this.getParentsById(item.children, id);\n\n if (node !== undefined) {\n node.unshift(item.id);\n return node;\n }\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n },\n // 打开弹框编辑\n add: function add(item, title) {\n this.recordOptions.forEach(function (item) {\n item.disabled = false;\n });\n this.parameter = item;\n\n if (title !== '新增') {\n this.parameter.pilotRunway = item.pilotRunway + '';\n this.unitValue = this.getParentsById(this.treeData, item.unitId);\n this.getRunwaOoptions(item.pilotField);\n this.$set(this.parameter, 'leadUnitIds', this.getParentsByName(this.treeData, item.leadUnitName));\n this.getFiles(item.id, 'pilot');\n this.getRecordAndResults(item.id);\n }\n\n this.myDialog.title = title;\n this.visible = true;\n },\n // 打开成果形式弹窗\n addResult: function addResult(item, index) {\n this.tableIndex = index;\n item.fileList = item.files || [];\n this.$refs.FormResultsDialog.reslultIds = this.reslultIds;\n this.$refs.FormResultsDialog.open(item);\n },\n // 添加成果形式\n pushTableData: function pushTableData(data) {\n var arr = JSON.parse(JSON.stringify(this.tableData));\n\n if (!arr.length || this.tableIndex === undefined) {\n arr.push(data);\n } else {\n arr.splice(this.tableIndex, 1, data);\n }\n\n this.tableData = arr;\n this.updateInfo.results = arr;\n },\n // 删除成果形式\n deleteDate: function deleteDate(index) {\n this.tableData.splice(index, 1);\n },\n // 提交保存判断校验是否通过\n handlSaveOrUpdate: function handlSaveOrUpdate(status) {\n var _this6 = this;\n\n if (typeof status === 'number') {\n this.status = status;\n }\n\n this.$refs.pilotForm.validate(function (valid1) {\n if (valid1) {\n var _this6$parameter = _this6.parameter,\n classified = _this6$parameter.classified,\n files = _this6$parameter.files;\n\n if ((classified != '1' || !classified) && (!files || !files.length)) {\n _this6.$confirm('请上传佐证材料后保存。', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n _this6.openUploade('pilot', 'Auto');\n });\n } else {\n _this6.$refs.recordForm.validate(function (valid2) {\n if (valid2) {\n var _this6$updateInfo = _this6.updateInfo,\n _classified = _this6$updateInfo.classified,\n _files = _this6$updateInfo.files,\n propulsiveStatus = _this6$updateInfo.propulsiveStatus,\n results = _this6$updateInfo.results;\n\n if (propulsiveStatus == '3' && (!_classified || _classified != '1') && (!_files || !_files.length)) {\n _this6.$confirm('请上传相关验收材料后保存。', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n _this6.openUploade('record', 'Auto');\n });\n } else {\n if (propulsiveStatus != '3') {\n _this6.updateInfo.actualTime = '';\n }\n\n if (!_this6.status && (!results || !results.length)) {\n _this6.$confirm('没有录入试点成果内容,是否保存?', '提示', {\n confirmButtonText: '保存',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this6.saveData();\n }).catch(function () {});\n } else {\n var msg = _this6.status === 0 ? '保存为草稿' : _this6.status == 1 ? '保存并上报' : _this6.status == 2 || _this6.status == 4 || _this6.status == 6 ? '驳回' : _this6.status === _this6.updateInfo.status ? '修改保存' : '通过';\n\n _this6.$confirm(\"\\u786E\\u8BA4\".concat(msg, \"?\"), '提示', {\n confirmButtonText: '确认',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this6.saveData();\n });\n }\n }\n }\n });\n }\n }\n });\n },\n // 提交数据\n saveData: function saveData(approvalComments) {\n var _this7 = this;\n\n this.markLoading = true;\n var data = JSON.parse(JSON.stringify(this.parameter));\n var record = JSON.parse(JSON.stringify(this.updateInfo));\n record.status = this.status;\n record.approvalComments = approvalComments && approvalComments;\n data.files && data.files.forEach(function (item) {\n item.id = item.id || item.response.fileId;\n });\n record.files && record.files.forEach(function (item) {\n item.id = item.id || item.response.fileId;\n });\n record.results && record.results.forEach(function (item) {\n item.files = item.fileList && item.fileList.map(function (file) {\n file.id = file.id || file.response.fileId;\n return file;\n });\n delete item.fileList;\n });\n delete data.leadUnitIds;\n data.record = record;\n var msg = this.status == 0 ? '保存为草稿' : this.status == 1 ? '保存并上报' : this.status == 2 || this.status == 4 || this.status == 6 ? '驳回' : this.status === this.updateInfo.status ? '修改保存' : '通过';\n pilot.saveOrUpdate(data, function (res) {\n if (res.state) {\n _this7.$message.success(\"\".concat(msg, \"\\u6210\\u529F\"));\n\n _this7.$emit('sendMsg');\n\n _this7.handleClose();\n\n _this7.removeIds.length && _this7.saveRemoveFiles();\n } else {\n _this7.$message.error(\"\".concat(msg, \"\\u5931\\u8D25\\uFF0C\\u8BF7\\u7A0D\\u540E\\u91CD\\u8BD5\"));\n }\n\n _this7.markLoading = false;\n });\n },\n // 根据推进id查询推进信息及成果信息\n getRecordAndResults: function getRecordAndResults(id) {\n var _this8 = this;\n\n this.reqLoading = true;\n pilot.getRecordAndResults(id, function (res) {\n if (res.length) {\n _this8.updateInfo = res[0] || {};\n _this8.updateInfo.approvalComments = _this8.updateInfo.approvalComments && _this8.updateInfo.approvalComments.split('$_$');\n _this8.tableData = res[0].results || [];\n\n if (_this8.updateInfo.propulsiveStatus == 3) {\n _this8.getFiles(res[0].id, 'record');\n }\n\n if (_this8.myDialog.title === '更新' && (res[0].status == 2 || res[0].status == 4 || res[0].status == 6 || res[0].status == 7)) {\n _this8.histroyData = JSON.parse(JSON.stringify(_this8.updateInfo));\n\n if (_this8.histroyData.propulsiveStatus == 3) {\n _this8.getFiles(res[0].id, 'his');\n }\n\n _this8.updateInfo.id = '';\n _this8.updateInfo.results && _this8.updateInfo.results.forEach(function (item) {\n item.id = '';\n });\n\n if (res[0].status === 7) {\n _this8.recordOptions.forEach(function (item) {\n if (item.value - 0 < res[0].propulsiveStatus) {\n item.disabled = true;\n }\n });\n } // 历史成果附件ids\n\n\n _this8.histroyData.results && _this8.histroyData.results.forEach(function (item) {\n var arr = item.files.map(function (file) {\n return file.id;\n });\n _this8.reslultIds = [].concat(_toConsumableArray(_this8.reslultIds), _toConsumableArray(arr));\n });\n } else {\n if (res[1]) {\n _this8.histroyData = res[1] || null;\n _this8.histroyData.approvalComments = res[1].approvalComments && res[1].approvalComments.split('$_$');\n\n if (res[1] && res[1].propulsiveStatus == 3) {\n _this8.getFiles(res[1].id, 'his');\n }\n\n if (res[1].status === 7) {\n _this8.recordOptions.forEach(function (item) {\n if (item.value - 0 < res[1].propulsiveStatus) {\n item.disabled = true;\n }\n });\n } // 历史成果附件ids\n\n\n _this8.histroyData.results && _this8.histroyData.results.forEach(function (item) {\n var arr = item.files.map(function (file) {\n return file.id;\n });\n _this8.reslultIds = [].concat(_toConsumableArray(_this8.reslultIds), _toConsumableArray(arr));\n });\n }\n }\n }\n\n _this8.reqLoading = false;\n });\n },\n // 根据id查询附件列表\n getFiles: function getFiles(id, type) {\n var _this9 = this;\n\n var data = JSON.parse(JSON.stringify(this.queryParam));\n data.querys = [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'BIZ_ID_',\n relation: 'AND',\n value: id\n }];\n req.post(portal + '/file/v1/list', data).then(function (res) {\n if (res) {\n if (type === 'pilot') {\n _this9.$set(_this9.parameter, 'files', res.data.rows);\n } else if (type === 'record') {\n _this9.$set(_this9.updateInfo, 'files', res.data.rows);\n\n _this9.checkIds = res.data.rows && res.data.rows.map(function (item) {\n return item.id;\n });\n } else if (type === 'his') {\n _this9.$set(_this9.histroyData, 'files', res.data.rows);\n }\n }\n });\n },\n // 审核通过\n handleApprove: function handleApprove() {\n var name = this.$route.name;\n this.status = name == 'MunicipalPilotAudit' ? 3 : name == 'MunicipalPilotValidation' ? 5 : 7;\n this.handlSaveOrUpdate();\n },\n // 审核驳回\n handleReject: function handleReject() {\n var _this10 = this;\n\n var name = this.$route.name;\n this.status = name == 'MunicipalPilotAudit' ? 2 : name == 'MunicipalPilotValidation' ? 4 : 6;\n this.$refs.pilotForm.validate(function (valid1) {\n if (valid1) {\n var _this10$parameter = _this10.parameter,\n classified = _this10$parameter.classified,\n files = _this10$parameter.files;\n\n if ((classified != '1' || !classified) && (!files || !files.length)) {\n _this10.$confirm('请上传佐证材料后保存。', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n _this10.openUploade('pilot', 'Auto');\n });\n } else {\n _this10.$refs.recordForm.validate(function (valid2) {\n if (valid2) {\n var _this10$updateInfo = _this10.updateInfo,\n _classified2 = _this10$updateInfo.classified,\n _files2 = _this10$updateInfo.files,\n propulsiveStatus = _this10$updateInfo.propulsiveStatus;\n\n if (propulsiveStatus == '3' && (!_classified2 || _classified2 != '1') && (!_files2 || !_files2.length)) {\n _this10.$confirm('请上传相关验收材料后保存。', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n _this10.openUploade('record', 'Auto');\n });\n } else {\n if (propulsiveStatus != '3') {\n _this10.updateInfo.actualTime = '';\n }\n\n _this10.$confirm(\"\\u786E\\u8BA4\\u9A73\\u56DE?\", '提示', {\n confirmButtonText: '确认',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this10.$refs.RejectInfoDialog.open();\n });\n }\n }\n });\n }\n }\n });\n },\n sendRejectInfo: function sendRejectInfo(approvalComments) {\n this.saveData(approvalComments);\n },\n // 关闭新增人员窗口\n handleClose: function handleClose() {\n this.status = 0;\n this.updateInfo = {};\n this.parameter = {};\n this.activeCollapse1 = ['1', '2', '3'];\n this.histroyData = null;\n this.visible = false;\n }\n }\n};",null]}