zhuhao 1 year ago
parent
commit
ccacdb9bac

+ 33 - 1
src/api/newApi/patent.js

@@ -72,6 +72,30 @@ export default {
     return axios.post("/xiaoshi/patent/getMergePerson", data);
   },
   /**
+   * 查看合并的信息
+   * @param {*} data 
+   * @returns 
+   */
+  selectMergePersonDetail(data) {
+    return axios.post("/xiaoshi/patent/selectMergePersonDetail", data);
+  },
+  /**
+   * 移除单个合并人的信息
+   * @param {*} data 
+   * @returns 
+   */
+  delMergedName(data) {
+    return axios.post("/xiaoshi/patent/delMergedName", data);
+  },
+  /**
+   * 获取所有国家
+   * @param {*} params 
+   * @returns 
+   */
+  getAllCountry(params) {
+    return axios.get("/xiaoshi/patent/getAllCountry", {params});
+  },
+  /**
    * 合并发明人、申请人、权利人列表的删除
    * @param {*} data 
    * @returns 
@@ -80,13 +104,21 @@ export default {
     return axios.post("/xiaoshi/patent/delMergePerson", data);
   },
   /* 
-  * 专利详情同族专利查询
+  * 专利详情内部同族专利查询
    * @param {*} data 
    * @returns 
    */
   selectKinByPatentNo(data) {
     return axios.post("/xiaoshi/patent/selectKinByPatentNo", data);
   },
+  /* 
+  * 专利详情外部同族专利查询
+   * @param {*} data 
+   * @returns 
+   */
+  queryExternalFamily(data) {
+    return axios.post("/xiaoshi/patentStar/queryExternalFamily", data);
+  },
   /**
    * 专利详情内部查询权利要求
    * @param {*} data 

+ 110 - 73
src/views/components/dialog/menuDialog/annotation.vue

@@ -1,95 +1,131 @@
 <template>
   <div>
-    <el-dialog title="批注" v-draggable :visible.sync="visible" width="500px" custom-class="checkFile"
-      :before-close="close" :modal="false" :close-on-click-modal="false" :modal-append-to-body="false">
-      <!-- <div class="pizhu" style="display:none;"> -->
-        <div
-          style="display:flex;justify-content: space-between;font-size:14px;border-bottom: 1px white solid;padding-bottom: 5px;">
-          <p style="font-weight:800;margin:0">{{ userinfo.name }}</p>
-          <p style="margin:0">{{ getDate() }}</p>
-        </div>
-        <div>
-          <p style="display: flex;align-items: center;"><span style="width: 60px;">内容:</span><span
-              style="width: 100%;"><el-input type="textarea" v-model="mark.text" readonly rows="2"></el-input></span></p>
-        </div>
-        <div>
-          <p><span>颜色:</span>
-            <span>
-              <el-input type="color" size="small" class="changeColor" v-model="mark.color"
-                style="user-select:none;width:100px" @input="changeColor()"> </el-input>
-            </span>
-          </p>
-          <p><span>类型:</span>
-            <span>
-              <el-radio-group v-model="mark.scratchType" @change="changeRadio">
-                <el-radio :label="2">波浪线</el-radio>
-                <el-radio :label="0">下划线</el-radio>
-                <el-radio :label="1">高亮</el-radio>
-              </el-radio-group>
-            </span>
-          </p>
-        </div>
-        <div>
-          <p>
-            <span>使用权限:</span>
-            <span>
-              <el-radio-group v-model="mark.permissionType" @change="changePower()">
-                <el-radio :label="1">所有人可见</el-radio>
-                <el-radio :label="0">本人可见</el-radio>
-              </el-radio-group>
-            </span>
-          </p>
-          <p style="display:flex" v-if="mark.rangeId">
-            <span>可见范围:</span>
-            <span>
-              <el-switch v-model="mark.rangeType" active-color="#13ce66" inactive-color="#ff4949" active-text="本专题库可见">
-              </el-switch>
-              <!-- <el-checkbox-group v-model="mark.rangeType" @change="changeRange">
-                    <el-checkbox label="1">本专题库</el-checkbox>
-                    <el-checkbox label="2">本报告</el-checkbox>
-                    <el-checkbox label="3">本专利</el-checkbox>
-                  </el-checkbox-group> -->
-            </span>
-          </p>
-        </div>
-        <div style="user-select: none;">
-          <p style="margin-bottom:5px">标注:</p>
-          <el-input v-model="mark.remark" type="textarea" class="my-input-preview"></el-input>
-        </div>
-        <div style="display:flex;justify-content: flex-end;">
-          <span style="cursor: pointer;" @click="cancelPizhu">取消</span>
-          <span style="margin-left:15px;cursor: pointer;" v-if="mark.id" @click="deletePizhu">删除</span>
-          <span style="margin-left:15px;cursor: pointer;" @click="submitPizhu">确定</span>
-        </div>
-      <!-- </div> -->
+    <el-dialog title="批注" v-draggable :visible.sync="visible" width="500px" custom-class="checkFile" :before-close="cancel"
+      :modal="false" :close-on-click-modal="false" :modal-append-to-body="false">
+      <div
+        style="display:flex;justify-content: space-between;font-size:14px;border-bottom: 1px white solid;padding-bottom: 5px;">
+        <p style="font-weight:800;margin:0">{{ userinfo.name }}</p>
+        <p style="margin:0">{{ getDate() }}</p>
+      </div>
+      <div>
+        <p style="display: flex;align-items: center;"><span style="width: 60px;">内容:</span><span
+            style="width: 100%;"><el-input type="textarea" v-model="mark.text" readonly rows="2"></el-input></span></p>
+      </div>
+      <div>
+        <p><span>颜色:</span>
+          <span>
+            <el-input type="color" size="small" class="changeColor" v-model="mark.markColor"
+              style="user-select:none;width:100px"> </el-input>
+          </span>
+        </p>
+        <p><span>类型:</span>
+          <span>
+            <el-radio-group v-model="mark.markType">
+              <el-radio :label="2">波浪线</el-radio>
+              <el-radio :label="0">下划线</el-radio>
+              <el-radio :label="1">高亮</el-radio>
+            </el-radio-group>
+          </span>
+        </p>
+      </div>
+      <div>
+        <p>
+          <span>使用权限:</span>
+          <span>
+            <el-radio-group v-model="mark.permissionType">
+              <el-radio :label="1">所有人可见</el-radio>
+              <el-radio :label="0">本人可见</el-radio>
+            </el-radio-group>
+          </span>
+        </p>
+        <p style="display:flex" v-if="mark.createFrom">
+          <!-- createFrom  0默认(专利)1专题库2报告 -->
+          <span>可见范围:</span>
+          <span>
+            <el-switch v-model="mark.rangeType" active-color="#13ce66" inactive-color="#ff4949"
+              :active-text="createFromText[mark.createFrom]">
+            </el-switch>
+          </span>
+        </p>
+      </div>
+      <div style="user-select: none;">
+        <p style="margin-bottom:5px">标注:</p>
+        <el-input v-model="mark.remark" type="textarea" class="my-input-preview"></el-input>
+      </div>
+      <div style="display:flex;justify-content: flex-end;align-items:center;">
+        <el-button type="text" @click="cancel">取消</el-button>
+        <el-button type="text" v-if="mark.id" @click="handleDelete">删除</el-button>
+        <el-button type="text"  @click="submit">确定</el-button>
+      </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import {mapGetters} from 'vuex'
+import { mapGetters } from 'vuex'
 export default {
   data() {
     return {
       // 控制弹窗开关
       visible: false,
       // 批注的内容
-      mark: {
-        text: '',
-        color: '#ff0000',
-        scratchType: 2,//类型
-        permissionType: 0,//使用权限
-        remark:'',
-      },
+      mark: {},
+      // 可见范围
+      createFromText: {
+        0: '本专利可见',
+        1: '本专利数据库可见',
+        2: '本报告可见',
+      }
     }
   },
   computed: {
-    ...mapGetters(['userinfo', 'projectId','contextMenu']),
+    ...mapGetters(['userinfo', 'projectId', 'contextMenu']),
   },
   mounted() {
 
   },
   methods: {
+    // 确定
+    submit() {
+      console.log(this.mark);
+      if (this.mark.id) {
+        this.$api.edit(this.mark).then(response => {
+          if (response.code == 200) {
+            this.$message.success('修改批注成功')
+            this.cancel()
+          }
+        }).catch(error => {
+          this.$message.error('修改批注失败')
+        })
+      } else {
+        this.$api.add(this.mark).then(response => {
+          if (response.code == 200) {
+            this.$message.success('添加批注成功')
+            this.cancel()
+          }
+        }).catch(error => {
+          this.$message.error('添加批注失败')
+        })
+      }
+    },
+    // 删除
+    handleDelete() {
+      console.log('批注删除');
+      return
+      this.$api.dele({id:this.mark.id}).then(response => {
+        if (response.code == 200) {
+          this.$message.success('删除批注成功')
+          this.cancel()
+        }
+      }).catch(error => {
+        this.$message.error('删除批注失败')
+      })
+    },
+    // 取消
+    cancel() {
+      console.log(1);
+      this.visible = false
+    },
     // 显示时间
     getDate() {
       let date = new Date()
@@ -103,8 +139,9 @@ export default {
     },
     // 打开弹窗
     open() {
-      console.log(this.projectId,this.contextMenu);
-      this.visible=true
+      console.log(this.projectId, this.contextMenu);
+      this.mark = this.contextMenu.mark
+      this.visible = true
     },
   },
 }

+ 112 - 46
src/views/project/patentCollection/components/drawer/merge.vue

@@ -12,12 +12,13 @@
           <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">
+          <!-- <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 v-loading="loading" :data="tableData" border header-row-class-name="custom-table-header">
+            <el-table-column align="center" width="60">
               <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>
+                <el-checkbox @change="onChange(scope.row)" v-if="refresh"
+                  :checked="mergedList.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>
@@ -25,10 +26,15 @@
             <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>
+                <el-button v-if="scope.row.mergeId" type="primary" size="small"
+                  @click="handleEdit(scope.row)">编辑</el-button>
               </template>
             </el-table-column>
           </el-table>
+          <div class="pagination">
+            <el-pagination :current-page.sync="queryParams.pageNum" :page-size="queryParams.pageSize" :total="total"
+              @current-change="handleCurrentChange" layout="total, prev, pager, next, jumper" background></el-pagination>
+          </div>
         </el-main>
         <el-footer class="footer-common">
           <el-button @click="close">关 闭</el-button>
@@ -36,12 +42,13 @@
       </el-container>
     </el-drawer>
 
-    <el-dialog :title="mergeTitle" :visible.sync="visible" width="900px" append-to-body destroy-on-close
-      :before-close="close" top="3vh">
+    <el-dialog :title="mergeTitle" :visible.sync="visible" width="500px" append-to-body destroy-on-close
+      :before-close="closeDialog" top="3vh">
       <div class="patent-applicant-merge-select">
-        <template v-if="title.indexOf('新增') == -1">
+        <template v-if="ruleForm.id">
           <el-divider content-position="left">基本信息</el-divider>
-          <el-button type="primary" size="small" @click="handleSave">保存</el-button>
+          <el-button type="primary" size="small" @click="handleSave"
+            style="display:flex;margin: 10px 0 10px 0px;">保存</el-button>
         </template>
         <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px">
           <el-form-item label="名称" prop="name">
@@ -69,15 +76,22 @@
             <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"
+        <template v-if="ruleForm.id">
+          <div style="margin: 10px 0 10px 0px;">
+            <el-divider content-position="left">合并信息</el-divider>
+          </div>
+          <el-table :data="ruleForm.mergedName" border header-row-class-name="custom-table-header">
+            <el-table-column prop="name" label="合并人名称" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row }}
+                </div>
+              </template>
+            </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">
+            <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip></el-table-column> -->
+            <el-table-column label="操作" align="center">
               <template slot-scope="scope">
                 <el-link type="danger" @click="handleDelete(scope.row)">移除</el-link>
               </template>
@@ -87,7 +101,7 @@
       </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>
+        <el-button v-if="!ruleForm.id" type="primary" @click="handleSave">确认</el-button>
       </div>
     </el-dialog>
 
@@ -111,8 +125,9 @@ export default {
       loading: false,
       // 表格的数据源
       tableData: [],
-      // 存放勾选的值
-      mergedName: [],
+      // 存放勾选的值的数据(已合并的)
+      mergedData: null,
+      mergedList: [],
       //检索字段
       searchFiled: [
         {
@@ -126,12 +141,15 @@ export default {
       //禁用懒加载
       disabled: true,
       queryParams: {
+        pageNum: 1,
         pageSize: 10,
       },
       // 总条数
       total: 0,
       // 判断是2发明人还是0申请人与权利人
       mergeType: null,
+      // 刷新
+      refresh: true,
       /**编辑合并人及基本信息 start*/
       // 控制弹窗开关
       visible: false,
@@ -166,14 +184,15 @@ export default {
       let params = {
         projectId: this.projectId,
         name: this.ruleForm.name,
-        item:row.name,
+        delName: row,
+        type: this.mergeType,
       }
       this.$confirm('此操作将删除该人员, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.$api.dele(params).then(res => {
+        this.$api.delMergedName(params).then(res => {
           if (res.code == 200) {
             this.$message.success('移除人员成功')
             this.$emit('close')
@@ -189,9 +208,10 @@ export default {
     getMerge(row) {
       let params = {
         projectId: this.projectId,
-        name: row.name,
+        id: row.mergeId,
+        type: this.mergeType,
       }
-      this.$api.query(params).then(res => {
+      this.$api.selectMergePersonDetail(params).then(res => {
         if (res.code == 200) {
           this.ruleForm = res.data
         }
@@ -206,7 +226,12 @@ export default {
     // 关闭弹窗
     closeDialog() {
       this.$refs.ruleForm.resetFields()
-      this.ruleForm = {}
+      if (this.ruleForm.needMergedName && this.ruleForm.needMergedName.length == 0) {
+        this.ruleForm = {
+          needMergedName: [],
+          mergeName: [],
+        }
+      }
       this.visible = false
     },
     // 弹窗中的完成和保存事件
@@ -214,14 +239,15 @@ export default {
       this.$refs.ruleForm.validate((valid) => {
         if (valid) {
           this.ruleForm.projectId = this.projectId
+          this.ruleForm.type = this.mergeType
           if (this.title.indexOf('新增') != -1) {//新增
-            this.ruleForm.projectId = this.projectId
-            this.ruleForm.mergedName = this.mergedName
+            // 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.mergedList = []
+                this.getList()
                 this.closeDialog()
                 // this.close()
               }
@@ -231,16 +257,41 @@ export default {
               if (res.code == 200) {
                 this.$message.success('编辑成功')
                 this.$emit('close')
-                // this.getList()
+                this.getList()
               }
             })
           }
         }
       })
     },
+    onChange(row) {
+      const index = this.mergedList.indexOf(row.name)
+      if (index === -1) {
+        this.mergedList.push(row.name)
+      } else {
+        this.mergedList.splice(index, 1)
+      }
+      if (row.mergeId) {//已合并过的名称
+        const index2 = this.ruleForm.needMergedName.indexOf(row.name)
+        if (index2 === -1) {
+          this.ruleForm.needMergedName.push(row.name)
+        } else {
+          this.ruleForm.needMergedName.splice(index, 1)
+        }
+        this.mergedData = row
+
+      } else {//未合并的名称
+        const index3 = this.ruleForm.mergeName.indexOf(row.name)
+        if (index3 === -1) {
+          this.ruleForm.mergeName.push(row.name)
+        } else {
+          this.ruleForm.mergeName.splice(index, 1)
+        }
+      }
+    },
     // 合并事件
     handleMerge() {
-      if (this.mergedName.length === 0) {
+      if (this.mergedList.length === 0) {
         let text = this.mergeType == 2 ? '请选择发明人' : '请选择申请人/权利人'
         this.$message.error(text)
         return false
@@ -249,26 +300,32 @@ export default {
         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()
+        this.mergeTitle = '编辑合并'
+        if (this.ruleForm.needMergedName.length > 0) {
+          for (let k in this.mergedData) {
+            this.ruleForm[k] = this.mergedData[k]
           }
-        })
+        } else {
+          for (let k in this.mergedData) {
+            this.ruleForm[k] = ''
+          }
+        }
+        console.log(this.ruleForm);
+        this.visible = true
       }
     },
     // 打开抽屉
     open(row, title) {
       this.mergeType = row.mergeType
       this.title = title
-      // this.getList()
+      this.ruleForm.needMergedName = [],
+        this.ruleForm.mergeName = [],
+        this.getList()
       this.drawer = true
+      // 获取国家和地区的数据
+      if (this.mergeType == 0) {
+        this.getAllCountry()
+      }
     },
     //获取检索条件检索
     search(val) {
@@ -288,17 +345,26 @@ export default {
       this.queryParams.current = 1
       this.getList()
     },
+    handleCurrentChange(val) {
+      this.queryParams.pageNum = val;
+      this.getList();
+    },
     // 获取发明人或者申请人、权利人数据,包括已合并的数据
     getList() {
       let params = {
         ...this.queryParams,//分页信息
         searchQuery: this.$commonJS.objectToString(this.searchOption || {}),//检索条件
         projectId: this.projectId,//项目id
+        type: this.mergeType,
       }
-      this.$api.query(params).then(res => {
+      this.$api.getMergePerson(params).then(res => {
         if (res.code == 200) {
           this.tableData = res.data.data
           this.total = res.data.total
+          this.refresh = false
+          this.$nextTick(() => {
+            this.refresh = true
+          })
         }
       }).catch(error => {
         this.tableData = []
@@ -310,8 +376,8 @@ export default {
       this.drawer = false
     },
     // 获取国家和地区
-    getCommonData() {
-      this.$api.getCommonData({ keys: 'COUNTRIES' }).then(response => {
+    getAllCountry() {
+      this.$api.getAllCountry().then(response => {
         this.commonData = response.data
       })
     },

+ 1 - 1
src/views/project/patentCollection/components/export/components/patent.vue

@@ -80,7 +80,7 @@ export default {
       }
       console.log(params);
       this.btnLoading = true
-      this.$api.exportPatentList(data).then(response => {
+      this.$api.exportPatentList(params).then(response => {
         this.btnLoading = false
         this.$message.success('请求成功')
         //调用查询任务的方法

+ 10 - 12
src/views/project/patentDetails/components/patentMessage/PatentFamily.vue

@@ -2,7 +2,7 @@
   <div class="patent-articles-patent-family height_100">
     <el-container>
       <el-header>
-        <el-form :inline="true" style="" v-if="projectId">
+        <el-form :inline="true" style="" v-if="!outside">
           <el-form-item label="同族类型">
             <el-select v-model="type" size="small" @change="onChange">
               <el-option label="简单同族" value="simple"></el-option>
@@ -96,7 +96,7 @@ export default {
       this.onChange()
     },
     patentNo() {
-      if (!this.projectId) {
+      if (this.outside) {
         this.queryParams2.pageNum = 1
         this.onChange()
       }
@@ -122,19 +122,17 @@ export default {
     getData() {
       this.loading = true
       var params = {
-        patentCell: 5,
-        patentNo: this.patent.publicNo,
-        appNo: this.patent.applicationNo,
+        patentNo: this.patent.patentNo,
         pageNum: this.queryParams2.pageNum,
         pageSize: this.queryParams2.pageSize
       }
-      this.$api.getPatentPart(params).then(response => {
+      this.$api.queryExternalFamily(params).then(response => {
         if (response.code == 200) {
-          this.tableData2 = response.data.familyPatentResult.records
-          this.tableData2.forEach(item => {
-            this.getFamilyImage(item)
-          })
-          this.total = response.data.familyPatentResult.total
+          this.tableData2 = response.data.data
+          // this.tableData2.forEach(item => {
+          //   this.getFamilyImage(item)
+          // })
+          this.total = response.data.total
           this.loading = false
         }
       }).catch(error => {
@@ -162,7 +160,7 @@ export default {
       })
     },
     onChange() {
-      if (!this.projectId) {
+      if (this.outside) {
         this.getData()
         return false;
       }

+ 5 - 4
src/views/project/patentDetails/components/patentMessage/mixins/index.js

@@ -36,7 +36,7 @@ export const patentDetails={
             return 'font-size:'+this.textStyle.size+'px;line-height:'+this.textStyle.lineHeight+';padding:'+this.textStyle.padding[0]+'px '+this.textStyle.padding[1]+'px '+this.textStyle.padding[2]+'px '+this.textStyle.padding[3]+'px'
         },
         //鼠标弹起
-        mouseup(e){
+      mouseup(e) {
           let selectObj = document.getSelection();
           this.anchorOffset = 0;
           let temSelectObj = this.getSelectobj(selectObj);
@@ -64,10 +64,11 @@ export const patentDetails={
             a.position = currentSelectObj.index//选中文本开始位置
             a.id = null//对比记录Id
             a.remark=null//备注
-            a.markType = '1'//高亮类型
-            a.markColor = ''//高亮类型
+            a.markType = 2//高亮类型
+            a.markColor = '#ff0000'//高亮颜色
+            a.permissionType = 1//高亮权限
             // a.color = this.currentSelectObj.color
-            a.createFrom =this.projectId? 1:0//来源
+            a.createFrom =this.projectId? 1:0//来源0默认(专利)1专题库2报告
             a.literatureId = this.evidence?this.evidence.id:null
             this.showMenu(e)