1.修复用户数据和单据类型数据回显无法选中的问题

master
MrZhai 3 years ago
parent d5563cdcd0
commit 9f795c9661

@ -825,18 +825,21 @@ export default {
} else { } else {
this.userFormVisible = true; this.userFormVisible = true;
getHospitalUserList().then((res) => { getHospitalUserList().then((res) => {
this.selectUserList = this.userData; this.selectUserList = [];
this.userList = res.data; this.userList = res.data;
this.userData.forEach(data => { var that = this;
this.userList.forEach(user => { that.$nextTick(() => {
if (user.id == data.userid) { if (that.$refs.checkUserList) {
this.$refs.checkUserList.toggleRowSelection(user, true); that.$refs.checkUserList.clearSelection();
console.log(this.$refs.checkUserList) }
} else { that.userList.forEach(row => {
this.$refs.checkUserList.toggleRowSelection(user, false); for (let j in that.userData) {
if (row.id == that.userData[j].userid) {
that.$refs.checkUserList.toggleRowSelection(row, true);
}
} }
}); });
}); })
}); });
} }
}, },
@ -885,14 +888,19 @@ export default {
enabled: true enabled: true
}; };
getJoinBussinessType(query).then((res) => { getJoinBussinessType(query).then((res) => {
this.selectBussinessTypeList = [];
this.bussinessTypeList = res.data.list; this.bussinessTypeList = res.data.list;
this.bussinessTypeList.forEach(type => {
this.bussinessTypeData.forEach(data => { var that = this;
if (type.action == data.action) { that.$nextTick(() => {
this.$refs.typeList.toggleRowSelection(type, true); if (that.$refs.typeList) {
} else { that.$refs.typeList.clearSelection();
// }
this.$refs.typeList.toggleRowSelection(type, false); that.bussinessTypeList.forEach(row => {
for (let j in that.bussinessTypeData) {
if (row.action == that.bussinessTypeData[j].action) {
that.$refs.typeList.toggleRowSelection(row, true);
}
} }
}); });
}); });

Loading…
Cancel
Save