From 3e08487a6c9c8f84fc33cf2126da59501afcad9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Mon, 28 Jun 2021 17:06:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A1=A8=E5=8D=95=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/action_button/index.vue | 18 ++++-- src/components/popconfirm_delete/index.vue | 21 +++++-- src/components/table/index.vue | 18 ++++-- src/pages/system/view/menu/MenuManagement.vue | 13 +--- src/pages/system/view/role/RoleManagement.vue | 4 +- src/pages/system/view/task/form.vue | 42 +++++++++++++ src/pages/system/view/task/index.vue | 60 +++++++++++-------- 7 files changed, 124 insertions(+), 52 deletions(-) create mode 100644 src/pages/system/view/task/form.vue diff --git a/src/components/action_button/index.vue b/src/components/action_button/index.vue index 2506dc1..be2be56 100644 --- a/src/components/action_button/index.vue +++ b/src/components/action_button/index.vue @@ -3,9 +3,11 @@ {{ btn.label }} @@ -15,9 +17,17 @@ ... diff --git a/src/components/popconfirm_delete/index.vue b/src/components/popconfirm_delete/index.vue index 29c3a85..89b6993 100644 --- a/src/components/popconfirm_delete/index.vue +++ b/src/components/popconfirm_delete/index.vue @@ -1,6 +1,6 @@ @@ -19,10 +19,23 @@ export default { type: String, default: '确认是否删除', }, + onOk: { + type: Function, + default: EMPTY_FUN, + }, + label: { + type: String, + default: '删除', + }, }, methods: { - async onOk() { - await delReq(this.url); + async confirm() { + if (this.url) { + await delReq(this.url); + } + if (this.onOk) { + await this.onOk(); + } this?.cb(); }, }, diff --git a/src/components/table/index.vue b/src/components/table/index.vue index b59ace3..892ab92 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -46,11 +46,15 @@ - - - 取消 - 确认 - + @@ -94,6 +98,7 @@ export default { display: 'flex', flexDirection: 'column', }, + noFooter: false, }; }, watch: { @@ -144,7 +149,7 @@ export default { } this.submitLoading = false; }, - show({ type, title } = {}) { + show({ type, title, noFooter } = {}) { if (type === 0) { this.title = '新增'; } @@ -157,6 +162,7 @@ export default { if (title) { this.title = title; } + this.noFooter = noFooter; this.addVisible = true; }, }, diff --git a/src/pages/system/view/menu/MenuManagement.vue b/src/pages/system/view/menu/MenuManagement.vue index f7a269a..867c1cd 100644 --- a/src/pages/system/view/menu/MenuManagement.vue +++ b/src/pages/system/view/menu/MenuManagement.vue @@ -7,7 +7,7 @@ noPage ref="table" > -