{"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\\ReformPilotManageDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformPilotManage\\components\\ReformPilotManageDialog.vue","mtime":1718246870654},{"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.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.string.iterator\";\nimport \"core-js/modules/es6.regexp.replace\";\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\";\nimport \"core-js/modules/es6.regexp.split\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 FileList1 from '@/components/uploadFile/newFileList.vue';\nimport FileList from '@/components/uploadFile/FileList.vue';\nimport RejectInfoDialog from '@/components/dialog/RejectInfoDialog.vue';\nimport sat from '@/api/satisfaction/satisfaction';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport req from '@/request.js';\nimport utils from '@/utils.js';\nvar portal = window.context.portal;\nexport default {\n name: 'ReformPilotManageDialog',\n components: {\n FormResultsDialog: FormResultsDialog,\n filePreview: filePreview,\n UploadFile: UploadFile,\n RejectInfoDialog: RejectInfoDialog,\n // FileList1,\n FileList: FileList\n },\n mixins: [TableMixin],\n data: function data() {\n var _this = this;\n\n var checkPilotSupervisor = function checkPilotSupervisor(rule, value, callback) {\n if (_this.parameter.pilotLevel == '1') {\n if (!value) {\n return callback(new Error('请选择主管部委'));\n } else {\n callback();\n }\n } else {\n callback();\n }\n };\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 checkFiles = function checkFiles(rele, value, callback) {\n if (_this.updataTime.iterFiles && _this.updataTime.iterFiles.length || _this.updataTime.iterClassified) {\n callback();\n } else {\n callback(new Error('请选择上传佐证材料'));\n }\n };\n\n return {\n timeLoading: false,\n isbtn: false,\n actionBtn: false,\n classified: 0,\n //0代表不涉密, 1代表涉密\n timeValue: null,\n options: [{\n value: 0,\n label: '长期'\n }, {\n value: 1,\n label: '限时'\n }],\n reqLoading: false,\n markLoading: false,\n dialogVisible: false,\n fileList: [],\n treeData: [],\n unitValue: [],\n formIsShow: true,\n isEdit: false,\n btnIsShow: false,\n activeCollapse1: '1',\n visible: false,\n title: '新增',\n rules: {\n timePeriod: [{\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 validator: checkPilotSupervisor,\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 },\n queryParam: {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n },\n parameter: {\n pilotProjectName: '',\n docNo: '',\n pilotLevel: '1',\n pilotSupervisor: '',\n startTime: '',\n acceptanceTime: '',\n classified: 1,\n invs: [],\n pilotTarget: '',\n taskDetails: '',\n status: '',\n id: '',\n docYear: '',\n docName: '',\n docNum: '',\n unitId: '',\n unitName: '',\n unitCode: '',\n unitGrade: '',\n pilotField: '',\n pilotRunway: '',\n documentBasis: '',\n timePeriod: null\n },\n parameter1: {\n propulsiveStatus: null,\n propulsiveDetails: '',\n existingProblems: '',\n workPlan: '',\n id: '',\n actualTime: ''\n },\n rules2: {\n propulsiveStatus: [{\n required: true,\n message: '请选择推进状态',\n trigger: 'blur'\n }],\n actualTime: [{\n required: true,\n message: '请选择验收状态',\n trigger: 'change'\n }]\n },\n districtValue: [],\n districtName: [],\n dataDocNo: '',\n routeName: '',\n saveLoading: false,\n saveLoading1: false,\n tableIndex: undefined,\n reqData: {\n groupRelation: 'AND',\n groupTree: {},\n pageBean: {\n page: 1,\n pageSize: 10,\n showTotal: true\n },\n params: {},\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: '',\n relation: 'AND',\n value: {}\n }],\n sorter: [{\n direction: 'ASC',\n property: ''\n }]\n },\n tableData: [],\n isEdit2: false,\n recordsId: '',\n deleteData: [],\n errorText: '',\n errorNum: null,\n districtData: [],\n isUpdate: false,\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 historyData1: null,\n historyTable1: [],\n historyShow: false,\n editOrUpdate: true,\n treeItem: null,\n previewUrl: \"\".concat(portal, \"/file/onlinePreviewController/v1/getFileById_\"),\n approvalComments: [],\n docNo: '',\n isRepeat: true,\n // 文件是否涉密\n cipher: false,\n status: 0,\n fileType: '',\n recordOptions: [],\n // 历史验收材料附件ids\n checkIds: [],\n // 历史成果附件ids\n reslultIds: [],\n isRequest: true,\n removeIds: [],\n // 修改验收时间相关\n updataTime: {},\n timeVisible: false,\n timeRules: {\n iterTimePeriod: [{\n required: true,\n message: '请选择试点期限',\n trigger: 'change'\n }],\n iterAcceptanceTime: [{\n required: true,\n message: '请根据文件规定的试点期限选择完成时间',\n trigger: 'change'\n }],\n cause: [{\n required: true,\n message: '请填写修改完成时间的理由',\n trigger: 'change'\n }],\n iterFiles: [{\n required: true,\n validator: checkFiles,\n trigger: 'change'\n }]\n },\n timeTitle: '编辑',\n // 试点层级下拉隐藏市级试点\n pilotLevelOptions: [{\n name: '国家级',\n value: '1'\n }, {\n name: '市级',\n value: '市级'\n }]\n };\n },\n created: function created() {\n var data = JSON.parse(sessionStorage.getItem('responsibilityTree')); // data[0].children =\n\n this.treeData = data[0].children[0].children[0].children;\n this.districtData = JSON.parse(sessionStorage.getItem('districtList'));\n this.recordOptions = utils.getDictItemsFromCache('sd_tjzt');\n },\n methods: {\n // 验收时间相关\n changeDisabled: function changeDisabled(title) {\n var _this2 = this;\n\n this.timeTitle = title; // if (title === '详情') {\n // this.getFindById(this.parameter.id)\n // }\n\n var _this$parameter = this.parameter,\n id = _this$parameter.id,\n pilotProjectName = _this$parameter.pilotProjectName,\n iterId = _this$parameter.iterId,\n iterStatus = _this$parameter.iterStatus;\n\n if (iterId) {\n this.timeLoading = true;\n pilot.getEntityById(iterId, function (res) {\n var classified = res.classified,\n acceptanceTime = res.acceptanceTime,\n timePeriod = res.timePeriod,\n iterTimePeriod = res.iterTimePeriod,\n iterAcceptanceTime = res.iterAcceptanceTime,\n iterateCause = res.iterateCause,\n approvalComments = res.approvalComments;\n _this2.updataTime = {\n id: id,\n iterClassified: classified,\n pilotProjectName: pilotProjectName,\n timePeriod: timePeriod,\n acceptanceTime: acceptanceTime,\n cause: iterateCause,\n iterTimePeriod: iterTimePeriod,\n //试点期限\n iterAcceptanceTime: iterAcceptanceTime //完成时间\n\n };\n _this2.updataTime.approvalComments = iterStatus === 2 ? approvalComments && approvalComments.split('$_$') : [];\n var data = JSON.parse(JSON.stringify(_this2.reqData));\n data.querys = [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'biz_id_',\n relation: 'AND',\n value: iterId\n }];\n pilot.getIds(data, function (res) {\n var arr = [];\n res.rows.forEach(function (item) {\n var id = item.id,\n fileName = item.fileName,\n extensionName = item.extensionName;\n var url = \"\".concat(portal, \"/file/onlinePreviewController/v1/getFileById_\").concat(id);\n var obj = {\n id: id,\n name: \"\".concat(fileName, \".\").concat(extensionName),\n url: url,\n fileType: extensionName\n };\n arr.push(obj);\n });\n\n _this2.$set(_this2.updataTime, 'iterFiles', arr);\n\n _this2.timeLoading = false;\n });\n });\n } else {\n var _this$parameter2 = this.parameter,\n timePeriod = _this$parameter2.timePeriod,\n acceptanceTime = _this$parameter2.acceptanceTime;\n this.updataTime = {\n id: id,\n pilotProjectName: pilotProjectName,\n timePeriod: timePeriod,\n acceptanceTime: acceptanceTime,\n iterClassified: 0,\n iterFiles: [],\n cause: '',\n iterTimePeriod: timePeriod,\n //试点期限\n iterAcceptanceTime: acceptanceTime //完成时间\n\n };\n }\n\n this.timeVisible = true;\n this.$nextTick(function () {\n _this2.$refs['timeInfo'].resetFields();\n });\n },\n // 确认修改\n confirmChange: function confirmChange() {\n var _this3 = this;\n\n this.$refs['timeInfo'].validate(function (valid) {\n if (valid) {\n _this3.$confirm('确认修改完成时间并提交改革办审核吗?', _this3.$t('common.tips'), {\n confirmButtonText: _this3.$t('common.confirm'),\n cancelButtonText: _this3.$t('common.cancel'),\n type: 'success'\n }).then(function () {\n _this3.markLoading = true;\n var data = JSON.parse(JSON.stringify(_this3.updataTime));\n data.iterAcceptanceTime = data.iterTimePeriod ? data.iterAcceptanceTime : '';\n data.approvalComments = '';\n data.status = 1;\n pilot.updateAcceptanceTime(data, function (res) {\n if (res.state) {\n _this3.$message.success('提交审核成功');\n\n _this3.parameter.iterStatus = 1;\n\n _this3.handleCloseTime();\n\n _this3.getFindById(_this3.parameter.id);\n }\n\n _this3.markLoading = false;\n });\n });\n }\n });\n },\n // 附件\n uploadeTime: function uploadeTime() {\n this.$refs.uploadTime.open('PoiltAccept');\n },\n setTimeFileList: function setTimeFileList(file) {\n file.id = file.response.fileId;\n this.updataTime.iterFiles.push(file);\n this.updataTime.iterClassified = 0;\n },\n changeTimeFileList: function changeTimeFileList(arr) {\n this.updataTime.iterFiles = arr;\n },\n setTimeAipher: function setTimeAipher(val) {\n if (val) {\n this.updataTime.iterClassified = 1;\n }\n },\n handleCloseTime: function handleCloseTime() {\n this.updataTime = {};\n this.timeVisible = false;\n this.$refs['timeInfo'].resetFields();\n },\n // -----------------------------------------\n idExist: function idExist(id) {\n if (!this.checkIds.length || !this.checkIds.includes(id)) {\n this.removeIds.push(id);\n console.log(this.removeIds);\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 setAipher: function setAipher(val) {\n if (this.fileType === 'pilot') {\n this.classified = 1;\n } else if (this.fileType === 'record') {\n this.$set(this.parameter1, 'classified', '1');\n }\n\n this.cipher = val;\n var routeName = this.$route.name;\n\n if (routeName != 'ReformPilotVerify' || this.actionBtn) {\n this.inputAddOrUpdata();\n }\n\n this.status == 4 ? this.openInputVisible() : this.status == 5 ? this.handlSaveAndeVerify({}, 5) : '';\n },\n getTreeItem: function getTreeItem(data, id) {\n var _this4 = this;\n\n data.map(function (item) {\n if (item.id == id) {\n _this4.treeItem = item; // 结果赋值\n } else {\n if (item.children) {\n _this4.getTreeItem(item.children, id);\n }\n }\n });\n },\n getParentsById: function getParentsById(list, id) {\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.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 _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n setdocName: function setdocName(e) {\n this.parameter.docName = e.replace(/\\s+/g, '');\n },\n // 打开弹框编辑\n add: function add(item) {\n var _this5 = this;\n\n this.recordOptions.forEach(function (item) {\n item.disabled = false;\n });\n var reqArr = item.id && item.recId ? [this.advanceRecordsById({\n unitId: item.unitId,\n id: item.id\n }), this.getIds(item.id), this.getFindById(item.id)] : item.id ? [this.getFindById(item.id), this.getIds(item.id)] : [];\n Promise.all(reqArr).then(function () {\n _this5.reqLoading = false;\n }); // let idd = this.$route.name == 'ReformOfficeManagement' ? item.mainUnitId : item.unitId\n\n this.$nextTick(function () {\n _this5.unitValue = _this5.getParentsById(_this5.treeData, item.unitId);\n });\n var pilotProjectName = item.pilotProjectName,\n docNo = item.docNo,\n pilotLevel = item.pilotLevel,\n pilotSupervisor = item.pilotSupervisor,\n startTime = item.startTime,\n acceptanceTime = item.acceptanceTime,\n classified = item.classified,\n pilotTarget = item.pilotTarget,\n taskDetails = item.taskDetails,\n status = item.status,\n docYear = item.docYear,\n docName = item.docName,\n docNum = item.docNum,\n unitId = item.unitId,\n unitName = item.unitName,\n unitCode = item.unitCode,\n unitGrade = item.unitGrade,\n pilotField = item.pilotField,\n pilotRunway = item.pilotRunway,\n id = item.id,\n documentBasis = item.documentBasis,\n mainUnitName = item.mainUnitName,\n timePeriod = item.timePeriod,\n propulsiveStatus = item.propulsiveStatus;\n this.getByDemandFiledData('ggbb_ssly', pilotField);\n this.classified = classified;\n this.docNo = docNo;\n this.parameter = {\n pilotProjectName: pilotProjectName,\n docNo: docNo,\n pilotLevel: pilotLevel,\n pilotSupervisor: pilotSupervisor,\n startTime: startTime,\n acceptanceTime: acceptanceTime,\n pilotTarget: pilotTarget,\n taskDetails: taskDetails,\n status: status,\n docYear: docYear,\n docName: docName,\n docNum: docNum,\n unitId: unitId,\n unitName: unitName,\n unitCode: unitCode,\n unitGrade: unitGrade,\n pilotField: pilotField,\n pilotRunway: pilotRunway + '',\n id: id,\n documentBasis: documentBasis,\n mainUnitName: mainUnitName,\n timePeriod: timePeriod,\n propulsiveStatus: propulsiveStatus\n };\n this.visible = true;\n },\n onBtnBulr: function onBtnBulr() {\n var _this$parameter3 = this.parameter,\n docName = _this$parameter3.docName,\n docYear = _this$parameter3.docYear,\n docNum = _this$parameter3.docNum;\n\n if (docName && docYear && (docNum || docNum === 0)) {\n this.inputBlur();\n }\n },\n // 校验文件号\n inputBlur: function inputBlur() {\n var _this6 = this;\n\n return new Promise(function (reslove) {\n _this6.errorText = '';\n var _this6$parameter = _this6.parameter,\n docName = _this6$parameter.docName,\n docYear = _this6$parameter.docYear,\n docNum = _this6$parameter.docNum;\n var docNo = \"\".concat(docName, \"\\u3010\").concat(docYear, \"\\u3011\").concat(docNum, \"\\u53F7\");\n\n if (docName && docYear && (docNum || docNum === 0)) {\n if (!_this6.parameter.id || _this6.docNo != docNo) {\n pilot.docNoWhether(docNo, function (res) {\n if (!res) {\n _this6.isRepeat = false;\n _this6.errorText = '该文件号已存在,请重新录入';\n reslove();\n } else {\n _this6.isRepeat = true;\n reslove();\n }\n });\n } else {\n _this6.isRepeat = true;\n reslove();\n }\n } else {\n _this6.isRepeat = false;\n _this6.errorText = '请输入部署该试点项目的完整文号';\n reslove();\n }\n });\n },\n // ------------\n // 文件相关\n openUploade: function openUploade(type) {\n this.fileType = type;\n this.$refs.uploadFile.open('Pilot');\n },\n setFileList: function setFileList(file) {\n if (this.fileType === 'pilot') {\n this.fileList.push(file);\n this.classified = 0;\n } else if (this.fileType === 'record') {\n this.parameter1.fileList ? this.parameter1.fileList.push(file) : this.$set(this.parameter1, 'fileList', [file]);\n this.parameter1.classified = '';\n }\n },\n beforeRemove: function beforeRemove(file, fileList) {\n var _this7 = this;\n\n this.$confirm(\"\\u786E\\u5B9A\\u5220\\u9664 \".concat(file.name, \"\\uFF1F\"), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n var id = file.fileId ? file.fileId : file.id ? file.id : file.response.fileId;\n sat.deleteFileById(id, function (res) {\n if (res.state) {\n _this7.$message.success('附件删除成功');\n\n var arr = _this7.fileList.filter(function (item) {\n var fileId = item.id || item.response.fileId;\n\n if (fileId !== id) {\n return item;\n }\n });\n\n if (arr.length == 0) {\n _this7.classified = 0;\n }\n\n _this7.fileList = arr;\n } else {\n _this7.$message.error('附件删除失败');\n }\n });\n });\n },\n handlePreview: function handlePreview(file) {\n var id = file.fileId ? file.fileId : file.id ? file.id : file.response.fileId;\n var type = file.fileType || (file.extensionName ? file.extensionName : file.name.split('.')[1]);\n this.$refs.filePreview.previewUrl = this.previewUrl + id;\n this.$refs.filePreview.open(type);\n },\n changeFileList: function changeFileList(arr, type) {\n console.log(arr);\n\n if (type === 'pilot') {\n this.fileList = arr;\n } else if (type === 'record') {\n this.$set(this.parameter1, 'fileList', arr);\n }\n },\n // 文件下载\n handleDownloadFile: function handleDownloadFile(file) {\n var id = file.fileId ? file.fileId : file.id ? file.id : file.response.fileId;\n window.open(portal + \"/file/v1/downloadFile?fileId=\".concat(id), '_self');\n },\n // ------------\n // 区县id\n valueChange: function valueChange(value) {\n this.parameter.invs = value;\n },\n // 新增数或者修改,试点项目录入\n inputAddOrUpdata: function inputAddOrUpdata() {\n var _this8 = this;\n\n this.$refs['formInfo'].validate(function (valid) {\n var routeName = _this8.$route.name;\n var falg = routeName == 'ReformPilotVerify' ? valid : valid && _this8.classified || valid && _this8.fileList.length != 0;\n\n if (falg) {\n _this8.$confirm('确认提交吗?', _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 _this8.inputBlur().then(function () {\n if (_this8.isRepeat) {\n var data = JSON.parse(JSON.stringify(_this8.parameter));\n var unitIdArr = JSON.parse(JSON.stringify(_this8.unitValue));\n var itemId = unitIdArr.pop();\n\n _this8.getTreeItem(_this8.treeData, itemId);\n\n console.log(_this8.treeItem);\n var _this8$treeItem = _this8.treeItem,\n id = _this8$treeItem.id,\n name = _this8$treeItem.name,\n code = _this8$treeItem.code,\n grade = _this8$treeItem.grade;\n data.unitId = id || '';\n data.unitName = name || '';\n data.unitCode = code || '';\n data.unitGrade = grade || '';\n data.docNo = \"\".concat(data.docName, \"\\u3010\").concat(data.docYear, \"\\u3011\").concat(data.docNum, \"\\u53F7\");\n var arr = [];\n data.invs.forEach(function (id) {\n _this8.districtData.forEach(function (item) {\n if (item.id == id) {\n var _id = item.id,\n _code = item.code,\n _grade = item.grade,\n _name = item.name;\n arr = [].concat(_toConsumableArray(arr), [{\n unitId: _id,\n unitName: _name,\n unitCode: _code,\n unitGrade: _grade\n }]);\n }\n });\n });\n data.invs = arr;\n\n if (!data.timePeriod) {\n data.acceptanceTime = '';\n }\n\n if (data.pilotLevel == '2') {\n data.pilotSupervisor = '';\n }\n\n if (_this8.fileList) {\n var ids = _this8.fileList.map(function (item) {\n return item.id ? item.id : item.response.fileId;\n });\n\n data.ids = ids;\n }\n\n data.classified = _this8.classified;\n _this8.cipher = false;\n !_this8.isUpdate ? _this8.addInfo(data) : _this8.updateInfo(data);\n } else {\n _this8.markLoading = false;\n\n _this8.$confirm(_this8.errorText, '提示', {\n cancelButtonText: '关闭',\n showConfirmButton: false,\n type: 'error'\n });\n }\n });\n }).catch(function () {\n _this8.markLoading = false;\n });\n } else {\n if (!valid) {\n _this8.$confirm('请填写完整信息。', '提示', {\n cancelButtonText: '关闭',\n showConfirmButton: false,\n type: 'error'\n });\n } else if (_this8.classified != 1 && _this8.fileList.length == 0) {\n _this8.$confirm('请上传佐证材料后保存。', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n _this8.openUploade('pilot');\n });\n }\n }\n });\n },\n // 添加录入信息(试点项目录入)\n addInfo: function addInfo(data) {\n var _this9 = this;\n\n pilot.addPolotProject(data, function (res) {\n _this9.$emit('sendMsg');\n\n _this9.removeIds.length && _this9.saveRemoveFiles();\n\n _this9.handleClose();\n\n _this9.$message.success('录入试点项目成功');\n\n _this9.saveLoading1 = false;\n _this9.markLoading = false;\n });\n },\n // 修改试点项目信息(试点项目录入)\n updateInfo: function updateInfo(data) {\n var _this10 = this;\n\n var routeName = this.$route.name;\n\n if (routeName == 'ReformPilotEntry') {\n data.status = 0;\n }\n\n if (routeName == 'ReformOfficeManagement') {\n data.status = data.status;\n }\n\n pilot.updatePoltproject(data, function (res) {\n _this10.$emit('sendMsg');\n\n _this10.removeIds.length && _this10.saveRemoveFiles();\n\n _this10.handleClose();\n\n _this10.$message.success('修改试点项目信息成功');\n\n _this10.saveLoading1 = false;\n _this10.markLoading = false;\n });\n },\n // 推进录入新增或修改\n inputTjAddOrUpate: function inputTjAddOrUpate() {\n var _this11 = this;\n\n console.log(111111111);\n this.$refs.formInfo2.validate(function (valid) {\n // this.markLoading = true\n if (valid) {\n var data = JSON.parse(JSON.stringify(_this11.parameter1));\n\n if (data.propulsiveStatus != 3) {\n data.actualTime = '';\n }\n\n var arr = _this11.tableData.map(function (item) {\n if (_this11.isUpdate) {\n item.id = '';\n }\n\n return item;\n });\n\n arr.forEach(function (item) {\n item.ids = item.fileList ? item.fileList.map(function (file) {\n return file.id || file.response.fileId;\n }) : [];\n });\n data.results = arr;\n data.ids = data.fileList && data.fileList.map(function (file) {\n return file.id || file.response.fileId;\n });\n data.pilotId = _this11.parameter.id;\n data.approvalComments = '';\n\n if (data.propulsiveStatus != 3 || data.ids && data.ids.length || data.classified === 1 || data.classified === '1') {\n if (data.results.length == 0) {\n _this11.$confirm('没有录入试点成果内容,是否保存?', '提示', {\n confirmButtonText: '保存',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this11.markLoading = true;\n _this11.isUpdate ? _this11.updateInputInfo(data) : _this11.inputInfo(data);\n }).catch(function () {});\n } else {\n _this11.$confirm('确认保存?', '提示', {\n confirmButtonText: '保存',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this11.markLoading = true;\n _this11.isUpdate ? _this11.updateInputInfo(data) : _this11.inputInfo(data);\n }).catch(function () {});\n }\n } else {\n _this11.$confirm('请上传相关验收材料后保存?', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '取消',\n type: 'error'\n }).then(function () {\n _this11.openUploade('record');\n }).catch(function () {});\n }\n } else {\n _this11.$confirm('请录入完整信息后保存。', '提示', {\n cancelButtonText: '关闭',\n showConfirmButton: false,\n type: 'warning'\n }).then(function () {\n _this11.markLoading = false;\n });\n }\n });\n },\n // 新增\n inputInfo: function inputInfo(data) {\n var _this12 = this;\n\n if (this.$route.name == 'DistrictPromotioneEntry') {\n data.status = 0;\n }\n\n pilot.inputUpdate(data, function (res) {\n _this12.$emit('sendMsg');\n\n _this12.removeIds.length && _this12.saveRemoveFiles();\n\n _this12.handleClose();\n\n _this12.$message.success('录入更新成功');\n\n _this12.markLoading = false;\n });\n },\n // 修改\n updateInputInfo: function updateInputInfo(data) {\n var _this13 = this;\n\n if (this.$route.name == 'DistrictPromotioneEntry') {\n data.status = 0;\n }\n\n pilot.modifyEntry(data, function (res) {\n _this13.$emit('sendMsg');\n\n _this13.removeIds.length && _this13.saveRemoveFiles();\n\n _this13.handleClose();\n\n _this13.$message.success('修改更新成功');\n\n _this13.markLoading = false;\n });\n },\n handleAddOrUpdate: function handleAddOrUpdate() {\n var routeName = this.$route.name;\n routeName == 'DistrictPromotioneEntry' ? this.inputTjAddOrUpate() : this.inputAddOrUpdata();\n },\n // 根据id查询涉及区县列表\n getFindById: function getFindById(id) {\n var _this14 = this;\n\n return new Promise(function (reslove) {\n pilot.getFindById(id, function (res) {\n _this14.approvalComments = res.approvalComments ? res.approvalComments.split('$_$') : [];\n _this14.parameter = res;\n _this14.parameter.pilotField = res.pilotField + '';\n _this14.parameter.pilotRunway = res.pilotRunway + '';\n _this14.districtValue = res.invs ? res.invs.map(function (val) {\n return val.unitId;\n }) : [];\n _this14.districtName = res.invs ? res.invs.map(function (val) {\n return val.unitName;\n }) : [];\n reslove();\n });\n });\n },\n // 根据主表id查询推进表信息\n advanceRecordsById: function advanceRecordsById(id) {\n var _this15 = this;\n\n return new Promise(function (resolve) {\n pilot.advanceRecordsById(id, function (res) {\n if (res.value.length) {\n var parameterData = res.value[0] || {};\n parameterData.approvalComments = parameterData.approvalComments && parameterData.approvalComments.split('$_$');\n\n if (_this15.title === '更新' && (res.value[0].status == 7 || res.value[0].status == 9 || res.value[0].status == 11 || res.value[0].status == 12)) {\n _this15.parameter1 = {};\n _this15.tableData = [];\n _this15.historyData1 = JSON.parse(JSON.stringify(parameterData)); // 历史验收材料附件ids\n\n _this15.checkIds = _this15.historyData1.fileList && _this15.historyData1.fileList.map(function (item) {\n return item.id;\n }) || []; // 历史成果附件ids\n\n console.log(_this15.historyData1.results);\n _this15.historyData1.results && _this15.historyData1.results.forEach(function (item) {\n var arr = item.fileList ? item.fileList.map(function (file) {\n return file.id;\n }) : [];\n _this15.reslultIds = [].concat(_toConsumableArray(_this15.reslultIds), _toConsumableArray(arr));\n });\n _this15.parameter1.id = '';\n _this15.parameter1.results && _this15.parameter1.results.forEach(function (item) {\n item.id = '';\n });\n\n if (res.value[0].status === 12) {\n _this15.recordOptions.forEach(function (item) {\n if (item.value - 0 < res.value[0].propulsiveStatus) {\n item.disabled = true;\n }\n });\n }\n } else {\n _this15.parameter1 = parameterData;\n _this15.tableData = res.value[0].results || [];\n\n if (res.value[1]) {\n _this15.historyData1 = res.value[1] || null; // 历史验收材料附件ids\n\n _this15.checkIds = _this15.historyData1.fileList && _this15.historyData1.fileList.map(function (item) {\n return item.id;\n }) || []; // 历史成果附件ids\n\n _this15.historyData1.results && _this15.historyData1.results.forEach(function (item) {\n var arr = item.fileList ? item.fileList.map(function (file) {\n return file.id;\n }) : [];\n _this15.reslultIds = [].concat(_toConsumableArray(_this15.reslultIds), _toConsumableArray(arr));\n });\n _this15.historyData1.approvalComments = res.value[1].approvalComments && res.value[1].approvalComments.split('$_$');\n\n if (res.value[1].status === 12) {\n _this15.recordOptions.forEach(function (item) {\n if (item.value - 0 < res.value[1].propulsiveStatus) {\n item.disabled = true;\n }\n });\n }\n }\n }\n }\n\n resolve();\n });\n });\n },\n // 编辑后并通过\n handlSaveAndeVerify: function handlSaveAndeVerify(data1, status) {\n var _this16 = this;\n\n this.status = 5;\n this.$refs['formInfo'].validate(function (valid) {\n var falg = valid && _this16.classified || valid && _this16.fileList.length != 0;\n\n if (falg) {\n _this16.$confirm('确认通过吗?', _this16.$t('common.tips'), {\n confirmButtonText: _this16.$t('common.confirm'),\n cancelButtonText: _this16.$t('common.cancel'),\n type: 'success'\n }).then(function () {\n _this16.markLoading = true;\n\n _this16.inputBlur().then(function () {\n if (_this16.isRepeat) {\n var data = JSON.parse(JSON.stringify(_this16.parameter));\n var unitIdArr = JSON.parse(JSON.stringify(_this16.unitValue));\n var itemId = unitIdArr.pop();\n\n _this16.getTreeItem(_this16.treeData, itemId);\n\n var _this16$treeItem = _this16.treeItem,\n id = _this16$treeItem.id,\n name = _this16$treeItem.name,\n code = _this16$treeItem.code,\n grade = _this16$treeItem.grade;\n data.unitId = id || '';\n data.unitName = name || '';\n data.unitCode = code || '';\n data.unitGrade = grade || '';\n data.docNo = \"\".concat(data.docName, \"\\u3010\").concat(data.docYear, \"\\u3011\").concat(data.docNum, \"\\u53F7\");\n var arr = [];\n data.invs.forEach(function (id) {\n _this16.districtData.forEach(function (item) {\n if (item.id == id) {\n var _id2 = item.id,\n _code2 = item.code,\n _grade2 = item.grade,\n _name2 = item.name;\n arr = [].concat(_toConsumableArray(arr), [{\n unitId: _id2,\n unitName: _name2,\n unitCode: _code2,\n unitGrade: _grade2\n }]);\n }\n });\n });\n data.invs = arr;\n\n if (_this16.fileList) {\n var ids = _this16.fileList.map(function (item) {\n return item.id ? item.id : item.response.fileId;\n });\n\n data.ids = ids;\n }\n\n data.classified = _this16.classified;\n pilot.updatePoltproject(data, function (res) {\n _this16.handleVerify(data1, status);\n });\n } else {\n _this16.markLoading = false;\n\n _this16.$confirm(_this16.errorText, '提示', {\n cancelButtonText: '关闭',\n showConfirmButton: false,\n type: 'error'\n });\n }\n });\n }).catch(function () {\n _this16.markLoading = false;\n });\n } else {\n if (!valid) {\n _this16.$confirm('请填写完整信息。', '提示', {\n cancelButtonText: '关闭',\n showConfirmButton: false,\n type: 'error'\n });\n } else if (_this16.classified != 1 && _this16.fileList.length == 0) {\n _this16.$confirm('请上传佐证材料后保存。', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n _this16.openUploade('pilot');\n });\n }\n }\n });\n },\n // 根据id查询附件信息\n getIds: function getIds(id) {\n var _this17 = this;\n\n return new Promise(function (resolve) {\n var data = JSON.parse(JSON.stringify(_this17.reqData));\n data.querys = [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'biz_id_',\n relation: 'AND',\n value: id\n }];\n pilot.getIds(data, function (res) {\n var arr = [];\n res.rows.forEach(function (item) {\n var id = item.id,\n fileName = item.fileName,\n extensionName = item.extensionName;\n var url = \"\".concat(portal, \"/file/onlinePreviewController/v1/getFileById_\").concat(id);\n var obj = {\n id: id,\n name: \"\".concat(fileName, \".\").concat(extensionName),\n url: url,\n fileType: extensionName\n };\n arr.push(obj);\n });\n _this17.fileList = arr;\n _this17.$refs.FormResultsDialog.fileList = arr;\n resolve();\n });\n });\n },\n openInputVisible: function openInputVisible() {\n var _this18 = this;\n\n this.status = this.$route.name == 'ReformPilotConfirm' ? 11 : 4;\n\n if (this.status == 4) {\n this.$refs['formInfo'].validate(function (valid) {\n var falg = valid && _this18.classified || valid && _this18.fileList.length != 0;\n\n if (falg) {\n _this18.$confirm('确认驳回吗?', _this18.$t('common.tips'), {\n confirmButtonText: _this18.$t('common.confirm'),\n cancelButtonText: _this18.$t('common.cancel'),\n type: 'error'\n }).then(function () {\n // this.markLoading = true\n _this18.inputBlur().then(function () {\n if (_this18.isRepeat) {\n _this18.$refs.RejectInfoDialog.open();\n } else {\n _this18.markLoading = false;\n\n _this18.$confirm(_this18.errorText, '提示', {\n cancelButtonText: '关闭',\n showConfirmButton: false,\n type: 'error'\n });\n }\n });\n });\n } else {\n if (!valid) {\n _this18.$confirm('请填写完整信息。', '提示', {\n cancelButtonText: '关闭',\n showConfirmButton: false,\n type: 'error'\n });\n } else if (_this18.classified != 1 && _this18.fileList.length == 0) {\n _this18.$confirm('请上传佐证材料后保存。', '提示', {\n confirmButtonText: '立即上传',\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n _this18.openUploade('pilot');\n });\n }\n }\n });\n } else {\n this.$refs.formInfo2.validate(function (valid) {\n if (valid) {\n var pushArr = _this18.tableData.map(function (item) {\n item.id = '';\n return item;\n });\n\n pushArr.forEach(function (item) {\n item.ids = item.fileList ? item.fileList.map(function (file) {\n return file.id || file.response.fileId;\n }) : [];\n });\n\n if (pushArr.length == 0) {\n _this18.$confirm('没有录入试点成果内容,是否确认驳回?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'error'\n }).then(function () {\n _this18.$refs.RejectInfoDialog.open();\n }).catch(function () {\n _this18.markLoading = false;\n });\n } else {\n _this18.$confirm('确认驳回?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'error'\n }).then(function () {\n _this18.$refs.RejectInfoDialog.open();\n }).catch(function () {});\n }\n }\n });\n }\n },\n sendRejectInfo: function sendRejectInfo(approvalComments) {\n var _this19 = this;\n\n if (this.status == 4) {\n var data = JSON.parse(JSON.stringify(this.parameter));\n var unitIdArr = JSON.parse(JSON.stringify(this.unitValue));\n var itemId = unitIdArr.pop();\n this.getTreeItem(this.treeData, itemId);\n var _this$treeItem = this.treeItem,\n id = _this$treeItem.id,\n name = _this$treeItem.name,\n code = _this$treeItem.code,\n grade = _this$treeItem.grade;\n data.unitId = id || '';\n data.unitName = name || '';\n data.unitCode = code || '';\n data.unitGrade = grade || '';\n data.docNo = \"\".concat(data.docName, \"\\u3010\").concat(data.docYear, \"\\u3011\").concat(data.docNum, \"\\u53F7\");\n var arr = [];\n data.invs.forEach(function (id) {\n _this19.districtData.forEach(function (item) {\n if (item.id == id) {\n var _id3 = item.id,\n _code3 = item.code,\n _grade3 = item.grade,\n _name3 = item.name;\n arr = [].concat(_toConsumableArray(arr), [{\n unitId: _id3,\n unitName: _name3,\n unitCode: _code3,\n unitGrade: _grade3\n }]);\n }\n });\n });\n data.invs = arr;\n\n if (this.fileList) {\n var ids = this.fileList.map(function (item) {\n return item.id ? item.id : item.response.fileId;\n });\n data.ids = ids;\n }\n\n data.classified = this.classified;\n this.markLoading = true;\n pilot.updatePoltproject(data, function (res) {\n _this19.handleVerify(approvalComments, 4);\n });\n } else {\n this.markLoading = true;\n var pushData = this.parameter1;\n var pushArr = this.tableData.map(function (item) {\n item.id = '';\n return item;\n });\n pushArr.forEach(function (item) {\n item.ids = item.fileList ? item.fileList.map(function (file) {\n return file.id || file.response.fileId;\n }) : [];\n });\n pushData.results = pushArr;\n pushData.pilotId = this.parameter.id;\n pushData.status = 11;\n pushData.approvalComments = approvalComments;\n this.updateInputInfo(pushData);\n }\n },\n // 通过\n handleVerify: function handleVerify(approvalComments, status) {\n var _this20 = this;\n\n var data = {\n status: status,\n id: this.parameter.id\n };\n\n if (status == 4 && approvalComments) {\n data.approvalComments = approvalComments;\n }\n\n var msg = status == 5 ? '通过成功' : '驳回成功';\n pilot.updateStatusById(data, function (res) {\n if (res.state) {\n _this20.$emit('sendMsg');\n\n _this20.removeIds.length && _this20.saveRemoveFiles();\n\n _this20.handleClose();\n\n _this20.$message.success(msg);\n }\n\n _this20.saveLoading = false;\n _this20.markLoading = false;\n });\n },\n addResult: function addResult(item, index) {\n console.log(this.reslultIds);\n this.tableIndex = index;\n this.$refs.FormResultsDialog.reslultIds = this.reslultIds || [];\n this.$refs.FormResultsDialog.open(item);\n },\n // 添加成果形式\n pushTableData: function pushTableData(data, ids) {\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.removeIds = [].concat(_toConsumableArray(this.removeIds), _toConsumableArray(ids));\n },\n // 删除\n deleteDate: function deleteDate(index) {\n this.tableData.splice(index, 1);\n },\n handlPushVerify: function handlPushVerify() {\n var _this21 = this;\n\n this.$refs.formInfo2.validate(function (valid) {\n if (valid) {\n var pushData = _this21.parameter1;\n\n var pushArr = _this21.tableData.map(function (item) {\n item.id = '';\n return item;\n });\n\n pushArr.forEach(function (item) {\n item.ids = item.fileList ? item.fileList.map(function (file) {\n return file.id || file.response.fileId;\n }) : [];\n });\n pushData.results = pushArr;\n pushData.pilotId = _this21.parameter.id;\n pushData.approvalComments = '';\n pushData.status = 12;\n\n if (pushData.results.length == 0) {\n _this21.$confirm('没有录入试点成果内容,是否确认通过?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this21.markLoading = true;\n\n _this21.updateInputInfo(pushData);\n }).catch(function () {});\n } else {\n _this21.$confirm('确认通过?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this21.markLoading = true;\n\n _this21.updateInputInfo(pushData);\n }).catch(function () {});\n }\n }\n });\n },\n handlePushUpdate: function handlePushUpdate() {\n var _this22 = this;\n\n this.$refs.formInfo2.validate(function (valid) {\n if (valid) {\n var pushData = JSON.parse(JSON.stringify(_this22.parameter1));\n\n var pushArr = _this22.tableData.map(function (item) {\n item.id = '';\n return item;\n });\n\n pushArr.forEach(function (item) {\n item.ids = item.fileList ? item.fileList.map(function (file) {\n return file.id || file.response.fileId;\n }) : [];\n });\n pushData.results = pushArr;\n pushData.approvalComments = pushData.approvalComments.length === 0 ? '' : pushData.approvalComments.join('$_$');\n pushData.pilotId = _this22.parameter.id;\n\n if (pushData.results.length == 0) {\n _this22.$confirm('没有录入试点成果内容,是否确认修改?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this22.markLoading = true;\n\n _this22.updateInputInfo(pushData);\n }).catch(function () {});\n } else {\n _this22.$confirm('确认修改?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this22.markLoading = true;\n\n _this22.updateInputInfo(pushData);\n }).catch(function () {});\n }\n }\n });\n },\n // 关闭新增人员窗口\n handleClose: function handleClose() {\n var _this23 = this;\n\n this.removeIds = [];\n this.isbtn = false;\n this.historyShow = false;\n this.errorText = '';\n this.visible = false;\n this.title = '';\n this.parameter = {\n pilotProjectName: '',\n docNo: '',\n pilotLevel: '1',\n pilotSupervisor: '',\n startTime: '',\n acceptanceTime: '',\n classified: 1,\n invs: [],\n pilotTarget: '',\n taskDetails: '',\n status: '',\n id: '',\n docYear: '',\n docName: '',\n docNum: '',\n unitId: '',\n unitName: '',\n unitCode: '',\n unitGrade: '',\n pilotField: '',\n pilotRunway: ''\n };\n this.districtValue = [];\n\n if (this.$refs.formInfo) {\n this.$refs.formInfo.resetFields();\n }\n\n this.routeName = '';\n this.tableData = [];\n this.parameter1 = {};\n this.isEdit2 = true;\n\n if (this.$refs.formInfo2) {\n this.$refs.formInfo2.resetFields();\n }\n\n this.fileList = [];\n this.tableIndex = undefined;\n this.unitValue = [];\n setTimeout(function () {\n _this23.btnIsShow = false;\n _this23.isEdit = false;\n }, 500);\n this.approvalComments = [];\n this.classified = 0;\n this.historyData1 = null;\n }\n }\n};",null]}