Skip to content

Commit

Permalink
fix: 修复提单节点表单编辑复制问题
Browse files Browse the repository at this point in the history
  • Loading branch information
luofann committed Dec 12, 2023
1 parent 9e51a51 commit 592cafa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion frontend/pc/src/views/service/editService/ServiceForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
},
// 字段编辑保存
onEditConfirm(form) {
const originForm = this.forms.find(item => item.id === form.id);
const originForm = this.forms.find(item => item.id === this.crtForm);
if (originForm) {
if (form.layout === 'COL_12') {
form.layout_position = '';
Expand Down
8 changes: 2 additions & 6 deletions frontend/pc/src/views/service/editService/ServiceFormStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -700,15 +700,11 @@
},
// 保存字段
saveField(field) {
const index = this.ticketNodeForm.findIndex(item => item.id === field.id);
const index = this.ticketNodeForm.findIndex(item => item.id === this.crtForm);
field.checkValue = false;
field.showFeild = true;
field.val = Object.prototype.hasOwnProperty.call(field, 'default') ? deepClone(field.default) : '';
if (index > -1) { // 编辑
this.ticketNodeForm.splice(index, 1, field);
} else { // 新增
this.ticketNodeForm.splice(-1, 1, field);
}
this.ticketNodeForm.splice(index, 1, field);
this.crtForm = '';
},
// 保存字段半行拖拽后的位置
Expand Down

0 comments on commit 592cafa

Please sign in to comment.