| | |
| | | }, |
| | | handleCascader(e,label){ |
| | | this.upData[label] = e; |
| | | } |
| | | }, |
| | | // 批量删除 |
| | | batchDelete(){ |
| | | if(this.multipleSelection&&this.multipleSelection.length>0){ |
| | | // this.delUrl |
| | | this.$confirm('是否删除选中的数据?', "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.delUrl, { |
| | | id: this.multipleSelection.map(item => item.id).join(',') |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('删除成功') |
| | | this.selectList() |
| | | }).catch(e => { |
| | | this.$message.error('删除失败') |
| | | }) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | this.$message.error('请选择要删除的数据') |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |