Skip to content

Commit 15cb3ef

Browse files
committed
feat(Data Training): add data training
1 parent f86b2f6 commit 15cb3ef

File tree

10 files changed

+805
-17
lines changed

10 files changed

+805
-17
lines changed

frontend/src/api/training.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { request } from '@/utils/request'
2+
3+
export const trainingApi = {
4+
getList: (pageNum: any, pageSize: any, params: any) =>
5+
request.get(`/system/data-training/page/${pageNum}/${pageSize}`, {
6+
params,
7+
}),
8+
updateEmbedded: (data: any) => request.put('/system/data-training', data),
9+
deleteEmbedded: (params: any) => request.delete('/system/data-training', { data: params }),
10+
getOne: (id: any) => request.get(`/system/data-training/${id}`),
11+
}

frontend/src/components/layout/LayoutDsl.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,37 +61,37 @@ const showSysmenu = computed(() => {
6161
width="30"
6262
height="30"
6363
:src="logo_fold_blue"
64-
@click="toChatIndex"
6564
style="margin: 0 0 6px 5px; cursor: pointer"
65+
@click="toChatIndex"
6666
/>
6767
<img
6868
v-else
69-
@click="toChatIndex"
7069
width="130"
7170
height="31"
7271
:src="logo_blue"
7372
style="margin-bottom: 6px; cursor: pointer"
73+
@click="toChatIndex"
7474
/>
7575
</template>
7676
<template v-else-if="appearanceStore.themeColor === 'custom'">
7777
<custom_small
78-
@click="toChatIndex"
7978
v-if="collapse"
8079
style="margin: 0 0 6px 5px; cursor: pointer"
80+
@click="toChatIndex"
8181
></custom_small>
8282
<LOGOCustom
83-
@click="toChatIndex"
8483
v-else
8584
style="margin-bottom: 6px; cursor: pointer"
85+
@click="toChatIndex"
8686
></LOGOCustom>
8787
</template>
8888
<template v-else>
8989
<LOGO_fold
90-
@click="toChatIndex"
9190
v-if="collapse"
9291
style="margin: 0 0 6px 5px; cursor: pointer"
92+
@click="toChatIndex"
9393
></LOGO_fold>
94-
<LOGO @click="toChatIndex" v-else style="margin-bottom: 6px; cursor: pointer"></LOGO>
94+
<LOGO v-else style="margin-bottom: 6px; cursor: pointer" @click="toChatIndex"></LOGO>
9595
</template>
9696
<Workspace v-if="!showSysmenu" :collapse="collapse"></Workspace>
9797
<Menu :collapse="collapseCopy"></Menu>

frontend/src/components/layout/Menu.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const routerList = computed(() => {
5050
!route.path.includes('canvas') &&
5151
!route.path.includes('member') &&
5252
!route.path.includes('professional') &&
53+
!route.path.includes('training') &&
5354
!route.path.includes('permission') &&
5455
!route.path.includes('preview') &&
5556
route.path !== '/login' &&

frontend/src/i18n/en.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
"Dashboard": "Dashboard",
77
"AI Model Configuration": "AI Model Configuration"
88
},
9+
"training": {
10+
"data_training": "Data Training",
11+
"problem_description": "Problem Description",
12+
"sample_sql": "Sample SQL",
13+
"search_problem": "Search Problem",
14+
"add_training_data": "Add Training Data",
15+
"training_data_details": "Training Data Details",
16+
"training_data_items": "Do you want to delete the {msg} selected training data items?",
17+
"sql_statement": "SQL Statement",
18+
"edit_training_data": "Edit Training Data",
19+
"sales_this_year": "Do you want to delete the training data: {msg}?"
20+
},
921
"professional": {
1022
"cannot_be_repeated": "Term name, synonyms cannot be repeated",
1123
"code_for_debugging": "Copy the following code for debugging",
@@ -656,4 +668,4 @@
656668
"setting_successfully": "Setting Successfully",
657669
"customize_theme_color": "Customize theme color"
658670
}
659-
}
671+
}

frontend/src/i18n/zh-CN.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
"Dashboard": "仪表盘",
77
"AI Model Configuration": "模型配置"
88
},
9+
"training": {
10+
"data_training": "数据训练",
11+
"problem_description": "问题描述",
12+
"sample_sql": "示例 SQL",
13+
"search_problem": "搜索问题",
14+
"add_training_data": "添加训练数据",
15+
"training_data_details": "训练数据详情",
16+
"training_data_items": "是否删除选中的 {msg} 条训练数据?",
17+
"sql_statement": "SQL 语句",
18+
"edit_training_data": "编辑训练数据",
19+
"sales_this_year": "是否删除训练数据:{msg}?"
20+
},
921
"professional": {
1022
"cannot_be_repeated": "术语名称,同义词不能重复",
1123
"code_for_debugging": "复制以下代码进行调试",
@@ -656,4 +668,4 @@
656668
"setting_successfully": "设置成功",
657669
"customize_theme_color": "自定义主题色"
658670
}
659-
}
671+
}

frontend/src/router/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import assistant from '@/views/embedded/index.vue'
1616
import EmbeddedPage from '@/views/embedded/page.vue'
1717
import Member from '@/views/system/member/index.vue'
1818
import Professional from '@/views/system/professional/index.vue'
19+
import Training from '@/views/system/training/index.vue'
1920
import Appearance from '@/views/system/appearance/index.vue'
2021
import Permission from '@/views/system/permission/index.vue'
2122
import User from '@/views/system/user/User.vue'
@@ -112,6 +113,12 @@ export const routes = [
112113
component: Professional,
113114
meta: { title: t('professional.professional_terminology') },
114115
},
116+
{
117+
path: '/set/training',
118+
name: 'training',
119+
component: Training,
120+
meta: { title: t('training.data_training') },
121+
},
115122
],
116123
},
117124
{

frontend/src/views/chat/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<el-popover
3-
:width="280"
43
v-if="assistantStore.assistant && !assistantStore.pageEmbedded && assistantStore.type != 4"
4+
:width="280"
55
placement="bottom-start"
66
popper-class="popover-chat_history popover-chat_history_small"
77
>

frontend/src/views/system/appearance/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
:name="loginForm.name"
6565
:slogan="loginForm.slogan"
6666
:web="web"
67-
:showSlogan="loginForm.showSlogan"
67+
:show-slogan="loginForm.showSlogan"
6868
:bg="bg"
6969
:login="login"
7070
:is-blue="isBlue"

frontend/src/views/system/professional/index.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ import EmptyBackground from '@/views/dashboard/common/EmptyBackground.vue'
1212
import { useI18n } from 'vue-i18n'
1313
import { cloneDeep } from 'lodash-es'
1414
15-
defineProps({
16-
btnSelect: {
17-
type: String,
18-
default: '',
19-
},
20-
})
21-
2215
interface Form {
2316
id?: string | null
2417
word: string | null

0 commit comments

Comments
 (0)