Jelajahi Sumber

专利详情附图上传,编辑等bug修复

zhuhao 2 tahun lalu
induk
melakukan
f38d3d2b93

+ 30 - 2
RMS-FrontEnd/src/api/patent.js

@@ -25,7 +25,7 @@ export default{
       return axios.get('/v2/patent/keywords/highlight/list', { params })
     },
 
-      /**
+  /**
    * 获取说明书文件流
    */
   getPatentInstructionFile(params) {
@@ -54,5 +54,33 @@ export default{
      */
     updateUserSettingField(data) {
       return axios.post('/v2/patent/field/setting', data)
-    }
+  },
+     /**
+   * 更新标签
+   */
+  updatePatentLabel(data) {
+    return axios.post('/v2/patent/label', data)
+  },
+  /**
+   * 上传专利附图
+   */
+  uploadPatentImage(data) {
+    return axios.post('/v2/patent/image/add', data)
+  },
+  /**
+   * 修改专利附图
+   */
+  editPatentImage(data) {
+    return axios.post('/v2/patent/image/edit', data)
+  },
+  /**
+   * 删除专利附图
+   */
+  deletePatentImage(params) {
+    return axios({
+      url: '/v2/patent/image/delete',
+      method: 'post',
+      params: params
+    })
+  },
 }

+ 1 - 1
RMS-FrontEnd/src/views/components/articles/ContrastIndex.vue

@@ -47,7 +47,7 @@
         </el-header>
         <el-main class="patent-articles-content" style="padding-left:30px">
           <div class="patent-articles-content-left" :style="{ width: showRight ? 'calc(100% - 321px)' : 'calc(100% - 21px)' }">
-            <component :is="componentName" :type1='type' :isTrue="isTrue" @openContrast='openContrast' :project-id="projectId" :patent="patent" :patent-id="patentId" :signPatentNo="signPatentNo" :patentNo="this.activeMenu == 'patentWorth'?[patentNo]:patentNo" :publicNo="publicNo" :domId="patentNo + '2'" :reportId="reportId" @refresh="getPatent(patentId)"></component>
+            <component :is="componentName" :type1='type' :isTrue="isTrue" @openContrast='openContrast' :project-id="projectId" :patent="patent" :patent-id="patentId" :signPatentNo="signPatentNo" :patentNo="this.activeMenu == 'patentWorth'?[patentNo]:patentNo" :publicNo="publicNo" :domId="patentNo + '2'" :reportId="reportId" @refresh="getPatent(patent.patentNo)"></component>
           </div>
           <div class="patent-articles-content-right" v-if="showRight">
             <el-container>

+ 7 - 4
RMS-FrontEnd/src/views/components/articles/components/PatentBasic.vue

@@ -26,7 +26,7 @@
             </td>
           </tr>
           <tr>
-            <td width="80"><span  class="patent-basic-label">标签:</span></td>
+            <!-- <td width="80"><span  class="patent-basic-label">标签:</span></td>
             <td>
               <div class="patent-label">
                 <template >
@@ -43,12 +43,12 @@
                   >
                   </el-input>
                   <el-button :disabled="!($permission('/workspace/details/addLabel') && $r(projectId,[1,2]))" v-else type="primary" size="mini" @click="showInputLabel" circle icon="el-icon-plus"></el-button>
-                </template>
+                </template> -->
                 <!-- <template v-else>
                   <el-tag v-for="(label, index) in patent.label" effect="dark" type="success" size="small">{{ label.name }}</el-tag>
                 </template> -->
-              </div>
-            </td>
+              <!-- </div>
+            </td> -->
           </tr>
         </table>
               </el-tab-pane>
@@ -181,6 +181,9 @@ watch:{
     },
     handleInputLabelConfirm() {
       let inputLabelValue = this.inputLabelValue;
+      if (!this.patent.label) {
+        this.patent.label=[]
+      }
       if (inputLabelValue) {
         this.patent.label.push({
           name: inputLabelValue

+ 18 - 14
RMS-FrontEnd/src/views/components/articles/components/PatentImage.vue

@@ -4,8 +4,8 @@
     <div class="demonstration">图片大小:</div>
     <el-slider v-model="value"  @change="changeWidth" :min="25" :max="100" style="padding-left:90px"></el-slider>
   </div>
-    <el-row :gutter="24" >
-      <el-col :span="24" v-for="(item, index) in patent.image" class="imageCard">
+    <!-- <el-row :gutter="24" >
+      <el-col :span="24" v-for="(item, index) in patent.image" class="imageCard"> -->
         <!-- <el-card class="preview" shadow="hover" :style="{width:width}">
           <div slot="header" class="card-header" v-if="$r(projectId, [1, 2])">
             <span></span>
@@ -16,22 +16,26 @@
             <el-image src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2Ftp09%2F210F2130512J47-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1660802554&t=1e93af3906def4044c9b4642a2098d66" :preview-src-list="srcList" style="height: 100%;"></el-image>
           </div>
         </el-card> -->
-            <el-card class="preview" shadow="hover" :style="{width:width}">
-          <div slot="header" class="card-header" >
-            <span></span>
-            <el-button :disabled="!$permission('/workspace/details/figureDelete')" class="delete" type="text" @click="handleDelete(item)">删除</el-button>
-            <el-button :disabled="!$permission('/workspace/details/figuremodify')" class="edit" type="text" @click="handleEdit(item)">编辑</el-button>
-          </div>
-          <div class="text-align_center">
-            <el-image :src="getImagePath(item.url)" :preview-src-list="srcList" style="height: 100%; min-height:125px;"></el-image>
-          </div>
-        </el-card>
+        <div class="imageCard">
+
+        
+          <el-card class="preview" v-for="(item, index) in patent.image" shadow="hover" :style="{width:width}">
+            <div slot="header" class="card-header" >
+              <span></span>
+              <el-button :disabled="!$permission('/workspace/details/figureDelete')" class="delete" type="text" @click="handleDelete(item)">删除</el-button>
+              <el-button :disabled="!$permission('/workspace/details/figuremodify')" class="edit" type="text" @click="handleEdit(item)">编辑</el-button>
+            </div>
+            <div class="text-align_center">
+              <el-image  l-image :src="getImagePath(item.url)" :preview-src-list="srcList" style="height: 100%; min-height:125px;"></el-image>
+            </div>
+          </el-card>
+        </div>
         
-      </el-col>
+      <!-- </el-col> -->
       <!-- <el-col :span="24" v-if="$r(projectId, [1, 2])" :style="{width:width}">
         
       </el-col> -->
-    </el-row>
+    <!-- </el-row> -->
     <div type="primary" class="up" v-if="$permission('/workspace/details/figureUpdata') && $r(projectId,[1,2])" @click="handleAdd">上传图片</div>
           <!-- <i class="el-icon-circle-plus-outline" style="font-size:40px"  @click="handleAdd"></i> -->
      <!-- <div type="primary" class="up" v-else :disabled="true">上传图片</div> -->

+ 1 - 1
RMS-FrontEnd/src/views/components/articles/index.vue

@@ -77,7 +77,7 @@
             </el-header>
             <el-main class="patent-articles-content" style="padding-left:30px">
               <div class="patent-articles-content-left" :style="{ width: showRight ? 'calc(100% - 321px)' : 'calc(100% - 21px)' }">
-                <component :is="componentName" :reportType="reportType"  @getVisible="getVisible" :project-id="projectId" @isTrues="getIsTrue" :isTrue="isTrue" :type1="type" :patent="patent" :patentNo="[patent.patentNo]" :domId="patent.patentNo + '1'" :reportId="reportId" :patent-id="patentId" @openContrast='openContrast' @refresh="getPatent(patentId)" ></component>
+                <component :is="componentName" :reportType="reportType"  @getVisible="getVisible" :project-id="projectId" @isTrues="getIsTrue" :isTrue="isTrue" :type1="type" :patent="patent" :patentNo="[patent.patentNo]" :domId="patent.patentNo + '1'" :reportId="reportId" :patent-id="patentId" @openContrast='openContrast' @refresh="getPatent(patent.patentNo)" ></component>
               </div>
               <div class="patent-articles-content-right" v-if="showRight">
                 <el-container>

+ 2 - 2
RMS-FrontEnd/src/views/product/components/product.vue

@@ -253,7 +253,7 @@ export default {
       title: null,
       categoryTitle: null,
       queryParams: {
-        patentNo: this.patentNo ? this.patentNo : null,
+        patentNo: this.patentNo ? this.patentNo[0] : null,
         groupBy:'',
         orderBy:'',//排序名称
         orderType:'',//排序类型
@@ -281,7 +281,7 @@ export default {
   },
   watch:{
     patentNo(val){
-      this.queryParams.patentNo = val
+      this.queryParams.patentNo = val[0]
       this.getList()
     },
   },

+ 19 - 13
RMS-FrontEnd/src/views/report/Invalid/InvalidPage/AssignTasks.vue

@@ -233,12 +233,13 @@ export default {
       // let value=JSON.parse(val)
       if (Object.keys(val).length != 0) {
         if (this.params) {
+          this.params.current = 1
           for (let key in val) {
             this.params[key]=val[key]
           } 
           this.getList2()
         } else {
-
+          this.queryParams.current = 1
           for (let key in val) {
           this.queryParams[key]=val[key]
         } 
@@ -612,31 +613,35 @@ export default {
       })
     },
     async getList2() {
-      // 需要根据报告id查询所有对比文件
-      await this.$api.getSureCompareFile(this.params).then(response => {
-        // //console.log(res);
-        if(response.code==200){
-          this.tableData = response.data.records
-          //console.log(this.tableData,response.data.records);
-          this.total = response.data.total
-          this.totalNumber = this.total
-          this.leaveNumber = this.leaveNumber===null?this.total:this.leaveNumber
+      this.tableData = []
+    await this.$api.getSureCompareFile(this.params).then(response=>{
+      if (response.code == 200) {
+          var tableData = response.data.records
+        this.total = response.data.total
+          this.queryParams.total = response.data.total
+          if(this.isFirst==true){
+            this.totalNumber = this.total
+            this.leaveNumber = this.leaveNumber===null?this.total:this.leaveNumber
+          }
+          this.isFirst = false
+          
           // var a = []
           // var b=this.tableData
           for(var i=0;i<this.checkList.length;i++){
             if(this.checkList[i].patentNos.length>0){
               for(var j=0;j<this.checkList[i].patentNos.length;j++){
                 // //console.log(b)
-                var index = this.tableData.findIndex(item=>{
+                var index = tableData.findIndex(item=>{
                   return item.patentNo == this.checkList[i].patentNos[j]
                 })
                 if(index!=-1){
-                   this.tableData[index].disabled =  true
+                   tableData[index].disabled =  true
                 }
               }
              
             }
-          }
+        }
+          this.tableData = tableData
           if (this.checkList.length==0) {
             this.fu()
           }
@@ -644,6 +649,7 @@ export default {
         }
       })
     },
+    
   },
   getData(){
 

+ 1 - 1
RMS-FrontEnd/src/views/report/components/patentTable.vue

@@ -323,7 +323,7 @@ export default{
       if (this.choiceMark) {
         var choice = this.choiceTableData.map(item => item.patentNo);
       } else {
-         var choice = this.tableData.map(item => item.patentNo);
+        var choice = this.tableData.filter(item=>!item.disabled).map(item => item.patentNo);
       }
       
       this.selected = [...new Set(this.selected.concat(choice))]

+ 2 - 1
RMS-FrontEnd/src/views/report/reportDetails/components/reportFile.vue

@@ -19,7 +19,7 @@
               <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip>
                 <template slot-scope="scope" v-if="scope.row.reportFiles">
                   <div>
-                    <span>{{scope.row.reportFiles[0].name}}</span>
+                    <span>{{scope.row.name}}</span>
                   </div>
                 </template>
               </el-table-column>
@@ -163,6 +163,7 @@ export default {
         this.$set(this.ruleForm, 'remark', '')
         this.$set(this.ruleForm, 'type', this.type)
         this.$set(this.ruleForm, 'id', null)
+        this.$set(this.ruleForm, 'name', '')
         this.dialogVisible = false
       },
       handleAdd() {