From 8dc3cae775cb1fdecdcd53dba9ff3d3c69c67a77 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Fri, 5 Dec 2025 11:04:19 +0800 Subject: [PATCH] perf: Optimize copywriting --- .../app-table-infinite-scroll/index.vue | 10 +++- ui/src/locales/lang/en-US/common.ts | 1 + ui/src/locales/lang/en-US/workflow.ts | 8 ++- ui/src/locales/lang/zh-CN/common.ts | 1 + ui/src/locales/lang/zh-CN/workflow.ts | 7 ++- ui/src/locales/lang/zh-Hant/common.ts | 1 + ui/src/locales/lang/zh-Hant/workflow.ts | 7 ++- .../ExecutionRecordDrawer.vue | 40 ++++++++++---- ui/src/views/system/operate-log/index.vue | 55 ++++++------------- ui/src/workflow/common/template.ts | 41 ++------------ .../component/UserInputFieldTable.vue | 2 +- 11 files changed, 79 insertions(+), 94 deletions(-) diff --git a/ui/src/components/app-table-infinite-scroll/index.vue b/ui/src/components/app-table-infinite-scroll/index.vue index 102401ee4..b71576cb1 100644 --- a/ui/src/components/app-table-infinite-scroll/index.vue +++ b/ui/src/components/app-table-infinite-scroll/index.vue @@ -41,11 +41,17 @@ const load = () => { if (disabled.value) return // props.paginationConfig.current_page++; - if (props.paginationConfig.current_page <= props.paginationConfig.total) { + if ( + props.paginationConfig.current_page * props.paginationConfig.page_size <= + props.paginationConfig.total + ) { emit('changePage') } - if (props.paginationConfig.current_page === props.paginationConfig.total) { + if ( + props.paginationConfig.current_page * props.paginationConfig.page_size === + props.paginationConfig.total + ) { disabled.value = true } } diff --git a/ui/src/locales/lang/en-US/common.ts b/ui/src/locales/lang/en-US/common.ts index c8785ea62..4d28a566c 100644 --- a/ui/src/locales/lang/en-US/common.ts +++ b/ui/src/locales/lang/en-US/common.ts @@ -74,6 +74,7 @@ export default { success: 'Successful', fail: 'Failed', all: 'All', + padding: 'Padding', }, param: { outputParam: 'Output Parameters', diff --git a/ui/src/locales/lang/en-US/workflow.ts b/ui/src/locales/lang/en-US/workflow.ts index e2d342368..efb99fe84 100644 --- a/ui/src/locales/lang/en-US/workflow.ts +++ b/ui/src/locales/lang/en-US/workflow.ts @@ -81,9 +81,8 @@ export default { }, nodes: { knowledgeWriteNode: { - text: 'Knowledge write', - label: - 'Write the input paragraph list into the current knowledge base and complete vectorization processing', + label: 'Knowledge write', + text: 'Write the input paragraph list into the current knowledge base and complete vectorization processing', }, dataSourceWebNode: { label: 'Web Site', @@ -142,6 +141,9 @@ export default { }, }, }, + KnowledgeBaseNode: { + DocumentSetting: 'Document Processing Setting', + }, aiChatNode: { label: 'AI Chat', text: 'Chat with an AI model', diff --git a/ui/src/locales/lang/zh-CN/common.ts b/ui/src/locales/lang/zh-CN/common.ts index 747d50406..2c4ee9282 100644 --- a/ui/src/locales/lang/zh-CN/common.ts +++ b/ui/src/locales/lang/zh-CN/common.ts @@ -76,6 +76,7 @@ export default { success: '成功', fail: '失败', all: '全部', + padding: '执行中', }, param: { outputParam: '输出参数', diff --git a/ui/src/locales/lang/zh-CN/workflow.ts b/ui/src/locales/lang/zh-CN/workflow.ts index ac90dc320..56618a158 100644 --- a/ui/src/locales/lang/zh-CN/workflow.ts +++ b/ui/src/locales/lang/zh-CN/workflow.ts @@ -85,8 +85,8 @@ export default { }, nodes: { knowledgeWriteNode: { - text: '知识库写入', - label: '将输入的分段列表写入当前知识库,并完成向量化处理', + label: '知识库写入', + text: '将输入的分段列表写入当前知识库,并完成向量化处理', }, dataSourceWebNode: { label: 'Web站点', @@ -146,6 +146,9 @@ export default { }, }, }, + KnowledgeBaseNode: { + DocumentSetting: '文档处理设置', + }, aiChatNode: { label: 'AI 对话', text: '与 AI 大模型进行对话', diff --git a/ui/src/locales/lang/zh-Hant/common.ts b/ui/src/locales/lang/zh-Hant/common.ts index 134ae31de..d4c917a59 100644 --- a/ui/src/locales/lang/zh-Hant/common.ts +++ b/ui/src/locales/lang/zh-Hant/common.ts @@ -74,6 +74,7 @@ export default { success: '成功', fail: '失敗', all: '全部', + padding: '執行中', }, param: { outputParam: '輸出參數', diff --git a/ui/src/locales/lang/zh-Hant/workflow.ts b/ui/src/locales/lang/zh-Hant/workflow.ts index b538770f9..948779469 100644 --- a/ui/src/locales/lang/zh-Hant/workflow.ts +++ b/ui/src/locales/lang/zh-Hant/workflow.ts @@ -81,8 +81,8 @@ export default { }, nodes: { knowledgeWriteNode: { - text: '知識庫寫入', - label: '將輸入的分段列表寫入當前知識庫,並完成向量化處理', + label: '知識庫寫入', + text: '將輸入的分段列表寫入當前知識庫,並完成向量化處理', }, dataSourceWebNode: { label: 'Web網站', @@ -141,6 +141,9 @@ export default { }, }, }, + KnowledgeBaseNode: { + DocumentSetting: '文檔處理設置', + }, aiChatNode: { label: 'AI 對話', text: '與 AI 大模型進行對話', diff --git a/ui/src/views/knowledge-workflow/component/execution-record/ExecutionRecordDrawer.vue b/ui/src/views/knowledge-workflow/component/execution-record/ExecutionRecordDrawer.vue index 9b5da04a9..b6577e1c0 100644 --- a/ui/src/views/knowledge-workflow/component/execution-record/ExecutionRecordDrawer.vue +++ b/ui/src/views/knowledge-workflow/component/execution-record/ExecutionRecordDrawer.vue @@ -46,26 +46,42 @@ class="w-full" v-loading="loading" @changePage="changePage" - :maxTableHeight="200" + :maxTableHeight="150" + :paginationConfig="paginationConfig" > - + - + - + @@ -106,6 +122,7 @@ const changeFilterHandle = () => { } const changePage = () => { paginationConfig.current_page += 1 + console.log(paginationConfig.current_page) getList() } @@ -114,15 +131,18 @@ const getList = () => { .getWorkflowActionPage(active_knowledge_id.value, paginationConfig, query.value, loading) .then((ok: any) => { paginationConfig.total = ok.data?.total - data.value = ok.data.records + data.value = data.value.concat(ok.data.records) }) } const open = (knowledge_id: string) => { - drawer.value = true active_knowledge_id.value = knowledge_id getList() + drawer.value = true } const close = () => { + paginationConfig.current_page = 1 + paginationConfig.total = 0 + data.value = [] drawer.value = false } defineExpose({ open, close }) diff --git a/ui/src/views/system/operate-log/index.vue b/ui/src/views/system/operate-log/index.vue index c466c4b2e..5a2e27ed2 100644 --- a/ui/src/views/system/operate-log/index.vue +++ b/ui/src/views/system/operate-log/index.vue @@ -105,6 +105,7 @@ @sizeChange="handleSizeChange" @changePage="getList" v-loading="loading" + show-overflow-tooltip >