|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div style="padding:20px">
|
|
|
<div>
|
|
|
- <p>标的专利号:{{ patentNo }}</p>
|
|
|
+ <p> 标的专利号:<el-link type="primary" @click="toPatentDetails(patentNo)">{{patentNo}}</el-link> </p>
|
|
|
</div>
|
|
|
<div style="display: flex; justify-content: space-between;margin:20px 0px 20px 0 ;">
|
|
|
<el-button-group>
|
|
@@ -119,8 +119,10 @@ export default {
|
|
|
tableData:[],
|
|
|
tableData1: [],
|
|
|
checkList: [],
|
|
|
- splitType1:this.$s.getSession('reportMessage1').splitType?this.$s.getSession('reportMessage1').splitType.toString():"0",//拆分类型0仅拆主权要,1全部拆分
|
|
|
- splitBy1: this.$s.getSession('reportMessage1').splitBy?this.$s.getSession('reportMessage1').splitBy.toString():"2",
|
|
|
+ // splitType1:this.$s.getSession('reportMessage1').splitType?this.$s.getSession('reportMessage1').splitType.toString():"0",//拆分类型0仅拆主权要,1全部拆分
|
|
|
+ // splitBy1: this.$s.getSession('reportMessage1').splitBy?this.$s.getSession('reportMessage1').splitBy.toString():"2",
|
|
|
+ splitType1:"0",//拆分类型0仅拆主权要,1全部拆分
|
|
|
+ splitBy1:"2",
|
|
|
Type: "0",
|
|
|
textarea1: {},
|
|
|
mergeArr: ['id', 'pRightName'],
|
|
@@ -129,7 +131,8 @@ export default {
|
|
|
loading: false,
|
|
|
row: [],
|
|
|
Index_row: [],
|
|
|
- isNum:1,
|
|
|
+ isNum: 1,
|
|
|
+ isTypeBy:0,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -183,16 +186,30 @@ export default {
|
|
|
var PatentReportId = {
|
|
|
patentNo: this.patentNo,
|
|
|
reportId: this.reportId,
|
|
|
+ // splitType: this.splitType,
|
|
|
+ // splitBy: this.splitBy,
|
|
|
}
|
|
|
- if (this.isNum==0) {
|
|
|
+ if (this.isNum==0&&this.isTypeBy==0) {
|
|
|
this.$api.getAvoidDesignDirection(PatentReportId).then(res => {
|
|
|
- if (res.code==200) {
|
|
|
- this.tableData1 = res.data.features
|
|
|
- // this.tableData.pRightName = res.data.features.rightName
|
|
|
+ if (res.code == 200) {
|
|
|
this.textarea1.wholeDirection = res.data.wholeDirection
|
|
|
- this.tableData1.forEach(item => {
|
|
|
- item.pRightName=res.data.features.rightName
|
|
|
- })
|
|
|
+ if (res.data.rights.length>0) {
|
|
|
+ res.data.rights.forEach(rightsiItem => {
|
|
|
+ if (rightsiItem.features.length > 0) {
|
|
|
+ rightsiItem.features.forEach(featuresItem => {
|
|
|
+ featuresItem.pRightName=featuresItem.rightName
|
|
|
+ featuresItem.pContentOut=rightsiItem.contentOut
|
|
|
+ featuresItem.pContent=rightsiItem.content
|
|
|
+ featuresItem.pType = featuresItem.rightType
|
|
|
+ this.splitBy1 = featuresItem.splitBy.toString()
|
|
|
+ this.splitType1 = featuresItem.splitType.toString()
|
|
|
+ this.hasOwn(featuresItem)
|
|
|
+ this.tableData1.push(featuresItem)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(this.tableData1);
|
|
|
this.TypeSelect(this.Type)
|
|
|
this.loading=false
|
|
|
}
|
|
@@ -217,42 +234,47 @@ export default {
|
|
|
FeaturesItem.pPatentId=RightVosItem.patentId
|
|
|
FeaturesItem.pType=RightVosItem.type
|
|
|
FeaturesItem.pSort=RightVosItem.sort
|
|
|
- if (!FeaturesItem.hasOwnProperty("explainText")) {
|
|
|
- FeaturesItem.explainText=FeaturesItem.contentOut
|
|
|
- } else {
|
|
|
- if (FeaturesItem.explainText=="") {
|
|
|
- FeaturesItem.explainText=FeaturesItem.contentOut
|
|
|
- }
|
|
|
- }
|
|
|
- if (!FeaturesItem.hasOwnProperty("littleDirection")) {
|
|
|
- FeaturesItem.littleDirection=FeaturesItem.contentOut
|
|
|
- } else {
|
|
|
- if (FeaturesItem.littleDirection=="") {
|
|
|
- FeaturesItem.littleDirection=FeaturesItem.contentOut
|
|
|
- }
|
|
|
- }
|
|
|
+ this.hasOwn(FeaturesItem)
|
|
|
this.tableData1.push(FeaturesItem)
|
|
|
})
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
- }
|
|
|
- console.log(this.tableData1);
|
|
|
+ }
|
|
|
+
|
|
|
this.TypeSelect(this.Type)
|
|
|
this.loading=false
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
|
|
|
},
|
|
|
+
|
|
|
+ hasOwn(item) {
|
|
|
+ if (!item.hasOwnProperty("explainText")) {
|
|
|
+ item.explainText=item.contentOut
|
|
|
+ } else {
|
|
|
+ if (item.explainText=="") {
|
|
|
+ item.explainText=item.contentOut
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!item.hasOwnProperty("littleDirection")) {
|
|
|
+ item.littleDirection=''
|
|
|
+ } else {
|
|
|
+ if (item.littleDirection=="") {
|
|
|
+ item.littleDirection=''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 选择下拉框
|
|
|
splitTypeSelect(even) {
|
|
|
this.splitType1 = even
|
|
|
+ this.isTypeBy=1
|
|
|
this.splitPatentRight()
|
|
|
},
|
|
|
splitBySelect(even) {
|
|
|
this.splitBy1 = even
|
|
|
+ this.isTypeBy=1
|
|
|
this.splitPatentRight()
|
|
|
},
|
|
|
TypeSelect(even) {
|
|
@@ -266,6 +288,7 @@ export default {
|
|
|
return this.typeArr.includes(item.pType)
|
|
|
})
|
|
|
this.getSpanArr(this.tableData)
|
|
|
+ // this.keep()
|
|
|
},
|
|
|
//获取每个元素所需合并的行数
|
|
|
getSpanArr(data) {
|
|
@@ -314,33 +337,38 @@ export default {
|
|
|
},
|
|
|
//保存
|
|
|
keep() {
|
|
|
- console.log(this.tableData);
|
|
|
+ console.log(this.tableData1);
|
|
|
let keepArr = [
|
|
|
{
|
|
|
+ pRightName: this.tableData1[0].pRightName,
|
|
|
RightName: this.tableData1[0].pRightName,
|
|
|
signPatentNo: this.tableData1[0].pSignPatentNo,
|
|
|
- patentId: this.tableData1[0].pPatentId,
|
|
|
- content: this.tableData1[0].pContent,
|
|
|
- type: this.tableData1[0].pType,
|
|
|
- sort: this.tableData1[0].pSort,
|
|
|
+ // patentId: this.tableData1[0].pPatentId,
|
|
|
+ content: this.tableData1[0].content,
|
|
|
+ // type: this.tableData1[0].pType,
|
|
|
+ // sort: this.tableData1[0].pSort,
|
|
|
+ rightId:this.tableData1[0].rightId,
|
|
|
reportId: this.tableData1[0].pReportId,
|
|
|
contentOut: this.tableData1[0].pContentOut,
|
|
|
features:[],
|
|
|
}
|
|
|
]
|
|
|
+ console.log(keepArr);
|
|
|
var j=0
|
|
|
for (let i = 0; i < this.tableData1.length; i++) {
|
|
|
// console.log(this.tableData1);
|
|
|
- if (keepArr.findIndex(item => { return item.contentOut == this.tableData1[i].pContentOut }) < 0) {
|
|
|
+ if (keepArr.findIndex(item => { return (item.pRightName ||item.RightName) == this.tableData1[i].rightName }) < 0) {
|
|
|
+ console.log(this.tableData1[i]);
|
|
|
j += 1
|
|
|
keepArr.push(
|
|
|
{
|
|
|
RightName: this.tableData1[i].pRightName,
|
|
|
signPatentNo: this.tableData1[i].pSignPatentNo,
|
|
|
- patentId: this.tableData1[i].pPatentId,
|
|
|
+ // patentId: this.tableData1[i].pPatentId,
|
|
|
content: this.tableData1[i].pContent,
|
|
|
- type: this.tableData1[i].pType,
|
|
|
- sort: this.tableData1[i].pSort,
|
|
|
+ // type: this.tableData1[i].pType,
|
|
|
+ // sort: this.tableData1[i].pSort,
|
|
|
+ rightId:this.tableData1[i].rightId,
|
|
|
reportId: this.tableData1[i].pReportId,
|
|
|
contentOut: this.tableData1[i].pContentOut,
|
|
|
features: [],
|
|
@@ -369,7 +397,8 @@ export default {
|
|
|
type: this.tableData1[i].type,
|
|
|
littleDirection: this.tableData1[i].littleDirection ? this.tableData1[i].littleDirection : '',
|
|
|
// littleDirection:
|
|
|
- reportId: this.tableData1[i].pReportId,
|
|
|
+ // reportId: this.tableData1[i].pReportId,
|
|
|
+ reportId: this.tableData1[i].reportId,
|
|
|
explainText: this.tableData1[i].explainText?this.tableData1[i].explainText:'',
|
|
|
contentOut: this.tableData1[i].contentOut,
|
|
|
splitBy: this.tableData1[i].splitBy,
|
|
@@ -378,11 +407,15 @@ export default {
|
|
|
partnerId: this.tableData1[i].partnerId,
|
|
|
rightId: this.tableData1[i].rightId,
|
|
|
rightType: this.tableData1[i].rightType,
|
|
|
- // id: this.tableData1[i].id,
|
|
|
+ id: this.tableData1[i].id,
|
|
|
rightName: this.tableData1[i].rightName,
|
|
|
+ pRightName: this.tableData1[i].rightName,
|
|
|
isFinal: this.tableData1[i].isFinal,
|
|
|
+ pContent: this.tableData1[i].pContent,
|
|
|
+ pContentOut: this.tableData1[i].pContentOut,
|
|
|
})
|
|
|
}
|
|
|
+ console.log(keepArr,this.tableData1);
|
|
|
let keepStr = {
|
|
|
reportId: this.reportId,
|
|
|
avoidDesignLittleDirectionDTOs: keepArr,
|
|
@@ -393,6 +426,9 @@ export default {
|
|
|
this.$api.addAvoidDesignDirection(keepStr).then(res => {
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
+ // if (this.isNum!=0) {
|
|
|
+ //
|
|
|
+ // }
|
|
|
this.$message.success("保存成功")
|
|
|
}
|
|
|
})
|
|
@@ -480,9 +516,10 @@ export default {
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
+ var rowId = Math.floor((Math.random()*9999)+1000);
|
|
|
this.row.forEach((rowItem, rowIndex) => {
|
|
|
var splitAdd = {
|
|
|
- id: rowItem.id+'a',
|
|
|
+ id: rowItem.id+rowId+"a",
|
|
|
content: '',
|
|
|
contentOut:'',
|
|
|
littleDirection:'',
|