Merge branch 'main' of github.com:maxkb-dev/maxkb
This commit is contained in:
commit
5062062351
@ -8,7 +8,7 @@
|
|||||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</AppAvatar>
|
||||||
</slot>
|
</slot>
|
||||||
<h4 class="ellipsis-1" style="width: 100%">{{ title }}</h4>
|
<h4 class="ellipsis-1" style="width: 80%">{{ title }}</h4>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<back-button :to="activeMenu"></back-button>
|
<back-button :to="activeMenu"></back-button>
|
||||||
<el-dropdown placement="top" trigger="click" @command="changeMenu" class="w-full" style="display: block;">
|
<el-dropdown placement="top" trigger="click" @command="changeMenu" class="w-full" style="display: block;">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="ellipsis-1">{{ currentName }}</div>
|
<div class="ellipsis">{{ currentName }}</div>
|
||||||
<el-button text>
|
<el-button text>
|
||||||
<el-icon><CaretBottom /></el-icon>
|
<el-icon><CaretBottom /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</AppAvatar>
|
||||||
|
|
||||||
<span class="ellipsis-1"> {{ item?.name }}</span>
|
<span class="ellipsis"> {{ item?.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -238,7 +238,7 @@ h4 {
|
|||||||
超出省略号
|
超出省略号
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.ellipsis-1 {
|
.ellipsis {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
max-width: 130px;
|
max-width: 130px;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@ -256,6 +256,13 @@ h4 {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ellipsis-1 {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.break-all {
|
.break-all {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
@ -375,6 +382,10 @@ h4 {
|
|||||||
background: var(--app-avatar-gradient-color);
|
background: var(--app-avatar-gradient-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar-light {
|
||||||
|
background: var(--el-color-primary-light-4);
|
||||||
|
}
|
||||||
|
|
||||||
.success {
|
.success {
|
||||||
color: var(--el-color-success);
|
color: var(--el-color-success);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,3 +50,9 @@ export function realatedObject(list: any, val: string | number, attr: string) {
|
|||||||
return filterData || null
|
return filterData || null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 排序
|
||||||
|
export function arraySort(list: Array<string>, property: any, desc?: boolean) {
|
||||||
|
return list.sort((a: any, b: any) => {
|
||||||
|
return desc ? b[property] - a[property] : a[property] - b[property]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
/>
|
/>
|
||||||
<h4 class="ellipsis-1">{{ detail?.name }}</h4>
|
<h4 class="ellipsis">{{ detail?.name }}</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-row :gutter="12">
|
<el-row :gutter="12">
|
||||||
|
|||||||
@ -112,7 +112,7 @@
|
|||||||
<AppAvatar class="mr-12" shape="square" :size="32">
|
<AppAvatar class="mr-12" shape="square" :size="32">
|
||||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</AppAvatar>
|
||||||
<div class="ellipsis-1">
|
<div class="ellipsis">
|
||||||
{{ realatedObject(datasetList, item, 'id')?.name }}
|
{{ realatedObject(datasetList, item, 'id')?.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<el-row :gutter="12" v-loading="loading">
|
<el-row :gutter="12" v-loading="loading">
|
||||||
<el-col :span="12" v-for="(item, index) in data" :key="index" class="mb-16">
|
<el-col :span="12" v-for="(item, index) in data" :key="index" class="mb-16">
|
||||||
<CardCheckbox value-field="id" :data="item" v-model="checkList">
|
<CardCheckbox value-field="id" :data="item" v-model="checkList">
|
||||||
<span class="ellipsis-1">
|
<span class="ellipsis">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</span>
|
</span>
|
||||||
</CardCheckbox>
|
</CardCheckbox>
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
show-input
|
show-input
|
||||||
:show-input-controls="false"
|
:show-input-controls="false"
|
||||||
:min="50"
|
:min="50"
|
||||||
:max="1024"
|
:max="4096"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item mb-16">
|
<div class="form-item mb-16">
|
||||||
|
|||||||
@ -41,6 +41,9 @@
|
|||||||
:showIcon="false"
|
:showIcon="false"
|
||||||
@click="editParagraph(item)"
|
@click="editParagraph(item)"
|
||||||
>
|
>
|
||||||
|
<template #icon>
|
||||||
|
<AppAvatar :name="index + 1 + ''" class="mr-12 avatar-light" :size="22" />
|
||||||
|
</template>
|
||||||
<div class="active-button primary">{{ (item.similarity * 100).toFixed(2) }}%</div>
|
<div class="active-button primary">{{ (item.similarity * 100).toFixed(2) }}%</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="footer-content flex-between">
|
<div class="footer-content flex-between">
|
||||||
@ -140,6 +143,7 @@ import { useRoute } from 'vue-router'
|
|||||||
import datasetApi from '@/api/dataset'
|
import datasetApi from '@/api/dataset'
|
||||||
import applicationApi from '@/api/application'
|
import applicationApi from '@/api/application'
|
||||||
import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue'
|
import ParagraphDialog from '@/views/paragraph/component/ParagraphDialog.vue'
|
||||||
|
import { arraySort } from '@/utils/utils'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const {
|
const {
|
||||||
@ -194,13 +198,13 @@ function getHitTestList() {
|
|||||||
}
|
}
|
||||||
if (isDataset.value) {
|
if (isDataset.value) {
|
||||||
datasetApi.getDatasetHitTest(id, obj, loading).then((res) => {
|
datasetApi.getDatasetHitTest(id, obj, loading).then((res) => {
|
||||||
paragraphDetail.value = res.data
|
paragraphDetail.value = res.data && arraySort(res.data, 'comprehensive_score', true)
|
||||||
questionTitle.value = inputValue.value
|
questionTitle.value = inputValue.value
|
||||||
inputValue.value = ''
|
inputValue.value = ''
|
||||||
})
|
})
|
||||||
} else if (isApplication.value) {
|
} else if (isApplication.value) {
|
||||||
applicationApi.getApplicationHitTest(id, obj, loading).then((res) => {
|
applicationApi.getApplicationHitTest(id, obj, loading).then((res) => {
|
||||||
paragraphDetail.value = res.data
|
paragraphDetail.value = res.data && arraySort(res.data, 'comprehensive_score', true)
|
||||||
questionTitle.value = inputValue.value
|
questionTitle.value = inputValue.value
|
||||||
inputValue.value = ''
|
inputValue.value = ''
|
||||||
})
|
})
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.content"
|
v-model="form.content"
|
||||||
placeholder="请输入内容"
|
placeholder="请输入内容"
|
||||||
maxlength="1024"
|
maxlength="4096"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
:rows="8"
|
:rows="8"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<AppAvatar v-if="!node.isLeaf" class="mr-12" shape="square" :size="24">
|
<AppAvatar v-if="!node.isLeaf" class="mr-12" shape="square" :size="24">
|
||||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</AppAvatar>
|
||||||
<span class="ellipsis-1"> {{ data.name }}</span>
|
<span class="ellipsis"> {{ data.name }}</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.content"
|
v-model="form.content"
|
||||||
placeholder="请输入分段内容"
|
placeholder="请输入分段内容"
|
||||||
maxlength="1024"
|
maxlength="4096"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
:rows="15"
|
:rows="15"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
v-if="isEdit"
|
v-if="isEdit"
|
||||||
v-model="form.content"
|
v-model="form.content"
|
||||||
placeholder="请输入分段内容"
|
placeholder="请输入分段内容"
|
||||||
maxlength="1024"
|
maxlength="4096"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
:rows="8"
|
:rows="8"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
<AppAvatar v-else-if="isDataset" class="mr-12" shape="square" :size="24">
|
<AppAvatar v-else-if="isDataset" class="mr-12" shape="square" :size="24">
|
||||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</AppAvatar>
|
||||||
<span class="ellipsis-1"> {{ row?.name }}</span>
|
<span class="ellipsis"> {{ row?.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@ -7,11 +7,11 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li class="flex mt-16">
|
<li class="flex mt-16">
|
||||||
<el-text type="info">模型类型</el-text>
|
<el-text type="info">模型类型</el-text>
|
||||||
<span class="ellipsis-1 ml-16"> {{ model.model_type }}</span>
|
<span class="ellipsis ml-16"> {{ model.model_type }}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="flex mt-12">
|
<li class="flex mt-12">
|
||||||
<el-text type="info">模型名称</el-text>
|
<el-text type="info">模型名称</el-text>
|
||||||
<span class="ellipsis-1 ml-16"> {{ model.model_name }}</span>
|
<span class="ellipsis ml-16"> {{ model.model_name }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user