|
|
@@ -256,7 +256,11 @@ export default {
|
|
|
initYear() {
|
|
|
this.years.length = 0
|
|
|
let localYears = []
|
|
|
- if (this.detail && this.detail.investment) {
|
|
|
+ if (
|
|
|
+ this.detail &&
|
|
|
+ this.detail.investment &&
|
|
|
+ this.detail.investment.data
|
|
|
+ ) {
|
|
|
localYears = this.detail.investment.data.map(ele => ele.year)
|
|
|
}
|
|
|
const year = new Date().getFullYear()
|
|
|
@@ -301,6 +305,17 @@ export default {
|
|
|
} else if (type === 2) {
|
|
|
this.investment.splice(0, 0, newYearObj)
|
|
|
}
|
|
|
+ if (Object.hasOwn(this.form, 'amount')) {
|
|
|
+ this.form.amount = { data: [...this.amount] }
|
|
|
+ } else {
|
|
|
+ this.form.amount = { data: [...this.amount] }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (Object.hasOwn(this.form, 'investment')) {
|
|
|
+ this.form.investment = { data: [...this.investment] }
|
|
|
+ } else {
|
|
|
+ this.form.investment = { data: [...this.investment] }
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 更新数据
|