refactor(editReportingData): 优化数据更新后的表单状态重置
- 在数据更新成功后,设置 lastItemValid 为 true,以确保表单状态正确 - 在 expandRowKeys 重置后,添加 lastItemValid 设置,以协调表单与数据的同步
Showing
1 changed file
with
2 additions
and
0 deletions
| ... | @@ -978,6 +978,7 @@ | ... | @@ -978,6 +978,7 @@ |
| 978 | }) | 978 | }) |
| 979 | this.expandRowKeys = [] | 979 | this.expandRowKeys = [] |
| 980 | this.$nextTick(()=>{ | 980 | this.$nextTick(()=>{ |
| 981 | + this.lastItemValid = true; | ||
| 981 | this.getTotalNumber() | 982 | this.getTotalNumber() |
| 982 | }) | 983 | }) |
| 983 | }, | 984 | }, |
| ... | @@ -1014,6 +1015,7 @@ | ... | @@ -1014,6 +1015,7 @@ |
| 1014 | if (res.code == 200) { | 1015 | if (res.code == 200) { |
| 1015 | this.msgSuccess("数据更新成功"); | 1016 | this.msgSuccess("数据更新成功"); |
| 1016 | this.queryDeclareData(this.declareId) | 1017 | this.queryDeclareData(this.declareId) |
| 1018 | + this.lastItemValid = true; | ||
| 1017 | } else { | 1019 | } else { |
| 1018 | this.alertWarningMsg(res.message); | 1020 | this.alertWarningMsg(res.message); |
| 1019 | } | 1021 | } | ... | ... |
-
Please register or login to post a comment