From c7d0c775d1d65eb3f708dedce836d9a483fb73e5 Mon Sep 17 00:00:00 2001 From: yangzh003 Date: Wed, 22 Mar 2023 16:56:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-admin/src/views/goods/edit.vue | 4 +++ litemall-admin/src/views/goods/list.vue | 28 +++++++++++++++++-- .../src/main/resources/application-db.yml | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/litemall-admin/src/views/goods/edit.vue b/litemall-admin/src/views/goods/edit.vue index a2ccc463..7842711b 100644 --- a/litemall-admin/src/views/goods/edit.vue +++ b/litemall-admin/src/views/goods/edit.vue @@ -4,6 +4,10 @@

商品介绍

+ diff --git a/litemall-admin/src/views/goods/list.vue b/litemall-admin/src/views/goods/list.vue index f6884e03..08dad402 100644 --- a/litemall-admin/src/views/goods/list.vue +++ b/litemall-admin/src/views/goods/list.vue @@ -9,11 +9,11 @@ 查找 添加 导出 + 批量删除 - - + - + @@ -140,6 +140,7 @@ export default { components: { BackToTop, Pagination }, data() { return { + batchDeleteArr: [], thumbnail, toPreview, list: [], @@ -209,6 +210,27 @@ export default { }) }).catch(() => {}) }, + handleSelectionChange(val) { + console.log(val) + this.batchDeleteArr = val + }, + handleDeleteRows() { + this.batchDeleteArr.forEach(row => this.handleDeleteEachRow(row)) + this.getList() + }, + handleDeleteEachRow(row) { + deleteGoods(row).then(response => { + this.$notify.success({ + title: '成功', + message: '删除成功' + }) + }).catch(response => { + this.$notify.error({ + title: '失败', + message: response.data.errmsg + }) + }) + }, handleDownload() { this.downloadLoading = true import('@/vendor/Export2Excel').then(excel => { diff --git a/litemall-db/src/main/resources/application-db.yml b/litemall-db/src/main/resources/application-db.yml index c102c306..9e38797c 100644 --- a/litemall-db/src/main/resources/application-db.yml +++ b/litemall-db/src/main/resources/application-db.yml @@ -28,4 +28,4 @@ spring: enabled: false filter: stat: - enabled: false + enabled: false \ No newline at end of file -- Gitee