From e77312100832d9b79e334e41cd6ad36c872df522 Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期一, 30 六月 2025 18:19:21 +0800
Subject: [PATCH] fix
---
culture/src/views/pedigree-chart/addProgenitor.vue | 3 ++-
culture/src/views/pedigree-chart/add.vue | 7 +++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/culture/src/views/pedigree-chart/add.vue b/culture/src/views/pedigree-chart/add.vue
index 0a77feb..2c15984 100644
--- a/culture/src/views/pedigree-chart/add.vue
+++ b/culture/src/views/pedigree-chart/add.vue
@@ -464,19 +464,22 @@
};
// 获取基础表单数据
- 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();
diff --git a/culture/src/views/pedigree-chart/addProgenitor.vue b/culture/src/views/pedigree-chart/addProgenitor.vue
index f6bc5f2..e9f56ce 100644
--- a/culture/src/views/pedigree-chart/addProgenitor.vue
+++ b/culture/src/views/pedigree-chart/addProgenitor.vue
@@ -376,11 +376,12 @@
};
// 获取基础表单数据
- 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("编辑成功");
--
Gitblit v1.7.1