From 2233b2c0e3b773eb13aba68b00b3ea56f6a3657c Mon Sep 17 00:00:00 2001 From: dshsa-lanbg <350871118+dshsa-lanbg@users.noreply.github.com> Date: Sun, 1 Nov 2026 14:56:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(system):=20=E8=A7=92=E8=89=B2=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=A1=A8=E6=A0=BC=E8=A1=8C=E5=A2=9E=E5=8A=A0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 角色标识参与审批流程等后端判断,前次改动整体隐藏了角色编辑入口; 本次恢复编辑入口,但编辑时角色标识锁定不可改,仅允许修改角色名称与备注, 且更新请求只提交 roleId、roleName、comments,避免误改审批流相关字段。 --- .../system/role/components/role-edit.vue | 21 ++++++++++++++++--- src/views/system/role/index.vue | 12 +++++------ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/views/system/role/components/role-edit.vue b/src/views/system/role/components/role-edit.vue index 89a0127..c356763 100644 --- a/src/views/system/role/components/role-edit.vue +++ b/src/views/system/role/components/role-edit.vue @@ -4,7 +4,7 @@ :width="460" :visible="visible" :confirm-loading="loading" - :title="isUpdate ? '修改角色' : '添加角色'" + :title="isUpdate ? '编辑角色' : '添加角色'" :body-style="{ paddingBottom: '8px' }" @update:visible="updateVisible" @ok="save" @@ -26,10 +26,17 @@ v-model:value="form.roleName" /> - + @@ -119,7 +126,15 @@ .then(() => { loading.value = true; const saveOrUpdate = isUpdate.value ? updateRole : addRole; - saveOrUpdate(form) + // 角色标识参与审批流程判断,修改时只提交可编辑的字段 + const data: Role = isUpdate.value + ? { + roleId: form.roleId, + roleName: form.roleName, + comments: form.comments + } + : { ...form }; + saveOrUpdate(data) .then((msg) => { loading.value = false; message.success(msg); diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 6b5ddf5..c041662 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -37,13 +37,11 @@