| | |
| | | this.radioSelected = newVal |
| | | } else { |
| | | this.selectRoleList = newVal; |
| | | console.log(this.selectRoleList, "角色回显") |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | roleList: { |
| | | handler(newVal) { |
| | | console.log(newVal, "角色回显11") |
| | | if (StrUtil.isNotBlank(newVal) && this.selectRoleList.length > 0) { |
| | | this.$nextTick(() => { |
| | | this.$refs.dataTable.clearSelection(); |
| | | this.selectRoleList?.split(',').forEach(key => { |
| | | this.$refs.dataTable.toggleRowSelection(newVal.find( |
| | | item => key == item.roleId |
| | | ), true) |
| | | }); |
| | | if (this.selectRoleList instanceof Array) { |
| | | this.selectRoleList.forEach(key => { |
| | | this.$refs.dataTable.toggleRowSelection(newVal.find( |
| | | item => key == item.roleId |
| | | ), true) |
| | | }); |
| | | } else { |
| | | this.selectRoleList?.split(',').forEach(key => { |
| | | this.$refs.dataTable.toggleRowSelection(newVal.find( |
| | | item => key == item.roleId |
| | | ), true) |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |