zhuhao 1 éve
szülő
commit
7e3b439fc4

+ 31 - 2
src/api/newApi/report.js

@@ -193,8 +193,8 @@ export default {
   /**
    * FTO报告详情查询已经对比过的专利文件
    */
-  getComparedPatent(params) {
-    return axios.get("/xiaoshi/fto/getComparedPatent", {params});
+  getComparedPatent(data) {
+    return axios.post("/xiaoshi/fto/getComparedPatent", data);
   },
   /**
    * FTO报告详情查询已经对比过的专利文件的对比结果
@@ -234,5 +234,34 @@ export default {
   },
 
 
+  /**
+   * 报告文档
+   */
+  /**
+   * 报告文档添加
+   */
+  addReferences(data) {
+    return axios.post("/xiaoshi/references/addReferences", data);
+  },
+   /**
+   * 报告文档编辑
+   */
+  updateReferences(data) {
+    return axios.post("/xiaoshi/references/updateReferences", data);
+  },
+   /**
+   * 报告文档查询
+   */
+   getReferences(params) {
+    return axios.get("/xiaoshi/references/getReferences", {params});
+  },
+   /**
+   * 报告文档删除
+   */
+   deleteReferences(data) {
+    return axios.post("/xiaoshi/references/deleteReferences", data);
+  },
+
+
 
 };

+ 1 - 1
src/views/components/identificationCode/index.vue

@@ -86,7 +86,7 @@ export default {
         window.open(router.href, '_blank')
       } else {//侵权
         let router = this.$router.resolve({
-          path: '/tortTeamWork',
+          path: '/tortIndex',
           query: {
             taskId: row.id,
             projectId: row.projectId,

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

@@ -205,7 +205,7 @@ export default {
         if (res.code == 200) {
           this.patentList = res.data.data
           this.total = res.data.total
-          this.index = current - 1
+          this.index = (this.currentLocation-1) < current?this.currentLocation - 1:current-1
           this.loading = false
         }
       }).catch(error => {

+ 7 - 1
src/views/project/patentDetails/index.vue

@@ -39,13 +39,18 @@ export default {
     taskId() {
       return this.$route.query.taskId
     },
+    reportType() {
+      return this.$route.query.reportType
+    },
     search(){
       return this.$s.getSession('search')||{}
     }
     
   },
   created() {},
-  mounted() {},
+  mounted() {
+    console.log(this.search);
+  },
   methods: {
     event(val){
       this[val]()
@@ -70,6 +75,7 @@ export default {
           query: {
             projectId: this.projectId,
             taskId: this.taskId,
+            reportType: this.reportType,
           }
         }
       )

+ 97 - 87
src/views/report/components/details/index.vue

@@ -3,12 +3,12 @@
     <el-container>
       <el-aside :width="width">
         <div class="point" @click="getCollapse">
-          {{isCollapse?'收起':'展开'}}
+          {{ isCollapse ? '收起' : '展开' }}
         </div>
         <el-menu class="theme-dark" :default-active="activeMenu" @select="changeComponent" :collapse="!isCollapse">
           <el-menu-item v-for="item in menuList" :key="item.name" :index="item.name" v-if="!item.show">
             <i class="el-icon-film"></i>
-            <span slot="title">{{item.label}}</span>
+            <span slot="title">{{ item.label }}</span>
           </el-menu-item>
         </el-menu>
       </el-aside>
@@ -16,7 +16,7 @@
         <component :is='componentName' :projectId="projectId" :patentNo="patentNo" :reportType="reportType"></component>
       </el-main>
     </el-container>
-    
+
   </div>
 </template>
 
@@ -27,23 +27,23 @@ export default {
   },
   data() {
     return {
-        activeMenu:'Table',
-        componentName:'',
-        menuList:[
-          {
-            label:'基本信息',
-            name:'Table',
-            path:'report/components/details/components/basicMessage.vue'
-          },
-          {
-            label:'任务清单',
-            name:'task',
-            path:'task/components/index.vue'
-          }
-        ],
-        comments:{},
-        isCollapse:true,
-        width:'200px'
+      activeMenu: 'Table',
+      componentName: '',
+      menuList: [
+        {
+          label: '基本信息',
+          name: 'Table',
+          path: 'report/components/details/components/basicMessage.vue'
+        },
+        {
+          label: '任务清单',
+          name: 'task',
+          path: 'task/components/index.vue'
+        }
+      ],
+      comments: {},
+      isCollapse: true,
+      width: '200px'
     };
   },
   watch: {},
@@ -54,112 +54,122 @@ export default {
     patentNo() {
       return this.$route.query.patentNo
     },
-    reportType(){
+    reportType() {
       return this.$route.query.reportType
-    }
+    },
+    status() {//报告状态3为完成
+      return this.$route.query.status
+    },
   },
-  created() {},
+  created() { },
   mounted() {
     this.getMenu()
   },
   methods: {
-    getCollapse(){
+    getCollapse() {
       this.isCollapse = !this.isCollapse
-      this.width = this.isCollapse?'200px':'64px'
+      this.width = this.isCollapse ? '200px' : '64px'
     },
-    getMenu(){
+    getMenu() {
       var menus = [
         {
-          label:'标的专利特征拆分',
-          name:'splitPatent',
-          path:'report/components/details/components/splitDetails.vue',
-          reportType:[0,1,2,5]
+          label: '标的专利特征拆分',
+          name: 'splitPatent',
+          path: 'report/components/details/components/splitDetails.vue',
+          reportType: [0, 1, 2, 5]
         },
         {
-          label:'标的产品信息',
-          name:'informationEntry',
-          path:'report/tort/components/informationEntry/indexMenu.vue',
-          reportType:[3,4]
+          label: '标的产品信息',
+          name: 'informationEntry',
+          path: 'report/tort/components/informationEntry/indexMenu.vue',
+          reportType: [3, 4]
         },
         {
-          label:'专利与产品关联比对',
-          name:'productMessage',
-          path:'report/tort/components/tortContrast.vue',
-          reportType:[4]
+          label: '专利与产品关联比对',
+          name: 'productMessage',
+          path: 'report/tort/components/tortContrast.vue',
+          reportType: [4]
         },
         {
-          label:'对比文件',
-          name:'productMessage',
-          path:'report/components/patentList/components/index.vue',
-          reportType:[3]
+          label: '对比文件',
+          name: 'productMessage',
+          path: 'report/components/patentList/components/index.vue',
+          reportType: [3]
         },
         {
-          label:'对比结果',
-          name:'productResult',
-          path:'report/components/productResult/productResult.vue',
-          reportType:[3,4]
+          label: '对比结果',
+          name: 'productResult',
+          path: 'report/components/productResult/productResult.vue',
+          reportType: [3, 4]
         },
-        { 
-          label: '回避设计方案', 
-          name:"avoid",
-          path:'report/avoid/components/avoidDirection.vue',
-          reportType:[5]
-        }, 
-        { 
-          label: '回避设计结果', 
-          name:"direction",
-          path:'report/avoid/components/direction.vue',
-          reportType:[5]
+        {
+          label: '回避设计方案',
+          name: "avoid",
+          path: 'report/avoid/components/avoidDirection.vue',
+          reportType: [5]
         },
-        { 
-          label: '报告文档', 
-          name:"reportFile",
-          path:'report/components/reportFile/reportFileTable.vue',
-          reportType:[0,1,2,3,4,5]
+        {
+          label: '回避设计结果',
+          name: "direction",
+          path: 'report/avoid/components/direction.vue',
+          reportType: [5]
         },
-        { 
-          label: '后续事项', 
-          name:"remarryMatter",
-          path:'report/components/matter/remarryMatter.vue',
-          reportType:[0,1,2,3,4,5]
+        {
+          label: '报告文档',
+          name: "reportFile",
+          path: 'report/components/reportFile/reportFileTable.vue',
+          reportType: [0, 1, 2, 3, 4, 5]
         },
+
       ]
-      var menu = menus.filter(item=>{
-        return item.reportType.indexOf(Number(this.reportType))!=-1
+      if (this.status == 3) {
+        let arr = [
+          {
+            label: '后续事项',
+            name: "remarryMatter",
+            path: 'report/components/matter/remarryMatter.vue',
+            reportType: [0, 1, 2, 3, 4, 5]
+          },
+        ]
+        menus = menus.concat(arr)
+      }
+      var menu = menus.filter(item => {
+        return item.reportType.indexOf(Number(this.reportType)) != -1
       })
       this.menuList.splice(1, 0, ...menu)
-        this.getComponents()
+      this.getComponents()
     },
-    getComponents(){
-        this.menuList.forEach((item,index)=>{
-         import(`@/views/${item.path}`).then(res=>{
+    getComponents() {
+      this.menuList.forEach((item, index) => {
+        import(`@/views/${item.path}`).then(res => {
           this.comments[item.name] = res.default
-          if(index == 0){
+          if (index == 0) {
             this.componentName = this.comments[item.name]
           }
         })
       })
     },
-    changeComponent(name){
+    changeComponent(name) {
       this.activeMenu = name
-        this.componentName = this.comments[name]
+      this.componentName = this.comments[name]
     },
 
   },
 };
 </script>
 <style lang="scss" scoped>
-.point{
+.point {
   line-height: 40px;
-    text-align: center;
-    border-bottom: 1px solid #e6e6e6;
-    /* color: var(--color); */
-    font-family: var(--fm);
-    color: var(--color2);
-    cursor: pointer;
-    width: 100%;
-    &:hover{
-      background: #ecf5ff
-    }
+  text-align: center;
+  border-bottom: 1px solid #e6e6e6;
+  /* color: var(--color); */
+  font-family: var(--fm);
+  color: var(--color2);
+  cursor: pointer;
+  width: 100%;
+
+  &:hover {
+    background: #ecf5ff
+  }
 }
 </style>

+ 6 - 1
src/views/report/components/drawer/reportFileDrawer.vue

@@ -1,12 +1,17 @@
 <template>
   <div>
-    <reportFileTable></reportFileTable>
+    <reportFileTable :projectId="projectId"></reportFileTable>
   </div>
 </template>
 
 <script>
 import reportFileTable from '../reportFile/reportFileTable.vue'
 export default {
+  props: {
+    projectId: {
+      default:'',
+    },
+  },
   components: {
     reportFileTable
   },

+ 2 - 1
src/views/report/components/mixins/index.js

@@ -29,7 +29,8 @@ export default {
         query: {
           projectId: row.id,
           patentNo:row.signPatentNo,
-          reportType:row.reportType
+          reportType: row.reportType,
+          status:row.status,
         }
       })
 

+ 48 - 37
src/views/report/components/patentList/components/customFields.vue

@@ -12,8 +12,9 @@
       </el-header>
       <el-main class="patent-tree-filter-main">
         <template v-if="field.length > 0">
-          <el-collapse v-model="activeNames" @change="handleChange" style="margin: 0px 5px 0px 5px;">
-            <el-collapse-item v-for="item in field" :title="item.name" :name="item.id" :key="item.id" :loading="loading">
+          <el-collapse v-model="activeNames" style="margin: 0px 5px 0px 5px;">
+            <el-collapse-item v-for="item in field" :title="item.name" :name="item.id" :key="item.id" :loading="loading"
+              @click.stop.prevent.native="handleChange(item)">
               <!-- <div class="patent-query-filter-search">
                 <div class="patent-query-filter-search-input">
                   <el-input v-if="item.type != 6" v-model="sourceQuery[item.id].name" size="small"
@@ -31,25 +32,27 @@
               </div> -->
               <!-- 日期 -->
               <div v-if="item.type != 6" style="display:flex;margin-bottom: 10px;">
-                <el-input v-if="[0,4,5].includes(item.type)" size="small"
-                    placeholder="请输入查询内容"></el-input>
+                <el-input v-if="[4, 5].includes(item.type)" size="small" v-model="valObj.valueOne"
+                  placeholder="请输入查询内容"></el-input>
                 <div v-if="[1].includes(item.type)" class="year-data-picker">
-                  <el-date-picker clear-icon size="small" type="year"
-                    value-format="yyyy" placeholder="请选择时间"></el-date-picker>
+                  <el-date-picker clear-icon size="small" type="year" v-model="valObj.valueOne" value-format="yyyy"
+                    placeholder="请选择时间"></el-date-picker>
                   <span style="margin: 5px;">至</span>
-                  <el-date-picker clear-icon size="small" type="year"
-                    value-format="yyyy" placeholder="请选择时间"></el-date-picker>
+                  <el-date-picker clear-icon size="small" type="year" v-model="valObj.valueTwo" value-format="yyyy"
+                    placeholder="请选择时间"></el-date-picker>
                 </div>
-                <el-button v-if="[0,1,4,5].includes(item.type)"  @click="handleSearch(item)" size="small" type="primary" class="margin-left_10"
-                  icon="el-icon-search" circle></el-button>
+                <el-button v-if="[1, 4, 5].includes(item.type)" @click="handleSearch(item)" size="small" type="primary"
+                  class="margin-left_10" icon="el-icon-search" circle></el-button>
               </div>
               <!-- 数字 -->
               <div v-if="item.type == 0">
-                <el-input type="textarea" :rows="2" placeholder="请输入内容"  v-model="valObj.description2" @blur="handleBlur(item,0)"></el-input>
+                <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="valObj.description2"
+                  @blur="handleBlur(item, 0)"></el-input>
               </div>
               <!-- 文本 -->
               <div v-if="item.type == 2">
-                <el-input type="textarea" :rows="2" v-model="valObj.description" @blur="handleBlur(item,1)" placeholder="请输入内容"></el-input>
+                <el-input type="textarea" :rows="2" v-model="valObj.description" @blur="handleBlur(item, 1)"
+                  placeholder="请输入内容"></el-input>
               </div>
               <!-- 单选 -->
               <div v-if="item.type == 4">
@@ -123,7 +126,7 @@ export default {
     return {
       // isHidden: true,// 是都显示已读、未读、全部
       readList: [],//已读未读全部
-      activeNames: '',//展示哪一个面板
+      activeNames: [],//展示哪一个面板
       // 面板的loading
       loading: false,
       // 已读未读状态信息
@@ -156,8 +159,8 @@ export default {
         treeArr: [],
         check: [],
         radio: '',
-        description: '',
-        description2: '',
+        valueOne: '',
+        valueTwo: '',
       },
       // 总数据
       customFields: [],
@@ -169,22 +172,8 @@ export default {
   },
   mounted() {
     this.getList()
-    this.esCountSearch()
   },
   methods: {
-    // 获取
-    esCountSearch() {
-      let params={}
-      this.$api.esCountSearch().then(response => {
-        if (response.code == 200) {
-
-        }
-      }).catch(error => {
-       
-      })
-    },
-    // 点击搜索自定义栏位的选项
-    handleSearch(val){},
     // 查询自定义栏位数据
     getList() {
       var params = {
@@ -231,7 +220,7 @@ export default {
     },
 
     // 处理树类型的文件数字
-    getCount(rowId, childId) { 
+    getCount(rowId, childId) {
       return 0
     },
     // 加载更多
@@ -303,7 +292,7 @@ export default {
       } else {
         this.customFields.push(obj)
       }
-      this.$emit('customFields',this.customFields)
+      this.$emit('customFields', this.customFields)
     },
     // 处理数字、文字
     handleBlur(item, type) {
@@ -312,11 +301,34 @@ export default {
       } else {
         this.customFields[item.id] = [valObj.description]
       }
-      this.$emit('customFields',this.customFields)
+      this.$emit('customFields', this.customFields)
     },
-    // 点击面版
-    handleChange(val) { 
-      
+    // 点击当前面版
+    handleChange(val) {
+      this.esCountSearch(val)
+    },
+    
+    // 点击搜索自定义栏位的选项
+    handleSearch(val) {
+      this.esCountSearch(val,)
+    },
+    // 获取统计数字
+    esCountSearch(val) {
+      let params = {
+        filed: 'filed',
+        fieldId: val.id,
+        valueOne:this.valObj.valueOne || '',
+        valueTwo:this.valObj.valueTwo || '',
+      }
+      console.log(params);
+      return
+      this.$api.esCountSearch(params).then(response => {
+        if (response.code == 200) {
+
+        }
+      }).catch(error => {
+
+      })
     },
     // 点击已读、未读、全部
     handleReadQuery(val) { },
@@ -452,5 +464,4 @@ export default {
 .query-read-status_is-active {
   background: #409EFF !important;
   color: #ffffff !important;
-}
-</style>
+}</style>

+ 11 - 2
src/views/report/components/patentList/components/index.vue

@@ -86,6 +86,9 @@ export default {
     isResult: {//1处理2查看3确认结果
       default: ''
     },
+    handlerType: {//1内部人员0外部人员(只有外部人员做协同才会传递)
+      default: ''
+    },
   },
   components: {
     PatentTableListView,
@@ -132,7 +135,12 @@ export default {
       this.getList()
     },
     // 处理任务
-    handleClick(row) {
+    handleClick(row,location) {
+      var search = {
+        searchOption:this.searchOption,
+        location:location
+      }
+      this.$s.setSession('search',search)
       if (this.taskType == 0) {//FTO标引任务
         this.$router.push(
           {
@@ -153,7 +161,8 @@ export default {
               taskId: this.taskId,
               reportType: this.reportType,
               patentNo: row.patentNo,
-              isResult:this.isResult
+              isResult:this.isResult,
+              handlerType:this.handlerType || '',
             }
           }
         )

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

@@ -1,7 +1,7 @@
 <template>
   <!--  -->
   <div>
-    <patentList :projectId="projectId" :taskId="taskId" :taskType="taskType" :reportType="reportType" :isResult="isResult"></patentList>
+    <patentList :projectId="projectId" :taskId="taskId" :taskType="taskType" :reportType="reportType" :isResult="isResult" :handlerType="handlerType"></patentList>
   </div>
 </template>
 
@@ -32,6 +32,9 @@ export default {
     isResult() {//1处理2查看3确认结果
       return this.$route.query.isResult
     },
+    handlerType() {//1外部人员0内部人员(只有外部做协同的时候传递)
+      return this.$route.query.handlerType
+    },
   },
   mounted() {
 

+ 12 - 7
src/views/report/components/productResult/productResult.vue

@@ -78,7 +78,7 @@
           </table>
 
 
-          <split-Page :tableData="tableData" :columnList="columnList" isResult="noShow" :isEdit="false"></split-Page>
+          <split-Page :tableData="tableData" :columnList="columnList" :patentNo="patentNo" isResult="noShow" :isEdit="false"></split-Page>
 
 
         </div>
@@ -106,7 +106,8 @@
     <teamwork ref="teamwork" :projectId="projectId" :reportType="reportType"></teamwork>
 
     <!-- 选择专利弹窗 -->
-    <checkPatent ref="checkPatent" @checkPatentList="checkPatentList" sign="teamwork" :oldSearchOption="{compareResult:queryParams.compareResult}" :tableData2="tableData2">
+    <checkPatent ref="checkPatent" @checkPatentList="checkPatentList" sign="teamwork"
+      :oldSearchOption="{ compareResult: queryParams.compareResult }" :tableData2="tableData2">
       <div slot="head">
         <el-select v-model="compareResult" clearable @change="changePatent" placeholder="请选择对比结果">
           <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
@@ -225,6 +226,7 @@ export default {
       index: 0,
       // 勾选中的特征数据
       checkList: [],
+      compareResult:'',
     }
   },
   computed: {
@@ -304,13 +306,16 @@ export default {
     // 获取信息
     async getPatentList() {
       let params = {
-          projectId: this.projectId,
-          compareResult: this.queryParams.compareResult
-        }
+        current: 1,
+        size: 9999,
+        projectId: this.projectId,
+        compareResult: this.queryParams.compareResult
+      }
       await this.$api.getComparedPatent(params).then(response => {
         if (response.code == 200) {
-            this.total = response.data.total
-            this.patentList = this.patentList.concat(response.data.data)
+          this.total = response.data.total
+
+          this.patentList = this.patentList.concat(response.data.data)
 
         }
       })

+ 49 - 31
src/views/report/components/reportFile/reportFileTable.vue

@@ -35,7 +35,7 @@
           <el-table-column label="操作" align="center" width="150">
             <template slot-scope="scope">
               <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)">
-                <P @click="handleCommand('e', scope.row)">编辑</P>
+                <spa @click="handleCommand('e', scope.row)">编辑</spa>
 
                 <el-dropdown-menu slot="dropdown" class="text-align_center">
                   <el-dropdown-item command="0">下载</el-dropdown-item>
@@ -46,7 +46,7 @@
             </template>
           </el-table-column>
         </el-table>
-        
+
       </el-main>
       <el-footer>
         <div class="pagination">
@@ -59,11 +59,11 @@
     <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" append-to-body destroy-on-close
       :close-on-click-modal="false" :before-close="handleClose">
       <el-form :model="form" :rules="rules" ref="form" label-width="80px" label-position="left">
-        <el-form-item label="文件名称" prop="name">
-          <el-input v-model="form.name" placeholder="请输入文件名称"></el-input>
+        <el-form-item label="文件名称" prop="referencesName">
+          <el-input v-model="form.referencesName" placeholder="请输入文件名称"></el-input>
         </el-form-item>
         <el-form-item label="文件选择" class="margin-bottom_0">
-          <myUpload :file-list="form.systemFileList" @on-change="onchangeFile" @on-remove="onRemove"
+          <myUpload :file-list="form.systemFileList" @on-change="onchangeFile" @on-remove="onRemove" :multiple="false"
             style="height: 185px;" :autoUpload="true">
           </myUpload>
         </el-form-item>
@@ -80,8 +80,11 @@
 </template>
 
 <script>
-import { downLoad2 } from "@/utils"
+// import { downLoad2 } from "@/utils"
+import { File } from '@/utils/model/menu/mixins'
 export default {
+  mixins: [File],
+  props: ['projectId'],
   data() {
     return {
       // table数据
@@ -97,27 +100,27 @@ export default {
         {
           name: "名称",
           type: "String",
-          value: "name",
+          value: "referencesName",
         },
         {
           name: "类型",
           type: "String",
-          value: "suffix",
+          value: "type",
         },
         {
           name: "所属报告",
           type: "String",
-          value: "reportName",
+          value: "projectName",
         },
         {
           name: "创建人",
           type: "String",
-          value: "personName",
+          value: "createName",
         },
         {
           name: "创建时间",
           type: "String",
-          value: "DataTime",
+          value: "createTime",
         },
         {
           name: "备注",
@@ -126,7 +129,14 @@ export default {
         },
       ],
       // 检索字段
-      searchFiled: [],
+      searchFiled: [
+        {
+          label: '名称',
+          value: 'referencesName',
+          type: 1,
+          placeholder: '请输入名称'
+        },
+      ],
       // 检索字符串
       searchOption: {},
       //排序字段
@@ -143,7 +153,7 @@ export default {
       },
       // 表单校验
       rules: {
-        name: [{ required: true, message: '请输入文件名称', trigger: 'blur' },],
+        referencesName: [{ required: true, message: '请输入文件名称', trigger: 'blur' },],
       },
     }
   },
@@ -153,19 +163,18 @@ export default {
     // 获取栏位
     // await this.getColumn()
     // 获取数据
-    // this.getList()
+    this.getList()
   },
   methods: {
-  
     // 弹窗确定
     submit() {
       // 判断文件是否都上传完毕
       this.$commonJS.allUploadFile(this.form)
-      
+      this.form.fileGuid=this.form.fileGuids[0]
       this.$refs.form.validate((valid) => {
         if (valid) {
           if (!this.form.id) {
-            this.$api.add(this.form).then(res => {
+            this.$api.addReferences(this.form).then(res => {
               if (res.code == 200) {
                 this.$message.success('新增成功')
                 this.getList()
@@ -175,7 +184,7 @@ export default {
 
             })
           } else {
-            this.$api.edit(this.form).then(res => {
+            this.$api.updateReferences(this.form).then(res => {
               if (res.code == 200) {
                 this.$message.success('编辑成功')
                 this.getList()
@@ -199,6 +208,12 @@ export default {
     },
     // 上传的文件监听
     onchangeFile(file, fileList) {
+      if (this.form.systemFileList && this.form.systemFileList.length > 0) {
+        return false
+      }
+      if (file) {
+        this.$set(this.form, 'referencesName', file.name)
+      }
       if (file.guid && this.form.systemFileList && this.form.systemFileList.length > 0) {
         let index = this.form.systemFileList.findIndex(item => {
           return item.uid == file.uid
@@ -223,25 +238,27 @@ export default {
     },
     // 新增
     handleAdd() {
+      this.form.projectId = this.projectId
       this.dialogVisible = true
     },
     getList() {
       let params = {
-        reportId: null,//放在外面还是searchQuery里面??
+        projectId: this.projectId,//放在外面还是searchQuery里面??
         ...this.queryParams,//分页信息
-        searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
-        orderDTOList: this.sort,//排序信息
+        searchQuery: this.$commonJS.objectToString(this.searchOption || {}),//检索条件
+        // orderDTOList: this.sort,//排序信息
       }
-      this.loading = false
-      this.$api.query(params).then(res => {
+      this.loading = true
+      this.$api.getReferences(params).then(res => {
         if (res.code == 200) {
           this.tableData = res.data
           this.total = res.data.total
-          this.loading = true
+          this.loading = false
         }
       }).catch(error => {
         this.tableData = []
         this.total = 0
+        this.loading = false
       })
     },
     // 分页
@@ -287,10 +304,10 @@ export default {
           this.handleEdit(row)
           break;
         case '0'://下载
-          this.downloads(row)
+          this.downLoad(row)
           break;
         case '1'://预览
-
+          this.preview(row)
           break;
         case '2'://删除
           this.handleDelete(row)
@@ -300,7 +317,12 @@ export default {
           break;
       }
     },
+    // 编辑
     handleEdit(row) {
+      row.systemFileList = [{
+        name: row.referencesName,
+        guid:row.guid,
+      }]
       this.form = row
       this.dialogVisible = true
     },
@@ -314,7 +336,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        this.$api.delete(ids).then(response => {
+        this.$api.deleteReferences(ids).then(response => {
           if (response.code == 200) {
             this.$message.success('删除成功')
             this.queryParams.current = 1
@@ -325,10 +347,6 @@ export default {
         this.$message.info('操作已取消')
       });
     },
-    // 下载
-    downloads(data) {
-      downLoad2(data.guid)
-    },
   },
 }
 </script>

+ 1 - 0
src/views/report/components/splitPage/splitPage.vue

@@ -261,6 +261,7 @@ export default {
     },
     //获取权要
     getRight() {
+      console.log(this.patentNo);
       if (this.rightList.length > 0) {
         return false
       }

+ 123 - 30
src/views/report/tort/components/tortContrast.vue

@@ -3,7 +3,8 @@
   <div class="height_100 tortContrast">
 
     <div class="height_100" style="display: flex;">
-      <articleMenu :projectId="projectId" :patentNo="patentNo" @getPatentLeft="getPatentLeft"></articleMenu>
+      <articleMenu :projectId="projectId" :patentNo="patentNo" @getPatentLeft="getPatentLeft" :menu="menuList"
+        @event="handleMenuEvent"></articleMenu>
       <!-- <div class="iconBtnList">
         <el-tooltip content="返回" placement="right">
           <div @click="goBack" class="iconBtn">
@@ -42,8 +43,9 @@
               :patentNo="patentNo" :projectId="projectId" :reportType="reportType" :columnList="columnList"
               @splitSelect="splitSelect" @isSave="isSave" :isEdit="(taskId && isResult) ? false : true"
               :isResult="isResult" @changeResult="changeResult">
-              <div slot="handleRight" v-if="isResult == 3">
-                <el-button type="primary" @click="agree">全部同意</el-button>
+              <div slot="handleRight" v-if="isResult == 3 || handlerType == 1">
+                <el-button v-if="isResult == 3" type="primary" @click="agree">全部同意</el-button>
+                <el-button v-if="handlerType == 1" type="primary" @click="finish">完成</el-button>
               </div>
             </component>
 
@@ -69,7 +71,7 @@ import patentDetailsPage from '@/views/project/patentDetails/components/patentDe
 import articleMenu from '@/views/project/patentDetails/components/menu.vue'
 export default {
   //
-  props: ['patentNo', 'projectId', 'reportType', 'taskId', 'isResult'],
+  props: ['patentNo', 'projectId', 'reportType', 'taskId', 'isResult', 'handlerType'],
   mixins: [patentDetails],
   components: {
     splitPage,
@@ -120,17 +122,106 @@ export default {
       // 查看详情
       look: false,
       // 菜单
-      menu:[],
+      menuList: [],
     }
   },
-  mounted() {
-    if (this.reportType == 4) {
-      this.menu.push()
-    }
+  async mounted() {
+    this.getMenuPrice()
     this.getColumn()
     this.getList()
+    if (this.taskId && this.reportType == 4) {
+      await this.getPatent()
+    }
   },
   methods: {
+    // 获取协同按钮
+    getMenuPrice() {
+      if (this.reportType == 4 && !this.taskId) {
+        this.menuList = [
+          {
+            content: '协同',
+            event: 'coordination',
+            icon: 'el-icon-s-custom',
+          }
+        ]
+      }
+    },
+    // 菜单项点击事件
+    handleMenuEvent(val) {
+      switch (val) {
+        case 'coordination':
+          this.$refs.teamwork.open()
+          break;
+        case 'goBack':
+          this.goBack()
+          break;
+        case 'contrast':
+          this.lookDetails()
+          break;
+
+        default:
+          break;
+      }
+    },
+    // 查看详情
+    lookDetails() {
+      this.look = !this.look
+    },
+    // 返回
+    goBack() {
+      if (this.taskId && (this.handlerType && this.handlerType == 1)) {//外部协同人点击返回
+        this.$confirm('返回将会关闭此页面,可通过邮件上的页面链接输入code码重新进入', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          // 关闭当前页面
+          window.opener = null;
+          window.open("", "_self");
+          window.close();
+        }).catch(() => {
+          this.$message.info('操作已取消')
+        });
+      } else if (this.taskId) {
+        this.$router.replace({
+          path: '/myTask',
+        })
+      } else {
+        this.$router.replace({
+          path: '/AllReport',
+        })
+      }
+    },
+    // 外部人员协同任务时完成按钮(调用任务的完成接口)
+    finish(id, status) {
+      let params = {
+        taskId: this.taskId,
+        type: 0,//0完成1取消
+      }
+      var str = ''
+      if (status == 0) {
+        str = `点击确定此操作会将任务置为完成,并自动关闭页面发送邮件进行通知, 是否继续?<br/>若您未保存对比结果,请您取消操作,点击保存进行保存结果,`
+      }
+      this.$confirm(str, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$api.updateTaskStatus(params).then(response => {
+          if (response.code == 200) {
+            this.$message.success('完成协同并成功发送邮件')
+            this.$nextTick(() => {
+              window.opener = null;
+              window.open("", "_self");
+              window.close();
+            })
+          }
+        })
+      }).catch(() => {
+        this.$message.info('操作已取消')
+      });
+
+    },
     // 上一篇下一篇
     getPatentLeft(val) {
       this.patentNo = val
@@ -143,6 +234,7 @@ export default {
             reportType: this.reportType,
             patentNo: val,
             isResult: this.isResult,
+            handlerType: this.handlerType || '',
           }
         }
       )
@@ -244,26 +336,7 @@ export default {
         }
       }
     },
-    // 查看详情
-    lookDetails() {
-      this.look = !this.look
-    },
-    // 协同办公
-    coordination() {
-      this.$refs.teamwork.open()
-    },
-    // 返回
-    goBack() {
-      if (this.taskId) {
-        this.$router.replace({
-          path: '/myTask',
-        })
-      } else {
-        this.$router.replace({
-          path: '/AllReport',
-        })
-      }
-    },
+
     // 切换产品信息
     handleSwitch() {
       this.viewType = (this.viewType == 'splitPage' ? 'informationEntry' : 'splitPage')
@@ -412,7 +485,7 @@ export default {
         })
       } else {//FTO对比结果
         params = {
-          taskId: this.reportType == 3 ? this.taskId : null,
+          taskId: this.taskId,
           ifReSplit: ifReSplit,
           projectId: Number(this.projectId),
           patentNo: this.patentNo,
@@ -453,6 +526,26 @@ export default {
         item.explainText = ''
       }
     },
+    // 请求专利(侵权分析协同用到)
+    async getPatent() {
+      let params = {
+        current: 1,//分页信息
+        size:10,
+        projectId: this.projectId,
+        taskId: this.taskId,
+        searchQuery: this.$commonJS.objectToString(this.searchOption || {}),//检索条件
+        customFields: [],
+        orderDTOList: [],//排序信息
+      }
+      await this.$api.QueryPatent(params).then(res => {
+        if (res.code == 200) {
+          //  console.log(res.data.data[0].patentNo);
+          this.patentNo = res.data.data[0].patentNo
+        }
+      }).catch(error => {
+        this.tableData = []
+      })
+    },
   },
 }
 </script>

+ 6 - 2
src/views/report/tort/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div>
-    <tortContrast :patentNo="patentNo" :projectId="projectId" :reportType="reportType" :taskId="taskId" :isResult="isResult"></tortContrast>
+    <tortContrast :patentNo="patentNo" :projectId="projectId" :reportType="reportType" :taskId="taskId"
+      :isResult="isResult" :handlerType="handlerType"></tortContrast>
   </div>
 </template>
 
@@ -30,7 +31,10 @@ export default {
     },
     isResult() {
       return this.$route.query.isResult
-    }
+    },
+    handlerType() {//1外部人员0内部人员(只有外部协同人做协同任务才会传递)
+      return this.$route.query.handlerType
+    },
   },
   mounted() {
 

+ 9 - 8
src/views/task/components/index.vue

@@ -41,17 +41,17 @@
               <div>
                 <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)"
                   @click="handleTask(scope.row)">
-                  <span v-if="(scope.row.status != 2 || scope.row.handlerName != userinfo.name) && (scope.row.projectType != 2)">查 看</span>
+                  <span v-if="scope.row.status != 2 || scope.row.handlerName != userinfo.name">查 看</span>
                   <span v-else>处 理</span>
                   <el-dropdown-menu slot="dropdown" style="text-align: center;">
                     <el-dropdown-item command="1" v-if="[6].includes(scope.row.type)">查看审核记录</el-dropdown-item>
                     <el-dropdown-item command="4"
-                      v-if="scope.row.status != 3 && (scope.row.createName == userinfo.name && [1, 5, 6, 7].includes(scope.row.type))">编
+                      v-if="scope.row.status != 3 && (scope.row.createName == userinfo.name && scope.row.projectType == 3)">编
                       辑</el-dropdown-item>
-                    <el-dropdown-item command="3" v-if="[4, 6].includes(scope.row.type) && scope.row.status == 2">完
+                    <el-dropdown-item command="3" v-if="[4, 6].includes(scope.row.type) && (scope.row.status == 2 || scope.row.status == 6)">完
                       成</el-dropdown-item>
                     <el-dropdown-item command="5"
-                      v-if="[4].includes(scope.row.type) && scope.row.status == 2 && scope.row.createName == userinfo.name">确认协同结果</el-dropdown-item>
+                      v-if="[4].includes(scope.row.type) && scope.row.status == 6 && scope.row.createName == userinfo.name">确认协同结果</el-dropdown-item>
                     <el-dropdown-item command="2"
                       v-if="scope.row.createName == userinfo.name || (scope.row.type == 5 && !scope.row.handlerName.includes('@'))"
                       divided style="color: red;">取 消</el-dropdown-item>
@@ -150,6 +150,7 @@ export default {
         3: '已完成',
         4: '缺少资料',
         5: '取消',
+        6: '确认结果中',
       },
     }
   },
@@ -245,14 +246,14 @@ export default {
       if (row.reportType == 3) {
         str = '/reportPatentList'
       } else {
-        str ='/tortTeamWork'
+        str = '/tortIndex'
       }
       let router = this.$router.resolve({
         path: str,
         query: {
           taskId: row.id,
           projectId: row.projectId,
-          reportType:row.reportType,
+          reportType: row.reportType,
           taskType: row.type,
           isResult: 3,
         }
@@ -370,12 +371,12 @@ export default {
         window.open(router.href, '_blank')
       } else {//侵权
         let router = this.$router.resolve({
-          path: '/tortTeamWork',
+          path: '/tortIndex',
           query: {
             taskId: row.id,
             projectId: row.projectId,
-            isResult: val,
             reportType: row.reportType,
+            isResult: val,
           }
         })
         window.open(router.href, '_blank')