Procházet zdrojové kódy

专利挖掘新增审核任务

zhuhao před 1 rokem
rodič
revize
186d1f3110

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

@@ -36,4 +36,10 @@ export default {
   groupPatentDigProject(data) {
     return axios.post("/xiaoshi/patentDigProject/groupPatentDigProject", data);
   },
+  /**
+   * 专利挖掘审核
+   */
+  addProjectOpenExamineTask(data) {
+    return axios.post("/xiaoshi/projectTask/addProjectOpenExamineTask", data);
+  },
 };

+ 168 - 0
src/views/components/dialog/examine.vue

@@ -0,0 +1,168 @@
+<template>
+  <!-- 审核任务弹窗 -->
+  <div>
+    <el-dialog title="添加审核任务" :visible.sync="showTask" width="500px" @close="handleCloseTask" :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-form-item>
+        <el-form-item label="审核人:" prop="handler">
+          <el-select style="width:100%;" ref="select1" v-model="form.handler" clearable filterable remote
+            :remote-method="remoteMethodPerson" v-SelectLazyLoading="lazyLoadingPerson">
+            <el-option v-for="item in personnelList.data" :key="item.id" :label="item.name" :value="item.id"
+              placeholder="请选择审核人"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="截止日期:" prop="deadLineTime">
+          <el-date-picker style="width:100%" v-model="form.deadLineTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
+            placeholder="选择日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="审核备注:" prop="description">
+          <el-input v-model="form.description" type="textarea" placeholder="输入备注" />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleCloseTask">取 消</el-button>
+        <el-button type="primary" @click="submitTask">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    const isTime = (rule, value, callback) => {
+      if (this.isEndTime) {
+        this.isEndTimes = Date.parse(new Date)
+      }
+
+      let b = Date.parse(value)
+      if (value) {
+        if (b < this.isEndTimes) {
+          callback(new Error('禁止选择现在及以前时间,请重新选择'))
+        } else {
+          callback()
+        }
+      } else {
+        callback(new Error('请选择时间'))
+      }
+    }
+    return {
+      isEndTime: true,
+      isEndTimes: null,
+      // 审核任务表单数据
+      form: {},
+      showTask: false,
+      // 任务表单校验
+      TaskRules: {
+        name: [{ required: true, message: '请输入任务名称', trigger: 'blur' },],
+        handler: [{ required: true, message: '请选择审核人', trigger: 'change' },],
+        deadLineTime: [{ required: true, validator: isTime, trigger: 'change' }],
+      },
+      //人员列表懒加载
+      personnelList: {
+        queryParams: {
+          current: 1,
+          size: 10
+        },
+        loading: false,
+        data: [],
+      },
+      // 父组件form表单数据
+      parentForm:{},
+    }
+  },
+  computed: {},
+  mounted() {
+
+  },
+  methods: {
+    open(data,type) {
+      this.showTask = true
+      // 判断文件是否都上传完毕
+      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
+      this.form.type = type
+      this.getPermissionPersonnel()
+    },
+    // 确定
+    submitTask() {
+      this.isEndTime = false
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          /**类型
+           * 0标引任务
+           * 1项目开卷审核任务
+           * 2检索条件任务
+           * 3对比任务
+           * 4协同任务
+           * 5任务审核任务
+           */
+          this.form.handlerType=0
+          let params = {
+            patentDigProjectDTO: this.parentForm,
+            projectTaskDTO :this.form,
+          }
+          this.$api.addProjectOpenExamineTask(params).then(res => {
+            if (res.code == 200) {
+              this.$message.success('已发送审核任务')
+              this.$emit('taskForm', '已发送审核任务')
+              this.handleCloseTask()
+            }
+          })
+        }
+      })
+    },
+    // 取消
+    handleCloseTask() {
+      this.$refs.form.resetFields()
+      this.form = {}
+      this.showTask = false
+      this.isEndTime = true
+    },
+    /**
+    * 人员
+    */
+    // 人员列表远程搜索
+    remoteMethodPerson(query) {
+      this.personnelList.data = []
+      this.personnelList.queryParams.current = 1
+      this.personnelList.queryParams.name = query
+      this.getPermissionPersonnel()
+    },
+    // 获取所有人员列表懒加载
+    lazyLoadingPerson() {
+      if (this.personnelList.queryParams.current * this.personnelList.queryParams.size >= this.personnelList.queryParams.total) {
+        return false
+      }
+      this.personnelList.queryParams.current += 1
+      this.getPermissionPersonnel()
+    },
+    //获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
+    async getPermissionPersonnel(type) {
+      this.personnelList.loading = true;
+      await this.$api.getPermissionPersonnel(this.personnelList.queryParams).then((response) => {
+        if (response.code == 200) {
+          this.personnelList.loading = false;
+          this.personnelList.data.push(...response.data)
+          this.personnelList.queryParams.total = response.pageColumn.total
+        }
+      })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 1 - 1
src/views/patentMining/components/details/basicMessage.vue

@@ -14,7 +14,7 @@ export default {
     projectPath
   },
   props: {
-    id:''
+    id:'',
   },
   data() {
     return {

+ 27 - 12
src/views/patentMining/components/details/components/basicMessage.vue

@@ -15,67 +15,67 @@
           <template slot="label"> 
             <i class="el-icon-mobile-phone"></i> 项目产出
           </template>
-          {{ row.type }}
+          {{ row.output }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-location-outline"></i> 技术方向
           </template>
-          {{ row.type }}
+          {{ row.technicalDirection }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-tickets"></i> 产品阶段
           </template>
-          {{ row.type }}
+          {{ row.productPhase }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 是否检索
           </template>
-          {{ row.type }}
+          {{ row.ifSearch }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 负责人
           </template>
-          {{ row.type }}
+          {{ row.headName }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 相关竞争对手
           </template>
-          {{ row.type }}
+          {{ row.relatedCompetitors }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 技术关键词
           </template>
-          {{ row.type }}
+          {{ row.technicalKeyword }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 审核状态
           </template>
-          <el-tag size="small">{{ row.status }}</el-tag>
+          <el-tag size="small">{{ row.stateName }}</el-tag>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 审核进度
           </template>
-          <el-tag size="small">{{ row.status }}</el-tag>
+          <el-tag size="small">{{ row.process }}</el-tag>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 创建人
           </template>
-          {{ row.createPerson }}
+          {{ row.createName }}
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 参与人
           </template>
-         {{ row.createPerson }}
+         <span v-for="item in row.involvedPersons" :key="item.personId">{{ item.personName }}/</span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
@@ -113,9 +113,24 @@ export default {
         this.column = 5;  
       }  
     })
+    this.getList()
   },
   methods: {
-    
+    // 获取数据
+    getList() {
+      let params = {
+        size: 10,
+        current:1,
+        searchQuery:`id=${this.id}`,
+      }
+      this.$api.queryPatentDigProject(params).then(response => {
+        if (response.code == 200) {
+          this.row = response.data.data[0]
+        }
+      }).catch(error => {
+        this.row = {}
+      })
+    },
   },
 }
 </script>

+ 64 - 36
src/views/patentMining/components/details/components/projectPath.vue

@@ -5,43 +5,55 @@
     <el-divider></el-divider>
     <svg viewBox="0 0 1800 400" width="100%" height="100%">
       <g transform=translate(0,0) class="svgG">
-        <rect width="200" height="120" :fill="getColor('创新点流程')" @click="toFilePage('创新点流程')"> </rect>
-        <text x="30" y="65">创新点流程</text>
-        <circle cx="150" cy="60" r="16" stroke-width="1" stroke="#fff" :fill="getColor('创新点流程')" />
-        <text :x="getNumber('创新点流程') >9? '140':'145'" y="65" fill="#fff">{{ getNumber('创新点流程') }}</text>
-        <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        <g @click="toFilePage('创新点流程')">
+          <rect width="200" height="120" :fill="getColor('创新点流程')" > </rect>
+          <text x="30" y="65">创新点流程</text>
+          <circle cx="150" cy="60" r="16" stroke-width="1" stroke="#fff" :fill="getColor('创新点流程')" />
+          <text :x="getNumber('创新点流程') >9? '140':'145'" y="65" fill="#fff">{{ getNumber('创新点流程') }}</text>
+          <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        </g>
         <polygon points="350,55,360,60,350,65"></polygon>
       </g>
       <g transform="translate(360,0)" class="svgG">
-        <rect width="200" height="120" :fill="getColor('查新检索')" @click="toFilePage('查新检索')"> </rect>
-        <text x="30" y="65">查新检索</text>
-        <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('查新检索')" />
-        <text :x="getNumber('查新检索') >9? '140':'145'" y="65" fill="#fff">{{ getNumber('查新检索') }}</text>
-        <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        <g  @click="toFilePage('查新检索')">
+          <rect width="200" height="120" :fill="getColor('查新检索')" > </rect>
+          <text x="30" y="65">查新检索</text>
+          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('查新检索')" />
+          <text :x="getNumber('查新检索') >9? '140':'145'" y="65" fill="#fff">{{ getNumber('查新检索') }}</text>
+          <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        </g>
         <polygon points="350,55,360,60,350,65"></polygon>
       </g>
-      <g transform="translate(720,0)" class="svgG">
-        <rect width="200" height="120" :fill="getColor('保护主题规划')" @click="toFilePage('保护主题规划')"> </rect>
-        <text x="30" y="65">保护主题规划</text>
-        <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('保护主题规划')" />
-        <text x="145" y="65" fill="#fff">{{ getNumber('保护主题规划') }}</text>
-        <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+      <g transform="translate(720,0)" class="svgG" >
+        <g @click="toFilePage('保护主题规划')">
+            <rect width="200" height="120" :fill="getColor('保护主题规划')" > </rect>
+            <text x="30" y="65">保护主题规划</text>
+            <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('保护主题规划')" />
+            <text x="145" y="65" fill="#fff">{{ getNumber('保护主题规划') }}</text>
+            <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        </g>
+       
         <polygon points="350,55,360,60,350,65"></polygon>
       </g>
-      <g transform="translate(1080,0)" class="svgG">
-        <rect width="200" height="120" :fill="getColor('独权撰写')" @click="toFilePage('独权撰写')"> </rect>
-        <text x="30" y="65">独权撰写</text>
-        <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('独权撰写')" />
-        <text x="145" y="65" fill="#fff">{{ getNumber('独权撰写') }}</text>
-        <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+      <g transform="translate(1080,0)" class="svgG" >
+        <g @click="toFilePage('独权撰写')">
+          <rect width="200" height="120" :fill="getColor('独权撰写')" > </rect>
+          <text x="30" y="65">独权撰写</text>
+          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('独权撰写')" />
+          <text x="145" y="65" fill="#fff">{{ getNumber('独权撰写') }}</text>
+          <line x1="200" y1="60" x2="350" y2="60" stroke='#333'></line>
+        </g>
+        
         <polygon points="350,55,360,60,350,65"></polygon>
       </g>
-      <g transform="translate(1440,0)" class="svgG">
-        <rect width="200" height="120" :fill="getColor('从权撰写')" @click="toFilePage('从权撰写')"> </rect>
-        <text x="30" y="65">从权撰写</text>
-        <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('从权撰写')" />
-        <text x="145" y="65" fill="#fff">{{ getNumber('从权撰写') }}</text>
-        <line x1="100" y1="120" x2="100" y2="190" stroke='#333'></line>
+      <g transform="translate(1440,0)" class="svgG" >
+        <g @click="toFilePage('从权撰写')">
+          <rect width="200" height="120" :fill="getColor('从权撰写')" > </rect>
+          <text x="30" y="65">从权撰写</text>
+          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('从权撰写')" />
+          <text x="145" y="65" fill="#fff">{{ getNumber('从权撰写') }}</text>
+          <line x1="100" y1="120" x2="100" y2="190" stroke='#333'></line> 
+        </g>
         <polygon points="95,190,100,200,105,190"></polygon>
       </g>
       <!-- <g transform="translate(1080,200)" class="svgG">
@@ -52,16 +64,18 @@
         <line x1="0" y1="60" x2="-150" y2="60" stroke='#333'></line>
         <polygon points="-150,55,-160,60,-150,65"></polygon>
       </g> -->
-      <g transform="translate(1440,200)" class="svgG">
-        <rect width="200" height="120" :fill="getColor('申请文件定稿')" @click="toFilePage('申请文件定稿')"> </rect>
-        <text x="30" y="65">申请文件定稿</text>
-        <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('申请文件定稿')" />
-        <text x="145" y="65" fill="#fff">{{ getNumber('申请文件定稿') }}</text>
-        <line x1="0" y1="60" x2="-150" y2="60" stroke='#333'></line>
+      <g transform="translate(1440,200)" class="svgG" >
+        <g @click="toFilePage('申请文件定稿')">
+          <rect width="200" height="120" :fill="getColor('申请文件定稿')" > </rect>
+          <text x="30" y="65">申请文件定稿</text>
+          <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('申请文件定稿')" />
+          <text x="145" y="65" fill="#fff">{{ getNumber('申请文件定稿') }}</text>
+          <line x1="0" y1="60" x2="-150" y2="60" stroke='#333'></line>
+        </g>
         <polygon points="-150,55,-160,60,-150,65"></polygon>
       </g>
-      <g transform="translate(1080,200)" class="svgG">
-        <rect width="200" height="120" :fill="getColor('说明书规划撰写')" @click="toFilePage('说明书规划撰写')"> </rect>
+      <g transform="translate(1080,200)" class="svgG" @click="toFilePage('说明书规划撰写')">
+        <rect width="200" height="120" :fill="getColor('说明书规划撰写')" > </rect>
         <text x="15" y="65" xml:space='preserve'>说明书规划撰写
         </text>
         <circle cx="150" cy="60" r="15" stroke-width="1" stroke="#fff" :fill="getColor('说明书规划撰写')" />
@@ -76,6 +90,7 @@
 
 <script>
 export default {
+  props:['id'],
   data() {
     return {
       numObj: {
@@ -94,6 +109,19 @@ export default {
 
   },
   methods: {
+    // 获取流程节点及相对应的文件
+    getFileNumber() {
+      let params = {
+        id:this.id,
+      }
+      this.$api.query(params).then(response => {
+        if (response.code == 200) {
+          this.numObj = response.data
+        }
+      }).catch(error => {
+        this.numObj = {}
+      })
+    },
     // 获取文件数量
     getNumber(str) {
       return this.numObj[str]

+ 29 - 1
src/views/patentMining/components/dialog/addAndEditProject.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-dialog :title="title" :visible.sync="dialogVisible" width="850px" :before-close="handleClose">
+    <el-dialog :title="title" :visible.sync="dialogVisible" width="850px" :before-close="handleClose" :close-on-click-modal="false">
       <el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-form">
         <template>
           <el-divider content-position="left">挖掘项目</el-divider>
@@ -195,6 +195,7 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="handleClose">取 消</el-button>
         <el-button type="primary" @click="submit">确 定</el-button>
+        <el-button type="primary" v-if="!form.id" @click="handleExamine">审 核</el-button>
       </span>
     </el-dialog>
 
@@ -204,6 +205,8 @@
       top="10vh">
       <ClientTable :choseClient="true" @getClient="getClient"></ClientTable>
     </el-dialog>
+
+    <examine ref="examine"  @taskForm="handleTaskForm"></examine>
   </div>
 </template>
 
@@ -211,10 +214,12 @@
 import { mapGetters } from 'vuex'
 import choosePerson from '@/views/components/dialog/person.vue'
 import ClientTable from '@/views/client'
+import examine from '@/views/components/dialog/examine.vue'
 export default {
   components: {
     choosePerson,
     ClientTable,
+    examine,
   },
   props: {},
   data() {
@@ -294,6 +299,29 @@ export default {
     // this.getPermissionPersonnel();
   },
   methods: {
+    // 审核弹窗传递的值
+    handleTaskForm(val) {
+      if (val) {
+        this.$emit('isSuccess', '新增成功')
+        this.handleClose()
+      }
+    },
+     /**
+     * 0标引任务
+     * 1项目开卷审核任务
+     * 2检索条件任务
+     * 3对比任务
+     * 4协同任务
+     * 5任务审核任务
+     */
+    // 审核任务弹窗
+    handleExamine() {
+      this.$refs.form.validate((valid) => { 
+        if (valid) {
+          this.$refs.examine.open(this.form,1)
+        }
+      })
+    },
     /**
      * 客户/委托方
      * @param {*} query 

+ 56 - 14
src/views/patentMining/components/dialog/auditRecords.vue

@@ -1,8 +1,10 @@
 <template>
   <!-- 任务审核记录 -->
   <div class="auditRecords">
-    <el-dialog title="查看审核记录" :visible.sync="dialogVisible" width="1000px" :before-close="handleClose" :close-on-click-modal="false">
-      <el-table :data="tableData" style="width: 100%;" border header-row-class-name="custom-table-header">
+    <el-dialog title="查看审核记录" :visible.sync="dialogVisible" width="1000px" :before-close="handleClose"
+      :close-on-click-modal="false">
+      <el-table :data="tableData" style="width: 100%;" border header-row-class-name="custom-table-header"
+        @sort-change="sortChange">
         <el-table-column label="#" align="center" width="60px">
           <template slot-scope="scope">
             <div>
@@ -10,13 +12,19 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="name" label="任务名称" align="center"></el-table-column>
-        <el-table-column prop="type" label="任务类型" align="center"></el-table-column>
-        <el-table-column prop="createPerson" label="发起人" align="center"></el-table-column>
-        <el-table-column prop="handlePerson" label="处理人" align="center"></el-table-column>
-        <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
-        <el-table-column prop="endTime" label="截止时间" align="center"></el-table-column>
-        <el-table-column prop="status" label="状态" align="center"></el-table-column>
+        <el-table-column v-for="item in columnList" :key="item.value" :prop="item.value"
+          :render-header="$commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
+          <template slot-scope="scope">
+            <div v-if="['name'].includes(item.value)">
+              <el-link @click="handleItem(scope.row, item.value)">
+                <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
+              </el-link>
+            </div>
+            <div v-else-if="['taskType'].includes(item.value)"
+              v-html="$commonJS.getColumnData(scope.row, item, null, { data: taskType })"></div>
+            <div v-else v-html="$commonJS.getColumnData(scope.row, item)"></div>
+          </template>
+        </el-table-column>
       </el-table>
       <div style="text-align: center;padding-top: 20px;">
         <el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
@@ -31,26 +39,60 @@
 </template>
 
 <script>
+import { column } from '../mixins/index2'
 export default {
+  mixins: [column],
   data() {
     return {
+      // 审核记录数据
       tableData: [],
       dialogVisible: false,
+      // 审核记录分页信息
       queryParams: {
         current: 1,
         size: 10,
         total: 0,
       },
+      // 排序
+      sort:[{ "orderBy": "createTime", "orderType": 1 }],
     }
   },
   mounted() {
 
   },
   methods: {
-    getList() { },
+    //排序
+    sortChange({ column, prop, order }) {
+      //如需要多个字段排序,则不需要清空
+      var params = {
+        sort: this.sort,
+        column,
+        prop,
+        order,
+      }
+      this.sort = this.$commonJS.getSortData(params)
+      this.queryParams.current = 1
+      this.getList()
+    },
+    getList(id) {
+      let params = {
+        ...this.queryParams,//分页信息
+        // searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
+        orderDTOList: this.sort,//排序信息
+        id: id,
+      }
+      this.$api.query(params).then(response => {
+        if (response.code == 200) {
+          this.tableData = response.data.data
+          this.queryParams.current = response.data.current
+          this.queryParams.size = response.data.size
+          this.queryParams.total = response.data.total
+        }
+      })
+    },
     // 打开弹窗
-    open() {
-      // this.getList()
+    open(id) {
+      // this.getList(id)
       this.dialogVisible = true
     },
     handleClose() {
@@ -58,10 +100,10 @@ export default {
     },
     // 分页查询
     handleCurrentChange(val) {
-      this.queryParams.current=val
+      this.queryParams.current = val
       this.getList()
     },
-    
+
   },
 }
 </script>

+ 48 - 30
src/views/patentMining/components/dialog/handleTask1.vue

@@ -1,8 +1,10 @@
 <template>
-  <!-- 处理挖掘任务1(审核任务) -->
+  <!-- 处理挖掘任务1(项目审核任务弹窗) -->
   <div class="handleTask1">
-    <el-dialog :title="title" :visible.sync="dialogVisible" width="800px" :before-close="handleClose" :close-on-click-modal="false">
-      <el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-ruleForm" :disabled="!form.isLook">
+    <el-dialog :title="title" :visible.sync="dialogVisible" width="800px" :before-close="handleClose"
+      :close-on-click-modal="false">
+      <el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-ruleForm"
+        :disabled="!form.isLook">
         <el-row>
           <el-col :span="12">
             <el-form-item label="项目名称:" prop="name">
@@ -57,21 +59,17 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="是否检索:" >
-              <el-switch
-                v-model="form.delivery"
-                active-color="#13ce66"
-                inactive-color="#ff4949">
+            <el-form-item label="是否检索:">
+              <el-switch v-model="form.delivery" active-color="#13ce66" inactive-color="#ff4949">
               </el-switch>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
-            <el-form-item label="附件:" prop="file">
-              <el-upload class="upload-demo" ref="upload" action="#" :auto-upload="false" :show-file-list="true"
-                :on-change="onChange" multiple :on-preview="handlePreview" :on-remove="handleRemove"
-                :file-list="fileList">
-                <i class="el-icon-upload2" style="font-size: 18px;"></i>
-              </el-upload>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="附件:">
+              <myUpload :file-list="form.systemFileList" @on-change="onchangeFile" @on-remove="onRemove"
+                @on-preview="onPreview" style="height: 180px;" :autoUpload="true"></myUpload>
             </el-form-item>
           </el-col>
         </el-row>
@@ -81,8 +79,7 @@
         <el-dropdown v-if="form.isLook" split-button type="primary" @click="submit" size="small">
           <span>{{ btn.label }}</span>
           <el-dropdown-menu slot="dropdown" class="text-align_center">
-            <el-dropdown-item v-for="item in btnObj" :key="item.label" @click.native="onChangeFamily(item)">{{ item.label
-            }}</el-dropdown-item>
+            <el-dropdown-item v-for="item in btnObj" :key="item.label" @click.native="onChangeFamily(item)">{{ item.label }}</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
       </span>
@@ -99,7 +96,9 @@ export default {
     return {
       dialogVisible: false,
       title: '',
-      form: {},
+      form: {
+        systemFileList: [],
+      },
       rules: {
         name: [{ required: true, message: '请输入项目名称', trigger: 'blur' },],
       },
@@ -130,22 +129,39 @@ export default {
   created() { },
   mounted() { },
   methods: {
-    onChange(file, fileList) { },
-    handlePreview(file, fileList) { },
-    handleRemove(file, fileList) { },
+    // 上传的文件监听
+    onchangeFile(file, fileList) {
+      if (file.guid) {
+        let index = this.form.systemFileList.findIndex(item => {
+          return item.uid == file.uid
+        })
+        if (index != -1) {
+          this.form.systemFileList.splice(index, 1, file)
+        }
+      } else {
+        this.form.systemFileList.push(file.raw)
+      }
+
+    },
+    // 删除上传的文件
+    onRemove(file, fileList) {
+      let index = this.form.systemFileList.findIndex(item => {
+        return item.uid == file.uid
+      })
+      if (index != -1) {
+        this.form.systemFileList.splice(index, 1)
+      }
+    },
+    // 点击文件
+    onPreview(file) { },
     // 切换按钮
     onChangeFamily(val) {
       this.btn = val
     },
     //打开弹窗
-    open(form,val) {
+    open(form, val) {
       this.form = JSON.parse(JSON.stringify(form))
-      this.form.isLook=val
-      // if(this.form.id){
-      //     this.title = '编辑任务'
-      // }else{
-      //     this.title = '创建任务'
-      // }
+      this.form.isLook = val
       if (this.form.isLook) {
         this.title = '处理任务'
       } else {
@@ -155,12 +171,14 @@ export default {
     },
     //关闭弹窗
     handleClose() {
-      this.form = {}
+      this.form = {
+        systemFileList: [],
+      }
       this.dialogVisible = false
     },
     //提交数据
     submit() {
-      this.dialogVisible = false
+      this.handleClose()
     }
   },
 

+ 1 - 1
src/views/patentMining/components/dialog/handleTask2.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 处理挖掘任务2(分配任务) -->
+  <!-- 处理挖掘任务2(文件分配任务弹窗) -->
   <div class="handleTask2">
     <el-dialog ref="dialog" :title="title" :visible.sync="dialogVisible" width="800px" :before-close="handleClose"
       :close-on-click-modal="false">

+ 36 - 14
src/views/patentMining/components/dialog/uploadFile.vue

@@ -6,7 +6,7 @@
         <el-form-item label="文件名称:" prop="name">
           <el-input v-model="form.name" placeholder="请输入文件名称"></el-input>
         </el-form-item>
-        <el-form-item label="是否为最终文件:" prop="delivery" style="width: 20px;">
+        <el-form-item label="最终文件:" prop="delivery" style="width: 20px;">
           <el-switch v-model="form.delivery" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
         </el-form-item>
         <el-form-item label="文件类型:">
@@ -34,14 +34,10 @@
             <el-input v-model="form.remark2" type="textarea" placeholder="请输入内容"></el-input>
           </el-form-item>
         </template>
-        
+
         <el-form-item label="附件:" prop="delivery">
-          <el-upload ref="upload" class="upload-file" drag action="#" :auto-upload="false" :show-file-list="true"
-            :on-change="onChange" :on-remove="handleRemove" :on-preview="handlePreview">
-            <i :class="fileList.length != 0 ? 'el-icon-upload' : 'el-icon-refresh'"></i>
-            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-            <div class="el-upload__tip" slot="tip"></div>
-          </el-upload>
+          <myUpload :file-list="form.systemFileList" @on-change="onchangeFile" @on-remove="onRemove"
+            @on-preview="onPreview" style="height: 180px;" :autoUpload="true"></myUpload>
         </el-form-item>
         <el-form-item label="备注:">
           <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
@@ -65,7 +61,9 @@ export default {
     return {
       dialogVisible: false,
       title: '',
-      form: {},
+      form: {
+        systemFileList: [],
+      },
       rules: {
         name: [{ required: true, message: '请输入文件名称', trigger: 'blur' },],
       },
@@ -80,9 +78,6 @@ export default {
   created() { },
   mounted() { },
   methods: {
-    onChange(file, fileList) { },
-    handlePreview(file, fileList) { },
-    handleRemove(file, fileList) { },
     // 切换按钮
     onChangeFamily(val) {
       this.btn = val
@@ -100,7 +95,9 @@ export default {
     //关闭弹窗
     handleClose() {
       this.$refs.form.resetFields()
-      this.form = {}
+      this.form = {
+        systemFileList: [],
+      }
       this.dialogVisible = false
     },
     //提交数据
@@ -112,7 +109,32 @@ export default {
           this.$message.error('信息未输入完整')
         }
       });
-    }
+    },
+    // 上传的文件监听
+    onchangeFile(file, fileList) {
+      if (file.guid) {
+        let index = this.form.systemFileList.findIndex(item => {
+          return item.uid == file.uid
+        })
+        if (index != -1) {
+          this.form.systemFileList.splice(index, 1, file)
+        }
+      } else {
+        this.form.systemFileList.push(file.raw)
+      }
+
+    },
+    // 删除上传的文件
+    onRemove(file, fileList) {
+      let index = this.form.systemFileList.findIndex(item => {
+        return item.uid == file.uid
+      })
+      if (index != -1) {
+        this.form.systemFileList.splice(index, 1)
+      }
+    },
+    // 点击文件
+    onPreview(file){},
   },
 
 };

+ 142 - 53
src/views/patentMining/components/excavateTask/excavateTask.vue

@@ -11,7 +11,8 @@
         </div>
       </el-header>
       <el-main class="height_100">
-        <el-table :data="tableData" style="width: 100%;" border header-row-class-name="custom-table-header">
+        <el-table :data="tableData" style="width: 100%;" border header-row-class-name="custom-table-header"
+          @sort-change="sortChange">
           <el-table-column label="#" align="center" width="80px">
             <template slot-scope="scope">
               <div>
@@ -19,40 +20,41 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="name" label="任务名称" align="center"></el-table-column>
-          <el-table-column prop="taskType" label="任务类型" align="center">
+
+          <el-table-column v-for="item in columnList" :key="item.value" :prop="item.value"
+            :render-header="$commonJS.renderHeaderMethods" :label="item.name" sortable="custom" align="center">
             <template slot-scope="scope">
-              <div>
-                {{ taskType[scope.row.taskType] }}
+              <div v-if="['name'].includes(item.value)">
+                <el-link @click="handleItem(scope.row, item.value)">
+                  <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
+                </el-link>
               </div>
+              <div v-else-if="['taskType'].includes(item.value)" v-html="$commonJS.getColumnData(scope.row, item,null,{data:taskType})"></div>
+              <div v-else v-html="$commonJS.getColumnData(scope.row, item)"></div>
             </template>
           </el-table-column>
-          <el-table-column prop="createPerson" label="发起人" align="center"></el-table-column>
-          <el-table-column prop="handlePerson" label="处理人" align="center"></el-table-column>
-          <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
-          <el-table-column prop="endTime" label="截止时间" align="center"></el-table-column>
-          <el-table-column prop="status" label="状态" align="center"></el-table-column>
-          <el-table-column label="操作" align="center" width="180px">
-            <template slot-scope="scope">
-              <div>
-                <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)"
-                  @click="handleTask(scope.row)">
-                  <span v-if="scope.row.status == '已完成' || scope.row.handlePerson != userInfo.name">查 看</span>
-                  <span v-else>处 理</span>
-                  <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item command="1">查看审核记录</el-dropdown-item>
-                    <el-dropdown-item command="2" style="color: red;text-align: center;">删除</el-dropdown-item>
-                  </el-dropdown-menu>
-                </el-dropdown>
-              </div>
-            </template>
+      
+          <el-table-column label="操作" align="center" width="180px"> 
+          <template slot-scope="scope">
+            <div>
+              <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)"
+                @click="handleTask(scope.row)">
+                <span v-if="scope.row.status == '已完成' || scope.row.handlePerson != userinfo.name">查 看</span>
+                <span v-else>处 理</span>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item command="1">查看审核记录</el-dropdown-item>
+                  <el-dropdown-item command="2" style="color: red;text-align: center;">删除</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </div>
+          </template>
           </el-table-column>
         </el-table>
       </el-main>
       <el-footer class="pagination">
-          <el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
-            :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="queryParams.total">
-          </el-pagination>
+        <el-pagination background layout="total, prev, pager, next, jumper" :current-page.sync="queryParams.current"
+          :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="queryParams.total">
+        </el-pagination>
       </el-footer>
     </el-container>
 
@@ -60,24 +62,29 @@
     <handleTask1 ref="handleTask1Dialog"></handleTask1>
     <!-- <handleTask2 ref="handleTask2Dialog"></handleTask2> -->
     <handleTask2 ref="handleTask2Dialog"></handleTask2>
-    <auditRecords ref="auditRecords"></auditRecords>
+    <auditRecords ref="auditRecords" ></auditRecords>
   </div>
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
+import {column} from '../mixins/index2'
 import createTask from '../dialog/createTask.vue'
 import handleTask1 from '../dialog/handleTask1.vue'
 import handleTask2 from '../dialog/handleTask2.vue'
 import auditRecords from '../dialog/auditRecords.vue'
 export default {
+  mixins:[column],
   components: {
     createTask,
     handleTask1,
     handleTask2,
     auditRecords,
   },
+  props: ['id'],
   data() {
     return {
+      // table数据
       tableData: [
         {
           name: '加热器专利挖掘1',
@@ -136,16 +143,13 @@ export default {
           status: '已完成'
         },
       ],
-      taskType: {
-        1: '项目审核任务',
-        2: '文件分配任务',
-        3: '文件审核任务',
-      },
+      // 分页及总数信息
       queryParams: {
         current: 1,
         size: 10,
         total: 0,
       },
+      // 检索字段
       searchFiled: [
         {
           label: '任务名称',
@@ -160,31 +164,43 @@ export default {
           placeholder: '请输入创建人名称'
         },
       ],
-      searchOption: {}
+      // 检索字符串
+      searchOption: {},
+      //排序字段
+      sort: [{ "orderBy": "createTime", "orderType": 1 }],
+      // showView:false,
     }
   },
   computed: {
-    userInfo() {
-      return this.$store.state.user.userinfo
-    },
+    ...mapGetters(['webSocket', 'userinfo']),
+    // userInfo() {
+    //   return this.$store.state.user.userinfo
+    // },
   },
   mounted() {
     // this.getList()
   },
   methods: {
+    // 创建任务事件
+    createTask() {
+      this.$refs.createTaskDialog.open({})
+    },
     //处理任务 
     handleTask(row) {
-      if (row.status == '已完成' || row.handlePerson != this.userInfo.name) {
+      // 1: '项目审核任务',
+      // 2: '文件分配任务',
+      // 3: '文件审核任务',
+      if (row.status == '已完成' || row.handlePerson != this.userinfo.name) {
         if (row.taskType == '1') {
-          this.$refs.handleTask1Dialog.open(row,false)
+          this.$refs.handleTask1Dialog.open(row, false)
         } else if (row.taskType == '2') {
-          this.$refs.handleTask2Dialog.open(row,false)
+          this.$refs.handleTask2Dialog.open(row, false)
         }
       } else {
         if (row.taskType == '1') {
-          this.$refs.handleTask1Dialog.open(row,true)
+          this.$refs.handleTask1Dialog.open(row, true)
         } else if (row.taskType == '2') {
-          this.$refs.handleTask2Dialog.open(row,true)
+          this.$refs.handleTask2Dialog.open(row, true)
         } else {
           let router = this.$router.resolve({
             path: '/handleExamine',
@@ -196,37 +212,110 @@ export default {
         }
       }
     },
+    // 操作栏下拉菜单按钮
     handleCommand(ev, row) {
       switch (ev) {
         case '1'://查看审核记录
-          this.$refs.auditRecords.open()
+          this.$refs.auditRecords.open(row.id)
           break;
         case '2'://删除任务
-
+          this.deleteTask(row)
           break;
 
         default:
           break;
       }
     },
+    // 删除任务
+    deleteTask(row) {
+      this.deleteTasks([row.id])
+    },
+    deleteTasks(ids) {
+      this.$api.query(ids).then(response => {
+        if (response.code == 200) {
+          this.$message.success('删除成功')
+          this.queryParams.current = 1
+          this.getList()
+        }
+      })
+    },
+    //获取table栏位及分组字段、检索字段
+    async getColumn() {
+      let params = ['reportProject']
+      await this.$api.getParamsCommon(params).then(res => {
+        if (res.code == 200) {
+          let conditionDTOList = JSON.parse(JSON.stringify(res.data[0].conditionDTOList))
+          // 搜索字段
+          this.searchFiled = this.$commonJS.getField(conditionDTOList, (u) => u.ifSearch == true, {
+            label: 'name',
+            value: 'value',
+            type: 'type',
+          })
+        }
+      })
+      // this.showView = false
+      // this.$nextTick(() => {
+      //   this.showView = true
+      // })
+    },
     // 左侧搜索
     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()
     },
-    // 创建任务事件
-    createTask() {
-      this.$refs.createTaskDialog.open({})
+    //排序
+    sortChange({ column, prop, order }) {
+      //如需要多个字段排序,则不需要清空
+      var params = {
+        sort: this.sort,
+        column,
+        prop,
+        order,
+      }
+      this.sort = this.$commonJS.getSortData(params)
+      this.queryParams.current = 1
+      this.getList()
     },
     // 初始化请求数据
-    getList() { },
+    getList() {
+      let params = {
+        ...this.queryParams,//分页信息
+        searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
+        orderDTOList: this.sort,//排序信息
+        id: this.id,
+      }
+      this.$api.query(params).then(response => {
+        if (response.code == 200) {
+          this.tableData = response.data.data
+          this.queryParams.current = response.data.current
+          this.queryParams.size = response.data.size
+          this.queryParams.total = response.data.total
+        }
+      }).catch(error => {
+        this.tableData = []
+        this.queryParams.total = 0
+      })
+    },
     // 分页
     handleCurrentChange(val) {
-      // this.queryParams.current = val
-      // this.getList()
+      this.queryParams.current = val
+      this.getList()
     },
   },
 }
 </script>
 
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>

+ 2 - 1
src/views/patentMining/components/excavateTask/index.vue

@@ -1,12 +1,13 @@
 <template>
   <div class="height_100">
-    <excavateTask ></excavateTask>
+    <excavateTask :id="id"></excavateTask>
   </div>
 </template>
 
 <script>
 import excavateTask from './excavateTask.vue'
 export default {
+  props:['id'],
   components: {
     excavateTask
   },

+ 57 - 0
src/views/patentMining/components/mixins/index2.js

@@ -0,0 +1,57 @@
+export const column = {
+  data() {
+    return {
+      // 审核任务类型
+      taskType: {
+        1: '项目审核任务',
+        2: '文件分配任务',
+        3: '文件审核任务',
+      },
+      // table栏位信息
+      columnList: [
+        {
+          name: "任务名称",
+          type: "String",
+          value: "name",
+        },
+        {
+          name: "任务类型",
+          type: "Integer",
+          value: "taskType",
+        },
+        {
+          name: "发起人",
+          type: "String",
+          value: "createPerson",
+        },
+        {
+          name: "处理人",
+          type: "String",
+          value: "handlePerson",
+        },
+        {
+          name: "创建时间",
+          type: "DateTime",
+          value: "createTime",
+        },
+        {
+          name: "截止时间",
+          type: "DateTime",
+          value: "endTime",
+        },
+        {
+          name: "状态",
+          type: "String",
+          value: "status",
+        },
+      ],
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+    // 点击项目名称
+    handleItem(row,key){},
+  },
+}

+ 5 - 0
src/views/patentMining/components/view/commonTable.vue

@@ -18,6 +18,7 @@
               <span v-html="$commonJS.getColumnData(scope.row, item)"></span>
             </el-link>
           </div>
+          <div v-else-if="['ifSearch'].includes(item.value)" v-html="$commonJS.getColumnData(scope.row, item , null , {data:ifSearch})"></div>
           <div v-else v-html="$commonJS.getColumnData(scope.row, item)"></div>
         </template>
       </el-table-column>
@@ -57,6 +58,10 @@ export default {
   },
   data() {
     return {
+      ifSearch: {
+        false:'否',
+        true:'是',
+      },
       statusObj: {
         0: '审核中',
         1: '处理中',

+ 6 - 46
src/views/report/components/dialog/addAndEditReport.vue

@@ -572,9 +572,9 @@ export default {
         this.$set(this.form, 'systemFileList', [])
         this.$set(this.form, 'fileGuids', [])
         a = '创建'
-        console.log(1);
+        // console.log(1);
       }
-      console.log(2);
+      // console.log(2);
       var reportType = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.reportType })[0].dictChildLabel
       this.title = a + reportType + '报告'
       // 负责人
@@ -583,7 +583,7 @@ export default {
         await this.getPermissionPersonnel(1)
         this.personnelList.queryParams.id = null
       }
-      console.log(3);
+      // console.log(3);
       // 委托方
       // if (this.form.entrustId) {
       //   this.clientList.queryParams.id = this.form.entrustId
@@ -592,11 +592,11 @@ export default {
       // }
 
       this.getPermissionPersonnel()
-      console.log(4);
+      // console.log(4);
       // this.getAllClientList()
       // this.getEventList()
       this.showDialog = true
-      console.log(5);
+      // console.log(5);
     },
 
     /**
@@ -650,47 +650,7 @@ export default {
       })
     },
 
-    /**
-    * 人员
-    * @param {*} query 
-    */
-    // 人员列表远程搜索
-    remoteMethodPerson(query) {
-      this.personnelList.data = []
-      this.personnelList.queryParams.current = 1
-      this.personnelList.queryParams.name = query
-      this.getPermissionPersonnel()
-    },
-    // 获取所有人员列表懒加载
-    lazyLoadingPerson() {
-      if (this.personnelList.queryParams.current * this.personnelList.queryParams.size >= this.personnelList.queryParams.total) {
-        return false
-      }
-      this.personnelList.queryParams.current += 1
-      this.getPermissionPersonnel()
-    },
-    //获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
-    async getPermissionPersonnel(type) {
-      this.personnelList.loading = true;
-      await this.$api.getPermissionPersonnel(this.personnelList.queryParams).then((response) => {
-        if (response.code == 200) {
-          this.personnelList.loading = false;
-          if (!type) {
-            if (this.form.headId) {
-              var index = response.data.findIndex(item => {
-                return item.id == this.form.headId
-              })
-              if (index != -1) {
-                response.data.splice(index, 1)
-              }
-            }
-            this.personnelList.queryParams.total = response.pageColumn.total
-          }
-          this.personnelList.data.push(...response.data)
-          // this.personnelList.queryParams.total = response.pageColumn.total
-        }
-      })
-    },
+    
 
     //获取所有部门列表
     getDepartment() {