From a86f0844fc515dc151732e07896964d7a6bb08a6 Mon Sep 17 00:00:00 2001 From: xuyiming Date: Sat, 11 Jul 2020 18:15:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E8=B5=84=E6=BA=90=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/workbench/fwgl/approveWorkspace.vue | 37 ++++++- src/pages/workbench/fwgl/fwglList.vue | 1 + .../fwgl/organizationCloudResource.vue | 96 ++++++++++++++++--- 3 files changed, 119 insertions(+), 15 deletions(-) diff --git a/src/pages/workbench/fwgl/approveWorkspace.vue b/src/pages/workbench/fwgl/approveWorkspace.vue index 8d251cd..676fe74 100644 --- a/src/pages/workbench/fwgl/approveWorkspace.vue +++ b/src/pages/workbench/fwgl/approveWorkspace.vue @@ -94,15 +94,48 @@ export default { }); }, approveAction(item) { + let action = (type) => { + this.$http + .put("/apaas/service/v3/resource/apply/approve", null, { + params: { + apply_id: item.apply_id, + apply_type: item.apply_type, + cloud_id: item.id, + apply_state: type, + }, + }) + .then(({ data }) => { + if (data.success == 1) { + this.$message({ + message: data.errMsg || `操作成功.`, + type: "success", + }); + this.init(this.tempFilter); + } else { + this.$message({ + message: data.errMsg || "操作失败", + type: "warning", + }); + } + }) + .catch((error) => { + console.log(error); + this.$message({ + message: "操作失败", + type: "warning", + }); + }); + }; + this.dialogInfo.msg = "该工作区域的申请通过还是拒绝?"; this.dialogInfo.cancelText = "拒绝"; this.dialogInfo.cancelType = "danger"; this.dialogInfo.cancel = () => { - console.log("approveAction - false"); + action(-1); }; this.dialogInfo.sunbmitText = "通过"; this.dialogInfo.submit = () => { - console.log("approveAction - true"); + action(1); }; this.showDialog(); }, diff --git a/src/pages/workbench/fwgl/fwglList.vue b/src/pages/workbench/fwgl/fwglList.vue index 86864ad..c1f3c6f 100644 --- a/src/pages/workbench/fwgl/fwglList.vue +++ b/src/pages/workbench/fwgl/fwglList.vue @@ -2037,6 +2037,7 @@ export default {