element 表格多选删除

/**
         * 删除
         */
        toDleteFillBalance(){
            
            if (this.multipleSelection.length===0) {
                // this.$alert('请选择要删除的数据','提示',)
                this.$alert('请选择要删除的数据', '提示', {
                    confirmButtonText: '确定',
                    
                })
            }else{
                this.$confirm('确认要删除该数据, 是否继续?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    
                    let val=this.multipleSelection
                    console.log(val);
                    val.forEach((val) => {
                        this.tabledatet.forEach((v,i) => {
                            if (val.flowNo==v.flowNo) {
                                this.tabledatet.splice(i,1)
                            }
                        }
                        )
                    }
                    )
                    this.$message({
                        type: 'success',
                        message: '删除成功!'
                    })
                    // this.$refs.multipleTable.clearSelection()

                    
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消删除'
                    })
                    
                })
            }


        },

 

posted @ 2023-07-26 17:48  小白字太白  阅读(117)  评论(0编辑  收藏  举报