feat: 统一角色枚举 (meetingExecutor/supervisor) + 子账号数据隔离 + Login 读取后端 role_type

后端:
- SysUser 加 roleType 字段 (entity + mapper selectUserVo + service 接口/实现)
- SysUserMapper 新增 selectUserIdsByParent (按 parent_user_id 取子账号列表)
- BizPersonController.list 自动注入 MAIN 业务用户可见性: 仅查 user_id IN (子账号列表)
- BizPersonMapper 加 params.subUserIds foreach 过滤
- BizPerson/BizPersonServiceImpl 配合 getParams().put

前端:
- Login.vue 改用后端 sys_user.roleType 替代 username 前缀 autoRole, 修复 exe01 错入 leader 菜单
- utils/roleMap.js 新增: meetingExecutor->会议执行, supervisor->监察员
- executor/People.vue / sponsor/NewPerson.vue / sponsor/Projects.vue / sponsor/SponsorProjects.vue /
  manager/ManagerProjectDetail.vue / manager/{Executor,Sponsor}PersonNew.vue /
  admin/{Executor,Sponsor}PersonNew.vue 全部改为 enum key

SQL:
- migration_unify_role_type_2026_08_16.sql 清洗 biz_person.role 从中文到 enum key
This commit is contained in:
郭庆泰
2026-08-16 13:41:42 +08:00
parent cf5790229a
commit c612d4297a
22 changed files with 1211 additions and 112 deletions
@@ -281,7 +281,7 @@ async function openAddMonitor() {
addMonitorOpen.value = true
if (!monitorCandidates.value.length) {
try {
const resp = await bizList('person', { pageNum: 1, pageSize: 100, role: '监察员', unitType: 'sponsor' })
const resp = await bizList('person', { pageNum: 1, pageSize: 100, role: 'supervisor', unitType: 'sponsor' })
monitorCandidates.value = (resp && resp.rows) || ((resp && resp.data) && (resp && resp.data).rows) || (resp && resp.data) || []
} catch (e) { monitorCandidates.value = [] }
}
@@ -393,7 +393,7 @@ onMounted(async () => {
.section-title {
font-size: 14px; font-weight: 600; color: #262626; margin: 16px 0 12px;
padding-left: 8px; border-left: 3px solid var(--brand-primary, #1890ff);
padding-left: 8px; border-left: 3px solid var(--brand-primary);
}
/* 项目信息: 11 字段, 一列竖排 (el-form + 文本, 无分隔线) */
@@ -407,7 +407,7 @@ onMounted(async () => {
font-family: ui-monospace, "Courier New", monospace;
}
.op-link {
color: var(--brand-primary, #1890ff); text-decoration: none;
color: var(--brand-primary); text-decoration: none;
font-weight: 600; cursor: pointer; font-size: 15px;
}
.op-link:hover { text-decoration: underline; }
@@ -435,5 +435,5 @@ onMounted(async () => {
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
/* 评分 */
.score-num { font-size: 18px; color: var(--brand-primary, #1890ff); font-weight: 700; margin-right: 6px; }
.score-num { font-size: 18px; color: var(--brand-primary); font-weight: 700; margin-right: 6px; }
</style>