{"remainingRequest":"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\\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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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\tname: 'MajorProjectsDialog',\n\tdata() {\n\t\treturn {\n\t\t\tactiveCollapse1: '1',\n\t\t\tvisible: false,\n\t\t\ttitle: '新增',\n\t\t\tdisabled: false,\n\t\t\tsaveloading:false,\n\t\t\trules: {\n\t\t\t\tprojectName: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入项目名称',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tleader: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入牵头市领导',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t\tunitId: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择责任单位',\n\t\t\t\t\ttrigger: 'blur',\n\t\t\t\t}, ],\n\t\t\t},\n\t\t\tqueryParam: {\n\t\t\t\tpageBean: {\n\t\t\t\t\tpage: 1,\n\t\t\t\t\tpageSize: -1,\n\t\t\t\t},\n\t\t\t},\n\t\t\ttreeData: [],\n\t\t\ttypeList: [],\n\t\t\tparameter: {\n\t\t\t\tprojectName: '',\n\t\t\t\tleader: '',\n\t\t\t\tprojectType: '',\n\t\t\t\tclosing: '0',\n\t\t\t\tunitId: '',\n\t\t\t\tunitName: '',\n\t\t\t\tunitCode: '',\n\t\t\t\tunitGrade: '',\n\t\t\t\t// pilotQuantitativeObjectivesList: [{}], //量化目标\n\t\t\t\t// pilotSpecificMeasuresList: [{}], //具体举措\n\t\t\t\t// pilotSpecificScheduleList: [{}], //进度计划\n\t\t\t},\n\t\t\tunitValue: [], //责任值\n\t\t\tkmList: [],\n\t\t\tfileList: [],\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.kmList = dictUtils.getDictItemsFromCache('subjec_type')\n\t\tthis.treeData=JSON.parse(sessionStorage.getItem('responsibilityTree'))\n\t\t// this.loadDataTree()\n\t},\n\tmounted() {},\n\tmethods: {\n\t\t\n\t\t// tableDel(type, row) {\n\t\t// \tthis.parameter[type] = this.parameter[type].filter((item) => item.key !== row.key)\n\t\t// },\n\t\t// tableAdd(type) {\n\t\t// \tif (type == 'pilotQuantitativeObjectivesList') {\n\t\t// \t\tthis.parameter[type].push({\n\t\t// \t\t\tkey: this.parameter[type].length + new Date(),\n\t\t// \t\t\ttarget: '',\n\t\t// \t\t\tunit: '',\n\t\t// \t\t\ttargetValY: null,\n\t\t// \t\t\ttargetValM: null,\n\t\t// \t\t\tcurrentVal: null,\n\t\t// \t\t})\n\t\t// \t} else {\n\t\t// \t\tthis.parameter[type].push({\n\t\t// \t\t\tkey: this.parameter[type].length + new Date(),\n\t\t// \t\t\tmeasure: '',\n\t\t// \t\t})\n\t\t// \t}\n\t\t// },\n\t\thandlePreview() {},\n\t\thandleRemove() {},\n\t\tbeforeRemove() {},\n\t\thandleExceed() {},\n\t\tedit(val) {\n\t\t\tthis.title = '编辑'\n\t\t\tthis.visible = true\n\t\t\t// this.disabled = true\n\t\t\tmajorProjects.detailId(val, (res) => {\n\t\t\t\tif (res) {\n\t\t\t\t\tthis.parameter = res\n\t\t\t\t\t// this.typeList = this.parameter.type.split(',')\n\t\t\t\t\t// console.log(this.typeList)\n\t\t\t\t\tthis.parameter.closing = this.parameter.closing.toString()\n\t\t\t\t\tthis.unitValue = this.getParentsById(this.treeData, this.parameter.unitId)\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tgetParentsById(list, id) {\n\t\t\tconsole.log(111);\n\t\t\tfor (let i in list) {\n\t\t\t\tif (list[i].id == id) { //这里的no根据你的需求可进行改变\n\t\t\t\t\t//查询到就返回该数组对象的value\n\t\t\t\t\treturn [list[i].id];\n\t\t\t\t}\n\t\t\t\tif (list[i].children) {\n\t\t\t\t\tlet node = this.getParentsById(list[i].children, id);\n\t\t\t\t\tif (node !== undefined) {\n\t\t\t\t\t\t//查询到把父节把父节点加到数组前面\n\t\t\t\t\t\tnode.unshift(list[i].id);\n\t\t\t\t\t\tconsole.log(node);\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tadd(val) {\n\t\t\t// this.parameter.parentId = val\n\t\t\tthis.title = this.$t('common.add')\n\t\t\tthis.visible = true\n\t\t},\n\t\tchangeUnit(value) {\n\t\t\tlet nodesObj = this.$refs['cascader'].getCheckedNodes()\n\t\t\tif (nodesObj != []) {\n\t\t\t\tthis.parameter.unitId = nodesObj[0].data.id\n\t\t\t\tthis.parameter.unitName = nodesObj[0].label\n\t\t\t\tthis.parameter.unitCode = nodesObj[0].data.code\n\t\t\t\tthis.parameter.unitGrade = nodesObj[0].level\n\t\t\t} else {\n\t\t\t\tthis.parameter.unitId = ''\n\t\t\t\tthis.parameter.unitName = ''\n\t\t\t\tthis.parameter.unitCode = ''\n\t\t\t\tthis.parameter.unitGrade = ''\n\t\t\t}\n\t\t},\n\t\t// 关闭新增人员窗口\n\t\thandleClose() {\n\t\t\tthis.typeList = []\n\t\t\tthis.visible = false\n\t\t\tthis.disabled = false\n\t\t\tthis.title = ''\n\t\t\tthis.unitValue=[]\n\t\t\tthis.parameter = {\n\t\t\t\tprojectName: '',\n\t\t\t\tleader: '',\n\t\t\t\tclosing: '0',\n\t\t\t\tunitId: '',\n\t\t\t\tunitName: '',\n\t\t\t\tunitCode: '',\n\t\t\t\tunitGrade: '',\n\t\t\t}\n\t\t},\n\t\t// 保存\n\t\thandleSave() {\n\t\t\tthis.saveloading=true\n\t\t\tthis.$refs.formInfo.validate((valid) => {\n\t\t\t\tif (valid) {\n\t\t\t\t\tif (this.title === '添加' || this.title === 'add') {\n\t\t\t\t\t\tmajorProjects.addData(this.parameter, (res) => {\n\t\t\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\t\tmessage: '添加成功',\n\t\t\t\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tthis.saveloading=false\n\t\t\t\t\t\t\t\tthis.$emit('getData')\n\t\t\t\t\t\t\t\tthis.handleClose()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t} else if (this.title === '编辑' || this.title === 'edit') {\n\t\t\t\t\t\tmajorProjects.editData(this.parameter, (res) => {\n\t\t\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\t\tmessage: '修改成功',\n\t\t\t\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tthis.saveloading=false\n\t\t\t\t\t\t\t\tthis.$emit('getData')\n\t\t\t\t\t\t\t\tthis.handleClose()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t},\n}\n",null]}