From d382a00766747badf68e8d93c7705017ecf835eb Mon Sep 17 00:00:00 2001 From: xuyiming Date: Fri, 10 Jul 2020 11:06:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E8=B5=84=E6=BA=90=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/index.css | 5 +++ src/components/apass-dialog.vue | 35 +++++++++++++++---- src/pages/workbench/fwgl/approveWorkspace.vue | 32 ++++++++++++++--- .../fwgl/organizationCloudResource.vue | 35 +++++++++++++++++-- .../workbench/yygl/app_debugger_detail.vue | 1 - 5 files changed, 94 insertions(+), 14 deletions(-) diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 134cd77..be6f7d6 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -541,6 +541,11 @@ width: 620px!important; background-color: #e1e4fb; border-color: #e1e4fb; } +.apass_button .el-button--danger { + color: #fff; + background-color: #e15260; + border-color: #e15260; +} .apass_button .el-button.is-disabled, .apass_button .el-button.is-disabled:focus, .apass_button .el-button.is-disabled:hover { diff --git a/src/components/apass-dialog.vue b/src/components/apass-dialog.vue index e891035..32d0924 100644 --- a/src/components/apass-dialog.vue +++ b/src/components/apass-dialog.vue @@ -24,14 +24,15 @@
"", }, + cancelType: { + type: String, + default: () => "defalut", + }, + cancelHide: { + type: Boolean, + default: () => false, + }, + cancel: { + type: Function, + default: () => null, + }, sunbmitText: { type: String, default: () => "", }, + sunbmitType: { + type: String, + default: () => "primary", + }, submitDisable: { type: Boolean, default: () => false, }, submit: { - type: [Function,String], + type: Function, default: () => null, }, }, @@ -86,12 +103,18 @@ export default { hide() { this.showDialog = false; }, + dialogCancel() { + if (typeof this.cancel === "function") { + this.cancel(); + } + this.$emit("cancel"); + this.hide(); + }, dialogSubmit() { if (typeof this.submit === "function") { this.submit(); - } else { - this.$emit("submit"); } + this.$emit("submit"); this.hide(); }, }, diff --git a/src/pages/workbench/fwgl/approveWorkspace.vue b/src/pages/workbench/fwgl/approveWorkspace.vue index 7209512..6ea43fe 100644 --- a/src/pages/workbench/fwgl/approveWorkspace.vue +++ b/src/pages/workbench/fwgl/approveWorkspace.vue @@ -24,8 +24,11 @@
@@ -49,8 +52,11 @@ export default { listData: [], listTotal: 0, dialogInfo: { - title: "", msg: "", + cancelText: "", + cancelType: "", + cancel: null, + sunbmitText: "", submit: null, }, }), @@ -84,10 +90,28 @@ export default { console.log("detailAction"); }, approveAction(item) { - console.log("approveAction"); + this.dialogInfo.msg = "该工作区域的申请通过还是拒绝?"; + this.dialogInfo.cancelText = "拒绝"; + this.dialogInfo.cancelType = "danger"; + this.dialogInfo.cancel = () => { + console.log("approveAction - false"); + }; + this.dialogInfo.sunbmitText = "通过"; + this.dialogInfo.submit = () => { + console.log("approveAction - true"); + }; + this.showDialog(); }, deleteAction(item) { - console.log("deleteAction"); + this.dialogInfo.msg = "确认要删除这条申请记录吗?"; + this.dialogInfo.cancelText = ""; + this.dialogInfo.cancelType = ""; + this.dialogInfo.cancel = null; + this.dialogInfo.sunbmitText = ""; + this.dialogInfo.submit = () => { + console.log("deleteAction"); + }; + this.showDialog(); }, }, created() { diff --git a/src/pages/workbench/fwgl/organizationCloudResource.vue b/src/pages/workbench/fwgl/organizationCloudResource.vue index 9d1c94e..56fe5d9 100644 --- a/src/pages/workbench/fwgl/organizationCloudResource.vue +++ b/src/pages/workbench/fwgl/organizationCloudResource.vue @@ -53,6 +53,7 @@ ref="dialog" :title="dialogInfo.title" :msg="dialogInfo.msg" + :cancel-hide="dialogInfo.cancelHide" :submit="dialogInfo.submit" > @@ -78,8 +79,8 @@ export default { listTotal: 0, dashboardList: [], dialogInfo: { - title: "", msg: "", + cancelHide: false, submit: null, }, }), @@ -320,7 +321,30 @@ export default { console.log("detailAction"); }, stateAction(item) { - console.log("stateAction"); + this.dialogInfo.msg = "您确认要禁用该工作区域吗?"; + this.dialogInfo.cancelHide = false; + this.dialogInfo.submit = () => { + console.log("deleteAction"); + + setTimeout(() => { + this.dialogInfo.msg = `该工作区域已被禁用,普通用户与组织管理员依旧能查看该工作区域,但无法做任何操作。`; + this.dialogInfo.cancelHide = true; + this.dialogInfo.submit = null; + this.showDialog(); + }, 500); + }; + this.showDialog(); + }, + deleteAction(item) { + this.dialogInfo.msg = ` + 您确认要移除该工作区域吗?
+ 移除操作无法撤销,您还要继续吗? + `; + this.dialogInfo.cancelHide = false; + this.dialogInfo.submit = () => { + console.log("deleteAction"); + }; + this.showDialog(); }, }, created() { @@ -403,7 +427,7 @@ export default { label: "操作", type: "buttons", align: "center", - width: 80, + width: 160, actionList: [ { getLabel(item) { @@ -411,6 +435,11 @@ export default { }, callback: this.stateAction, }, + { + label: "移除", + class: "warn", + callback: this.deleteAction, + }, ], }, ]; diff --git a/src/pages/workbench/yygl/app_debugger_detail.vue b/src/pages/workbench/yygl/app_debugger_detail.vue index 6676751..a2af4e3 100644 --- a/src/pages/workbench/yygl/app_debugger_detail.vue +++ b/src/pages/workbench/yygl/app_debugger_detail.vue @@ -73,7 +73,6 @@ title="下载日志文件" sunbmitText="保存" :submitDisable="download_flag" - submit="file" @submit="save_file" >