|
@@ -2,77 +2,92 @@
|
|
|
<div class="height_100 plan">
|
|
|
<el-container>
|
|
|
<el-header>
|
|
|
- <div style="display:flex; justify-content:flex-end;align-items: center;height: 50px;">
|
|
|
- <el-button type="danger" @click="delPlan(0)" v-if="checkList.length>0 && $reportPermission(reportId,[0,1])">删除</el-button>
|
|
|
+ <div style="width:100%;display:flex; justify-content:flex-end;align-items: center;height: 50px;">
|
|
|
+ <el-button type="danger" size="small" @click="delPlan(0)" v-if="checkList.length>0 && $reportPermission(projectId,[0,1])">删除</el-button>
|
|
|
</div>
|
|
|
</el-header>
|
|
|
- <el-main>
|
|
|
+ <el-main v-DivHeight="getDivHeight">
|
|
|
<el-table
|
|
|
- v-if="show"
|
|
|
:data="tableData"
|
|
|
border
|
|
|
class="table"
|
|
|
- height="750"
|
|
|
+ :maxHeight="tableHeight - 45"
|
|
|
:span-method="objectSpanMethod"
|
|
|
:row-class-name="tableRowClassName"
|
|
|
v-loading="loading"
|
|
|
+ :header-cell-style="{'text-align':'center'}"
|
|
|
style="min-width: 100%; overflow:auto">
|
|
|
- <el-table-column prop="right" label="权要" align="center" width="200px" :filters="rightList" :filter-method="filterHandler">
|
|
|
+ <el-table-column prop="rightSort" label="权要" align="center" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{scope.row.right}}</span>
|
|
|
+ <span>{{scope.row.rightName}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="resultant" label="对比组合" align="center" width="300px" >
|
|
|
+ <el-table-column prop="groupId" label="对比组合" min-width="200px" >
|
|
|
|
|
|
- <template slot-scope="scope" >
|
|
|
- <div >
|
|
|
- <el-checkbox-group v-model="checkList">
|
|
|
- <el-checkbox :label="scope.row.PlanId" >
|
|
|
- <p ><span>{{ scope.row.resultant}} </span><span v-if="$reportPermission(reportId,[0,1])"><el-link style="color:red;margin-left:10px" @click.prevent="delPlan(scope.row.PlanId)">删除</el-link></span></p>
|
|
|
- </el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </div>
|
|
|
-
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <div >
|
|
|
+ <el-checkbox-group v-model="checkList">
|
|
|
+ <el-checkbox :label="scope.row.groupId" >
|
|
|
+ <p ><span>{{ scope.row.groupName}} </span><span v-if="$reportPermission(projectId,[0,1])"><el-link style="color:red;margin-left:10px" @click.prevent="delPlan(scope.row.groupId)">删除</el-link></span></p>
|
|
|
+ </el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="assoRecordsFeatures" label="特征" align="center" width="200px">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="innerTable" style="width:calc(100% + 20px);margin-left:-10px">
|
|
|
- <el-tooltip class="item" effect="dark" :content="scope.row.features.content" placement="top">
|
|
|
- <span>特征{{scope.row.features.featuresOrder}}</span>
|
|
|
- </el-tooltip>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ <el-table-column prop="featureSysOrder" label="特征" align="center" width="200px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="innerTable" style="width:calc(100% + 20px);margin-left:-10px">
|
|
|
+ <el-tooltip class="item" effect="dark" :content="scope.row.featureContent" placement="top">
|
|
|
+ <span>特征{{scope.row.featureSysOrder}}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="PublicKnowledge" label="公识" align="center" width="100px">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="innerTable" style="width:calc(100% + 20px);margin-left:-10px">
|
|
|
- <span v-if="scope.row.compareRecords"></span>
|
|
|
- <span v-else>公识 </span>
|
|
|
+ <span>
|
|
|
+ {{ scope.row.publicKnowledge }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="patentNo" label="对比专利" align="center" width="200px">
|
|
|
+ <el-table-column prop="patentNo" label="对比专利" width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
- <div class="innerTable" style="width:calc(100% + 20px);margin-left:-10px">
|
|
|
- <span v-if="scope.row.compareRecords"> {{scope.row.compareRecords.patentNo}}</span>
|
|
|
- <span v-else ></span>
|
|
|
+ <div>
|
|
|
+ {{ scope.row.literatureName }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="content" label="对比内容" align="center" min-width="200px">
|
|
|
+ <el-table-column prop="content" label="对比内容" min-width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
- <div class="innerTable" style="width:calc(100% + 20px);margin-left:-10px">
|
|
|
- <span v-if="scope.row.compareRecords">
|
|
|
- {{scope.row.compareRecords.content}}<img v-if="scope.row.compareRecords.filePath" :src="$p + scope.row.compareRecords.filePath" width="100px" @click="showImage(scope.row.compareRecords.filePath)" />
|
|
|
+ <div>
|
|
|
+ <span v-if="scope.row.fieldName">
|
|
|
+ 【{{scope.row.fieldName}}】
|
|
|
+ </span>
|
|
|
+ <span v-if="scope.row.recordCommon">
|
|
|
+ ({{ scope.row.recordCommon }})
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ {{ scope.row.evidenceText }}
|
|
|
+ </span>
|
|
|
+ <span v-if="scope.row.fileGuid">
|
|
|
+ <el-image
|
|
|
+ ref="image"
|
|
|
+ :preview-src-list="[$commonJS.checkViewer(scope.row.fileGuid)]"
|
|
|
+ :src="$commonJS.checkViewer(scope.row.fileGuid)"
|
|
|
+ style="vertical-align: middle; width: 100px"
|
|
|
+ ></el-image>
|
|
|
+ </span>
|
|
|
+ <span v-if="scope.row.conclusion">
|
|
|
+ ({{ scope.row.conclusion }})
|
|
|
</span>
|
|
|
- <span v-else></span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="contrastResult" label="对比结论/理由" align="center" width="300px">
|
|
|
+ <el-table-column prop="groupId" label="对比结论/理由" align="center" width="300px">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-html="scope.row.contrastResult"></span>
|
|
|
+ <span v-html="scope.row.common"></span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -82,297 +97,152 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { downLoad2 } from "@/utils";
|
|
|
+import { getTableHeight } from '@/views/components/mixins'
|
|
|
export default {
|
|
|
- props:['reportId','row'],
|
|
|
+ mixins:[getTableHeight],
|
|
|
+ props:{
|
|
|
+ projectId:{
|
|
|
+ default:0
|
|
|
+ }
|
|
|
+ },
|
|
|
components:{
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- btnLoading:false,
|
|
|
- loadingTemplate: false,
|
|
|
- reportType:this.row.type,
|
|
|
- reportTemplateId:'',
|
|
|
- show:true,
|
|
|
- showList:true,
|
|
|
- checkList2:[],
|
|
|
- imageUrl:'',
|
|
|
- showFile :false,
|
|
|
- checkList:[],
|
|
|
- rightList:[],
|
|
|
- resultant:[],
|
|
|
- tableData1:[],
|
|
|
tableData:[],
|
|
|
+ mergeArr:['rightSort','groupId','featureSysOrder'],
|
|
|
+ mergeObj:{},
|
|
|
loading:false,
|
|
|
- mergeObj: {},
|
|
|
- mergeArr: [ 'right',"resultant",'contrastResult','patentNo','content'],
|
|
|
+ checkList:[],
|
|
|
+ rightList:[],
|
|
|
+ resultant:[]
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getContrastPlan()
|
|
|
},
|
|
|
watch:{
|
|
|
- checkList2(val){
|
|
|
- if(val.length>0){
|
|
|
- this.showList = false
|
|
|
- }else{
|
|
|
- this.showList = true
|
|
|
- }
|
|
|
- },
|
|
|
- reportId(val){
|
|
|
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
- //导出报告
|
|
|
- exportReport(row){
|
|
|
- this.reportTemplate = true
|
|
|
- },
|
|
|
- getReportTemplateId(val){
|
|
|
- this.reportTemplateId = val
|
|
|
- },
|
|
|
- close1(){
|
|
|
- this.reportTemplateId = ''
|
|
|
- this.reportTemplate = false
|
|
|
- },
|
|
|
- submitExport(){
|
|
|
- if (this.reportTemplateId) {
|
|
|
- this.loadingTemplate=true
|
|
|
- var a = {
|
|
|
- reportId : this.reportId,
|
|
|
- templeId :this.reportTemplateId
|
|
|
- }
|
|
|
- this.$api.exportReport(a).then(response => {
|
|
|
- if (response.code == 200) {
|
|
|
- this.$message.success('导出成功')
|
|
|
- downLoad2(response.data)
|
|
|
- this.reportTemplateId = ''
|
|
|
- this.reportTemplate = false
|
|
|
- this.loadingTemplate=false
|
|
|
- } else{
|
|
|
- this.$message.error('导出失败,请重试')
|
|
|
- this.loadingTemplate=false
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error('导出失败,请重试')
|
|
|
- this.loadingTemplate=false
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.$alert('请选择报告模板', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- callback: action => {
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- getInfo(val){
|
|
|
- //console.log(this.checkList2)
|
|
|
- var a = this.checkList2.findIndex(item=>{
|
|
|
- //console.log(item,val)
|
|
|
- return item == val
|
|
|
- })
|
|
|
- //console.log(a)
|
|
|
- if(a==-1){
|
|
|
- //console.log(1)
|
|
|
- this.checkList2.push(val)
|
|
|
- }else{
|
|
|
- this.checkList2.splice(a,1)
|
|
|
- }
|
|
|
- this.$forceUpdate()
|
|
|
- //console.log(val,this.checkList2)
|
|
|
- },
|
|
|
- checkPatentList(){
|
|
|
- var a = this.checkList2.map(item=>{
|
|
|
- return item.value
|
|
|
- })
|
|
|
- this.tableData = []
|
|
|
- this.tableData = this.tableData1.filter(item=>{
|
|
|
- return a.includes(item.resultant)
|
|
|
- })
|
|
|
- this.getSpanArr(this.tableData)
|
|
|
- // this.checkList2 = []
|
|
|
- // this.$refs.tree.setCheckedNodes([])
|
|
|
- this.show = false
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.show = true
|
|
|
- })
|
|
|
- // //console.log(this.tableData)
|
|
|
- },
|
|
|
- getChecked(){
|
|
|
- this.$refs.tree.setCheckedNodes(this.checkList2)
|
|
|
- },
|
|
|
- reset(){
|
|
|
- this.checkList2 = []
|
|
|
- this.$refs.tree.setCheckedNodes([])
|
|
|
- this.tableData = []
|
|
|
- this.tableData = JSON.parse(JSON.stringify(this.tableData1))
|
|
|
- this.getSpanArr(this.tableData)
|
|
|
- //console.log(this.checkList2)
|
|
|
- this.show = false
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.show = true
|
|
|
- })
|
|
|
- },
|
|
|
- getPatentList(){},
|
|
|
- //查看图片
|
|
|
- showImage(url){
|
|
|
- this.imageUrl =this.$p + url
|
|
|
- this.showFile = true
|
|
|
- },
|
|
|
- filterHandler(value, row, column) {
|
|
|
- const property = column['property'];
|
|
|
- return row[property] === value;
|
|
|
- },
|
|
|
- // 表格隔行变色
|
|
|
- tableRowClassName({ row, rowIndex }) {
|
|
|
- // if (rowIndex % 2 === 0) {
|
|
|
- // return 'success-row1'
|
|
|
- // } else {
|
|
|
- // return ''
|
|
|
- // }
|
|
|
- },
|
|
|
- delPlan(id) {
|
|
|
- if(id){
|
|
|
- a = [id]
|
|
|
- } else {
|
|
|
- var a = this.checkList
|
|
|
- }
|
|
|
|
|
|
- //console.log(this.checkList)
|
|
|
- this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.$api.deleteCompareScenarios(a).then(response=>{
|
|
|
- if(response.code == 200){
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功!'
|
|
|
- });
|
|
|
- this.rightList = []
|
|
|
- this.resultant = []
|
|
|
- this.getContrastPlan()
|
|
|
- this.checkList = []
|
|
|
+ filterHandler(value, row, column) {
|
|
|
+ const property = column['property'];
|
|
|
+ return row[property] === value;
|
|
|
+ },
|
|
|
+ // 表格隔行变色
|
|
|
+ tableRowClassName({ row, rowIndex }) {
|
|
|
+ // if (rowIndex % 2 === 0) {
|
|
|
+ // return 'success-row1'
|
|
|
+ // } else {
|
|
|
+ // return ''
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ delPlan(id) {
|
|
|
+ if(id){
|
|
|
+ a = [id]
|
|
|
+ } else {
|
|
|
+ var a = this.checkList
|
|
|
}
|
|
|
+ this.$confirm('此操作将永久删除, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.removeCompareGroups(a).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ });
|
|
|
+ this.rightList = []
|
|
|
+ this.resultant = []
|
|
|
+ this.getContrastPlan()
|
|
|
+ this.checkList = []
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
|
|
|
- })
|
|
|
-
|
|
|
- }).catch(() => {
|
|
|
- });
|
|
|
-
|
|
|
- },
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
getContrastPlan(){
|
|
|
- this.$api.selectCompareScenarios({reportID:this.reportId}).then(response=>{
|
|
|
+ var params = {
|
|
|
+ projectId:this.projectId
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ this.$api.getCompareGroups(params).then(response=>{
|
|
|
if(response.code == 200){
|
|
|
- var data = []
|
|
|
-
|
|
|
-
|
|
|
- //console.log(response.data)
|
|
|
- response.data.forEach((item,index)=>{
|
|
|
- var a = this.rightList.findIndex(i=>{
|
|
|
- return i.value == item.right
|
|
|
- })
|
|
|
- if(a==-1){
|
|
|
- this.rightList.push({
|
|
|
- text:item.right,
|
|
|
- value:item.right
|
|
|
- })
|
|
|
- }
|
|
|
- this.resultant.push({
|
|
|
- text:'对比组合'+(index+1),
|
|
|
- patentNoList:[],
|
|
|
- value:'对比组合'+(index+1)
|
|
|
- })
|
|
|
- var i = 0
|
|
|
- item.patentNoIndex=[]
|
|
|
- item.assoRecordsFeatures.forEach((item1)=>{
|
|
|
- if(item1.compareRecords.patentNo){
|
|
|
-
|
|
|
- var b = this.resultant[index].patentNoList.findIndex(i=>{
|
|
|
- return i == item1.compareRecords.patentNo
|
|
|
- })
|
|
|
- if(b == -1){
|
|
|
- this.resultant[index].patentNoList.push(item1.compareRecords.patentNo)
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- var c = item.featuresList.findIndex(i=>{
|
|
|
- return i.id == item1.features.id
|
|
|
- })
|
|
|
- if(c!=-1){
|
|
|
- item1.compareRecords = null
|
|
|
+ // this.tableData = response.data.data
|
|
|
+ var data = []
|
|
|
+ var groupOrder = 0
|
|
|
+ response.data.data.forEach(item=>{
|
|
|
+ groupOrder += 1
|
|
|
+ var obj = {
|
|
|
+ groupName:`对比组合${groupOrder}`,
|
|
|
+ groupId:item.groupId,
|
|
|
+ common:item.common,
|
|
|
+ rightSort:item.rightSort,
|
|
|
+ rightName:item.rightName,
|
|
|
+ rightContent:item.rightContent
|
|
|
}
|
|
|
-
|
|
|
- })
|
|
|
- item.assoRecordsFeatures.forEach((item1,ele)=>{
|
|
|
-
|
|
|
- if(ele == 0){
|
|
|
- item.patentNoIndex.push(ele)
|
|
|
- }else{
|
|
|
- if(item1.compareRecords&&item.assoRecordsFeatures[ele-1].compareRecords){
|
|
|
- if(item1.compareRecords.patentNo == item.assoRecordsFeatures[ele-1].compareRecords.patentNo && item1.compareRecords.content == item.assoRecordsFeatures[ele-1].compareRecords.content){
|
|
|
-
|
|
|
- item.patentNoIndex[item.patentNoIndex.length-1]+=1
|
|
|
- }else{
|
|
|
- item.patentNoIndex.push(ele)
|
|
|
+ var feature = item.featureMessages
|
|
|
+ if(feature.length>0){
|
|
|
+ for(let i = 0;i<feature.length;i++){
|
|
|
+ var obj2 = {
|
|
|
+ featureSysOrder : feature[i].sysOrder,
|
|
|
+ featureName: feature[i].featureName,
|
|
|
+ featureContent : feature[i].content
|
|
|
+ }
|
|
|
+ var evidenceReasons = feature[i].evidenceReasons
|
|
|
+ if(evidenceReasons && evidenceReasons.length>0){
|
|
|
+ for(let j= 0;j<evidenceReasons.length;j++){
|
|
|
+ if(evidenceReasons[j].evidenceId == 0){
|
|
|
+ data.push(
|
|
|
+ {
|
|
|
+ ...obj,
|
|
|
+ ...obj2,
|
|
|
+ publicKnowledge:'公知'
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }else{
|
|
|
+ evidenceReasons[j].recordCommon = evidenceReasons[j].common
|
|
|
+ delete evidenceReasons[j].common;
|
|
|
+ data.push(
|
|
|
+ {
|
|
|
+ ...obj,
|
|
|
+ ...obj2,
|
|
|
+ ...evidenceReasons[j]
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ data.push(
|
|
|
+ {
|
|
|
+ ...obj,
|
|
|
+ ...obj2,
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
- }else{
|
|
|
- item.patentNoIndex.push(ele)
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- // item1.rightList = item
|
|
|
- // data.push(item1)
|
|
|
-
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- item.resultant = '对比组合'+(index+1)
|
|
|
- // item.featuresList.forEach(i=>{
|
|
|
- // item.assoRecordsFeatures.push({
|
|
|
- // featureId:i.id,
|
|
|
- // features:i
|
|
|
- // })
|
|
|
- // })
|
|
|
- item.assoRecordsFeatures.sort((a,b)=>{
|
|
|
- return a.featureId - b.featureId
|
|
|
- })
|
|
|
- })
|
|
|
+ }else{
|
|
|
+ data.push(
|
|
|
+ {
|
|
|
+ ...obj
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
|
|
|
- this.tableData = []
|
|
|
- response.data.forEach(item=>{
|
|
|
- item.assoRecordsFeatures.forEach((item1,index)=>{
|
|
|
- item1.contrastResult= item.contrastResult
|
|
|
- item1.featuresIDList= item.featuresIDList
|
|
|
- item1.featuresList= item.featuresList
|
|
|
- item1.PlanId= item.id
|
|
|
- item1.reportId= item.reportId
|
|
|
- item1.right= item.right
|
|
|
- item1.rightId= item.rightId
|
|
|
- item1.signPatentNo= item.signPatentNo
|
|
|
- item1.resultant = item.resultant
|
|
|
- this.tableData.push(item1)
|
|
|
- })
|
|
|
})
|
|
|
- this.tableData.sort((a,b)=>{
|
|
|
- return a.right.slice(2,a.right.length) - b.right.slice(2,b.right.length)
|
|
|
- })
|
|
|
- // console.log(data)
|
|
|
-
|
|
|
- // // response.data = data
|
|
|
- // this.tableData = data
|
|
|
-
|
|
|
- // debugger
|
|
|
- this.getSpanArr(this.tableData)
|
|
|
- // this.tableData = data
|
|
|
- this.tableData1 = JSON.parse(JSON.stringify(this.tableData))
|
|
|
-
|
|
|
+ this.tableData = data
|
|
|
+ this.getSpanArr(this.tableData)
|
|
|
+ this.loading = false
|
|
|
}
|
|
|
+ }).catch(error=>{
|
|
|
+ this.tableData = []
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
},
|
|
|
getSpanArr(data) {
|
|
@@ -380,113 +250,45 @@ export default {
|
|
|
let count = 0;
|
|
|
this.mergeObj[key] = [];
|
|
|
data.forEach((item, index) => {
|
|
|
- // item.assoRecordsFeatures.forEach(i=>{
|
|
|
- // if(i.compareRecords){
|
|
|
- // this.mergeObj[key].push(0)
|
|
|
- // }else{
|
|
|
- // this.mergeObj[key].push(2)
|
|
|
- // }
|
|
|
- // })
|
|
|
- if(key == 'right' || key == 'resultant'){
|
|
|
- if (index === 0) {
|
|
|
- this.mergeObj[key].push(1);
|
|
|
- }else{
|
|
|
- if (item[key] === data[index - 1][key]) {
|
|
|
- this.mergeObj[key][count] += 1;
|
|
|
- this.mergeObj[key].push(0);
|
|
|
- }else{
|
|
|
- count = index;
|
|
|
+ if(key == 'featureSysOrder'){
|
|
|
+ if (index === 0) {
|
|
|
this.mergeObj[key].push(1);
|
|
|
- }
|
|
|
- }
|
|
|
- }else if(key == 'patentNo' || key=='content'){
|
|
|
- if (index === 0) {
|
|
|
- this.mergeObj[key].push(1);
|
|
|
- }else{
|
|
|
- if(item.compareRecords&&data[index - 1].compareRecords){
|
|
|
- if (item.compareRecords[key] === data[index - 1].compareRecords[key] && item.PlanId == data[index-1].PlanId) {
|
|
|
- this.mergeObj[key][count] += 1;
|
|
|
- this.mergeObj[key].push(0);
|
|
|
- }else{
|
|
|
- count = index;
|
|
|
- this.mergeObj[key].push(1);
|
|
|
+ } else {
|
|
|
+ if (item[key] === data[index - 1][key] && item[key].groupId === data[index - 1].groupId) {
|
|
|
+ this.mergeObj[key][count] += 1;
|
|
|
+ this.mergeObj[key].push(0);
|
|
|
+ } else {
|
|
|
+ count = index;
|
|
|
+ this.mergeObj[key].push(1);
|
|
|
}
|
|
|
- }else{
|
|
|
- count = index;
|
|
|
- this.mergeObj[key].push(1);
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
}
|
|
|
- // else{
|
|
|
-
|
|
|
- // item.assoRecordsFeatures.forEach((i,index2)=>{
|
|
|
- // if(index == 0){
|
|
|
- // if(i.compareRecords){
|
|
|
- // if(index2 == 0){
|
|
|
- // this.mergeObj[key].push(1);
|
|
|
- // }else{
|
|
|
- // if(i[key] === item.assoRecordsFeatures[index2-1][key]){
|
|
|
- // this.mergeObj[key][count] += 1;
|
|
|
- // this.mergeObj[key].push(0);
|
|
|
- // }else{
|
|
|
- // count = index2;
|
|
|
- // this.mergeObj[key].push(1);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // // else{
|
|
|
- // // count = index;
|
|
|
- // // this.mergeObj[key].push(1);
|
|
|
- // // }
|
|
|
- // }
|
|
|
- // }else{
|
|
|
- // if(item.resultant === data[index - 1].resultant){
|
|
|
- // if(i.compareRecords){
|
|
|
- // if(index2 == 0){
|
|
|
- // this.mergeObj[key].push(1);
|
|
|
- // }else{
|
|
|
- // if(i[key] === item.assoRecordsFeatures[index2-1][key]){
|
|
|
- // this.mergeObj[key][count] += 1;
|
|
|
- // this.mergeObj[key].push(0);
|
|
|
- // }else{
|
|
|
- // count = index2;
|
|
|
- // this.mergeObj[key].push(1);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // // else{
|
|
|
- // // count = index;
|
|
|
- // // this.mergeObj[key].push(1);
|
|
|
- // // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // })
|
|
|
-
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ else{
|
|
|
+ if (index === 0) {
|
|
|
+ this.mergeObj[key].push(1);
|
|
|
+ } else {
|
|
|
+ if (item[key] === data[index - 1][key]) {
|
|
|
+ this.mergeObj[key][count] += 1;
|
|
|
+ this.mergeObj[key].push(0);
|
|
|
+ } else {
|
|
|
+ count = index;
|
|
|
+ this.mergeObj[key].push(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
- this.mergeObj.contrastResult = this.mergeObj.resultant
|
|
|
- // data.forEach((item,index)=>{
|
|
|
- // if (index === 0) {
|
|
|
- // this.mergeObj[key].push(1);
|
|
|
- // }
|
|
|
- // })
|
|
|
- },
|
|
|
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
-// console.log(this.mergeArr,column.property,rowIndex,this.mergeObj)
|
|
|
- if (this.mergeArr.indexOf(column.property) !== -1) {
|
|
|
- if (this.mergeObj[column.property][rowIndex]) {
|
|
|
- return [this.mergeObj[column.property][rowIndex], 1]
|
|
|
- } else {
|
|
|
- return [0, 0];
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (this.mergeArr.indexOf(column.property) !== -1) {
|
|
|
+ if (this.mergeObj[column.property][rowIndex]) {
|
|
|
+ return [this.mergeObj[column.property][rowIndex], 1]
|
|
|
+ } else {
|
|
|
+ return [0, 0];
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
</script>
|