Skip to content

Commit 6d24d66

Browse files
committed
feat: simplify tool type display logic in resource index
--bug=1064279 --user=刘瑞斌 【资源管理】工具列表缺少来源字段 https://www.tapd.cn/62980211/s/1807766
1 parent d33dd45 commit 6d24d66

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

ui/src/views/system-resource-management/ToolResourceIndex.vue

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,13 @@
9494
<template #default="scope">
9595
<span v-if="scope.row.tool_type === 'MCP'"> MCP </span>
9696
<span v-else-if="scope.row.tool_type === 'DATA_SOURCE'"> {{ $t('views.tool.dataSource.title') }} </span>
97-
<span v-else-if="scope.row.template_id">{{ $t('views.tool.toolStore.title') }}</span>
98-
<span v-else>
99-
{{
100-
$t(
101-
ToolType[
102-
scope.row.template_id ? 'INTERNAL' : ('CUSTOM' as keyof typeof ToolType)
103-
],
104-
)
105-
}}
106-
</span>
97+
<span v-else> {{ $t('views.tool.title') }} </span>
98+
</template>
99+
</el-table-column>
100+
<el-table-column prop="source" :label="$t('views.tool.form.source.label')">
101+
<template #default="scope">
102+
<span v-if="scope.row.template_id">{{ $t('views.tool.toolStore.title') }}</span>
103+
<span v-else> {{ $t( ToolType['CUSTOM'] ) }} </span>
107104
</template>
108105
</el-table-column>
109106
<el-table-column :label="$t('common.status.label')" width="120">

0 commit comments

Comments
 (0)