Files
mp-vue/src/views/shop/shopAdmin/components/super-admin.vue
赵忠林 a6097bfc05 refactor(shopAdmin): 重构管理员页面
- 新增 SuperAdmin 和 Admin 组件
- 优化管理员列表展示逻辑
- 添加超级管理员单独展示区域
-调整新建按钮文字为"添加"
- 移除不必要的注释代码
2025-08-11 15:07:49 +08:00

42 lines
983 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<a-card title="管理员" style="margin-bottom: 20px">
<div class="title flex flex-col">
<div class="text-gray-400 pb-2">系统所有者拥有全部权限</div>
</div>
<div v-if="item" class="bg-gray-50 rounded-lg w-80 p-4 flex justify-between items-center">
<a-space>
<a-avatar size="large" :src="item.avatar"/>
<div class="text-gray-400 flex flex-col">
<span>{{ item.nickname }}</span>
<span>{{ item.createTime }}</span>
</div>
</a-space>
<a>更换</a>
</div>
</a-card>
</template>
<script lang="ts" setup>
import {ref, onMounted} from 'vue';
import {
listUsers
} from '@/api/system/user';
import {User} from "@/api/system/user/model";
const item = ref<User>();
const reload = async () => {
const list = await listUsers({
isSuperAdmin: true
});
console.log(list)
if (list.length > 0) {
item.value = list[0];
}
}
onMounted(() => {
reload();
})
</script>