浏览代码

权要、PDF的显示问题

zhuliu 1 年之前
父节点
当前提交
3529be4b72

+ 0 - 1
src/router/index.js

@@ -325,7 +325,6 @@ const routes = [
             meta: {
               title: '分配任务',
               sign: 'allocationTask',
-              belong: 'AllReport'
             },
             component: () => import('@/views/report/components/allocationTask/index.vue'),
           },

+ 2 - 4
src/views/components/dialog/examine.vue

@@ -95,10 +95,8 @@ export default {
 
   },
   methods: {
-    open(name) {
-      if (name) {
-        this.form.name = `${name}-审核任务`
-      }
+    open(form = {}) {
+      this.form = form
       // 任务类型
       this.showTask = true
     },

+ 1 - 1
src/views/components/import/conditionImport/searchResult.vue

@@ -67,7 +67,7 @@
     </el-container>
 
 
-    <field ref="field" type="patentProject" :projectId="0" @getFieldList="getFieldList"></field>
+    <field ref="field" type="patent" :projectId="0" @getFieldList="getFieldList"></field>
     <!-- <projectListDialog ref="projectListDialog" :importData="searchData"></projectListDialog> -->
     <projectListDialog ref="projectListDialog" :importData="condition"></projectListDialog>
 

+ 4 - 2
src/views/patentMining/components/dialog/addAndEditProject.vue

@@ -343,8 +343,10 @@ export default {
     handleExamine() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-          let title = this.form.name
-          this.$refs.examine.open(title)
+          var form = {
+            name:this.form.name + '审核任务'
+          }
+          this.$refs.examine.open(form)
         }
       })
     },

+ 4 - 2
src/views/patentMining/components/dialog/handleTask2.vue

@@ -188,10 +188,12 @@ export default {
     submit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-           let title = this.row.name
           this.form.projectId = this.row.projectId//项目id
           this.form.id = this.row.id//当前文件分配任务的id
-          this.$refs.examine.open(title)
+          var form = {
+            name:this.row.name + '审核任务'
+          }
+          this.$refs.examine.open(form)
         }
       })
     },

+ 4 - 2
src/views/patentMining/components/dialog/uploadFile.vue

@@ -84,8 +84,10 @@ export default {
           let obj=this.pathOptions.find(item => {
             return item.value == this.form.processId
           })
-          let title = obj.label + '文件'
-          this.$refs.examine.open(title)
+          var form = {
+            name:obj.label + '文件' + '审核任务'
+          }
+          this.$refs.examine.open(form)
         }
       })
     },

+ 15 - 0
src/views/project/patentCollection/index.vue

@@ -94,6 +94,7 @@
                   </el-dropdown>
                 </el-dropdown-item>
                 <el-dropdown-item @click.native="handleAnalyses">图表分析</el-dropdown-item>
+                <el-dropdown-item @click.native="handleAllocation">任务分配</el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
           </div>
@@ -682,6 +683,20 @@ export default {
       })
       window.open(router.href, '_blank');
     },
+    // 跳转分配任务页面
+    handleAllocation() {
+      this.$router.push(
+        {
+          path: '/allocationTask',
+          query: {
+            projectId: this.projectId,
+            searchOption: JSON.stringify(this.searchStr),//输入框检索条件
+            customFields: JSON.stringify(this.customFields),//右侧勾选自定义栏位的条件
+            projectType:1
+          }
+        }
+      )
+    },
     //合并发明人//合并申请人、权利人
     handleMerge(type) {
       let obj = {

+ 4 - 1
src/views/project/patentDetails/components/patentDetails.vue

@@ -88,7 +88,7 @@
               </div>
               <div slot="right">
                 <component :is="activeMenu2" :project-id="projectId" :outside="outside" :projectType="projectType"
-                  :patent="patent" :signPatentNo="signPatentNo" :reportType="reportType" :sign="true"
+                  :patent="patent" :signPatentNo="signPatentNo" :reportType="reportType" :sign="true" :patentNo="patent.patentNo"
                   :evidence="evidence"></component>
               </div>
             </my-view>
@@ -390,6 +390,9 @@ export default {
       this.loading = true
       this.$api[api](params).then(response => {
         if (response.code == 200) {
+          if(this.outside){
+            response.data.claim = null
+          }
           this.patent = response.data
           this.loading = false
           if (this.outside) {

+ 20 - 18
src/views/project/patentDetails/components/patentMessage/PatentPDF.vue

@@ -38,14 +38,11 @@ export default {
     }
   },
   watch: {
-    patent() {
-      if (!this.outside) {
-        this.refreshData()
-      }
-    },
     patentNo() {
       if (this.outside) {
         this.getData()
+      }else{
+        this.refreshData()
       }
     }
   },
@@ -63,11 +60,13 @@ export default {
   methods: {
     // 获取外部的pdf地址
     getData() {
+      
+      this.show = false
+      this.height = (this.fullHeight - 230) + 'px'
       if (this.patent.pdf && this.patent.pdf.length > 0) {
+        this.getSrc()
         return false
       }
-      this.show = false
-      this.height = (this.fullHeight - 230) + 'px'
       var params = {
         appNo: this.patent.appNo,
         rowApplicationNo: this.patent.rowApplicationNo,
@@ -81,17 +80,20 @@ export default {
     },
     // 内部专利根据guid获取路径
     getSrc() {
+      if(this.patent.pdf.length==0){
+        return 
+      }
       let obj = this.patent.pdf.find(item => {
         return item.type == this.pdfType
       })
-      // if (this.outside) {
-      //   var src = obj.pdfGuid
-      //   this.src = `http://${this.$c.staticURL}:8012/onlinePreview?url=` + btoa(encodeURIComponent(src + '&fullfilename=test.pdf'))
-      // } else {
+      var guid = ''
       if (obj) {//外部内部都是返回guid
-        this.src = this.$commonJS.checkGuid(obj.pdfGuid)
+        guid = obj.pdfGuid
+      }else{
+        this.pdfType = this.patent.pdf[0].type
+        guid = this.patent.pdf[0].pdfGuid
       }
-      // }
+      this.src = this.$commonJS.checkGuid(guid)
       this.$nextTick(() => {
         this.show = true
       })
@@ -100,11 +102,7 @@ export default {
     handleSelect(type) {
       this.pdfType = type
       this.show = false
-      if (this.outside) {//外部
-        this.getSrc()
-      } else {//内部
-        this.getSrc()
-      }
+      this.getSrc()
     },
     // 上传文档
     // handleChange(file, fileList) {
@@ -133,6 +131,10 @@ export default {
     refreshData() {
       this.show = false
       this.height = (this.fullHeight - 230) + 'px'
+      if(this.patent.pdf && this.patent.pdf.length>0){
+        this.getSrc()
+        return
+      }
       let params = {
         appNo: this.patent.appNo,
         // type: this.pdfType,//0公开1授权

+ 1 - 7
src/views/project/patentDetails/components/patentMessage/PatentRight.vue

@@ -339,12 +339,7 @@ export default {
         return true;
     },
     initData() {
-      if (this.patent.claims) {
-        // this.records.original = this.patent.rights.map((item) => item.content);
-        // this.records.translation = this.patent.rights.map(
-        //   (item) => item.contentOut
-        // );
-      } else {
+
         if (this.outside) {
           var params = {
             // patentCell: 1,
@@ -359,7 +354,6 @@ export default {
             }
           });
         }
-      }
     },
     handleResize(event) {
       this.fullHeight = document.documentElement.clientHeight;

+ 6 - 2
src/views/report/components/allocationTask/components/allocationTask.vue

@@ -20,7 +20,8 @@
         </div>
         <div>
           <label>任务类型:</label>
-          <el-select v-model="taskType">
+          <span v-if="projectType == 1">标引任务</span>
+          <el-select v-model="taskType" v-else>
             <el-option label="对比任务" value="3"></el-option>
             <el-option label="标引任务" value="0"></el-option>
           </el-select>
@@ -117,6 +118,9 @@ export default {
         return []
       }
     },
+    projectType:{
+      default:0
+    }
   },
   data() {
     return {
@@ -125,7 +129,7 @@ export default {
       totalNumber: 0,//总件数
       leaveNumber: 0,//剩余件数
       // 任务类型
-      taskType: "3",
+      taskType: "0",
       // 表格数据源
       tableData: [],
       // 分页信息

+ 71 - 21
src/views/report/components/allocationTask/components/showColumn.vue

@@ -14,21 +14,21 @@
                 </template>
                 <!-- 单选 -->
                 <div v-if="item.type == 4" style="padding-left: 15px;">
-                  <div v-for="radio in item.options" :key="radio.id" style="width: 100%;">
+                  <div v-for="radio in item.option" :key="radio.id" style="width: 100%;">
                     <span>{{ radio.name }}</span>
                   </div>
                 </div>
                 <!-- 多选 -->
                 <div v-if="item.type == 5" style="padding-left: 15px;">
                   <div class="source-checkbox">
-                    <div v-for="source in item.options" :key="source.id">
+                    <div v-for="source in item.option" :key="source.id">
                       <span class="source-checkbox-label">{{ source.name }}</span>
                     </div>
                   </div>
                 </div>
                 <!-- 树类型 -->
                 <el-tree v-if="item.type == 6" @check-change="onChangeTree($event, item.id)" :ref="item.id"
-                  :data="item.child" show-checkbox node-key="id" check-strictly default-expand-all
+                  :data="item.option" show-checkbox node-key="id" check-strictly default-expand-all
                   :props="{ children: 'child', label: 'name' }">
                   <div class="custom-filter-tree-node" slot-scope="{ node, data }">
                     <span class="name">{{ data.name }}</span>
@@ -121,14 +121,14 @@ export default {
     // 查询自定义栏位数据
     getList() {
       var params = {
-        ...this.queryParams,
-        searchQuery: `projectId=${this.projectId}`,
-        orderDTOList: [],
+        projectId: this.projectId,
+        taskId: this.taskId
       }
       this.loading = true
-      this.$api.queryCustomField(params).then(response => {
+      this.$api.getAllPatentCustomField(params).then(response => {
         if (response.code == 200) {
           let data = response.data.data
+          this.field = data
           this.handleFiled(data)
           this.loading = false
         }
@@ -138,30 +138,80 @@ export default {
     },
     handleFiled(data) {
       data.forEach(item => {
-        this.queryCustomOption(item)
+        this.getOption(item)
       })
     },
-    // 查询自定义栏位选项数据
-    queryCustomOption(row) {
 
-      let params = {
-        customFieldId: row.id,
+    getOption(item) {
+      switch (item.type) {
+        case 4:
+        case 5:
+          this.getCustomOption(item)
+          break;
+        case 6:
+          this.queryProductCategory(item, 4)
+          break;
+        case 7://接口传值类型:1产品类别,2产品,3技术分类,4自定义树
+          this.queryProductCategory(item, 2)
+          break;
+        case 8:
+          this.queryProductCategory(item, 1)
+          break;
+        case 9:
+          this.queryProductCategory(item, 3)
+          break;
+      }
+    },
+    //查询自定义栏位选项
+    getCustomOption(item) {
+      var params = {
+        customFieldId: item.id
       }
       this.$api.queryCustomOption(params).then(response => {
         if (response.code == 200) {
-          if (row.type == 6) {//树类型
-            row.child = response.data.data
-          } else if (row.type == 5) {
-            row.options = response.data.data
-          } else if (row.type == 4) {
-            row.options = response.data.data
-          }
-          this.field.push(row)
+          this.$set(item, 'option', response.data.data)
         }
       }).catch(error => {
-
+        this.$set(item, 'option', [])
       })
     },
+    //获取产品或产品类别架构以及技术分类
+    queryProductCategory(item, type) {
+      let params = {
+        projectId: this.projectId,
+        taskId: this.taskId,
+        type: type,//类型:1产品类别,2产品,3技术分类,4自定义树
+        typeId: item.id,//产品或类别id
+      }
+      this.$api.queryTreeNodeTree(params).then(res => {
+        if (res.code == 200) {
+          this.$set(item, 'option', res.data.data)
+        }
+      }).catch(err => {
+        this.$set(item, 'option', [])
+      })
+    },
+    // 查询自定义栏位选项数据
+    // queryCustomOption(row) {
+
+    //   let params = {
+    //     customFieldId: row.id,
+    //   }
+    //   this.$api.queryCustomOption(params).then(response => {
+    //     if (response.code == 200) {
+    //       if (row.type == 6) {//树类型
+    //         row.child = response.data.data
+    //       } else if (row.type == 5) {
+    //         row.options = response.data.data
+    //       } else if (row.type == 4) {
+    //         row.options = response.data.data
+    //       }
+    //       this.field.push(row)
+    //     }
+    //   }).catch(error => {
+
+    //   })
+    // },
 
     // 点击节点发生的变化
     onChangeTree(filed, filedId) {//当前节点的数据,当前栏位的数据

+ 5 - 2
src/views/report/components/allocationTask/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 分配任务 -->
-  <div>
-    <allocationTask :projectId="projectId" :oldSearchOption="searchOption" :customFields="customFields"></allocationTask>
+  <div class="height_100">
+    <allocationTask :projectId="projectId" :oldSearchOption="searchOption" :customFields="customFields" :projectType="projectType"></allocationTask>
   </div>
 </template>
 
@@ -26,6 +26,9 @@ export default {
     customFields() {//自定义字段检索条件
       return JSON.parse(this.$route.query.customFields)
     },
+    projectType(){//项目类型
+      return this.$route.query.projectType
+    }
   },
   mounted() {
 

+ 1 - 1
src/views/report/components/patentList/components/index.vue

@@ -304,7 +304,7 @@ export default {
         return false
       }
       switch (event) {
-        case '1':
+        case '1'://任务分配
           this.handleAllocation()
           break;
         case '2'://专利号