Explorar el Código

批量删除测试

seyason hace 2 años
padre
commit
20301d5ead
Se han modificado 1 ficheros con 33 adiciones y 0 borrados
  1. 33 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

+ 33 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -1419,6 +1419,39 @@ a {
                     })
                 })
             },
+            batchDelete(){
+                if(this.checkedProjectArr.length == 0){
+                    this.$message('请选择项目')
+                    return
+                }
+                let proArr = []
+                for(let i=0;i<this.checkedProjectArr.length;i++){
+                    proArr.push(this.checkedProjectArr[i].id)
+                    // proArr += this.checkedProjectArr[i].id + ','
+                }
+                // proArr = proArr.substring(0,proArr.length - 1)
+                this.http.post('/project/batchDeleteProject',{
+                    projectIdArray: JSON.stringify(proArr)
+                },res => {
+                    if(res.code == 'ok'){
+                        this.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        })
+                        this.getList()
+                    }else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
+                    }
+                },err => {
+                    this.$message({
+                        message: err,
+                        type: 'error'
+                    })
+                })
+            },
 
             // 批量添加项目参与人
             addProPreson(){