Skip to content

Commit 2e1b6fb

Browse files
committed
fix: Style optimization
1 parent f691b3e commit 2e1b6fb

7 files changed

Lines changed: 35 additions & 6 deletions

File tree

frontend/src/i18n/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@
684684
"application_description": "Application description",
685685
"cross_domain_settings": "Cross-domain settings",
686686
"enableCustomModel": "Use specified model",
687+
"useModel": "Use model",
688+
"defaultModel": "Default model",
689+
"customModel": "Specified model",
687690
"third_party_address": "Please enter the embedded third party address,multiple items separated by semicolons",
688691
"set_to_private": "Set as private",
689692
"set_to_public": "Set as public",

frontend/src/i18n/ko-KR.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@
684684
"application_description": "애플리케이션 설명",
685685
"cross_domain_settings": "교차 도메인 설정",
686686
"enableCustomModel": "지정된 모델 사용",
687+
"useModel": "사용 모델",
688+
"defaultModel": "기본 모델",
689+
"customModel": "지정 모델",
687690
"third_party_address": "임베디드할 제3자 주소를 입력하십시오, 여러 항목을 세미콜론으로 구분",
688691
"set_to_private": "비공개로 설정",
689692
"set_to_public": "공개로 설정",

frontend/src/i18n/zh-CN.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@
684684
"application_description": "应用描述",
685685
"cross_domain_settings": "跨域设置",
686686
"enableCustomModel": "使用指定大模型",
687+
"useModel": "使用模型",
688+
"defaultModel": "默认模型",
689+
"customModel": "指定模型",
687690
"third_party_address": "请输入嵌入的第三方地址,多个以分号分割",
688691
"set_to_private": "设为私有",
689692
"set_to_public": "设为公共",

frontend/src/i18n/zh-TW.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@
684684
"application_description": "應用描述",
685685
"cross_domain_settings": "跨網域設定",
686686
"enableCustomModel": "使用指定模型",
687+
"useModel": "使用模型",
688+
"defaultModel": "預設模型",
689+
"customModel": "指定模型",
687690
"third_party_address": "請輸入嵌入的第三方位址,多個以分號分割",
688691
"set_to_private": "設為私有",
689692
"set_to_public": "設為公共",

frontend/src/views/system/embedded/iframe.vue

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,18 @@ const rules = {
336336
trigger: 'blur',
337337
},
338338
],
339+
custom_model: [
340+
{
341+
validator: (_: any, value: any, callback: any) => {
342+
if (currentEmbedded.enable_custom_model && !value) {
343+
callback(new Error(t('datasource.please_enter') + t('common.empty') + t('modelType.llm')))
344+
} else {
345+
callback()
346+
}
347+
},
348+
trigger: 'change',
349+
},
350+
],
339351
}
340352
341353
const dsRules = {
@@ -818,16 +830,18 @@ const saveHandler = () => {
818830
/>
819831
</el-form-item>
820832

821-
<el-form-item prop="enable_custom_model">
822-
<el-checkbox v-model="currentEmbedded.enable_custom_model">
823-
{{ t('embedded.enableCustomModel') }}
824-
</el-checkbox>
833+
<el-form-item prop="enable_custom_model" :label="t('embedded.useModel')">
834+
<el-radio-group v-model="currentEmbedded.enable_custom_model">
835+
<el-radio :value="false">{{ t('embedded.defaultModel') }}</el-radio>
836+
<el-radio :value="true">{{ t('embedded.customModel') }}</el-radio>
837+
</el-radio-group>
825838
</el-form-item>
826839

827840
<el-form-item
828841
v-if="currentEmbedded.enable_custom_model"
829842
prop="custom_model"
830843
:label="t('modelType.llm')"
844+
required
831845
>
832846
<el-select v-model="currentEmbedded.custom_model" clearable filterable>
833847
<el-option

frontend/src/views/system/model/Card.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ defineExpose({ showErrorMask })
9494
<span class="type">{{ $t('model.basic_model') }}</span>
9595
<span class="value"> {{ baseModel }}</span>
9696
</div>
97-
<div v-if="false" class="type-value">
97+
<div class="type-value">
9898
<span class="type">{{ $t('authorized_space.authorized_space') }}</span>
9999
<span class="value" style="display: flex; align-items: center">
100100
{{ $t('permission.2', { msg: num }) }}
101101
<el-tooltip
102+
v-if="false"
102103
effect="dark"
103104
:content="$t('authorized_space.authorized_space_list')"
104105
placement="top"
@@ -184,7 +185,7 @@ defineExpose({ showErrorMask })
184185
<style lang="less" scoped>
185186
.card {
186187
width: 100%;
187-
height: 176px;
188+
height: 206px;
188189
border: 1px solid #dee0e3;
189190
padding: 16px;
190191
border-radius: 12px;

frontend/src/views/system/model/Model.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { highlightKeyword } from '@/utils/xss'
1919
import AuthorizedWorkspaceDialogForModel from '@/views/system/workspace/AuthorizedWorkspaceDialogForModel.vue'
2020
2121
interface Model {
22+
ws_mapping_count: number | undefined
2223
name: string
2324
model_type: string
2425
base_model: string
@@ -397,6 +398,7 @@ const submit = (item: any) => {
397398
:ref="(el: any) => setCardRef(el, index)"
398399
:key="ele.id"
399400
:name="ele.name"
401+
:num="ele.ws_mapping_count"
400402
:supplier="ele.supplier"
401403
:model-type="getModelTypeName(ele['model_type'])"
402404
:base-model="ele['base_model']"

0 commit comments

Comments
 (0)