feat: 看板服务状态优化,移除前端访问统计埋点,修正列表页文案与类型
- 看板:补齐各服务模块图标,服务状态表格改为自适应行高并支持滚动 - 移除前端请求访问统计埋点及对应 audit-visit API 模块 - 平台接口:清理 service_checks 循环中未使用的路径变量 - 系统模块:导出 SystemUser 类型 - 项目/租户列表:统一“项目名称/编码 ID/租户 ID”文案,补充表格行类型断言修复 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -66,8 +66,12 @@ const operationDistribution = ref<{ name: string; value: number }[]>([])
|
||||
const serviceIcon: Record<string, string> = {
|
||||
'模型推理': 'fa-cube',
|
||||
'模型微调': 'fa-sliders',
|
||||
'模型训练': 'fa-sliders',
|
||||
'模型评测': 'fa-bar-chart',
|
||||
'模型管理': 'fa-cubes',
|
||||
'数据集管理': 'fa-file-text',
|
||||
'数据处理': 'fa-filter',
|
||||
'数据类型转换': 'fa-exchange',
|
||||
}
|
||||
const roleLabel: Record<string, string> = {
|
||||
admin: '超级管理员',
|
||||
@@ -115,7 +119,7 @@ const chartOption = computed<EChartsOption>(() => ({
|
||||
borderWidth: 0,
|
||||
padding: [10, 12],
|
||||
textStyle: { color: '#ffffff', fontSize: 12 },
|
||||
valueFormatter: (value) => `${value}`,
|
||||
valueFormatter: (value) => String(value ?? ''),
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
@@ -252,7 +256,7 @@ const loginDurationChartOption = computed<EChartsOption>(() => {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { type: 'shadow' },
|
||||
valueFormatter: (value: number) => `${value} 小时`,
|
||||
valueFormatter: (value: unknown) => String(Number(Array.isArray(value) ? value[0] : value) || 0) + ' 小时',
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
@@ -738,10 +742,11 @@ function viewTask(task: DashboardTask) {
|
||||
|
||||
.service-table {
|
||||
display: grid;
|
||||
grid-template-rows: 36px repeat(4, minmax(48px, 1fr));
|
||||
grid-auto-rows: minmax(44px, auto);
|
||||
flex: 1 1 auto;
|
||||
margin-top: 12px;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.service-row {
|
||||
@@ -935,7 +940,7 @@ function viewTask(task: DashboardTask) {
|
||||
}
|
||||
|
||||
.service-table {
|
||||
grid-template-rows: 32px repeat(4, minmax(40px, 1fr));
|
||||
grid-auto-rows: minmax(38px, auto);
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,23 +99,23 @@ onMounted(() => {
|
||||
<el-button type="primary" :icon="Plus" @click="showCreate = true">新建项目</el-button>
|
||||
</template>
|
||||
<template #columns>
|
||||
<el-table-column prop="name" label="项目名" min-width="140" />
|
||||
<el-table-column prop="code" label="编码ID" min-width="100" />
|
||||
<el-table-column prop="name" label="项目名称" min-width="140" />
|
||||
<el-table-column prop="code" label="编码 ID" min-width="100" />
|
||||
<el-table-column prop="status" label="状态" min-width="100" />
|
||||
<el-table-column prop="description" label="描述" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column prop="create_time" label="创建时间" min-width="180" />
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<el-button link type="primary" @click="openDetail(row.id)">详情</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(row)">删除</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(asProject(row))">删除</el-button>
|
||||
</template>
|
||||
</DataTablePage>
|
||||
<el-dialog v-model="showCreate" title="新建项目" width="520px">
|
||||
<el-form label-width="90px">
|
||||
<el-form-item label="名称" required>
|
||||
<el-input v-model="form.name" placeholder="项目名" />
|
||||
<el-input v-model="form.name" placeholder="项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="编码ID" required>
|
||||
<el-form-item label="编码 ID" required>
|
||||
<el-select v-model="form.tenant_id" style="width: 100%" placeholder="选择租户编码">
|
||||
<el-option v-for="t in tenantCodeOptions" :key="t.value" :label="t.label" :value="t.tenantId" />
|
||||
</el-select>
|
||||
|
||||
@@ -30,7 +30,7 @@ function formatQuota(quota: Record<string, unknown> | undefined | null) {
|
||||
if (q.gpu > 0) parts.push(`GPU ${q.gpu}`)
|
||||
if (q.storage > 0) parts.push(`存储 ${q.storage}GB`)
|
||||
if (q.maxProjects > 0) parts.push(`项目 ${q.maxProjects}`)
|
||||
return parts.length ? parts.join(' | ') : '—'
|
||||
return parts.length ? parts.join(' | ') : '-'
|
||||
}
|
||||
|
||||
async function load() {
|
||||
@@ -52,7 +52,7 @@ function asTenant(row: unknown): Tenant {
|
||||
|
||||
function quotaText(row: unknown): string {
|
||||
const quota = asTenant(row).quota || {}
|
||||
return Object.keys(quota).length ? JSON.stringify(quota) : '—'
|
||||
return Object.keys(quota).length ? JSON.stringify(quota) : '-'
|
||||
}
|
||||
|
||||
async function submitCreate() {
|
||||
@@ -118,13 +118,13 @@ onMounted(load)
|
||||
</template>
|
||||
<template #columns>
|
||||
<el-table-column prop="name" label="租户名称" min-width="140" />
|
||||
<el-table-column prop="code" label="用户ID" min-width="100" />
|
||||
<el-table-column prop="code" label="租户 ID" min-width="100" />
|
||||
<el-table-column prop="status" label="状态" min-width="100" />
|
||||
<el-table-column prop="create_time" label="创建时间" min-width="180" />
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<el-button link type="primary" @click="openDetail(row.id)">详情</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(row)">删除</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(asTenant(row))">删除</el-button>
|
||||
</template>
|
||||
</DataTablePage>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user