From 7dd294c58ab622ec8304ca8a458b5df21af06f1c Mon Sep 17 00:00:00 2001 From: maslow Date: Thu, 9 Sep 2021 11:03:50 +0800 Subject: [PATCH] feat(sys): impl delete app api & page --- packages/system-client/src/api/application.js | 13 +++++ .../src/views/application/index.vue | 25 ++++++--- packages/system-server/src/api/application.ts | 4 +- packages/system-server/src/api/recycle.ts | 45 ++++++++++++++++ packages/system-server/src/constants/index.ts | 1 + .../src/router/application/index.ts | 5 +- .../src/router/application/remove.ts | 53 +++++++++++++++++++ .../src/router/application/service.ts | 4 +- 8 files changed, 137 insertions(+), 13 deletions(-) create mode 100644 packages/system-server/src/api/recycle.ts create mode 100644 packages/system-server/src/router/application/remove.ts diff --git a/packages/system-client/src/api/application.js b/packages/system-client/src/api/application.js index afd1791240..25d90dbe63 100644 --- a/packages/system-client/src/api/application.js +++ b/packages/system-client/src/api/application.js @@ -82,6 +82,19 @@ export async function updateApplication(appid, { name }) { return res } +/** + * 删除(释放)应用 + * @param {*} appid + * @returns + */ +export async function removeApplication(appid) { + const res = await request({ + url: `/apps/${appid}`, + method: 'delete' + }) + return res +} + /** * 添加协作成员 * @param {member_id, roles} diff --git a/packages/system-client/src/views/application/index.vue b/packages/system-client/src/views/application/index.vue index 6d8298e4da..3c732231e9 100644 --- a/packages/system-client/src/views/application/index.vue +++ b/packages/system-client/src/views/application/index.vue @@ -51,14 +51,14 @@ - -