diff --git a/src/pages/workbench/fwgl/approveWorkspace.vue b/src/pages/workbench/fwgl/approveWorkspace.vue index 8d251cdafd7fb5d9cf778fb94890c367e88955bc..676fe745b15939cc5932566d9a6993a92bac1e16 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 86864adecf0239304b285cd2a16c606e64d19857..c1f3c6f0230457972710b02b3c4a5f48cb42aa68 100644 --- a/src/pages/workbench/fwgl/fwglList.vue +++ b/src/pages/workbench/fwgl/fwglList.vue @@ -2037,6 +2037,7 @@ export default {