2020 </div >
2121 <el-scrollbar >
2222 <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 =" 没有命中的分段" />
2425 <el-row v-else >
2526 <el-col
2627 :xs =" 24"
4344 >
4445 <template #icon >
4546 <AppAvatar class =" mr-12 avatar-light" :size =" 22" >
46- {{ index + 1 + '' }}</AppAvatar >
47+ {{ index + 1 + '' }}</AppAvatar
48+ >
4749 </template >
4850 <div class =" active-button primary" >{{ item.similarity?.toFixed(3) }}</div >
4951 <template #footer >
@@ -145,6 +147,7 @@ import datasetApi from '@/api/dataset'
145147import applicationApi from ' @/api/application'
146148import ParagraphDialog from ' @/views/paragraph/component/ParagraphDialog.vue'
147149import { arraySort } from ' @/utils/utils'
150+ import emptyImg from ' @/assets/hit-test-empty.png'
148151
149152const route = useRoute ()
150153const {
@@ -161,6 +164,9 @@ const formInline = ref({
161164 top_number: 5
162165})
163166
167+ // 第一次加载
168+ const first = ref (true )
169+
164170const cloneForm = ref <any >({})
165171
166172const popoverVisible = ref (false )
@@ -215,12 +221,14 @@ function getHitTestList() {
215221 paragraphDetail .value = res .data && arraySort (res .data , ' comprehensive_score' , true )
216222 questionTitle .value = inputValue .value
217223 inputValue .value = ' '
224+ first .value = false
218225 })
219226 } else if (isApplication .value ) {
220227 applicationApi .getApplicationHitTest (id , obj , loading ).then ((res ) => {
221228 paragraphDetail .value = res .data && arraySort (res .data , ' comprehensive_score' , true )
222229 questionTitle .value = inputValue .value
223230 inputValue .value = ' '
231+ first .value = false
224232 })
225233 }
226234}
0 commit comments