diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 134cd773556d5f9613b865c5f0ba14c3a31d8036..be6f7d6d1db5b5ed55aec21239bc274833130ae4 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 e891035379e4eb1fe3d70efbb1098cfc3ec188b5..32d092470fd6cc708819a4e3e68a8b55983e92dd 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 7209512088435c66d727b9b2b526b62d4ef20e95..6ea43fe0644fbe333c0b889dfa01ba6fa5af0127 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 9d1c94ed491a71476a99b12abdcd2ab475ea9596..56fe5d9be2e00819d02d4482ea68b193ad33c9b6 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 6676751a7478053c1d1b397481b113f266cf7ff1..a2af4e3237440f3f2f4756dec8c21cdb958992ad 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" >