修复常用菜单问题
This commit is contained in:
parent
ffd41214f8
commit
f1433ca44c
@ -2942,7 +2942,7 @@ params【字段属性】=值
|
|||||||
|
|
||||||
const regClick = async function () {
|
const regClick = async function () {
|
||||||
const ids = getIds();
|
const ids = getIds();
|
||||||
if (btnConfig.customParams.indexOf('reset') > -1) {
|
if (btnConfig.customParams && btnConfig.customParams.indexOf('reset') > -1) {
|
||||||
clickQuery = guid();
|
clickQuery = guid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -272,8 +272,8 @@ export default {
|
|||||||
const copyMenus = cloneDeep(ret.Menus);
|
const copyMenus = cloneDeep(ret.Menus);
|
||||||
recurseMenu(copyMenus, undefined, flatMenus);
|
recurseMenu(copyMenus, undefined, flatMenus);
|
||||||
ret.Menus = copyMenus;
|
ret.Menus = copyMenus;
|
||||||
const safeFlatMenus = flatMenus.map(m => ({ ID: m.ID, NAME: m.NAME, CODE: m.CODE, MENU_LEVEL: m.MENU_LEVEL, idLevels: m.idLevels, nameLevels: m.nameLevels, menuLevels: m.menuLevels, Nav_MenuForm: m.Nav_MenuForm }));
|
const safeFlatMenus = flatMenus.map(m => ({ ID: m.ID, NAME: m.NAME, CODE: m.CODE, MENU_LEVEL: m.MENU_LEVEL, idLevels: m.idLevels, nameLevels: m.nameLevels, menuLevels: m.menuLevels, Nav_MenuForm: m.Nav_MenuForm, IS_RESIDENT: m.IS_RESIDENT, ICON: m.ICON, IS_BACKEND: m.IS_BACKEND, MineType: m.MineType }));
|
||||||
const pruneMenus = (arr) => arr.map(it => ({ Node: { ID: it.Node.ID, NAME: it.Node.NAME, CODE: it.Node.CODE, MENU_LEVEL: it.Node.MENU_LEVEL, MineType: it.Node.MineType, Nav_MenuForm: it.Node.Nav_MenuForm }, Children: (it.Children && it.Children.length) ? pruneMenus(it.Children) : [] }));
|
const pruneMenus = (arr) => arr.map(it => ({ Node: { ID: it.Node.ID, NAME: it.Node.NAME, CODE: it.Node.CODE, MENU_LEVEL: it.Node.MENU_LEVEL, MineType: it.Node.MineType, Nav_MenuForm: it.Node.Nav_MenuForm, IS_RESIDENT: it.Node.IS_RESIDENT, ICON: it.Node.ICON, IS_BACKEND: it.Node.IS_BACKEND }, Children: (it.Children && it.Children.length) ? pruneMenus(it.Children) : [] }));
|
||||||
const safeMenus = pruneMenus(copyMenus);
|
const safeMenus = pruneMenus(copyMenus);
|
||||||
storage("lacal").setItem("menus", safeMenus);
|
storage("lacal").setItem("menus", safeMenus);
|
||||||
storage("lacal").setItem("flatMenus", safeFlatMenus);
|
storage("lacal").setItem("flatMenus", safeFlatMenus);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user