| | |
| | | for (var i in this.multipleDelete) { |
| | | std.push(this.multipleDelete[i].id); |
| | | } |
| | | const res = await dataLoader_deleteMetas({ ids: std.toString() }) |
| | | if (res.code != 200) { |
| | | this.$message.error('删除失败'); |
| | | } else { |
| | | this.$confirm('此操作将永久删除所选内容, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const data =await dataLoader_deleteMetas({ ids: std.toString() }) |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: "删除成功!", |
| | | type: "success", |
| | | }); |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.getAllWareTable(); |
| | | } else { |
| | | this.$message({ |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | message: '删除成功', |
| | | type: 'success' |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.getAllWareTable(); |
| | | } |
| | | }); |
| | | |
| | | // const res = await dataLoader_deleteMetas({ ids: std.toString() }) |
| | | // if (res.code != 200) { |
| | | // this.$message.error('删除失败'); |
| | | // } else { |
| | | // this.$message({ |
| | | // message: '删除成功', |
| | | // type: 'success' |
| | | // }); |
| | | // this.listData.pageIndex = 1; |
| | | // this.listData.pageSize = 10; |
| | | // this.getAllWareTable(); |
| | | // } |
| | | }, |
| | | handleDelteChange(val) { |
| | | this.multipleDelete = val; |
| | |
| | | async setFileDelete() { |
| | | this.handlerLoading(true); |
| | | var data = JSON.stringify(this.multipleSelection); |
| | | const res = await dataUploadDeleteFiles(data); |
| | | if (res.code != 200) { |
| | | this.$message.error('删除失败'); |
| | | this.handlerLoading(false); |
| | | return; |
| | | } |
| | | this.getFileLength(); |
| | | this.handlerLoading(false); |
| | | this.$confirm('此操作将永久删除所选内容, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const data =await dataUploadDeleteFiles(data); |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: "删除成功!", |
| | | type: "success", |
| | | }); |
| | | this.getFileLength(); |
| | | this.handlerLoading(false); |
| | | } else { |
| | | this.$message({ |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | this.handlerLoading(false); |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }); |
| | | }); |
| | | // const res = await dataUploadDeleteFiles(data); |
| | | // if (res.code != 200) { |
| | | // this.$message.error('删除失败'); |
| | | // this.handlerLoading(false); |
| | | // return; |
| | | // } |
| | | // this.getFileLength(); |
| | | // this.handlerLoading(false); |
| | | |
| | | |
| | | |