| | |
| | | }; |
| | | |
| | | // 获取基础表单数据 |
| | | const baseData = { |
| | | let baseData = { |
| | | parent: { |
| | | generationType: 1, |
| | | strainSourceStart: this.form.strainSourceStart, |
| | | strainSourceEnd: this.form.strainSourceEnd, |
| | | strainCode: this.form.strainCode, |
| | | strainName: this.form.strainName, |
| | | |
| | | }, |
| | | one: buildTree(this.graphData.nodes, this.graphData.edges), |
| | | }; |
| | | |
| | | if (this.$route.query.id) { |
| | | edit({ ...baseData, id: this.$route.query.id }).then((res) => { |
| | | baseData.parent.id = this.$route.query.id; |
| | | |
| | | edit({ ...baseData }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("编辑成功"); |
| | | this.$router.back(); |
| | |
| | | }; |
| | | |
| | | // 获取基础表单数据 |
| | | const baseData = { |
| | | let baseData = { |
| | | parent: { ...this.form }, |
| | | one: processNodeData(this.graphData.nodes), |
| | | }; |
| | | if (this.$route.query.id) { |
| | | baseData.parent.id = this.$route.query.id; |
| | | edit({ ...baseData, id: this.$route.query.id }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("编辑成功"); |