Skip to content

Commit bc4505a

Browse files
committed
列表搜索方式修改;字体统一修改;表头已选总数新增等;修复数据集对话框中的文档ID映射逻辑;
1 parent e1be5a5 commit bc4505a

File tree

31 files changed

+633
-511
lines changed

31 files changed

+633
-511
lines changed

src/components/CustomLoading/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ onBeforeUnmount(() => {
5757
.loadingNone {
5858
display: none;
5959
}
60+
.el-loading-text{
61+
color: var(--o-text-color-primary) !important;
62+
}
6063
</style>

src/components/KnowledgeForm/index.vue

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,24 @@
44
:model="ruleForm"
55
:rules="rules"
66
label-width="auto"
7-
class="kl-ruleForm"
7+
class="kl-ruleForm o-form-has-require"
88
:size="formSize"
99
label-position="left">
10-
<el-form-item
11-
:label="$t('assetLibrary.assetId')"
12-
prop="id"
13-
class="assetIdClass"
14-
:id="props.configInfo ? 'asset-box-id' : null"
15-
v-if="ruleForm.id?.length > 0">
16-
<el-input
17-
v-model="ruleForm.id"
18-
minlength="1"
19-
:disabled="true"
20-
maxlength="50"
21-
:placeholder="$t('assetLibrary.message.pleasePlace')" />
22-
<el-icon
23-
v-if="props.configInfo"
24-
class="copydocument"
25-
@click="handleCopyTextToclipboard(ruleForm.id)">
26-
<CopyDocument />
27-
</el-icon>
28-
</el-form-item>
2910
<el-form-item
3011
:label="$t('assetLibrary.name')"
3112
prop="kbName">
3213
<el-input
3314
v-model="ruleForm.kbName"
15+
class="o-validate-input"
3416
minlength="1"
3517
maxlength="20"
36-
:placeholder="$t('assetLibrary.message.pleasePlace')" />
18+
:placeholder="$t('assetLibrary.message.pleasePlace')" >
19+
<template #suffix>
20+
<el-icon class="error-icon" >
21+
<img src="@/assets/svg/fail.svg" />
22+
</el-icon>
23+
</template>
24+
</el-input>
3725
</el-form-item>
3826
<el-form-item
3927
:label="$t('assetLibrary.desc')"
@@ -225,7 +213,7 @@ import { v4 as uuidv4 } from 'uuid';
225213
import KbAppAPI from '@/api/kbApp';
226214
227215
const route = useRoute()
228-
const { t } = useI18n();
216+
const { t, locale} = useI18n();
229217
const loading = ElLoading.service({
230218
visible: false,
231219
text: `${t('pageTipText.Loading')}...`,
@@ -329,8 +317,9 @@ onMounted(async () => {
329317
}));
330318
// 如果是创建状态,设置默认值
331319
if (props.isCreate) {
332-
ruleForm.value.kbName = '资产库名称01';
333-
ruleForm.value.tokenizer = languageOptions.value?.[0].value || '';
320+
ruleForm.value.kbName = t('defaultText.kbName');
321+
ruleForm.value.tokenizer = locale.value==='zh'?languageOptions.value?.[0].value : languageOptions.value?.[1].value
322+
334323
ruleForm.value.embeddingModel = emBeddingModelOptions.value?.[0].value || '';
335324
ruleForm.value.defaultParseMethod = parserMethodOptions.value?.[0].value || '';
336325
}

src/components/TextMoreTootip/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@mouseenter="mouseenter"
77
@mouseleave="mouseleave">
88
<el-tooltip
9-
class="box-item"
9+
1010
effect="dark"
1111
:visible="visible"
1212
:content="value"

src/components/Upload/index.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,15 @@
7575
prop="name"
7676
:label="$t('dialogTipText.fileName')"
7777
class-name="upload-file-name"
78-
:show-overflow-tooltip="true" />
78+
>
79+
<template #default="scope">
80+
<el-tooltip :content="scope.row.name" placement="top" >
81+
<span class="table-row-content" >
82+
{{ scope.row.name }}
83+
</span>
84+
</el-tooltip>
85+
</template>
86+
</el-table-column>
7987
<el-table-column
8088
prop="size"
8189
:label="$t('dialogTipText.fileSize')"

src/lang/package/en.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ export default {
300300
multiple: 'Multiple Selection',
301301
cancelMultiple: 'Cancel Multiple Selection',
302302
checkAll: 'Check All',
303-
selected: '{count} have been selected',
303+
selected: '',
304+
selectedCount: ' have been selected',
304305
search: 'Search',
305306
},
306307
dialogTipText: {
@@ -378,5 +379,11 @@ export default {
378379
timerSearch: {
379380
lastHour: 'Last {timer} hour',
380381
},
382+
defaultText: {
383+
kbName: 'Asset Library Name 01',
384+
datasetName: 'Dataset 01',
385+
datasetDesc: 'This is a dataset description',
386+
testingName: 'Test Data 01',
387+
},
381388
copyright: 'Copyright© Huawei Software Technologies Co., Ltd.2024. All rights reserved.',
382389
};

src/lang/package/zh-cn.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ export default {
310310
multiple: '多选',
311311
cancelMultiple: '取消多选',
312312
checkAll: '全选',
313-
selected: '已选{count}项',
313+
selected: '已选',
314+
selectedCount: '项',
314315
search: '搜索',
315316
},
316317
dialogTipText: {
@@ -382,5 +383,11 @@ export default {
382383
timerSearch: {
383384
lastHour: '最近 {timer} 小时',
384385
},
386+
defaultText: {
387+
kbName: '资产库名称01',
388+
datasetName: '数据集01',
389+
datasetDesc: '这是一段数据集简介',
390+
testingName: '测试数据01',
391+
},
385392
copyright: '版权所有© 华为软件技术有限公司2024。保留一切权利',
386393
};

src/styles/dataSet.scss

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -242,20 +242,21 @@
242242
display: flex;
243243
justify-content: space-between;
244244

245+
.dataSet-container-left {
246+
display: flex;
247+
gap: 8px;
248+
.el-dropdown {
249+
.upBtn{
250+
border-color: #6395FD !important;
251+
}
252+
}
253+
}
245254
.dataSet-container-right {
246255
width: 356px;
247256
font-size: 12px;
248257
}
249258
}
250259

251-
.el-table tbody tr td:not(:first-child) .cell {
252-
padding: 0 8px !important;
253-
}
254-
255-
.el-table thead .el-table__cell .cell {
256-
padding: 0 8px !important;
257-
}
258-
259260
.custom-header {
260261
display: flex;
261262
gap: 4px;
@@ -390,13 +391,15 @@
390391
}
391392

392393
.el-table__cell {
393-
padding: 0 !important;
394+
padding: 0 8px !important;
394395
font-size: 12px;
395396
}
396-
397+
.el-table-column--selection{
398+
padding-left: 16px !important;
399+
padding-right: 0 !important;
400+
}
397401
.el-table-column--selection .cell {
398402
padding-right: 0 !important;
399-
padding-left: 10px !important;
400403
}
401404

402405
.el-pagination {
@@ -431,11 +434,7 @@
431434
display: flex;
432435
flex-direction: column;
433436
.dataSetTableContainer{
434-
height: calc(100vh - 318px);
435-
}
436-
.el-table__body-wrapper .el-table-column--selection>.cell,
437-
.el-table__header-wrapper .el-table-column--selection>.cell{
438-
padding-left: 18px !important;
437+
height: calc(100vh - 320px);
439438
}
440439
.el-table .cell{
441440
line-height: 16px !important;

src/styles/dataSetDialog.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
.el-form-item__label, .el-form-item__content{
5757
height: 16px !important;
5858
line-height: 16px !important;
59+
padding: 0px;
5960
.el-switch{
6061
height: 16px !important;
6162
.el-switch__core{

src/styles/dataSetDrawer.scss

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@
156156
}
157157

158158
.dataSetInfoTableContainer{
159-
160159
.el-pagination{
161160
padding-top: 12px !important;
162161
}
@@ -174,21 +173,15 @@
174173
.el-table tbody .cell{
175174
font-weight: 400;
176175
}
177-
.el-table tbody tr td:first-child .cell {
178-
padding-left: 16px !important;
179-
}
180-
.el-table tbody .el-table__cell:not(.el-table__expanded-cell):first-child,
181-
.el-table thead .cell,
182-
.el-table tbody .el-table-column--selection + th.el-table__cell,
183-
.el-table-column--selection + td.el-table__cell {
184-
padding: unset !important;
185-
}
186176
tbody .el-table__cell{
187177
padding: 0 !important;
188178
}
189179
.el-table__row .cell{
190180
padding: 8px !important;
191181
}
182+
.el-table__body-wrapper .el-table-column--selection {
183+
padding-left: 8px !important;
184+
}
192185
.dataChunkText{
193186
overflow: hidden;
194187
display: -webkit-box;
@@ -205,3 +198,6 @@
205198
}
206199

207200
}
201+
.dataSetPage{
202+
inset: auto auto 100px 753px !important;
203+
}

src/styles/evaluate.scss

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@
3232
cursor: not-allowed;
3333
}
3434
}
35+
.upBtn{
36+
border-color: #6395FD !important;
37+
}
3538

3639
}
3740
}
38-
.test-table{
39-
height: calc(100vh - 330px);
41+
.test-manage-table{
42+
height: calc(100vh - 320px);
4043
}
4144
.el-table.is-scrolling-left.el-table--border .el-table-fixed-column--left.is-last-column.el-table__cell {
4245
border-right: unset !important;
@@ -189,15 +192,15 @@
189192

190193
.el-table-column--selection .cell {
191194
padding-right: 0 !important;
192-
padding-left: 42px;
195+
padding-left: 40px;
193196
}
194197

195198
.group-selection::after {
196199
content: unset !important;
197200
}
198201

199202
.el-pagination {
200-
margin-top: 0;
203+
margin-top: 8px;
201204
}
202205

203206
.el-pagination .el-input__inner {
@@ -227,18 +230,22 @@
227230
.el-form-item {
228231
margin-bottom: 24px;
229232
.el-form-item__label{
230-
color: var(--o-item-label-text);
233+
color: var(--o-text-color-secondary);
231234
font-size: 12px;
232235
font-family: 'HarmonyOS Sans SC Regular';
233236
padding: 0px;
234237
margin-right: 24px;
238+
line-height: 32px;
235239
}
236240
.el-form-item__label:before{
237241
position: absolute;
238242
left: -8px;
239243
}
240244

241245
.el-form-item__content{
246+
.el-select{
247+
width: 100%;
248+
}
242249
.el-input__inner,.el-textarea__inner,.el-select__selected-item{
243250
font-size: 12px;
244251
font-family: 'HarmonyOS Sans SC Regular';
@@ -260,6 +267,11 @@
260267
}
261268

262269
}
270+
.evaluate-type-container{
271+
.el-input__wrapper{
272+
padding-left: 44px !important;
273+
}
274+
}
263275
.evaluate-dataSetName-container{
264276
height: 16px !important;
265277
.el-form-item__label,.el-form-item__content{
@@ -295,26 +307,10 @@
295307
.el-select__popper.el-popper[role=tooltip]{
296308
max-width: 414px !important;
297309
}
298-
.el-select__popper .el-select-dropdown__list{
299-
// background-color: white;
310+
311+
.custom-llm-select-popper{
300312
.el-select-dropdown__item{
301313
display: flex;
302314
align-items: center;
303-
gap: 4px;
304-
& span{
305-
max-width: 330px;
306-
overflow: hidden;
307-
text-overflow: ellipsis;
308-
white-space: nowrap;
309-
}
310-
}
311-
.is-hovering{
312-
background-color: rgb(122,165,225);
313-
}
314-
.is-selected{
315-
background-color: rgb(99,149,253);
316-
span{
317-
color: white !important;
318-
}
319315
}
320316
}

0 commit comments

Comments
 (0)