Parcourir la source

修复产品相关专利不能跳转专利详情bug

zhuhao il y a 2 ans
Parent
commit
b436becbf5

+ 11 - 3
RMS-FrontEnd/src/views/components/articles/ContrastIndex.vue

@@ -60,7 +60,7 @@
           <div class="patent-articles-content-left1" :style="{ width: showRight ? 'calc(100% - 321px)' : 'calc(100% - 21px)' }">
             <div class="dom1 box1" v-dragControllerDiv1 style="display:flex;width:100%">
               <div class="component left1" style="width:100%;overflow-y:auto;overflow-x: hidden;padding-bottom:10px" :style="{height:height}">
-                <component :is="componentName" :type1='type' :isTrue="isTrue" @openContrast='openContrast' :project-id="projectId" :patent="patent" :patent-id="patentId" :signPatentNo="signPatentNo" :patentNo="this.activeMenu == 'patentWorth'?[patentNo]:patentNo" :publicNo="publicNo" :domId="patentNo + '2'" :reportId="reportId" @refresh="getPatent(patent.patentNo)"></component>
+                <component :is="componentName" :type1='type' :isTrue="isTrue" @openContrast='openContrast' :project-id="projectId" :patent="patent" :patent-id="patentId" :signPatentNo="signPatentNo" :patentNo="this.activeMenu == 'patentWorth'?[patentNo?patentNo:productPublicNo]:patentNo" :publicNo="publicNo" :domId="patentNo + '2'" :reportId="reportId" @refresh="getPatent(patent.patentNo)"></component>
               </div>
               <div class="resize2" title="收缩侧边栏" v-show="(radio == 2 || radio == 3) && activeMenu != activeMenu2"><p><span>˙</span><span>˙</span><span>˙</span></p></div>
               <div class="resize1" title="收缩侧边栏" v-show="(radio == 4 || radio == 5) && activeMenu != activeMenu2"><span>⋮</span></div>
@@ -175,6 +175,7 @@ export default {
       activeOption: 'PatentField',
       loading: false,
       patentNo:"",
+      productPublicNo:"",
       menuList: [
         {
           value: 'PatentBasic',
@@ -251,6 +252,8 @@ export default {
   },
   created() {
     this.patentNo = this.$route.query.patentNo
+    // productPublicNo接收产品相关专利的专利号
+    this.productPublicNo = this.$route.query.publicNo
     // console.log(this.patentMessage)
     // this.onChange(this.patentMessage)
   },
@@ -260,6 +263,10 @@ export default {
       // console.log(val);
       this.getPatent(val)
     },
+    // 监听从产品相关专利传的专利号
+    productPublicNo(val) {
+      this.getPatent(val)
+    },
     patentMessage(val, oldval) {
       if (val) {
         this.patentId = val
@@ -300,8 +307,9 @@ export default {
     }
   },
   mounted() {
-    if(this.publicNo){
-      this.getPatent(this.publicNo)
+    if(this.publicNo || this.productPublicNo){
+      let publicNo=this.publicNo?this.publicNo:this.productPublicNo
+      this.getPatent(publicNo)
     }
     // if(this.signPatentNo){
     //   console.log(this.signPatentNo)

+ 4 - 2
RMS-FrontEnd/src/views/components/common/SplitScreen.js

@@ -127,8 +127,10 @@ export const splitScreen1 = {
           },
     },
     mounted() {
-        this.$nextTick(()=>{
-            this.$set(this,'height',document.getElementsByClassName('patent-articles-content-left')[0].offsetHeight+20  + 'px')
+      this.$nextTick(() => {
+          if (!this.productPublicNo) {
+             this.$set(this,'height',document.getElementsByClassName('patent-articles-content-left')[0].offsetHeight+20  + 'px')
+          }
             if(this.height == '20px'){
                 this.$set(this,'height',document.getElementsByClassName('patent-articles-content-left1')[0].offsetHeight+20  + 'px')
                 this.height2 = this.height

+ 3 - 0
RMS-FrontEnd/src/views/product/components/relatedPatents/components/table.vue

@@ -267,6 +267,9 @@ export default {
       this.$api.getPatentById(val.id, { projectId: null }).then(response => {
         var router = this.$router.resolve({
           path: '/articlesContrastIndex/' + val.id,
+          query: {
+            publicNo:val.patentNo
+          },
         })
         window.open(router.href, '_blank');
       })