Browse Source

专利挖掘任务修改

zhuhao 1 year ago
parent
commit
71aacc4edf

+ 46 - 33
src/views/components/dialog/examine.vue

@@ -7,12 +7,10 @@
         <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 label="审核人:" prop="handlerName">
+          <el-autocomplete v-model="form.handlerName" value-key="name" v-SelectLazyLoading="personnelLoad"
+              :fetch-suggestions="querySearchPersonnel" placeholder="请输入审核人(外部审核人请直接输入邮箱)" :trigger-on-focus="false"
+              @select="handleSelectPersonnel" @blur="handleBlur(form.handlerName)" style="width: 100%;"></el-autocomplete>
         </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"
@@ -59,7 +57,7 @@ export default {
       // 任务表单校验
       TaskRules: {
         name: [{ required: true, message: '请输入任务名称', trigger: 'blur' },],
-        handler: [{ required: true, message: '请选择审核人', trigger: 'change' },],
+        handlerName: [{ required: true, message: '请选择审核人', trigger: 'change' },],
         deadLineTime: [{ required: true, validator: isTime, trigger: 'change' }],
       },
       //人员列表懒加载
@@ -69,6 +67,7 @@ export default {
           size: 10
         },
         loading: false,
+        name: '',
         data: [],
       },
       // 父组件form表单数据
@@ -97,7 +96,6 @@ export default {
       this.parentForm = data
       // 任务类型
       this.form.type = type
-      this.getPermissionPersonnel()
     },
     // 确定
     submitTask() {
@@ -113,8 +111,8 @@ export default {
            * 5任务审核任务
            * 6文件分配任务审核
            */
-          
-          if (['@'].includes(this.form.handler)) {//是邮箱为1
+
+          if (this.form.handlerName.includes('@')) {//是邮箱为1
             this.form.handlerType = 1
           } else {//是id为0
             this.form.handlerType = 0
@@ -126,12 +124,12 @@ export default {
           // 区分是哪种审核
           switch (this.form.type) {
             case 1://专利挖掘项目审核
-                this.addProjectOpenExamineTask(params)
+              this.addProjectOpenExamineTask(params)
               break;
             case 6://专利挖掘项目-文件分配任务审核
-                params.projectTaskDTO.projectId = this.parentForm.projectId//项目id
-                params.projectTaskDTO.id = this.parentForm.id//当前任务id
-                this.fileTask(params)
+              params.projectTaskDTO.projectId = this.parentForm.projectId//项目id
+              params.projectTaskDTO.id = this.parentForm.id//当前任务id
+              this.fileTask(params)
               break;
             case 7://专利挖掘项目-文件列表审核任务
 
@@ -174,32 +172,47 @@ export default {
     /**
     * 人员
     */
-    // 人员列表远程搜索
-    remoteMethodPerson(query) {
-      this.personnelList.data = []
-      this.personnelList.queryParams.current = 1
-      this.personnelList.queryParams.name = query
-      this.getPermissionPersonnel()
-    },
-    // 获取所有人员列表懒加载
-    lazyLoadingPerson() {
+    // 懒加载人员方法
+    personnelLoad() {
       if (this.personnelList.queryParams.current * this.personnelList.queryParams.size >= this.personnelList.queryParams.total) {
         return false
       }
-      this.personnelList.queryParams.current += 1
-      this.getPermissionPersonnel()
+      this.personnelList.queryParams.current++
+      this.questionPersonnel()
     },
-    //获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
-    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
+    // 查询人员
+    async questionPersonnel() {
+      let params = {
+        ...this.personnelList.queryParams,
+        name:this.personnelList.name
+      }
+      await this.$api.getPermissionPersonnel(params).then(res => {
+        if (res.code == 200) {
+          this.personnelList.data.push(...res.data)
+          this.personnelList.queryParams.total = res.pageColumn.total
+          this.personnelList.cb(this.personnelList.data);
         }
       })
     },
+    //获取下拉建议人员数据
+    async querySearchPersonnel(queryString, cb) {
+      this.personnelList.queryParams.current = 1
+      this.personnelList.name = queryString
+      this.personnelList.data = []
+      this.personnelList.cb = cb
+      await this.questionPersonnel()
+    },
+    // 人员输入框失焦
+    handleBlur(val) {
+      if (this.form.handlerName.includes('@')) {
+        this.form.handler = val
+      }
+    },
+    // 人员输入框选择
+    handleSelectPersonnel(val) {
+      this.form.handler=val.id
+    },
+
   },
 }
 </script>

+ 30 - 18
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="请输入任务名称"></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%;">
+          <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>
@@ -19,10 +19,6 @@
             <el-option v-for="item in personnelList.data" :key="item.id" :label="item.name" :value="item.id">
             </el-option>
           </el-select>
-          <!-- <el-select v-model="form.handler" placeholder="请选择处理人" style="width: 100%;">
-            <el-option v-for="item in personOptions" :key="item.value" :label="item.label" :value="item.value">
-            </el-option>
-          </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"
@@ -78,17 +74,26 @@ export default {
   mounted() { },
   methods: {
     //打开弹窗
-    open(form) {
-      // this.form = JSON.parse(JSON.stringify(form))
-      // if(this.form.id){
-      //     this.title = '编辑任务'
-      // }else{
-      //     this.title = '创建任务'
-      // }
-      this.title = '创建文件分配任务'
-      this.form.projectId = this.id//项目id
-      this.form.type = 6//分配任务
-      this.form.handlerType = 0//0内部人员1外部人员
+    async open(data) {
+      if (data.type == 6 || data.type == 5) {//文件分配任务//文件分配审核任务
+        if (data.type == 6) {
+          this.title='编辑文件分配任务'
+        } else {
+          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 {//创建分配任务
+        this.title = '创建文件分配任务'
+        this.form.projectId = this.id//项目id
+        this.form.type = 6//分配任务
+        this.form.handlerType = 0//0内部人员1外部人员
+      }
       this.getPermissionPersonnel()
       this.dialogVisible = true
     },
@@ -96,8 +101,15 @@ export default {
     handleClose() {
       this.$refs.form.resetFields()
       this.form = {}
+      this.clear()
       this.dialogVisible = false
     },
+    clear() {
+      this.personnelList.data = []
+      this.personnelList.queryParams.current = 1
+      this.personnelList.queryParams.total=0
+      this.personnelList.queryParams.name = null
+    },
     //提交数据
     submit() {
       this.$refs.form.validate((valid) => {

+ 0 - 4
src/views/patentMining/components/dialog/handleTask1.vue

@@ -72,10 +72,6 @@
                 <el-option v-for="item in personnelList.data" :key="item.id" :label="item.name" :value="item.id">
                 </el-option>
               </el-select>
-              <!-- <el-select v-model="form.value" placeholder="请选择负责人" style="width: 100%;">
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
-              </el-select> -->
             </el-form-item>
           </el-col>
           <el-col :span="12">

+ 57 - 0
src/views/patentMining/components/handleExamine/detailsDialog.vue

@@ -0,0 +1,57 @@
+<template>
+  <div>
+    <el-dialog v-draggable custom-class="checkFile" :title="title" :visible.sync="dialogVisible" width="800px"
+      :before-close="handleClose" :close-on-click-modal="false">
+
+      <detailsPage :row="row" v-on="$listeners"></detailsPage>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleClose" type="primary">关 闭</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import detailsPage from './detailsPage.vue'
+export default {
+  components: {
+    detailsPage,
+  },
+  data() {
+    return {
+      title: '',
+      dialogVisible: false,
+      row: {},
+    }
+  },
+  watch: {
+    dialogVisible(val) {
+      if (val) {
+        this.$nextTick(() => {
+          document.querySelectorAll('.checkFile')[0].parentNode.classList.add('checkFile1')
+        })
+      }
+    }
+  },
+  mounted() {
+
+  },
+  methods: {
+
+    // 打开弹窗
+    open(data) {
+      this.row = data
+      this.title = data.name + '任务'
+      this.dialogVisible = true
+    },
+    // 关闭
+    handleClose() {
+      this.dialogVisible = false
+    },
+  },
+
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 112 - 0
src/views/patentMining/components/handleExamine/detailsPage.vue

@@ -0,0 +1,112 @@
+<template>
+  <div class="detailsPage">
+    <el-descriptions title="" :column="2" size="" border style="margin-bottom: 20px;">
+      <el-descriptions-item>
+        <template slot="label">
+          <i class="el-icon-user"></i> 任务名称
+        </template>
+        {{ row.name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">
+          <i class="el-icon-mobile-phone"></i> 所属项目
+        </template>
+        {{ row.name }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">
+          <i class="el-icon-location-outline"></i> 所属流程
+        </template>
+        {{ row.taskPath }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">
+          <i class="el-icon-tickets"></i> 截止时间
+        </template>
+        {{ row.endTime }}
+      </el-descriptions-item>
+    </el-descriptions>
+    <el-table :data="tableData" border>
+      <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="type" label="文件类型" align="center"> </el-table-column>
+      <el-table-column label="操作" align="center" width="120px">
+        <template slot-scope="scope">
+          <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 class="div_margin">说明:</div>
+    <el-input type="textarea" :rows="3" readonly v-model="row.description"></el-input>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ['row'],
+  data() {
+    return {
+      tableData: [
+        {
+          name: '创新文件',
+          time: '2023-10-8',
+          type: 'excel',
+        }
+      ],//任务详情文件
+    }
+  },
+  watch: {},
+  computed: {},
+  mounted() {
+    // this.getDetails()
+  },
+  methods: {
+    // 获取数据
+    getDetails() {
+      let params = {
+        taskId: row.id
+      }
+      this.$api.query(params).then(res => {
+        if (res.code == 200) {
+          this.activities = res.data.projectTaskVOS//审查历史
+        }
+      })
+    },
+    // 引用
+    handleQuote(row) {
+      this.$emit('quote', row)
+    },
+    // 引用下拉菜单等处理
+    handleCommand(ev, row) {
+      switch (ev) {
+        case '1'://预览
+
+          break;
+        case '2'://下载
+
+          break;
+
+        default:
+          break;
+      }
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.detailsPage {
+  .div_margin {
+    margin: 20px 0 10px 0;
+  }
+}
+</style>

+ 104 - 88
src/views/patentMining/components/handleExamine/handleExamine.vue

@@ -1,97 +1,112 @@
 <template>
-  <div class="handleExamine">
+  <div class="handleExamine height_100">
     <myView style="height: 100%;width: 100%;" position="row">
       <div slot="left" style="height: 100%;width:100%;padding: 20px 10px 0 10px;">
         <div>任务详情:</div>
         <el-divider></el-divider>
-        <el-descriptions title="" :column="2" size="" border style="margin-bottom: 20px;">
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-user"></i> 任务名称
-            </template>
-            {{ row.name }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-mobile-phone"></i> 所属项目
-            </template>
-            {{ row.name }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-location-outline"></i> 所属流程
-            </template>
-            {{ row.taskPath }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-tickets"></i> 截止时间
-            </template>
-            {{ row.endTime }}
-          </el-descriptions-item>
-        </el-descriptions>
+        <el-container style="height: calc(100% - 65px);">
+          <el-aside class="height_100" width="200px">
+            <el-timeline :reverse="false" style="padding: 10px 0 0 10px;cursor: pointer;">
+              <el-timeline-item v-for="(activity, index) in activities" :key="index" :timestamp="activity.timestamp"
+                @click.native="handleTimeline(activity)">
+                <p>{{ activity.content }}</p>
+                <p>{{ activity.name }}</p>
+                <p>{{ activity.timestamps }}</p>
+                
+              </el-timeline-item>
+            </el-timeline>
+          </el-aside>
+          <el-main class="height_100">
 
-        <el-table :data="tableData" border>
-          <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="type" label="文件类型" align="center"> </el-table-column>
-          <el-table-column label="操作" align="center">
-            <template slot-scope="scope">
-              <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 class="div_margin">说明:</div>
-        <el-input type="textarea" :rows="3" readonly v-model="row.description"></el-input>
+            <detailsPage :row="row" @quote="handleQuote"></detailsPage>
+         
+          </el-main>
+        </el-container>
       </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">
-            <myUpload :file-list="form.systemFileList" @on-change="onchangeFile" @on-remove="onRemove" style="height: 180px;"
-              :autoUpload="true"></myUpload>
-    
-            <div class="div_margin">下一个审核人:</div>
-            <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>
-            <div class="div_margin">审核意见:</div>
-            <el-input type="textarea" :rows="3" v-model="form.description" style="margin-bottom: 20px;"></el-input>
-            <el-button type="primary" size="small" @click="sure" style="float: right;">确 认</el-button>
+            <el-form :model="form" status-icon ref="form" label-width="120px" class="demo-ruleForm">
+              <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"></myUpload>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="12">
+                  <el-form-item label="下一个审核人:">
+                    <el-autocomplete v-model="form.handlerName" value-key="name" v-SelectLazyLoading="personnelLoad"
+                      :fetch-suggestions="querySearchPersonnel" placeholder="请输入审核人(外部审核人请直接输入邮箱)"
+                      :trigger-on-focus="false" @select="handleSelectPersonnel" @blur="handleBlur(form.handlerName)"
+                      style="width: 100%;"></el-autocomplete>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="截止时间:">
+                    <el-date-picker v-model="form.deadLineTime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime"
+                      placeholder="选择日期" style="width: 100%;">
+                    </el-date-picker>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="24">
+                  <el-form-item label="审核意见:">
+                    <el-input type="textarea" :rows="3" v-model="form.description"
+                      style="margin-bottom: 20px;"></el-input>
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+
+
+            <div style="float: right;">
+              <el-button type="primary" size="small" @click="finish" style="margin-right: 10px;">完 成</el-button>
+              <el-button type="primary" size="small" @click="sure">确 认</el-button>
+            </div>
+
           </div>
         </template>
       </div>
     </myView>
+
+    <detailsDialog ref="detailsDialog" @quote="handleQuote"></detailsDialog>
   </div>
 </template>
 
 <script>
 import { personnelLoading } from '../mixins/index2'
+import detailsPage from './detailsPage.vue'
+import detailsDialog from './detailsDialog.vue'
 export default {
   mixins: [personnelLoading],
   props: ['row'],
+  components: {
+    detailsPage,
+    detailsDialog,
+  },
   data() {
     return {
-      tableData: [
+      // 审核历史时间线
+      activities: [{
+        content: '任务名称',
+        timestamp: '2018-04-15',
+        timestamps: '创新节点流程',
+        name: '张三',
+      },
         {
-          name: '创新文件',
-          time: '2023-10-8',
-          type: 'excel',
+        content: '通过审核',
+        timestamp: '2018-04-13'
+      }, {
+        content: '创建成功',
+        timestamp: '2018-04-11'
         }
-      ],//任务详情文件
-
+      ],
       nextPersonId: '',//下一个审核人
       personOptions: '',//下一个审核人数组
       form: {
@@ -101,9 +116,29 @@ export default {
     }
   },
   mounted() {
-    this.getPermissionPersonnel()
+    
   },
   methods: {
+    // 子组件引用功能传的文件
+    handleQuote(val) {
+      this.form.systemFileList.push(val)
+    },
+    // 时间线的点击
+    handleTimeline(val) {
+      this.$refs.detailsDialog.open(val)
+    },
+    // 完成
+    finish() {
+      let params = {
+        id: this.row.id
+      }
+      this.$api.status(params).then(res => {
+        if (res.code == 200) {
+
+        }
+      })
+    },
+
     // 审核确认
     sure() {
       // window.open("about:blank", "_top").close()
@@ -154,24 +189,7 @@ export default {
         this.form.systemFileList.splice(index, 1)
       }
     },
-    // 引用
-    handleQuote(row) {
-      this.form.systemFileList.push(row)
-    },
-    // 引用下拉菜单等处理
-    handleCommand(ev, row) {
-      switch (ev) {
-        case '1'://预览
-
-          break;
-        case '2'://下载
-
-          break;
-
-        default:
-          break;
-      }
-    },
+   
   },
 }
 </script>
@@ -191,8 +209,6 @@ export default {
     margin-bottom: 10px;
   }
 
-  .div_margin {
-    margin: 20px 0 10px 0;
-  }
+
 }
 </style>

+ 49 - 3
src/views/patentMining/components/mixins/index2.js

@@ -101,7 +101,53 @@ export const personnelLoading = {
   },
   methods: {
     /**
-      * 人员列表
+    * 人员(输入框形式)
+    */
+    // 懒加载人员方法
+    personnelLoad() {
+      if (this.personnelList.queryParams.current * this.personnelList.queryParams.size >= this.personnelList.queryParams.total) {
+        return false
+      }
+      this.personnelList.queryParams.current++
+      this.questionPersonnel()
+    },
+    // 查询人员
+    async questionPersonnel() {
+      let params = {
+        ...this.personnelList.queryParams,
+        name:this.personnelList.name
+      }
+      await this.$api.getPermissionPersonnel(params).then(res => {
+        if (res.code == 200) {
+          this.personnelList.data.push(...res.data)
+          this.personnelList.queryParams.total = res.pageColumn.total
+          this.personnelList.cb(this.personnelList.data);
+        }
+      })
+    },
+    //获取下拉建议人员数据
+    async querySearchPersonnel(queryString, cb) {
+      this.personnelList.queryParams.current = 1
+      this.personnelList.name = queryString
+      this.personnelList.data = []
+      this.personnelList.cb = cb
+      await this.questionPersonnel()
+    },
+    // 人员输入框失焦
+    handleBlur(val) {
+      if (this.form.handlerName.includes('@')) {
+        this.form.handler = val
+      }
+    },
+    // 人员输入框选择
+    handleSelectPersonnel(val) {
+      this.form.handler=val.id
+    },
+
+
+
+    /**
+      * 人员列表(下拉框形式)
       * @param {*} query 
     */
     // 人员列表远程搜索
@@ -126,9 +172,9 @@ export const personnelLoading = {
         if (response.code == 200) {
           this.personnelList.loading = false;
           if (!type) {
-            if (this.form.headId) {
+            if (this.form.handler) {
               var index = response.data.findIndex(item => {
-                return item.id == this.form.headId
+                return item.id == this.form.handler
               })
               if (index != -1) {
                 response.data.splice(index, 1)

+ 24 - 1
src/views/task/components/table.vue

@@ -45,7 +45,7 @@
                   <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="1" v-if="[3].includes(scope.row.status)">编 辑</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-menu>
@@ -192,6 +192,7 @@ export default {
     this.columnList = await this.$commonJS.getCustomField('projectTask')
     // 获取栏位
     this.getColumn()
+    // 获取数据
     this.getList()
   },
   methods: {
@@ -233,11 +234,33 @@ export default {
         case '2'://删除任务
           this.deleteTask(row)
           break;
+        case '3'://完成任务
+          this.finish(row)
+          break;
+        case '4'://编辑任务
+          this.handleEdit(row)
+          break;
 
         default:
           break;
       }
     },
+    // 编辑任务
+    handleEdit(row) {
+      this.$refs.createTaskDialog.open(row)
+    },
+    // 完成任务
+    finish(row) {
+      let params = {
+        id : row.id
+      }
+      this.$api.status(params).then(res => {
+        if (res.code == 200) {
+          this.$message.success('任务已置为完成')
+          // this.getList()
+        }
+      })
+    },
     // 删除任务
     deleteTask(row) {
       this.deleteTasks([row.id])