From 1286a2089c741955d8e1d793fb245e649d0e232d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A8=9C?= Date: Fri, 16 May 2025 17:51:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/apiType.ts | 23 +- src/api/dataSet.ts | 33 +- src/api/evaluate.ts | 8 +- src/api/kfApp.ts | 5 +- src/main.ts | 1 - src/styles/dataSet.scss | 126 +++++- src/styles/dataSetDrawer.scss | 11 +- src/styles/knowledgeFileSection.scss | 13 + src/views/dataSet/craeteEvaluate.vue | 85 +++- src/views/evaluate/index.vue | 405 +++++++++++------- .../evaluate/{testData.vue => testCase.vue} | 172 +++++++- src/views/group/index.vue | 12 +- src/views/knowledgeFile/documentLog.vue | 2 +- src/views/knowledgeFileSection/index.vue | 32 +- 14 files changed, 668 insertions(+), 260 deletions(-) rename src/views/evaluate/{testData.vue => testCase.vue} (66%) diff --git a/src/api/apiType.ts b/src/api/apiType.ts index f9fd5a1..f1a0dac 100644 --- a/src/api/apiType.ts +++ b/src/api/apiType.ts @@ -2,7 +2,7 @@ export interface CreateKbRequest { defaultChunkSize: number; defaultParseMethod: string; description: string; - docTypes: string[]; + docTypes: any[]; embeddingModel: string; kbName: string; [property: string]: any; @@ -32,19 +32,19 @@ export interface DocListRequest { chunk_size_order?: string; created_time_order?: string; document_type?: string; - kb_id: string; + kbId: string; name?: string; - page_number: number; - page_size: number; + page: number; + pageSize: number; parse_status?: string; [property: string]: any; } export interface DocRenameRequest { - chunk_size: number; - document_type: object; - id: string; - name: string; + chunkSize?: number; + docTypeId?: string; + docId: string; + docName: string; [property: string]: any; } @@ -54,9 +54,10 @@ export interface DocDownload { } export interface ChunkRequest { - document_id: string; - page_number: number; - page_size: number; + docId: string; + page: number; + pageSize: number; text?: string; + type?: string; [property: string]: any; } diff --git a/src/api/dataSet.ts b/src/api/dataSet.ts index a780114..64abfa1 100644 --- a/src/api/dataSet.ts +++ b/src/api/dataSet.ts @@ -20,19 +20,24 @@ class dataSetAPI { } /** 删除数据集管理*/ - static delDataSet(dataSetId: string) { + static delDataSet(data: string[]) { return request({ - url: `/dataSet?databaseId=${dataSetId}`, + url: `/dataset`, method: 'delete', + data, }); } /**更新数据集管理 */ - static updateDataSet(data: any) { + static updateDataSet( + params: { databaseId: string }, + data: { datasetName?: string; description?: string } + ) { return request({ url: `/dataset`, method: 'put', - data: data, + params, + data, }); } @@ -44,6 +49,14 @@ class dataSetAPI { data: data, }); } + /**删除数据集内的问答数据 */ + static deleteDataInfo(data: any) { + return request({ + url: `/dataset/data`, + method: 'delete', + data: data, + }); + } /**获取数据集任务状态 */ static queryDataSetTask() { @@ -67,7 +80,7 @@ class dataSetAPI { return request({ url: `/dataset/generate`, method: 'post', - data, + params: data, }); } @@ -94,7 +107,7 @@ class dataSetAPI { return request({ url: `/dataset/export`, method: 'post', - data: datasetIds, + params: datasetIds, }); } @@ -104,6 +117,14 @@ class dataSetAPI { method: 'get', }); } + + static isHaveTesting(params: { datasetId: string }) { + return request({ + url: '/dataset/testing/exist', + method: 'get', + params, + }); + } } export default dataSetAPI; diff --git a/src/api/evaluate.ts b/src/api/evaluate.ts index 112ed91..066761e 100644 --- a/src/api/evaluate.ts +++ b/src/api/evaluate.ts @@ -30,20 +30,20 @@ class EvaluateAPI { } /** 删除评测接口*/ - static deleteTesting(data: { teamId: string }) { + static deleteTesting(data: string[]) { return request({ url: `/testing`, method: 'delete', - params: data, + data: data, }); } /** 评测用例详情接口*/ - static testingCase(data: { testingId: string }) { + static testingCase(data: { testingId: string; page: number; pageSize: number }) { return request({ url: `/testing/testcase`, method: 'post', - params: data, + data, }); } diff --git a/src/api/kfApp.ts b/src/api/kfApp.ts index 9bcf516..3bca04f 100644 --- a/src/api/kfApp.ts +++ b/src/api/kfApp.ts @@ -103,7 +103,10 @@ class KfAppAPI { } /** 更新文本块内容 */ - static updateFileSection(params: { chunkId: string }, data: { enabled?: boolean; text: string }) { + static updateFileSection( + params: { chunkId: string }, + data: { enabled?: boolean; text?: string } + ) { return request({ url: `/chunk`, method: 'put', diff --git a/src/main.ts b/src/main.ts index 4b9c52a..788c581 100644 --- a/src/main.ts +++ b/src/main.ts @@ -24,7 +24,6 @@ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'; const app = createApp(App); app.use(createPinia().use(piniaPluginPersistedstate)); -app.use(router); app.use(ElementPlus, { locale: zhCn, }); diff --git a/src/styles/dataSet.scss b/src/styles/dataSet.scss index b6fc73b..674ff1a 100644 --- a/src/styles/dataSet.scss +++ b/src/styles/dataSet.scss @@ -6,6 +6,15 @@ } .dataSet-container { + .dataSet-container-header { + display: flex; + justify-content: space-between; + + .dataSet-container-right { + width: 356px; + } + } + .el-dropdown.is-disabled .el-button { color: var(--o-button-color_disabled) !important; background-color: var(--o-button-bg-color_disabled) !important; @@ -20,17 +29,17 @@ padding-left: 16px !important; } - .el-table tbody .el-table__cell:not(.el-table__expanded-cell):first-child, - .el-table thead .cell, - .el-table tbody .el-table-column--selection + th.el-table__cell, - .el-table-column--selection + td.el-table__cell { - padding: unset !important; + .el-table thead .el-table__cell .cell { + // padding: 0 !important; + padding-top: 0 !important; + padding-bottom: 0 !important; } .custom-header { display: flex; gap: 4px; align-items: center; + .searchIconIsActive { color: #0077ff !important; } @@ -49,9 +58,13 @@ height: 16px; } } - + .dataSet-name-row{ + color: #0077ff; + cursor: pointer; + } .statusFail, .statusSuccess, + .statusWaitIng, .statusCancel { height: 24px; width: fit-content; @@ -60,7 +73,7 @@ line-height: 24px; color: rgb(255 255 255); text-align: center; - border-radius: 2px; + border-radius: 4px; } .statusFail { @@ -76,9 +89,8 @@ } .statusWaitIng { - display: flex; - align-items: center; - gap: 9px; + background: rgb(250, 192, 84); + } @keyframes rotate-img { @@ -112,6 +124,7 @@ .el-progress-bar { width: 88px; } + .el-progress__text { width: fit-content; } @@ -130,8 +143,97 @@ color: rgb(0 0 0); } } + .el-table__body-wrapper { + flex: unset !important; + } + + .el-checkbox__inner::before { + top: 4.5px !important; + width: 13px; + } + + .el-table__header { + height: 32px; + width: 100% !important; + box-shadow: inset 0 -1px 0 0 rgb(223 229 239); + + thead tr th { + background-color: #f4f6fa; + } + } + + .el-table__body { + width: 100% !important; + color: black !important; + + .el-table__row { + height: 48px; + } + } + + .el-table__cell { + padding: 0 !important; + font-size: 12px; + } - .dataSet-container-table-box{ + .el-table-column--selection .cell { + padding-right: 0 !important; + padding-left: 10px !important; + } + + .el-pagination { + margin-top: 0; + margin-top: 24px !important; + } + + .el-pagination .el-input__inner { + height: var(--el-input-inner-height) !important; + } + + .el-switch, + .el-switch__core { + width: 32px !important; + min-width: unset !important; + height: 16px !important; + } + + .el-switch__action { + top: 1.3px; + left: 1.5px; + width: 12px !important; + height: 12px !important; + } + + .el-switch.is-checked .el-switch__core .el-switch__action { + left: calc(100% - 13px) !important; + } + + .dataSet-container-table-box { margin-top: 16px; + height: calc(100vh - 266px); + display: flex; + flex-direction: column; + + tbody { + td { + border-right: unset !important; + } + } + + .el-table.is-scrolling-left.el-table--border .el-table-fixed-column--left.is-last-column.el-table__cell { + border-right: unset !important; + } + + .el-table { + ::-webkit-scrollbar { + width: 4px !important; + } + + .el-scrollbar__bar.is-vertical { + width: 4px !important; + } + } } -} + + +} \ No newline at end of file diff --git a/src/styles/dataSetDrawer.scss b/src/styles/dataSetDrawer.scss index 5db65cb..5517ad2 100644 --- a/src/styles/dataSetDrawer.scss +++ b/src/styles/dataSetDrawer.scss @@ -1,5 +1,5 @@ .dataSetDrawerContainer{ - width: 60% !important; + width: 65% !important; .el-drawer__header{ padding-top: 24px !important; padding-left: 24px !important; @@ -148,4 +148,11 @@ .el-table__row .cell{ padding: 8px !important; } -} \ No newline at end of file + .dataChunkText{ + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; /* 控制显示行数 */ + text-overflow: ellipsis; + } +} diff --git a/src/styles/knowledgeFileSection.scss b/src/styles/knowledgeFileSection.scss index 93dd8e5..d434bf6 100644 --- a/src/styles/knowledgeFileSection.scss +++ b/src/styles/knowledgeFileSection.scss @@ -322,6 +322,10 @@ .kf-file-content-ops { padding: 16px 0; + min-width: 70px; + display: flex; + justify-content: space-between; + align-items: center; } } } @@ -510,3 +514,12 @@ -webkit-border-vertical-spacing: 8px; // 垂直间距 } } + +.kf-section-edit-dialog{ + .el-dialog__header{ + + } + .el-textarea__inner{ + max-height: 500px; + } +} \ No newline at end of file diff --git a/src/views/dataSet/craeteEvaluate.vue b/src/views/dataSet/craeteEvaluate.vue index 92ada86..2275696 100644 --- a/src/views/dataSet/craeteEvaluate.vue +++ b/src/views/dataSet/craeteEvaluate.vue @@ -10,37 +10,44 @@
- {{ props.rowData?.dataSetName }} + {{ props.rowData?.datasetName }}
- + - - + + + {{ item.label }} + - - + + + +