|
@@ -163,6 +163,86 @@ export default{
|
|
|
return acc
|
|
|
},{})
|
|
|
},
|
|
|
+ //模板数据格式统一的公用
|
|
|
+ getCompareRecordData2(type,field,property){
|
|
|
+ if(!type){
|
|
|
+ var data = this.reportData[field]
|
|
|
+ if(property){
|
|
|
+ data = data[property]
|
|
|
+ }
|
|
|
+ return data
|
|
|
+ }
|
|
|
+ var key = field + '-' + property
|
|
|
+ if(!this.editModel && !this.hasCopy[key]){
|
|
|
+ if(this.dataObj.compareLiterature && this.dataObj.compareLiterature.length>0){
|
|
|
+ var data = []
|
|
|
+ var that = this
|
|
|
+ var compareRecord = {}
|
|
|
+ if(this.dataObj.compareRecord && this.dataObj.compareRecord.length>0){
|
|
|
+ compareRecord = this.groupBy(this.dataObj.compareRecord,'patentNo')
|
|
|
+ }
|
|
|
+ this.dataObj.compareLiterature.forEach(async (item,index)=>{
|
|
|
+ item.patentNo = item.literatureNo
|
|
|
+ var compareRecord1 = {
|
|
|
+ index:index+1,
|
|
|
+ compareFile:`对比文件${index+1}:${item.patentNo}-${item.name}:`,
|
|
|
+ analysis:'',
|
|
|
+ compareRecord:[]
|
|
|
+ }
|
|
|
+ var data = compareRecord[item.patentNo]||[]
|
|
|
+ if(data.length>0){
|
|
|
+ data.forEach((i,ind)=>{
|
|
|
+ var obj = {
|
|
|
+ index:ind+1,
|
|
|
+ compareText:`[${i.markSelectField}]${i.markSelectText}`,
|
|
|
+ compareDescription:""
|
|
|
+ }
|
|
|
+ var str = i.markNoteText
|
|
|
+ if(i.technicalFeature){
|
|
|
+ str = `揭示了“${i.technicalFeature}”${str}`
|
|
|
+ }
|
|
|
+ obj.compareDescription = str
|
|
|
+ compareRecord1.compareRecord.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ data.push(compareRecord1)
|
|
|
+
|
|
|
+ })
|
|
|
+ if(type == 'string'){
|
|
|
+ var str = ''
|
|
|
+ data.forEach(item=>{
|
|
|
+ str = `${str}${item.compareFile}<br>`
|
|
|
+ if(item.compareRecord.length>0){
|
|
|
+ item.compareRecord.forEach(i=>{
|
|
|
+ str = `${str} ${i.compareText}(${i.compareDescription})`
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.setColumnData(str,field,property)
|
|
|
+ }else{
|
|
|
+ this.setColumnData(data,field,property)
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ if(type == 'string'){
|
|
|
+ this.setColumnData('',field,property)
|
|
|
+ }else{
|
|
|
+ this.setColumnData([{index:1}],field,property)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ this.hasCopy[key] = true
|
|
|
+ }
|
|
|
+ return this.getCompareRecordData2(null,field,property)
|
|
|
+ },
|
|
|
+ //装载数据
|
|
|
+ setColumnData(data,field,property){
|
|
|
+ if(property){
|
|
|
+ this.$set(this.reportData[field],property,data)
|
|
|
+ }else{
|
|
|
+ this.$set(this.reportData,field,data)
|
|
|
+ }
|
|
|
+ },
|
|
|
//获取对比记录所需要的数据
|
|
|
getCompareRecordData(column,props=[]){
|
|
|
var key = 'compareRecord'
|
|
@@ -178,6 +258,7 @@ export default{
|
|
|
this.dataObj.compareLiterature.forEach(async (item,index)=>{
|
|
|
item.patentNo = item.literatureNo
|
|
|
var compareRecord1 = {
|
|
|
+ index:index+1,
|
|
|
patentNo:item.literatureNo,
|
|
|
data:compareRecord[item.patentNo]||[],
|
|
|
compareLiterature:item,
|