Forráskód Böngészése

Merge branch 'product' of http://1.116.113.26:8088/zhuliu/xiaoshi_system into product

zhuliu 1 éve
szülő
commit
35be4b6df5

+ 2 - 2
src/api/newApi/task.js

@@ -29,8 +29,8 @@ export default {
   /**
    * 专利挖掘文件分配任务弹窗查询文件列表
    */
-  getAssoTaskFile(data) {
-    return axios.post("/xiaoshi/projectTask/getAssoTaskFile", data);
+  getTaskHandleResult(params) {
+    return axios.get("/xiaoshi/projectTask/getTaskHandleResult", {params});
   },
   /**
    * 专利挖掘文件分配任务弹窗文件列表删除文件

+ 6 - 2
src/utils/index.js

@@ -1,6 +1,7 @@
 import moment from 'moment'
 import _ from 'lodash'
 import constants from '@/utils/constants'
+import commonJS from './common'
 
 export const formatDate = (date, format = 'YYYY-MM-DD') => {
   return moment(date).format(format)
@@ -51,8 +52,11 @@ export const downLoadBase64 = (content, fileName) => {
   aLink.click();
 }
 
-export const downLoad2 = (url) => {
-  const href = `/api/v2/common/download?url=${encodeURIComponent(url)}`
+export const downLoad2 = (guid) => {
+  const href = commonJS.checkViewer(guid)
+
+  // const href = `/api/v2/common/download?url=${encodeURIComponent(url)}`
+
   const anchor = document.createElement('a');
   const fileName = 'download';
   if ('download' in anchor) {

+ 1 - 1
src/utils/model/upload/index.vue

@@ -398,7 +398,7 @@ export default {
 <style lang="scss" scoped>
 .myUpload {
   width: calc(100% - 0px);
-  height: 180px;
+  height: 185px;
   padding: 5px;
 }
 .myUpload1 {

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

@@ -125,19 +125,20 @@ export default {
             }
             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,
             }
           }
-        //  console.log(2,this.form);
           // 区分是哪种审核
           switch (this.form.type) {
             case 1://专利挖掘项目审核
               this.addProjectOpenExamineTask(params)
               break;
             case 5://专利挖掘项目-文件分配任务审核
+              this.$emit('isHandleSave',true)
               this.fileTask(params)
               break;
             case 7://专利挖掘项目-文件列表审核任务

+ 4 - 3
src/views/components/view/checkFile.vue

@@ -6,7 +6,7 @@
                 <el-link style="font-size: 16px" @click="downLoad"><i class="fa el-icon-download"></i><span style="margin-left:10px">下载</span></el-link>
             </div>
         </div>
-        <div style="display:flex;justify-content: center;">
+        <div style="display:flex;justify-content: center;height: calc(100% - 30px);">
             <div v-if="isPicture == 0"  v-loading="loadLoading" style="width:100%">
                 <iframe id="checkIframe" :src="FileUrl" frameborder="0" width="100%" :height="height"></iframe>
             </div>
@@ -41,7 +41,8 @@ export default {
         }
     },
     mounted(){
-        this.FileName = this.row.name?this.row.name+'.'+this.row.suffix:this.row.fileName
+        // this.FileName = this.row.name?this.row.name+'.'+this.row.suffix:this.row.fileName
+      this.FileName = this.row.originalName
         if(this.isPicture == 1){
             this.srcList = [this.FileUrl]
         }else{
@@ -116,7 +117,7 @@ export default {
     .header{
         padding: 0 20px;
         display: flex;
-        justify-content: space-around;
+        justify-content: space-between;
         align-items: center;
     }
 </style>

+ 10 - 3
src/views/patentMining/components/details/basicMessage.vue

@@ -1,17 +1,20 @@
 <template>
   <div>
     <basicMessage :id="id"></basicMessage>
-    <projectPath :id="id" v-on="$listeners"></projectPath>
+    <projectPath :id="id" v-on="$listeners" @on-drawer="handleDrawer"></projectPath>
+    <drawerPage ref="drawerPage" :id="id"> </drawerPage>
   </div>
 </template>
 
 <script>
 import basicMessage from './components/basicMessage.vue';
 import projectPath from './components/projectPath.vue'
+import drawerPage from './components/drawer.vue'
 export default {
   components: {
     basicMessage,
-    projectPath
+    projectPath,
+    drawerPage,
   },
   props: {
     id:'',
@@ -24,7 +27,11 @@ export default {
   computed: {},
   created() {},
   mounted() {},
-  methods: {},
+  methods: {
+    handleDrawer(obj) {
+      this.$refs.drawerPage.open(obj)
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 50 - 41
src/views/patentMining/components/details/components/basicMessage.vue

@@ -6,52 +6,52 @@
       <el-divider></el-divider>
       <el-descriptions class="margin-top" title="" :column="column" size="" border>
         <el-descriptions-item>
-          <template slot="label"> 
-            <i class="el-icon-user"></i> 项目名称 
-          </template> 
-          {{ row.name }}
+          <template slot="label">
+            <i class="el-icon-user"></i> 项目名称
+          </template>
+          <span v-html="getColumnData(row, 'name')"></span>
         </el-descriptions-item>
-        <el-descriptions-item> 
-          <template slot="label"> 
+        <el-descriptions-item>
+          <template slot="label">
             <i class="el-icon-mobile-phone"></i> 项目产出
           </template>
-          {{ row.output }}
+          <span v-html="getColumnData(row, 'output')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-location-outline"></i> 技术方向
           </template>
-          {{ row.technicalDirection }}
+          <span v-html="getColumnData(row, 'technicalDirection')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-tickets"></i> 产品阶段
           </template>
-          {{ row.productPhase }}
+          <span v-html="getColumnData(row, 'productPhase')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 是否检索
           </template>
-          <span>{{ getArrJoin(row.ifSearch,{true:'是',false:'否'}) }}</span>
+          <span>{{ getArrJoin(row.ifSearch, { true: '是', false: '否' }) }}</span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 负责人
           </template>
-          {{ row.headName }}
+          <span v-html="getColumnData(row, 'headName')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 相关竞争对手
           </template>
-          {{ row.relatedCompetitors }}
+          <span v-html="getColumnData(row, 'relatedCompetitors')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 技术关键词
           </template>
-          {{ row.technicalKeyword }}
+          <span v-html="getColumnData(row, 'technicalKeyword')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
@@ -59,30 +59,31 @@
           </template>
           <el-tag size="small">{{ row.stateName }}</el-tag>
         </el-descriptions-item>
-        <el-descriptions-item>
+        <!-- <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 审核进度
           </template>
-          <el-tag size="small">{{ row.process }}</el-tag>
-        </el-descriptions-item>
+          <span v-html="getColumnData(row, 'process')"></span>
+        </el-descriptions-item> -->
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 创建人
           </template>
-          {{ row.createName }}
+          <span v-html="getColumnData(row, 'createName')"></span>
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 参与人
           </template>
-         <!-- <span v-for="item in row.involvedPersons" :key="item.personId">{{ item.personName }}/</span> -->
-         <span>{{ getArrJoin(row.involvedPersons,'personName') }}</span>
+          <span>{{ getArrJoin(row.involvedPersons, 'personName') }}</span>
+          <!-- <span v-html="$commonJS.getColumnData(row.involvedPersons, {name:'参与人',value:'personName'})"></span> -->
         </el-descriptions-item>
         <el-descriptions-item>
           <template slot="label">
             <i class="el-icon-office-building"></i> 附件
           </template>
-          <span>{{ getArrJoin(row.systemFileList,'name') }}</span>
+          <span>{{ getArrJoin(row.systemFileList, 'name') }}</span>
+          <!-- <span v-html="$commonJS.getColumnData(row.systemFileList, {name:'附件',value:'name'})"></span> -->
         </el-descriptions-item>
       </el-descriptions>
     </div>
@@ -90,31 +91,31 @@
 </template>
 
 <script>
-import {column} from '../../mixins/index2'
+import { column } from '../../mixins/index2'
 export default {
-  mixins:[column],
+  mixins: [column],
   components: {
   },
-  props:['id'],
+  props: ['id'],
   data() {
     return {
-      column:4,
-      queryParams:{},
-      row:{}
+      column: 4,
+      queryParams: {},
+      row: {}
     }
   },
   mounted() {
     window.addEventListener('resize', (e) => {
       let width = window.innerWidth
-      if (width > 2200) {  
-        this.column = 6;  
-      } else if (width < 1000) {  
-        this.column = 3;  
-      } else if (width < 1400) {  
-        this.column = 4;  
-      } else if (width < 1800) {  
-        this.column = 5;  
-      }  
+      if (width > 2200) {
+        this.column = 6;
+      } else if (width < 1000) {
+        this.column = 3;
+      } else if (width < 1400) {
+        this.column = 4;
+      } else if (width < 1800) {
+        this.column = 5;
+      }
     })
     this.getList()
   },
@@ -123,8 +124,8 @@ export default {
     getList() {
       let params = {
         size: 10,
-        current:1,
-        searchQuery:`id=${this.id}`,
+        current: 1,
+        searchQuery: `id=${this.id}`,
       }
       this.$api.queryPatentDigProject(params).then(response => {
         if (response.code == 200) {
@@ -134,10 +135,18 @@ export default {
         this.row = {}
       })
     },
-    
+    // 处理数据
+    getColumnData(data, key) {
+      if (data && data[key]) {
+        return data[key]
+      } else {
+        return '--'
+      }
+    },
+
   },
-  deactivated(){
-    window.removeEventListener('resize',()=>{})
+  deactivated() {
+    window.removeEventListener('resize', () => { })
   }
 }
 </script>
@@ -150,7 +159,7 @@ export default {
 }
 </style>
 <style lang="scss" scoped>
-.basicMessage{
+.basicMessage {
   width: 100%;
   height: 100%;
 }

+ 59 - 0
src/views/patentMining/components/details/components/drawer.vue

@@ -0,0 +1,59 @@
+<template>
+  <div>
+    <el-drawer title="任务及文件信息" :visible.sync="drawer" direction="rtl" :before-close="handleClose" size="1000px">
+      <el-container>
+        <el-header class="basic_header">
+          <el-tabs v-model="activeName" type="card" @tab-click="handleClick" style="width:100%">
+            <el-tab-pane v-for="item in menu" :key='item.path' :label="item.label" :name="item.path"></el-tab-pane>
+          </el-tabs>
+        </el-header>
+        <el-main>
+          <component :is='activeName' :id="id"></component>
+        </el-main>
+      </el-container>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import ExcavateTaskIndex from '../../excavateTask/index.vue'
+import FileMessage from '../../fileMessage.vue'
+export default {
+  props: ['id'],
+  components: {
+    ExcavateTaskIndex,
+    FileMessage,
+  },
+  data() {
+    return {
+      drawer: false,
+      activeName: 'ExcavateTaskIndex',
+      menu: [
+        {
+          label: '任务清单',
+          path: 'ExcavateTaskIndex'
+        },
+        {
+          label: '文件列表',
+          path: 'FileMessage'
+        },
+      ],
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+    // 打开
+    open(data) {
+      this.drawer = true
+    },
+    // 关闭
+    handleClose() {
+      this.drawer = false
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 45 - 41
src/views/patentMining/components/details/components/projectPath.vue

@@ -5,68 +5,68 @@
     <el-divider></el-divider>
     <svg viewBox="0 0 1800 400" width="100%" height="100%">
       <g transform=translate(0,0) class="svgG">
-        <g @click="toFilePage('创新点梳理',1)">
-          <rect width="200" height="120" :fill="getColor('创新点梳理')" > </rect>
+        <g @click="toDrawer('创新点梳理', 1)">
+          <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>
+          <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">
-        <g  @click="toFilePage('查新检索',2)">
-          <rect width="200" height="120" :fill="getColor('查新检索')" > </rect>
+        <g @click="toDrawer('查新检索', 2)">
+          <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>
+          <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" >
-        <g @click="toFilePage('保护主题规划',3)">
-            <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 transform="translate(720,0)" class="svgG">
+        <g @click="toDrawer('保护主题规划', 3)">
+          <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" >
-        <g @click="toFilePage('独权撰写',4)">
-          <rect width="200" height="120" :fill="getColor('独权撰写')" > </rect>
+      <g transform="translate(1080,0)" class="svgG">
+        <g @click="toDrawer('独权撰写', 4)">
+          <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" >
-        <g @click="toFilePage('从权撰写',5)">
-          <rect width="200" height="120" :fill="getColor('从权撰写')" > </rect>
+      <g transform="translate(1440,0)" class="svgG">
+        <g @click="toDrawer('从权撰写', 5)">
+          <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> 
+          <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">
-        <rect width="200" height="120" :fill="getColor('从权撰写')" @click="toFilePage('从权撰写')">  </rect>
+        <rect width="200" height="120" :fill="getColor('从权撰写')" @click="toDrawer('从权撰写')">  </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>
         <polygon points="-150,55,-160,60,-150,65"></polygon>
       </g> -->
-      <g transform="translate(1440,200)" class="svgG" >
-        <g @click="toFilePage('申请文件定稿',6)">
-          <rect width="200" height="120" :fill="getColor('申请文件定稿')" > </rect>
+      <g transform="translate(1440,200)" class="svgG">
+        <g @click="toDrawer('申请文件定稿', 6)">
+          <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>
@@ -74,29 +74,27 @@
         </g>
         <polygon points="-150,55,-160,60,-150,65"></polygon>
       </g>
-      <g transform="translate(1080,200)" class="svgG" @click="toFilePage('说明书规划撰写',7)">
-        <rect width="200" height="120" :fill="getColor('说明书规划撰写')" > </rect>
+      <g transform="translate(1080,200)" class="svgG" @click="toDrawer('说明书规划撰写', 7)">
+        <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('说明书规划撰写')" />
         <text x="145" y="65" fill="#fff">{{ getNumber('说明书规划撰写') }}</text>
       </g>
-
     </svg>
 
-
   </div>
 </template>
 
 <script>
-import {optionsData} from '../../mixins/index2'
+import { optionsData } from '../../mixins/index2'
 export default {
-  mixins:[optionsData],
-  props:['id'],
+  mixins: [optionsData],
+  props: ['id'],
   data() {
     return {
       numObj: {
-        '创新点梳理':{},
+        '创新点梳理': 2,
         '查新检索': 0,
         '保护主题规划': 0,
         '独权撰写': 0,
@@ -114,7 +112,7 @@ export default {
     // 获取流程节点及相对应的文件
     getFileNumber() {
       let params = {
-        id:this.id,
+        id: this.id,
       }
       this.$api.query(params).then(response => {
         if (response.code == 200) {
@@ -130,14 +128,20 @@ export default {
     },
     // 获取背景颜色
     getColor(str) {
-     return this.getNumber(str)>0?'#5ed325':'pink'
+      return this.getNumber(str) > 0 ? '#5ed325' : 'pink'
+    },
+    toDrawer(str, id) {
+      let obj = {
+        pathName: str,
+        pathId: id
+      }
+      this.$emit('on-drawer',obj)
     },
     // 跳转文件列表界面
-    toFilePage(str,id) {
-      // console.log(str, id);
+    toFilePage(str, id) {
       let obj = {
         pathName: str,
-        pathId:id
+        pathId: id
       }
       this.$emit('grandson',obj)
     },
@@ -153,8 +157,8 @@ export default {
 }
 </style>
 <style lang="scss" scoped>
-.projectPath{
-  .svgG{
+.projectPath {
+  .svgG {
     cursor: pointer;
   }
 }

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

@@ -207,6 +207,7 @@
     </el-dialog>
 
     <examine ref="examine"  @taskForm="handleTaskForm"></examine>
+    <addEvent ref="addEvent"></addEvent>
   </div>
 </template>
 
@@ -216,12 +217,14 @@ import { personnelLoading } from '../mixins/index2'
 import choosePerson from '@/views/components/dialog/person.vue'
 import ClientTable from '@/views/client'
 import examine from '@/views/components/dialog/examine.vue'
+import addEvent from '@/views/event/components/dialog/addEvent.vue'
 export default {
   mixins:[personnelLoading],
   components: {
     choosePerson,
     ClientTable,
     examine,
+    addEvent,
   },
   props: {},
   data() {
@@ -386,7 +389,8 @@ export default {
     */
     //打开事件弹窗
     addEvent() {
-
+      let form = {}
+      this.$refs.addEvent.open(form,1)
     },
     //懒加载事件
     loadEvent() {

+ 17 - 27
src/views/patentMining/components/dialog/auditRecords.vue

@@ -12,25 +12,15 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column v-for="item in columnList" :key="item.value" :prop="item.value"
+
+        <el-table-column v-for="item in columnList2" :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>
+            <div 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"
-          :page-size.sync="queryParams.size" @current-change="handleCurrentChange" :total="queryParams.total">
-        </el-pagination>
-      </div>
       <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="handleClose">关 闭</el-button>
       </span>
@@ -74,25 +64,25 @@ export default {
       this.queryParams.current = 1
       this.getList()
     },
-    getList(id) {
+    getList(row) {
       let params = {
-        ...this.queryParams,//分页信息
-        // searchQuery: this.$commonJS.objectToString(this.searchOption),//检索条件
-        orderDTOList: this.sort,//排序信息
-        id: id,
+        taskId: row.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
+      this.$api.queryAuditHistory(params).then(res => {
+        if (res.code == 200) {
+          // this.detailsMessage = res.data.projectTaskVO//分配任务信息
+          // this.tableData = res.data.systemFileList//文件
+          for (let i = 0; i < res.data.auditHistoryVOS.length - 1; i++){
+            if (res.data.auditHistoryVOS[i].taskHandleResultVO) {
+              this.tableData.push(res.data.auditHistoryVOS[i].taskHandleResultVO)
+            }
+          }
         }
       })
     },
     // 打开弹窗
-    open(id) {
-      // this.getList(id)
+    open(row) {
+      this.getList(row)
       this.dialogVisible = true
     },
     handleClose() {

+ 24 - 19
src/views/patentMining/components/dialog/createTask.vue

@@ -4,11 +4,11 @@
     <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="handleClose"
       :close-on-click-modal="false">
       <el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-ruleForm">
-        <el-form-item label="任务名称:" prop="name" >
-          <el-input v-model="form.name" placeholder="请输入任务名称" :disabled="form.id?true:false"></el-input>
+        <el-form-item label="任务名称:" prop="name">
+          <el-input v-model="form.name" placeholder="请输入任务名称" :disabled="form.id ? true : false"></el-input>
         </el-form-item>
         <el-form-item label="任务流程:" prop="processId">
-          <el-select v-model="form.processId" placeholder="请选择流程" style="width: 100%;" :disabled="form.id?true:false">
+          <el-select v-model="form.processId" placeholder="请选择流程" style="width: 100%;" :disabled="form.id ? true : false">
             <el-option v-for="item in pathOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
@@ -21,8 +21,8 @@
           </el-select>
         </el-form-item>
         <el-form-item label="截止时间:" prop="deadLineTime">
-          <el-date-picker style="width: 100%" v-model="form.deadLineTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
-            placeholder="请选择截止日期时间">
+          <el-date-picker style="width: 100%" v-model="form.deadLineTime" type="datetime"
+            value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择截止日期时间">
           </el-date-picker>
         </el-form-item>
         <el-form-item label="备注:">
@@ -39,9 +39,9 @@
 </template>
 
 <script>
-import { personnelLoading ,optionsData} from '../mixins/index2'
+import { personnelLoading, optionsData } from '../mixins/index2'
 export default {
-  mixins: [personnelLoading,optionsData],
+  mixins: [personnelLoading, optionsData],
   components: {},
   props: ['id'],
   data() {
@@ -68,18 +68,18 @@ export default {
     async open(data) {
       if (data.type == 6 || data.type == 5) {//文件分配任务//文件分配审核任务
         if (data.type == 6) {
-          this.title='编辑文件分配任务'
+          this.title = '编辑文件分配任务'
         } else {
-          this.title='编辑文件分配审核任务'
+          this.title = '编辑文件分配审核任务'
         }
         this.form = JSON.parse(JSON.stringify(data))
-         // 负责人
+        // 负责人
         if (this.form.handler) {
           this.personnelList.queryParams.id = this.form.handler
           await this.getPermissionPersonnel(1)
           this.personnelList.queryParams.id = null
         }
-      }else {//创建分配任务
+      } else {//创建分配任务
         this.title = '创建文件分配任务'
         this.form.projectId = this.id//项目id
         this.form.type = 6//分配任务
@@ -98,20 +98,25 @@ export default {
     clear() {
       this.personnelList.data = []
       this.personnelList.queryParams.current = 1
-      this.personnelList.queryParams.total=0
+      this.personnelList.queryParams.total = 0
       this.personnelList.queryParams.name = null
     },
     //提交数据
     submit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-          this.$api.addTask(this.form).then(res => {
-            if (res.code == 200) {
-              this.$message.success('创建文件分配任务成功')
-              this.$emit('isCreate','新增成功')
-              this.handleClose()
-            }
-          })
+          if (!this.form.id) {//新增分配任务
+            this.$api.addTask(this.form).then(res => {
+              if (res.code == 200) {
+                this.$message.success('创建文件分配任务成功')
+                this.$emit('isCreate', '新增成功')
+                this.handleClose()
+              }
+            })
+          } else {
+
+          }
+
         } else {
           this.$message.error('信息未输入完整')
         }

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

@@ -3,18 +3,17 @@
   <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"
-        >
+      <el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-ruleForm">
         <el-row>
           <el-col :span="12">
             <el-form-item label="项目名称:" prop="name">
-              <span v-if="form.isLook">{{form.name ? form.name : '--'}}</span>
+              <span v-if="form.isLook">{{ form.name ? form.name : '--' }}</span>
               <el-input v-else v-model="form.name" placeholder="请输入项目名称"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="技术方向:">
-              <span v-if="form.isLook">{{form.technicalDirection ? form.technicalDirection : '--'}}</span>
+              <span v-if="form.isLook">{{ form.technicalDirection ? form.technicalDirection : '--' }}</span>
               <el-input v-else v-model="form.technicalDirection" placeholder="请输入技术方向"></el-input>
             </el-form-item>
           </el-col>
@@ -22,13 +21,13 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="产品阶段:">
-              <span v-if="form.isLook">{{form.productPhase ? form.productPhase : '--'}}</span>
+              <span v-if="form.isLook">{{ form.productPhase ? form.productPhase : '--' }}</span>
               <el-input v-else v-model="form.productPhase" placeholder="请输入产品阶段"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="产品产出:">
-              <span v-if="form.isLook">{{form.output ? form.output : '--'}}</span>
+              <span v-if="form.isLook">{{ form.output ? form.output : '--' }}</span>
               <el-input v-else v-model="form.output" placeholder="请输入产品产出"></el-input>
             </el-form-item>
           </el-col>
@@ -37,13 +36,13 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="相关竞争对手:">
-              <span v-if="form.isLook">{{form.relatedCompetitors ? form.relatedCompetitors : '--'}}</span>
+              <span v-if="form.isLook">{{ form.relatedCompetitors ? form.relatedCompetitors : '--' }}</span>
               <el-input v-else v-model="form.relatedCompetitors" placeholder="请输入相关竞争对手"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="技术关键词:">
-              <span v-if="form.isLook">{{form.technicalKeyword ? form.technicalKeyword : '--'}}</span>
+              <span v-if="form.isLook">{{ form.technicalKeyword ? form.technicalKeyword : '--' }}</span>
               <el-input v-else v-model="form.technicalKeyword" placeholder="请输入技术关键词"></el-input>
             </el-form-item>
           </el-col>
@@ -65,7 +64,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="负责人:">
-              <span v-if="form.isLook">{{form.headId ? form.headId : '--'}}</span>
+              <span v-if="form.isLook">{{ form.headId ? form.headId : '--' }}</span>
               <el-select v-else v-model="form.headId" placeholder="请选择负责人" style="width: 100%;" filterable remote
                 :remote-method="remoteMethodPerson" v-SelectLazyLoading="lazyLoadingPerson"
                 :loading="personnelList.loading">
@@ -76,7 +75,8 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="是否检索:">
-              <el-switch v-model="form.ifSearch" active-color="#13ce66" inactive-color="#ff4949" :disabled="form.isLook?true:false">
+              <el-switch v-model="form.ifSearch" active-color="#13ce66" inactive-color="#ff4949"
+                :disabled="form.isLook ? true : false">
               </el-switch>
             </el-form-item>
           </el-col>
@@ -85,7 +85,8 @@
           <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" :disabled="form.isLook?true:false"></myUpload>
+                @on-preview="onPreview" style="height: 180px;" :autoUpload="true" :disabled="form.isLook ? true : false">
+              </myUpload>
             </el-form-item>
           </el-col>
         </el-row>
@@ -217,10 +218,11 @@ export default {
       this.btn = val
     },
     //打开弹窗
-    async open(form, val) {
+    async open(form, row, val) {
       this.form = JSON.parse(JSON.stringify(form))
       // 是否可以处理任务
       this.form.isLook = val
+      this.form.taskId =row.id
       // 负责人
       if (this.form.headId) {
         this.personnelList.queryParams.id = this.form.headId
@@ -247,6 +249,22 @@ export default {
       this.getPermissionPersonnel()
       this.dialogVisible = true
     },
+
+    //提交数据
+    submit() {
+      let params = {
+        id: this.form.id,
+        taskId: this.form.taskId,
+        status:this.btn.value
+      }
+      this.$api.submit(params).then(res => {
+        if (res.code == 200) {
+          this.$message.success('任务已处理')
+          this.$emit('isSuccess', '成功')
+          this.handleClose()
+        }
+      })
+    },
     //关闭弹窗
     handleClose() {
       this.form = {
@@ -261,32 +279,6 @@ export default {
       this.personnelList.queryParams.current = 1
       this.personnelList.queryParams.data = []
     },
-    //提交数据
-    submit() {
-      this.$refs.form.validate((valid) => {
-        if (valid) {
-          // 判断文件是否都上传完毕
-          if (this.form.systemFileList && this.form.systemFileList.length > 0) {
-            this.form.fileGuids = []
-            for (let i = 0; i < this.form.systemFileList.length; i++) {
-              if (this.form.systemFileList[i].guid) {
-                this.form.fileGuids.push(this.form.systemFileList[i].guid)
-              } else {
-                this.$message.error('文件未全部上传,请耐心等待')
-                return false
-              }
-            }
-          }
-          this.$api.submit(this.form).then(res => {
-            if (res.code == 200) {
-              this.$message.success('任务已处理')
-              this.handleClose()
-            }
-          })
-        }
-      })
-
-    }
   },
 
 };

+ 18 - 23
src/views/patentMining/components/dialog/handleTask2.vue

@@ -9,10 +9,9 @@
         <el-form-item label="附件(已保存):">
           <el-table class="elTable" :data="tableData" border style="width: 100%"
             header-row-class-name="custom-table-header">
-            <el-table-column prop="fileName" label="文件名称" align="center"></el-table-column>
+            <el-table-column prop="originalName" label="文件名称" align="center"></el-table-column>
             <el-table-column prop="createTime" label="文件上传时间" align="center"> </el-table-column>
-            <el-table-column prop="fileType" label="文件类型" align="center"> </el-table-column>
-            <el-table-column prop="description" label="说明" align="center"> </el-table-column>
+            <el-table-column prop="type" label="文件类型" align="center"> </el-table-column>
             <el-table-column label="操作" align="center" width="140">
               <template slot-scope="scope">
                 <div>
@@ -47,7 +46,7 @@
       </span>
     </el-dialog>
 
-    <examine ref="examine" @taskForm="handleTaskForm"></examine>
+    <examine ref="examine" @taskForm="handleTaskForm" @isHandleSave="isHandleSave"></examine>
   </div>
 </template>
 
@@ -125,10 +124,12 @@ export default {
       let params = {
         taskId: this.row.id
       }
-      this.$api.getAssoTaskFile(params).then(res => {
+      this.$api.getTaskHandleResult(params).then(res => {
         if (res.code == 200) {
-          this.tableData = res.data
+          this.tableData = res.data.systemFileList
         }
+      }).catch(error => {
+        this.tableData=[]
       })
     },
     // 删除文件
@@ -151,7 +152,7 @@ export default {
       this.dialogVisible = false
     },
     // 保存
-    handleSave(type) {
+    async handleSave(type) {
        // 判断文件是否都上传完毕
        if (this.form.systemFileList && this.form.systemFileList.length > 0) {
         this.form.fileGuids = []
@@ -163,33 +164,27 @@ export default {
             return false
           }
         }
-      } else {
-        return false
-      }
+      } 
       this.form.taskId = this.row.id
-      this.$api.addAssoTaskFile(this.form).then(res => {
+      await this.$api.addTaskAuditResult(this.form).then(res => {
         if (res.code == 200) {
           this.$message.success('保存文件成功')
           if (!type) {
             this.handleClose()
-          } 
+          }
         }
       })
     },
+    // 提交审核时有未保存的文件调用保存接口
+    async isHandleSave() {
+      if (this.form.systemFileList && this.form.systemFileList.length > 0) { 
+        await this.handleSave(1)
+      }
+    },
     //提交审核
-    submit() {
+     submit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-          this.handleSave(1)
-          // this.tableData.forEach(item => {
-          //   if (this.form.fileGuids && this.form.fileGuids.length>0) {
-          //     this.form.fileGuids.push(item.fileGuid)
-          //   } else {
-          //     this.form.fileGuids = []
-          //     this.form.fileGuids.push(item.fileGuid)
-          //   }
-            
-          // })
           this.form.projectId = this.row.projectId//项目id
           this.form.id = this.row.id//当前文件分配任务的id
           this.$refs.examine.open(this.form, 5)

+ 13 - 24
src/views/patentMining/components/dialog/uploadFile.vue

@@ -3,36 +3,28 @@
     <el-dialog :title="title" :visible.sync="dialogVisible" width="600px" :before-close="handleClose"
       :close-on-click-modal="false" label-width="300px">
       <el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-ruleForm">
-        <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-switch v-model="form.delivery" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
-        </el-form-item>
-        <el-form-item label="流程:">
+        
+        <el-form-item label="流程:" prop="processId">
           <el-select v-model="form.processId" placeholder="请选择流程" style="width: 100%;">
             <el-option v-for="item in pathOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="发生时间:">
-          <el-date-picker v-model="form.time" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"
-            style="width: 100%;">
-          </el-date-picker>
-        </el-form-item>
-
         <el-form-item label="附件:" prop="delivery">
           <myUpload :file-list="form.systemFileList" @on-change="onchangeFile" @on-remove="onRemove"
-            @on-preview="onPreview" style="height: 180px;" :autoUpload="true"></myUpload>
+            @on-preview="onPreview" style="height: 185px;" :autoUpload="true"></myUpload>
+        </el-form-item>
+        <el-form-item label="最终文件:" prop="ifFinal" style="width: 20px;">
+          <el-switch v-model="form.ifFinal" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
         </el-form-item>
-        <el-form-item label="备注:">
-          <el-input v-model="form.description" type="textarea" placeholder="请输入内容"></el-input>
+        <el-form-item label="说明:">
+          <el-input v-model="form.description"  type="textarea" placeholder="请输入说明内容"></el-input>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button @click="handleClose" size="small">取 消</el-button>
-        <el-button @click="submit" size="small" type="primary">确 定</el-button>
-        <el-button v-if="!form.id" @click="examine" size="small" type="primary">提交审核</el-button>
+        <el-button @click="submit" size="small" type="primary">直接上传</el-button>
+        <el-button v-if="!form.ifFinal && !form.id" @click="examine" size="small" type="primary">提交审核</el-button>
       </span>
     </el-dialog>
 
@@ -56,11 +48,12 @@ export default {
       title: '',
       form: {
         systemFileList: [],
+        ifFinal: false,
       },
       rules: {
-        name: [{ required: true, message: '请输入文件名称', trigger: 'blur' },],
+        processId: [{ required: true, message: '请选择流程', trigger: 'change' },],
       },
-      delivery: '',
+      
     };
   },
   watch: {},
@@ -81,10 +74,6 @@ export default {
       this.$emit('isSuccess', '新增成功')
       this.handleClose()
     },
-    // 切换按钮
-    onChangeFamily(val) {
-      this.btn = val
-    },
     //打开弹窗
     open(row,id) {
       if (row && row.id) {

+ 6 - 7
src/views/patentMining/components/fileMessage.vue

@@ -88,11 +88,6 @@ export default {
       // table栏位信息
       columnList: [
         {
-          name: "文件名称",
-          type: "String",
-          value: "fileName",
-        },
-        {
           name: "文件流程",
           type: "String",
           value: "path",
@@ -100,7 +95,7 @@ export default {
         {
           name: "文件上传人",
           type: "Integer",
-          value: "uploader",
+          value: "createName",
         },
         {
           name: "文件上传时间",
@@ -117,6 +112,11 @@ export default {
           type: "DateTime",
           value: "endFile",
         },
+        {
+          name: "说明",
+          type: "DateTime",
+          value: "description",
+        },
       ],
       // 分页信息
       queryParams: {
@@ -144,7 +144,6 @@ export default {
     // this.columnList = await this.$commonJS.getCustomField('projectTask')
     // 获取栏位
     // this.getColumn()
-    console.log(1);
     this.getList()
   },
   methods: {

+ 74 - 50
src/views/patentMining/components/handleExamine/detailsPage.vue

@@ -27,88 +27,80 @@
               <template slot="label">
                 <i class="el-icon-user"></i> 任务名称
               </template>
-              {{ row.name }}
+              <span v-html="getColumnData(detailsMessage, 'name')"></span>
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label">
                 <i class="el-icon-user"></i> 创建人
               </template>
-              {{ row.name }}
+              <span v-html="getColumnData(detailsMessage, 'createName')"></span>
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label">
                 <i class="el-icon-user"></i> 处理人
               </template>
-              {{ row.name }}
+              <span v-html="getColumnData(detailsMessage, 'handlerName')"></span>
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label">
                 <i class="el-icon-mobile-phone"></i> 所属项目
               </template>
-              {{ row.name }}
+              <span v-html="getColumnData(detailsMessage, 'projectName')"></span>
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label">
                 <i class="el-icon-location-outline"></i> 所属流程
               </template>
-              {{ row.taskPath }}
+              {{ pathOptions.filter(item => { return item.value == detailsMessage.processId })[0].label}}
             </el-descriptions-item>
             <el-descriptions-item>
               <template slot="label">
                 <i class="el-icon-tickets"></i> 截止时间
               </template>
-              {{ row.endTime }}
+              <span v-html="getColumnData(detailsMessage, 'deadLineTime')"></span>
             </el-descriptions-item>
           </el-descriptions>
         </div>
         <div class="fileTable">
           <el-table :data="tableData" border>
-            <el-table-column prop="name" label="文件名称" align="center"></el-table-column>
-            <el-table-column prop="name" label="上传人" align="center"></el-table-column>
-            <el-table-column prop="time" label="上传时间" align="center"> </el-table-column>
+            <el-table-column prop="originalName" label="文件名称" align="center"></el-table-column>
+            <el-table-column prop="createName" label="上传人" align="center"></el-table-column>
+            <el-table-column prop="createTime" label="上传时间" align="center"> </el-table-column>
             <el-table-column prop="type" label="文件类型" align="center"> </el-table-column>
             <el-table-column label="操作" align="center" width="120px">
               <template slot-scope="scope">
                 <el-button type="text" @click="handleCommand(1, scope.row)">预览</el-button>
                 <el-button type="text" @click="handleCommand(2, scope.row)">下载</el-button>
-                <!-- <div>
-                  <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)"
-                    @click="handleQuote(scope.row)">
-                    <span>引 用</span>
-                    <el-dropdown-menu slot="dropdown">
-                      <el-dropdown-item command="1">预览</el-dropdown-item>
-                      <el-dropdown-item command="2">下载</el-dropdown-item>
-                    </el-dropdown-menu>
-                  </el-dropdown>
-                </div> -->
               </template>
             </el-table-column>
           </el-table>
         </div>
-        <!-- <div class="div_margin">说明:</div>
-        <el-input type="textarea" :rows="3" readonly v-model="row.description"></el-input> -->
 
         <div class="history">
           <p>审核历史:</p>
           <el-timeline :reverse="false" style="padding: 10px 0 0 10px;cursor: pointer;">
             <template>
               <div v-if="timelineList.length > 0">
-                <el-card v-for="item in timelineList" :key="item.id">
-                  <div style="margin-bottom: 5px;">
-                    <span>处理人:</span>
-                  </div>
-                  <div>
-                    <span>说明:</span>
-                    <span>--</span>
-                  </div>
-                </el-card>
+                <el-timeline-item v-for="item in timelineList" :key="item.id" timestamp="" placement="top">
+                  <el-card>
+                    <div style="margin-bottom: 5px;">
+                      <span>处理人:</span>
+                      <span>{{ item.taskHandleResultVO ? item.taskHandleResultVO.createName : '--' }}</span>
+                    </div>
+                    <div>
+                      <span>说明:</span>
+                      <span>{{ item.taskHandleResultVO ? item.taskHandleResultVO.description : '--' }}</span>
+                    </div>
+                  </el-card>
+                </el-timeline-item>
+
               </div>
               <div v-else>
-                <el-card>
-                  <div>
+                <el-timeline-item timestamp="2018/4/12" placement="top">
+                  <el-card>
                     <span>暂无数据</span>
-                  </div>
-                </el-card>
+                  </el-card>
+                </el-timeline-item>
               </div>
             </template>
 
@@ -122,20 +114,16 @@
 
 <script>
 import { downLoad2 } from "@/utils"
+import { optionsData } from '../mixins/index2'
 export default {
+  mixins: [optionsData],
   props: ['row'],
   data() {
     return {
       // 分配任务详情
       detailsMessage: {},
       //文件
-      tableData: [
-        {
-          name: '创新文件',
-          time: '2023-10-8',
-          type: 'excel',
-        }
-      ],
+      tableData: [],
       //审核历史
       timelineList: [],
     }
@@ -146,8 +134,9 @@ export default {
     this.getDetails()
   },
   methods: {
+    // 点击左侧图标回到指定位置
     handleTarget(val) {
-      let dom=''
+      let dom = ''
       switch (val) {
         case 1:
           dom = '.message'
@@ -182,20 +171,20 @@ export default {
       }
       this.$api.queryAuditHistory(params).then(res => {
         if (res.code == 200) {
-          this.detailsMessage = res.data
-          this.tableData = res.data
-          this.timelineList = res.data.projectTaskVOS//审查历史
+          this.detailsMessage = res.data.projectTaskVO//分配任务信息
+          this.tableData = res.data.systemFileList//文件
+          this.timelineList = res.data.auditHistoryVOS.splice(0, res.data.auditHistoryVOS.length - 1)//审查历史
         }
       })
     },
     // 下拉菜单等处理
     handleCommand(ev, row) {
       switch (ev) {
-        case '1'://预览
+        case 1://预览
           this.preview(row)
           break;
-        case '2'://下载
-          this.downloads()
+        case 2://下载
+          this.downloads(row)
           break;
 
         default:
@@ -203,9 +192,44 @@ export default {
       }
     },
     // 预览
-    preview(data) { },
+    preview(data) {
+      let guid = data.guid
+      var item = JSON.parse(JSON.stringify(data))
+
+      var arr = ['png', 'jpeg', 'bmp', 'jpg']
+      if (arr.includes(item.type)) {
+        var FileUrl = this.$commonJS.checkViewer(guid)
+        var isPicture = 1
+      } else {
+        let http = '139.224.24.90'
+        var url = this.$commonJS.checkViewer(guid)
+        // var FileUrl = `http://${this.$c.hostname}:8012/onlinePreview?url=`+ btoa(encodeURIComponent(this.$commonJS.checkViewer(guid)+ '&fullfilename=test.'+item.type))
+        var FileUrl = `http://${http}:8012/onlinePreview?url=`+ btoa(encodeURIComponent(url + '&fullfilename=test.'+item.type))
+        var isPicture = 0
+      }
+      // return
+      const router = this.$router.resolve({
+        path: '/checkFile',
+        query: {
+          row: JSON.stringify(item),
+          FileUrl: FileUrl,
+          isPicture: isPicture
+        }
+      })
+      window.open(router.href, '_blank');
+    },
     // 下载
-    downloads(data){},
+    downloads(data) {
+      downLoad2(data.guid)
+    },
+    // 处理数据
+    getColumnData(data, key) {
+      if (data && data[key]) {
+        return data[key]
+      } else {
+        return '--'
+      }
+    },
   },
 }
 </script>

+ 37 - 21
src/views/patentMining/components/handleExamine/handleExamine.vue

@@ -7,28 +7,36 @@
 
         <detailsPage :row="row"></detailsPage>
 
-        
+
       </div>
       <div slot="right" style="height: 100%;width:100%;padding: 20px 10px 0 10px;">
         <div>审核:</div>
         <el-divider></el-divider>
         <template>
-          <div :disabled="row.disabled">
-            <el-form :model="form" status-icon ref="form" label-width="120px" class="demo-ruleForm">
+          <div >
+            <el-form :model="form" status-icon ref="form" label-width="120px" class="demo-ruleForm" :disabled="row.disabled">
               <el-row>
                 <el-col :span="24">
                   <el-form-item label="审核附件:">
                     <myUpload :file-list="form.systemFileList" @on-change="onchangeFile" @on-remove="onRemove"
-                      style="height: 180px;" :autoUpload="true" @on-dblclick="handleOndblclick" @on-preview="onPreview"></myUpload>
+                      style="height: 185px;" :autoUpload="true" @on-dblclick="handleOndblclick"></myUpload>
                   </el-form-item>
                 </el-col>
               </el-row>
               <el-row>
                 <el-col :span="12">
+                  <el-form-item label="是否返回修改:">
+                    <el-switch v-model="form.ifBack" active-color="#13ce66" inactive-color="#ff4949">
+                    </el-switch>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row v-if="!form.ifBack">
+                <el-col :span="12">
                   <el-form-item label="下一个审核人:">
-                    <el-autocomplete v-model="form.handlerName" value-key="name" v-SelectLazyLoading="personnelLoad"
+                    <el-autocomplete v-model="form.nextAuditorName" value-key="name" v-SelectLazyLoading="personnelLoad"
                       :fetch-suggestions="querySearchPersonnel" placeholder="请输入审核人(外部审核人请直接输入邮箱)"
-                      :trigger-on-focus="false" @select="handleSelectPersonnel" @blur="handleBlur(form.handlerName)"
+                      :trigger-on-focus="false" @select="handleSelectPersonnel" @blur="handleBlur(form.nextAuditorName)"
                       style="width: 100%;"></el-autocomplete>
                   </el-form-item>
                 </el-col>
@@ -40,14 +48,7 @@
                   </el-form-item>
                 </el-col>
               </el-row>
-              <el-row>
-                <el-col :span="12">
-                  <el-form-item label="是否返回修改:">
-                    <el-switch v-model="form.ifSearch" active-color="#13ce66" inactive-color="#ff4949">
-                    </el-switch>
-                  </el-form-item>
-                </el-col>
-              </el-row>
+
               <el-row>
                 <el-col :span="24">
                   <el-form-item label="审核意见:">
@@ -86,9 +87,8 @@ export default {
   data() {
     return {
       form: {
-        systemFileList: [{name:'创新点流程'}],//文件数组
-        description: '',//审核意见
-        ifSearch: false,//是否返回修改
+        systemFileList: [],//文件数组
+        ifBack: false,//是否返回修改
       },
     }
   },
@@ -100,6 +100,16 @@ export default {
     handleOndblclick(file) {
 
     },
+    // 人员输入框失焦
+    handleBlur(val) {
+      if (this.form.nextAuditorName.includes('@')) {
+        this.form.nextAuditor = val
+      }
+    },
+    // 人员输入框选择
+    handleSelectPersonnel(val) {
+      this.form.nextAuditor=val.id
+    },
     // 审核确认
     sure() {
       // 判断文件是否都上传完毕
@@ -113,12 +123,18 @@ export default {
             return false
           }
         }
-      } else {
-        return false
+      } 
+      if (this.form.nextAuditor) {
+        if (this.form.nextAuditor.includes('@')) {//是邮箱为false
+          this.form.ifInner = false
+        } else {//是内部人员是id为true
+          this.form.ifInner = true
+        }
       }
       let params = {
-        type:5,//任务的类型,5任务审核任务
-        assoTaskId : this.row.id,//当前任务的id
+        type: 5,//任务的类型,5任务审核任务
+        taskId: this.row.id,//当前任务的id
+        lastTaskId: this.row.id,//上一级任务的id
         ...this.form,
       }
       this.$api.addTaskAuditResult(params).then(res => {

+ 22 - 5
src/views/patentMining/components/mixins/index2.js

@@ -8,7 +8,7 @@ export const column = {
         2: '文件分配任务',
         3: '文件审核任务',
       },
-      // table栏位信息
+      // 任务列表table栏位信息
       columnList: [
         {
           name: "任务名称",
@@ -48,9 +48,27 @@ export const column = {
         {
           name: "备注",
           type: "String",
-          value: "status",
+          value: "description",
         },
       ],
+      // 审核历史table栏位信息
+      columnList2: [
+        {
+          name: "处理人",
+          type: "String",
+          value: "createName",
+        },
+        {
+          name: "时间",
+          type: "String",
+          value: "createTime",
+        },
+        {
+          name: "结果",
+          type: "String",
+          value: "description",
+        },
+      ]
     }
   },
   mounted() {
@@ -64,8 +82,8 @@ export const column = {
       if (!data) {
         return '--'
       }
-      
-      if (data.constructor == 'Array') {
+
+      if (Array.isArray(data)) {
         if (data.length == 0) {
           return '--'
         }
@@ -74,7 +92,6 @@ export const column = {
         })
         return arr.join('、')
       } else {
-        // console.log(type[data]);
         return type[data]
       }
     },

+ 1 - 1
src/views/patentMining/components/viewIndex.vue

@@ -60,7 +60,7 @@ export default {
     addAndEditProject,
     fields,
     mergeTable,
-    commonCard
+    commonCard,
   },
   props: {
     isOperate: '',

+ 88 - 40
src/views/task/components/table.vue

@@ -41,13 +41,16 @@
               <div>
                 <el-dropdown split-button type="primary" size="small" @command="handleCommand($event, scope.row)"
                   @click="handleTask(scope.row)">
-                  <span v-if="scope.row.status == '3' || scope.row.handlerName != userinfo.name">查 看</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">编 辑</el-dropdown-item>
-                    <el-dropdown-item command="3" v-if="[6].includes(scope.row.type)">完 成</el-dropdown-item>
-                    <el-dropdown-item command="2" divided style="color: red;">删 除</el-dropdown-item>
+                    <el-dropdown-item command="4" v-if="scope.row.status != 3 || scope.row.createName == userinfo.name">编
+                      辑</el-dropdown-item>
+                    <el-dropdown-item command="3" v-if="[6].includes(scope.row.type) && scope.row.status==2">完 成</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>
                   </el-dropdown-menu>
                 </el-dropdown>
               </div>
@@ -65,7 +68,7 @@
 
     <auditRecords ref="auditRecords"></auditRecords>
     <createTask ref="createTaskDialog" :id="id" @isCreate="isCreate"></createTask>
-    <handleTask1 ref="handleTask1Dialog"></handleTask1>
+    <handleTask1 ref="handleTask1Dialog" @isSuccess="isSuccess"></handleTask1>
     <handleTask2 ref="handleTask2Dialog" @isSuccess="isSuccess"></handleTask2>
   </div>
 </template>
@@ -196,6 +199,18 @@ export default {
     this.getList()
   },
   methods: {
+    // 创建分配任务成功
+    isCreate(val) {
+      if (val) {
+        this.getList()
+      }
+    },
+    // 分配任务审核任务新增成功
+    isSuccess(val) {
+      if (val) {
+        this.getList()
+      }
+    },
     // 请求数据
     getList() {
       let searchOption = {
@@ -229,13 +244,13 @@ export default {
     handleCommand(ev, row) {
       switch (ev) {
         case '1'://查看审核记录
-          this.$refs.auditRecords.open(row.id)
+          this.$refs.auditRecords.open(row)
           break;
-        case '2'://删除任务
-          this.deleteTask(row)
+        case '2'://取消任务//发起人和审核人可以取消任务,外部人员不能取消任务
+          this.finishClose(row, 5)
           break;
         case '3'://完成任务
-          this.finish(row)
+          this.finishClose(row, 3)
           break;
         case '4'://编辑任务
           this.handleEdit(row)
@@ -249,38 +264,49 @@ export default {
     handleEdit(row) {
       this.$refs.createTaskDialog.open(row)
     },
-    // 完成任务
-    finish(row) {
+    // 取消/完成任务
+    finishClose(row, status) {
+      this.finishCloses([row.id], status)
+    },
+    finishCloses(ids, status) {
       let params = {
-        id : row.id
+        ids: ids,
+        status: status
       }
-      this.$api.status(params).then(res => {
-        if (res.code == 200) {
-          this.$message.success('任务已置为完成')
-          // this.getList()
-        }
-      })
-    },
-    // 删除任务
-    deleteTask(row) {
-      this.deleteTasks([row.id])
-    },
-    deleteTasks(ids) {
-      this.$api.dele(ids).then(response => {
-        if (response.code == 200) {
-          this.$message.success('删除成功')
-          this.queryParams.current = 1
-          this.getList()
-        }
-      })
+      var str =''
+      if (status == 3) {
+        str = '此操作会将任务置为完成,操作不可逆, 是否继续?'
+      } else if (status == 5) {
+        str = '此操作会将任务置为取消,操作不可逆, 是否继续?'
+      }
+      this.$confirm(str, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$api.status(params).then(response => {
+          if (response.code == 200) {
+            if (status == 3) {
+              this.$message.success('完成任务成功')
+            } else if (status == 5) {
+              this.$message.success('取消任务成功')
+            }
+            this.queryParams.current = 1
+            this.getList()
+          }
+        })
+      }).catch(() => {
+        this.$message.info('操作已取消')
+      });
+
     },
     //处理任务 
     handleTask(row) {
-      if (row.status == 3 || row.handlerName != this.userinfo.name) {// 负责人不是自己
+      if (row.status != 2 || row.handlerName != this.userinfo.name) {// 负责人不是自己
         this.handleTypeTask2(row)
       } else {
         // if (row.status != 3) {/
-          this.handleTypeTask(row)
+        this.handleTypeTask(row)
         // }
       }
 
@@ -312,10 +338,10 @@ export default {
     handleTypeTask(row) {
       switch (row.type) {
         case 1://项目开卷审核任务
-          this.getPatentMining(2)
+          this.getPatentMining(row,2)
           break;
         case 5://任务审核任务
-          row.disabled=false
+          row.disabled = false
           let router = this.$router.resolve({
             path: '/handleExamine',
             query: {
@@ -325,7 +351,7 @@ export default {
           window.open(router.href, '_blank')
           break;
         case 6://文件分配任务
-          row.projectId=this.id//项目id
+          row.projectId = this.id//项目id
           this.$refs.handleTask2Dialog.open(row, true)
           break;
 
@@ -337,10 +363,10 @@ export default {
     handleTypeTask2(row) {
       switch (row.type) {
         case 1://项目开卷审核任务
-          this.getPatentMining(1)
+          this.getPatentMining(row,1)
           break;
         case 5://任务审核任务
-          row.disabled=true
+          row.disabled = true
           let router = this.$router.resolve({
             path: '/handleExamine',
             query: {
@@ -361,12 +387,12 @@ export default {
     getPatentMining(val) {
       let params = {
         current: 1,
-        size:10,
+        size: 10,
         searchQuery: `id=${this.id}`,//检索条件
       }
       this.$api.queryPatentDigProject(params).then(res => {
         if (res.code == 200) {
-          this.$refs.handleTask1Dialog.open(res.data.data[0], val)
+          this.$refs.handleTask1Dialog.open(res.data.data[0],row, val)
         }
       })
     },
@@ -414,8 +440,30 @@ export default {
             type: 'type',
           })
 
+          var obj = this.searchFiled.find(item => { return item.label == '任务状态' })
+          if (obj) {
+            obj.options = []
+            for (let key in this.taskStatus) {
+              obj.options.push({
+                label: this.taskStatus[key],
+                value: key
+              })
+            }
+          }
+          var obj2 = this.searchFiled.find(item => { return item.label == '任务类型' })
+          if (obj) {
+            obj2.options = []
+            for (let key in this.taskType) {
+              obj2.options.push({
+                label: this.taskType[key],
+                value: key
+              })
+            }
+          }
+
         }
       })
+
       // this.showView = false
       // this.$nextTick(() => {
       //   this.showView = true