|
@@ -3,7 +3,7 @@
|
|
|
<div style="margin-bottom:20px">
|
|
|
<span><span>{{ name }}</span>{{structureId?'架构':'产品'}}的相关专利</span>
|
|
|
</div>
|
|
|
- <div style="display: flex; justify-content: space-between;" v-if="!structureId">
|
|
|
+ <div style="display: flex; justify-content: space-between;flex-wrap: wrap;" v-if="!structureId">
|
|
|
<div :style="{ visibility: selectedTotal > 0 ? 'visible' : 'hidden' }">
|
|
|
已勾选 <b>{{ selectedTotal }}</b> 条
|
|
|
</div>
|
|
@@ -69,30 +69,34 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="专利标题" align="center" width="300px"></el-table-column>
|
|
|
- <el-table-column v-for="item in fields" :prop="item.key" :label="item.name" align="center"></el-table-column>
|
|
|
- <el-table-column prop="applicationNo" label="申请号" align="center" width=""></el-table-column>
|
|
|
- <el-table-column prop="applicationDate" label="申请日" align="center" width=""></el-table-column>
|
|
|
- <el-table-column prop="ipcList" label="IPC分类号" align="center" width=""></el-table-column>
|
|
|
- <el-table-column prop="applicant" label="权利人" align="center" width="">
|
|
|
+ <el-table-column v-for="column in fields" :label="column.name" show-overflow-tooltip align="center">
|
|
|
+ <!-- <template slot="header">
|
|
|
+ <patent-table-view-sort :title="column.name" :prop="column.key" @on-sort="onSort" />
|
|
|
+ </template> -->
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-for="item in scope.row.applicant">
|
|
|
- <span v-if="item.dataType==1">
|
|
|
- {{ item.name }}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="applicant" label="申请人" align="center" width="">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-for="item in scope.row.applicant">
|
|
|
- <span v-if="item.dataType==2">
|
|
|
- {{ item.name }}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
+ <div style="" v-for="data in getColumnValue(scope.row, column)">
|
|
|
+ <template v-if="column.key === 'name'">
|
|
|
+ <span v-html="getViewDom2(scope.row, 'name')"></span>
|
|
|
+ <br>
|
|
|
+ <el-link type="primary" @click.native="handleChange(scope.row, 'name')">
|
|
|
+ <span v-if="!scope.row.change">切换译文</span>
|
|
|
+ <span v-else>切换原文</span>
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="column.key === 'abstractStr'">
|
|
|
+ <span v-html="getViewDom2(scope.row, 'abstractStr')"></span>
|
|
|
+ <br>
|
|
|
+ <el-link type="primary" @click.native="handleChange(scope.row, 'abstractStr')">
|
|
|
+ <span v-if="!scope.row.change2">切换译文</span>
|
|
|
+ <span v-else>切换原文</span>
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <span v-html="getViewDom(data)"></span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="simpleStatus" align="center" label="状态"></el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
<div class="pagination">
|
|
@@ -145,12 +149,14 @@
|
|
|
<script>
|
|
|
import SelectedPatent from "./SelectedPatent.vue";
|
|
|
import PatentViewField from "./dialog/PatentViewField.vue";
|
|
|
+import { patentViewList, patentKeywordsHighlight} from '@/views/components/common/mixins'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
SelectedPatent,
|
|
|
PatentViewField,
|
|
|
},
|
|
|
+ mixins:[patentViewList, patentKeywordsHighlight],
|
|
|
props: ['productId','structureId','name'],//name为产品名称或者架构名称
|
|
|
data() {
|
|
|
return {
|
|
@@ -162,7 +168,7 @@ export default {
|
|
|
quickSelect: false,//是否快速选择
|
|
|
loading: true,
|
|
|
visible: false,
|
|
|
- selected: [],
|
|
|
+ selecteds: [],
|
|
|
checkList: [],//回显
|
|
|
tableData: [],
|
|
|
total: 0,
|
|
@@ -197,7 +203,7 @@ export default {
|
|
|
},
|
|
|
field: [],
|
|
|
tree: [],
|
|
|
- selected: [],
|
|
|
+ selecteds: [],
|
|
|
startNumber: 1,
|
|
|
endNumber: 0,
|
|
|
family: 0,
|
|
@@ -252,15 +258,54 @@ export default {
|
|
|
},
|
|
|
handleFields(patentViewField) {
|
|
|
this.fields=[]
|
|
|
- const customField=patentViewField.filter(item => {
|
|
|
+ this.fields=patentViewField.filter(item => {
|
|
|
return item.hidden==false
|
|
|
})
|
|
|
- let isIncludes = ['applicant4', 'applicant2', 'ipcList', 'applicationDate', 'applicationNo', 'name']
|
|
|
- customField.forEach(item => {
|
|
|
- if (!item.key.includes('applicant4') && !item.key.includes('applicant2') && !item.key.includes('name') && !item.key.includes('ipcList') && !item.key.includes('applicationDate')&& !item.key.includes('applicationNo')) {
|
|
|
- this.fields.push(item)
|
|
|
+ },
|
|
|
+ getColumnValue(row, column) {
|
|
|
+ if (column.type !== 'list') {
|
|
|
+ const field = row.field.find(item => item.id === parseInt(column.key))
|
|
|
+ if (field) {
|
|
|
+ // return field.selecteds
|
|
|
}
|
|
|
- })
|
|
|
+ } else if (column.key === 'label') {
|
|
|
+ return row.label.map(item => item.name)
|
|
|
+ } else {
|
|
|
+ const value = row[column.key]
|
|
|
+ if (column.key === 'inventor' || column.key === 'agent') {
|
|
|
+ return value.map(item => item.name)
|
|
|
+ }
|
|
|
+ if (column.key === 'applicant1') {
|
|
|
+ return row.applicant.filter(a => a.dataType === 1).map(item => item.shortName)
|
|
|
+ }
|
|
|
+ if (column.key === 'applicant2') {
|
|
|
+ return row.applicant.filter(a => a.dataType === 1).map(item => item.name)
|
|
|
+ }
|
|
|
+ if (column.key === 'applicant3') {
|
|
|
+ return row.applicant.filter(a => a.dataType === 2).map(item => item.shortName)
|
|
|
+ }
|
|
|
+ if (column.key === 'applicant4') {
|
|
|
+ return row.applicant.filter(a => a.dataType === 2).map(item => item.name)
|
|
|
+ }
|
|
|
+ if (column.key === 'simpleFamily') {
|
|
|
+ return [row.family.simple.length]
|
|
|
+ }
|
|
|
+ if (column.key === 'inpadocFamily') {
|
|
|
+ return [row.family.inpadoc.length]
|
|
|
+ }
|
|
|
+ if (column.key === 'patSnapFamily') {
|
|
|
+ return [row.family.patSnap.length]
|
|
|
+ }
|
|
|
+ if (column.key === 'agency' && value) {
|
|
|
+ return [value.name]
|
|
|
+ }
|
|
|
+ if (value instanceof Array) {
|
|
|
+ return value
|
|
|
+ } else if (typeof value === 'string' || typeof value === 'number') {
|
|
|
+ return [value]
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ }
|
|
|
},
|
|
|
// 跳转专利详情
|
|
|
toPatentDetails(val) {
|
|
@@ -419,10 +464,10 @@ export default {
|
|
|
}
|
|
|
switch (type) {
|
|
|
case 0:
|
|
|
- this.queryParams.selected = this.tableData.map(item => item.patentNo);
|
|
|
- this.checkList = [...new Set(this.checkList.concat(this.queryParams.selected))]
|
|
|
+ this.queryParams.selecteds = this.tableData.map(item => item.patentNo);
|
|
|
+ this.checkList = [...new Set(this.checkList.concat(this.queryParams.selecteds))]
|
|
|
// this.selectedTotal = this.checkList.length
|
|
|
- this.queryParams.selected = []
|
|
|
+ this.queryParams.selecteds = []
|
|
|
if (!this.quickSelect) {
|
|
|
this.queryParams.patentNos = JSON.parse(JSON.stringify(this.checkList))
|
|
|
this.getSelectedTotal()
|
|
@@ -479,9 +524,9 @@ export default {
|
|
|
// this.selectNumberLoading = true
|
|
|
// this.$api.getComPatentNos(params).then(response => {
|
|
|
// //console.log(response.data)
|
|
|
- // this.queryParams.selected = response.data
|
|
|
- // this.checkList = [...new Set(this.checkList.concat(this.queryParams.selected))]
|
|
|
- // // this.checkList = this.queryParams.selected
|
|
|
+ // this.queryParams.selecteds = response.data
|
|
|
+ // this.checkList = [...new Set(this.checkList.concat(this.queryParams.selecteds))]
|
|
|
+ // // this.checkList = this.queryParams.selecteds
|
|
|
// this.selectNumberLoading = false
|
|
|
// this.getList()
|
|
|
// }).catch(error => {
|
|
@@ -500,7 +545,7 @@ export default {
|
|
|
|
|
|
}
|
|
|
|
|
|
- // this.checkList =JSON.parse(JSON.stringify(this.queryParams.selected))
|
|
|
+ // this.checkList =JSON.parse(JSON.stringify(this.queryParams.selecteds))
|
|
|
this.checkList = []
|
|
|
this.queryParams.notInPatentNos = []
|
|
|
this.queryParams.patentNos = []
|
|
@@ -550,7 +595,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.checkList = [...new Set(this.checkList)]
|
|
|
- this.selected = this.checkList
|
|
|
+ this.selecteds = this.checkList
|
|
|
this.getSelectedTotal()
|
|
|
// //console.log(this.checkList)
|
|
|
|
|
@@ -564,7 +609,7 @@ export default {
|
|
|
} else {
|
|
|
this.checkList.push(this.tableData[y].patentNo)
|
|
|
}
|
|
|
- var index = this.queryParams.selected.findIndex(item => {
|
|
|
+ var index = this.queryParams.selecteds.findIndex(item => {
|
|
|
return item == patentNo
|
|
|
})
|
|
|
if (index != -1) {
|
|
@@ -574,7 +619,7 @@ export default {
|
|
|
if (index3 != -1) {
|
|
|
|
|
|
} else {
|
|
|
- this.queryParams.notInPatentNos.push(this.queryParams.selected[index])
|
|
|
+ this.queryParams.notInPatentNos.push(this.queryParams.selecteds[index])
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -588,7 +633,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
handleCancelSelectNumber() {//取消选择
|
|
|
- this.queryParams.selected = []
|
|
|
+ this.queryParams.selecteds = []
|
|
|
this.queryParams.patentNos = []
|
|
|
this.queryParams.notInPatentNos = []
|
|
|
this.checkList = []
|
|
@@ -603,7 +648,7 @@ export default {
|
|
|
getFunInfo(val) {
|
|
|
//console.log(this.quickSelect);
|
|
|
if (this.quickSelect) {
|
|
|
- var index4 = this.queryParams.selected.findIndex(item => {
|
|
|
+ var index4 = this.queryParams.selecteds.findIndex(item => {
|
|
|
return item == val
|
|
|
})
|
|
|
if (index4 != -1) {
|
|
@@ -614,7 +659,7 @@ export default {
|
|
|
this.$api.deleteCompareNo(a).then(response => {
|
|
|
if (response.code == 200) {
|
|
|
// this.getList()
|
|
|
- this.queryParams.selected.splice(index4, 1)
|
|
|
+ this.queryParams.selecteds.splice(index4, 1)
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -624,7 +669,7 @@ export default {
|
|
|
this.isFind(val)
|
|
|
}
|
|
|
} else {
|
|
|
- var index = this.queryParams.selected.findIndex(item => {
|
|
|
+ var index = this.queryParams.selecteds.findIndex(item => {
|
|
|
return item == val
|
|
|
})
|
|
|
if (index != -1) {
|
|
@@ -653,13 +698,13 @@ export default {
|
|
|
},
|
|
|
isFind(val) {
|
|
|
if (this.isFetch) {
|
|
|
- var index = this.selected.findIndex(item => {
|
|
|
+ var index = this.selecteds.findIndex(item => {
|
|
|
return item == val
|
|
|
})
|
|
|
if (index != -1) {
|
|
|
//console.log(val)
|
|
|
this.queryParams.notInPatentNos.push(val)
|
|
|
- this.selected.splice(index, 1)
|
|
|
+ this.selecteds.splice(index, 1)
|
|
|
} else {
|
|
|
var index2 = this.queryParams.notInPatentNos.findIndex(i => {
|
|
|
return i == val
|
|
@@ -693,11 +738,11 @@ export default {
|
|
|
} else {
|
|
|
// this.isFetch = true
|
|
|
// this.getFunInfo()
|
|
|
- var index = this.selected.findIndex(item => {
|
|
|
+ var index = this.selecteds.findIndex(item => {
|
|
|
return item == val
|
|
|
})
|
|
|
if (index != -1) {
|
|
|
- var index4 = this.queryParams.selected.findIndex(item => {
|
|
|
+ var index4 = this.queryParams.selecteds.findIndex(item => {
|
|
|
return item == val
|
|
|
})
|
|
|
if (index4 != -1) {
|
|
@@ -708,12 +753,12 @@ export default {
|
|
|
this.$api.deleteCompareNo(a).then(response => {
|
|
|
if (response.code == 200) {
|
|
|
// this.getList()
|
|
|
- this.queryParams.selected.splice(index4, 1)
|
|
|
+ this.queryParams.selecteds.splice(index4, 1)
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
this.queryParams.notInPatentNos.push(val)
|
|
|
- this.selected.splice(index, 1)
|
|
|
+ this.selecteds.splice(index, 1)
|
|
|
}
|
|
|
} else {
|
|
|
this.queryParams.patentNos.push(val)
|
|
@@ -810,10 +855,10 @@ export default {
|
|
|
this.queryParams.startNumber = this.endNumber > 0 ? this.startNumber : 1
|
|
|
|
|
|
this.tableData = response.data.records
|
|
|
- // this.queryParams.selected = response.data.select
|
|
|
+ // this.queryParams.selecteds = response.data.select
|
|
|
// this.queryParams.selectedTotal = response.data.selectedTotal
|
|
|
- this.checkList = JSON.parse(JSON.stringify([...new Set(this.checkList.concat(this.queryParams.selected))]))
|
|
|
- this.selected = this.checkList
|
|
|
+ this.checkList = JSON.parse(JSON.stringify([...new Set(this.checkList.concat(this.queryParams.selecteds))]))
|
|
|
+ this.selecteds = this.checkList
|
|
|
this.isFetch = true
|
|
|
|
|
|
|