42 lines
983 B
Vue
42 lines
983 B
Vue
<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>
|