tuqin
3 天以前 31c5d480157676380dfbae2805e98caa9fd71b21
src/views/bpm/components/simple-process-design/components/simple-process-designer.vue
@@ -124,8 +124,10 @@
  if (!processNodeTree.value) {
    // 默认流程结构:发起人 → 审批人 → 结束
    // 审批人默认指定为超级管理员,保证新建/修改后三节点齐全且可直接保存(用户可自行调整审批人)
    // simple-list 接口只返回 id/nickname(不含 username),所以用内置超管 id=1 匹配、昵称兜底
    const adminUser = userOptions.value.find(
      (user: SystemUserApi.User) => user.username === 'admin',
      (user: SystemUserApi.User) =>
        user.id === 1 || user.nickname === '超级管理员',
    );
    const approveNode: SimpleFlowNode = {
      id: `Activity_${Date.now()}_${Math.floor(Math.random() * 10000)}`,