From 681b9ab31eec43045f804ee1d4b808b9a954e08d Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期二, 31 十二月 2024 15:53:20 +0800 Subject: [PATCH] 调整页面赋码展示,新增一个项目中心页面展示 --- src/components/flow/Role/index.vue | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/components/flow/Role/index.vue b/src/components/flow/Role/index.vue index fb0446f..e8f2dcf 100644 --- a/src/components/flow/Role/index.vue +++ b/src/components/flow/Role/index.vue @@ -121,6 +121,7 @@ this.radioSelected = newVal } else { this.selectRoleList = newVal; + console.log(this.selectRoleList, "瑙掕壊鍥炴樉") } } }, @@ -128,14 +129,24 @@ }, 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) + }); + } + }); } } -- Gitblit v1.8.0