zhuliu vor 4 Monaten
Ursprung
Commit
90ab5989f7

+ 18 - 1
src/views/AITools/OADefense/OADefense.vue

@@ -160,7 +160,7 @@ export default {
             this.queryConfessionSession()
         },
         //查询技术交底书会话记录
-        queryConfessionSession(onlyQuery,request){
+        queryConfessionSession(onlyQuery,request,result){
             var params = {
                 type:2
             }
@@ -177,6 +177,23 @@ export default {
                 if(request){
                     this.getResult()
                 }
+                if(result){
+                    let obj = {}
+                    if(this.confessionSessionList && this.confessionSessionList.length>0){
+                        obj = this.confessionSessionList[0]
+                    }
+                    let content = obj.content
+                    if(!content){
+                        this.$set(this,'result','')
+                    return
+                    }
+                    try{
+                        let data = JSON.parse(content)
+                        this.$set(this,'result',data.answer)
+                    }catch(e){
+            
+                    }
+                }
             }
             })
       },

+ 4 - 2
src/views/AITools/OADefense/mixins/index.js

@@ -65,7 +65,8 @@ export default {
                         }else if(json.event == 'workflow_finished'){
                             if(json.data){
                                 this.result = json.data.outputs.output; 
-                             }
+                            }
+                            this.queryConfessionSession(false,false,true) 
                         }
                         
                     } catch (e) {
@@ -87,7 +88,8 @@ export default {
                                     }else if(json.event == 'workflow_finished'){
                                         if(json.data){
                                             this.result = json.data.outputs.output; 
-                                         }
+                                        }
+                                        this.queryConfessionSession(false,false,true) 
                                     }
                                 }
                                 catch(e){