zhuliu 1 рік тому
батько
коміт
016ca909ff

+ 10 - 0
src/router/index.js

@@ -269,6 +269,16 @@ const routes = [
             },
             component: () => import('@/views/report/components/details'),
           },
+          {
+            path:'/reportPatentList',
+            name:'reportPatentList',
+            meta: {
+              title: '报告专利清单',
+              sign:'reportPatentList',
+              belong:'AllReport'
+            },
+            component: () => import('@/views/report/components/patentList/index.vue'),
+          },
       //     //无效分析、第三方意见、稳定性分析
       //     {
       //       path: '/InvalidIndex',

+ 20 - 8
src/views/project/patentCollection/components/mixins/index.js

@@ -27,13 +27,18 @@ export const projectData = {
     //专利号
     projectId:{
       default:0
+    },
+    //选择专利
+    refresh:{
+      default:false
     }
   },
   data() {
     return {
-      
+      // refresh:false
     }
   },
+
   mounted() {
     
   },
@@ -49,6 +54,19 @@ export const projectData = {
         }
       )
     },
+    changeSelect(patent){
+      const index1 = this.patentNoList.indexOf(patent.patentNo)
+      if (index1 === -1) {
+        if(this.projectId){
+          this.patentNoList.push(patent.patentNo)
+        }else{
+          this.patentNoList.push(patent.applicationNo)
+        }
+        
+      } else {
+        this.patentNoList.splice(index1, 1)
+      }
+    }
   },
 }
 
@@ -64,7 +82,7 @@ export const handleData = {
   },
   data() {
     return {
-      refresh: true,
+      // refresh: true,
       click: false,
     }
   },
@@ -157,12 +175,6 @@ export const handleData = {
           break
       }
     },
-    // 点击专利号进行跳转
-    handleLink(row) {
-      
-      // window.open(router.href, '_blank');
-    },
-
     // 勾选中专利进行处理
     changeSelect(patent) {
       this.click = true

+ 8 - 1
src/views/project/patentCollection/components/views/Table.vue

@@ -3,7 +3,14 @@
     <el-table :data="tableData" border style="width: 100%" header-row-class-name="custom-table-header" :maxHeight="tableHeight" @sort-change="sortChange">
       <el-table-column label="#" width="60" type="index" align="center">
         <template slot-scope="scope">
-          <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+          <div v-if="refresh">
+            <el-checkbox :label="scope.row.id" @change="changeSelect(scope.row)" :checked="patentNoList.indexOf(scope.row.patentNo)!== -1 || patentNoList.indexOf(scope.row.applicationNo)!== -1 ">
+              <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+            </el-checkbox>
+          </div>
+          <div v-else>
+            <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
+          </div>
         </template>
       </el-table-column>
 

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

@@ -99,14 +99,57 @@
             <component ref="patentViewList" :is="viewSelected" @download="handleDownload" @change-read="handleChangeRead"
               :projectId="projectId" :selected.sync="queryParams.selected" :patentNoList.sync="patentNoList"
               :column="customList" @index-setting="handleIndexSetting" @on-sort="handleSort" :queryParams="queryParams"
-              :tableData="tableData"></component>
+              :tableData="tableData" :refresh='refresh'></component>
           </div>
         </el-main>
-        <el-footer class="pagination">
-          <el-pagination background layout="total, sizes, prev, pager, next, jumper"
+        <el-footer class="pagination" style="display:flex;justify-content:space-between;align-items:center">
+          <div style="display:flex;align-items:center">
+            <span v-if="patentNoList.length>0" >
+              已勾选 <b>{{ patentNoList.length }}</b> 条
+            </span>
+            <el-popover placement="bottom" title="" width="220" trigger="click">
+              <el-main class="patent-fast-edit-popover" v-loading="selectNumberLoading">
+                <div class="btn" @click="handleCancelSelectNumber">取消选择</div>
+                <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" @change="change1"></el-input>
+                  <span>到</span>
+                  <el-input size="mini" v-model="queryParams.endNumber" @change="change2"></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>
+            
+              <div v-show="patentNoList.length" class="margin-left_10">
+                <el-dropdown size="medium">
+                  <el-button type="primary" size="small" :disabled="!$permission('/workspace/folder/batchOperation')">
+                    批量操作<i class="el-icon-arrow-down el-icon--right"></i>
+                  </el-button>
+                  <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item @click.native="handleRead(1)" :disabled="!$permission('/workspace/folder/isRead')">已读</el-dropdown-item>
+                    <el-dropdown-item @click.native="handleRead(0)" :disabled="!$permission('/workspace/folder/isRead')">未读</el-dropdown-item>
+                    <el-dropdown-item @click.native="handleIndex" :disabled="!($permission('/workspace/folder/batchOperation/batchIndexing') && $r(projectId,[1,2]))">批量标引</el-dropdown-item>
+                    <el-dropdown-item @click.native="checkPatentWorth"  v-if="patentNoList.length && $permission('/workspace/patent/worth')">价值曲线</el-dropdown-item>
+                  </el-dropdown-menu>
+                </el-dropdown>
+              </div>
+              <div class="margin-left_10">
+              <el-checkbox @change="changeRefresh" :checked="refresh">
+                <span>编辑</span>
+              </el-checkbox>
+            </div>
+          </div>
+          <div>
+            <el-pagination background layout="total, sizes, prev, pager, next, jumper"
             :current-page.sync="queryParams.current" :page-sizes="sizeArr" :page-size.sync="queryParams.size"
             @current-change="handleCurrentChange" @size-change="getList" :total="total">
           </el-pagination>
+          </div>
+          
         </el-footer>
       </el-container>
     </el-container>
@@ -194,6 +237,12 @@ export default {
       loading: false,
       // 数据
       tableData: [],
+      //选择总数
+      selectedTotal:0,
+      //选择专利加载
+      selectNumberLoading:false,
+      //是否编辑
+      refresh:false,
     };
   },
   watch: {},
@@ -445,7 +494,122 @@ export default {
         this.$refs.patentIndexSetting.open(this.queryParams.projectId, patent, field)
       }
     },
+
+    //取消编辑
+    changeRefresh(){
+      this.patentNoList = []
+      this.refresh = !this.refresh
+    },
+    //取消选择
+    handleCancelSelectNumber() {
+        this.patentNoList = [];
+        this.queryParams.isAdd = []
+        this.queryParams.isDelete = []
+        this.startNumber = 1
+        this.queryParams.startNumber = 1
+        this.queryParams.endNumber = this.total
+        this.endNumber = 0
+        this.quickSelect = false
+        this.selectedTotal = 0
+      // this.getList()
+    },
+    //开始条数校验
+    change1(val) {
+      if (!isNaN(val)) {
+         if (!val || val <= 0) {
+          this.queryParams.startNumber=1
+        } else {
+          if (this.queryParams.startNumber>this.total) {
+            this.queryParams.startNumber=this.total
+          }
+        }
+      } else {
+        this.queryParams.startNumber=1
+      }
+    },
+     //结束条数校验
+    change2(val) {
+      if (!isNaN(val)) {
+        if (!val || val <= 0) {
+          this.queryParams.endNumber = this.total
+        } else {
+          if (this.queryParams.endNumber > this.total) {
+            this.queryParams.endNumber = this.total
+          }
+        }
+      }else {
+        this.queryParams.endNumber=this.total
+      }
+    },
+     //快速选择
+     handleSelectNumber(type) {
+      switch (type) {
+        case 0: //本页选择
+          this.patentNoList = [...new Set(this.patentNoList.concat(this.$store.state.patent.records.map((item) => item.applicationNo))),];
+          this.queryParams.isAdd = [...new Set(this.queryParams.isAdd.concat(this.$store.state.patent.records.map((item) => item.applicationNo))),];
+          break;
+        case 1: //全部选择
+          this.startNumber = 1;
+          this.endNumber = this.total;
+          this.$set(this.queryParams,'startNumber',1)
+          this.$set(this.queryParams,'endNumber',this.total)
+        case 2: //范围选择
+          this.queryParams.isDelete = [];
+          this.queryParams.isAdd = [];
+          this.patentNoList = [];
+          this.quickSelect = true;
+          if (type == 2) {
+            if (!Number(this.queryParams.startNumber) ||!Number(this.queryParams.endNumber)) {
+              this.$set(this.queryParams,'startNumber',this.endNumber > 0 ? this.startNumber : 1)
+              this.$set(this.queryParams,'endNumber',this.endNumber > 0 ? this.endNumber : this.total)
+              break;
+            }
+            this.startNumber = this.queryParams.startNumber;
+            this.endNumber = this.queryParams.endNumber;
+          }
+          this.commonSwitch();
+          break;
+      }
+      this.getSelectedTotal()
+    },
   },
 };
 </script>
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.patent-fast-edit-popover {
+  padding: 0 !important;
+  .btn {
+    color: #000;
+    line-height: 30px;
+    border-radius: 5px;
+    padding-left: 10px;
+    text-align: left;
+    font-size: 14px;
+    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;
+    }
+  }
+}</style>

+ 13 - 2
src/views/report/components/index.vue

@@ -505,8 +505,8 @@ export default {
         case '9'://回避设计
           this.handleDetails(row, '回避设计')
           break;
-        case '10'://添加对比文件
-          this.addPatentList(row)
+        case '10'://对比文件
+          this.patentList(row)
           break
         case '11'://完成报告
           this.completeReport(row)
@@ -528,6 +528,17 @@ export default {
           break
       }
     },
+    //跳转到专利列表页面
+    patentList(row){
+      this.$router.push(
+        {
+          path:'/reportPatentList',
+          query:{
+            projectId:row.id
+          }
+        }
+      )
+    },
     // 跳转录入产品信息页面
     toInformationEntry(row) {
       var routerReport = this.$router.resolve({

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

@@ -0,0 +1,30 @@
+<template>
+  <div>
+    <patentList :projectId="projectId"></patentList>
+  </div>
+</template>
+
+<script>
+import patentList from './patentList.vue';
+export default {
+  components: {
+    patentList
+  },
+  props: {},
+  data() {
+    return {
+    };
+  },
+  watch: {},
+  computed: {
+    projectId(){
+        return this.$route.query.projectId || 0
+    }
+  },
+  created() {},
+  mounted() {},
+  methods: {},
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 182 - 0
src/views/report/components/patentList/patentList.vue

@@ -0,0 +1,182 @@
+<template>
+  <div class="height_100">
+    <div class="height_100" style="display:flex">
+        <div class="height_100 left">
+            <el-container>
+                <el-header style="padding:0 10px !important;">
+                    <div id="step1">
+                        <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption"></mySearch>
+                    </div>
+                    <div>
+                        <el-dropdown id="step4" trigger="click" split-button type="primary" size="small" @click="handleFieldManage" @command="handleCommand($event)">
+                            <span v-disabled="false">显示栏位管理</span>
+                            <el-dropdown-menu slot="dropdown" class="text-align_center">
+                                <el-dropdown-item command="1">任务分配</el-dropdown-item>
+                                <el-dropdown-item>
+                                    <el-dropdown trigger="hover" placement="right-start" @command="handleCommand($event)">
+                                        <p>导入专利<i class="el-icon-arrow-right el-icon--right"></i></p>
+                                        <el-dropdown-menu slot="dropdown">
+                                            <el-dropdown-item command="2">专利号导入</el-dropdown-item>
+                                            <el-dropdown-item command="3">Excel导入</el-dropdown-item>
+                                            <el-dropdown-item command="4">检索导入</el-dropdown-item>
+                                        </el-dropdown-menu>
+                                    </el-dropdown>
+                                </el-dropdown-item>
+                            </el-dropdown-menu>
+                        </el-dropdown>
+                    </div>
+                </el-header>
+                <el-main>
+                    <component :is='components' :tableData="tableData" :column="fieldList" :projectId="projectId" @on-sort="handleSort" :queryParams="queryParams"></component>
+                </el-main>
+                <el-footer class="pagination">
+                    <el-pagination background layout="total, sizes, prev, pager, next, jumper"
+                        :current-page.sync="queryParams.current" :page-sizes="sizeArr" :page-size.sync="queryParams.size"
+                        @current-change="handleCurrentChange" @size-change="getList" :total="total">
+                    </el-pagination>
+                </el-footer>
+            </el-container>
+        </div>
+        <div class="height_100 right" v-if="showRight"></div>
+    </div>
+    <field ref="field" type="patentProject" @getFieldList="getFieldList"></field>
+  </div>
+</template>
+
+<script>
+import field from '@/views/components/dialog/fields.vue';
+import PatentTableListView from '@/views/project/patentCollection/components/views/Table.vue'
+export default {
+  components: {
+    field,
+    PatentTableListView
+  },
+  props: {
+    projectId:{
+        default:0
+    }
+  },
+  data() {
+    return {
+        //显示组件
+        components:'PatentTableListView',
+        //显示右侧
+        showRight:false,
+        //检索字段
+        searchFiled: [],
+        //检索条件
+        searchOption: {},
+        //专利数据库数据总数
+        total: 0,
+        //分页信息
+        queryParams: {
+            size: 10,
+            current: 1,
+        },
+        //页大小
+        sizeArr: [10, 20, 30, 40, 50, 100],
+        //排序
+        sort: [
+            {
+                "orderBy": "createTime",
+                "orderType": 1
+            } 
+        ],
+        //专利列表
+        tableData:[],
+        //显示栏位
+        fieldList:[]
+    };
+  },
+  watch: {},
+  computed: {},
+  created() {},
+  async mounted() {
+    this.fieldList = await this.$commonJS.getCustomField('patent')
+    this.getList()
+  },
+  methods: {
+    search(){
+        let params = {}
+        val.forEach(item => {
+            if (item.type == 3) {
+            params[item.value] = item.searchValue.map(itemValue => {
+                return itemValue.value
+            })
+            } else {
+            params[item.value] = item.searchValue.label
+            }
+        })
+        // 返回字符串
+        this.searchOption = params
+        // 调用查询接口
+        this.queryParams.current = 1
+        this.getList()
+    },
+    //获取专利列表
+    getList(){
+
+    },
+    //排序
+    handleSort({ column, prop, order }) {
+      //如需要多个字段排序,则不需要清空
+      var params = {
+        sort: this.sort,
+        column,
+        prop,
+        order,
+      }
+      this.sort = this.$commonJS.getSortData(params)
+      this.queryParams.current = 1
+      this.getList()
+    },
+    //分页
+    handleCurrentChange(val) {
+      this.queryParams.current = val;
+      this.getList();
+    },
+    //下拉按钮
+    handleCommand(option){
+        switch(option){
+            case '1'://分配任务
+
+                break;
+            case '2'://专利号导入
+                this.patentImport(1)
+                break;
+            case '3'://excel导入
+                this.patentImport(2)
+                break;
+            case '4'://检索导入
+                this.patentImport(4)
+                break;
+        }
+    },
+    //专利导入
+    patentImport(type){
+      var form = {
+        importToId:this.projectId,
+        importToType:0,
+        type:type,
+      }
+      this.$commonJS.toImportParent(form,type)
+    },
+    //显示栏位管理
+    handleFieldManage(){
+        this.$refs.field.open(this.fieldList)
+    },
+    //获取自定义栏位
+    getFieldList(data) {
+      this.fieldList = data
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.left{
+    width:100%
+}
+.right{
+    width:100%
+}
+</style>

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

@@ -41,7 +41,7 @@
               <el-dropdown-item command="8">专利与产品关联比对</el-dropdown-item>
               <!-- <el-dropdown-item command="9" v-if="(scope.row.reportType == 5 && [2].includes(scope.row.status)) && $reportPermission(scope.row.id,[0,1])"> 规避方案填写</el-dropdown-item> -->
               <el-dropdown-item command="9" > 规避方案填写</el-dropdown-item>
-              <el-dropdown-item command="10" v-if="[0,1,2,3].includes(scope.row.reportType)&&[2].includes(scope.row.status) && $reportPermission(scope.row.id,[0,1])"> 相关对比文件</el-dropdown-item>
+              <el-dropdown-item command="10" v-if="[0,1,2,3,4].includes(scope.row.reportType)&&[2,3].includes(scope.row.status) && $reportPermission(scope.row.id,[0,1])"> 相关对比文件</el-dropdown-item>
               <el-dropdown-item command="11" v-if="[2].includes(scope.row.status) && $reportPermission(scope.row.id,[0,1])"> 完成报告</el-dropdown-item>
               <el-dropdown-item command="12" v-if="[3].includes(scope.row.status) && $reportPermission(scope.row.id,[0,1])">添加追踪报告</el-dropdown-item>
               <el-dropdown-item command="13" v-if="(scope.row.reportType == 7 && [2,3].includes(scope.row.status)) && $reportPermission(scope.row.id,[0,1])">添加无效理由和证据</el-dropdown-item>