From ac1335985f6686558b42ef97345daeb69c770053 Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Thu, 20 Jun 2024 15:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user-boot/user.ts | 14 +++++++++++++- src/layouts/admin/index.vue | 5 ++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/api/user-boot/user.ts b/src/api/user-boot/user.ts index 550c939a..1c41230e 100644 --- a/src/api/user-boot/user.ts +++ b/src/api/user-boot/user.ts @@ -172,7 +172,7 @@ export function getUserListByIds(data:any) { } /** - * 查询所有用户 + * 查询所有用户不包括管理员 */ export const getUserSimpleList = () => { return request({ @@ -181,6 +181,18 @@ export const getUserSimpleList = () => { }) } +/** + * 查询所有用户包括管理员 + */ +export const getAllUserSimpleList = () => { + return request({ + url: '/user-boot/user/getAllUserSimpleList', + method: 'GET' + }) +} + + + diff --git a/src/layouts/admin/index.vue b/src/layouts/admin/index.vue index 03f69b8e..1c582c4d 100644 --- a/src/layouts/admin/index.vue +++ b/src/layouts/admin/index.vue @@ -23,8 +23,7 @@ import { adminBaseRoutePath } from '@/router/static' import { getRouteMenu, dictDataCache } from '@/api/auth' import { getAreaList, areaSelect } from '@/api/common' import { BasicDictData } from '@/stores/interface' -import { getUserById } from '@/api/user-boot/user' -import { getUserSimpleList } from '@/api/user-boot/user' +import { getAllUserSimpleList, getUserById } from '@/api/user-boot/user' defineOptions({ components: { Default, Classic, Streamline, Double } @@ -52,7 +51,7 @@ onBeforeMount(() => { }) const init = async () => { - await Promise.all([getAreaList(), dictDataCache(), getUserById(), areaSelect(),getUserSimpleList()]).then(res => { + await Promise.all([getAreaList(), dictDataCache(), getUserById(), areaSelect(),getAllUserSimpleList()]).then(res => { dictData.state.area = res[0].data dictData.state.basic = res[1].data dictData.state.userList=res[4].data