From 8846a01124928ff20b35d01b856566487876a2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Sun, 27 Jun 2021 17:49:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A4=A7=E4=BD=93=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 1 + src/api/menu.js | 13 ++ src/components/popconfirm_delete/index.vue | 19 +++ src/components/table/index.vue | 119 ++++++++---------- src/main.js | 2 +- src/pages/system/view/menu/MenuManagement.vue | 55 ++++++-- src/pages/system/view/menu/form.vue | 96 ++++++++++++++ src/utils/i18nUtil.js | 1 - src/utils/index.js | 10 +- src/utils/requestUtil.js | 25 +++- 10 files changed, 257 insertions(+), 84 deletions(-) create mode 100644 src/api/menu.js create mode 100644 src/components/popconfirm_delete/index.vue create mode 100644 src/pages/system/view/menu/form.vue diff --git a/src/api/index.js b/src/api/index.js index e5b1105..752a133 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 0000000..2fbd36c --- /dev/null +++ b/src/api/menu.js @@ -0,0 +1,13 @@ +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); +} diff --git a/src/components/popconfirm_delete/index.vue b/src/components/popconfirm_delete/index.vue new file mode 100644 index 0000000..0704f53 --- /dev/null +++ b/src/components/popconfirm_delete/index.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/components/table/index.vue b/src/components/table/index.vue index c2fca43..13d0db7 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 1f68627..66f1194 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 abef894..ee18afc 100644 --- a/src/pages/system/view/menu/MenuManagement.vue +++ b/src/pages/system/view/menu/MenuManagement.vue @@ -1,25 +1,32 @@