| | |
| | | project.children = this.handleTree(response.data.list, "proId"); |
| | | this.key = response.data.key; |
| | | this.projectOptions.push(project); |
| | | // this.open = true; |
| | | if (row.proId) { |
| | | this.form.proParentId = row.proId || 0; |
| | | this.open = true; |
| | | } else if (this.treeDate.id) { |
| | | this.form.proParentId = this.treeDate.id || 0; |
| | | if(this.treeDate.qf == "0"){ |
| | | this.form.proParentId = "0" |
| | | this.projectOptions.forEach((item) => { |
| | | item.children.forEach((item1) => { |
| | | if (this.treeDate.id == item1.deptId) { |
| | | this.form.deptId = item1.deptId; |
| | | } |
| | | }); |
| | | }); |
| | | }else{ |
| | | this.form.proParentId = this.treeDate.id; |
| | | this.projectOptions.forEach((item) => { |
| | | item.children.forEach((item1) => { |
| | | if (this.form.proParentId == item1.proId) { |
| | |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | |
| | | this.open = true; |
| | | } else { |
| | | this.form.proParentId = "0" |
| | | this.open = true; |
| | | } |
| | | } |
| | |
| | | }); |
| | | }, |
| | | handleNodeClick(date) { |
| | | |
| | | this.treeDate = date; |
| | | console.log(this.treeDate) |
| | | this.xiugais = date.qf === "0"; |
| | | let proId = date.id; |
| | | getInfoByProId(proId).then((response) => { |
| | |
| | | } else { |
| | | this.form.consumablesList = null; |
| | | } |
| | | if (!this.form.deptId || !this.form.proParentId) { |
| | | if (!this.form.deptId || this.form.proParentId == null) { |
| | | this.$message.error("请填写父项名称或科室名称"); |
| | | this.open = true; |
| | | } else { |