💄菜单管理ui优化
This commit is contained in:
parent
001a61ce8e
commit
cd3a90c8f3
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||||||
// 查询菜单列表
|
// 查询菜单列表
|
||||||
export function listMenu(query) {
|
export function listMenu(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/menu/list',
|
url: '/system/menu/treelist',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
|||||||
@ -50,11 +50,7 @@
|
|||||||
ref="listRef"
|
ref="listRef"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:column-config="{ resizable: true }"
|
:column-config="{ resizable: true }"
|
||||||
:tree-config="{
|
:tree-config="{}"
|
||||||
transform: true,
|
|
||||||
rowField: 'menuId',
|
|
||||||
parentField: 'parentId'
|
|
||||||
}"
|
|
||||||
:scroll-y="{ enabled: true, gt: 20 }"
|
:scroll-y="{ enabled: true, gt: 20 }"
|
||||||
:data="menuList">
|
:data="menuList">
|
||||||
<vxe-column field="menuName" :title="$t('m.menuName')" tree-node width="160"> </vxe-column>
|
<vxe-column field="menuName" :title="$t('m.menuName')" tree-node width="160"> </vxe-column>
|
||||||
@ -337,12 +333,9 @@ const title = ref('')
|
|||||||
const menuOptions = ref([])
|
const menuOptions = ref([])
|
||||||
const menuQueryOptions = ref([])
|
const menuQueryOptions = ref([])
|
||||||
const isExpandAll = ref(false)
|
const isExpandAll = ref(false)
|
||||||
const refreshTable = ref(true)
|
|
||||||
const showChooseIcon = ref(false)
|
|
||||||
const iconSelectRef = ref(null)
|
const iconSelectRef = ref(null)
|
||||||
const menuRef = ref(null)
|
const menuRef = ref(null)
|
||||||
const listRef = ref(null)
|
const listRef = ref(null)
|
||||||
const loadNodeMap = new Map()
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -545,27 +538,10 @@ function handleChangeSort(info) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// ******************自定义编辑 end **********************
|
// ******************自定义编辑 end **********************
|
||||||
// const loadMenu = (row, treeNode, resolve) => {
|
|
||||||
// listMenuById(row.menuId).then((res) => {
|
|
||||||
// loadNodeMap.set(row.menuId, { row, treeNode, resolve })
|
|
||||||
// resolve(res.data)
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// 刷新懒加载后的数据
|
// 刷新懒加载后的数据
|
||||||
function refreshMenu(pid) {
|
function refreshMenu(pid) {
|
||||||
loading.value = true
|
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()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user