Skip to content

Commit 9e39a58

Browse files
dataeaseShufit2cloud-chenyw
authored andcommitted
feat(parameter): Add parameter configuration
1 parent d92c377 commit 9e39a58

File tree

5 files changed

+246
-3
lines changed

5 files changed

+246
-3
lines changed

frontend/src/i18n/en.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
"AI Model Configuration": "AI Model Configuration",
88
"Details": "Details"
99
},
10+
"parameter": {
11+
"parameter_configuration": "Parameter Configuration",
12+
"question_count_settings": "Question Count Settings",
13+
"model_thinking_process": "Expand Model Thinking Process",
14+
"rows_of_data": "Limit 1000 Rows of Data",
15+
"third_party_platform_settings": "Third-Party Platform Settings",
16+
"by_third_party_platform": "Automatic User Creation by Third-Party Platform",
17+
"platform_user_organization": "Third-Party Platform User Organization",
18+
"platform_user_roles": "Third-Party Platform User Roles",
19+
"excessive_data_volume": "Disabling the 1000-row data limit may cause system lag due to excessive data volume.",
20+
"prompt": "Prompt",
21+
"disabling_successfully": "Disabling Successfully",
22+
"closed_by_default": "In the Question Count window, control whether the model thinking process is expanded or closed by default.",
23+
"and_platform_integration": "Scope includes authentication settings and platform integration."
24+
},
1025
"prompt": {
1126
"default_password": "Default password:{msg}",
1227
"no_sql_sample": "No SQL sample currently available",
@@ -800,4 +815,4 @@
800815
"modelType": {
801816
"llm": "Large Language Model"
802817
}
803-
}
818+
}

frontend/src/i18n/ko-KR.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
"AI Model Configuration": "모델 구성",
88
"Details": "세부"
99
},
10+
"parameter": {
11+
"parameter_configuration": "매개변수 구성",
12+
"question_count_settings": "질문 수 설정",
13+
"model_thinking_process": "모델 사고 프로세스 확장",
14+
"rows_of_data": "데이터 1,000행 제한",
15+
"third_party_platform_settings": "타사 플랫폼 설정",
16+
"by_third_party_platform": "타사 플랫폼에 의한 자동 사용자 생성",
17+
"platform_user_organization": "타사 플랫폼 사용자 구성",
18+
"platform_user_roles": "타사 플랫폼 사용자 역할",
19+
"excessive_data_volume": "1,000행 데이터 제한을 비활성화하면 과도한 데이터 양으로 인해 시스템 지연이 발생할 수 있습니다.",
20+
"prompt": "프롬프트",
21+
"disabling_successfully": "비활성화 완료",
22+
"closed_by_default": "질문 수 창에서 모델 사고 프로세스를 기본적으로 확장할지 또는 닫을지 여부를 제어합니다.",
23+
"and_platform_integration": "범위에는 인증 설정 및 플랫폼 통합이 포함됩니다."
24+
},
1025
"prompt": {
1126
"default_password:": "기본 비밀번호:{msg}",
1227
"no_sql_sample": "현재 사용 가능한 SQL 샘플 라이브러리가 없습니다",
@@ -800,4 +815,4 @@
800815
"modelType": {
801816
"llm": "대형 언어 모델"
802817
}
803-
}
818+
}

frontend/src/i18n/zh-CN.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
"AI Model Configuration": "模型配置",
88
"Details": "详情"
99
},
10+
"parameter": {
11+
"parameter_configuration": "参数配置",
12+
"question_count_settings": "问数设置",
13+
"model_thinking_process": "展开模型思考过程",
14+
"rows_of_data": "限制 1000 行数据",
15+
"third_party_platform_settings": "第三方平台设置",
16+
"by_third_party_platform": "第三方自动创建用户",
17+
"platform_user_organization": "第三方平台用户组织",
18+
"platform_user_roles": "第三方平台用户角色",
19+
"excessive_data_volume": "关闭1000行的数据限制后,数据量过大,可能会造成系统卡顿",
20+
"prompt": "提示",
21+
"disabling_successfully": "关闭成功",
22+
"closed_by_default": "在问数窗口中,控制模型思考过程默认展开或者关闭",
23+
"and_platform_integration": "作用域包括认证设置和平台对接"
24+
},
1025
"prompt": {
1126
"default_password": "默认密码:{msg}",
1227
"no_sql_sample": "暂无 SQL 示例",
@@ -801,4 +816,4 @@
801816
"modelType": {
802817
"llm": "大语言模型"
803818
}
804-
}
819+
}

frontend/src/router/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Professional from '@/views/system/professional/index.vue'
1919
import Training from '@/views/system/training/index.vue'
2020
import Prompt from '@/views/system/prompt/index.vue'
2121
import Appearance from '@/views/system/appearance/index.vue'
22+
import Parameter from '@/views/system/parameter/index.vue'
2223
import Authentication from '@/views/system/authentication/index.vue'
2324
import Permission from '@/views/system/permission/index.vue'
2425
import User from '@/views/system/user/User.vue'
@@ -196,6 +197,12 @@ export const routes = [
196197
component: Appearance,
197198
meta: { title: t('system.appearance_settings') },
198199
},
200+
{
201+
path: 'parameter',
202+
name: 'parameter',
203+
component: Parameter,
204+
meta: { title: t('parameter.parameter_configuration') },
205+
},
199206
{
200207
path: 'authentication',
201208
name: 'authentication',
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
<script lang="ts" setup>
2+
import { ref, shallowRef } from 'vue'
3+
import icon_info_outlined_1 from '@/assets/svg/icon_info_outlined_1.svg'
4+
import { useI18n } from 'vue-i18n'
5+
6+
const { t } = useI18n()
7+
8+
const chatSetting = ref({
9+
modelThinkingProcess: false,
10+
rows_of_data: false,
11+
})
12+
13+
const platform = ref({
14+
organization: false,
15+
modelThinkingProcess: false,
16+
roles: [],
17+
})
18+
19+
const organizations = shallowRef<any[]>([])
20+
const roles = shallowRef<any[]>([])
21+
</script>
22+
23+
<template>
24+
<div class="parameter">
25+
<div class="title">
26+
{{ t('parameter.parameter_configuration') }}
27+
</div>
28+
<div class="card-container">
29+
<div class="card">
30+
<div class="card-title">
31+
{{ t('parameter.question_count_settings') }}
32+
</div>
33+
<div class="card-item">
34+
<div class="label">
35+
{{ t('parameter.model_thinking_process') }}
36+
37+
<el-tooltip effect="dark" :content="t('parameter.closed_by_default')" placement="top">
38+
<el-icon size="16">
39+
<icon_info_outlined_1></icon_info_outlined_1>
40+
</el-icon>
41+
</el-tooltip>
42+
</div>
43+
<div class="value">
44+
<el-switch v-model="chatSetting.modelThinkingProcess" />
45+
</div>
46+
</div>
47+
48+
<div class="card-item" style="margin-left: 16px">
49+
<div class="label">
50+
{{ t('parameter.rows_of_data') }}
51+
<el-tooltip
52+
effect="dark"
53+
:content="t('parameter.excessive_data_volume')"
54+
placement="top"
55+
>
56+
<el-icon size="16">
57+
<icon_info_outlined_1></icon_info_outlined_1>
58+
</el-icon>
59+
</el-tooltip>
60+
</div>
61+
<div class="value">
62+
<el-switch v-model="chatSetting.rows_of_data" />
63+
</div>
64+
</div>
65+
</div>
66+
67+
<div class="card">
68+
<div class="card-title">
69+
{{ t('parameter.third_party_platform_settings') }}
70+
</div>
71+
<div class="card-item" style="width: 100%">
72+
<div class="label">
73+
{{ t('parameter.by_third_party_platform') }}
74+
</div>
75+
<div class="value">
76+
<el-switch v-model="platform.modelThinkingProcess" />
77+
</div>
78+
</div>
79+
<div class="card-item">
80+
<div class="label">
81+
{{ t('parameter.platform_user_organization') }}
82+
<span class="require"></span>
83+
<el-tooltip
84+
effect="dark"
85+
:content="t('parameter.and_platform_integration')"
86+
placement="top"
87+
>
88+
<el-icon size="16">
89+
<icon_info_outlined_1></icon_info_outlined_1>
90+
</el-icon>
91+
</el-tooltip>
92+
</div>
93+
<div class="value">
94+
<el-select filterable v-model="platform.organization">
95+
<el-option
96+
v-for="item in organizations"
97+
:key="item.value"
98+
:label="item.label"
99+
:value="item.value"
100+
/>
101+
</el-select>
102+
</div>
103+
</div>
104+
<div class="card-item" style="margin-left: 16px">
105+
<div class="label">
106+
{{ t('parameter.platform_user_roles') }}
107+
<span class="require"></span>
108+
<el-tooltip
109+
effect="dark"
110+
:content="t('parameter.and_platform_integration')"
111+
placement="top"
112+
>
113+
<el-icon size="16">
114+
<icon_info_outlined_1></icon_info_outlined_1>
115+
</el-icon>
116+
</el-tooltip>
117+
</div>
118+
<div class="value">
119+
<el-select multiple filterable v-model="platform.roles">
120+
<el-option
121+
v-for="item in roles"
122+
:key="item.value"
123+
:label="item.label"
124+
:value="item.value"
125+
/>
126+
</el-select>
127+
</div>
128+
</div>
129+
</div>
130+
</div>
131+
<div class="save" style="margin-top: 16px">
132+
<el-button type="primary">{{ t('common.save') }}</el-button>
133+
</div>
134+
</div>
135+
</template>
136+
137+
<style lang="less" scoped>
138+
.parameter {
139+
.title {
140+
font-weight: 500;
141+
font-style: Medium;
142+
font-size: 20px;
143+
line-height: 28px;
144+
margin-bottom: 16px;
145+
}
146+
.card-container {
147+
.card {
148+
width: 100%;
149+
border-radius: 12px;
150+
padding: 16px;
151+
border: 1px solid #dee0e3;
152+
display: flex;
153+
flex-wrap: wrap;
154+
margin-top: 16px;
155+
.card-title {
156+
font-weight: 500;
157+
font-style: Medium;
158+
font-size: 16px;
159+
line-height: 24px;
160+
width: 100%;
161+
}
162+
.card-item {
163+
margin-top: 16px;
164+
width: calc(50% - 8px);
165+
.label {
166+
font-weight: 400;
167+
font-size: 14px;
168+
line-height: 22px;
169+
display: flex;
170+
align-items: center;
171+
172+
.ed-icon {
173+
margin-left: 4px;
174+
}
175+
176+
.require::after {
177+
content: '*';
178+
color: var(--ed-color-danger);
179+
margin-left: 4px;
180+
}
181+
}
182+
183+
.value {
184+
margin-top: 8px;
185+
line-height: 20px;
186+
}
187+
}
188+
}
189+
}
190+
}
191+
</style>

0 commit comments

Comments
 (0)