From 8e72eb86164ff5a9f7e536f521b03eb9aea923e6 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 20 Nov 2023 18:56:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=E5=BA=94=E7=94=A8=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/assets/icon_robot.svg | 5 + ui/src/components/ai-dialog/index.vue | 108 ++++++++++++++++-- ui/src/components/icons/index.ts | 24 ++++ ui/src/styles/app.scss | 12 ++ ui/src/styles/variables.scss | 1 + .../views/application/CreateApplication.vue | 8 +- 6 files changed, 149 insertions(+), 9 deletions(-) create mode 100644 ui/src/assets/icon_robot.svg diff --git a/ui/src/assets/icon_robot.svg b/ui/src/assets/icon_robot.svg new file mode 100644 index 000000000..7f4369b02 --- /dev/null +++ b/ui/src/assets/icon_robot.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/src/components/ai-dialog/index.vue b/ui/src/components/ai-dialog/index.vue index 9a9d0fa36..45693f89c 100644 --- a/ui/src/components/ai-dialog/index.vue +++ b/ui/src/components/ai-dialog/index.vue @@ -1,20 +1,112 @@ - + diff --git a/ui/src/components/icons/index.ts b/ui/src/components/icons/index.ts index c9ae91982..c4911742f 100644 --- a/ui/src/components/icons/index.ts +++ b/ui/src/components/icons/index.ts @@ -173,5 +173,29 @@ export const iconMap: any = { ) ]) } + }, + 'app-send': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + viewBox: '0 0 24 24', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg' + }, + [ + h('path', { + d: 'M20.1716 1.68834C20.6753 1.53273 21.0458 2.16193 20.6652 2.52691L12.2658 10.5836C11.0058 11.7921 9.32754 12.4668 7.5817 12.4668C5.68044 12.4668 3.8669 11.667 2.58487 10.263L1.45879 9.02985C1.33225 8.90313 1.24137 8.74527 1.19534 8.5722C1.14931 8.39913 1.14974 8.21698 1.19661 8.04413C1.24347 7.87129 1.3351 7.71386 1.46225 7.58775C1.5894 7.46164 1.74757 7.3713 1.92079 7.32585L20.1716 1.68834Z', + fill: 'currentColor' + }), + h('path', { + d: 'M12 16.1851C12 14.2766 12.7377 12.4419 14.0588 11.0646L21.4664 3.34177C21.8268 2.96601 22.4499 3.32266 22.3084 3.82374L17.143 22.1182C17.0971 22.291 17.0064 22.4487 16.8801 22.5754C16.7538 22.7021 16.5964 22.7932 16.4237 22.8397C16.251 22.8862 16.0691 22.8864 15.8964 22.8402C15.7236 22.794 15.566 22.7031 15.4395 22.5767L14.4439 21.6791C12.8881 20.2764 12 18.2799 12 16.1851Z', + fill: 'currentColor' + }) + ] + ) + ]) + } } } diff --git a/ui/src/styles/app.scss b/ui/src/styles/app.scss index fbe03752a..e7451ad09 100644 --- a/ui/src/styles/app.scss +++ b/ui/src/styles/app.scss @@ -103,6 +103,10 @@ h4 { width: 240px; } +.mt-4 { + margin-top: calc(var(--app-base-px) - 4px); +} + .mt-8 { margin-top: var(--app-base-px); } @@ -128,6 +132,9 @@ h4 { .ml-16 { margin-left: calc(var(--app-base-px) * 2); } +.mr-4 { + margin-right: calc(var(--app-base-px) - 4px); +} .mr-8 { margin-right: var(--app-base-px); } @@ -280,6 +287,11 @@ h4 { } } +// 头像渐变背景 +.avatar-gradient { + background: var(--app-avatar-gradient-color); +} + .success { color: var(--el-color-success); } diff --git a/ui/src/styles/variables.scss b/ui/src/styles/variables.scss index 81869b6d8..fc309228d 100644 --- a/ui/src/styles/variables.scss +++ b/ui/src/styles/variables.scss @@ -14,6 +14,7 @@ --app-header-padding: 0 20px; --app-header-bg-color: linear-gradient(90deg, #ebf1ff 24.34%, #e5fbf8 56.18%, #f2ebfe 90.18%); --app-logo-color: linear-gradient(180deg, #3370ff 0%, #7f3bf5 100%); + --app-avatar-gradient-color: linear-gradient(270deg, #9258F7 0%, #3370FF 100%); // 计算高度 --app-main-height: calc(100vh - var(--app-header-height) - var(--app-view-padding) * 2 - 40px); diff --git a/ui/src/views/application/CreateApplication.vue b/ui/src/views/application/CreateApplication.vue index 6d3a66b37..9ef7e8052 100644 --- a/ui/src/views/application/CreateApplication.vue +++ b/ui/src/views/application/CreateApplication.vue @@ -1,6 +1,12 @@ diff --git a/ui/src/views/dataset/step/StepSecond.vue b/ui/src/views/dataset/step/StepSecond.vue index 814a52783..5c8783e7b 100644 --- a/ui/src/views/dataset/step/StepSecond.vue +++ b/ui/src/views/dataset/step/StepSecond.vue @@ -13,29 +13,50 @@

高级分段

- 用户可根据文档规范自行设置分段标识符、分段长度以及清洗规则 + 用户可根据文档规范自行设置分段标识符、分段长度以及清洗规则
分段标识 - +
- - + +
分段长度
- +
自动清洗
@@ -110,7 +131,7 @@ function splitDocument() { } const initSplitPatternList = () => { - DatasetApi.listSplitPattern(patternLoading).then(ok => { + DatasetApi.listSplitPattern(patternLoading).then((ok) => { splitPatternList.value = ok.data }) } From 42dc41db1954cf54764325c47e5f7051ffaf9cde Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 21 Nov 2023 11:43:47 +0800 Subject: [PATCH 3/3] feat: --- ui/src/components/ai-dialog/index.vue | 32 ++++++++++++++++++--------- ui/src/styles/app.scss | 4 ++++ ui/src/views/document/index.vue | 8 +++++++ 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/ui/src/components/ai-dialog/index.vue b/ui/src/components/ai-dialog/index.vue index e84ba54da..2dbdacf64 100644 --- a/ui/src/components/ai-dialog/index.vue +++ b/ui/src/components/ai-dialog/index.vue @@ -1,14 +1,17 @@