Sfoglia il codice sorgente

完善保存接口

cynthia-qin 3 settimane fa
parent
commit
36424e7ba8

+ 1 - 0
components.d.ts

@@ -62,6 +62,7 @@ declare module 'vue' {
     ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElText: typeof import('element-plus/es')['ElText']
+    ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
     ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
     ElUpload: typeof import('element-plus/es')['ElUpload']

+ 13 - 0
src/views/ConfigurationView.vue

@@ -145,6 +145,8 @@ interface QueueData {
     queue_name: string
     queue_label: string
     queue_config: QueueConfig
+    name:string
+    code:string
 }
 interface ConfigData {
     id: number
@@ -206,6 +208,15 @@ function handleSaveLLMConfig() {
 
 }
 function handleSaveConfig(queue: QueueData) {
+    
+    let params = {code:queue.code,name:queue.name,content:JSON.stringify(queue.queue_config)}
+    console.log('params',params)
+    setConfig(params).then(res => {
+        if(res.code == 200) {
+            ElMessage.success("保存成功")
+
+        }
+    })
 
 }
 function handleSetLLMConfigDefault(item: LLMConfigItemData) {
@@ -245,6 +256,8 @@ function loadQueues() {
                 var config: ConfigData = res.records[0] as ConfigData
                 var config_data: QueueConfig = JSON.parse(config.content) as QueueConfig
                 data[index].queue_config = config_data
+                data[index].name = config.name
+                data[index].code = config.code
                 if (data[index].queue_config != null) {
                     if (data[index].queue_config.max_instance === undefined) {
                         data[index].queue_config.max_instance = 1

+ 1 - 1
src/views/KMPlatform/KnowledgeBase/KBM/KnowledgeBaseManagement.vue

@@ -111,7 +111,7 @@
             </template>
           </el-table-column>
           <el-table-column prop="created_at" label="知识库创建时间" width="150" />
-          <el-table-column prop="creator" label="创建人" width="150" />
+          <el-table-column prop="user_name" label="创建人" width="150" />
           <el-table-column fixed="right" label="操作" width="150">
             <template #default="{ row }">
               <el-button link type="primary" v-if="operationPermissions['a-2']" @click="toKMById(row.id)">