Browse Source

1.将上一篇下一篇按钮固定在上方;
2.新增客户时可以选择租户;
3.在报告管理和专利清单界面添加报告预览;
4.在报告管理添加对比文件按钮,可以随时添加对比文件

zhuliu 2 years ago
parent
commit
a78d0906f8

+ 9 - 0
RMS-FrontEnd/src/api/permission.js

@@ -49,4 +49,13 @@ export default{
     //   params: params
     // })
   },
+  getPermissionPersonnelList(params) {
+    return axios.get('/permission/api/personnel/getPersonnelList', { params })
+  },
+    /**
+     * 查询租户
+     */
+     getAllTenantList(params) {
+      return axios.get('/permission/api/tenant/getTenantList', {params})
+  },
 }

+ 11 - 0
RMS-FrontEnd/src/router/index.js

@@ -230,6 +230,17 @@ const routes = [
           hiddenHeader:true
         },
         component:() => import('@/views/components/common/menu/component/checkFile.vue'),
+      },
+      {
+        path:'/addPatentList',
+        name:'/addPatentList',
+        meta:{
+          title:'添加对比文件',
+          aside:true,
+          showHeader:true,
+          // hiddenHeader:true
+        },
+        component:() => import('@/views/report/components/addPatentList'),
       }
     ]
   },

+ 5 - 3
RMS-FrontEnd/src/views/components/articles/index.vue

@@ -1,5 +1,5 @@
 <template>
-<div :style="{ top: showPositionTop + 'px', left: showPositionLeft + 'px' }">
+<div :style="{ top: showPositionTop + 'px', left: showPositionLeft + 'px' }" class="patent-content">
   <div style="display:flex;justify-content: space-between;align-items: center;">
     <div :style="{'visibility':this.taskId?'visible':'hidden'}">
       <el-tooltip class="item" effect="dark" content="返回任务页面" placement="top-start">
@@ -25,7 +25,7 @@
     </div>       
   </div>
   <!-- <el-button @click="two">对比</el-button> -->
-  <el-container style=" border: 1px solid #eee">
+  <el-container style=" border: 1px solid #eee" :style="{height:height+'px'}">
     <el-container v-show="width!='100%'">
     <el-aside style="margin:0;" width="100%" >
       <contrast-index v-if="signPatentNo" :reportType="reportType" :publicNo="signPatentNo" :signPatentNo="signPatentNo"  @getVisible="getVisible" :type="type" :reportId="reportId" :isTrue="isTrue" @openContrast='openContrast' :taskId="taskId" @patentStatusEmit="patentStatusEmit" :patentStatus2A="patentStatus2A"/>
@@ -322,13 +322,15 @@ export default {
       Already: [],
       // imgList: [],
       file:[],
-      patentNo1:this.patentNo
+      patentNo1:this.patentNo,
+      height:null
     }
   },
   
   created() {
   },
   mounted() {
+    this.height = document.querySelector('.patent-content').offsetHeight>500?document.querySelector('.patent-content').offsetHeight + 90:500
     this.params = this.$s.getSession('params')
     window.selectMark = this.selectMark
     this.signPatentNo = this.$s.getSession('params').signPatentNo

+ 35 - 43
RMS-FrontEnd/src/views/components/common/menu/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div :class="menuStyle" @mouseover="mouseover" @mouseout="mouseout">
-        <div class="menu-button" @click="getMenu">
+        <div class="menu-button">
             <div class="line-box">
                 <div class="line"></div>
                 <div class="line"></div>
@@ -8,17 +8,18 @@
             </div>
         </div>
         <ul class="menu-list" >
-            <li @click="downLoad"><i class="fa el-icon-download"></i><span>下载</span></li>
-            <li @click="preview"><i class="fa el-icon-view"></i><span>预览</span></li>
-            <li @click="delFile"><i class="fa el-icon-delete"></i><span>删除</span></li>
+            <li @click="downLoad(data)"><i class="fa el-icon-download"></i><span>下载</span></li>
+            <li @click="preview(data)"><i class="fa el-icon-view"></i><span>预览</span></li>
+            <li @click="delFile(data)"><i class="fa el-icon-delete"></i><span>删除</span></li>
         </ul>
     </div>
 </template>
 <script>
-import { downLoad2 } from '@/utils'
 
+import {File} from './mixins'
 export default {
     props:['data'],
+    mixins:[File],
     data() {
         return {
             menuStyle:'menu-box',
@@ -29,15 +30,6 @@ export default {
 
     },
     methods:{
-        getMenu(){
-            // if(!this.active){
-            //    this.menuStyle = 'menu-box active' 
-            //    this.$emit('getKey',this.data.id)
-            // }else{
-            //     this.menuStyle = 'menu-box' 
-            // }
-            // this.active = !this.active
-        },
         mouseover(){
             this.menuStyle = 'menu-box active' 
             this.active = true
@@ -46,35 +38,35 @@ export default {
             this.menuStyle = 'menu-box' 
             this.active = false
         },
-        downLoad(){
-            downLoad2(this.data.url) 
-        },
-        preview(){
-            var item = this.data
-            var arr = ['png','jpeg','bmp','jpg']
-            if(arr.includes(item.suffix)){
-                var FileUrl = this.$p + item.url
-                var isPicture = 1
-            }else if(item.suffix == 'pdf'){
-                var FileUrl = this.$p + item.url
-                var isPicture = 0
-            }else{
-                var FileUrl =  'http://192.168.1.24:8012/onlinePreview?url='+ btoa(encodeURIComponent(this.$p + item.url))
-                var isPicture = 0
-            }
-            const router = this.$router.resolve({
-                path: '/checkFile',
-                query: {
-                    row: JSON.stringify(item),
-                    FileUrl: FileUrl,
-                    isPicture:isPicture
-                }
-            })
-            window.open(router.href, '_blank');
-        },
-        delFile(){
-            this.$emit('delFile',this.data.id)
-        }
+        // downLoad(){
+        //     downLoad2(this.data.url) 
+        // },
+        // preview(){
+        //     var item = this.data
+        //     var arr = ['png','jpeg','bmp','jpg']
+        //     if(arr.includes(item.suffix)){
+        //         var FileUrl = this.$p + item.url
+        //         var isPicture = 1
+        //     }else if(item.suffix == 'pdf'){
+        //         var FileUrl = this.$p + item.url
+        //         var isPicture = 0
+        //     }else{
+        //         var FileUrl =  'http://192.168.1.24:8012/onlinePreview?url='+ btoa(encodeURIComponent(this.$p + item.url))
+        //         var isPicture = 0
+        //     }
+        //     const router = this.$router.resolve({
+        //         path: '/checkFile',
+        //         query: {
+        //             row: JSON.stringify(item),
+        //             FileUrl: FileUrl,
+        //             isPicture:isPicture
+        //         }
+        //     })
+        //     window.open(router.href, '_blank');
+        // },
+        // delFile(){
+        //     this.$emit('delFile',this.data.id)
+        // }
     }
 }
 </script>

+ 33 - 0
RMS-FrontEnd/src/views/components/common/menu/mixins.js

@@ -0,0 +1,33 @@
+import { downLoad2 } from '@/utils'
+export const File = {
+    methods: {
+        downLoad(item){
+            downLoad2(item.url) 
+        },
+        preview(item){
+            var arr = ['png','jpeg','bmp','jpg']
+            if(arr.includes(item.suffix)){
+                var FileUrl = this.$p + item.url
+                var isPicture = 1
+            }else if(item.suffix == 'pdf'){
+                var FileUrl = this.$p + item.url
+                var isPicture = 0
+            }else{
+                var FileUrl =  'http://192.168.1.24:8012/onlinePreview?url='+ btoa(encodeURIComponent(this.$p + item.url))
+                var isPicture = 0
+            }
+            const router = this.$router.resolve({
+                path: '/checkFile',
+                query: {
+                    row: JSON.stringify(item),
+                    FileUrl: FileUrl,
+                    isPicture:isPicture
+                }
+            })
+            window.open(router.href, '_blank');
+        },
+        delFile(item){
+            this.$emit('delFile',item.id)
+        }
+    },
+}

+ 42 - 1
RMS-FrontEnd/src/views/layout/components/clientManage.vue

@@ -35,7 +35,17 @@
       <el-dialog :title="title" :visible.sync="visible" width="500px" :before-close="close" append-to-body>
         <el-form v-if="visible" :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" label-position="left">
           <el-form-item label="客户名称" prop="name">
-            <el-input v-model="ruleForm.name" placeholder="请输入客户名称"></el-input>
+            <el-autocomplete
+              style="width:100%"
+                v-model="ruleForm.name"
+                :fetch-suggestions="querySearch"
+                @input="input"
+                placeholder="请输入客户名称"
+                :trigger-on-focus="false"
+                @select="handleChange"
+              >
+              </el-autocomplete>
+            <!-- <el-input v-model="ruleForm.name" placeholder="请输入客户名称"></el-input> -->
           </el-form-item>
           <el-form-item label="对接人" prop="person">
                 <el-select style="width:100%" v-model="ruleForm.personnelId" filterable placeholder="请选择">
@@ -81,13 +91,44 @@
         rules: {
           name: [{ required: true, message: '请输入客户名称', trigger: 'blur' },],
         },
+        tenantList:[],
       }
     },
     mounted() {
       this.getList()
       this.getPersonnelList()
+      this.getAllTenantList()
     },
     methods: {
+      querySearch(queryString, cb) {
+        var tenantList = this.tenantList;
+        var results = (queryString ? tenantList.filter(this.createFilter(queryString)) : tenantList).map(item=>{
+          return {
+            value:item.name,
+            name:item.name,
+            id:item.id
+          }
+        });
+        // 调用 callback 返回建议列表的数据
+        cb(results);
+      },
+      createFilter(queryString) {
+        return (tenantList) => {
+          return (tenantList.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+        };
+      },
+      getAllTenantList(){
+        this.$api.getAllTenantList().then(response=>{
+          this.tenantList = response.data
+        })
+      },
+      input() {
+        this.$set(this.ruleForm, 'tenantId', null)
+      },
+      handleChange(row) {
+        this.$set(this.ruleForm, 'tenantId', row.id)
+        this.$set(this.ruleForm, 'name', row.name)
+      },
       handleAdd() {
         this.title = '新增客户'
         this.visible = true

+ 3 - 2
RMS-FrontEnd/src/views/report/components/File.vue

@@ -47,6 +47,7 @@
 
                   <el-dropdown-menu slot="dropdown" class="text-align_center">
                     <el-dropdown-item @click.native="handleDownload(scope.row)" >下载</el-dropdown-item>
+                    <el-dropdown-item @click.native="preview(scope.row.reportFiles[0])" >预览</el-dropdown-item>
                     <el-dropdown-item divided class="color-red" @click.native="handleDelete(scope.row)" >删除</el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
@@ -91,9 +92,9 @@
 <script>
 
 import { downLoad2 } from "@/utils";
-
+import {File} from '@/views/components/common/menu/mixins'
 export default {
- 
+ mixins:[File],
   data() {
     return {
       type: 0,

+ 4 - 3
RMS-FrontEnd/src/views/report/components/Tabel.vue

@@ -41,12 +41,13 @@
               <!-- <el-dropdown-item command="0">分享</el-dropdown-item> -->
               <el-dropdown-item command="1" v-if="[2,3].includes(scope.row.status)">导出报告</el-dropdown-item>
               <el-dropdown-item command="2" v-if="[2,3].includes(scope.row.status)">报告文档</el-dropdown-item>
-              <el-dropdown-item command="3" v-if="[1,2].includes(scope.row.status)">自定义字段</el-dropdown-item>
-              <el-dropdown-item command="4" v-if="[2,3].includes(scope.row.status)&& scope.row.type != 4">任务分配</el-dropdown-item>
+              <el-dropdown-item command="3" v-if="[1,2].includes(scope.row.status)&&[0,1,2,3].includes(scope.row.type)">自定义字段</el-dropdown-item>
+              <el-dropdown-item command="4" v-if="[2,3].includes(scope.row.status)&& [0,1,2,3].includes(scope.row.type)">任务分配</el-dropdown-item>
               <el-dropdown-item command="5" v-if="[1].includes(scope.row.status) || (scope.row.type == 4 && [1,2,3].includes(scope.row.status))">{{!([3,4].includes(scope.row.type))?'拆分特征':'产品信息录入'}}</el-dropdown-item>
               <el-dropdown-item command="8" v-if="(scope.row.type == 4 && [1,2,3].includes(scope.row.status))">专利与产品关联比对</el-dropdown-item>
               <el-dropdown-item command="9" v-if="(scope.row.type == 5 && [1,2,3].includes(scope.row.status))"> 规避方案填写</el-dropdown-item>
-              <el-dropdown-item command="6" v-if="[2,3].includes(scope.row.status)&& scope.row.type != 4">导入 </el-dropdown-item>
+              <el-dropdown-item command="10" v-if="[0,1,2,3].includes(scope.row.type)&&[2,3].includes(scope.row.status)"> 添加对比文件</el-dropdown-item>
+              <!-- <el-dropdown-item command="6" v-if="[2,3].includes(scope.row.status)&& scope.row.type != 4">导入 </el-dropdown-item> -->
               <el-dropdown-item command="7" divided style="color: red;">删除 </el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>

+ 767 - 0
RMS-FrontEnd/src/views/report/components/addPatentList/addPatent.vue

@@ -0,0 +1,767 @@
+<template>
+    <!-- 对比文件2 -->
+    <div style="padding:20px">
+      <div style="display: flex; justify-content: space-between;">
+        <div :style="{visibility: selectedTotal>0?'visible':'hidden'}" >
+          已勾选 <b>{{ selectedTotal }}</b> 条
+        </div>
+        <div>
+          <el-button type="primary" @click="savePatentList" :loading="btnLoading">保存</el-button>
+        </div>
+      </div>
+      <el-container>
+        <el-main>
+            <div style="display:flex;justify-content: flex-end;padding-bottom:20px">
+                <el-button type="primary" size="small" style="margin-right:10px;width:70px" @click="importPatent(reportId)">导入</el-button>
+                <div class="btn1" @click="sift" style="width:80px;height:32px;display:flex;justify-content:space-around;border-radius:5px; cursor: pointer;">
+                    <img src="../../../../assets/img/filtrationSearch.png" alt="" style="width:16px;height:16px;margin-top:9px;margin-left:8px"><p style="margin:0 8px 0 0;line-height:32px;color:white;font-size:14px">筛选 </p> 
+                </div>
+                  <el-popover placement="bottom" title="" width="250" trigger="click">
+                      <el-main class="patent-fast-edit-popover" v-loading="selectNumberLoading">
+                                <div class="btn" @click="handleSelectNumber(0)">本页选择</div>
+                                <div class="btn" @click="handleSelectNumber(1)">全部选择</div>
+                                <el-divider></el-divider>
+                        <div class="select-number">
+                                  <span>从</span>
+                                  <el-input size="mini" v-model="queryParams.startNumber"></el-input>
+                                  <span>到</span>
+                                  <el-input size="mini" v-model="queryParams.endNumber"></el-input>
+                                  <el-button type="text" size="" @click="handleSelectNumber(2)">确定</el-button>
+                        </div>
+                      </el-main>
+                      <el-button type="info" size="small" class="margin-left_10" slot="reference">
+                          选择专利<i class="el-icon-arrow-down el-icon--right"></i>
+                      </el-button>
+                    </el-popover>
+                    <el-button type="text" size="small" class="margin-left_10" @click="handleCancelSelectNumber">取消选择</el-button> 
+                    <!-- 自定义收缩栏 -->
+                    <!-- <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧菜单'" placement="top" >
+                      <i :class="showRight ? 'el-icon-s-unfold' : 'el-icon-s-fold'" style="font-size: 25px;right: 10px; margin-left: 10px;margin-top: 5px;color: #2f2f2f; cursor: pointer" @click="showRight = !showRight"></i>
+                    </el-tooltip> -->
+                </div>
+              <!-- 数据表格 -->
+              <el-table
+                :data="tableData"
+                border
+                :row-key="getRowKeys"
+                v-loading="loading"
+                ref="table"
+                id="table"
+                style="min-width: 100%; overflow:auto">
+                <el-table-column width="80" align="center">
+                  <template slot-scope="scope">
+                    <div>
+                      <el-checkbox-group v-model="checkList" style="display:inline-block">
+                        <el-checkbox :label="scope.row.patentNo" @change="getFunInfo(scope.row.patentNo)">
+                          <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+                        </el-checkbox>
+                      </el-checkbox-group>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  prop="patentNo"
+                  label="专利号"
+                  align="center"
+                  width="200px">
+                  <template slot-scope="scope">
+                    <div>
+                      <el-link type="primary"  @click="toPatentDetails(scope.row.patentNo)">{{scope.row.patentNo}}</el-link>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  prop="name"
+                  label="专利标题"
+                  align="center"
+                  width="300px">
+                </el-table-column>
+                <el-table-column
+                  prop="simpleStatus"
+                  align="center"
+                  label="状态">
+                </el-table-column>
+                
+              </el-table>
+              <div class="pagination">
+                <el-pagination :current-page.sync="queryParams.current" :page-size="queryParams.size" :total="total" @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
+              </div>
+      </el-main>
+    </el-container>
+  
+      <el-dialog title="筛选" :visible.sync="visible" width="1100px" max-height="800" :before-close="close">
+        <div style="height: 500px">
+          <el-form ref="form" :model="form" label-width="80px" label-position="left">
+            <el-form-item label="标题">
+              <el-input type="textarea" v-model="form.patentName" placeholder="请输入标题查询"></el-input>
+            </el-form-item>
+            <el-form-item label="摘要">
+              <el-input type="textarea" v-model="form.abstractStr" placeholder="请输入摘要查询"></el-input>
+            </el-form-item>
+            <el-form-item label="专利号">
+              <el-input type="textarea" v-model="form.patentNo" placeholder="请输入专利号查询(多个专利号查询中间请用符号“|”隔开,示例:“专利号|专利号”)"></el-input>
+            </el-form-item>
+            <el-form-item label="申请号">
+              <el-input type="textarea" v-model="form.applicationNo" placeholder="请输入申请号查询"></el-input>
+            </el-form-item>
+            <el-form-item label="申请人">
+              <el-input type="textarea" v-model="form.applicationName" placeholder="请输入申请人查询(多个申请人查询中间请用符号“|”隔开,示例:“申请人|申请人”)"></el-input>
+            </el-form-item>
+            <el-form-item label="权利人">
+              <el-input type="textarea" v-model="form.obligeeName" placeholder="请输入权利人查询(多个权利人查询中间请用符号“|”隔开,示例:“权利人|权利人”)"></el-input>
+            </el-form-item>
+          </el-form>
+          </div>
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="close">取 消</el-button>
+            <el-button type="primary" @click="sure">确 定</el-button>
+          </div>
+      </el-dialog>
+  
+    </div>
+</template>
+<script>
+  import { PatentDetails } from '@/views/components/common/mixins';
+  import { importPatent } from '../../components/mixins';
+  export default {
+  components:{
+  },
+  mixins:[PatentDetails,importPatent],
+    props: ['reportId'],
+    data() {
+      return {
+        btnLoading:false,
+        loadPatent:false,
+        visibleSelected:false,
+        selectedTotal:0,
+        isFetch:true,
+        quickSelect:false,//是否快速选择
+        loading: true,
+        visible: false,
+        selected: [],
+        checkList: [],//回显
+        tableData: [],
+        total: 0,
+        form: {},
+        formS:{},
+        startNumber:1,
+        endNumber:0,
+        Params: {
+          current: 1,
+          size: 10,
+        },
+        queryParams: {
+          state:0,
+          isAdd:[],
+          isDelete:[],
+          folder: null,
+          projectId: null,
+          read: 'all',
+          current: 1,
+          size: 10,
+          name: '',
+          abstractStr: '',
+          publicNo: '',
+          applicationNo: '',
+          rightContent: '',
+          sort: {
+            order: 'asc',
+            prop: 'id'
+          },
+          field: [],
+          tree: [],
+          selected: [],
+          startNumber: 1,
+          endNumber: 0,
+          family: 0,
+          showPatent: "0",
+          patentName: "",
+          patentNo: "",
+          filedOptions: [],
+          pasOptions:[],//专题库自定义字段
+        },
+        selectNumberLoading: false,
+        showRight:false,
+        tableHeight:null,
+      }
+    },
+    created() {
+  
+    },
+    mounted() {
+      this.getList()
+      //console.log(this.selectedTotal)
+    },
+    methods: {
+      tableOffSetHeight() {
+        let b = document.getElementById("table")
+        this.tableHeight=b.offsetHeight
+      },
+      // onChangeOne(val) {
+      //   //console.log(val);
+      //   this.$api.getPatentListPAS()
+  
+      // },
+      //子页面自定义字段值
+      onChangeList({field,a}) {
+        // console.log(field,a);
+        this.queryParams.pasOptions = field
+        this.queryParams.projectId = a
+        this.handleCancelSelectNumber()
+        this.getList2()
+        
+      },
+      getListPro() {
+        //console.log("进来");
+        this.tableData=[]
+        this.$api.getPatentListPAS(this.queryParams).then(res => {
+          this.tableData = res.data.records
+          this.total=res.data.total
+        })
+      },
+      getSave(val){
+        if(val){
+          this.getList()
+        }
+  
+      },
+      checkSelected(){
+        this.loadPatent = !this.loadPatent
+        this.visibleSelected = true
+      },
+      close2(){
+        this.visibleSelected = false
+        this.loadPatent = !this.loadPatent
+      },
+      sift() {
+        this.visible = true
+      },
+      sure() {
+        this.formS=JSON.parse(JSON.stringify(this.form))
+        if (Object.keys(this.formS).length!=0) {
+          for (let key in this.formS) {
+            this.queryParams[key]=this.formS[key]
+          }
+          // if (this.queryParams.projectId) {
+          //   this.getListPro()
+          // } else {
+            this.handleCancelSelectNumber()
+          this.getList2()
+          // }
+          
+        }
+        // else {
+        //   // if (this.queryParams.projectId) {
+        //   //   this.getListPro()
+        //   // } else {
+        //     this.getList2()
+        //   // }
+        // }
+        
+        this.visible = false
+        // this.form = {}
+      },
+      close() {
+        this.visible = false
+        this.form = this.formS
+      },
+      getSelectedTotal() {
+        //console.log(this.queryParams.isAdd,this.queryParams.isDelete);
+        this.selectedTotal = Number(this.endNumber) - Number(this.startNumber) + 1 + Number(this.queryParams.isAdd.length) - Number(this.queryParams.isDelete.length)
+      },
+      async Switch(type) {//选择...确定公用
+        let params = { ...this.queryParams }
+        if (params.field.length == 0) {
+          params.field = params.tree
+        }
+        switch (type) {
+          case 0:
+            this.queryParams.selected = this.tableData.map(item => item.patentNo);
+            this.checkList = [...new Set(this.checkList.concat(this.queryParams.selected))]
+            // this.selectedTotal = this.checkList.length
+            this.queryParams.selected=[]
+            if(!this.quickSelect){
+              this.queryParams.isAdd=JSON.parse(JSON.stringify(this.checkList))
+              this.getSelectedTotal()
+              break;
+            }
+            this.tableData.forEach((item,index)=>{
+              var position = (this.queryParams.current-1)*this.queryParams.size + index + 1
+              if(position>=this.startNumber){
+                if(this.endNumber>=this.queryParams.current * this.queryParams.size){
+                  var index1 = this.queryParams.isDelete.findIndex(i=>{
+                    return i == item.patentNo
+                  })
+                  if(index1!=-1){
+                    this.queryParams.isDelete.splice(index1,1)
+                  }
+                }else{
+                  if(position<=this.endNumber){
+                    var index1 = this.queryParams.isDelete.findIndex(i=>{
+                        return i == item.patentNo
+                      })
+                      if(index1!=-1){
+                        this.queryParams.isDelete.splice(index1,1)
+                      }
+                  }else{
+                    var index2 = this.queryParams.isAdd.findIndex(i=>{
+                      return i == item.patentNo
+                    })
+                    if(index2==-1){
+                      this.queryParams.isAdd.push(item.patentNo)
+                    }
+                  }
+                }
+              }else{
+                var index2 = this.queryParams.isAdd.findIndex(i=>{
+                  return i == item.patentNo
+                })
+                if(index2==-1){
+                  this.queryParams.isAdd.push(item.patentNo)
+                }
+              }
+            })
+            this.getSelectedTotal()
+            this.getList()
+            break
+          case 1:
+            params.startNumber = 1;
+            params.endNumber = this.total
+            this.startNumber = 1
+            this.endNumber = this.total
+            // this.commonSwitch()
+            // this.quickSelect = true
+            // break
+          case 2:
+            // 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.selectNumberLoading = false
+            //   this.getList()
+            // }).catch(error => {
+            //   this.selectNumberLoading = false
+            // })
+            this.queryParams.isDelete = []
+            this.queryParams.isAdd = []
+            if (type == 2) {
+              if (!Number(this.queryParams.startNumber)||!Number(this.queryParams.endNumber)) {
+                this.queryParams.endNumber =this.endNumber>0?this.endNumber:this.total
+                this.queryParams.startNumber =this.endNumber>0?this.startNumber:1
+                break;
+              }
+              this.startNumber = this.queryParams.startNumber
+              this.endNumber = this.queryParams.endNumber
+              
+            }
+            
+            // this.checkList =JSON.parse(JSON.stringify(this.queryParams.selected)) 
+            this.checkList=[]
+            this.queryParams.isDelete = []
+            this.queryParams.isAdd = []
+            await this.getList()
+            this.commonSwitch()
+            this.quickSelect = true
+            break
+        }
+      },
+      commonSwitch(){
+        //console.log(this.queryParams.startNumber,this.queryParams.endNumber)
+              if(this.queryParams.size*this.queryParams.current>=this.startNumber ){
+                if(this.queryParams.size*this.queryParams.current>=this.endNumber){
+                  if(this.queryParams.size*(this.queryParams.current-1)+1<=this.startNumber){
+                    var a = this.startNumber-(this.queryParams.size*(this.queryParams.current-1)+1)
+                    var b = this.endNumber-(this.queryParams.size*(this.queryParams.current-1)+1)
+                    //console.log(a,b)
+                    for(var y=a;y<=b;y++){
+                      //console.log(this.tableData[y])
+                     this.toIsDelete(this.tableData[y].patentNo,y)
+  
+                    }
+                  }else{
+                    var a = (this.queryParams.size*(this.queryParams.current-1)+1)-(this.queryParams.size*(this.queryParams.current-1)+1)
+                    var b = this.endNumber-(this.queryParams.size*(this.queryParams.current-1)+1)
+                    for(var y=a;y<=b;y++){
+                      this.toIsDelete(this.tableData[y].patentNo,y)
+  
+                    }
+                  }
+                }else{
+                  if(this.queryParams.size*(this.queryParams.current-1)+1<=this.startNumber){
+                    var a = this.startNumber-(this.queryParams.size*(this.queryParams.current-1)+1)
+                    var b = this.queryParams.size*this.queryParams.current-(this.queryParams.size*(this.queryParams.current-1)+1)
+                    for(var y=a;y<=b;y++){
+                      this.toIsDelete(this.tableData[y].patentNo,y)
+  
+                    }
+                  }else{
+                    var a = (this.queryParams.size*(this.queryParams.current-1)+1)-(this.queryParams.size*(this.queryParams.current-1)+1)
+                    var b = this.queryParams.size*this.queryParams.current-(this.queryParams.size*(this.queryParams.current-1)+1)
+                    for(var y=a;y<=b;y++){
+                      this.toIsDelete(this.tableData[y].patentNo,y)
+                      
+                    }
+                  }
+                }
+              }
+             this.checkList = [...new Set(this.checkList)]
+             this.selected = this.checkList
+             this.getSelectedTotal()
+        // //console.log(this.checkList)
+            
+      },
+      toIsDelete(patentNo,y){
+        var index2 = this.queryParams.isDelete.findIndex(i=>{
+          return i==patentNo
+        })
+        if(index2!=-1){
+  
+        }else{
+          this.checkList.push(this.tableData[y].patentNo)
+        }
+        var index = this.queryParams.selected.findIndex(item=>{
+          return item == patentNo
+        })
+        if(index!=-1){
+          var index3 = this.queryParams.isDelete.findIndex(m=>{
+          return m==patentNo
+        })
+        if(index3!=-1){
+  
+        }else{
+          this.queryParams.isDelete.push(this.queryParams.selected[index])
+        }
+         
+        }
+  
+        
+      },
+      handleSelectNumber(type) {
+     
+        this.Switch(type)
+      
+      },
+  
+      handleCancelSelectNumber() {//取消选择
+        this.queryParams.selected = []
+        this.queryParams.isAdd = []
+        this.queryParams.isDelete = []
+        this.checkList = []
+        this.quickSelect = false
+        this.startNumber = 1
+        this.queryParams.startNumber = 1
+        this.queryParams.endNumber = this.total
+        this.endNumber = 0
+        this.selectedTotal = 0
+        // this.getList()
+      },
+      getFunInfo(val) {
+        //console.log(this.quickSelect);
+        if(this.quickSelect){
+          var index4 = this.queryParams.selected.findIndex(item=>{
+              return item == val
+            }) 
+            if(index4!=-1){
+              var a = {
+                reportId:this.reportId,
+                patentNo:val
+              }
+              this.$api.deleteCompareNo(a).then(response=>{
+                if(response.code == 200){
+                          // this.getList()
+                   this.queryParams.selected.splice(index4,1)
+                }
+              })
+            
+           this.isFind(val)
+         
+        }else{
+          this.isFind(val)
+        }
+        }else{
+          var index = this.queryParams.selected.findIndex(item=>{
+            return item == val
+          }) 
+          if(index!=-1){
+            var a = {
+              reportId:this.reportId,
+              patentNo:val
+            }
+            this.$api.deleteCompareNo(a).then(response=>{
+              if(response.code == 200){
+                this.getList()
+              }
+            })
+          }else{
+            var index5 = this.queryParams.isAdd.findIndex(item=>{
+              return item == val
+            })
+            if(index5!=-1){
+              this.queryParams.isAdd.splice(index5,1)
+            }else{
+              this.queryParams.isAdd.push(val)
+            }
+            
+          }
+        }
+        this.getSelectedTotal()
+      },
+      isFind(val){
+        if(this.isFetch){
+            var index = this.selected.findIndex(item=>{
+            return item == val
+          })
+          if(index!=-1){
+            //console.log(val)
+              this.queryParams.isDelete.push(val)
+               this.selected.splice(index, 1)
+          }else{
+            var index2 = this.queryParams.isDelete.findIndex(i=>{
+              return i == val
+            })
+            if(index2!=-1){
+              this.queryParams.isDelete.splice(index2, 1)
+            }else{
+              var index3 = this.queryParams.isAdd.findIndex(m=>{
+                return m == val
+              })
+              if(index3!=-1){
+                 this.queryParams.isAdd.splice(index3,1)
+              }else{
+                this.queryParams.isAdd.push(val)
+              }
+            }
+          }
+          this.isFetch = false
+        }else{
+          var index3 = this.queryParams.isAdd.findIndex(m=>{
+                return m == val
+              })
+              if(index3!=-1){
+                this.queryParams.isAdd.splice(index3,1)
+              }else{
+                var index2 = this.queryParams.isDelete.findIndex(i=>{
+                  return i == val
+                })
+                if(index2!=-1){
+                   this.queryParams.isDelete.splice(index2, 1)
+                }else{
+                  // this.isFetch = true
+                  // this.getFunInfo()
+                  var index = this.selected.findIndex(item=>{
+                    return item == val
+                  })
+                  if(index!=-1){
+                    var index4 = this.queryParams.selected.findIndex(item=>{
+                      return item == val
+                    }) 
+                    if(index4!=-1){
+                      var a = {
+                        reportId:this.reportId,
+                        patentNo:val
+                      }
+                      this.$api.deleteCompareNo(a).then(response=>{
+                        if(response.code == 200){
+                          // this.getList()
+                           this.queryParams.selected.splice(index4,1)
+                        }
+                      })
+                    }else{
+                      this.queryParams.isDelete.push(val)
+                       this.selected.splice(index, 1)
+                    }
+                  }else{
+                    this.queryParams.isAdd.push(val)
+                  }
+                }
+              }
+          }
+      },
+     
+      getRowKeys(row) {
+        return row.id
+      },
+      // handleSelectionChange(val) {
+      //   this.checkList = val
+      // },
+      async handleCurrentChange(val) {//分页
+        this.queryParams.current = val;
+        // this.checkList = []
+        // this.queryParams.endNumber=0
+       await this.getList();
+        if(this.quickSelect){
+          this.commonSwitch()
+        }
+        
+      },
+      
+      savePatentList() {//保存
+        let add = {
+         isDelete:this.queryParams.isDelete,
+         isAdd:this.queryParams.isAdd,
+         startNumber:this.startNumber,
+         endNumber:this.endNumber,
+         reportId:this.reportId
+        }
+        this.queryParams.startNumber=this.startNumber
+        this.queryParams.endNumber=this.endNumber
+        this.queryParams.reportId=this.reportId
+        this.btnLoading = true//保存调试后放开
+        // //console.log(add)
+        this.$api.addCompareFile(this.queryParams).then(res => {
+            //console.log(res);
+            if (res.code==200) {
+              this.btnLoading = false
+              this.startNumber = 1
+              this.endNumber = 0
+              this.selectedTotal = 0
+              this.quickSelect = false
+              this.queryParams.isAdd=[]
+              this.queryParams.isDelete=[]
+              this.checkList = []
+              this.getList()
+              this.$message({
+                message: '保存成功',
+                type: 'success'
+              });
+              // this.$emit("save", true);
+            }
+          })
+        // if (add.patentNos.length>0) {
+        //   this.$api.addCompareFile(add).then(res => {
+        //     //console.log(res);
+        //     if (res.code==200) {
+        //       this.$emit("save", true);
+        //     }
+        //   })
+        // } else {
+        //   this.$confirm('您未做勾选!点击确定将会进行下一步!', '温馨提示',  {
+        //       confirmButtonText: '确定',
+        //       cancelButtonText: '取消',
+        //       type: 'warning'
+        //   }).then(() => {//
+        //     this.$emit("save", true);
+        //   }).catch(() => {
+                    
+        //   });
+        // }
+       
+        
+      },
+      getList2() {
+        this.queryParams.current = 1
+        this.getList()
+      },
+     async getList(key) {
+       this.queryParams.reportId = this.reportId
+       let params = JSON.parse(JSON.stringify(this.queryParams))
+        //console.log(params);
+        params.tree.map(tree => {
+          let field = params.field.filter(item => item.key === tree.key)
+          if (field.length === 0) {
+            params.field.push(tree)
+          }
+        })
+       params.tree = undefined
+       //console.log(params);
+       this.$store.commit('SET_PATENT_PARAMS', params)
+        this.loading=true
+       await this.$api.getCompareFile(params).then(response => {
+      //  await this.$api.getPatentListPAS(params).then(response => {
+          this.loading = false
+          this.total = response.data.datas.total
+          // this.queryParams.endNumber =this.queryParams.endNumber==0? response.data.datas.total:this.queryParams.endNumber
+          this.queryParams.endNumber =this.endNumber>0?this.endNumber:response.data.datas.total
+          this.queryParams.startNumber =this.endNumber>0?this.startNumber:1
+  
+          this.tableData = response.data.datas.records
+          this.queryParams.selected = response.data.select
+          this.queryParams.selectedTotal = response.data.selectedTotal
+          // this.checkList =JSON.parse(JSON.stringify(this.queryParams.selected)) 
+          this.checkList =JSON.parse(JSON.stringify([...new Set(this.checkList.concat(this.queryParams.selected))])) 
+          this.selected = this.checkList
+          this.isFetch = true
+  
+  
+        
+        }).catch(error => {
+  
+        })
+      },
+      showPatent(even) {//选择下拉框
+        //console.log(even);
+      },
+    },
+    watch: {
+      'tableData'(val, val1) {
+        
+        this.$nextTick(() => {
+          this.tableOffSetHeight()
+        })
+      },
+      
+    }
+  }
+  </script>
+  
+  <style lang="scss" >
+  .btn1 {
+    background: #909399;
+  }
+  
+  .btn1:hover {
+  
+    background-color: #a4a7ab;
+  }
+  
+  .patent-fast-edit-popover {
+    padding: 0 !important;
+  
+    .btn {
+      color: #000;
+      line-height: 40px;
+      border-radius: 5px;
+      padding-left: 10px;
+      cursor: pointer;
+  
+      &:hover {
+        background: #adadad;
+        color: #fff;
+      }
+    }
+  
+    .disabled {
+      cursor: not-allowed !important;
+    }
+  
+    .bottom {
+      text-align: right;
+      color: #1e9fff;
+      line-height: 40px;
+      padding-left: 10px;
+      font-size: 18px;
+    }
+  
+    .el-divider--horizontal {
+      margin: 10px 0 !important;
+    }
+  
+    .select-number {
+      .el-input {
+        width: 70px;
+      }
+  
+      span {
+        padding: 0 3px;
+      }
+    }
+  
+  }
+  .patent-left{
+    margin-top: 69px;
+    overflow: hidden;
+    border-top: 1px solid rgb(228 231 237);
+  }
+  </style>

+ 23 - 0
RMS-FrontEnd/src/views/report/components/addPatentList/index.vue

@@ -0,0 +1,23 @@
+<template>
+    <div>
+        <addPatent :reportId="reportId"></addPatent>
+    </div>
+</template>
+<script>
+import addPatent from './addPatent.vue';
+export default {
+    components:{
+        addPatent
+    },
+    data(){
+        return{
+
+        }
+    },
+    computed:{
+        reportId(){
+            return this.$route.query.id
+        }
+    },
+}
+</script>

+ 13 - 0
RMS-FrontEnd/src/views/report/index.vue

@@ -297,12 +297,25 @@ export default {
             break
         case '9'://回避设计
             this.handleDetails(row)
+            break;
+        case '10'://添加对比文件
+            this.addPatentList(row)
             break
         case 'e':
           this.handleEdit(row)
           break
       }
     },
+    addPatentList(row){
+      this.$s.setSession('reportMessage1',row)
+      var router = this.$router.resolve({
+            path: '/addPatentList' ,
+            query: {
+              id: row.id
+            }
+          })
+      window.open(router.href, '_blank');
+    },
     handleFile(row){
       this.$refs.projectFileDrawer.open(row.id,1)
     },