style(@vben/web-antd): 项目成员管理模块格式微调

lint 自动格式化:长签名/标题换行、import 顺序、空元素展开;
顺手移除 new Set(undefined) 无意义的 `?? []` 兜底。无行为变更。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
lzh
2026-04-23 20:25:19 +08:00
parent 86a3c1f97b
commit 348e40e9c2
3 changed files with 13 additions and 7 deletions

View File

@@ -58,7 +58,9 @@ export function getUserIdsByProjectId(projectId: number) {
}
/** 分页查询项目成员(已自动过滤超级管理员) */
export function getProjectUserPage(params: SystemUserProjectApi.ProjectUserPageReq) {
export function getProjectUserPage(
params: SystemUserProjectApi.ProjectUserPageReq,
) {
return requestClient.get<PageResult<SystemUserApi.User>>(
'/system/user-project/project-user-page',
{ params },

View File

@@ -26,7 +26,7 @@ const currentData = ref<AddUserModalData | null>(null);
/** 可选项:全量用户 - 已是成员的用户 */
const selectOptions = computed(() => {
const excluded = new Set(currentData.value?.excludedUserIds ?? []);
const excluded = new Set(currentData.value?.excludedUserIds);
return allUsers.value
.filter((u) => u.id && !excluded.has(u.id))
.map((u) => ({
@@ -86,7 +86,9 @@ const [Modal, modalApi] = useVbenModal({
>
<Spin :spinning="loading">
<div class="px-4 py-2">
<div class="mb-2 text-sm">选择要加入项目的用户已在项目中的用户会自动过滤</div>
<div class="mb-2 text-sm">
选择要加入项目的用户已在项目中的用户会自动过滤
</div>
<Select
v-model:value="selectedUserIds"
mode="multiple"

View File

@@ -17,13 +17,13 @@ import {
} from '#/api/system/user-project';
import { $t } from '#/locales';
import AddUserModal from './add-user-modal.vue';
import { useProjectMemberGridColumns } from '../data';
import AddUserModal from './add-user-modal.vue';
const emit = defineEmits(['success']);
/** 当前打开抽屉的项目 */
const currentProject = ref<SystemProjectApi.Project | null>(null);
const currentProject = ref<null | SystemProjectApi.Project>(null);
/** 搜索关键字 */
const keyword = ref<string>('');
@@ -125,7 +125,9 @@ const [Drawer, drawerApi] = useVbenDrawer({
<template>
<Drawer
class="w-[800px]"
:title="currentProject ? `项目成员管理 - ${currentProject.name}` : '项目成员管理'"
:title="
currentProject ? `项目成员管理 - ${currentProject.name}` : '项目成员管理'
"
:show-cancel-button="false"
:show-confirm-button="false"
>
@@ -142,7 +144,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
<Button type="primary" @click="handleSearch">搜索</Button>
<Button type="primary" @click="handleOpenAddUser">
<template #icon>
<span class="iconify ant-design--plus-outlined" />
<span class="iconify ant-design--plus-outlined"></span>
</template>
添加用户
</Button>