zhuhao 1 gadu atpakaļ
vecāks
revīzija
374c5dff75

+ 26 - 2
src/api/newApi/patent.js

@@ -100,8 +100,8 @@ export default {
    * @param {*} data 
    * @returns 
    */
-  queryExternalClaim(params) {
-    return axios.get("/xiaoshi/patentStar/queryExternalClaim", { params });
+  queryExternalClaim(data) {
+    return axios.post("/xiaoshi/patentStar/queryExternalClaim", data);
   },
   /**
    * 专利详情外部(检索)查询权利要求
@@ -111,4 +111,28 @@ export default {
   queryExternalDetail(data) {
     return axios.post("/xiaoshi/patentStar/queryExternalDetail", data);
   },
+  /**
+   * 专利详情外部(检索)获得中国专利pdf
+   * @param {*} params 
+   * @returns 
+   */
+  getCnPdf(params) {
+    return axios.get("/xiaoshi/patentStar/getCnPdf", {params});
+  },
+  /**
+   * 专利详情外部(检索)获得中国专利pdf全文文本
+   * @param {*} params 
+   * @returns 
+   */
+  getCnFullText(params) {
+    return axios.get("/xiaoshi/patentStar/getCnFullText", {params});
+  },
+  /**
+   * 专利详情内部获得中国专利pdf
+   * @param {*} params 
+   * @returns 
+   */
+  getTextPdf(params) {
+    return axios.get("/xiaoshi/patent/getTextPdf", {params});
+  },
 }

+ 3 - 3
src/views/project/patentCollection/components/dialog/PatentBatchIndex.vue

@@ -19,14 +19,14 @@
                   <el-date-picker v-model="item.text" @change="changeOption(item)" value-format="yyyy-MM-dd" type="date"
                     size="small" placeholder="选择日期" class="width_100"></el-date-picker>
                 </template>
-                <template v-if="item.type === 4">
+                <!-- <template v-if="item.type === 4">
                   <el-radio-group v-model="item.selected" @change="changeOption(item)">
                     <div v-for="option in item.option" :key="option.id">
                       <el-radio :label="option.id">{{ option.name }}</el-radio>
                     </div>
                   </el-radio-group>
-                </template>
-                <template v-if="item.type === 5">
+                </template> -->
+                <template v-if="item.type === 5 || item.type === 4">
                   <el-checkbox-group v-model="item.selected" @change="changeOption(item)">
                     <div v-for="option in item.option" :key="option.id">
                       <el-checkbox :label="option.id">{{ option.name }}</el-checkbox>

+ 119 - 89
src/views/project/patentCollection/components/drawer/MergeApplicant.vue

@@ -6,23 +6,10 @@
       <el-container class="patent-applicant-merge">
         <el-header style="display:flex;align-items:center;justify-content: space-between;">
           <div>
-            <el-form :inline="true" class="margin-left_20">
-              <el-form-item label="名称">
-                <el-input v-model="queryParams.name" size="small" placeholder="请输入名称"></el-input>
-              </el-form-item>
-              <el-form-item label="国家">
-                <el-select v-model="queryParams.country" size="small" placeholder="请选择" clearable filterable>
-                  <el-option v-for="(item, index) in commonData.COUNTRIES" :label="item.label"
-                    :value="item.value"></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item>
-                <el-button type="primary" size="small" @click="getList">查询</el-button>
-                <!-- <el-button type="primary" size="small" @click="handleAdd()" :disabled="!$permission('/workspace/folder/merge/applicationMerge/add')">新增</el-button> -->
-              </el-form-item>
-            </el-form>
+            <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
+            </mySearch>
           </div>
-          <div style="padding-right: 10px;">
+          <div>
             <el-button type="primary" size="small" @click="handleAdd()">新增</el-button>
           </div>
         </el-header>
@@ -38,13 +25,11 @@
             <el-table-column label="操作" align="center" width="150">
               <template slot-scope="scope">
                 <el-dropdown split-button type="primary" size="small">
-                  <span @click="handleEdit(scope.row)" v-if="$permission('/workspace/folder/merge/applicationMerge/modify')">
+                  <span @click="handleEdit(scope.row)"
+                    v-if="$permission('/workspace/folder/merge/applicationMerge/modify')">
                     编辑</span>
                   <span v-else :disabled="true">编辑</span>
                   <el-dropdown-menu slot="dropdown" class="text-align_center">
-                    <!-- <el-dropdown-item @click.native="handleSelect(scope.row)" :disabled="!$permission('/workspace/folder/merge/applicationMerge/addApplication')">添加申请人</el-dropdown-item> -->
-                    <el-dropdown-item @click.native="handleExist(scope.row)"
-                      :disabled="!$permission('/workspace/folder/merge/applicationMerge/merged')">已合并</el-dropdown-item>
                     <el-dropdown-item divided class="color-red" @click.native="handleDelete(scope.row)"
                       :disabled="!$permission('/workspace/folder/merge/applicationMerge/delete')">删除</el-dropdown-item>
                   </el-dropdown-menu>
@@ -63,70 +48,91 @@
       </el-container>
     </el-drawer>
 
-    <merge-applicant-exist-dialog ref="mergeApplicantExistDialog" @close="close2" />
-
-    <!-- <merge-applicant-select-dialog ref="mergeApplicantSelectDialog" @close="close2" /> -->
-
-    <merge-applicant-form-dialog ref="mergeApplicantFormDialog" @close="close2" />
+    <mergeDialog ref="mergeDialog" :projectId="projectId"></mergeDialog>
   </div>
 </template>
 
 <script>
-import MergeApplicantExistDialog from "../dialog/MergeApplicantExist";
-import MergeApplicantFormDialog from "../dialog/MergeApplicantForm";
-
+import mergeDialog from './merge.vue'
 export default {
   components: {
-    // MergeApplicantSelectDialog,
-    MergeApplicantFormDialog,
-    MergeApplicantExistDialog
+    mergeDialog,
   },
   data() {
     return {
       drawer: false,
       loading: false,
       total: 0,
+      // 表格数据源
       tableData: [],
       projectId: 0,
-      commonData: {},
       queryParams: {
-        name: '',
-        country: '',
-        address: '',
         pageSize: 10,
         pageNum: 1,
-        projectId: 0,
-        // order: 'desc',
-        prop: 'id',
-        from: 'merge'
       },
       addressIds: [],
-      areaTree: []
+      //检索字段
+      searchFiled: [
+        {
+          label: '名称',
+          value: 'name',
+          type: 'String',
+        }
+      ],
+      //检索条件
+      searchOption: {},
     }
   },
   mounted() {
   },
   methods: {
+    // 子组件传来的消息
+    close2() {
+      this.getList()
+    },
+    // 打开编辑合并申请人弹窗
+    handleEdit(row) {
+      row.mergeType = 2
+      this.$refs.mergeDialog.open(row, '编辑合并')
+    },
+    // 打开新增弹窗
+    handleAdd() {
+      this.$refs.mergeDialog.open({
+        mergeType: 2,
+      }, '新增合并')
+    },
     // 打开抽屉弹窗
     open(projectId) {
       this.projectId = projectId
-      this.queryParams.projectId = projectId
       this.drawer = true
       this.getList()
-      // this.getCommonData()
-      // this.getAreaList()
     },
-    // 关闭抽屉弹窗
-    close() {
-      this.drawer = false
-      this.$emit('mergeClose')
+    //获取检索条件检索
+    search(val) {
+      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 = this.$commonJS.ArrayToArray(val)
+      // 调用查询接口
+      this.queryParams.current = 1
+      this.getList()
     },
     // 获取表格数据
     getList() {
       this.loading = true
       let params = {
-        type: 0,
+       projectId:this.projectId,
         ...this.queryParams,
+        searchQuery: this.$commonJS.objectToString(this.searchOption || {}),//检索条件
+        type: 0,//2是发明人0是申请人/权利人
       }
       this.$api.selectMergePerson(params).then(response => {
         if (response.code == 200) {
@@ -134,7 +140,6 @@ export default {
           this.total = response.data.total
           this.loading = false
         }
-
       }).catch(error => {
         this.loading = false
       })
@@ -144,46 +149,10 @@ export default {
       this.queryParams.pageNum = val;
       this.getList();
     },
-    close2() {
-      this.getList()
-    },
-    // 获取国家和地区
-    getCommonData() {
-      this.$api.getCommonData({ keys: 'COUNTRIES' }).then(response => {
-        this.commonData = response.data
-      })
-    },
-    // 获取中国所有地区(省、自治区、特别行政区)
-    getAreaList() {
-      this.$api.getArea().then(response => {
-        this.areaTree = response.data
-      })
-    },
-    // 打开新增合并人弹窗
-    handleAdd() {
-      this.$refs.mergeApplicantFormDialog.open({
-        projectId: this.queryParams.projectId,
-        applicantIds: [],
-        name: '',
-        remark: '',
-        shortName: '',
-        country: '',
-        address: '',
-        addressIds: []
-      }, '新增合并申请人', this.commonData, this.areaTree)
-    },
-    // 打开添加申请人弹窗
-    // handleSelect(row) {
-    //   this.$refs.mergeApplicantSelectDialog.open(row)
-    // },
-    // 打开已合并申请人弹窗
-    handleExist(row) {
-      this.$refs.mergeApplicantExistDialog.open(row)
-    },
-    // 打开编辑合并申请人弹窗
-    handleEdit(row) {
-      row.projectId = this.projectId
-      this.$refs.mergeApplicantFormDialog.open(row, '编辑合并申请人', this.commonData, this.areaTree)
+    // 关闭抽屉弹窗
+    close() {
+      this.drawer = false
+      this.$emit('mergeClose')
     },
     // 删除表格数据
     handleDelete(row) {
@@ -204,6 +173,67 @@ export default {
         })
       })
     },
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    // 打开新增合并人弹窗
+    // handleAdd() {
+    //   this.$refs.mergeApplicantFormDialog.open({
+    //     projectId: this.queryParams.projectId,
+    //     applicantIds: [],
+    //     name: '',
+    //     remark: '',
+    //     shortName: '',
+    //     country: '',
+    //     address: '',
+    //     addressIds: []
+    //   }, '新增合并申请人', this.commonData, this.areaTree)
+    // },
+    // // 打开添加申请人弹窗
+    // // handleSelect(row) {
+    // //   this.$refs.mergeApplicantSelectDialog.open(row)
+    // // },
+    // // 打开已合并申请人弹窗
+    // handleExist(row) {
+    //   this.$refs.mergeApplicantExistDialog.open(row)
+    // },
+    // 打开编辑合并申请人弹窗
+    // handleEdit(row) {
+    //   this.$refs.mergeDialog.open(2)
+    //   // row.projectId = this.projectId
+    //   // this.$refs.mergeApplicantFormDialog.open(row, '编辑合并申请人', this.commonData, this.areaTree)
+    // },
+
   }
 }
 </script>

+ 103 - 46
src/views/project/patentCollection/components/drawer/MergeInventor.vue

@@ -1,20 +1,13 @@
 <template>
-  <!-- 合并发明人 -->
+  <!-- 合并发明人,合并权利人/申请人 -->
   <div class="">
     <el-drawer class="custom-drawer-form" title="合并发明人" size="1000px" :visible.sync="drawer" direction="rtl"
       :before-close="close" destroy-on-close>
       <el-container class="patent-inventor-merge">
         <el-header style="display:flex;align-items:center;justify-content: space-between;">
           <div>
-            <el-form :inline="true" class="margin-left_20">
-              <el-form-item label="名称">
-                <el-input v-model="queryParams.name" size="small" placeholder="请输入名称"></el-input>
-              </el-form-item>
-              <el-form-item>
-                <el-button type="primary" size="small" @click="getList">查询</el-button>
-                <!-- <el-button type="primary" size="small" @click="handleAdd()" :disabled="!$permission('/workspace/folder/merge/inventorMerge/add')">新增</el-button> -->
-              </el-form-item>
-            </el-form>
+            <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
+            </mySearch>
           </div>
           <div>
             <el-button type="primary" size="small" @click="handleAdd()">新增</el-button>
@@ -24,11 +17,11 @@
           <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">
             <el-table-column type="index" label="#" width="55" align="center"></el-table-column>
             <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="createTime" label="更新时间" align="center" show-overflow-tooltip>
-              <!-- <template slot-scope="scope">
-                <span>{{ $d(scope.row.updateTime) }}</span>
-              </template> -->
-            </el-table-column>
+            <template v-if="mergeType == 0">
+              <el-table-column prop="country" label="国家" align="center" show-overflow-tooltip></el-table-column>
+              <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip></el-table-column>
+            </template>
+            <el-table-column prop="createTime" label="更新时间" align="center" show-overflow-tooltip> </el-table-column>
             <el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
             <el-table-column label="操作" align="center" width="150">
               <template slot-scope="scope">
@@ -55,15 +48,15 @@
       </el-container>
     </el-drawer>
 
-    <patent-inventor-merge-manage-drawer ref="patentInventorMergeManageDrawer" @close="close2" />
+    <mergeDialog ref="mergeDialog" :projectId="projectId" @close="close2"></mergeDialog>
   </div>
 </template>
 
 <script>
-import PatentInventorMergeManageDrawer from "./MergeInventorManage";
+import mergeDialog from './merge.vue'
 export default {
   components: {
-    PatentInventorMergeManageDrawer
+    mergeDialog,
   },
   data() {
     return {
@@ -73,36 +66,74 @@ export default {
       tableData: [],
       projectId: 0,
       queryParams: {
-        name: '',
-        // merge: true,
         pageSize: 10,
         pageNum: 1,
-        projectId: 0,
-        // order: 'desc'
       },
+      //检索字段
+      searchFiled: [
+        {
+          label: '名称',
+          value: 'name',
+          type: 'String',
+        }
+      ],
+      //检索条件
+      searchOption: {},
+      // 判断是2发明人还是0权利人/申请人
+      mergeType:'',
     }
   },
   mounted() {
   },
   methods: {
+    // 子组件传来的消息
+    close2() {
+      this.getList()
+    },
+    // 编辑合并弹窗
+    handleEdit(row) {
+      row.mergeType = this.mergeType
+      this.$refs.mergeDialog.open(row, '编辑合并')
+    },
+    // 打开新增弹窗
+    handleAdd() {
+      this.$refs.mergeDialog.open({
+        mergeType: this.mergeType,
+      }, '新增合并')
+    },
     // 打开合并发明人抽屉弹窗
-    open(projectId) {
-      this.projectId = projectId
-      this.queryParams.projectId = projectId
+    open(obj) {
+      this.projectId = obj.projectId
+      this.mergeType = obj.type
       this.drawer = true
       this.getList()
     },
-    // 关闭抽屉弹窗
-    close() {
-      this.drawer = false
-      this.$emit('mergeClose')
+    //获取检索条件检索
+    search(val) {
+      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 = this.$commonJS.ArrayToArray(val)
+      // 调用查询接口
+      this.queryParams.current = 1
+      this.getList()
     },
     // 获取表格数据
     getList() {
       this.loading = true
       let params = {
-        type: 2,
+        projectId: this.projectId,
         ...this.queryParams,
+        searchQuery: this.$commonJS.objectToString(this.searchOption || {}),//检索条件
+        type: this.mergeType,//2是发明人0是申请人/权利人
       }
       this.$api.selectMergePerson(params).then(response => {
         if (response.code == 200) {
@@ -119,22 +150,10 @@ export default {
       this.queryParams.pageNum = val;
       this.getList();
     },
-    close2() {
-      this.getList()
-    },
-    // 打开新增弹窗
-    handleAdd() {
-      this.$refs.patentInventorMergeManageDrawer.open({
-        projectId: this.queryParams.projectId,
-        // mergedName: [],
-        name: '',
-        remark: '',
-      }, '新增合并')
-    },
-    // 编辑合并弹窗
-    handleEdit(row) {
-      row.projectId = this.projectId
-      this.$refs.patentInventorMergeManageDrawer.open(row, '编辑合并')
+    // 关闭抽屉弹窗
+    close() {
+      this.drawer = false
+      this.$emit('mergeClose')
     },
     // 删除表格数据
     handleDelete(row) {
@@ -159,6 +178,44 @@ export default {
         })
       })
     },
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    // 打开新增弹窗
+    // handleAdd() {
+    //   this.$refs.mergeDialog.open({
+    //     // mergedName: [],
+    //     mergeType: 1,
+    //   }, '新增合并')
+    //   // this.$refs.patentInventorMergeManageDrawer.open({
+    //   //   projectId: this.queryParams.projectId,
+    //   //   // mergedName: [],
+    //   //   name: '',
+    //   //   remark: '',
+    //   // }, '新增合并')
+    // },
+    // // 编辑合并弹窗
+    // handleEdit(row) {
+    //   row.mergeType = 1
+    //   this.$refs.mergeDialog.open(row, '编辑合并')
+    //   // row.projectId = this.projectId
+    //   // this.$refs.patentInventorMergeManageDrawer.open(row, '编辑合并')
+    // },
+
   }
 }
 </script>

+ 328 - 0
src/views/project/patentCollection/components/drawer/merge.vue

@@ -0,0 +1,328 @@
+<template>
+  <div>
+    <el-drawer class="custom-drawer-form" :title="title" size="1000px" :visible.sync="drawer" direction="rtl"
+      :before-close="close" destroy-on-close>
+      <el-container>
+        <el-header style="display:flex;align-items:center;justify-content: space-between;">
+          <!-- 检索 -->
+          <div>
+            <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
+            </mySearch>
+          </div>
+          <el-button type="primary" size="small" @click="handleMerge">合并</el-button>
+        </el-header>
+        <el-main class="container-common-main">
+          <el-table v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header"
+            v-el-table-infinite-scroll="getList" :infinite-scroll-distance="10" :infinite-scroll-disabled="disabled">
+            <el-table-column align="center" width="55">
+              <template slot-scope="scope">
+                <el-checkbox :label="scope.row.name" @change="onChange(scope.row)" v-if="!loading"
+                  :checked="mergedName.indexOf(scope.row.name) !== -1"></el-checkbox>
+              </template>
+            </el-table-column>
+            <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="remark" label="备注" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column label="操作" align="center" width="100">
+              <template slot-scope="scope">
+                <el-button type="primary" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-main>
+        <el-footer class="footer-common">
+          <el-button @click="close">关 闭</el-button>
+        </el-footer>
+      </el-container>
+    </el-drawer>
+
+    <el-dialog :title="mergeTitle" :visible.sync="visible" width="900px" append-to-body destroy-on-close
+      :before-close="close" top="3vh">
+      <div class="patent-applicant-merge-select">
+        <template v-if="title.indexOf('新增') == -1">
+          <el-divider content-position="left">基本信息</el-divider>
+          <el-button type="primary" size="small" @click="handleSave">保存</el-button>
+        </template>
+        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px">
+          <el-form-item label="名称" prop="name">
+            <el-input v-model="ruleForm.name" placeholder="请输入名称"></el-input>
+          </el-form-item>
+          <template v-if="mergeType == 0">
+            <el-form-item label="简称" prop="abbreviation">
+              <el-input v-model="ruleForm.abbreviation" placeholder="请输入名称"></el-input>
+            </el-form-item>
+            <el-form-item label="国家" prop="country">
+              <el-select v-model="ruleForm.country" placeholder="请选择" filterable class="width_100">
+                <el-option v-for="(item, index) in commonData.COUNTRIES" :label="item.label" :key="index"
+                  :value="item.value"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="地址" prop="addressIds">
+              <el-cascader @change="onChangeAddress" v-model="addressIds" :options="areaOptions" :props="props"
+                class="width_100"></el-cascader>
+            </el-form-item>
+          </template>
+          <el-form-item label="详细地址" prop="address">
+            <el-input v-model="ruleForm.address" placeholder="请输入地址"></el-input>
+          </el-form-item>
+          <el-form-item label="备注" prop="remark">
+            <el-input v-model="ruleForm.remark" placeholder="请输入备注" type="textarea"></el-input>
+          </el-form-item>
+        </el-form>
+        <template v-if="title.indexOf('新增') == -1">
+          <el-divider content-position="left">合并信息</el-divider>
+          <el-table :data="ruleForm.mergeTable" border header-row-class-name="custom-table-header">
+            <el-table-column prop="name" label="当前名称" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="shortName" label="标准名称" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="country" label="国家" align="center" width="150"
+              show-overflow-tooltip></el-table-column>
+            <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip></el-table-column>
+            <el-table-column label="操作" width="80" align="center">
+              <template slot-scope="scope">
+                <el-link type="danger" @click="handleDelete(scope.row)">移除</el-link>
+              </template>
+            </el-table-column>
+          </el-table>
+        </template>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeDialog">关 闭</el-button>
+        <el-button v-if="title.indexOf('新增') != -1" type="primary" @click="handleSave">确认</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+export default {
+  components: {
+  },
+  props: {
+    projectId: '',
+  },
+  data() {
+    return {
+      // 抽屉标题
+      title: '',
+      // 控制抽屉开关
+      drawer: false,
+      // 查询表格的loading
+      loading: false,
+      // 表格的数据源
+      tableData: [],
+      // 存放勾选的值
+      mergedName: [],
+      //检索字段
+      searchFiled: [
+        {
+          label: '名称',
+          value: 'name',
+          type: 'String',
+        }
+      ],
+      //检索条件
+      searchOption: {},
+      //禁用懒加载
+      disabled: true,
+      queryParams: {
+        pageSize: 10,
+      },
+      // 总条数
+      total: 0,
+      // 判断是2发明人还是0申请人与权利人
+      mergeType: null,
+      /**编辑合并人及基本信息 start*/
+      // 控制弹窗开关
+      visible: false,
+      // 弹窗的title
+      mergeTitle: '',
+      // 基本信息的数据
+      ruleForm: {},
+      // 校验
+      rules: {
+        name: [{ required: true, message: '请输入名称', trigger: 'blur' },],
+      },
+      // 国家
+      commonData: {},
+      // 省市区地址
+      areaOptions: [],
+      // 合并信息的数据源
+      // mergeTable: [],
+      // 国家
+      commonData: {},
+      // 地区
+      areaTree: [],
+      /**编辑合并人及基本信息 end*/
+
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+    // 移除合并人员 
+    handleDelete(row) {
+      let params = {
+        projectId: this.projectId,
+        name: this.ruleForm.name,
+        item:row.name,
+      }
+      this.$confirm('此操作将删除该人员, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$api.dele(params).then(res => {
+          if (res.code == 200) {
+            this.$message.success('移除人员成功')
+            this.$emit('close')
+            // this.getMerge(this.ruleForm)
+          }
+        })
+      }).catch(() => {
+        this.$message.info('已取消操作');
+      });
+
+    },
+    // 查询合并的数据
+    getMerge(row) {
+      let params = {
+        projectId: this.projectId,
+        name: row.name,
+      }
+      this.$api.query(params).then(res => {
+        if (res.code == 200) {
+          this.ruleForm = res.data
+        }
+      })
+    },
+    // 编辑合并的信息
+    handleEdit(row) {
+      this.getMerge(row)
+      this.mergeTitle = '编辑合并'
+      this.visible = true
+    },
+    // 关闭弹窗
+    closeDialog() {
+      this.$refs.ruleForm.resetFields()
+      this.ruleForm = {}
+      this.visible = false
+    },
+    // 弹窗中的完成和保存事件
+    handleSave() {
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+          this.ruleForm.projectId = this.projectId
+          if (this.title.indexOf('新增') != -1) {//新增
+            this.ruleForm.projectId = this.projectId
+            this.ruleForm.mergedName = this.mergedName
+            this.$api.mergePerson(this.ruleForm).then(res => {
+              if (res.code == 200) {
+                this.$message.success('合并成功')
+                this.$emit('close')
+                // this.getList()
+                this.closeDialog()
+                // this.close()
+              }
+            })
+          } else {
+            this.$api.save(this.ruleForm).then(res => {
+              if (res.code == 200) {
+                this.$message.success('编辑成功')
+                this.$emit('close')
+                // this.getList()
+              }
+            })
+          }
+        }
+      })
+    },
+    // 合并事件
+    handleMerge() {
+      if (this.mergedName.length === 0) {
+        let text = this.mergeType == 2 ? '请选择发明人' : '请选择申请人/权利人'
+        this.$message.error(text)
+        return false
+      }
+      if (this.title.indexOf('新增') != -1) {//新增
+        this.mergeTitle = '新增合并'
+        this.visible = true
+      } else {//编辑直接合并,不填写信息
+        let params = {
+          projectId: this.projectId,
+          mergedName: this.mergedName,
+        }
+        this.$api.save(params).then(res => {
+          if (res.code == 200) {
+            this.$message.success('合并成功')
+            this.$emit('close')
+            // this.getList()
+            // this.close()
+          }
+        })
+      }
+    },
+    // 打开抽屉
+    open(row, title) {
+      this.mergeType = row.mergeType
+      this.title = title
+      // this.getList()
+      this.drawer = true
+    },
+    //获取检索条件检索
+    search(val) {
+      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 = this.$commonJS.ArrayToArray(val)
+      // 调用查询接口
+      this.queryParams.current = 1
+      this.getList()
+    },
+    // 获取发明人或者申请人、权利人数据,包括已合并的数据
+    getList() {
+      let params = {
+        ...this.queryParams,//分页信息
+        searchQuery: this.$commonJS.objectToString(this.searchOption || {}),//检索条件
+        projectId: this.projectId,//项目id
+      }
+      this.$api.query(params).then(res => {
+        if (res.code == 200) {
+          this.tableData = res.data.data
+          this.total = res.data.total
+        }
+      }).catch(error => {
+        this.tableData = []
+        this.total = 0
+      })
+    },
+    // 关闭抽屉
+    close() {
+      this.drawer = false
+    },
+    // 获取国家和地区
+    getCommonData() {
+      this.$api.getCommonData({ keys: 'COUNTRIES' }).then(response => {
+        this.commonData = response.data
+      })
+    },
+    // 获取中国所有地区(省、自治区、特别行政区)
+    getAreaList() {
+      this.$api.getArea().then(response => {
+        this.areaTree = response.data
+      })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 10 - 14
src/views/project/patentCollection/index.vue

@@ -82,8 +82,8 @@
                         :disabled="!($permission('/workspace/folder/merge/inventorMerge') && $r(projectId, [1, 2]))">发明人</el-dropdown-item>
                       <el-dropdown-item @click.native="handleMerge"
                         :disabled="!($permission('/workspace/folder/merge/applicationMerge') && $r(projectId, [1, 2]))">申请人/权利人</el-dropdown-item> -->
-                      <el-dropdown-item @click.native="handleMerge2">发明人</el-dropdown-item>
-                      <el-dropdown-item @click.native="handleMerge">申请人/权利人</el-dropdown-item>
+                      <el-dropdown-item @click.native="handleMerge(2)">发明人</el-dropdown-item>
+                      <el-dropdown-item @click.native="handleMerge(0)">申请人/权利人</el-dropdown-item>
                     </el-dropdown-menu>
                   </el-dropdown>
                 </el-dropdown-item>
@@ -182,9 +182,7 @@
     <addAndEditReport ref="addAndEditReport"></addAndEditReport>
     <!-- 批量那个标引 -->
     <PatentBatchIndexVue ref="PatentBatchIndexVue" :projectId="projectId"></PatentBatchIndexVue>
-    <!-- 合并权利人、申请人 -->
-    <patentApplicantMergeDrawer ref="patentApplicantMergeDrawer" @mergeClose="mergeClose"></patentApplicantMergeDrawer>
-    <!-- 合并发明人 -->
+    <!-- 合并发明人/合并权利人、申请人 -->
     <patentInventorMergeDrawer ref="patentInventorMergeDrawer" @mergeClose="mergeClose"></patentInventorMergeDrawer>
   </div>
 </template>
@@ -203,7 +201,6 @@ import searchPatent from '@/views/report/components/patentList/components/search
 import reportFileDrawer from '@/views/report/components/drawer/reportFileDrawer.vue'
 import addAndEditReport from '@/views/report/components/dialog/addAndEditReport.vue'
 import PatentBatchIndexVue from './components/dialog/PatentBatchIndex.vue'
-import patentApplicantMergeDrawer from './components/drawer/MergeApplicant.vue'
 import patentInventorMergeDrawer from './components/drawer/MergeInventor.vue'
 export default {
   mixins: [fastSelectPatent],
@@ -218,7 +215,6 @@ export default {
     reportFileDrawer,
     addAndEditReport,
     PatentBatchIndexVue,
-    patentApplicantMergeDrawer,
     patentInventorMergeDrawer,
   },
   props: {},
@@ -599,13 +595,13 @@ export default {
       })
       window.open(router.href, '_blank');
     },
-    //合并申请人、权利人
-    handleMerge() {
-      this.$refs.patentApplicantMergeDrawer.open(this.projectId)
-    },
-    //合并发明人
-    handleMerge2() {
-      this.$refs.patentInventorMergeDrawer.open(this.projectId)
+    //合并发明人//合并申请人、权利人
+    handleMerge(type) {
+      let obj={
+        projectId: this.projectId,
+        type:type
+      }
+      this.$refs.patentInventorMergeDrawer.open(obj)
     },
     // 合并发明人、申请人、权利人后子组件发送的消息
     mergeClose() {

+ 35 - 33
src/views/project/patentDetails/components/patentMessage/PatentInstruction.vue

@@ -1,13 +1,14 @@
 <template>
-  <div class="patent-instruction height_100"  @mouseup="mouseup">
+  <div class="patent-instruction height_100" @mouseup="mouseup">
     <el-container>
       <el-header>
         <el-tabs v-model="name" @tab-click="handleClick">
-          <el-tab-pane v-for="item in tabs" :key="item.label" :label="item.label"  :name="item.name"></el-tab-pane>
+          <el-tab-pane v-for="item in tabs" :key="item.label" :label="item.label" :name="item.name"></el-tab-pane>
         </el-tabs>
       </el-header>
       <el-main>
-        <div v-html="getViewDom(patent.publicFullText, '说明书文本'+tabItem.label, tabItem.field)" :style="setStyle()" :data-type="'说明书文本'+tabItem.label"></div>
+        <div v-html="getViewDom(patent.publicFullText, '说明书文本' + tabItem.label, tabItem.field)" :style="setStyle()"
+          :data-type="'说明书文本' + tabItem.label"></div>
       </el-main>
     </el-container>
   </div>
@@ -21,31 +22,31 @@ export default {
     return {
       height: null,
       fullHeight: document.documentElement.clientHeight,
-      tabs:[
+      tabs: [
         {
-          label:'原文',
-          name:'0',
-          field:'manual'
+          label: '原文',
+          name: '0',
+          field: 'manual'
         },
         {
-          label:'译文',
-          name:'1',
-          field:'manualOut'
+          label: '译文',
+          name: '1',
+          field: 'manualOut'
         },
       ],
-      tabItem:{
-          label:'原文',
-          name:'0',
-          field:'manual'
-        },
+      tabItem: {
+        label: '原文',
+        name: '0',
+        field: 'manual'
+      },
     }
   },
   watch: {
-    fullHeight() {
-      this.refresh()
-    },
-    patentNo(){
-      if(!this.projectId){
+    // fullHeight() {
+    //   this.refresh()
+    // },
+    patentNo() {
+      if (!this.outside) {
         this.getData()
       }
     }
@@ -55,27 +56,27 @@ export default {
   },
   mounted() {
     this.handleResize()
-    if(!this.projectId){
+    if (!this.outside) {
       this.getData()
     }
   },
   methods: {
-    handleClick(){
-      this.tabItem  = this.tabs.find(item=>{
+    handleClick() {
+      this.tabItem = this.tabs.find(item => {
         return item.name == this.name
       })
     },
-    getData(){
+    getData() {
       var params = {
-            patentCell:2,
-            patentNo:this.patent.publicNo,
-            appNo:this.patent.applicationNo,
-          }
-        this.$api.getPatentPart(params).then(response=>{
-            if(response.code == 200){
-              this.$set(this.patent,'instruction',response.data.instruction)
-            }
-        })
+        patentCell: 2,
+        patentNo: this.patent.publicNo,
+        appNo: this.patent.rowApplicationNo,
+      }
+      this.$api.getCnFullText(params).then(response => {
+        if (response.code == 200) {
+          this.$set(this.patent, 'publicFullText', response.data)
+        }
+      })
     },
     handleResize(event) {
       this.fullHeight = document.documentElement.clientHeight
@@ -88,6 +89,7 @@ export default {
 <style lang="scss">
 .patent-instruction {
   margin-bottom: 20px;
+
   .common {
     overflow-y: auto;
     white-space: pre-line;

+ 95 - 110
src/views/project/patentDetails/components/patentMessage/PatentPDF.vue

@@ -1,19 +1,14 @@
 <template>
   <div class="patent-pdf height_100">
-    <div v-if="!sign">
-      <el-button-group class="float_left margin-bottom_10" v-if="patent.pdf && patent.pdf.length>1">
-        <el-button size="small" :type="pdfType === 2 ? 'primary' : ''" @click="handleSelect(2)">授权文档</el-button>
-        <el-button size="small" :type="pdfType === 1 ? 'primary' : ''" @click="handleSelect(1)">公开文档</el-button>
+    <div>
+      <el-button-group class="float_left margin-bottom_10" v-if="patent.pdf && patent.pdf.length > 1">
+        <el-button size="small" :type="pdfType === 1 ? 'primary' : ''" @click="handleSelect(1)">授权文档</el-button>
+        <el-button size="small" :type="pdfType === 0 ? 'primary' : ''" @click="handleSelect(0)">公开文档</el-button>
       </el-button-group>
-      <el-upload
-          class="float_right"
-          action="#"
-          :auto-upload="false"
-          :show-file-list="false"
-          :on-change="handleChange"
-          :multiple="false"
-      >
-        <el-button type="success" size="small" :loading="btnLoading" v-if="projectId" :disabled="!($permission('/workspace/details/updataInstruction') && $r(projectId,[1,2]))">上传文档</el-button>
+      <el-upload class="float_right" action="#" :auto-upload="false" :show-file-list="false" :on-change="handleChange"
+        :multiple="false">
+        <el-button type="success" size="small" :loading="btnLoading" v-if="projectId"
+          :disabled="!($permission('/workspace/details/updataInstruction') && $r(projectId, [1, 2]))">上传文档</el-button>
         <div slot="tip" class="el-upload__tip"></div>
       </el-upload>
     </div>
@@ -28,7 +23,7 @@
 import { patentDetails } from './mixins';
 export default {
   mixins: [patentDetails],
-  props: ['patent', 'projectId','pdfType1','sign','patentNo'],
+  props: ['patent', 'projectId', 'patentNo'],
   components: {},
   data() {
     return {
@@ -37,123 +32,111 @@ export default {
       height: 0,
       show: false,
       btnLoading: false,
-      pdfType: this.pdfType1||2,
+      pdfType: 1,
       pdf: null
     }
   },
   watch: {
-    fullHeight() {
-      if(this.projectId){
-        this.refresh()
-      }
-    },
     patent() {
-      if(this.projectId){
+      if (!this.outside) {
         this.refresh()
       }
-      
     },
-    patentId() {
-      if(this.projectId){
-        this.refresh()
-      }
-    },
-    patentNo(){
-      if(!this.projectId){
+    patentNo() {
+      if (this.outside) {
         this.getData()
       }
     }
   },
-  created(){
+  created() {
     window.addEventListener('resize', this.handleResize)
   },
   mounted() {
-    if(!this.projectId){
-      if(this.patent.pdf && this.patent.pdf.length>0){
-        this.show = false
-        this.height = (this.fullHeight - 230) + 'px'
-        var index = this.patent.pdf.findIndex(item => {
-          return item.type == 2
-        })
-        if (index != -1) {
-          this.pdfType = 2
-        } else {
-          this.pdfType = 1
-        }
-        this.getPDFSrc(this.pdfType)
-        // let blob = this.base64ToBlob(this.patent.pdf[0])
-        // this.$set(this,'src',URL.createObjectURL(blob))
-        // // this.src = this.patent.pdf[0].url
-        // this.$nextTick(() => {
-        //   this.show = true
-        // })
-      }else{
-        this.getData()
-      }
-      
-    }else{
+    // outside为true是外部
+    if (this.outside) {//外部
+      this.getData()
+    } else {
       this.refresh()
     }
   },
   methods: {
-    getData(){
-      if(this.patent.pdf && this.patent.pdf.length>0){
+    // 获取外部的pdf地址
+    getData() {
+      if (this.patent.pdf && this.patent.pdf.length > 0) {
         return false
       }
-      this.show  =false
+      this.show = false
       this.height = (this.fullHeight - 230) + 'px'
       var params = {
-            patentCell:3,
-            patentNo:this.patent.publicNo,
-            appNo:this.patent.applicationNo,
-          }
-        this.$api.getPatentPart(params).then(response=>{
-            if(response.code == 200){
-              if(Object.keys(response.data).length == 0){
-                return false
-              }
-              if(response.data.pdf.length==0){
-                return false
-              }
-              this.$set(this.patent,'pdf',response.data.pdf)
-              var index = this.patent.pdf.findIndex(item => {
-                return item.type == 2
-              })
-              if (index != -1) {
-                this.pdfType = 2
-              } else {
-                this.pdfType = 1
-              }
-              this.getPDFSrc(this.pdfType)
-            }
-        })
+        appNo: this.patent.appNo,
+        rowApplicationNo: this.patent.rowApplicationNo,
+      }
+      this.$api.getCnPdf(params).then(response => {
+        if (response.code == 200) {
+          // if (Object.keys(response.data).length == 0) {
+          //   return false
+          // }
+          // if (response.data.pdf.length == 0) {
+          //   return false
+          // }
+          this.$set(this.patent, 'pdf', response.data)
+          this.getSrc()
+          // var index = this.patent.pdf.findIndex(item => {
+          //   return item.type == 2
+          // })
+          // if (index != -1) {
+          //   this.pdfType = 2
+          // } else {
+          //   this.pdfType = 1
+          // }
+          // this.getPDFSrc(this.pdfType)
+
+        }
+      })
     },
-    getPDFSrc(type) {
-      let blob = this.base64ToBlob(this.patent.pdf.find(item => { return item.type == type }))
-      this.$set(this, 'src', URL.createObjectURL(blob))
+    // getPDFSrc(type) {
+    //   let blob = this.base64ToBlob(this.patent.pdf.find(item => { return item.type == type }))
+    //   this.$set(this, 'src', URL.createObjectURL(blob))
+    //   this.$nextTick(() => {
+    //     this.show = true
+    //   })
+    // },
+    // base64ToBlob(row) {
+    //   var dataUrl = row.pictureStringData
+    //   let bstr = window.atob(dataUrl)
+    //   let n = bstr.length
+    //   let u8arr = new Uint8Array(n)
+    //   while (n--) {
+    //     u8arr[n] = bstr.charCodeAt(n);
+    //   }
+    //   return new Blob([u8arr], { type: "application/pdf" });
+    // },
+    // 内部专利根据guid获取路径
+    getSrc() {
+      let obj = this.patent.pdf.find(item => {
+        return item.type == this.pdfType
+      })
+      if (this.outside) {
+        this.src = obj.pdfGuid
+      } else {
+        if (obj) {
+          this.src = this.$commonJS.checkViewer(obj.pdfGuid)
+          // console.log(this.src);
+        }
+      }
       this.$nextTick(() => {
         this.show = true
       })
     },
-    base64ToBlob(row){
-      var dataUrl = row.pictureStringData
-      let bstr = window.atob(dataUrl)
-      let n = bstr.length
-      let u8arr = new Uint8Array(n)
-      while (n--) {
-          u8arr[n] = bstr.charCodeAt(n);
-      }
-      return new Blob([u8arr], { type: "application/pdf" });
-    },
+    // 点击切换按钮(授权、公开)
     handleSelect(type) {
       this.pdfType = type
-      if(!this.projectId){
-        this.show = false
-        this.height = (this.fullHeight - 230) + 'px'
-        this.getPDFSrc(type)
-        return false
+      this.show = false
+      if (this.outside) {//外部
+        this.getSrc()
+      } else {//内部
+        this.getSrc()
       }
-      this.refresh()
     },
     handleChange(file, fileList) {
       if (file.name.split('.')[1].toLowerCase() !== 'pdf') {
@@ -177,20 +160,20 @@ export default {
         this.btnLoading = false
       })
     },
+    // 请求内部pdf的guid
     refresh() {
       this.show = false
       this.height = (this.fullHeight - 230) + 'px'
-      this.pdf = this.patent.pdf.find(item => item.type === this.pdfType)
-      if (this.pdf) {
-        this.$api.getPatentInstructionFile({ patentNo: this.patent.patentNo, type: this.pdfType }).then(response => {
-          this.src = '/pdfjs/web/viewer.html?file=' + encodeURIComponent(window.URL.createObjectURL(response))
-          this.$nextTick(() => {
-            this.show = true
-          })
-        }).catch(error => {
-          this.$message.error('加载失败')
-        })
+      let params = {
+        appNo: this.patent.appNo,
+        // type: this.pdfType,//0公开1授权
       }
+      this.$api.getTextPdf(params).then(response => {
+        if (response.code == 200) {
+          this.$set(this.patent, 'pdf', response.data)
+          this.getSrc()
+        }
+      })
     },
     handleResize(event) {
       this.fullHeight = document.documentElement.clientHeight
@@ -202,6 +185,7 @@ export default {
 <style lang="scss">
 .patent-pdf {
   height: 100%;
+
   .no-pdf-file {
     float: left;
     text-align: center;
@@ -209,6 +193,7 @@ export default {
     background: #e3e2e2;
     height: calc(100% - 120px);
     padding-top: 50px;
+
     span {
       font-size: 50px;
     }

+ 5 - 3
src/views/project/patentDetails/components/patentMessage/PatentRight.vue

@@ -343,13 +343,15 @@ export default {
       } else {
         if (this.outside) {
           var params = {
-            patentCell: 1,
+            // patentCell: 1,
             patentNo: this.patent.patentNo,
-            appNo: this.patent.applicationNo,
+            pageNum: 1,
+            pageSize:10,
+            // appNo: this.patent.applicationNo,
           };
           this.$api.queryExternalClaim(params).then((response) => {
             if (response.code == 200) {
-              this.$set(this.patent, "claims", response.data.claims);
+              this.$set(this.patent, "claims", response.data.claimContent);
             }
           });
         }

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

@@ -81,7 +81,7 @@ export default {
     signPatentNo(){
       return this.$route.query.signPatentNo
     },
-    outside(){
+    outside() {
       return this.$route.query.outside
     }
   },