Refine agent and knowledge list metadata
This commit is contained in:
@@ -39,7 +39,6 @@ import {
|
|||||||
ElOption,
|
ElOption,
|
||||||
ElPagination,
|
ElPagination,
|
||||||
ElSelect,
|
ElSelect,
|
||||||
ElSwitch,
|
|
||||||
ElTag,
|
ElTag,
|
||||||
ElTooltip,
|
ElTooltip,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
@@ -63,9 +62,6 @@ defineOptions({ name: 'AgentList' });
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const appContextStore = useAppContextStore();
|
const appContextStore = useAppContextStore();
|
||||||
|
|
||||||
// 是否在主应用下(只有主应用才显示“子应用可见”开关)
|
|
||||||
const isMainApp = !appContextStore.currentApp?.id;
|
|
||||||
|
|
||||||
// 搜索关键词
|
// 搜索关键词
|
||||||
const searchKeyword = ref('');
|
const searchKeyword = ref('');
|
||||||
|
|
||||||
@@ -512,10 +508,8 @@ onMounted(() => {
|
|||||||
<!-- 应用名称 + 创建时间 -->
|
<!-- 应用名称 + 创建时间 -->
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<div class="text-muted-foreground text-xs">
|
<div class="text-muted-foreground text-xs">
|
||||||
<span v-if="agent.application_name">{{
|
{{ agent.model_name || '未配置模型' }} ·
|
||||||
agent.application_name
|
{{ agent.conversation_count || 0 }} 次对话
|
||||||
}}</span>
|
|
||||||
<span v-else>{{ $t('ai-platform.agent.mainApp') }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="text-muted-foreground text-xs">
|
<span class="text-muted-foreground text-xs">
|
||||||
{{ agent.sys_create_datetime }}
|
{{ agent.sys_create_datetime }}
|
||||||
@@ -616,12 +610,6 @@ onMounted(() => {
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
/>
|
/>
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
<ElFormItem
|
|
||||||
v-if="isMainApp"
|
|
||||||
:label="$t('ai-platform.agent.form.globalVisible')"
|
|
||||||
>
|
|
||||||
<ElSwitch v-model="createForm.is_global" />
|
|
||||||
</ElFormItem>
|
|
||||||
</ElForm>
|
</ElForm>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<ElButton @click="createDialogVisible = false">
|
<ElButton @click="createDialogVisible = false">
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import {
|
|||||||
ElOption,
|
ElOption,
|
||||||
ElPagination,
|
ElPagination,
|
||||||
ElSelect,
|
ElSelect,
|
||||||
ElSwitch,
|
|
||||||
ElTag,
|
ElTag,
|
||||||
ElTooltip,
|
ElTooltip,
|
||||||
} from 'element-plus';
|
} from 'element-plus';
|
||||||
@@ -55,8 +54,6 @@ defineOptions({ name: 'KnowledgeBase' });
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const appContextStore = useAppContextStore();
|
const appContextStore = useAppContextStore();
|
||||||
|
|
||||||
const isMainApp = !appContextStore.currentApp?.id;
|
|
||||||
|
|
||||||
// 表单
|
// 表单
|
||||||
const createForm = reactive<KnowledgeBaseCreateInput & { id?: string }>({
|
const createForm = reactive<KnowledgeBaseCreateInput & { id?: string }>({
|
||||||
name: '',
|
name: '',
|
||||||
@@ -670,22 +667,6 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<ElFormItem v-if="isMainApp">
|
|
||||||
<template #label>
|
|
||||||
<div class="flex items-center gap-1">
|
|
||||||
<span>{{ $t('ai-platform.knowledge.globalVisible') }}</span>
|
|
||||||
<ElTooltip
|
|
||||||
placement="top"
|
|
||||||
:content="$t('ai-platform.knowledge.globalVisibleTooltip')"
|
|
||||||
>
|
|
||||||
<CircleHelp
|
|
||||||
class="text-muted-foreground h-3.5 w-3.5 cursor-help"
|
|
||||||
/>
|
|
||||||
</ElTooltip>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<ElSwitch v-model="createForm.is_global" />
|
|
||||||
</ElFormItem>
|
|
||||||
</ElForm>
|
</ElForm>
|
||||||
</ZqDialog>
|
</ZqDialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user