From 2f5fbb2144ca03477eb91ab36a990ea013065214 Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期四, 08 八月 2024 17:47:32 +0800
Subject: [PATCH] 解析块页面修改

---
 src/views/dmx/knowledgeLib/test.vue |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/views/dmx/knowledgeLib/test.vue b/src/views/dmx/knowledgeLib/test.vue
index 5d88dad..b340e87 100644
--- a/src/views/dmx/knowledgeLib/test.vue
+++ b/src/views/dmx/knowledgeLib/test.vue
@@ -29,7 +29,7 @@
                 </a-select>
               </a-space>
             </a-form-item>
-            <a-form-item field="slider" label="Top-K" v-if="form.rerank_id === 'Jina' || form.rerank_id === 'BAAI'">
+            <a-form-item field="slider" label="Top-K" v-if="form.rerank_id">
               <a-slider v-model="form.top_k" :min="1" :max="2048" />
             </a-form-item>
             <a-form-item >
@@ -39,7 +39,7 @@
                   <a-textarea v-model="form.question" style="height: 10rem;border: 1px solid  var(--color-fill-3);border-radius: 4px" placeholder="" allow-clear/>
                 </div>
                 <div class="main-container-form-item-extra-btn">
-                  <a-button :disabled="!form.question" type="primary" html-type="submit">娴嬭瘯</a-button>
+                  <a-button :disabled="!form.question" :loading="loading" type="primary" html-type="submit">娴嬭瘯</a-button>
                 </div>
               </div>
             </a-form-item>
@@ -110,9 +110,17 @@
     delete formObj.rerank_id;
   }
   try {
+    loading.value = true;
     const data = await kbretrievalTest(formObj);
+    if(data.code == 0){
+      Message.success('娴嬭瘯鎴愬姛');
+    }else{
+      Message.error('娴嬭瘯澶辫触');
+    }
+    loading.value = false;
   }catch (err){
     Message.error(err.message);
+    loading.value = false;
   }
 
 }

--
Gitblit v1.8.0