Selaa lähdekoodia

Merge branch 'product' of http://1.116.113.26:8088/zhuliu/xiaoshi_system into product

zhuliu 1 vuosi sitten
vanhempi
commit
78149ee1a9

+ 32 - 0
src/api/newApi/patent.js

@@ -56,6 +56,14 @@ export default {
     return axios.post("/xiaoshi/patent/updateMergePerson", data);
   },
   /**
+   * 合并发明人、申请人、权利人编辑再次合并
+   * @param {*} data 
+   * @returns 
+   */
+  mergePersonAgain(data) {
+    return axios.post("/xiaoshi/patent/mergePersonAgain", data);
+  },
+  /**
    * 合并发明人、申请人、权利人查询列表
    * @param {*} data 
    * @returns 
@@ -96,6 +104,14 @@ export default {
     return axios.get("/xiaoshi/patent/getAllCountry", {params});
   },
   /**
+   * 获取所有省市区
+   * @param {*} params 
+   * @returns 
+   */
+  getAllProvince(params) {
+    return axios.get("/xiaoshi/patent/getAllProvince", {params});
+  },
+  /**
    * 合并发明人、申请人、权利人列表的删除
    * @param {*} data 
    * @returns 
@@ -183,4 +199,20 @@ export default {
   getFigure(params) {
     return axios.get("/xiaoshi/patent/getFigure", {params});
   },
+  /**
+   * 专利详情外部获得法律事务状态
+   * @param {*} params 
+   * @returns 
+   */
+  getLegalStatus(params) {
+    return axios.get("/xiaoshi/patentStar/getLegalStatus", {params});
+  },
+  /**
+   * 专利详情外部获得摘要附图
+   * @param {*} params 
+   * @returns 
+   */
+  getPictureGuid(params) {
+    return axios.get("/xiaoshi/patentStar/getPictureGuid", {params});
+  },
 }

+ 12 - 3
src/views/project/patentCollection/components/drawer/MergeInventor.vue

@@ -6,8 +6,17 @@
       <el-container class="patent-inventor-merge">
         <el-header style="display:flex;align-items:center;justify-content: space-between;">
           <div>
-            <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
-            </mySearch>
+            <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-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>
@@ -80,7 +89,7 @@ export default {
       //检索条件
       searchOption: {},
       // 判断是2发明人还是0权利人/申请人
-      mergeType:'',
+      mergeType: '',
     }
   },
   mounted() {

+ 87 - 37
src/views/project/patentCollection/components/drawer/merge.vue

@@ -6,8 +6,17 @@
         <el-header style="display:flex;align-items:center;justify-content: space-between;">
           <!-- 检索 -->
           <div>
-            <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
-            </mySearch>
+            <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-form-item>
+            </el-form>
+            <!-- 后端没有根据检索式检索 -->
+            <!-- <mySearch style="width: 500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
+            </mySearch> -->
           </div>
           <el-button type="primary" size="small" @click="handleMerge">合并</el-button>
         </el-header>
@@ -60,12 +69,12 @@
             </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-option v-for="(item, index) in commonData" :label="item.label" :key="index"
+                  :value="item.label"></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="地址" prop="addressIds">
-              <el-cascader @change="onChangeAddress" v-model="addressIds" :options="areaOptions" :props="props"
+            <el-form-item label="地址" prop="province">
+              <el-cascader ref="myCascader" @change="changeCas"  v-model="ruleForm.provinceOld" :options="areaOptions"
                 class="width_100"></el-cascader>
             </el-form-item>
           </template>
@@ -126,7 +135,7 @@ export default {
       // 表格的数据源
       tableData: [],
       // 存放勾选的值的数据(已合并的)
-      mergedData: null,
+      mergedData: {},
       mergedList: [],
       //检索字段
       searchFiled: [
@@ -179,6 +188,9 @@ export default {
 
   },
   methods: {
+    changeCas(val) {
+      this.ruleForm.province=this.$refs.myCascader.getCheckedNodes()[0].pathLabels[0]
+    },
     // 移除合并人员 
     handleDelete(row) {
       let params = {
@@ -196,6 +208,13 @@ export default {
           if (res.code == 200) {
             this.$message.success('移除人员成功')
             this.$emit('close')
+
+            let index = this.ruleForm.mergedName.findIndex(item => {
+              return item == row
+            })
+            if (index != -1) {
+              this.ruleForm.mergedName.splice(index, 1)
+            }
             // this.getMerge(this.ruleForm)
           }
         })
@@ -226,12 +245,12 @@ export default {
     // 关闭弹窗
     closeDialog() {
       this.$refs.ruleForm.resetFields()
-      if (this.ruleForm.needMergedName && this.ruleForm.needMergedName.length == 0) {
-        this.ruleForm = {
-          needMergedName: [],
-          mergeName: [],
-        }
-      }
+      // if (this.ruleForm.needMergedName && this.ruleForm.needMergedName.length == 0) {
+        // this.ruleForm = {
+        //   needMergedName: [],
+        //   mergedName: [],
+        // }
+      // }
       this.visible = false
     },
     // 弹窗中的完成和保存事件
@@ -240,31 +259,48 @@ export default {
         if (valid) {
           this.ruleForm.projectId = this.projectId
           this.ruleForm.type = this.mergeType
-          if (this.title.indexOf('新增') != -1) {//新增
+          // if (this.title.indexOf('新增') != -1) {//新增
+          if (this.ruleForm.needMergedName && this.ruleForm.needMergedName.length == 0) {//新增
             // this.ruleForm.mergedName = this.mergedName
             this.$api.mergePerson(this.ruleForm).then(res => {
               if (res.code == 200) {
                 this.$message.success('合并成功')
                 this.$emit('close')
                 this.mergedList = []
-                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.close()
                 this.getList()
               }
             })
+          } else {
+            if (this.ruleForm.needMergedName && this.ruleForm.needMergedName.length > 0) {//
+              this.$api.mergePersonAgain(this.ruleForm).then(res => {
+                if (res.code == 200) {
+                  this.$message.success('编辑成功')
+                  this.$emit('close')
+                  this.closeDialog()
+                  this.close()
+                  this.getList()
+                }
+              })
+            } else {
+              this.$api.updateMergePerson(this.ruleForm).then(res => {
+                if (res.code == 200) {
+                  this.$message.success('编辑成功')
+                  this.$emit('close')
+                  this.closeDialog()
+                  this.close()
+                  this.getList()
+
+                }
+              })
+            }
           }
         }
       })
     },
     onChange(row) {
+      console.log(row);
       const index = this.mergedList.indexOf(row.name)
       if (index === -1) {
         this.mergedList.push(row.name)
@@ -278,16 +314,18 @@ export default {
         } else {
           this.ruleForm.needMergedName.splice(index, 1)
         }
-        this.mergedData = row
-
+        for (let k in row) {
+          this.$set(this.mergedData, [k], row[k])
+        }
       } else {//未合并的名称
-        const index3 = this.ruleForm.mergeName.indexOf(row.name)
+        const index3 = this.ruleForm.mergedName.indexOf(row.name)
         if (index3 === -1) {
-          this.ruleForm.mergeName.push(row.name)
+          this.ruleForm.mergedName.push(row.name)
         } else {
-          this.ruleForm.mergeName.splice(index, 1)
+          this.ruleForm.mergedName.splice(index, 1)
         }
       }
+      console.log(row, this.ruleForm,this.mergedList);
     },
     // 合并事件
     handleMerge() {
@@ -296,22 +334,28 @@ export default {
         this.$message.error(text)
         return false
       }
-      if (this.title.indexOf('新增') != -1) {//新增
-        this.mergeTitle = '新增合并'
-        this.visible = true
-      } else {//编辑直接合并,不填写信息
+
+      console.log(this.ruleForm);
+      // if (this.title.indexOf('新增') != -1) {//新增
+      if (this.ruleForm.needMergedName && this.ruleForm.needMergedName.length > 0) {//编辑直接合并,不填写信息
+
         this.mergeTitle = '编辑合并'
         if (this.ruleForm.needMergedName.length > 0) {
           for (let k in this.mergedData) {
-            this.ruleForm[k] = this.mergedData[k]
+            this.$set(this.ruleForm, [k], this.mergedData[k])
           }
         } else {
           for (let k in this.mergedData) {
-            this.ruleForm[k] = ''
+            this.$set(this.ruleForm, [k], '')
           }
+          console.log(123);
         }
         console.log(this.ruleForm);
         this.visible = true
+      } else {//新增
+        this.ruleForm.id = null
+        this.mergeTitle = '新增合并'
+        this.visible = true
       }
     },
     // 打开抽屉
@@ -319,12 +363,13 @@ export default {
       this.mergeType = row.mergeType
       this.title = title
       this.ruleForm.needMergedName = [],
-        this.ruleForm.mergeName = [],
+        this.ruleForm.mergedName = [],
         this.getList()
       this.drawer = true
       // 获取国家和地区的数据
       if (this.mergeType == 0) {
         this.getAllCountry()
+        this.getAreaList()
       }
     },
     //获取检索条件检索
@@ -373,6 +418,11 @@ export default {
     },
     // 关闭抽屉
     close() {
+      this.ruleForm = {
+        needMergedName: [],
+        mergedName: [],
+      }
+      this.mergedList = []
       this.drawer = false
     },
     // 获取国家和地区
@@ -383,8 +433,8 @@ export default {
     },
     // 获取中国所有地区(省、自治区、特别行政区)
     getAreaList() {
-      this.$api.getArea().then(response => {
-        this.areaTree = response.data
+      this.$api.getAllProvince().then(response => {
+        this.areaOptions = response.data
       })
     },
   },

+ 31 - 3
src/views/project/patentCollection/index.vue

@@ -553,10 +553,38 @@ export default {
         projectId: this.projectId,
         searchQuery: this.searchStr || '',//检索条件
         customFields: this.customFields || [],//自定义字段的检索
+        isAdd: this.queryParams.isAdd,
+        isDelete: this.queryParams.isDelete,
+        startNumber: this.startNumber,
+        endNumber: this.endNumber,
       }
       this.$api.pdfFirstPage(params).then(res => {
         if (res.code == 200) {
-
+          const h = this.$createElement;
+          this.$msgbox({
+            title: '提示',
+            message: h('p', null, [
+              h('span', null, '任务正在导入,查看任务进度请前往 '),
+              h('span', {
+                style: 'color: #ff7d38;cursor: pointer;',
+                on: {
+                  click: () => {//
+                    let router = this.$router.resolve({
+                      path: '/taskList',
+                      query: {
+                        projectId: this.projectId,
+                      }
+                    })
+                    window.open(router.href, '_blank')
+                    this.$msgbox.close(false)
+                  }
+                }
+              }, '立即前往',)
+            ]),
+            type: 'warning',
+            showConfirmButton: false,
+          }).then(action => {
+          });
         }
       })
       // let params = JSON.parse(JSON.stringify(this.queryParams))
@@ -597,9 +625,9 @@ export default {
     },
     //合并发明人//合并申请人、权利人
     handleMerge(type) {
-      let obj={
+      let obj = {
         projectId: this.projectId,
-        type:type
+        type: type
       }
       this.$refs.patentInventorMergeDrawer.open(obj)
     },

+ 43 - 22
src/views/project/patentDetails/components/patentDetails.vue

@@ -84,12 +84,14 @@
             <my-view :position="this.positionList.find(item => item.value == radio).position"
               :showView="radio != 1 && activeMenu != activeMenu2">
               <div slot="left">
-                <component :activeName="activeMenu" style="width:100%;padding-right: 10px;" :is="activeMenu" :evidence="evidence" :signPatentNo="signPatentNo" :reportType="reportType"
-                  :project-id="projectId" :outside="outside" :patent="patent" :patentNo="[patent.patentNo]" :domId="patent.patentNo + '1'"
+                <component :activeName="activeMenu" style="width:100%;padding-right: 10px;" :is="activeMenu"
+                  :evidence="evidence" :signPatentNo="signPatentNo" :reportType="reportType" :project-id="projectId"
+                  :outside="outside" :patent="patent" :patentNo="[patent.patentNo]" :domId="patent.patentNo + '1'"
                   @refresh="getPatent()"></component>
               </div>
               <div slot="right">
-                <component :is="activeMenu2" :project-id="projectId" :outside="outside" :patent="patent" :signPatentNo="signPatentNo" :reportType="reportType" :sign="true" :evidence="evidence"></component>
+                <component :is="activeMenu2" :project-id="projectId" :outside="outside" :patent="patent"
+                  :signPatentNo="signPatentNo" :reportType="reportType" :sign="true" :evidence="evidence"></component>
               </div>
             </my-view>
           </div>
@@ -158,17 +160,17 @@ export default {
     taskId: {
       default: null,
     },
-    evidence:{
-      
+    evidence: {
+
     },
-    signPatentNo:{
+    signPatentNo: {
 
     },
-    reportType:{
+    reportType: {
 
     },
-    outside:{
-      default:false
+    outside: {
+      default: false
     }
   },
   data() {
@@ -290,7 +292,7 @@ export default {
     }
   },
   computed: {
-    condition(){
+    condition() {
       return this.$s.getSession('import') || {}
     }
   },
@@ -300,6 +302,22 @@ export default {
     this.getPatent()
   },
   methods: {
+    // 获取外部摘要附图的guid,获取外部的法律状态
+    getData() {
+      var params = {
+        appNo: this.patent.rowApplicationNo,
+      }
+      this.$api.getPictureGuid(params).then(response => {
+        if (response.code == 200) {
+          this.$set(this.patent, 'pictureGuid', response.data)
+        }
+      })
+      this.$api.getLegalStatus(params).then(response => {
+        if (response.code == 200) {
+          // this.$set(this.patent, 'affair', response.data.affair)
+        }
+      })
+    },
     //导入到专题库
     importToProject() {
       var form = {
@@ -320,7 +338,7 @@ export default {
         patentNo: this.patentNo
       }
       var api = 'selectPatentDetail'
-      if(this.outside){
+      if (this.outside) {
         api = 'queryExternalDetail'
       }
       this.loading=true
@@ -328,6 +346,9 @@ export default {
         if (response.code == 200) {
           this.patent = response.data
           this.loading = false
+          if (this.outside) {
+            this.getData()
+          }
         }
       }).catch(error=>{
         this.loading = false
@@ -336,17 +357,17 @@ export default {
     // 创建报告:无效分析等点击事件
     handleAnalyse(id) {
       var form = {
-          reportType: id,
-          signPatentNo: this.patent.patentNo,
-          projectId: this.projectId,
-          // departmentId: response.data[0].departmentId,
-          // personId: response.data[0].personnelId,
-          // clientId: response.data[0].clientId,
-          matterId: [],
-          scenarioId: [],
-          inventionName:this.getView(this.patent, 'title')
-        }
-        this.$refs.addAndEditReport.open(form)
+        reportType: id,
+        signPatentNo: this.patent.patentNo,
+        projectId: this.projectId,
+        // departmentId: response.data[0].departmentId,
+        // personId: response.data[0].personnelId,
+        // clientId: response.data[0].clientId,
+        matterId: [],
+        scenarioId: [],
+        inventionName: this.getView(this.patent, 'title')
+      }
+      this.$refs.addAndEditReport.open(form)
 
     },
     handleSelect(index) {

+ 2 - 2
src/views/project/patentDetails/components/patentMessage/PatentBasic.vue

@@ -62,7 +62,7 @@
       <el-col :span="6">
          <el-card shadow="never" class="text-align_center " style="margin-top:50px;" data-type="附图">
           <div style="height: 200px;" class="picture">
-            <el-image  :src="outside?patent.pictureGuid:$commonJS.checkViewer(patent.pictureGuid)" :preview-src-list="[outside?patent.pictureGuid:$commonJS.checkViewer(patent.pictureGuid)]" :style="{width:patent.imgWidth?patent.imgWidth:'100%',height:patent.imgHeight?patent.imgHeight:'100%'}">
+            <el-image  :src="$commonJS.checkViewer(patent.pictureGuid)" :preview-src-list="[$commonJS.checkViewer(patent.pictureGuid)]" :style="{width:patent.imgWidth?patent.imgWidth:'100%',height:patent.imgHeight?patent.imgHeight:'100%'}">
               <div slot="error" class="image-slot">
                 <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="">
               </div>
@@ -213,7 +213,7 @@ export default {
     //           }else{
     //             this.$set(this.patent,'abstractPath2','q')
     //           }
-              
+
     //           this.getHeight(this.patent.abstractPath2, this.patent)
     //         }
     //     })

+ 7 - 33
src/views/project/patentDetails/components/patentMessage/PatentStatus.vue

@@ -4,19 +4,19 @@
     <div v-if="projectId">
       <!-- <div> <h3 class="patent-articles-patent-status-event">当前状态</h3></div>
     <el-button type="success" size="mini">{{simpleStatus[patent.simpleStatus]}}</el-button> -->
-      <div>
+      <!-- <div>
         <h3 class="patent-articles-patent-status-event">法律状态/事件</h3>
-      </div>
+      </div> -->
       <!-- <el-button type="primary" size="mini">{{patent.legal_status&& patent.affair.length>0?patent.affair[0].status:''}}</el-button  > -->
       <!-- 后端没考虑好,暂时先不返 -->
-      <el-button type="primary" size="mini">{{ legalStatus[patent.legalStatus] }}</el-button>
+      <!-- <el-button type="primary" size="mini">{{ legalStatus[patent.legalStatus] }}</el-button> -->
     </div>
     <div>
       <h3 class="patent-articles-patent-status-event">事务数据</h3>
     </div>
     <div class="block" style="width:100%">
       <el-timeline v-if="patent.legalEvents && patent.legalEvents.length > 0">
-        <el-timeline-item v-for="(item, index1) in patent" :key="index1"
+        <el-timeline-item v-for="(item, index1) in patent.legalEvents" :key="index1"
           :timestamp="item.eventDate" placement="top">
           <el-card>
             <span>申请号:{{ item.appNo }}</span>
@@ -44,39 +44,13 @@ export default {
     }
   },
   watch: {
-    patentId() {
-      this.tableData = this.patent.affair
-    },
-    patentNo() {
-      if (!this.projectId) {
-        this.getData()
-      }
-    }
+ 
   },
   mounted() {
-    // this.tableData = this.patent.affair
-    // this.tableDataList=this.tableData[0].inpadoc
-    // console.log(this.tableData[0].inpadoc, this.tableDataList[0].length);
-    // for(var i in this.tableData[0].inpadoc[0]){
-    //   console.log(i)
-    // }
-    if (!this.projectId) {
-      this.getData()
-    }
+   
   },
   methods: {
-    getData() {
-      var params = {
-        patentCell: 6,
-        patentNo: this.patent.publicNo,
-        appNo: this.patent.applicationNo,
-      }
-      this.$api.getPatentPart(params).then(response => {
-        if (response.code == 200) {
-          this.$set(this.patent, 'affair', response.data.affair)
-        }
-      })
-    },
+    
   }
 }
 </script>