diff --git a/src/api/apiType.ts b/src/api/apiType.ts index f9fd5a1f4814fc7a99c484ce314edf452b4d34fd..f1a0dacaf6973d05ab885bcf28eac4efe6777b1d 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 a780114f887a61f72924bdb2506216492025333c..64abfa11c8e2eecc1565a8222d7c40c115a333ab 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 112ed91bf66673fb0b164e0c95b87d3cfc64697a..066761e31238fa0d57bb47dbbd7b72a862765b1e 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 9bcf516f2917cc7b7994c29350735da9f158b29a..3bca04f5dc42142c358aa0ab504212906c1edfab 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 4b9c52a81859c881855f691aa572959dc9877482..788c581036a0dd01081c80a91493bc0a20d58115 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 b6fc73bc78aa918d746a353658e37ce297707793..674ff1a6487a5cec26b863281f555cbdc44bf4c0 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 5db65cb34e32883d22dd789406eb15a76f32f2fa..5517ad28f2c2a94d227de8b3f92b96c0d03d27f7 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 93dd8e54a4adfc50d2078b7cacf3c08a63b61571..d434bf63db578fdb4bd3bd0d8822951ef1b6b3f3 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 92ada866b901e0ad641cba63afbb57b89a51f704..22756969670a418636eb895be08a67462a714101 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 }} + - - + + + +