From 32cd7374d72a53dc177ce5326fc5e8326e0b113b Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期五, 09 八月 2024 17:40:31 +0800 Subject: [PATCH] 优化知识库管理 --- src/utils/index.ts | 2 ++ src/views/dmx/IntelligentAgent/index.vue | 3 ++- src/views/dmx/knowledgeLib/index.vue | 9 +++++---- src/views/dmx/knowledgeLib/config.vue | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index f4d32d8..9af4f41 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -67,4 +67,6 @@ }) } + +export const documentHeight:number = window.innerHeight - 320; export default null; diff --git a/src/views/dmx/IntelligentAgent/index.vue b/src/views/dmx/IntelligentAgent/index.vue index a428dff..4643bb3 100644 --- a/src/views/dmx/IntelligentAgent/index.vue +++ b/src/views/dmx/IntelligentAgent/index.vue @@ -133,7 +133,8 @@ import EventBus from '@/utils/EventBus'; import AgentConfig from "@/views/dmx/IntelligentAgent/components/agentConfig.vue"; import logo from "../../../assets/images/model.png"; - let documentHeight = window.innerHeight - 320 + import { documentHeight } from "@/utils"; +// console.log(documentHeight,'楂樺害'); let count = 5; const activeKey = ref(1); const addAgents = ref(); diff --git a/src/views/dmx/knowledgeLib/config.vue b/src/views/dmx/knowledgeLib/config.vue index 2ef615a..0fb3804 100644 --- a/src/views/dmx/knowledgeLib/config.vue +++ b/src/views/dmx/knowledgeLib/config.vue @@ -402,7 +402,7 @@ justify-content: space-between; height: 100%; overflow: auto; - //background: #626aea; + border-radius: 8px; background: var(--color-bg-2); padding-top: 80px; diff --git a/src/views/dmx/knowledgeLib/index.vue b/src/views/dmx/knowledgeLib/index.vue index 38f1e7e..f55d01e 100644 --- a/src/views/dmx/knowledgeLib/index.vue +++ b/src/views/dmx/knowledgeLib/index.vue @@ -11,7 +11,7 @@ <addKnow @getknowledge="getknowledge" @getKbdetail="getKbdetail"></addKnow> </div> <a-spin :loading="listloading" class="lf-container-down"> - <a-scrollbar style="height:56rem;overflow: auto;"> + <a-scrollbar style="overflow: auto;" :style="{height: documentHeight + 70 + 'px'}"> <div class="tab" v-for="(tab, index) in tabs" @@ -157,7 +157,8 @@ :bordered="false" :size="size" @page-change="onPageChange" - :scroll="{ y: 580 }" + :max-height='documentHeight' + :scroll="{ y: documentHeight }" > <template #name="{ record }"> <!-- <icon-file style="color: #0960bd;margin-right: 4px;" />--> @@ -336,7 +337,7 @@ import excel from '@/views/dmx/knowledgeLib/components/excel.vue' import txtPdf from '@/views/dmx/knowledgeLib/components/txtPdf.vue' import { Message, Modal } from "@arco-design/web-vue"; - import { parseTime } from "@/utils"; +import { documentHeight, parseTime } from "@/utils"; import { deleteLlm } from "@/api/model"; type SizeProps = 'mini' | 'small' | 'medium' | 'large'; type Column = TableColumnData & { checked?: true }; @@ -878,7 +879,7 @@ flex-direction: column; align-items: center; justify-content: space-evenly; - //background: #ffffff; + border-radius: 8px; background: var(--color-bg-2); width: 200px; .lf-container-top{ -- Gitblit v1.8.0