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

master
MrZhai 3 years ago
parent d5563cdcd0
commit 9f795c9661

@ -825,18 +825,21 @@ export default {
} else {
this.userFormVisible = true;
getHospitalUserList().then((res) => {
this.selectUserList = this.userData;
this.selectUserList = [];
this.userList = res.data;
this.userData.forEach(data => {
this.userList.forEach(user => {
if (user.id == data.userid) {
this.$refs.checkUserList.toggleRowSelection(user, true);
console.log(this.$refs.checkUserList)
} else {
this.$refs.checkUserList.toggleRowSelection(user, false);
var that = this;
that.$nextTick(() => {
if (that.$refs.checkUserList) {
that.$refs.checkUserList.clearSelection();
}
that.userList.forEach(row => {
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
};
getJoinBussinessType(query).then((res) => {
this.selectBussinessTypeList = [];
this.bussinessTypeList = res.data.list;
this.bussinessTypeList.forEach(type => {
this.bussinessTypeData.forEach(data => {
if (type.action == data.action) {
this.$refs.typeList.toggleRowSelection(type, true);
} else {
//
this.$refs.typeList.toggleRowSelection(type, false);
var that = this;
that.$nextTick(() => {
if (that.$refs.typeList) {
that.$refs.typeList.clearSelection();
}
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