Merge branch 'dev' into v2.0

# Conflicts:
#	src/views/system/user/modules/user-import-modal.vue
#	src/views/system/user/modules/user-operate-drawer.vue
This commit is contained in:
xlsea
2025-08-08 17:21:41 +08:00
3 changed files with 16 additions and 7 deletions

View File

@ -21,27 +21,27 @@ const attrs: SelectProps = useAttrs();
const { loading: postLoading, startLoading: startPostLoading, endLoading: endPostLoading } = useLoading(); const { loading: postLoading, startLoading: startPostLoading, endLoading: endPostLoading } = useLoading();
/** the enabled role options */ /** the enabled post options */
const roleOptions = ref<CommonType.Option<CommonType.IdType>[]>([]); const postOptions = ref<CommonType.Option<CommonType.IdType>[]>([]);
watch( watch(
() => props.deptId, () => props.deptId,
() => { () => {
if (!props.deptId) { if (!props.deptId) {
roleOptions.value = []; postOptions.value = [];
return; return;
} }
getRoleOptions(); getPostOptions();
}, },
{ immediate: true } { immediate: true }
); );
async function getRoleOptions() { async function getPostOptions() {
startPostLoading(); startPostLoading();
const { error, data } = await fetchGetPostSelect(props.deptId!); const { error, data } = await fetchGetPostSelect(props.deptId!);
if (!error) { if (!error) {
roleOptions.value = data.map(item => ({ postOptions.value = data.map(item => ({
label: item.postName, label: item.postName,
value: item.postId value: item.postId
})); }));
@ -54,7 +54,7 @@ async function getRoleOptions() {
<NSelect <NSelect
v-model:value="value" v-model:value="value"
:loading="postLoading" :loading="postLoading"
:options="roleOptions" :options="postOptions"
v-bind="attrs" v-bind="attrs"
placeholder="请选择岗位" placeholder="请选择岗位"
/> />

View File

@ -13,6 +13,13 @@
border-color: var(--un-default-border-color, #e5e7eb); /* 2 */ border-color: var(--un-default-border-color, #e5e7eb); /* 2 */
} }
/*
* [Naive UI] Fix the icon size in the image preview toolbar
*/
.n-image-preview-toolbar .n-base-icon {
box-sizing: unset !important;
}
/* /*
1. Use a consistent sensible line-height in all browsers. 1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS. 2. Prevent adjustments of font size after orientation changes in iOS.

View File

@ -163,6 +163,8 @@ declare namespace Api {
postIds: string[]; postIds: string[];
/** user role ids */ /** user role ids */
roleIds: string[]; roleIds: string[];
/** roles */
roles: Role[];
}; };
/** user list */ /** user list */