|
@@ -4,6 +4,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
controller:null,
|
|
|
+ hasFiles:null
|
|
|
}
|
|
|
},
|
|
|
computed:{
|
|
@@ -93,6 +94,9 @@ export default {
|
|
|
const { done, value } = await reader.read();
|
|
|
if (done){
|
|
|
this.loading = false
|
|
|
+ if(this.hasFiles){
|
|
|
+ this.saveAllFiles(this.hasFiles)
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
const chunk = decoder.decode(value);
|
|
@@ -122,9 +126,17 @@ export default {
|
|
|
}else if(answer_json.code == 201){//修改后的权利要求输出
|
|
|
this.result = answer_json
|
|
|
this.$set(this.changeClaim,'claim',answer_json.data)
|
|
|
+ if(this.app_file && this.app_file.guid){
|
|
|
+ this.handleOptionClick(this.app_file,2)
|
|
|
+ }
|
|
|
}else if(answer_json.code == 202){//区别技术特征
|
|
|
this.result = answer_json
|
|
|
this.$set(this,'main_claim_reason',answer_json.data)
|
|
|
+ }else if(answer_json.code == 203){//文件输出
|
|
|
+ this.hasFiles = answer_json.data
|
|
|
+ this.app_file = answer_json.data.app_file || {}
|
|
|
+ this.modify_file = answer_json.data.modify_file || {}
|
|
|
+ this.contrast_file = answer_json.data.contrast_file || []
|
|
|
}
|
|
|
}catch(e){
|
|
|
if(loading_text!=''){
|
|
@@ -157,16 +169,24 @@ export default {
|
|
|
}else if(answer_json.code == 1002){//请求超时
|
|
|
this.result = answer_json
|
|
|
}else if(answer_json.code == 200){
|
|
|
- this.queryConfessionSession(false,false,true)
|
|
|
+ this.queryConfessionSession(false,false,true)
|
|
|
}else if(answer_json.code == 1003){//中间过程
|
|
|
this.loading_text = answer_json.data
|
|
|
loading_text = answer_json.data
|
|
|
}else if(answer_json.code == 201){//修改后的权利要求输出
|
|
|
this.result = answer_json
|
|
|
this.$set(this.changeClaim,'claim',answer_json.data)
|
|
|
+ if(this.app_file && this.app_file.guid){
|
|
|
+ this.handleOptionClick(this.app_file,2)
|
|
|
+ }
|
|
|
}else if(answer_json.code == 202){//区别技术特征
|
|
|
this.result = answer_json
|
|
|
this.$set(this,'main_claim_reason',answer_json.data)
|
|
|
+ }else if(answer_json.code == 203){//文件输出
|
|
|
+ this.hasFiles = answer_json.data
|
|
|
+ this.app_file = answer_json.data.app_file || {}
|
|
|
+ this.modify_file = answer_json.data.modify_file || {}
|
|
|
+ this.contrast_file = answer_json.data.contrast_file || []
|
|
|
}
|
|
|
}catch(e){
|
|
|
if(loading_text!=''){
|
|
@@ -192,6 +212,47 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ //保存文件
|
|
|
+ async saveAllFiles(files){
|
|
|
+ await this.getConversionDetails()
|
|
|
+ let content = this.currentConversation.content
|
|
|
+ var params = {
|
|
|
+ confessionSessionId:this.currentConversation.id,
|
|
|
+ }
|
|
|
+ if(!content){
|
|
|
+ params.content = JSON.stringify(
|
|
|
+ {
|
|
|
+ relevant_file:files
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }else{
|
|
|
+ try{
|
|
|
+ let data1 = JSON.parse(content)
|
|
|
+ if(data1.data && data1.data.code == 1001){
|
|
|
+ data1.data = {}
|
|
|
+ }
|
|
|
+ data1.relevant_file = files
|
|
|
+ params.content = JSON.stringify(data1)
|
|
|
+
|
|
|
+ }catch(e){
|
|
|
+ params.content = JSON.stringify(
|
|
|
+ {
|
|
|
+ relevant_file:files
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$api.updateConfessionSession(params).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.queryConfessionSession(true)
|
|
|
+ this.hasFiles = null
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
cancelRun(){
|
|
|
if (this.controller) {
|
|
|
this.controller.abort();
|