mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
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:
@ -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="请选择岗位"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -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.
|
||||||
|
|||||||
2
src/typings/api/system.api.d.ts
vendored
2
src/typings/api/system.api.d.ts
vendored
@ -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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user