{"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\\ReserveItemDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorReformProjects\\components\\ReserveItemDialog.vue","mtime":1681724620057},{"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/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//\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';\nexport default {\n name: 'MajorProjectsDialog',\n data: function data() {\n return {\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 },\n queryParam: {\n pageBean: {\n page: 1,\n pageSize: -1\n }\n },\n treeData: [],\n typeList: [],\n parameter: {\n projectName: '',\n leader: '',\n projectType: '',\n closing: '0',\n unitId: '',\n unitName: '',\n unitCode: '',\n unitGrade: '' // pilotQuantitativeObjectivesList: [{}], //量化目标\n // pilotSpecificMeasuresList: [{}], //具体举措\n // pilotSpecificScheduleList: [{}], //进度计划\n\n },\n unitValue: [],\n //责任值\n kmList: [],\n fileList: []\n };\n },\n created: function created() {\n this.kmList = dictUtils.getDictItemsFromCache('subjec_type');\n this.treeData = JSON.parse(sessionStorage.getItem('responsibilityTree')); // this.loadDataTree()\n },\n mounted: function mounted() {},\n methods: {\n // tableDel(type, row) {\n // \tthis.parameter[type] = this.parameter[type].filter((item) => item.key !== row.key)\n // },\n // tableAdd(type) {\n // \tif (type == 'pilotQuantitativeObjectivesList') {\n // \t\tthis.parameter[type].push({\n // \t\t\tkey: this.parameter[type].length + new Date(),\n // \t\t\ttarget: '',\n // \t\t\tunit: '',\n // \t\t\ttargetValY: null,\n // \t\t\ttargetValM: null,\n // \t\t\tcurrentVal: null,\n // \t\t})\n // \t} else {\n // \t\tthis.parameter[type].push({\n // \t\t\tkey: this.parameter[type].length + new Date(),\n // \t\t\tmeasure: '',\n // \t\t})\n // \t}\n // },\n handlePreview: function handlePreview() {},\n handleRemove: function handleRemove() {},\n beforeRemove: function beforeRemove() {},\n handleExceed: function handleExceed() {},\n edit: function edit(val) {\n var _this = this;\n\n this.title = '编辑';\n this.visible = true; // this.disabled = true\n\n majorProjects.detailId(val, function (res) {\n if (res) {\n _this.parameter = res; // this.typeList = this.parameter.type.split(',')\n // console.log(this.typeList)\n\n _this.parameter.closing = _this.parameter.closing.toString();\n _this.unitValue = _this.getParentsById(_this.treeData, _this.parameter.unitId);\n }\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 = this.$t('common.add');\n this.visible = true;\n },\n changeUnit: function changeUnit(value) {\n var nodesObj = this.$refs['cascader'].getCheckedNodes();\n\n if (nodesObj != []) {\n this.parameter.unitId = nodesObj[0].data.id;\n this.parameter.unitName = nodesObj[0].label;\n this.parameter.unitCode = nodesObj[0].data.code;\n this.parameter.unitGrade = nodesObj[0].level;\n } else {\n this.parameter.unitId = '';\n this.parameter.unitName = '';\n this.parameter.unitCode = '';\n this.parameter.unitGrade = '';\n }\n },\n // 关闭新增人员窗口\n handleClose: function handleClose() {\n this.typeList = [];\n this.visible = false;\n this.disabled = false;\n this.title = '';\n this.unitValue = [];\n this.parameter = {\n projectName: '',\n leader: '',\n closing: '0',\n unitId: '',\n unitName: '',\n unitCode: '',\n unitGrade: ''\n };\n },\n // 保存\n handleSave: function handleSave() {\n var _this2 = this;\n\n this.saveloading = true;\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this2.title === '添加' || _this2.title === 'add') {\n majorProjects.addData(_this2.parameter, function (res) {\n if (res.state) {\n _this2.$notify({\n type: 'success',\n message: '添加成功',\n duration: 2000\n });\n\n _this2.saveloading = false;\n\n _this2.$emit('getData');\n\n _this2.handleClose();\n }\n });\n } else if (_this2.title === '编辑' || _this2.title === 'edit') {\n majorProjects.editData(_this2.parameter, function (res) {\n if (res.state) {\n _this2.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000\n });\n\n _this2.saveloading = false;\n\n _this2.$emit('getData');\n\n _this2.handleClose();\n }\n });\n }\n }\n });\n }\n }\n};",null]}