|
|
@@ -1123,12 +1123,20 @@ export default {
|
|
|
this.open = false
|
|
|
},
|
|
|
// 人员列表删除
|
|
|
+ // deleteRow(index, rows) {
|
|
|
+ // console.log(index, rows, '删除的行')
|
|
|
+ // rows.splice(index, 1)
|
|
|
+ // this.form.ticketUserDTOList.splice(index, 1)
|
|
|
+ // },
|
|
|
deleteRow(index, rows) {
|
|
|
- console.log(index, rows, '删除的行')
|
|
|
- rows.splice(index, 1)
|
|
|
- this.form.ticketUserDTOList.splice(index, 1)
|
|
|
+ console.log(index, rows, '删除的行');
|
|
|
+ const deletedItem = rows[index]; // 获取要删除的项
|
|
|
+ rows.splice(index, 1); // 从显示的列表中删除
|
|
|
+ const formIndex = this.form.ticketUserDTOList.findIndex(item => item.userId === deletedItem.userId);
|
|
|
+ if (formIndex !== -1) {
|
|
|
+ this.form.ticketUserDTOList.splice(formIndex, 1); // 从 form.ticketUserDTOList 中删除
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
// 时间选项
|
|
|
ticketStartTimeChange(value) {
|
|
|
this.form.ticketStartTime = value;
|