Browse Source

分配任务

zhuhao 1 year ago
parent
commit
7ca81d8e21

+ 6 - 0
src/api/newApi/task.js

@@ -86,4 +86,10 @@ export default {
   getCountOfProcess(params) {
     return axios.get("/xiaoshi/patentDigProjectFiles/getCountOfProcess", {params});
   },
+  /**
+   * 分配任务
+   */
+  addMarkTask(data) {
+    return axios.post("/xiaoshi/projectTask/addMarkTask", data);
+  },
 };

+ 12 - 0
src/router/index.js

@@ -311,6 +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: '/tortIndex',

+ 23 - 75
src/views/components/dialog/examine.vue

@@ -1,15 +1,15 @@
 <template>
   <!-- 审核任务弹窗 -->
   <div>
-    <el-dialog title="添加审核任务" :visible.sync="showTask" width="500px" @close="handleCloseTask" :append-to-body="true"
+    <el-dialog :title="title" :visible.sync="showTask" width="500px" @close="handleCloseTask" :append-to-body="true"
       :close-on-click-modal="false">
       <el-form :model="form" :rules="TaskRules" ref="form" label-width="120px">
         <el-form-item label="任务名称:" prop="name">
-          <el-input v-model="form.name" type="text" placeholder="输入任务名称" />
+          <el-input v-model="form.name" type="text" placeholder="输入任务名称" />
         </el-form-item>
-        <el-form-item label="审核人:" prop="handlerName">
+        <el-form-item :label="handlerLabel + ':'" prop="handlerName">
           <el-autocomplete v-model="form.handlerName" value-key="name" v-SelectLazyLoading="personnelLoad"
-              :fetch-suggestions="querySearchPersonnel" placeholder="请输入审核人(外部审核人请直接输入邮箱)" :trigger-on-focus="false"
+              :fetch-suggestions="querySearchPersonnel" :placeholder="handPlaceholder" :trigger-on-focus="false"
               @select="handleSelectPersonnel" @blur="handleBlur(form.handlerName)" style="width: 100%;"></el-autocomplete>
         </el-form-item>
         <el-form-item label="截止日期:" prop="deadLineTime">
@@ -17,7 +17,7 @@
             type="datetime" placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="审核备注:" prop="description">
+        <el-form-item label="备注:" prop="description">
           <el-input v-model="form.description" type="textarea" placeholder="输入备注" />
         </el-form-item>
       </el-form>
@@ -31,6 +31,20 @@
 
 <script>
 export default {
+  props: {
+    title: {
+      type: String,
+      default:'添加审核任务'
+    },
+    handlerLabel: {
+      type: String,
+      default:'审核人'
+    },
+    handPlaceholder: {
+      type: String,
+      default:'请输入审核人(外部审核人请直接输入邮箱)'
+    },
+  },
   data() {
     const isTime = (rule, value, callback) => {
       if (this.isEndTime) {
@@ -70,8 +84,6 @@ export default {
         name: '',
         data: [],
       },
-      // 父组件form表单数据
-      parentForm: {},
     }
   },
   computed: {},
@@ -79,23 +91,8 @@ export default {
 
   },
   methods: {
-    open(data, type) {
-      
-      // // 判断文件是否都上传完毕
-      // if (data.systemFileList && data.systemFileList.length > 0) {
-      //   data.fileGuids = []
-      //   for (let i = 0; i < data.systemFileList.length; i++) {
-      //     if (data.systemFileList[i].guid) {
-      //       data.fileGuids.push(data.systemFileList[i].guid)
-      //     } else {
-      //       this.$message.error('文件未全部上传,请耐心等待')
-      //       return false
-      //     }
-      //   }
-      // }
-      this.parentForm = data
+    open() {
       // 任务类型
-      this.form.type = type
       this.showTask = true
     },
     // 确定
@@ -113,66 +110,17 @@ export default {
            * 6文件分配任务审核
            * 7文件列表审核
            */
-
           if (this.form.handlerName.includes('@')) {//是邮箱为1
             this.form.handlerType = 1
           } else {//是id为0
             this.form.handlerType = 0
           }
-          var params={}
-          if (this.form.type == 5) {
-            params = {
-              ...this.form,
-            }
-            params.projectId = this.parentForm.projectId//项目id
-            params.assoTaskId  = this.parentForm.id//当前任务id
-            params.lastTaskId  = this.parentForm.id//上一级任务的id
-          } else {
-            params = {
-              patentDigProjectDTO: this.parentForm,
-              projectTaskDTO: this.form,
-            }
-          }
-          // 区分是哪种审核
-          switch (this.form.type) {
-            case 1://专利挖掘项目审核
-              this.addProjectOpenExamineTask(params)
-              break;
-            case 5://专利挖掘项目-文件分配任务审核
-              this.$emit('isHandleSave',true)
-              this.fileTask(params)
-              break;
-            case 7://专利挖掘项目-文件列表审核任务
-              this.$emit('examineFile',this.form)
-              break;
-
-            default:
-              break;
-          }
-
-        }
-      })
-    },
-    // 专利挖掘项目-文件分配任务审核
-    fileTask(params) {
-      this.$api.addTask(params).then(res => {
-        if (res.code == 200) {
-          this.$message.success('已发送审核任务')
-          this.$emit('taskForm', '已发送审核任务')
-          this.handleCloseTask()
-        }
-      })
-    },
-    // 专利挖掘项目审核
-    addProjectOpenExamineTask(params) {
-      this.$api.addProjectOpenExamineTask(params).then(res => {
-        if (res.code == 200) {
-          this.$message.success('已发送审核任务')
-          this.$emit('taskForm', '已发送审核任务')
-          this.handleCloseTask()
+          this.$emit('save',this.form)
         }
       })
     },
+
+
     // 取消
     handleCloseTask() {
       this.$refs.form.resetFields()

+ 17 - 7
src/views/patentMining/components/dialog/addAndEditProject.vue

@@ -206,7 +206,7 @@
       <ClientTable :choseClient="true" @getClient="getClient"></ClientTable>
     </el-dialog>
 
-    <examine ref="examine"  @taskForm="handleTaskForm"></examine>
+    <examine ref="examine" @save="addProjectOpenExamineTask"></examine>
     <addEvent ref="addEvent"></addEvent>
   </div>
 </template>
@@ -304,12 +304,22 @@ export default {
     // this.getPermissionPersonnel();
   },
   methods: {
-    // 审核弹窗传递的值
-    handleTaskForm(val) {
-      if (val) {
-        this.$emit('isSuccess', '新增成功')
-        this.handleClose()
+  
+     // 专利挖掘项目审核
+    addProjectOpenExamineTask(form) {
+      var params = {
+        patentDigProjectDTO: this.form,
+        projectTaskDTO: form,
+
       }
+      this.$api.addProjectOpenExamineTask(params).then(res => {
+        if (res.code == 200) {
+          this.$message.success('已发送审核任务')
+          this.$emit('isSuccess', '新增成功')
+          this.$refs.examine.handleCloseTask()
+          this.handleClose()
+        }
+      })
     },
      /**
      * 0标引任务
@@ -324,7 +334,7 @@ export default {
     handleExamine() {
       this.$refs.form.validate((valid) => { 
         if (valid) {
-          this.$refs.examine.open(this.form,1)
+          this.$refs.examine.open()
         }
       })
     },

+ 20 - 6
src/views/patentMining/components/dialog/handleTask2.vue

@@ -43,7 +43,7 @@
       </span>
     </el-dialog>
 
-    <examine ref="examine" @taskForm="handleTaskForm" @isHandleSave="isHandleSave"></examine>
+    <examine ref="examine" @save="fileTask"></examine>
   </div>
 </template>
 
@@ -166,14 +166,28 @@ export default {
         if (valid) {
           this.form.projectId = this.row.projectId//项目id
           this.form.id = this.row.id//当前文件分配任务的id
-          this.$refs.examine.open(this.form, 5)
+          this.$refs.examine.open()
         }
       })
     },
-    // 审核弹窗发送的值
-    handleTaskForm(val) {
-      this.$emit('isSuccess', '新增成功')
-      this.handleClose()
+
+     // 专利挖掘项目-文件分配任务审核
+    fileTask(form) {
+      this.isHandleSave()
+      var params = {
+        ...form,
+        projectId: this.form.projectId,//项目id
+        assoTaskId:this.form.id,//当前任务id
+        lastTaskId: this.form.id,//上一级任务的id
+      }
+      this.$api.addTask(params).then(res => {
+        if (res.code == 200) {
+          this.$message.success('已发送审核任务')
+          this.$emit('isSuccess', '新增成功')
+          this.$refs.examine.handleCloseTask()
+          this.handleClose()
+        }
+      })
     },
   },
 

+ 3 - 7
src/views/patentMining/components/dialog/uploadFile.vue

@@ -27,7 +27,7 @@
       </span>
     </el-dialog>
 
-    <examine ref="examine" @taskForm="handleTaskForm" @examineFile="handleExamineFile"></examine>
+    <examine ref="examine" @save="handleExamineFile"></examine>
   </div>
 </template>
 
@@ -80,15 +80,11 @@ export default {
         if (valid) {
           // 判断文件是否都上传完毕
           this.$commonJS.allUploadFile(this.form)
-          this.$refs.examine.open(null, 7)
+          this.$refs.examine.open()
         }
       })
     },
-    // 审核弹窗发送的值
-    handleTaskForm(val) {
-      this.$emit('isSuccess', '新增成功')
-      this.handleClose()
-    },
+
     //打开弹窗
     open(row, id) {
       if (row && row.id) {

+ 30 - 4
src/views/report/components/allocationTask/components/allocationTask.vue

@@ -66,6 +66,8 @@
     <personList ref="personList" @getPersonIds="getPersonIds"></personList>
     <!-- 选择专利 -->
     <checkPatent ref="checkPatent" @checkPatentList="checkPatentList"></checkPatent>
+
+    <examine ref="examine"  @save="handleSave" :title="'添加分配任务'" :handlerLabel="'处理人'" :handPlaceholder="'请输入处理人'"></examine>
   </div>
 </template>
 
@@ -73,10 +75,12 @@
 import { mapGetters } from 'vuex'
 import personList from '@/views/components/dialog/person.vue'
 import checkPatent from '../../checkPatent/checkPatent.vue'
+import examine from '@/views/components/dialog/examine.vue'
 export default {
   components: {
     personList,
     checkPatent,
+    examine,
   },
   props: ['projectId',],
   data() {
@@ -115,7 +119,7 @@ export default {
       countdown: 3,
       //当前数据
       row:{},
-      //
+      //控制table视图显示
       showTable:true,
       // 完成???
       params: {},
@@ -164,7 +168,7 @@ export default {
     },
     // 点击直接跳转页面
     toRouter() {
-      // this.$router.replace("/admin/rManage");
+      this.$router.replace("/AllReport");
     },
     // 关闭温馨提示的弹窗
     handleClose() {
@@ -222,9 +226,31 @@ export default {
       row.patentNos = []
       this.handleConfirm()
     },
-    //完成
+    //完成打开弹窗
     finish() {
-
+      this.$refs.examine.open()
+      
+    },
+    handleSave(form) {
+      let params = {
+        taskType: 5,
+        ...form,
+        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
+        }
+      })
     },
 
     // 添加人员

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

@@ -1,45 +1,145 @@
 <template>
   <!-- 任务专利列表页面 -->
   <div class="height_100">
-    <el-container>
-      <el-aside width="200px" class="height_100">
-        <customFields></customFields>
-      </el-aside>
-      <el-container>
-        <el-header>
+    <div class="height_100" style="display:flex">
+      <div class="height_100" v-if="showRight" :style="{ 'min-width': showRight ? '300px' : '0px' }">
+        <customFields :projectId="projectId"></customFields>
+      </div>
+      <div class="height_100" :style="{ width: showRight ? 'calc( 100% - 300px )' : '100%' }">
+        <el-container>
+          <el-header style="padding:0 10px !important;">
+            <div style="display: flex;align-items: center;">
+              <div>
+                <el-tooltip class="item" effect="dark" :content="(showRight ? '隐藏' : '显示') + '右侧自定义栏位'" placement="top">
+                  <i :class="showRight ? 'el-icon-s-fold' : 'el-icon-s-unfold'"
+                    style="font-size: 25px; margin-left: 10px;color: #2f2f2f; cursor: pointer"
+                    @click="showRight = !showRight"></i>
+                </el-tooltip>
+              </div>
+              <mySearch style="width:500px" :SearchFields="searchFiled" @search="search" :searchValue="searchOption">
+              </mySearch>
+            </div>
+            <div>
+              <el-button type="primary" size="small" @click="handleFieldManage">显示栏位管理</el-button>
+            </div>
+          </el-header>
+          <el-main class="height_100" style="width: 100%;">
+            <component :is='components' :tableData="tableData" :column="fieldList" :projectId="projectId"
+              @on-sort="handleSort" :queryParams="queryParams"></component>
+          </el-main>
+          <el-footer class="pagination">
+            <el-pagination background layout="total, sizes, prev, pager, next, jumper"
+              :current-page.sync="queryParams.current" :page-sizes="sizeArr" :page-size.sync="queryParams.size"
+              @current-change="handleCurrentChange" @size-change="getList" :total="total">
+            </el-pagination>
+          </el-footer>
+        </el-container>
+      </div>
 
-        </el-header>
-        <el-main>
+    </div>
 
-        </el-main>
-        <el-footer>
-
-        </el-footer>
-      </el-container>
-    </el-container>
+    <field ref="field" type="patentProject" @getFieldList="getFieldList"></field>
   </div>
 </template>
 
 <script>
+import field from '@/views/components/dialog/fields.vue';
+import PatentTableListView from '@/views/project/patentCollection/components/views/Table.vue'
 import customFields from './customFields.vue';
 export default {
   props: {
-    taskId:'',
+    taskId: '',
+    projectId: '',
   },
   components: {
+    PatentTableListView,
+    field,
     customFields,
   },
   data() {
     return {
-
+      //显示组件
+      components: 'PatentTableListView',
+      //显示左側
+      showRight: false,
+      //检索字段
+      searchFiled: [],
+      //检索条件
+      searchOption: {},
+      //专利数据库数据总数
+      total: 0,
+      //分页信息
+      queryParams: {
+        size: 10,
+        current: 1,
+      },
+      //页大小
+      sizeArr: [10, 20, 30, 40, 50, 100],
+      //排序
+      sort: [
+        {
+          "orderBy": "createTime",
+          "orderType": 1
+        }
+      ],
+      //专利列表
+      tableData: [],
+      // 获取显示自定义栏位
+      fieldList:[],
     }
   },
   computed: {},
-  mounted() {
-
+  async mounted() {
+    this.fieldList = await this.$commonJS.getCustomField('patent')
+    this.getList()
   },
   methods: {
-
+    // 搜索
+    search() {
+      let params = {}
+      val.forEach(item => {
+        if (item.type == 3) {
+          params[item.value] = item.searchValue.map(itemValue => {
+            return itemValue.value
+          })
+        } else {
+          params[item.value] = item.searchValue.label
+        }
+      })
+      // 返回字符串
+      this.searchOption = params
+      // 调用查询接口
+      this.queryParams.current = 1
+      this.getList()
+    },
+    // 请求数据
+    getList() { },
+    //排序
+    handleSort({ column, prop, order }) {
+      //如需要多个字段排序,则不需要清空
+      var params = {
+        sort: this.sort,
+        column,
+        prop,
+        order,
+      }
+      this.sort = this.$commonJS.getSortData(params)
+      this.queryParams.current = 1
+      this.getList()
+    },
+    //分页
+    handleCurrentChange(val) {
+      this.queryParams.current = val;
+      this.getList();
+    },
+    //显示栏位管理
+    handleFieldManage() {
+      this.$refs.field.open(this.fieldList)
+    },
+     //获取显示自定义栏位
+     getFieldList(data) {
+      this.fieldList = data
+    },
   },
 }
 </script>

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

@@ -1,18 +1,29 @@
 <template>
   <!--  -->
   <div>
-
+    <patentTaskList :projectId="projectId" :taskId="taskId"></patentTaskList>
   </div>
 </template>
 
 <script>
+import patentTaskList from './components/index.vue'
 export default {
+  components: {
+    patentTaskList
+  },
   data() {
     return {
 
     }
   },
-  computed: {},
+  computed: {
+    projectId() {
+      return this.$route.query.projectId
+    },
+    taskId() {
+      return this.$route.query.taskId
+    },
+  },
   mounted() {
 
   },

+ 18 - 2
src/views/task/components/index.vue

@@ -310,13 +310,29 @@ export default {
           this.fileExamine(row)
           break;
         case 6://专利挖掘文件分配任务
-          this.$refs.handleTask2Dialog.open(row, !str)
+          this.handleFileAllocation(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)
+      }
+    },
     // 处理项目开卷审核任务
     handleProject(row, str) {
       if (row.projectType == 2) {//报告项目开卷审核
@@ -326,7 +342,7 @@ export default {
       }
     },
     getPatentNoMessage(row, str) {
-      this.$refs.lookReport.open(row,str)
+      this.$refs.lookReport.open(row, str)
     },
     //协同任务(侵权分析及FTO)
     teamworkTask(row, val) {