- 更新 backend 平台 API、platform_store、compute_gateway sync - 更新 compute agent/engine/adapter 及 API - 更新 Docker 部署配置(app/compute) - 新增 frontend/src/utils/ 工具模块 - 新增 scripts/ops_diagnostics.py 运维诊断脚本 - 新增 docs/2026-07-23-development-summary.md 开发总结 - 重构 frontend/dist 构建产物(新 hash) - 更新前端多个视图组件及 API 模块 Co-Authored-By: Claude <noreply@anthropic.com>
71 lines
1.8 KiB
Vue
71 lines
1.8 KiB
Vue
<script setup lang="ts">
|
|
import { onMounted, ref } from 'vue'
|
|
import { getUsers } from '@/api/modules/system'
|
|
import type { SystemUser } from '@/types'
|
|
import { statusLabel, statusTagType } from '@/utils/status'
|
|
|
|
const loading = ref(false)
|
|
const users = ref<SystemUser[]>([])
|
|
|
|
async function loadUsers() {
|
|
loading.value = true
|
|
try {
|
|
users.value = await getUsers()
|
|
} finally {
|
|
loading.value = false
|
|
}
|
|
}
|
|
|
|
onMounted(loadUsers)
|
|
</script>
|
|
|
|
<template>
|
|
<section class="user-settings" v-loading="loading">
|
|
<header class="page-header">
|
|
<div>
|
|
<h1>用户设置</h1>
|
|
<p>管理平台账号、角色状态和页面权限。</p>
|
|
</div>
|
|
<el-button type="primary" @click="$router.push('/user-settings/create')">创建用户</el-button>
|
|
</header>
|
|
|
|
<el-table :data="users">
|
|
<el-table-column prop="username" label="账号" min-width="140" />
|
|
<el-table-column prop="display_name" label="显示名称" min-width="160" />
|
|
<el-table-column prop="role" label="角色" width="120" />
|
|
<el-table-column label="状态" width="120">
|
|
<template #default="{ row }">
|
|
<el-tag :type="statusTagType(row.status)" size="small">{{ statusLabel(row.status) }}</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="权限数" width="120">
|
|
<template #default="{ row }">{{ row.permissions?.length || 0 }}</template>
|
|
</el-table-column>
|
|
<el-table-column prop="create_time" label="创建时间" min-width="180" />
|
|
</el-table>
|
|
</section>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.user-settings {
|
|
padding: 24px;
|
|
}
|
|
|
|
.page-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.page-header h1 {
|
|
margin: 0;
|
|
font-size: 24px;
|
|
}
|
|
|
|
.page-header p {
|
|
margin: 8px 0 0;
|
|
color: #64748b;
|
|
}
|
|
</style>
|