From cd3a90c8f323fa810537e5f97ab967e61761af11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Tue, 26 Sep 2023 18:29:19 +0800 Subject: [PATCH] =?UTF-8?q?:lipstick:=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86u?= =?UTF-8?q?i=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/menu.js | 2 +- src/views/system/menu/index.vue | 28 ++-------------------------- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/src/api/system/menu.js b/src/api/system/menu.js index 47d3ab1..8c6a619 100644 --- a/src/api/system/menu.js +++ b/src/api/system/menu.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 查询菜单列表 export function listMenu(query) { return request({ - url: '/system/menu/list', + url: '/system/menu/treelist', method: 'get', params: query }) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 2d00d03..7c972fb 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -50,11 +50,7 @@ ref="listRef" :loading="loading" :column-config="{ resizable: true }" - :tree-config="{ - transform: true, - rowField: 'menuId', - parentField: 'parentId' - }" + :tree-config="{}" :scroll-y="{ enabled: true, gt: 20 }" :data="menuList"> @@ -337,12 +333,9 @@ const title = ref('') const menuOptions = ref([]) const menuQueryOptions = ref([]) const isExpandAll = ref(false) -const refreshTable = ref(true) -const showChooseIcon = ref(false) const iconSelectRef = ref(null) const menuRef = ref(null) const listRef = ref(null) -const loadNodeMap = new Map() const state = reactive({ form: {}, queryParams: { @@ -545,27 +538,10 @@ function handleChangeSort(info) { }) } // ******************自定义编辑 end ********************** -// const loadMenu = (row, treeNode, resolve) => { -// listMenuById(row.menuId).then((res) => { -// loadNodeMap.set(row.menuId, { row, treeNode, resolve }) -// resolve(res.data) -// }) -// } // 刷新懒加载后的数据 function refreshMenu(pid) { loading.value = true - // console.log(loadNodeMap) - // if (loadNodeMap.size > 0) { - // const hasNode = loadNodeMap.has(pid) - // if (hasNode) { - // const { row, treeNode, resolve } = loadNodeMap.get(pid) - // proxy.$refs.listRef.store.states.lazyTreeNodeMap[pid] = [] - // loadMenu(row, treeNode, resolve) - // } - // loading.value = false - // } else { - // getList() - // } + getList() }