Browse Source

优化侵权和FTO

zhuliu 1 year ago
parent
commit
ed35a3a6f9

+ 7 - 0
src/assets/css/main.scss

@@ -140,4 +140,11 @@
   .el-tabs__header{
     margin: 0;
   }
+}
+
+.disabled{
+  cursor:not-allowed !important;
+}
+.pointerEvents{
+  pointer-events: none;
 }

BIN
src/assets/img/disabled.jpg


+ 12 - 5
src/utils/direct/index.js

@@ -36,16 +36,23 @@ const SelectLazyLoading={
 //块禁止样式
 const disabled = (el,binding)=>{
     if(binding.value){
-        el.style.pointerEvents = 'none';
+        // el.style.pointerEvents = 'none';
+        // el.style.cursor='not-allowed';
+        el.classList.add('pointerEvents')
         if(el.parentNode){
-            el.parentNode.style.cursor='not-allowed';
+            // el.parentNode.style.cursor='not-allowed';
+            // el.parentNode.style.pointerEvents='none';
+            el.parentNode.classList.add('disabled')
         }
-        
         el.style.color='#bbb'
     }else{
-        el.style.pointerEvents = '';
+        // el.style.pointerEvents = '';
+        // el.style.cursor='';
+        el.classList.remove('pointerEvents')
         if(el.parentNode){
-            el.parentNode.style.cursor='';
+            el.parentNode.classList.remove('disabled')
+            // el.parentNode.style.cursor='';
+            // el.parentNode.style.pointerEvents='';
         }
         el.style.color=''
     }

+ 34 - 9
src/views/components/identificationCode/index.vue

@@ -85,20 +85,45 @@ export default {
         })
         window.open(router.href, '_blank')
       } else {//侵权
-        let router = this.$router.resolve({
-          path: '/tortIndex',
-          query: {
-            taskId: row.id,
-            projectId: row.projectId,
-            isResult: 1,
-            reportType: row.reportType,
-            handlerType:row.handlerType,//1是外部协同人
+        var patentNo = this.getPatent(row.projectId,row.id)
+        var router = this.$router.push(
+          {
+            path: '/patentDetails/' + patentNo,
+            query: {
+              projectId: row.projectId,
+              taskId: row.id,
+              isResult:1,
+              taskType:row.type,
+              reportType: row.reportType,
+              handlerType:row.handlerType,
+            }
           }
-        })
+        )
         window.open(router.href, '_blank')
       }
 
     },
+
+       // 请求专利(侵权分析协同用到)
+    async getPatent(projectId,taskId) {
+      let params = {
+        current: 1,//分页信息
+        size:10,
+        projectId: projectId,
+        taskId: taskId,
+        searchQuery: '',//检索条件
+        customFields: [],
+        orderDTOList: [],//排序信息
+      }
+      var patentNo = ''
+      await this.$api.QueryPatent(params).then(res => {
+        if (res.code == 200) {
+          patentNo = res.data.data[0].patentNo
+        }
+      }).catch(error => {
+      })
+      return patentNo
+    },
   }
 }
 </script>

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

@@ -94,10 +94,49 @@ export const handleData = {
           case "title":
             prop = !change ? "content" : "contentOut"
             obj.type = 'Object'
+            // var arr = row.title
+            // if(!change){
+            //   var obj = arr.filter(item=>{
+            //     return item.if_origin
+            //   })
+            //   var text = ''
+            //   if(obj){
+            //     text = obj.text_content
+            //   }
+            // }else{
+            //   var obj = arr.filter(item=>{
+            //     return !item.if_origin && item.language == 'CN'
+            //   })
+            //   var text = ''
+            //   if(obj){
+            //     text = obj.text_content
+            //   }
+            // }
             break
           case "abstractStr":
             prop = !change2 ? "content" : "contentOut"
             obj.type = 'Object'
+            // var arr = row.abstractStr
+            // if(!change){
+            //   var obj = arr.filter(item=>{
+            //     return item.if_origin
+            //   })
+            //   var text = ''
+            //   if(obj){
+            //     text = obj.text_content
+            //   }
+            // }else{
+            //   var obj = arr.filter(item=>{
+            //     return !item.if_origin && item.language == 'CN'
+            //   })
+            //   var text = ''
+            //   if(obj){
+            //     text = obj.text_content
+            //   }
+            // }
+            break
+          default:
+            // var text = this.$commonJS.getColumnData(row, obj,prop,data)
             break
         }
       var text = this.$commonJS.getColumnData(row, obj,prop,data)

+ 2 - 2
src/views/project/patentCollection/index.vue

@@ -31,7 +31,7 @@
             </el-button-group>
             <el-dropdown trigger="click" split-button type="primary" size="small">
               <span @click="handleField"
-                v-disabled="!($permission('/workspace/common/customField') && $r(projectId, [1, 2]))">自定义栏位管理</span>
+                v-disabled="false">自定义栏位管理</span>
               <el-dropdown-menu slot="dropdown" class="text-align_center">
                 <el-dropdown-item @click.native="handleFile">报告文档</el-dropdown-item>
                 <el-dropdown-item @click.native="handleQuestion" v-if="$permission('/workspace/event')">事
@@ -268,7 +268,7 @@ export default {
     handleClick(row,location) {
       var search = {
         searchOption:this.searchOption,
-        location:location
+        location:location,
       }
       this.$s.setSession('search',search)
       this.$router.push(

+ 76 - 36
src/views/project/patentDetails/components/PatentField.vue

@@ -12,8 +12,8 @@
                 <i class="el-icon-more el-icon--right"></i>
               </span>
               <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item @click.native="handleOption(0, item)">上移</el-dropdown-item>
-                <el-dropdown-item @click.native="handleOption(1, item)">下移</el-dropdown-item>
+                <el-dropdown-item @click.native="handleOption(0, index)">上移</el-dropdown-item>
+                <el-dropdown-item @click.native="handleOption(1, index)">下移</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
           </div>
@@ -29,7 +29,7 @@
                 <div v-for="fieldValue in item.selected" :key="fieldValue.value" class="value">{{ fieldValue.value }}
                 </div>
               </div>
-              <el-button size="small" @click="$set(item, 'show', !item.show)">{{ item.show ? '收起' : '修改' }}</el-button>
+              <el-button size="small" @click="changeShow(item)">{{ item.show ? '收起' : '修改' }}</el-button>
             </div>
             <el-radio-group v-model="item.selectedValue" v-show="item.show">
               <div v-for="option in item.option" :key="option.id">
@@ -45,7 +45,7 @@
                 <div v-for="fieldValue in item.selected" :key="fieldValue.valueId" class="value">{{ fieldValue.value }}
                 </div>
               </div>
-              <el-button size="small" @click="$set(item, 'show', !item.show)">{{ item.show ? '收起' : '修改' }}</el-button>
+              <el-button size="small" @click="changeShow(item)">{{ item.show ? '收起' : '修改' }}</el-button>
             </div>
             <el-checkbox-group :value="item.selectedValue" v-show="item.show">
               <el-checkbox class="custom-checkbox" v-for="option in item.option" :label="option.id" :key="option.id"
@@ -58,12 +58,16 @@
                 <div v-for="fieldValue in item.selected" :key="fieldValue.valueId" class="value">{{ fieldValue.value }}
                 </div>
               </div>
-              <el-button size="small" @click="$set(item, 'show', !item.show)">{{ item.show ? '收起' : '修改' }}</el-button>
+              <el-button size="small" @click="changeShow(item)">{{ item.show ? '收起' : '修改' }}</el-button>
             </div>
             <div v-show="item.show">
-              <el-tree @check-change="(data, checked) => onChange(data, item, checked)" :items="item" :ref="item.id"
-                :data="item.option" check-strictly :default-checked-keys="item.selectedValue" show-checkbox node-key="id"
-                default-expand-all :props="defaultProps"></el-tree>
+              <el-tree :data="item.option"  node-key="id"  default-expand-all :props="defaultProps">
+                  <span class="custom-tree-node" slot-scope="{ node, data }">
+                    <el-checkbox-group :value="item.selectedValue" >
+                      <el-checkbox :label="data.id" @change="(val) => onChange(data, item, val)">{{ data.name }}</el-checkbox>
+                    </el-checkbox-group>
+                  </span>
+                </el-tree>
             </div>
 
           </template>
@@ -110,34 +114,56 @@ export default {
     //   this.getCustomOption(item)
     // },
     //上移下移
-    handleOption(type, row) {
-      if (row.sysOrder == 0) {
-        this.$message.error('已是最顶层')
+    handleOption(type, index) {
+      if(index == 0){
+        this.$message.warning('已是最顶层')
         return false
       }
-      if (row.sysOrder == this.customField.length - 1) {
-        this.$message.error('已是最后一层')
+      if(index == this.customField.length - 1){
+        this.$message.warning('已是最后一层')
         return false
       }
-      if (type == 0) {//上移
-        this.customField.forEach(item => {
-          if (item.sysOrder == row.sysOrder - 1) {
-            item.sysOrder += 1
-          }
-          if (item.id == row.id) {
-            item.sysOrder -= 1
-          }
-        })
-      } else {
-        this.customField.forEach(item => {
-          if (item.sysOrder == row.sysOrder + 1) {
-            item.sysOrder -= 1
-          }
-          if (item.id == row.id) {
-            item.sysOrder += 1
-          }
-        })
+      if(type == 0){
+        var current = index - 1
+        var next = index 
+      }else{
+        var current = index
+        var next = index + 1
       }
+      var order = this.customField[current].sysOrder
+      this.customField[current].sysOrder = this.customField[next].sysOrder
+      this.customField[next].sysOrder = order
+      this.customField.splice(this.customField[current],0,this.customField[next])
+
+      // if (row.sysOrder == 0) {
+      //   this.$message.warning('已是最顶层')
+      //   return false
+      // }
+      // if (row.sysOrder == this.customField.length - 1) {
+      //   this.$message.warning('已是最后一层')
+      //   return false
+      // }
+      // if (type == 0) {//上移
+        
+      //   this.customField.forEach(item => {
+      //     if (item.sysOrder == row.sysOrder - 1) {
+      //       item.sysOrder += 1
+      //     }
+      //     if (item.id == row.id) {
+      //       item.sysOrder -= 1
+      //     }
+      //   })
+      // } else {
+      //   this.customField.forEach(item => {
+      //     if (item.sysOrder == row.sysOrder + 1) {
+      //       item.sysOrder -= 1
+      //     }
+      //     if (item.id == row.id) {
+      //       item.sysOrder += 1
+      //     }
+      //   })
+      // }
+
       let params = {
         taskId: this.taskId,
         projectId: this.projectId,
@@ -147,7 +173,7 @@ export default {
       this.$api.addAllPatentCustomFieldOrder(params).then(res => {
         if (res.code == 200) {
           this.$message('移动成功')
-          this.getCustomField()
+          // this.getCustomField()
         }
       })
     },
@@ -335,7 +361,18 @@ export default {
     getOptionsAndSelected() {
       this.customField.forEach(item => {
         this.getSelected(item)
-        switch (item.type) {
+      });
+    },
+    //切换是否修改
+    changeShow(item){
+      this.$set(item, 'show', !item.show)
+      if(item.option && item.option.length>0){
+        return ;
+      }
+      this.getOption(item)
+    },
+    getOption(item){
+      switch (item.type) {
           case 4:
           case 5:
           case 6:
@@ -347,8 +384,9 @@ export default {
           case 8:
             this.queryProductCategory(item, 8)
             break;
+          case 9:
+            break;
         }
-      });
     },
     //获取已选中选项值、已添加的值
     getSelected(item) {
@@ -373,8 +411,10 @@ export default {
               break;
             case 6://多选和树
             case 5:
-              item.selectedValue = []
-              item.selectedValue = (item.selected && item.selected.length > 0) ? item.selected.map(item => item.valueId) : []
+              var a = []
+              // item.selectedValue = []
+              a = (item.selected && item.selected.length > 0) ? item.selected.map(item => item.valueId) : []
+              this.$set(item,'selectedValue',a)
               break;
 
             default:

+ 20 - 6
src/views/project/patentDetails/components/PatentLeft.vue

@@ -1,16 +1,19 @@
 <template>
-  <div class="PatentLeft" style="">
+  <div class="PatentLeft  height_100" style="">
 
     <div
       style="display: flex;justify-content: space-evenly;height: 50px;line-height: 50px;border-bottom: 1px solid #ccc;">
       <div>总专利数量:{{ total }}</div>
     </div>
-    <div class="left-patentNo"  v-for="(item,index) in patentList" :key="item.patentNo" :style="{background:(item.patentNo == patentNo)? '#cdd7eb':''}" @click="$emit('getPatentLeft',item.patentNo,index)">
-      <div>{{ item.patentNo }}</div>
-      <my-tooltip :content="item.title.content" placement="bottom-start">
-        <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ item.title.content }}</div>
-      </my-tooltip>
+    <div class="list">
+      <div class="left-patentNo"  v-for="(item,index) in patentList" :key="item.patentNo" :style="{background:(item.patentNo == patentNo)? '#cdd7eb':''}" @click="$emit('getPatentLeft',item.patentNo,index)">
+        <div>{{ item.patentNo }}</div>
+        <my-tooltip :content="item.title.content" placement="bottom-start">
+          <div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{ item.title.content }}</div>
+        </my-tooltip>
+      </div>
     </div>
+    
 
   </div>
 </template>
@@ -48,6 +51,17 @@ export default {
 
 <style lang="scss" scoped>
 .PatentLeft {
+  .list{
+    height: calc(100% - 50px);
+    overflow-y: auto;
+  }
+  .list:empty::before{
+    content:'无对比专利';
+    color: #958b8b8c;
+    font-size: 20px;
+    display: flex;
+    justify-content: center;
+  }
   .left-patentNo {
     border-bottom: 1px solid #ccc;
     overflow: hidden;

+ 33 - 27
src/views/project/patentDetails/components/menu.vue

@@ -8,11 +8,11 @@
             <el-popover ref="heightPopover" placement="bottom" title="高亮" width="320" trigger="click">
               <patent-keywords-highlight :project-id="projectId" />
             </el-popover>
-            <el-tooltip content="返回专题库专利清单" placement="top">
-              <el-button size="small" @click="goBack()"><i class="iconfont icon-fanhui"></i></el-button>
+            <el-tooltip content="返回" placement="top">
+              <el-button size="small" @click="other('goBack')"><i class="iconfont icon-fanhui"></i></el-button>
             </el-tooltip>
             <el-tooltip :content="isRight ? '设置菜单栏为左侧' : '设置菜单栏为右侧'" placement="top">
-              <el-button size="small" class="articles-Loop" @click="setting">
+              <el-button size="small" class="articles-Loop" @click="other('setting')">
                 <i class="iconfont icon-shezhi2"></i>
               </el-button>
             </el-tooltip>
@@ -20,7 +20,7 @@
               <el-button v-popover:heightPopover size="small"><i class="iconfont icon-wodegaoliang"></i></el-button>
             </el-tooltip>
             <el-tooltip content="对比" placement="top">
-              <el-button size="small" @click="contrast()">
+              <el-button size="small" @click="other('contrast')">
                 <i v-if="!value" class="iconfont icon-duibi"></i>
                 <i v-else class="iconfont icon-duibi1"></i>
               </el-button>
@@ -38,7 +38,7 @@
             </el-tooltip>
           </el-header>
           <el-main style="background: #FFFFFF;">
-            <PatentLeft :patentList="patentList" :patentNo="patentNo" :total="total" @getPatentLeft="getPatentLeft" v-on="$listeners"></PatentLeft>
+            <PatentLeft :patentList="patentList" :patentNo="patentNo" :total="total" @getPatentLeft="getPatentLeft"></PatentLeft>
           </el-main>
           <el-footer style="text-align: center;">
             <el-pagination background layout=" prev, pager, next" :current-page.sync="queryParams.current"
@@ -49,13 +49,13 @@
       </div>
       <!-- 收缩后 -->
       <div v-else class="articles-Loop-div">
-        <el-tooltip content="返回专题库专利清单" placement="right">
+        <el-tooltip content="返回" placement="right">
           <div class="articles-Loop">
-            <i class="iconfont icon-fanhui" @click="goBack()"></i>
+            <i class="iconfont icon-fanhui" @click="other('goBack')"></i>
           </div>
         </el-tooltip>
         <el-tooltip :content="isRight ? '设置菜单栏为左侧' : '设置菜单栏为右侧'" placement="right-end">
-          <div class="articles-Loop" @click="setting">
+          <div class="articles-Loop" @click="other('setting')">
             <i class="iconfont icon-shezhi2"></i>
           </div>
         </el-tooltip>
@@ -80,19 +80,22 @@
           </el-popover>
         </el-tooltip>
         <el-tooltip content="对比" placement="right-end">
-          <div class="articles-Loop" @click="contrast()" :style="{ background: value ? '#9cb2e5' : 'white' }">
+          <div class="articles-Loop" @click="other('contrast')" :style="{ background: value ? '#9cb2e5' : 'white' }">
             <i v-if="!value" class="iconfont icon-duibi"></i>
             <i v-else class="iconfont icon-duibi1"></i>
           </div>
         </el-tooltip>
-        <el-tooltip placement="right-end">
+        <template v-if="patentList.length>1">
+          <el-tooltip placement="right-end">
           <template slot="content">
             <div>点击查看上一篇专利</div>
             <div>专利:{{index!=0? patentList[index-1].patentNo:''}}</div>
             <div>数量:{{currentLocation - 1}}</div>
           </template>
-          <div class="articles-Loop" @click="prev">
-            <i class="el-icon-arrow-up" v-disabled="currentLocation - 1 == 0 || loading"></i>
+          <div class="articles-Loop">
+            <div  @click="prev" v-disabled="currentLocation - 1 == 0 || loading">
+              <i class="el-icon-arrow-up" ></i>
+            </div>
           </div>
         </el-tooltip>
         <el-tooltip placement="right-end">
@@ -101,10 +104,14 @@
             <div>专利:{{(total - currentLocation!=0 && total!=0)? patentList[index+1].patentNo:''}}</div>
             <div>数量:{{total - currentLocation}}</div>
           </template>
-          <div class="articles-Loop" @click="next">
-            <i class="el-icon-arrow-down" v-disabled="total - currentLocation == 0 || loading"></i>
+          <div class="articles-Loop" >
+            <div  @click="next" v-disabled="total - currentLocation == 0 || loading">
+              <i class="el-icon-arrow-down"></i>
+            </div>
           </div>
         </el-tooltip>
+        </template>
+        
       </div>
   </div>
 </template>
@@ -124,13 +131,16 @@ export default {
     projectId:{
       default:0
     },
+    taskId:{
+      default:null
+    },
     searchOption:{
       default:()=>{
         return {}
       }
     },
     location:{
-      default:0
+      default:1
     },
     patentNo:{
       default:''
@@ -142,7 +152,7 @@ export default {
     //对比
     value:{
       default:false
-    }
+    },
   },
   data() {
     return {
@@ -197,6 +207,7 @@ export default {
       let params = {
         ...this.queryParams,//分页信息
         projectId: this.projectId,
+        taskId:this.taskId,
         searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
         // orderDTOList: this.sort,//排序信息
       }
@@ -205,7 +216,12 @@ export default {
         if (res.code == 200) {
           this.patentList = res.data.data
           this.total = res.data.total
-          this.index = (this.currentLocation-1) < current?this.currentLocation - 1:current-1
+          var index = this.patentList.findIndex(item=>{
+            return item.patentNo == this.patentNo
+          })
+          if(index!=-1){
+            this.index = index
+          }
           this.loading = false
         }
       }).catch(error => {
@@ -219,15 +235,6 @@ export default {
         this.queryParams.current = val
         this.getPatentList()
     },
-    goBack(){
-      this.$emit('event','goBack')
-    },
-    contrast(){
-      this.$emit('event','contrast')
-    },
-    setting(){
-      this.$emit('event','setting')
-    },
     other(event){
       this.$emit('event',event)
     },
@@ -239,7 +246,6 @@ export default {
       if(this.index <= 2 && this.currentLocation>2){
         this.getPatentList()
       }
-      
     },
     //下一篇
     next(){

+ 54 - 11
src/views/project/patentDetails/index.vue

@@ -1,34 +1,42 @@
 <template>
   <div class="height_100 article" :style="{'flex-direction':isRight?'row-reverse':'row'}">
-    <articleMenu @event="event" :value="showView" :isRight="isRight" :projectId="projectId" :searchOption="search.searchOption" :patentNo="patentNo" :location="search.location" @getPatentLeft="getPatentLeft" ></articleMenu>
+    <articleMenu @event="event" :value="showView" :menu="menuList" :isRight="isRight" :projectId="projectId" :taskId="taskId" :searchOption="search.searchOption" :patentNo="patentNo" :location="search.location" @getPatentLeft="getPatentLeft" :handlerType="handlerType"></articleMenu>
     <div class="height_100 content">
         <my-View :showView="showView" >
             <div slot="left" style="width:100%">
-              <Patent-Details :patentNo="patentNo" :projectId="projectId" :taskId="taskId"></Patent-Details>
+              <!-- <Patent-Details :patentNo="patentNo" :projectId="projectId" :taskId="taskId"></Patent-Details> -->
+              <component :is='components' :patentNo="patentNo" :projectId="projectId" :taskId="taskId" :reportType="reportType" :isResult="isResult"></component>
             </div>
             <div slot="right" style="width:100%">
               <Patent-Details :patentNo="patentNo" :projectId="projectId" :taskId="taskId"></Patent-Details>
             </div>
         </my-View>
     </div>
-    
+    <teamwork ref="teamwork" :patentNo="patentNo" :projectId="projectId" :reportType="reportType"></teamwork>
   </div>
 </template>
 
 <script>
 import articleMenu from './components/menu.vue'
 import PatentDetails from './components/patentDetails.vue'
+import tortContrast from '@/views/report/tort/components/tortContrast1.vue'
+import teamwork from '@/views/report/components/dialog/teamwork.vue'
 export default {
   components: {
     articleMenu,
-    PatentDetails
+    PatentDetails,
+    tortContrast,
+    teamwork,
   },
   props: {},
   data() {
     return {
       showView:false,
       isRight:false,
-      patentNo:this.$route.params.patentNo
+      patentNo:this.$route.params.patentNo,
+      routeCount:this.$s.getSession('routeCount')||1,
+      components:'PatentDetails',
+      menuList:[]
     };
   },
   watch: {},
@@ -44,31 +52,66 @@ export default {
     },
     search(){
       return this.$s.getSession('search')||{}
-    }
-    
+    },
+    isResult() {
+      return this.$route.query.isResult
+    },
+    taskType(){
+      return this.$route.query.taskType
+    },
+    handlerType() {//1外部人员0内部人员(只有外部协同人做协同任务才会传递)
+      return this.$route.query.handlerType
+    },
   },
   created() {},
   mounted() {
-    console.log(this.search);
+    this.getMenuPrice()
+    this.getComponents()
   },
   methods: {
+      // 获取协同按钮
+      getMenuPrice() {
+        if (this.reportType == 4 && !this.taskId) {
+          this.menuList = [
+            {
+              content: '协同',
+              event: 'coordination',
+              icon: 'el-icon-s-custom',
+            }
+          ]
+        }
+      },
+    getComponents(){
+      if(this.taskType == '3' || this.taskType == '4'){
+        this.components = 'tortContrast'
+      }
+    },
+    //菜单事件
     event(val){
       this[val]()
     },
+    //对比
     contrast(){
       this.showView = !this.showView
     },
+    //设置左边或者右边
     setting(){
       this.isRight = !this.isRight
     },
+    //返回
     goBack(){
-
+      var a = Number(this.routeCount)
+      window.history.go(-a)
+      this.$s.setSession('routeCount',1)
     },
-    xietong(){
-      console.log(1)
+    //协同
+    coordination(){
+      this.$refs.teamwork.open()
     },
     getPatentLeft(val) {
       this.patentNo=val
+      this.routeCount = Number(this.routeCount) + 1
+      this.$s.setSession('routeCount',this.routeCount)
       this.$router.push(
         {
           path: '/patentDetails/' + val,

+ 2 - 3
src/views/report/components/dialog/teamwork.vue

@@ -87,10 +87,9 @@ export default {
   mixins: [personnelLoading],
   props: {
     // 信息(patentNo,reportId)
-    patentNo: '',
-    projectId: '',
+    patentNo: {},
+    projectId: {},
     reportType: {
-      type: String,
       default: 3//默认3fto报告
     },
   },

+ 20 - 8
src/views/report/components/index.vue

@@ -563,14 +563,26 @@ export default {
 
     // 跳转专利与产品关联比对
     toTortIndex(row) {
-      var routerReport = this.$router.resolve({
-        path: "/tortIndex",
-        query: {
-          patentNo: row.signPatentNo,
-          projectId: row.id,
-          reportType: row.reportType
-        }
-      })
+      var routerReport = this.$router.resolve(
+          {
+            path: '/patentDetails/' + row.signPatentNo,
+            query: {
+              projectId: row.id,
+              reportType: row.reportType,
+              taskType:3
+            }
+          }
+        )
+
+
+      // var routerReport = this.$router.resolve({
+      //   path: "/tortIndex",
+      //   query: {
+      //     patentNo: row.signPatentNo,
+      //     projectId: row.id,
+      //     reportType: row.reportType
+      //   }
+      // })
       window.open(routerReport.href, '_blank');
     },
     // 跳转回避设计或拆分特征

+ 18 - 15
src/views/report/components/patentList/components/index.vue

@@ -141,32 +141,35 @@ export default {
         location:location
       }
       this.$s.setSession('search',search)
-      if (this.taskType == 0) {//FTO标引任务
+      // if (this.taskType) {//FTO标引任务
         this.$router.push(
           {
             path: '/patentDetails/' + row.patentNo,
             query: {
               projectId: this.projectId,
               taskId: this.taskId,
-              reportType: this.reportType,
-            }
-          }
-        )
-      } else {//FTO对比任务协同任务
-        this.$router.push(
-          {
-            path: '/tortIndex',
-            query: {
-              projectId: this.projectId,
-              taskId: this.taskId,
-              reportType: this.reportType,
-              patentNo: row.patentNo,
               isResult:this.isResult,
+              taskType:this.taskType,
+              reportType: this.reportType,
               handlerType:this.handlerType || '',
             }
           }
         )
-      }
+      // } else {//FTO对比任务协同任务
+      //   this.$router.push(
+      //     {
+      //       path: '/tortIndex',
+      //       query: {
+      //         projectId: this.projectId,
+      //         taskId: this.taskId,
+      //         reportType: this.reportType,
+      //         patentNo: row.patentNo,
+      //         isResult:this.isResult,
+      //         handlerType:this.handlerType || '',
+      //       }
+      //     }
+      //   )
+      // }
 
     },
     // 搜索

+ 455 - 0
src/views/report/tort/components/tortContrast1.vue

@@ -0,0 +1,455 @@
+<template>
+  <!-- 专利与产品关联比对 -->
+  <div class="height_100 tortContrast">
+        <el-container>
+          <el-header class="headerBtn">
+            <div style="width: 100%;display:flex;justify-content: space-between;align-items: center;">
+              <div>
+                <p v-if="viewType == 'splitPage'"> 标的专利号:<el-link type="primary" @click="toPatentDetails(patentNo)">{{
+                  patentNo }}</el-link> </p>
+              </div>
+              <div>
+                <el-link type="primary" @click="handleSwitch">{{ viewType == 'splitPage' ? '切换产品信息' : '切换产品特征'
+                }}</el-link>
+              </div>
+            </div>
+          </el-header>
+          <el-main style="padding-top: 0px !important">
+
+            <component :is="viewType" style="height: calc(100% - -10px);overflow: auto;" :tableData="tableData"
+              :patentNo="patentNo" :projectId="projectId" :reportType="reportType" :columnList="columnList"
+              @splitSelect="splitSelect" @isSave="isSave" :isEdit="(taskId && isResult) ? false : true"
+              :isResult="isResult" @changeResult="changeResult">
+              <div slot="handleRight" v-if="isResult == 3 || handlerType == 1">
+                <el-button v-if="isResult == 3" type="primary" @click="agree">全部同意</el-button>
+                <el-button v-if="handlerType == 1" type="primary" @click="finish">完成</el-button>
+              </div>
+            </component>
+
+          </el-main>
+        </el-container>
+
+    
+  </div>
+</template>
+
+<script>
+import { patentDetails } from '../../components/mixins/index2'
+import splitPage from '../../components/splitPage/splitPage.vue'
+import informationEntry from './informationEntry/informationEntry.vue'
+
+export default {
+  //
+  props: ['patentNo', 'projectId', 'reportType', 'taskId', 'isResult', 'handlerType'],
+  mixins: [patentDetails],
+  components: {
+    splitPage,
+    informationEntry,
+    
+  },
+  data() {
+    return {
+      // 视图
+      viewType: 'splitPage',
+      // 数据
+      tableData: [],
+      // 栏位
+      columnList: [
+        {
+          name: "标的说明(可粘贴图片)",
+          type: "String",
+          value: ['originalRecordVO', 'targetDescription'],
+        },
+        {
+          name: "比对结果",
+          type: "Array",
+          value: ['originalRecordVO', 'compareResult'],
+          options: [
+            {
+              value: 0,
+              label: '字面相同'
+            }, {
+              value: 1,
+              label: '等同'
+            }, {
+              value: 2,
+              label: '不相同'
+            }, {
+              value: 3,
+              label: '待确定'
+            }
+          ],
+        },
+        {
+          name: "比对说明(可粘贴图片)",
+          type: "String",
+          value: ['originalRecordVO', 'compareDescription'],
+        },
+      ],
+    }
+  },
+  watch:{
+    patentNo(){
+      this.getList()
+    }
+  },
+  async mounted() {
+    
+    this.getColumn()
+    this.getList()
+  },
+  methods: {
+  
+
+
+    // 外部人员协同任务时完成按钮(调用任务的完成接口)
+    finish(id, status) {
+      let params = {
+        taskId: this.taskId,
+        type: 0,//0完成1取消
+      }
+      var str = ''
+      if (status == 0) {
+        str = `点击确定此操作会将任务置为完成,并自动关闭页面发送邮件进行通知, 是否继续?<br/>若您未保存对比结果,请您取消操作,点击保存进行保存结果,`
+      }
+      this.$confirm(str, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$api.updateTaskStatus(params).then(response => {
+          if (response.code == 200) {
+            this.$message.success('完成协同并成功发送邮件')
+            this.$nextTick(() => {
+              window.opener = null;
+              window.open("", "_self");
+              window.close();
+            })
+          }
+        })
+      }).catch(() => {
+        this.$message.info('操作已取消')
+      });
+
+    },
+
+    // 处理栏位
+    getColumn() {
+      var a = {
+        1: '处理协同结果',
+        2: '查看协同结果',
+        3: '确认结果'
+      }
+      var confirmColumn = [
+        {
+          name: "协同标的说明(可粘贴图片)",
+          type: "String",
+          value: ['currentRecordVO', 'targetDescription'],
+        },
+        {
+          name: "协同比对结果",
+          type: "Array",
+          value: ['currentRecordVO', 'compareResult'],
+          options: [
+            {
+              value: 0,
+              label: '字面相同'
+            }, {
+              value: 1,
+              label: '等同'
+            }, {
+              value: 2,
+              label: '不相同'
+            }, {
+              value: 3,
+              label: '待确定'
+            }
+          ],
+        },
+        {
+          name: "协同比对说明(可粘贴图片)",
+          type: "String",
+          value: ['currentRecordVO', 'compareDescription'],
+        },
+      ]
+      switch (this.isResult) {
+        case '1':
+          // this.columnList.forEach(item => {
+          //   item.disabled = true
+          // })
+          confirmColumn.forEach(item => {
+            item.disabled = true
+          })
+          this.columnList = confirmColumn
+          break;
+        case '2':
+          this.columnList = this.columnList.concat(confirmColumn)
+          break;
+        case '3'://finalVO
+          this.columnList.forEach(item => {
+            item.disabled = true
+            item.value[0] = 'finalRecordVO'
+          })
+          confirmColumn.push(
+            {
+              type: 'btn',
+              name: '操作',
+              btn: [
+                {
+                  type: 'elButton',
+                  name: '同意协同人意见',
+                }
+              ]
+            }
+          )
+          this.columnList = this.columnList.concat(confirmColumn)
+          break;
+      }
+    },
+    // 全部同意
+    agree() {
+      this.tableData.forEach(item => {
+        for (let key in item) {
+          if (key == 'currentRecordVO') {
+            for (let k in item[key]) {
+              item.finalRecordVO[k] = item[key][k]
+            }
+          }
+        }
+      })
+    },
+    // 当前行数据同意
+    changeResult(row) {//协同后currentRecordVO,
+      for (let key in row) {
+        if (key == 'currentRecordVO') {
+          for (let k in row[key]) {
+            row.finalRecordVO[k] = row[key][k]
+          }
+        }
+      }
+    },
+
+    // 切换产品信息
+    handleSwitch() {
+      this.viewType = (this.viewType == 'splitPage' ? 'informationEntry' : 'splitPage')
+    },
+    // 保存结果
+    isSave(val) {
+      if (this.reportType == 3) {//FTO
+        if (this.taskId && this.isResult == 3) {//确认协同结果保存
+          for (let i = 0; i < val.length; i++) {
+            if (val[i].finalRecordVO) {
+              for (let key in val[i].finalRecordVO) {
+                val[i][key] = val[i].finalRecordVO[key]
+              }
+            }
+          }
+          let params = {
+            taskId: this.taskId,
+            patentNo: this.patentNo,
+            taskId: this.taskId,
+            tortDTOS: val,
+          }
+          this.$api.addFinalAssItResult(params).then(res => {
+            if (res.code == 200) {
+              this.$message.success('保存成功')
+            }
+          })
+        } else if (this.taskId && this.isResult == 1) {//处理协同结果保存或查看协同结果
+          for (let i = 0; i < val.length; i++) {
+            if (val[i].currentRecordVO) {
+              for (let key in val[i].currentRecordVO) {
+                val[i][key] = val[i].currentRecordVO[key]
+              }
+            }
+          }
+          let params = {
+            taskId: this.taskId,
+            patentNo: this.patentNo,
+            taskId: this.taskId,
+            tortDTOS: val,
+          }
+          this.$api.addFTOAssItTaskResult(params).then(res => {
+            if (res.code == 200) {
+              this.$message.success('保存成功')
+            }
+          })
+        } else {//拆分保存
+          for (let i = 0; i < val.length; i++) {
+            if (val[i].originalRecordVO) {
+              for (let key in val[i].originalRecordVO) {
+                val[i][key] = val[i].originalRecordVO[key]
+              }
+            }
+          }
+          let params = {
+            projectId: this.projectId,
+            patentNo: this.patentNo,
+            taskId: this.taskId,
+            tortDTOS: val,
+          }
+          this.$api.addFTOCompareRecord(params).then(res => {
+            if (res.code == 200) {
+              this.$message.success('保存成功')
+            }
+          })
+        }
+      } else {
+        if (this.taskId && this.isResult == 3) {//确认协同结果保存
+          for (let i = 0; i < val.length; i++) {
+            if (val[i].finalRecordVO) {
+              for (let key in val[i].finalRecordVO) {
+                val[i][key] = val[i].finalRecordVO[key]
+              }
+            }
+          }
+          let params = {
+            taskId: this.taskId,
+            tortDTOS: val,
+          }
+          this.$api.addFinalTortResult(params).then(res => {
+            if (res.code == 200) {
+              this.$message.success('保存成功')
+            }
+          })
+        } else if (this.taskId && this.isResult == 1) {//处理协同结果保存或查看协同结果
+          for (let i = 0; i < val.length; i++) {
+            if (val[i].currentRecordVO) {
+              for (let key in val[i].currentRecordVO) {
+                val[i][key] = val[i].currentRecordVO[key]
+              }
+            }
+          }
+          let params = {
+            taskId: this.taskId,
+            tortDTOS: val,
+          }
+          this.$api.addTortTaskResult(params).then(res => {
+            if (res.code == 200) {
+              this.$message.success('保存成功')
+            }
+          })
+        } else {//侵权报告拆分保存
+          for (let i = 0; i < val.length; i++) {
+            if (val[i].originalRecordVO) {
+              for (let key in val[i].originalRecordVO) {
+                val[i][key] = val[i].originalRecordVO[key]
+              }
+            }
+          }
+          let params = {
+            projectId: this.projectId,
+            tortDTOS: val,
+          }
+          this.$api.addTortCompareRecord(params).then(res => {
+            if (res.code == 200) {
+              this.$message.success('保存成功')
+            }
+          })
+        }
+      }
+    },
+    // 拆分信息
+    splitSelect(split) {
+      this.getList(split, true)
+    },
+    // 获取数据
+    getList(split = { splitType: '1', splitBy: '2' }, ifReSplit = false) {
+      let params = {
+        taskId: this.taskId,
+        patentNo: this.reportType == 3 ? this.patentNo : null
+      }
+      var api = {
+        3: ['getFTOAssItResult', 'getFTOFinalResult', 'getFTOCompareRecord'],
+        4: ['getAllTortTaskResult', 'getTortFinalResult', 'getTortCompareRecord']
+      }
+      if (this.taskId && this.isResult == 1) {//处理协同
+        this.$api[api[this.reportType][0]](params).then(res => {
+          if (res.code == 200) {
+            this.getInterface(res)
+          }
+        })
+      } else if (this.taskId && this.isResult == 3) {//确认协同结果,
+        this.$api[api[this.reportType][1]](params).then(res => {
+          if (res.code == 200) {
+            this.getInterface(res)
+          }
+        })
+      } else {//FTO对比结果
+        params = {
+          taskId: this.taskId,
+          ifReSplit: ifReSplit,
+          projectId: Number(this.projectId),
+          patentNo: this.patentNo,
+          ...split,//拆分条件
+        }
+        this.$api[api[this.reportType][2]](params).then(res => {
+          if (res.code == 200) {
+            this.getInterface(res)
+          }
+        })
+      }
+    },
+    // 处理获取的数据
+    getInterface(res) {
+      if (res.data.tortRightVOS.length > 0) {
+        var data = []
+        res.data.tortRightVOS.forEach(RightVosItem => {
+          if (RightVosItem.tortVOS.length > 0) {
+            RightVosItem.tortVOS.forEach(FeaturesItem => {
+              FeaturesItem.pRightName = RightVosItem.rightName
+              FeaturesItem.pSignPatentNo = RightVosItem.signPatentNo
+              FeaturesItem.pPatentNo = RightVosItem.patentNo
+              FeaturesItem.pContentOut = RightVosItem.contentOut
+              FeaturesItem.pContent = RightVosItem.content
+              FeaturesItem.pProjectId = RightVosItem.projectId
+              FeaturesItem.pType = RightVosItem.type
+              FeaturesItem.pSort = RightVosItem.sort
+              this.hasOwn(FeaturesItem)
+              data.push(FeaturesItem)
+            })
+          }
+        })
+        this.tableData = data
+      }
+    },
+    hasOwn(item) {
+      if (!item.hasOwnProperty("explainText")) {
+        item.explainText = ''
+      }
+    },
+  },
+}
+</script>
+
+<style lang="scss">
+.tortContrast {
+  .headerBtn {
+    height: 35px !important;
+    border: none;
+    padding: 15px !important;
+  }
+}
+</style>
+<style lang="scss" scoped>
+.tortContrast {
+  .iconBtnList {
+    width: 50px;
+    border-right: 1px solid #ccc;
+
+    .iconBtn {
+      width: 100%;
+      height: 50px;
+      text-align: center;
+      line-height: 50px;
+      font-size: 22px;
+      background: #ccc;
+      border-bottom: 1px solid #ffffff;
+    }
+
+    .iconBtn:hover {
+      background: #316192;
+    }
+  }
+}
+</style>

+ 56 - 23
src/views/task/components/index.vue

@@ -245,20 +245,53 @@ export default {
       var str = ''
       if (row.reportType == 3) {
         str = '/reportPatentList'
+        var router = this.$router.resolve({
+          path: str,
+          query: {
+            taskId: row.id,
+            projectId: row.projectId,
+            reportType: row.reportType,
+            taskType: row.type,
+            isResult: 3,
+          }
+        })
+       
       } else {
-        str = '/tortIndex'
+        var patentNo = this.getPatent(row.projectId,row.id)
+        var router = this.$router.push(
+          {
+            path: '/patentDetails/' + patentNo,
+            query: {
+              projectId: row.projectId,
+              taskId: row.id,
+              isResult:3,
+              taskType:row.type,
+              reportType: row.reportType,
+            }
+          }
+        )
       }
-      let router = this.$router.resolve({
-        path: str,
-        query: {
-          taskId: row.id,
-          projectId: row.projectId,
-          reportType: row.reportType,
-          taskType: row.type,
-          isResult: 3,
+      window.open(router.href, '_blank')
+    },
+       // 请求专利(侵权分析协同用到)
+    async getPatent(projectId,taskId) {
+      let params = {
+        current: 1,//分页信息
+        size:10,
+        projectId: projectId,
+        taskId: taskId,
+        searchQuery: '',//检索条件
+        customFields: [],
+        orderDTOList: [],//排序信息
+      }
+      var patentNo = ''
+      await this.$api.QueryPatent(params).then(res => {
+        if (res.code == 200) {
+          patentNo = res.data.data[0].patentNo
         }
+      }).catch(error => {
       })
-      window.open(router.href, '_blank')
+      return patentNo
     },
     // 编辑任务
     handleEdit(row) {
@@ -357,7 +390,7 @@ export default {
     },
     //协同任务(侵权分析及FTO)
     teamworkTask(row, val) {
-      if (row.reportType == 3) {//fto
+      // if (row.reportType) {//fto
         let router = this.$router.resolve({
           path: '/reportPatentList',
           query: {
@@ -369,18 +402,18 @@ export default {
           }
         })
         window.open(router.href, '_blank')
-      } else {//侵权
-        let router = this.$router.resolve({
-          path: '/tortIndex',
-          query: {
-            taskId: row.id,
-            projectId: row.projectId,
-            reportType: row.reportType,
-            isResult: val,
-          }
-        })
-        window.open(router.href, '_blank')
-      }
+      // } else {//侵权
+      //   let router = this.$router.resolve({
+      //     path: '/tortIndex',
+      //     query: {
+      //       taskId: row.id,
+      //       projectId: row.projectId,
+      //       reportType: row.reportType,
+      //       isResult: val,
+      //     }
+      //   })
+      //   window.open(router.href, '_blank')
+      // }
 
     },
     //文件及任务审核任务(专利挖掘)