diff --git a/src/api/menu.js b/src/api/menu.js index 2fbd36ca11a954d6eed626faf1aa5f40f270ded2..9b64f2d3318aea037ee1c8f0ac8fa4e8abef9056 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -11,3 +11,7 @@ export function getMenuDataApi() { export function addMenuApi(data) { return postReq('/api/v1/menus', data); } + +export function addRoleApi(data) { + return postReq('/api/v1/roles', data); +} diff --git a/src/components/menu_tree/index.vue b/src/components/menu_tree/index.vue new file mode 100644 index 0000000000000000000000000000000000000000..269625f776a5e369914ff0f0e3433e23645744e7 --- /dev/null +++ b/src/components/menu_tree/index.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/components/popconfirm_delete/index.vue b/src/components/popconfirm_delete/index.vue index 0704f53f0c1bf0f862be693ce0a241324ced4153..13da48a4021ae258c5f5686f9c1ba3cdbfd29354 100644 --- a/src/components/popconfirm_delete/index.vue +++ b/src/components/popconfirm_delete/index.vue @@ -1,19 +1,26 @@ diff --git a/src/components/table/index.vue b/src/components/table/index.vue index 13d0db7b14be1950a807ef922a2992c5d19e0686..f1dcb3b080df26e4e86faec22dbd30ae02924ef2 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -124,6 +124,7 @@ export default { this.submitLoading = true; try { await this.addBtn?.onOk(); + this.getData(); } catch (error) { // todo } @@ -133,9 +134,6 @@ export default { showAdd() { this.addVisible = true; }, - refresh() { - this.getData(); - }, }, }; diff --git a/src/pages/system/view/menu/MenuManagement.vue b/src/pages/system/view/menu/MenuManagement.vue index ee18afc648b45d6ad5927a8045bc22b6a4aa4176..e123280f8464e1d55907065b7975a30e90ade3e5 100644 --- a/src/pages/system/view/menu/MenuManagement.vue +++ b/src/pages/system/view/menu/MenuManagement.vue @@ -7,12 +7,6 @@ noPage ref="table" > - - @@ -44,9 +38,8 @@ export default { text: '新建', title: '菜单配置', width: 400, - async onOk() { - await vm.$refs['addForm']?.submit(); - vm.refreshTable(); + onOk() { + return vm.$refs['addForm']?.submit(); }, }, sortOrder: 'ascend', @@ -57,7 +50,7 @@ export default { methods: { formatData: convertListToTree, refreshTable() { - this.$refs['table'].refresh(); + this.$refs['table'].getData(); }, async delMenu(id) { await delMenuApi(id); diff --git a/src/pages/system/view/menu/form.vue b/src/pages/system/view/menu/form.vue index bd41841db831e143bc28ac01a1e553081a42afbd..414341eaf0fad95cf7fd454e56abb5ae7158d9d8 100644 --- a/src/pages/system/view/menu/form.vue +++ b/src/pages/system/view/menu/form.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/system/view/role/form.vue b/src/pages/system/view/role/form.vue new file mode 100644 index 0000000000000000000000000000000000000000..41b3a61f1d2433d586d26f4deec9e9fedc866862 --- /dev/null +++ b/src/pages/system/view/role/form.vue @@ -0,0 +1,51 @@ + + +