فهرست منبع

专利信息的刷新

zhuliu 1 سال پیش
والد
کامیت
3dbab5cd46

+ 2 - 1
src/views/components/dialog/fields.vue

@@ -133,7 +133,8 @@ export default {
       if(this.url){
         apiItem = this.url
       }else{
-        apiItem = (this.projectId == 0|| this.projectId || this.productId) ? 'setTableColumns' : 'setCustomField'
+        // apiItem = (this.projectId == 0|| this.projectId || this.productId) ? 'setTableColumns' : 'setCustomField'
+        apiItem = 'setTableColumns'
       }
       
       // sign为true时是统计栏位

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

@@ -1,12 +1,12 @@
 <template>
-  <div class="patent-basic height_100"  @mouseup="mouseup">
-    <el-row :gutter="24">
+  <div class="patent-basic height_100" >
+    <el-row :gutter="24" >
       <el-col :span="18" >
         <el-row :gutter="24">
           <el-col :span="24">
             <el-tabs value="0">
               <el-tab-pane label="摘要" name="0">
-                <p class="common" :data-type="'摘要'+(patent.change2?'译文':'原文')" :style="setStyle()" v-html="getView(patent, 'abstractStr','摘要'+(patent.change2?'译文':'原文'))"></p>
+                <p  @mouseup="mouseup" class="common" :data-type="'摘要'+(patent.change2?'译文':'原文')" :style="setStyle()" v-html="getView(patent, 'abstractStr','摘要'+(patent.change2?'译文':'原文'))"></p>
                
              <span v-if="haveTranslatedText(patent, 'abstractStr')">
                  <el-link v-if="projectId" type="primary" @click.native="handleChange(patent, 'abstractStr')" >
@@ -64,7 +64,7 @@
           <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%'}">
               <div slot="error" class="image-slot">
-                <img src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="">
+                <img @click="exportData('4')" src="https://www.patentstar.com.cn/img/Common/nopic.jpg" alt="" >
               </div>
             </el-image>
           </div>

+ 3 - 0
src/views/project/patentDetails/components/patentMessage/PatentPDF.vue

@@ -5,6 +5,9 @@
         <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>
+      <div class="float_right" v-if="!outside">
+        <el-button icon="el-icon-refresh" circle @click="exportData('5')"></el-button>
+      </div>
       <!-- <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"

+ 46 - 7
src/views/project/patentDetails/components/patentMessage/mixins/index.js

@@ -47,18 +47,57 @@ export const patentDetails = {
   methods: {
     //导入数据
     exportData(value){
+      var dict = {
+        1:'',
+        2:'说明书文本',
+        3:'权利要求',
+        4:'附图',
+        5:'pdf文档'
+      }
+      var str = `确定刷新${dict[value]}?`
+      this.$confirm(str, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        var params = {
+          patentNo:this.patent.patentNo,
+          refreshContent:[value]
+        }
+        this.loading = true
+        this.$api.refreshPatent(params).then(response=>{
+          if(response.code == 200){
+            this.$message.success('数据刷新成功')
+            // this.loading = false
+            this.getPatent()
+          }
+        }).catch(error=>{
+          this.$message.error('数据刷新失败')
+          this.loading = false
+        })
+      })
+      
+    },
+    //获取专利信息
+    getPatent(value) {
+      var dict = {
+        1:'',
+        2:'publicFullText',
+        3:'claim',
+        4:'pictureGuid',
+        5:'pdf'
+      }
       var params = {
-        patentNo:this.patent.patentNo,
-        refreshContent:[value]
+        patentNo: this.patent.patentNo
       }
+      var api = 'selectPatentDetail'
       this.loading = true
-      this.$api.refreshPatent(params).then(response=>{
-        if(response.code == 200){
-          this.$message.success('数据刷新成功')
+      this.$api[api](params).then(response => {
+        if (response.code == 200) {
+          this.$set(this.patent,dict[value],response.data[dict[value]])
           this.loading = false
         }
-      }).catch(error=>{
-        this.$message.error('数据刷新失败')
+      }).catch(error => {
         this.loading = false
       })
     },