|
@@ -2,7 +2,7 @@
|
|
|
<div class="patent-articles-patent-right height_100" @mouseup="mouseup">
|
|
|
<el-container>
|
|
|
<el-header class="basic_header">
|
|
|
- <el-tabs v-model="name" @tab-click="handleClick" style="width:100%">
|
|
|
+ <el-tabs v-model="name" @tab-click="handleClick" style="width:100%;">
|
|
|
<el-tab-pane v-for="item in tabs" :key="item.label" :label="item.label" :name="item.name">
|
|
|
<span slot="label">
|
|
|
<span>{{ item.label }}</span>
|
|
@@ -12,9 +12,24 @@
|
|
|
</span>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
+ <div v-if="!outside">
|
|
|
+ <el-checkbox v-model="checkedRightTree" @change="changeShowRightTree">权要树</el-checkbox>
|
|
|
+ </div>
|
|
|
</el-header>
|
|
|
- <el-main ref="content">
|
|
|
- <div class="height_100" v-loading="loading" v-if="name != 2" v-html="getViewDom(patent.claim, '权利要求'+tabItem.label, 'column')" :style="setStyle()" :data-type="'权利要求'+tabItem.label"></div>
|
|
|
+ <el-main style="overflow: auto;" ref="content">
|
|
|
+ <div class="height_100" v-loading="loading" v-if="!checkedRightTree" :style="setStyle()" >
|
|
|
+ <template v-if="name != 2">
|
|
|
+ <div class="height_100" v-html="getContentOrContentOut(this.patent.claimTranslate, tabItem.field)" :data-type="name == 2?'权利要求原文':'权利要求'+tabItem.label" ></div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="height_100 claim">
|
|
|
+ <div v-equal_heights="'yiwen'" class="height_100" v-html="getContentOrContentOut(this.patent.claimTranslate, tabItem.field)" :data-type="name == 2?'权利要求原文':'权利要求'+tabItem.label" ref="yuanwen"></div>
|
|
|
+ <div class="height_100" v-html="getContentOrContentOut(this.patent.claimTranslate, 'contentOut')" :data-type="'权利要求译文'" ref="yiwen"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </div>
|
|
|
|
|
|
<div v-else class="height_100">
|
|
|
<my-view>
|
|
@@ -22,7 +37,15 @@
|
|
|
<myTree :list="patent.patentRightTree" style="height: 100%" :props="{
|
|
|
name:'content',
|
|
|
children:'children'
|
|
|
- }" nodeKey="sort" :expends="expends"></myTree>
|
|
|
+ }" nodeKey="sort" :expends="expends">
|
|
|
+ <template v-slot:default="data">
|
|
|
+ <div v-if="tabItem.name == 0 || tabItem.name == 2">{{ data.data.content }}</div>
|
|
|
+ <div v-if="tabItem.name == 1">{{ data.data.translateContent }}</div>
|
|
|
+ <div v-if="tabItem.name == 2" style="background:#f3f4f8;user-select:none;">
|
|
|
+ {{ data.data.translateContent }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </myTree>
|
|
|
</div>
|
|
|
<div slot="right" style="position: relative;">
|
|
|
<div id="charts" style="max-width: 100%; min-width: 300px;position:relative;padding-top: 10px;" v-if="show">
|
|
@@ -41,9 +64,10 @@
|
|
|
|
|
|
<script>
|
|
|
import { patentDetails } from './mixins';
|
|
|
+import {translate} from './mixins/translate'
|
|
|
import html2canvas from "html2canvas"
|
|
|
export default {
|
|
|
- mixins: [patentDetails],
|
|
|
+ mixins: [patentDetails,translate],
|
|
|
data() {
|
|
|
return {
|
|
|
expends: [],
|
|
@@ -51,33 +75,10 @@ export default {
|
|
|
isClickId: "",
|
|
|
height: null,
|
|
|
fullHeight: document.documentElement.clientHeight,
|
|
|
- records: {
|
|
|
- original: [],
|
|
|
- translation: [],
|
|
|
- },
|
|
|
scrollTop:0,
|
|
|
isClick:false,
|
|
|
- tabs:[
|
|
|
- {
|
|
|
- label:'原文',
|
|
|
- name:'0',
|
|
|
- field:'content'
|
|
|
- },
|
|
|
- {
|
|
|
- label:'译文',
|
|
|
- name:'1',
|
|
|
- field:'contentOut'
|
|
|
- },
|
|
|
- {
|
|
|
- label:'权要树',
|
|
|
- name:'2',
|
|
|
- field:'contentOut'
|
|
|
- },
|
|
|
- ],
|
|
|
- tabItem:{
|
|
|
- label:'原文',
|
|
|
- name:'0',
|
|
|
- },
|
|
|
+ checkedRightTree:false,
|
|
|
+ patentField:3
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -87,7 +88,7 @@ export default {
|
|
|
patentNo() {
|
|
|
this.showTabs()
|
|
|
this.initData();
|
|
|
- if(this.name == 2){
|
|
|
+ if(this.checkedRightTree){
|
|
|
this.show = false
|
|
|
this.expends = []
|
|
|
this.isClickId = ''
|
|
@@ -98,7 +99,7 @@ export default {
|
|
|
this.scrollToTop()
|
|
|
},
|
|
|
name(){
|
|
|
- if(this.name!=2){
|
|
|
+ if(!this.checkedRightTree){
|
|
|
this.show = false
|
|
|
}
|
|
|
},
|
|
@@ -107,7 +108,6 @@ export default {
|
|
|
window.addEventListener("resize", this.handleResize);
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.showTabs()
|
|
|
this.handleResize();
|
|
|
this.initData();
|
|
|
},
|
|
@@ -122,50 +122,13 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- showTabs(){
|
|
|
- if(!this.haveTranslatedText(this.patent,'claim') || this.outside){
|
|
|
- this.tabs = [
|
|
|
- {
|
|
|
- label:'原文',
|
|
|
- name:'0',
|
|
|
- field:'content',
|
|
|
- icon:'el-icon-refresh',
|
|
|
- value:'3'
|
|
|
- },
|
|
|
- {
|
|
|
- label:'权要树',
|
|
|
- name:'2',
|
|
|
- field:'contentOut'
|
|
|
- },
|
|
|
- ]
|
|
|
- }else{
|
|
|
- this.tabs = [
|
|
|
- {
|
|
|
- label:'原文',
|
|
|
- name:'0',
|
|
|
- field:'content',
|
|
|
- icon:'el-icon-refresh',
|
|
|
- value:'3'
|
|
|
- },
|
|
|
- {
|
|
|
- label:'译文',
|
|
|
- name:'1',
|
|
|
- field:'contentOut'
|
|
|
- },
|
|
|
- {
|
|
|
- label:'权要树',
|
|
|
- name:'2',
|
|
|
- field:'contentOut'
|
|
|
- },
|
|
|
- ]
|
|
|
- }
|
|
|
- },
|
|
|
- handleClick(tab, event) {
|
|
|
- this.tabItem = this.tabs.find(item=>{
|
|
|
- return item.name == this.name
|
|
|
- })
|
|
|
+ changeShowRightTree(){
|
|
|
this.show = true
|
|
|
- if (this.name == 2 && !this.patent.patentRightTree) {
|
|
|
+ if(!this.checkedRightTree){
|
|
|
+ this.handleClick()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.checkedRightTree && !this.patent.patentRightTree) {
|
|
|
let params = {
|
|
|
patentNo: this.patent.patentNo,
|
|
|
appNo: this.patent.rowApplicationNo,
|
|
@@ -181,7 +144,7 @@ export default {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
- } else if(this.name == 2 && this.patent.patentRightTree) {
|
|
|
+ } else if(this.checkedRightTree && this.patent.patentRightTree) {
|
|
|
this.$nextTick(()=>{
|
|
|
this.getEchart();
|
|
|
})
|
|
@@ -383,7 +346,13 @@ export default {
|
|
|
}, 66);
|
|
|
return true;
|
|
|
},
|
|
|
- initData() {
|
|
|
+ initData(sign=false) {
|
|
|
+ if(sign){
|
|
|
+ this.patent.claimTranslate = null
|
|
|
+ }
|
|
|
+ if(this.patent.claimTranslate){
|
|
|
+ return false
|
|
|
+ }
|
|
|
if (this.outside) {
|
|
|
var params = {
|
|
|
// patentCell: 1,
|
|
@@ -395,14 +364,46 @@ export default {
|
|
|
this.loading = true
|
|
|
this.$api.queryExternalClaim(params).then((response) => {
|
|
|
if (response.code == 200) {
|
|
|
- this.$set(this.patent, "claim", response.data.claimContent);
|
|
|
+ var data = []
|
|
|
+ response.data.claimContent.forEach(item=>{
|
|
|
+ var obj = {
|
|
|
+ originalContent:item.text_content.replace(/(\r\n)+/g,'<br/>').replace(/(\t)+/g,'<br/>')
|
|
|
+ }
|
|
|
+ data.push(obj)
|
|
|
+ })
|
|
|
+ this.$set(this.patent, "claimTranslate", {
|
|
|
+ data:data
|
|
|
+ });
|
|
|
+ // this.$set(this.patent, "claim", response.data.claimContent);
|
|
|
this.loading = false
|
|
|
}
|
|
|
}).catch(error=>{
|
|
|
this.loading = false
|
|
|
})
|
|
|
+ }else{
|
|
|
+ if(!this.patent.claimTranslate){
|
|
|
+ var params = {
|
|
|
+ patentNo:this.patent.patentNo,
|
|
|
+ patentField:this.patentField
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ this.$api.getTranslate(params).then(res=>{
|
|
|
+ if(res.code == 200){
|
|
|
+ this.loading = false
|
|
|
+ this.getDataSign = true
|
|
|
+ var data = res.data
|
|
|
+ this.$set(this.patent, "claimTranslate", {
|
|
|
+ data :data
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
handleResize(event) {
|
|
|
this.fullHeight = document.documentElement.clientHeight;
|
|
|
this.height = this.fullHeight - 350;
|
|
@@ -427,8 +428,21 @@ export default {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
}
|
|
|
+.highlightText{
|
|
|
+ background: #c7ebaa !important;
|
|
|
+}
|
|
|
</style>
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
+.claim{
|
|
|
+ display: flex;
|
|
|
+ &>div{
|
|
|
+ width: 100%;
|
|
|
+ // overflow: auto;
|
|
|
+ padding: 0 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
</style>
|