20
20
</div >
21
21
<el-scrollbar >
22
22
<div class =" hit-test-height" >
23
- <el-empty v-if =" paragraphDetail.length == 0" description =" 暂无数据" />
23
+ <el-empty v-if =" first" :image =" emptyImg" description =" 命中段落显示在这里" />
24
+ <el-empty v-else-if =" paragraphDetail.length == 0" description =" 没有命中的分段" />
24
25
<el-row v-else >
25
26
<el-col
26
27
:xs =" 24"
43
44
>
44
45
<template #icon >
45
46
<AppAvatar class =" mr-12 avatar-light" :size =" 22" >
46
- {{ index + 1 + '' }}</AppAvatar >
47
+ {{ index + 1 + '' }}</AppAvatar
48
+ >
47
49
</template >
48
50
<div class =" active-button primary" >{{ item.similarity?.toFixed(3) }}</div >
49
51
<template #footer >
@@ -145,6 +147,7 @@ import datasetApi from '@/api/dataset'
145
147
import applicationApi from ' @/api/application'
146
148
import ParagraphDialog from ' @/views/paragraph/component/ParagraphDialog.vue'
147
149
import { arraySort } from ' @/utils/utils'
150
+ import emptyImg from ' @/assets/hit-test-empty.png'
148
151
149
152
const route = useRoute ()
150
153
const {
@@ -161,6 +164,9 @@ const formInline = ref({
161
164
top_number: 5
162
165
})
163
166
167
+ // 第一次加载
168
+ const first = ref (true )
169
+
164
170
const cloneForm = ref <any >({})
165
171
166
172
const popoverVisible = ref (false )
@@ -215,12 +221,14 @@ function getHitTestList() {
215
221
paragraphDetail .value = res .data && arraySort (res .data , ' comprehensive_score' , true )
216
222
questionTitle .value = inputValue .value
217
223
inputValue .value = ' '
224
+ first .value = false
218
225
})
219
226
} else if (isApplication .value ) {
220
227
applicationApi .getApplicationHitTest (id , obj , loading ).then ((res ) => {
221
228
paragraphDetail .value = res .data && arraySort (res .data , ' comprehensive_score' , true )
222
229
questionTitle .value = inputValue .value
223
230
inputValue .value = ' '
231
+ first .value = false
224
232
})
225
233
}
226
234
}
0 commit comments