Просмотр исходного кода

优化(进入项目内部时展示项目名称以及导入导出历史添加跳转)

zhuliu 1 год назад
Родитель
Сommit
9e84eb401c

+ 43 - 1
src/views/components/import/task/components/index.vue

@@ -39,12 +39,13 @@
           <el-table-column label="操作" align="center" width="150">
             <template slot-scope="scope">
               <div class="operate">
+                <el-link type="primary" @click.native="toProject(scope.row)">跳转</el-link>
                 <!-- <el-link type="primary" @click.native="details(scope.row)">
                         <el-tooltip class="item" effect="dark" content="下载" placement="top">
                         <i class="el-icon-document"></i>
                         </el-tooltip>  
                     </el-link> -->
-                <el-link type="primary" @click.native="handleDownload(scope.row)"
+                <el-link class="margin-left_10" type="primary" @click.native="handleDownload(scope.row)"
                   v-if="(scope.row.fileGuid && (scope.row.state !== 0 || scope.row.state !== 1))">
                   <el-tooltip class="item" effect="dark" content="下载" placement="top">
                     <i class="iconfont icon-xiazai"></i>
@@ -358,6 +359,47 @@ export default {
     //下载附件
     handleDownload(row) {
       downLoad2(row.fileGuid)
+    },
+    toProject(row){
+      var projectType = row.importToType//0:专题库;1:报告;2:产品
+      var projectName = row.importToName
+      var projectId = row.importToId
+      var path = {
+        '0':'/project/patentCollection',
+        '1':'/reportDetails',
+        '2':'/commodity',
+      }
+      if(path[projectType]){
+        var params = {}
+        switch(Number(projectType)){
+          case 0:
+            params = {
+              id: projectId,
+              projectName:projectName,
+              projectType:1
+            }
+            break;
+          case 1:
+            params = {
+              projectId: projectId,
+              projectName:projectName,
+              projectType:2
+            }
+            break;
+          case 2:
+            params = {
+              productId:projectId,
+              productName:projectName,
+              projectType:3
+            }
+            break
+        }
+        let router = this.$router.resolve({
+          path: path[projectType],
+          query:params
+        })
+        window.open(router.href,'_blank')
+      }
     }
   },
 };

+ 24 - 6
src/views/layout/index.vue

@@ -7,8 +7,11 @@
             <div class="logo-bar" @click="handleClick">
               <img src="@/assets/logo-3.png" class="logo">
             </div>
-            <div v-if="showProjectName" class="projectName">
+            <!-- <div v-if="showProjectName" class="projectName">
               <p><span>专利数据库名称:</span>{{ projectName }}</p>
+            </div> -->
+            <div class="projectName">
+              <p>{{ projectName }}</p>
             </div>
           </div>
           <div class="header-right">
@@ -58,13 +61,11 @@ export default {
   },
   watch: {
     $route() {
+      this.getProjectName()
       this.button = this.$route.meta.button || []
-      this.showProjectName = this.$route.meta.showProjectName
       this.guide()
     },
-    showProjectName(val){
-      this.projectName = this.$s.getSession('projectName')
-    }
+
   },
   computed: {
     ...mapGetters(['projectId', 'userinfo','webSocket']),
@@ -74,8 +75,8 @@ export default {
     this.connectWebSocket(this.userinfo.id)
   },
   async mounted() {
+    this.getProjectName()
     this.$store.commit('SET_PREFIX', '/')
-    
     this.getRouter()
     if (this.id) {
       this.$store.commit('SET_PROJECT_ID', parseInt(this.id))
@@ -89,6 +90,23 @@ export default {
     
   },
   methods: {
+    getProjectName(){
+      var params =  this.$route.query
+      if(params.projectName && params.projectType){
+        var obj = {
+          1:'专题库',
+          2:'报告',
+          3:'产品',
+          // 4:'标注库'
+        }
+        if(obj[params.projectType]){
+          this.projectName = obj[params.projectType] + '名称:' + params.projectName
+        }
+      }else{
+        this.projectName = ''
+      }
+      
+    },
     guide(){
       if(this.$route.meta.sign == 'home'){
         this.openGuide(this.$route.meta.sign)

+ 4 - 0
src/views/product/components/commodity/commodity.vue

@@ -104,6 +104,9 @@ export default {
     productName: {
       default: '--'
     },
+    projectType:{
+      default:3
+    }
   },
   data() {
     return {
@@ -181,6 +184,7 @@ export default {
           query: {
             productId: this.productId,
             projectType:'3',//判断是不是从专题库进入专利详情1为专题库2为报告(报告未传2)
+            productName:this.productName
           }
         }
       )

+ 4 - 1
src/views/product/components/commodity/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 商品化专利 -->
   <div>
-    <commodity :productId="productId" :productName="productName"></commodity>
+    <commodity :productId="productId" :productName="productName" :projectType="projectType"></commodity>
   </div>
 </template>
 
@@ -23,6 +23,9 @@ export default {
     productName(){
       return this.$route.query.productName
     },
+    projectType(){
+      return this.$route.query.projectType
+    },
   },
   mounted() {
 

+ 2 - 0
src/views/project/components/mixins/index.js

@@ -25,6 +25,8 @@ export const workspaceOptions = {
           path: '/project/patentCollection',
           query: {
             id: row.id,
+            projectName:row.name,
+            projectType:1
           }
         })
         window.open(router.href, '_blank');

+ 4 - 0
src/views/project/patentCollection/index.vue

@@ -316,6 +316,9 @@ export default {
     projectId() {
       return this.$route.query.id
     },
+    projectName() {
+      return this.$route.query.projectName
+    },
   },
   created() { },
   async mounted() {
@@ -393,6 +396,7 @@ export default {
           query: {
             projectId: this.projectId,
             projectType:'1',//判断是不是从专题库进入专利详情1为专题库2为报告(报告未传2)
+            projectName:this.projectName
           }
         }
       )

+ 5 - 1
src/views/project/patentDetails/index.vue

@@ -54,6 +54,9 @@ export default {
     projectId() {
       return this.$route.query.projectId
     },
+    projectName(){
+      return this.$route.query.projectName
+    },
     taskId() {
       return this.$route.query.taskId
     },
@@ -256,7 +259,8 @@ export default {
             signPatentNo:this.signPatentNo,
             outside:this.outside,
             projectType:this.projectType,
-            productId:this.productId
+            productId:this.productId,
+            projectName:this.projectName
           }
         }
       )

+ 9 - 1
src/views/report/InvalidResponse/components/Evidence/evidence.vue

@@ -119,6 +119,12 @@ export default {
     projectId:{
         default:null
     },
+    projectName:{
+
+    },
+    projectType:{
+
+    },
     reportType:{
         default:0
     },
@@ -188,7 +194,9 @@ export default {
                 reportType: this.reportType,
                 evidenceType:row.type,
                 evidence:JSON.stringify(row),
-                signPatentNo:this.patentNo
+                signPatentNo:this.patentNo,
+                projectName: this.projectName,
+                projectType: this.projectType,
             }
             }
         )

+ 7 - 1
src/views/report/InvalidResponse/components/Evidence/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="height_100">
-    <evidence :projectId="projectId" :reportType="reportType" :patentNo="signPatentNo" :signPatentNo="signPatentNo"></evidence>
+    <evidence :projectId="projectId" :reportType="reportType" :projectType="projectType" :projectName="projectName" :patentNo="signPatentNo" :signPatentNo="signPatentNo"></evidence>
   </div>
 </template>
 
@@ -20,6 +20,12 @@ export default {
     projectId(){
         return this.$route.query.projectId
     },
+    projectName(){
+        return this.$route.query.projectName
+    },
+    projectType(){
+        return this.$route.query.projectType
+    },
     reportType(){
         return this.$route.query.reportType
     },

+ 2 - 2
src/views/report/components/details/components/splitDetails.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 标的专利特征拆分 -->
   <div style="height: calc(100% - 20px);">
-    <splitPage :loading="loading" :isEdit="this.reportType==5?false:true" :isResult="reportType==5?9:''" :tableData="tableData" :patentNo="patentNo" @splitSelect="splitSelect" @isSave="save">
+    <splitPage :loading="loading" :isEdit="this.reportType==5?false:true" :isResult="reportType==5?9:''" :isOnly="isOnly" :tableData="tableData" :patentNo="patentNo" @splitSelect="splitSelect" @isSave="save">
       <!-- <div slot="handleLeft">
         <span>标的专利:</span><el-link type="primary" @click="toPatentDetails(patentNo)">{{ patentNo }}</el-link>
       </div> -->
@@ -14,7 +14,7 @@
 import { patentDetails } from '../../mixins/index2'
 import splitPage from '../../splitPage/splitPage.vue';
 export default {
-  props: ['patentNo', 'projectId','reportType'],
+  props: ['patentNo', 'projectId','reportType','isOnly'],
   mixins: [patentDetails],
   components: {
     splitPage,

+ 11 - 5
src/views/report/components/details/index.vue

@@ -13,7 +13,7 @@
         </el-menu>
       </el-aside>
       <el-main>
-        <component :is='componentName' :projectId="projectId" :patentNo="patentNo" :reportType="reportType" :patentType="reportMessage.patentType" :ifSecondInvalid="reportMessage.ifSecondInvalid" @refreshData="getReportMessage"></component>
+        <component :is='componentName' :projectId="projectId" :projectType="projectType" :isOnly="activeMenu=='splitPatent'?true:false" :projectName="projectName" :patentNo="patentNo" :reportType="reportType" :patentType="reportMessage.patentType" :ifSecondInvalid="reportMessage.ifSecondInvalid" @refreshData="getReportMessage"></component>
       </el-main>
     </el-container>
 
@@ -57,14 +57,20 @@ export default {
     projectId() {
       return this.$route.query.projectId
     },
+    projectName() {
+      return this.$route.query.projectName
+    },
+    projectType() {
+      return this.$route.query.projectType
+    },
     patentNo() {
-      return this.$route.query.patentNo
+      return this.$route.query.patentNo || this.reportMessage.signPatentNo
     },
     reportType() {
-      return this.$route.query.reportType
+      return this.$route.query.reportType || this.reportMessage.reportType
     },
     status() {//报告状态3为完成
-      return this.$route.query.status
+      return this.$route.query.status || this.reportMessage.status
     },
   },
   created() { },
@@ -102,7 +108,7 @@ export default {
           label: '标的专利特征拆分',
           name: 'splitPatent',
           path: 'report/components/details/components/splitDetails.vue',
-          reportType: [1,2, 5]
+          reportType: [1,2]
         },
         //FTO和侵权
         {

+ 8 - 0
src/views/report/components/mixins/index.js

@@ -36,10 +36,18 @@ export default {
           signPatentNo:row.signPatentNo,
           reportType: row.reportType,
           status:row.status,
+          projectName:row.name,
+          projectType:2
         }
       })
 
     },
+    checkPatentDetails(row){
+      if(row.reportType == 3){
+        return false
+      }
+      this.$commonJS.checkPatentDetails(row.signPatentNo,row.id)
+    },
     //表格操作列事件
     handleCommand(option, row) {
       if (option == 'e') {//编辑

+ 8 - 0
src/views/report/components/patentList/components/index.vue

@@ -138,6 +138,12 @@ export default {
     projectId: {
       default: 0
     },
+    projectName:{
+
+    },
+    projectType:{
+
+    },
     taskType: {
       default: 0
     },
@@ -268,6 +274,8 @@ export default {
           path: '/patentDetails/' + row.patentNo,
           query: {
             projectId: this.projectId,
+            projectName: this.projectName,
+            projectType: this.projectType,
             taskId: this.taskId,
             isResult: this.isResult,
             taskType: this.taskType,

+ 6 - 0
src/views/report/components/patentList/index.vue

@@ -20,6 +20,12 @@ export default {
     projectId() {
       return this.$route.query.projectId || 0
     },
+    projectName() {
+      return this.$route.query.projectId || 0
+    },
+    projectType() {
+      return this.$route.query.projectId || 0
+    },
     taskId() {
       return this.$route.query.taskId
     },

+ 10 - 0
src/views/report/components/splitPage/splitPage.vue

@@ -140,6 +140,7 @@ export default {
     // 信息(patentNo,reportId)
     patentNo: '',
     projectId: '',
+    isOnly:false,
     // 数据源
     tableData: {
       type: Array,
@@ -432,6 +433,11 @@ export default {
       }else{
         this.enableListening = true
       }
+      var index2 = this.tableData2.findIndex(item => { return scope.row.featureId == item.featureId })
+      if(index2!=-1){
+        this.tableData2[index2].content = val
+        this.tableData2[index2].ifChange = true
+      }
     },
     // 特征等合并
     merge() {
@@ -531,6 +537,10 @@ export default {
           var splitAdd = JSON.parse(JSON.stringify(rowItem))
           // splitAdd.featureId = rowItem.featureId + rowId + "a"
           splitAdd.featureId = Number(rowId) + 10
+          if(this.isOnly){
+            splitAdd.id = Number(rowId) + 10
+          }
+          
           // 将部分展示字段置为空
           for (let i = 0; i < arr.length; i++) {
             splitAdd[arr[i]] = ''

+ 1 - 1
src/views/report/components/view/table.vue

@@ -19,7 +19,7 @@
               </el-link>
             </div>
             <div v-else-if="['signPatentNo'].includes(item.value)">
-              <el-link type="primary" @click="$commonJS.checkPatentDetails(scope.row.signPatentNo,scope.row.id)">
+              <el-link type="primary" @click="checkPatentDetails(scope.row)">
                 <span  v-html="$commonJS.getColumnData(scope.row,item)"></span>
               </el-link>
             </div>