From a74d4041546d88d888ac55e3a8bfae1729827cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E6=99=8F=E5=BD=AD?= <995457985@qq.com> Date: Wed, 8 Mar 2023 18:08:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86=E8=BF=98?= =?UTF-8?q?=E6=B2=A1=E6=90=9E=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 3 + src/api/modules/jxjview.ts | 30 +- src/assets/json/dynamicRouter.json | 5 +- src/components/DialogForm/index.vue | 16 +- src/views/jxjview/menumanage/index.vue | 423 +++++++++++++++++++++++++ 5 files changed, 472 insertions(+), 5 deletions(-) create mode 100644 src/views/jxjview/menumanage/index.vue diff --git a/src/api/index.ts b/src/api/index.ts index 52bac8a..b84bc37 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -51,6 +51,8 @@ class RequestHttp { this.service.interceptors.response.use( (response: AxiosResponse) => { const { data } = response; + console.log(data); + const globalStore = GlobalStore(); // * 在请求结束后,并关闭请求 loading tryHideFullScreenLoading(); @@ -59,6 +61,7 @@ class RequestHttp { ElMessage.error(data.msg); globalStore.setToken(""); router.replace(LOGIN_URL); + debugger; return Promise.reject(data); } // * 全局错误信息拦截(防止下载文件得时候返回数据流,没有code,直接报错) diff --git a/src/api/modules/jxjview.ts b/src/api/modules/jxjview.ts index d93168c..bc45e6a 100644 --- a/src/api/modules/jxjview.ts +++ b/src/api/modules/jxjview.ts @@ -88,8 +88,36 @@ export const addApp = (params: FormData) => { export const editApp = (params: { id: string }) => { return http.post(PORT1 + `/xmgl/appVersion/edit`, params); }; - // 文件下载 export const exportApp = (params: User.ReqUserParams) => { return http.download(PORT1 + `/xmgl/file/download`, params); }; + +// 菜单管理 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +export const getMenuList = (params: User.ReqUserParams) => { + return http.post>(PORT1 + `/xmgl/baseModule/page`, params); +}; +// * 新增用户 +export const addMenu = (params: FormData) => { + return http.post(PORT1 + `/xmgl/baseModule/add`, params); +}; +// 添加系统菜单信息 +export const addMenubase = (params: FormData) => { + return http.post(PORT1 + `/xmgl/baseMenu/add`, params); +}; +// * 编辑用户 +export const editMenu = (params: { id: string }) => { + return http.post(PORT1 + `/xmgl/baseModule/edit`, params); +}; +// * 编辑用户 +export const editMenubase = (params: { id: string }) => { + return http.post(PORT1 + `/xmgl/baseModule/edit`, params); +}; +// 最外层的删除 +export const deleteMunu = (params: { id: number }) => { + return http.post(PORT1 + `/xmgl/baseModule/delete`, params); +}; +// 菜单管理的表格查询 +export const menuList = (params: { moduleId: string }) => { + return http.post>(PORT1 + `/xmgl/baseMenu/list`, params); +}; diff --git a/src/assets/json/dynamicRouter.json b/src/assets/json/dynamicRouter.json index cd6cd9b..011acaa 100644 --- a/src/assets/json/dynamicRouter.json +++ b/src/assets/json/dynamicRouter.json @@ -16,8 +16,9 @@ } }, { - "path": "/system", - + "path": "/menumanage", + "name": "menumanage", + "component": "/jxjview/menumanage/index", "meta": { "icon": "Tools", "title": "菜单管理", diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index 9e6e99a..2e555b5 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -10,9 +10,21 @@ - + + +