{"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\\components\\MajorProjectsDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorReformProjects\\components\\MajorProjectsDialog.vue","mtime":1682516191954},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.to-string\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 org from '@/api/org.js';\nimport utils from '@/utils.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport majorProjects from '@/api/MajorReformProjects/majorProjects.js';\nimport targetEntryDialog from \"./targetEntryDialog.vue\";\nimport moment from 'moment';\nexport default {\n name: 'MajorProjectsDialog',\n components: {\n targetEntryDialog: targetEntryDialog\n },\n data: function data() {\n return {\n demandRunwaOoptionsForm: [],\n // 所属跑道数据(表单内)\n reqLoading: false,\n activeCollapse1: '1',\n visible: false,\n title: '新增',\n disabled: false,\n saveloading: false,\n rules: {\n projectName: [{\n required: true,\n message: '请输入项目名称',\n trigger: 'blur'\n }],\n leader: [{\n required: true,\n message: '请输入牵头市领导',\n trigger: 'blur'\n }],\n unitId: [{\n required: true,\n message: '请选择责任单位',\n trigger: 'blur'\n }],\n projectType: [{\n required: true,\n message: '请选择项目类型',\n trigger: 'blur'\n }],\n projectField: [{\n required: true,\n message: '请选择所属领域',\n trigger: 'blur'\n }],\n projectRunway: [{\n required: true,\n message: '请选择所属跑道',\n trigger: 'blur'\n }] // reformQuantitativeObjectives: [\n // {\n // required: true,\n // message: '请选择所属跑道',\n // trigger: 'blur'\n // }\n // ]\n\n },\n queryParam: {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n },\n treeData: [],\n typeList: [],\n parameter: {\n projectName: '',\n leader: '',\n projectType: '1',\n projectField: '1',\n projectRunway: '1',\n closing: '1',\n unitId: '',\n unitName: '',\n unitCode: '',\n startDate: '',\n endDate: '',\n unitGrade: '',\n pilotQuantitativeObjectivesList: [{}],\n //量化目标\n pilotSpecificMeasuresList: [{}],\n //具体举措\n pilotSpecificScheduleList: [{\n planYear: moment().format('YYYY'),\n planMonth: moment().format('M'),\n progressStatus: 1,\n planType: '',\n planContent: '',\n plannedCompletionTime: ''\n }] //进度计划\n\n },\n unitValue: [],\n //责任值\n kmList: [],\n fileList: [],\n ggbb_ssly: [],\n markLoading: false\n };\n },\n created: function created() {\n this.kmList = dictUtils.getDictItemsFromCache('subjec_type');\n this.ggbb_ssly = dictUtils.getDictItemsFromCache('ggbb_ssly');\n this.treeData = JSON.parse(sessionStorage.getItem('responsibilityTree'));\n this.demandRunwaOoptionsForm = this.ggbb_ssly[0].lowerDic['ggbb_sspd'];\n },\n mounted: function mounted() {},\n methods: {\n // 获取字典值翻译\n getDictName: function getDictName(code, value) {\n return utils.getDictName(code, value);\n },\n // 所属跑道选择\n hanldeCommonSelect: function hanldeCommonSelect(val, obj, key) {\n this.demandRunwaOoptionsForm = obj.lowerDic['ggbb_sspd'];\n this.parameter.projectRunway = '';\n },\n addData: function addData(val, index) {\n console.log(val, index);\n this.parameter.pilotQuantitativeObjectivesList[index].pilotObjectivesDetailsList = val;\n console.log(this.parameter.pilotQuantitativeObjectivesList); // this.$set(this.parameter.pilotQuantitativeObjectivesList,index,val)\n },\n tableDel: function tableDel(type, row) {\n var _this = this;\n\n if (this.title == '新增' || row.key) {\n this.parameter[type] = this.parameter[type].filter(function (item) {\n return item.key !== row.key;\n });\n } else {\n console.log(type);\n this.$confirm('确认删除这条记录?', '提示', {\n cancelButtonText: '关闭',\n type: 'error'\n }).then(function () {\n if (type == 'pilotQuantitativeObjectivesList') {\n majorProjects.deleteLhmb(row.id, function (res) {\n if (res.state) {\n _this.$message.success('删除数据成功');\n\n _this.parameter[type] = _this.parameter[type].filter(function (item) {\n return item.id !== row.id;\n });\n }\n });\n } else if (type == 'pilotSpecificMeasuresList') {\n majorProjects.deleteJtjc(row.id, function (res) {\n if (res.state) {\n _this.$message.success('删除数据成功');\n\n _this.parameter[type] = _this.parameter[type].filter(function (item) {\n return item.id !== row.id;\n });\n }\n });\n } else if (type == 'pilotSpecificScheduleList') {\n majorProjects.deleteJdjh(row.id, function (res) {\n if (res.state) {\n _this.$message.success('删除数据成功');\n\n _this.parameter[type] = _this.parameter[type].filter(function (item) {\n return item.id !== row.id;\n });\n }\n });\n }\n }); //\n }\n },\n tableAdd: function tableAdd(type) {\n if (type == 'pilotQuantitativeObjectivesList') {\n this.parameter[type].push({\n key: this.parameter[type].length + new Date(),\n target: '',\n unit: '',\n targetValY: null,\n targetValM: null,\n currentVal: null\n });\n } else if (type == 'pilotSpecificScheduleList') {\n this.parameter[type].push({\n key: this.parameter[type].length + new Date(),\n planYear: moment().format('YYYY'),\n planMonth: moment().format('M'),\n progressStatus: 1,\n planType: '',\n planContent: '',\n plannedCompletionTime: ''\n });\n } else {\n this.parameter[type].push({\n key: this.parameter[type].length + new Date(),\n measure: ''\n });\n }\n },\n handlePreview: function handlePreview() {},\n handleRemove: function handleRemove() {},\n beforeRemove: function beforeRemove() {},\n handleExceed: function handleExceed() {},\n edit: function edit(val) {\n var _this2 = this;\n\n this.title = '编辑';\n this.visible = true;\n this.reqLoading = true;\n majorProjects.detailId(val, function (res) {\n if (res) {\n _this2.parameter = res;\n _this2.parameter.closing = _this2.parameter.closing.toString();\n\n _this2.parameter.pilotSpecificScheduleList.forEach(function (e) {\n e.planYear = e.planYear && e.planYear.toString() || '';\n e.planMonth = e.planMonth && e.planMonth.toString() || '';\n });\n\n _this2.parameter.projectRunway = _this2.parameter.projectRunway ? _this2.parameter.projectRunway.toString() : '';\n\n _this2.ggbb_ssly.forEach(function (item) {\n if (item.value == _this2.parameter.projectField) {\n _this2.demandRunwaOoptionsForm = item.lowerDic['ggbb_sspd'];\n }\n });\n\n _this2.unitValue = _this2.getParentsById(_this2.treeData, _this2.parameter.unitId);\n }\n\n _this2.reqLoading = false;\n });\n },\n detail: function detail(val) {\n var _this3 = this;\n\n this.title = '详情';\n this.visible = true;\n this.disabled = true;\n this.reqLoading = true;\n majorProjects.detailId(val, function (res) {\n if (res) {\n _this3.parameter = res;\n _this3.parameter.closing = _this3.parameter.closing.toString();\n\n _this3.parameter.pilotSpecificScheduleList.forEach(function (e) {\n e.planYear = e.planYear.toString();\n e.planMonth = e.planMonth.toString();\n });\n\n _this3.parameter.projectRunway = _this3.parameter.projectRunway ? _this3.parameter.projectRunway.toString() : '';\n _this3.unitValue = _this3.getParentsById(_this3.treeData, _this3.parameter.unitId);\n }\n\n _this3.reqLoading = false;\n });\n },\n getParentsById: function getParentsById(list, id) {\n console.log(111);\n\n for (var i in list) {\n if (list[i].id == id) {\n //这里的no根据你的需求可进行改变\n //查询到就返回该数组对象的value\n return [list[i].id];\n }\n\n if (list[i].children) {\n var node = this.getParentsById(list[i].children, id);\n\n if (node !== undefined) {\n //查询到把父节把父节点加到数组前面\n node.unshift(list[i].id);\n console.log(node);\n return node;\n }\n }\n }\n },\n add: function add(val) {\n // this.parameter.parentId = val\n this.title = '新增';\n this.visible = true;\n this.demandRunwaOoptionsForm = this.ggbb_ssly[0].lowerDic['ggbb_sspd'];\n },\n changeUnit: function changeUnit(value) {\n var _this4 = this;\n\n this.$nextTick(function () {\n var nodesObj = _this4.$refs['cascader'].getCheckedNodes();\n\n console.log(nodesObj);\n\n if (nodesObj.length) {\n _this4.parameter.unitId = nodesObj[0].data.id;\n _this4.parameter.unitName = nodesObj[0].label;\n _this4.parameter.unitCode = nodesObj[0].data.code;\n _this4.parameter.unitGrade = nodesObj[0].level;\n } else {\n _this4.parameter.unitId = '';\n _this4.parameter.unitName = '';\n _this4.parameter.unitCode = '';\n _this4.parameter.unitGrade = '';\n }\n });\n },\n // 关闭新增人员窗口\n handleClose: function handleClose() {\n this.activeCollapse1 = '1';\n this.visible = false;\n this.disabled = false;\n this.title = '';\n this.unitValue = [];\n this.saveloading = false;\n this.parameter = {\n projectName: '',\n projectField: '1',\n projectRunway: '1',\n leader: '',\n projectType: '1',\n closing: '1',\n unitId: '',\n unitName: '',\n unitCode: '',\n unitGrade: '',\n pilotQuantitativeObjectivesList: [{}],\n //量化目标\n pilotSpecificMeasuresList: [{}],\n //具体举措\n pilotSpecificScheduleList: [{}] //进度计划\n\n };\n },\n //打卡目标录入\n targetEntry: function targetEntry(ind, val) {\n console.log(this.title);\n console.log(val);\n this.$refs.targetEntryDialog.add(ind, val, this.title);\n },\n //通过季度确认计划完成时间\n setTime: function setTime(val) {\n console.log();\n var year = moment().format('YYYY');\n\n switch (val.planMonth) {\n case '1':\n val.plannedCompletionTime = year + '-' + '03' + '-' + new Date(year, 3, 0).getDate(); //获取第四季度最后一天日期\n\n break;\n\n case '2':\n val.plannedCompletionTime = year + '-' + '06' + '-' + new Date(year, 6, 0).getDate(); //获取第四季度最后一天日期\n\n break;\n\n case '3':\n val.plannedCompletionTime = year + '-' + '09' + '-' + new Date(year, 9, 0).getDate(); //获取第四季度最后一天日期\n\n break;\n\n case '4':\n val.plannedCompletionTime = year + '-' + 12 + '-' + new Date(year, 12, 0).getDate(); //获取第四季度最后一天日期\n\n break;\n }\n },\n // 保存\n handleSave: function handleSave() {\n var _this5 = this;\n\n console.log(this.parameter);\n this.parameter.pilotSpecificScheduleList.forEach(function (e) {\n delete e.key;\n });\n this.parameter.pilotSpecificMeasuresList.forEach(function (e) {\n delete e.key;\n });\n this.parameter.pilotQuantitativeObjectivesList.forEach(function (e) {\n delete e.key;\n });\n var flag = true;\n this.parameter.pilotQuantitativeObjectivesList.forEach(function (item) {\n if (!item.pilotObjectivesDetailsList) {\n flag = false;\n }\n });\n console.log(flag);\n this.$refs.formInfo.validate(function (valid) {\n if (valid && flag) {\n _this5.markLoading = true; // this.saveloading = true\n\n if (_this5.title === '新增') {\n majorProjects.addData(_this5.parameter, function (res) {\n if (res.state) {\n _this5.$notify({\n type: 'success',\n message: '新增成功',\n duration: 2000\n });\n\n _this5.$emit('getData');\n\n _this5.handleClose();\n }\n\n _this5.markLoading = false;\n });\n } else if (_this5.title === '编辑') {\n majorProjects.editData(_this5.parameter, function (res) {\n if (res.state) {\n _this5.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000\n });\n\n _this5.$emit('getData');\n\n _this5.handleClose();\n }\n\n _this5.markLoading = false;\n });\n }\n } else {\n if (!valid) {\n _this5.$message.warning('信息录入有误,请检查后保存');\n } else {\n _this5.$message.warning('改革方案明确的量化目标值未录入,请录入后保存');\n }\n }\n });\n }\n }\n};",null]}