zhuhao 1 year ago
parent
commit
348a4cd465

+ 13 - 13
src/router/index.js

@@ -74,7 +74,7 @@ const routes = [
             component: () => import('@/views/project/patentCollection/index.vue')
           },
           {
-            path: 'patentDetails/:patentNo',
+            path: '/patentDetails/:patentNo',
             name:'patentDetails',
             meta: {
               title: '专利文章',
@@ -311,18 +311,18 @@ const routes = [
             },
             component:() => import('@/views/report/components/allocationTask/index.vue'),
           },
-          //报告处理分配任务专利清单
-          // {
-          //   path: '/patentListTask',
-          //   name:"patentListTask",
-          //   meta:{
-          //     aside: true,
-          //     showHeader: true,
-          //     sign:'patentListTask',
-          //     belong:'AllReport'
-          //   },
-          //   component:() => import('@/views/report/components/allocationTask/index.vue'),
-          // },
+          //报告处理分配(标引)任务专利清单
+          {
+            path: '/patentListTask',
+            name:"patentListTask",
+            meta:{
+              aside: true,
+              showHeader: true,
+              sign:'patentListTask',
+              belong:'AllReport'
+            },
+            component:() => import('@/views/report/components/patentListTask/index.vue'),
+          },
           //侵权分析
           {
             path: '/tortIndex',

+ 5 - 2
src/utils/model/route.vue

@@ -8,17 +8,20 @@
       </div>
       <div slot="right">222</div>
     </myView2> -->
-    <avoidDirection></avoidDirection>
+    <!-- <avoidDirection></avoidDirection> -->
+    <PatentField></PatentField>
   </div>
 </template>
 
 <script>
 import myView2 from './myView/index.vue'
 import avoidDirection from '@/views/report/avoid/components/avoidDirection.vue'
+import PatentField from '@/views/project/patentDetails/components/PatentField.vue'
 export default {
   components: {
     myView2,
-    avoidDirection
+    avoidDirection,
+    PatentField
   },
   props: {},
   data() {

+ 11 - 5
src/views/components/dialog/examine.vue

@@ -7,7 +7,7 @@
         <el-form-item label="任务名称:" prop="name">
           <el-input v-model="form.name" type="text" placeholder="请输入任务名称" />
         </el-form-item>
-        <el-form-item :label="handlerLabel + ':'" prop="handlerName">
+        <el-form-item v-if="isShow" :label="handlerLabel + ':'" prop="handlerName">
           <el-autocomplete v-model="form.handlerName" value-key="name" v-SelectLazyLoading="personnelLoad"
               :fetch-suggestions="querySearchPersonnel" :placeholder="handPlaceholder" :trigger-on-focus="false"
               @select="handleSelectPersonnel" @blur="handleBlur(form.handlerName)" style="width: 100%;"></el-autocomplete>
@@ -36,6 +36,10 @@ export default {
       type: String,
       default:'添加审核任务'
     },
+    isShow:{
+      type: Boolean,
+      default:true,
+    },
     handlerLabel: {
       type: String,
       default:'审核人'
@@ -110,10 +114,12 @@ export default {
            * 6文件分配任务审核
            * 7文件列表审核
            */
-          if (this.form.handlerName.includes('@')) {//是邮箱为1
-            this.form.handlerType = 1
-          } else {//是id为0
-            this.form.handlerType = 0
+          if (this.isShow) {
+            if (this.form.handlerName.includes('@')) {//是邮箱为1
+              this.form.handlerType = 1
+            } else {//是id为0
+              this.form.handlerType = 0
+            }
           }
           this.$emit('save',this.form)
         }

+ 246 - 0
src/views/project/patentDetails/components/PatentField.vue

@@ -0,0 +1,246 @@
+<template>
+  <div class="PatentField height_100">
+    <el-container class="height_100" style="width: 300px;float: right;">
+      <el-main>
+        <template>
+          <el-form label-position="top" class="custom-field-form">
+            <el-form-item v-for="item in field" :key="item.id">
+              <template slot="label">
+                <span :title="item.name" class="name">{{ item.name }}</span>
+              </template>
+              <!-- 已选择 -->
+              <template v-if="[4, 5, 6].includes(item.type)">
+                <div style="display: flex;align-items: center;">
+                  <!-- <el-popover placement="top-start" title="标题" width="200" trigger="hover"
+                    >
+                    <div v-for="checks in dataShow.filter(showItem =>{ return  showItem.type == item.type})" :key="checks.id">
+                      <span>{{ checks.name }}</span>
+                    </div>
+                    <div slot="reference">已选择的栏位</div>
+                  </el-popover> -->
+
+                  <div @click="hover(item)" class="check" style="min-width: 120px;min-height: 30px;background: rgb(235, 235, 168);position: relative;" >
+                    <div style="text-align: center;">已选择的栏位 <i class="el-icon-arrow-down"></i></div>
+                    <div class="checkSon">
+                      <div v-for="checks in dataShow.filter(showItem => { return showItem.type == item.type })"
+                        :key="checks.id">
+                        <span>{{ checks.name }}</span>
+                      </div>
+                    </div>
+                  </div>
+                  <el-tooltip class="item" effect="dark" content="显示栏位的值" placement="top">
+                    <el-button @click="showClick(item)" type="primary" size="small" style="margin-left: 10px;">{{ '显示'
+                    }}</el-button>
+                  </el-tooltip>
+                </div>
+              </template>
+              <!-- 数字、日期、文字 -->
+              <template v-if="item.type === 0 || item.type === 2 || item.type === 1">
+                <div class="custom-input">
+                  <el-date-picker v-if="item.type === 1" value-format="yyyy-MM-dd" type="date" size="small"
+                    placeholder="选择日期" class="width_100" @change="onChange(item, val)"></el-date-picker>
+                  <el-input v-else type="textarea" placeholder="请输入内容" size="small"
+                    @blur="onChange(item, val)"></el-input>
+                </div>
+              </template>
+
+              <!-- 单选 -->
+              <div v-if="item.type == 4 && show.field1">
+                <el-radio v-for="radio in item.options" :key="radio.id" :label="radio.id" style="width: 100%;">
+                  <span>{{ radio.name }}</span>
+                </el-radio>
+              </div>
+              <!-- 多选 -->
+              <el-checkbox-group v-if="item.type == 5 && show.field2">
+                <div class="source-checkbox">
+                  <el-checkbox v-for="source in item.options" :label="source.id" :key="source.id">
+                    <span class="source-checkbox-label">{{ source.name }}</span>
+                  </el-checkbox>
+                </div>
+              </el-checkbox-group>
+              <!-- 树类型 -->
+              <el-tree v-if="item.type == 6 && show.field3" @check-change="onChangeTree($event, item.id)" :ref="item.id"
+                :data="item.child" show-checkbox node-key="id" check-strictly :default-expand-all="false"
+                :props="{ children: 'child', label: 'name' }">
+                <div class="custom-filter-tree-node" slot-scope="{ node, data }">
+                  <span class="name">{{ data.name }}</span>
+                </div>
+              </el-tree>
+            </el-form-item>
+          </el-form>
+        </template>
+      </el-main>
+    </el-container>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      field: [],
+      // 控制栏位值的显示
+      show: {
+        field1: false,
+        field2: false,
+        field3: false,
+      },
+      // 显示已选择的数据
+      dataShow: []
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    hover(row) {
+      let divCheckSon = document.querySelector('.checkSon')
+      divCheckSon.classList.add('Checked')
+    },
+    // 显示自定义栏位
+    showClick(row) {
+      switch (row.type) {
+        case 4:
+          this.show.field1 = !this.show.field1
+          break;
+        case 5:
+          this.show.field2 = !this.show.field2
+          break;
+        case 6:
+          this.show.field3 = !this.show.field3
+          break;
+
+        default:
+          break;
+      }
+    },
+    onChangeTree(val) {
+      console.log(val);
+      let obj = {
+        name: val.name,
+        id: val.id,
+        type: val.type
+      }
+      if (this.dataShow.length>0) {
+        let index = this.dataShow.forEach(item => {
+          return item.id == val.id
+        })
+        if (index!=-1) {
+          
+        } else {
+          this.dataShow.push(obj)
+        }
+      } else {
+        this.dataShow.push(obj)
+      }
+      
+    },
+    // 查询自定义栏位数据
+    getList() {
+      var params = {
+        current: 1,
+        size: 10,
+        searchQuery: `projectId=${101}`,
+        orderDTOList: [],
+      }
+      this.$api.queryCustomField(params).then(response => {
+        if (response.code == 200) {
+          let data = response.data.data
+          this.handleFiled(data)
+        }
+      }).catch(error => {
+        this.loading = false
+      })
+    },
+    handleFiled(data) {
+      data.forEach(item => {
+        this.queryCustomOption(item)
+      })
+    },
+    // 查询自定义栏位选项数据
+    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 => {
+
+      })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.PatentField {
+  .Checked{
+    min-width: 120px;
+    min-height: 30px;
+    background: rgb(235, 235, 168);
+    position: absolute;
+    top: 45px;
+    left: 0px;
+    z-index: 10;
+  }
+  .name {
+    display: block;
+    width: 170px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+
+  .option {
+    position: absolute;
+    right: 0;
+    top: -50px;
+    color: #1e9fff;
+
+    i {
+      cursor: pointer;
+    }
+  }
+
+  .el-form-item {
+    margin-bottom: 0 !important;
+
+    .el-form-item__label {
+      font-size: 16px;
+      border-bottom: 1px solid #d2d2d2;
+      margin-bottom: 10px;
+      color: #EE6666;
+    }
+  }
+
+  .custom-input {
+    margin-bottom: 10px;
+
+    .el-button {
+      float: right;
+      margin-top: 5px;
+    }
+  }
+
+  .custom-checkbox,
+  .custom-radio {
+    width: 100%;
+    margin-right: 0 !important;
+    line-height: 30px;
+  }
+
+  .el-form-item__label {
+    width: 100%;
+    padding: 0 !important;
+  }
+}</style>

+ 72 - 68
src/views/report/components/allocationTask/components/allocationTask.vue

@@ -9,13 +9,13 @@
       <div>
         <label>任务类型:</label>
         <el-select v-model="taskType">
-          <el-option label="对比任务" value="2"></el-option>
-          <el-option label="初筛任务" value="3"></el-option>
+          <el-option label="对比任务" value="3"></el-option>
+          <el-option label="标引任务" value="0"></el-option>
         </el-select>
       </div>
       <!-- 平均分配 -->
       <div>
-        <el-button type="primary" size="small" style="height:40px" @click="handleConfirm">平均分配</el-button>
+        <!-- <el-button type="primary" size="small" style="height:40px" @click="handleConfirm">平均分配</el-button> -->
         <el-button @click="getPerson">添加人员</el-button>
         <el-button @click="finish" v-if="params">完成</el-button>
       </div>
@@ -67,7 +67,8 @@
     <!-- 选择专利 -->
     <checkPatent ref="checkPatent" @checkPatentList="checkPatentList"></checkPatent>
 
-    <examine ref="examine"  @save="handleSave" :title="'添加分配任务'" :handlerLabel="'处理人'" :handPlaceholder="'请输入处理人'"></examine>
+    <examine ref="examine" @save="handleSave" :title="'添加分配任务'" :isShow="false">
+    </examine>
   </div>
 </template>
 
@@ -84,26 +85,11 @@ export default {
   },
   props: ['projectId',],
   data() {
-    const isTime = (rule, value, callback) => {
-      if (this.formEndTime) {
-        this.changeEndTime = Date.parse(new Date)
-      }
-      let b = Date.parse(value)
-      if (value) {
-        if (b < this.changeEndTime) {
-          callback(new Error('禁止选择现在及以前时间,请重新选择'))
-        } else {
-          callback()
-        }
-      } else {
-        callback(new Error('请选择时间'))
-      }
-    }
     return {
       totalNumber: 0,//总件数
       leaveNumber: 0,//剩余件数
       // 任务类型
-      taskType: "2",
+      taskType: "3",
       // 表格数据源
       tableData: [],
       // 分页信息
@@ -118,9 +104,9 @@ export default {
       // 倒计时初始值
       countdown: 3,
       //当前数据
-      row:{},
+      row: {},
       //控制table视图显示
-      showTable:true,
+      showTable: true,
       // 完成???
       params: {},
 
@@ -130,7 +116,11 @@ export default {
     ...mapGetters(['webSocket', 'userinfo']),
   },
   watch: {
-
+    dialogVisible(val) {
+      if (val) {
+        this.out()
+      }
+    },
   },
   created() {
 
@@ -140,6 +130,18 @@ export default {
     this.getUser()
   },
   methods: {
+    // 倒计时
+    out(){
+      this.timer = setInterval(() => {
+        if (this.countdown == 0) {
+          this.$router.replace("/AllReport");
+          clearInterval(this.timer);
+          this.dialogVisible = false
+        } else {
+          this.countdown--;
+        }
+      }, 1000);
+    },
     //获取专利列表
     async getList() {
       let params = {
@@ -185,8 +187,8 @@ export default {
     // 取消
     cancelChoose(row) {
       row.patentNos = []
-      this.$set(row,'patentNum', 0)
-      row.isChoose  =false
+      this.$set(row, 'patentNum', 0)
+      row.isChoose = false
       this.handleConfirm()
     },
     // 选择专利
@@ -196,17 +198,17 @@ export default {
     },
     // 子组件选择的专利号数组数据 
     checkPatentList(val) {
-      if(val.length>0){
+      if (val.length > 0) {
         this.row.isChoose = true
         this.row.patentNos = val
-        this.$set(this.row,'patentNum', val.length)
+        this.$set(this.row, 'patentNum', val.length)
         this.handleConfirm()
       }
     },
-   
+
     //编辑
     edit(row) {
-      this.$set(row,'patentNum2',row.patentNum)
+      this.$set(row, 'patentNum2', row.patentNum)
       row.vVisible = !row.vVisible
       // this.tableData = JSON.parse(JSON.stringify(this.tableData))
     },
@@ -221,7 +223,7 @@ export default {
       }
       row.vVisible = !row.vVisible
       // row.patentNum = row.patentNum2
-      this.$set(row,'patentNum',row.patentNum2)
+      this.$set(row, 'patentNum', row.patentNum2)
       row.isEdit = true
       row.patentNos = []
       this.handleConfirm()
@@ -229,42 +231,44 @@ export default {
     //完成打开弹窗
     finish() {
       this.$refs.examine.open()
-      
+
     },
+    // 发送任务
     handleSave(form) {
       let params = {
-        taskType: 5,
+        projectId:this.projectId,
+        taskType: this.taskType,
         ...form,
-        stringRequest: '',//检索内容条件
+        stringRequest: {},//检索内容条件
         personAssignedDTOList: this.tableData.map(item => {
           return {
             personId: item.id,
             patentNum: item.patentNum,
             patentNos: item.patentNos || [],
-          } 
+          }
         }),
       }
       this.$api.addMarkTask(params).then(res => {
         if (res.code == 200) {
           this.$message('添加分配任务成功')
           this.$refs.examine.handleCloseTask()
-          this.dialogVisible=true
+          this.dialogVisible = true
         }
       })
     },
 
     // 添加人员
     getPerson() {
-      var personIds = this.tableData.map(item=>item.id)
+      var personIds = this.tableData.map(item => item.id)
       var persons = JSON.parse(JSON.stringify(this.tableData))
-      this.$refs.personList.open(personIds,persons)
+      this.$refs.personList.open(personIds, persons)
     },
     //获取子组件返回的人员信息
     getPersonIds({ personIds, persons }) {
       if (persons.length > 0) {
         persons.forEach(item => {
           item.patentNum = 0
-          this.$set(item,'vVisible',true)
+          this.$set(item, 'vVisible', true)
           if (this.tableData.length > 0) {
             let index = this.tableData.findIndex(dataItem => {
               return dataItem.id == item.id
@@ -284,56 +288,56 @@ export default {
 
     // 平均分配
     handleConfirm() {
-      if(this.tableData.length==0){
+      if (this.tableData.length == 0) {
         this.$message.warning('请先选择人员!!!')
         return false
       }
-      var {user,leaveNumber} = this.clearPatentNum()
-      if(user.length == 0){
+      var { user, leaveNumber } = this.clearPatentNum()
+      if (user.length == 0) {
         this.leaveNumber = leaveNumber
         return
       }
-      
-        var pjNum = parseInt(leaveNumber / user.length)?parseInt(leaveNumber / user.length):0
-        if(pjNum!=0){
-          user.forEach(item=>{
-            this.$set(item,'patentNum',pjNum)
-          })
-        }
-        var leaveNumber2 = leaveNumber - (user.length * pjNum)
-        try{
-          user.forEach(item=>{
-            if(leaveNumber2>0){
-              var num = item.patentNum + 1
-              this.$set(item,'patentNum',num)
-              leaveNumber2--
-            }else{
-              throw Error();
-            }
-          })
-        }
-        catch{
 
-        }
+      var pjNum = parseInt(leaveNumber / user.length) ? parseInt(leaveNumber / user.length) : 0
+      if (pjNum != 0) {
+        user.forEach(item => {
+          this.$set(item, 'patentNum', pjNum)
+        })
+      }
+      var leaveNumber2 = leaveNumber - (user.length * pjNum)
+      try {
+        user.forEach(item => {
+          if (leaveNumber2 > 0) {
+            var num = item.patentNum + 1
+            this.$set(item, 'patentNum', num)
+            leaveNumber2--
+          } else {
+            throw Error();
+          }
+        })
+      }
+      catch {
+
+      }
       this.leaveNumber = 0
       this.refreshTable()
     },
     //刷新表格
-    refreshTable(){
+    refreshTable() {
       this.showTable = false
-      this.$nextTick(()=>{
+      this.$nextTick(() => {
         this.showTable = true
       })
     },
     //清空人员分配专利数量
-    clearPatentNum(){
+    clearPatentNum() {
       var user = []
       var leaveNumber = this.totalNumber
-      this.tableData.forEach(item=>{
-        if(!item.isChoose && !item.isEdit){
+      this.tableData.forEach(item => {
+        if (!item.isChoose && !item.isEdit) {
           item.patentNum = 0
           user.push(item)
-        }else{
+        } else {
           leaveNumber -= item.patentNum
         }
       })

+ 7 - 1
src/views/report/components/details/index.vue

@@ -85,7 +85,13 @@ export default {
           label:'专利与产品关联比对',
           name:'productMessage',
           path:'report/tort/components/tortContrast.vue',
-          reportType:[3,4]
+          reportType:[4]
+        },
+        {
+          label:'对比文件',
+          name:'productMessage',
+          path:'report/components/patentList/patentList.vue',
+          reportType:[3]
         },
         {
           label:'对比结果',

+ 19 - 2
src/views/report/components/patentListTask/components/index.vue

@@ -112,8 +112,25 @@ export default {
       this.queryParams.current = 1
       this.getList()
     },
-    // 请求数据
-    getList() { },
+   //获取专利列表
+   getList() {
+      let params = {
+        ...this.queryParams,//分页信息
+        projectId: this.projectId,
+        taskId: this.taskId,
+        searchQuery: '',//检索条件
+        orderDTOList: [],//排序信息
+      }
+      this.$api.QueryPatent(params).then(res => {
+        if (res.code == 200) {
+          this.tableData = res.data.data
+          this.total = res.data.total
+        }
+      }).catch(error => {
+        this.tableData = []
+        this.total = 0
+      })
+    },
     //排序
     handleSort({ column, prop, order }) {
       //如需要多个字段排序,则不需要清空

+ 17 - 16
src/views/task/components/index.vue

@@ -298,10 +298,16 @@ export default {
       var str = (row.status != 2 || row.handlerName != this.userinfo.name)
 
       switch (row.type) {//projectType项目类型(1专题库 2报告 3专利挖掘项目)
+        case 0://报告标引任务
+          this.handleAllocation(row)
+          break;
         case 1://项目开卷审核任务
           this.handleProject(row, str)
 
           break;
+        case 3://报告对比任务
+        this.handleAllocation(row)
+          break;
         case 4://侵权分析及FTO协同任务
           this.teamworkTask(row, str ? 2 : 1)
           break;
@@ -310,28 +316,23 @@ export default {
           this.fileExamine(row)
           break;
         case 6://专利挖掘文件分配任务
-          this.handleFileAllocation(row, !str)
+          this.$refs.handleTask2Dialog.open(row, !str)
           break;
 
         default:
           break;
       }
     },
-    //专利挖掘文件分配任务、报告分配任务
-    handleFileAllocation(row, str) {
-      if (row.projectType == 2) {//报告分配任务
-        let router = this.$router.resolve({
-          path: '/tortTeamWork',
-          query: {
-            taskId: row.id,
-            projectId: row.projectId,
-            isResult: val
-          }
-        })
-        window.open(router.href, '_blank')
-      } else {//专利挖掘文件分配任务
-        this.$refs.handleTask2Dialog.open(row, str)
-      }
+    //报告分配(标引)任务
+    handleAllocation(row, str) {
+      let router = this.$router.resolve({
+        path: '/patentListTask',
+        query: {
+          taskId: row.id,
+          projectId: row.projectId,
+        }
+      })
+      window.open(router.href, '_blank')
     },
     // 处理项目开卷审核任务
     handleProject(row, str) {