From e799d297c489cd7aa9f92374a68cf174cd61e94f Mon Sep 17 00:00:00 2001 From: ruibaby Date: Sat, 27 Apr 2019 19:18:12 +0800 Subject: [PATCH] Refactor menu table. --- src/api/menu.js | 7 +++++++ src/views/interface/MenuList.vue | 2 +- src/views/system/OptionForm.vue | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/api/menu.js b/src/api/menu.js index fe30df96..b1b0acbc 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -11,6 +11,13 @@ menuApi.listAll = () => { }) } +menuApi.listTree = () => { + return service({ + url: `${baseUrl}/tree_view`, + method: 'get' + }) +} + menuApi.create = menu => { return service({ url: baseUrl, diff --git a/src/views/interface/MenuList.vue b/src/views/interface/MenuList.vue index cae220a4..8a5d8110 100644 --- a/src/views/interface/MenuList.vue +++ b/src/views/interface/MenuList.vue @@ -175,7 +175,7 @@ export default { methods: { loadMenus() { this.loading = true - menuApi.listAll().then(response => { + menuApi.listTree().then(response => { this.menus = response.data.data this.loading = false }) diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 4bcc1d80..ad5e4f2f 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -335,7 +335,7 @@ label="操作员密码:" :wrapper-col="wrapperCol" > - +