diff --git a/src/api/index.js b/src/api/index.js index e5b11052c9eb1333765eb767a7c5677d226f313e..752a13345ff0482410c3a1c8d967e2f1b29f6727 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,4 +1,5 @@ import { request, METHOD } from '@/utils'; +export * from './menu'; export function getUserDetailInfoApi() { return request('/api/v1/detail', METHOD.GET); diff --git a/src/api/menu.js b/src/api/menu.js new file mode 100644 index 0000000000000000000000000000000000000000..9b64f2d3318aea037ee1c8f0ac8fa4e8abef9056 --- /dev/null +++ b/src/api/menu.js @@ -0,0 +1,17 @@ +import { delReq, getReq, postReq } from '@/utils'; + +export function delMenuApi(id) { + return delReq(`/api/v1/menus/${id}`); +} + +export function getMenuDataApi() { + return getReq('/api/v1/menus'); +} + +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 new file mode 100644 index 0000000000000000000000000000000000000000..13da48a4021ae258c5f5686f9c1ba3cdbfd29354 --- /dev/null +++ b/src/components/popconfirm_delete/index.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/components/table/index.vue b/src/components/table/index.vue index c2fca438e877f2b9aa3406f1a34b559fe91cbcc7..f1dcb3b080df26e4e86faec22dbd30ae02924ef2 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -23,7 +23,7 @@ - + @@ -35,9 +35,23 @@ :visible="addVisible" @close="addDrawerClose" v-if="addBtn" - :maskClosable="addBtn.maskClosable" + :maskClosable="!!addBtn.maskClosable" + :closable="false" + :drawerStyle="drawerStyle" + :bodyStyle="bodyStyle" + :width="addBtn.width" + destroyOnClose > - +
+
+ +
+
+ + + 取消 + 确认 + @@ -45,71 +59,6 @@ diff --git a/src/main.js b/src/main.js index 1f68627dd7264abed6b6c044af4411f20ac19ef7..66f11940e77084417f0a9fbbaf602c4959e0d135 100644 --- a/src/main.js +++ b/src/main.js @@ -34,7 +34,7 @@ const store = new Vuex.Store({ Vue.use(Router); const isAsynRount = store.state.settingModule.asyncRoutes; const options = initRouter(isAsynRount); -const router = new Router(options); +const router = new Router({ mode: 'history', ...options }); //装载vue-i18n控件 如果语言优先级 请直接修改这里localeLang和fallbackLang Vue.use(VueI18n); diff --git a/src/pages/system/view/menu/MenuManagement.vue b/src/pages/system/view/menu/MenuManagement.vue index abef894cb16d424cd43da9c9154a55f107e8a767..e123280f8464e1d55907065b7975a30e90ade3e5 100644 --- a/src/pages/system/view/menu/MenuManagement.vue +++ b/src/pages/system/view/menu/MenuManagement.vue @@ -1,25 +1,26 @@