From 90126061fcbdcda82d82b1901bed68a298cac94c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BF=8A?= Date: Sat, 25 Jul 2020 15:31:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../message-management/banner/banner-list.vue | 47 +++++++++++++++---- .../workbench/yygl/deploy_app_detail.vue | 8 +++- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/src/pages/message-management/banner/banner-list.vue b/src/pages/message-management/banner/banner-list.vue index 8cf0e3a..e20bf93 100644 --- a/src/pages/message-management/banner/banner-list.vue +++ b/src/pages/message-management/banner/banner-list.vue @@ -106,6 +106,7 @@ export default { msg: "", submit: null, }, + useItem:'', topFilter: { name: "", state: "", @@ -199,14 +200,14 @@ export default { }, { label: "上架", - callback: this.upAction, + callback: this.upActionBtn, disabledRule(item) { return item.state == 1 || item.state == 3; }, }, { label: "下架", - callback: this.downAction, + callback: this.downActionBtn, disabledRule(item) { return item.state == 2 || item.state == 3; }, @@ -214,7 +215,7 @@ export default { { label: "删除", class: "warn", - callback: this.deleteAction, + callback: this.deleteActionBtn, disabledRule(item) { return item.state == 1; }, @@ -292,10 +293,35 @@ export default { editAction(item) { this.$router.push("/message/banner_edit?id=" + item.serial_num); }, - upAction(item) { + upActionBtn(item){ + this.useItem = item; + this.dialogInfo={ + msg: "是否上架到首页banner区域", + submit: this.upAction, + } + this.$refs.dialog.show(); + }, + deleteActionBtn(item){ + this.useItem = item; + this.dialogInfo={ + msg: "删除后无法撤销,您确定删除吗", + submit: this.deleteAction, + } + this.$refs.dialog.show(); + }, + downActionBtn(item){ + this.useItem = item; + this.dialogInfo={ + msg: "下架后首页banner区域将不再显示", + submit: this.downAction, + } + this.$refs.dialog.show(); + }, + upAction() { + this.$refs.dialog.hide(); this.$http .post("/apaas/service/v3/recommend/manage/banners/up", { - serial_num: item.serial_num, + serial_num: this.useItem.serial_num, }) .then(({ data }) => { if (data.success == 1) { @@ -311,10 +337,11 @@ export default { this.$message.warning("上架失败"); }); }, - downAction(item) { + downAction() { + this.$refs.dialog.hide(); this.$http .post("/apaas/service/v3/recommend/manage/banners/down", { - serial_num: item.serial_num, + serial_num: this.useItem.serial_num, }) .then(({ data }) => { if (data.success == 1) { @@ -330,11 +357,11 @@ export default { this.$message.warning("下架失败"); }); }, - deleteAction(item) { - // console.log(`删除${item.name}`); + deleteAction() { + this.$refs.dialog.hide(); this.$http .post("/apaas/service/v3/recommend/manage/banners/del", [ - item.serial_num, + this.useItem.serial_num, ]) .then(({ data }) => { if (data.success == 1) { diff --git a/src/pages/workbench/yygl/deploy_app_detail.vue b/src/pages/workbench/yygl/deploy_app_detail.vue index 7460fa4..c58aaf0 100644 --- a/src/pages/workbench/yygl/deploy_app_detail.vue +++ b/src/pages/workbench/yygl/deploy_app_detail.vue @@ -171,7 +171,7 @@ - +
多版本回滚