Browse Source

更新按钮状态

sujunling 2 years ago
parent
commit
35de8b9de6

+ 1 - 1
.env.development

@@ -52,6 +52,6 @@ VITE_GLOB_CONTENT_SECURITY_POLICY = false
 # Alarm Notify Polling Interval Time
 VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME = 500000
 #二三维一体化
-VITE_GLOB_LIGONG_ADMIN = http://localhost:8084/#/
+VITE_GLOB_LIGONG_ADMIN = http://localhost:8085/#/
 # Alarm Notify Auto Close Time Unit is Second
 VITE_GLOB_ALARM_NOTIFY_DURATION = 5

+ 17 - 1
src/api/twoAndThree/menu.ts

@@ -4,7 +4,7 @@ import { useUserStore } from '/@/store/modules/user';
 import { RoleEnum } from '/@/enums/roleEnum';
 
 enum Api {
-  BaseMenuUrl = '/menu',
+  UpdateMenu = '/xld-2And3/updateMenu',
   GetMenuList = '/xld-2And3/findAllMenu',
   SysAdminMenuList = '/admin/me/menus',
   GetMenuIdsByRoleId = '/menu/get_ids/',
@@ -35,6 +35,22 @@ export const getMenuList = () => {
   }
 };
 
+/**
+ * @description: 跟新按钮状态
+ */
+export function saveMenuApi(params, mode = 'modal') {
+  console.log(params);
+  return defHttp.post({
+    url: Api.UpdateMenu,
+    ...locationType,
+    data: {
+      id: `'${params.id}'`,
+      menu: JSON.stringify(params)
+    },
+  }, { errorMessageMode: mode });
+}
+
+
 export const delMenu = (menuIds: string[]) => {
   const url = Api.BaseMenuUrl;
   return defHttp.delete({ url: url, data: menuIds });

+ 2 - 2
src/views/systemAdmin/system/mapTools/menus/MenuDrawer.vue

@@ -17,9 +17,9 @@
   import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
 
   // 加载菜单
-  import { getMenuList } from '/@/api/sys/menu';
+  import { getMenuList } from '/@/api/twoAndThree/menu';
 
-  import { saveMenuApi } from '/@/api/system/menu';
+  import { saveMenuApi } from '/@/api/twoAndThree/menu';
   import { listToTree } from '/@/utils/menuUtil';
 
   import { useI18n } from '/@/hooks/web/useI18n';