{"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\\MajorProjectManagement\\ProjectDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorProjectManagement\\ProjectDialog.vue","mtime":1740106413624},{"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 \"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 \"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/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\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\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//\nimport utils from '@/utils.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport RejectInfoDialog from '@/components/dialog/RejectInfoBlockDialog.vue';\nimport UploadFile from '@/components/uploadFile/index.vue';\nimport FileList from '@/components/uploadFile/newFileList.vue';\nimport moment from 'moment';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport apiList from '@/api/MajorProject';\nimport publicApi from '@/api/publicApi';\nimport req from '@/request.js';\nvar portal = window.context.portal;\nexport default {\n name: 'ProjectDialog',\n components: {\n UploadFile: UploadFile,\n FileList: FileList,\n RejectInfoDialog: RejectInfoDialog\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n demandRunwaOoptionsForm: [],\n // 所属跑道数据(表单内)\n reqLoading: false,\n activeCollapse1: ['1', '3'],\n visible: false,\n title: '新增',\n disabled: false,\n saveloading: false,\n rules: {\n projectName: [{\n required: true,\n message: '请输入项目名称',\n trigger: 'change'\n }],\n groupName: [{\n required: true,\n message: '请选择专项小组',\n trigger: 'change'\n }],\n unitValue: [{\n required: true,\n message: '请选择主责单位',\n trigger: 'change'\n }] // year: [\n // {\n // required: true,\n // message: '请选择部署时间',\n // trigger: 'change',\n // },\n // ],\n // projectField: [\n // {\n // required: true,\n // message: '请选择所属领域',\n // trigger: 'change'\n // }\n // ],\n // projectRunway: [\n // {\n // required: true,\n // message: '请选择所属跑道',\n // trigger: 'change'\n // }\n // ]\n\n },\n queryParam: {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n },\n treeData: [],\n parameter: {\n projectName: '',\n projectField: '',\n projectRunway: '',\n groupName: '',\n unitValue: [],\n unitId: '',\n unitName: '',\n unitCode: '',\n unitGrade: '' // year: '',\n\n },\n advanceData: {},\n hisAdvanceData: null,\n ggbb_ssly: [],\n markLoading: false,\n clickType: null,\n currentUser: null,\n treeItem: null,\n monthOptions: [{\n name: '一月',\n value: 1\n }, {\n name: '二月',\n value: 2\n }, {\n name: '三月',\n value: 3\n }, {\n name: '四月',\n value: 4\n }, {\n name: '五月',\n value: 5\n }, {\n name: '六月',\n value: 6\n }, {\n name: '七月',\n value: 7\n }, {\n name: '八月',\n value: 8\n }, {\n name: '九月',\n value: 9\n }, {\n name: '十月',\n value: 10\n }, {\n name: '十一月',\n value: 11\n }, {\n name: '十二月',\n value: 12\n }],\n routeName: '',\n fileIndex: 0,\n fileIds: [],\n delIds: [],\n groupOptions: [],\n workingOptions: [],\n yearOptions: [],\n historyDate: ''\n };\n },\n created: function created() {\n this.ggbb_ssly = dictUtils.getDictItemsFromCache('ggbb_ssly');\n this.groupOptions = dictUtils.getDictItemsFromCache('zxxz');\n this.groupOptions.splice(6, 1);\n this.treeData = JSON.parse(sessionStorage.getItem('responsibilityTree'));\n var name = this.$route.name;\n this.routeName = name;\n },\n mounted: function mounted() {},\n methods: {\n getNowDate: function getNowDate() {\n this.reqLoading = true;\n return new Promise(function (resolve) {\n publicApi.getNowDate(function (res) {\n if (res) {\n var time = moment(res).format('YYYY-MM-DD');\n resolve(time);\n }\n });\n });\n },\n openDialog: function openDialog(title, data) {\n var _this = this;\n\n this.setYearOptions();\n var projectType = data.projectType;\n this.workingOptions = dictUtils.getDictItemsFromCache('zbqdyp_zt');\n\n if (projectType === 2) {\n this.workingOptions.splice(-1);\n }\n\n this.title = title;\n this.disabled = title === '详情' ? true : false;\n\n if (title === '新增') {\n this.parameter.projectType = data.type; // this.parameter.year = new Date().getFullYear()\n } else {\n this.parameter = JSON.parse(JSON.stringify(data));\n !this.parameter.projectRunway && this.$set(this.parameter, 'projectRunway', '');\n this.parameter.unitValue = this.getParentsById(this.treeData, data.unitId); // this.parameter.year = this.parameter.year\n\n if (data.pid) {\n this.reqLoading = true; // apiList.getfillDetailById(data.id, (res) => {\n // if (res.length) {\n // res[0].files = res[0].files || []\n // res[0].approvalComments =\n // res[0].approvalComments &&\n // res[0].approvalComments.split('$_$')\n // this.advanceData = res[0]\n // if (res[1]) {\n // res[1].approvalComments =\n // res[1].approvalComments &&\n // res[1].approvalComments.split('$_$')\n // this.hisAdvanceData = res[1]\n // this.fileIds =\n // res[1].files && res[1].files.length\n // ? res[1].files.map((item) => item.id)\n // : []\n // }\n // }\n // this.reqLoading = false\n // })\n\n apiList.getNewDataById(data.id, function (res) {\n res.files = res.files || [];\n res.approvalComments = res.approvalComments && res.approvalComments.split('$_$');\n _this.advanceData = res;\n _this.advanceData.requestReadyToStart = res.requestReadyToStart - 0;\n _this.historyDate = res.planDate;\n\n _this.getHistoryData(data.id, res.planDate, 'open');\n });\n } else {\n this.getNowDate().then(function (res) {\n _this.$set(_this.advanceData, 'planDate', res);\n\n _this.reqLoading = false;\n }); // let time = moment(new Date()).format('YYYY-MM-DD')\n\n if (projectType === 3) {\n this.advanceData = {\n requestReadyToStart: '15',\n buildArchitecture: '15',\n defineThreeCoreIndicators: '15',\n formList: '15',\n issueDocument: '15',\n requestToStart: '15'\n };\n }\n }\n\n if (data.projectField) {\n var arr = utils.getDictItemsFromCache('ggbb_ssly');\n arr.forEach(function (item) {\n if (item.value == data.projectField) {\n _this.demandRunwaOoptionsForm = item.lowerDic['ggbb_sspd'];\n }\n });\n this.parameter.projectRunway += '';\n }\n }\n\n this.visible = true;\n },\n // 历史数据查询\n getHistoryData: function getHistoryData(id, planDate, type) {\n var _this2 = this;\n\n apiList.getHistoryData({\n id: id,\n planDate: planDate\n }, function (res) {\n if (res) {\n res.approvalComments = res.approvalComments && res.approvalComments.split('$_$');\n _this2.hisAdvanceData = res;\n\n if (type === 'open') {\n _this2.fileIds = res.files && res.files.length ? res.files.map(function (item) {\n return item.id;\n }) : [];\n }\n } else {\n _this2.hisAdvanceData = null;\n }\n\n _this2.reqLoading = false;\n });\n },\n hisDateChange: function hisDateChange(e) {\n this.reqLoading = true;\n this.getHistoryData(this.parameter.id, e);\n },\n setYearOptions: function setYearOptions() {\n var year = new Date().getFullYear();\n\n for (var i = 0; i < 6; i++) {\n this.yearOptions.push({\n label: year + i + '年',\n value: year + i\n });\n }\n },\n // 获取字典值翻译\n getDictName: function getDictName(code, value) {\n return utils.getDictName(code, value);\n },\n // 所属跑道选择\n hanldeCommonSelect: function hanldeCommonSelect(val, obj, key) {\n if (obj) {\n this.demandRunwaOoptionsForm = obj.lowerDic['ggbb_sspd'];\n } else {\n this.demandRunwaOoptionsForm = [];\n }\n\n this.parameter.projectRunway = '';\n },\n changeUnit: function changeUnit(value) {\n var _this3 = this;\n\n this.$nextTick(function () {\n var nodesObj = _this3.$refs['cascader'].getCheckedNodes();\n\n console.log(nodesObj);\n\n if (nodesObj.length) {\n _this3.parameter.unitId = nodesObj[0].data.id;\n _this3.parameter.unitName = nodesObj[0].data.name;\n _this3.parameter.unitCode = nodesObj[0].data.code;\n _this3.parameter.unitGrade = nodesObj[0].data.grade;\n } else {\n _this3.parameter.unitId = '';\n _this3.parameter.unitName = '';\n _this3.parameter.unitCode = '';\n _this3.parameter.unitGrade = '';\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 // 关闭\n handleClose: function handleClose() {\n this.$refs.formInfo1.resetFields();\n this.visible = false;\n this.parameter = {\n projectName: '',\n projectField: '',\n projectRunway: '',\n groupName: '',\n unitValue: [],\n unitId: '',\n unitName: '',\n unitCode: '',\n unitGrade: '' // year: '',\n\n };\n this.advanceData = {};\n this.hisAdvanceData = null;\n this.fileIds = [];\n this.delIds = [];\n },\n // 通过\n handleVerify: function handleVerify() {\n this.$confirm('确认通过吗?', this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {});\n },\n // 驳回确认\n handleReject: function handleReject() {\n var _this4 = this;\n\n this.$confirm('确认驳回吗?', this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'error'\n }).then(function () {\n _this4.$refs.RejectInfoDialog.open();\n });\n },\n // 驳回提交数据\n sendRejectInfo: function sendRejectInfo(rejectInfo) {\n var _this5 = this;\n\n this.markLoading = true;\n var data = JSON.parse(JSON.stringify(this.advanceData));\n data.approvalComments = rejectInfo;\n data.status = 2;\n apiList.advanceSaveOrUpdate(data, function (res) {\n if (res.state) {\n _this5.$message.success(\"\\u5BA1\\u6838\\u9A73\\u56DE\\u6210\\u529F\");\n\n _this5.$emit('getData');\n\n _this5.handleClose();\n }\n\n _this5.markLoading = false;\n });\n },\n // 项目基础信息录入\n handleSave: function handleSave(status) {\n var _this6 = this;\n\n this.$refs['formInfo'].validate(function (valid) {\n if (valid) {\n var msg = status ? '保存并下发' : '保存为草稿';\n\n _this6.$confirm(\"\\u786E\\u8BA4\".concat(msg, \"\\u5417\\uFF1F\"), '提示', {\n confirmButtonText: '确认',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this6.markLoading = true;\n var data = JSON.parse(JSON.stringify(_this6.parameter));\n delete data.unitValue;\n data.status = status;\n var api = data.id ? 'majorProjectUpdate' : 'majorProjectAdd';\n apiList[api](data, function (res) {\n if (res.state) {\n _this6.$message.success(\"\".concat(msg, \"\\u6210\\u529F\"));\n\n _this6.$emit('getData');\n\n _this6.handleClose();\n }\n\n _this6.markLoading = false;\n });\n });\n }\n });\n },\n // 推进录入\n propelSave: function propelSave(status) {\n var _this7 = this;\n\n this.$refs['formInfo1'].validate(function (valid) {\n if (valid) {\n var msg = status ? status === 3 ? '审核通过' : '保存并上报' : '保存为草稿';\n\n _this7.$confirm(\"\\u786E\\u8BA4\".concat(msg, \"\\u5417\\uFF1F\"), '提示', {\n confirmButtonText: '确认',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this7.markLoading = true;\n var data = JSON.parse(JSON.stringify(_this7.advanceData));\n\n if (_this7.parameter.pstatus > 1 && (_this7.routeName === 'StartAdvanceEntry' || _this7.routeName === 'ReserveAdvanceEntry')) {\n data.id = '';\n }\n\n data.approvalComments = '';\n data.projectId = data.projectId || _this7.parameter.id;\n data.produceReport = data.produceReport - 0;\n data.status = status;\n apiList.advanceSaveOrUpdate(data, function (res) {\n if (res.state) {\n _this7.$message.success(\"\".concat(msg, \"\\u6210\\u529F\"));\n\n _this7.$emit('getData');\n\n if (_this7.delIds.length) {\n _this7.saveRemoveFiles();\n }\n\n _this7.handleClose();\n }\n\n _this7.markLoading = false;\n });\n });\n }\n });\n },\n // 改革办修改\n propelUpdateSave: function propelUpdateSave() {\n var _this8 = this;\n\n this.$refs['formInfo1'].validate(function (valid) {\n if (valid) {\n _this8.$confirm(\"\\u786E\\u8BA4\\u4FDD\\u5B58\\u5417\\uFF1F\", '提示', {\n confirmButtonText: '确认',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n _this8.markLoading = true;\n var data = JSON.parse(JSON.stringify(_this8.advanceData));\n apiList.advanceSaveOrUpdate(data, function (res) {\n if (res.state) {\n _this8.$message.success(\"\\u4FDD\\u5B58\\u6210\\u529F\");\n\n _this8.$emit('getData');\n\n _this8.handleClose();\n }\n\n _this8.markLoading = false;\n });\n });\n }\n });\n },\n // ------------文件相关--------------\n // 根据id查询附件\n getFiles: function getFiles(id, index) {\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 });\n },\n openUploade: function openUploade() {\n var projectType = this.parameter.projectType;\n var code = projectType === 2 ? 'ReadyStartProject' : 'PlanStartProject';\n this.$refs.uploadFile.open(code);\n },\n // 文件涉密\n setAipher: function setAipher() {\n this.$set(this.advanceData, 'classified', '文件涉密已通过内网上传');\n },\n // 上传附件\n setFileList: function setFileList(file) {\n var newFile = _objectSpread(_objectSpread({}, file), {}, {\n id: file.response.fileId\n });\n\n this.advanceData.files = this.advanceData.files || this.$set(this.advanceData, 'files', []);\n this.advanceData.files.push(newFile);\n this.advanceData.classified = '';\n },\n changeFileList: function changeFileList(arr) {\n this.advanceData.files = arr;\n },\n idExist: function idExist(id) {\n console.log(id, this.fileIds);\n\n if (!this.fileIds.includes(id) && this.parameter.pstatus === 0) {\n this.delIds.push(id);\n }\n\n console.log(this.delIds);\n },\n saveRemoveFiles: function saveRemoveFiles() {\n var ids = this.delIds.join(',');\n req.remove(portal + \"/file/v1/?ids=\".concat(ids)).then(function (res) {// console.log(res)\n });\n }\n }\n};",null]}