diff --git a/ui/src/api/dataset.ts b/ui/src/api/dataset.ts index e2c7c6a0e..dd4360545 100644 --- a/ui/src/api/dataset.ts +++ b/ui/src/api/dataset.ts @@ -108,6 +108,22 @@ const listUsableApplication: ( ) => Promise>> = (dataset_id, loading) => { return get(`${prefix}/${dataset_id}/application`, {}, loading) } + +/** + * 命中测试列表 + * @param dataset_id + * @param loading + * @query { query_text: string, top_number: number, similarity: number } + * @returns + */ +const getDatasetHitTest: ( + dataset_id: string, + data: any, + loading?: Ref +) => Promise>> = (dataset_id, data, loading) => { + return get(`${prefix}/${dataset_id}/hit_test`, data, loading) +} + export default { getDateset, getAllDateset, @@ -115,5 +131,6 @@ export default { postDateset, getDatesetDetail, putDateset, - listUsableApplication + listUsableApplication, + getDatasetHitTest } diff --git a/ui/src/assets/login.jpg b/ui/src/assets/login.jpg index 49ca5c3f3..68e5a7c3e 100644 Binary files a/ui/src/assets/login.jpg and b/ui/src/assets/login.jpg differ diff --git a/ui/src/components/icons/index.ts b/ui/src/components/icons/index.ts index 1487982eb..42fb09762 100644 --- a/ui/src/components/icons/index.ts +++ b/ui/src/components/icons/index.ts @@ -483,5 +483,26 @@ export const iconMap: any = { ) ]) } - } + }, + 'app-hit-test': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 1024 1024', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg' + }, + [ + h('path', { + d: 'M893.515135 43.149508L904.443831 119.556169l76.406661 10.834483a50.403901 50.403901 0 0 1 28.26387 85.356887l-65.477965 65.383752a502.060539 502.060539 0 1 1-216.689668-209.058423l15.450916 8.102309 65.383752-65.477965a50.309688 50.309688 0 0 1 71.036526 0 50.969178 50.969178 0 0 1 14.226147 28.26387zM502.437391 94.212899a427.067071 427.067071 0 1 0 384.671267 241.185022 50.403901 50.403901 0 0 1-33.162941 6.783328l-103.822615-14.979851-9.42129 9.42129A301.481277 301.481277 0 1 1 687.754163 283.3924l9.42129-9.42129L681.912963 169.583218a50.309688 50.309688 0 0 1 3.580091-27.039102l2.9206-5.558561A425.371239 425.371239 0 0 0 502.437391 94.212899z m0 200.956114A226.110958 226.110958 0 1 0 686.812034 390.512467l-91.763363 91.763363a100.619376 100.619376 0 1 1-53.324501-53.230288l91.763363-91.857576a226.110958 226.110958 0 0 0-131.050142-41.830527zM826.058699 103.634189l-67.833287 67.739074L770.002024 254.374827l82.624713 11.305548 67.739074-67.833287-26.66225-3.768516a75.370319 75.370319 0 0 1-62.557365-56.527739l-1.413194-6.971755-3.768516-26.944889z', + fill: 'currentColor' + }) + ] + ) + ]) + } + }, } diff --git a/ui/src/router/modules/dataset.ts b/ui/src/router/modules/dataset.ts index f5d05065f..3ebaeaedd 100644 --- a/ui/src/router/modules/dataset.ts +++ b/ui/src/router/modules/dataset.ts @@ -37,6 +37,18 @@ const datasetRouter = { }, component: () => import('@/views/document/index.vue') }, + // { + // path: 'hit-test', + // name: 'HitTest', + // meta: { + // icon: 'app-hit-test', + // title: '命中测试', + // active: 'hit-test', + // parentPath: '/dataset/:id', + // parentName: 'DatasetDetail' + // }, + // component: () => import('@/views/hit-test/index.vue') + // }, { path: 'setting', name: 'DatasetSetting', diff --git a/ui/src/styles/app.scss b/ui/src/styles/app.scss index c1b576994..35d78c698 100644 --- a/ui/src/styles/app.scss +++ b/ui/src/styles/app.scss @@ -69,6 +69,12 @@ ul { background-color: transparent; } +.clearfix:after { + content: ''; + display: block; + clear: both; +} + h1 { font-size: 24px; } @@ -437,4 +443,3 @@ h4 { padding: 8px 16px 8px 12px; } } - diff --git a/ui/src/views/hit-test/index.vue b/ui/src/views/hit-test/index.vue new file mode 100644 index 000000000..1a67a9fc0 --- /dev/null +++ b/ui/src/views/hit-test/index.vue @@ -0,0 +1,279 @@ + + +