Commit f7bb1988 authored by 涂伟's avatar 涂伟

fix: '运维菜单功能路径筛选逻辑bug修复'

parent c1e04927
Pipeline #90385 passed with stages
...@@ -24,8 +24,8 @@ const TreeSelect = (props, ref) => { ...@@ -24,8 +24,8 @@ const TreeSelect = (props, ref) => {
console.log(tree, 'fadsfasd'); console.log(tree, 'fadsfasd');
setTreeList(tree); setTreeList(tree);
setMenuWebList( setMenuWebList(
res.data.map(item => { res.data.map((item,index) => {
let obj = { ...item, path: `${item.path}` }; let obj = { ...item, path: `${item.path}`, index };
if (item.code === code) { if (item.code === code) {
setCurrentMenuParmar(obj); setCurrentMenuParmar(obj);
initCurrentMenu(obj); initCurrentMenu(obj);
...@@ -85,7 +85,7 @@ const TreeSelect = (props, ref) => { ...@@ -85,7 +85,7 @@ const TreeSelect = (props, ref) => {
icon: <FolderFilled />, icon: <FolderFilled />,
disabled: true, disabled: true,
children: treeList[key][k].map(item => ({ children: treeList[key][k].map(item => ({
key: item.code, key: item.index,
param: item, param: item,
title: ( title: (
<div className={styles.treeLine}> <div className={styles.treeLine}>
...@@ -116,7 +116,6 @@ const TreeSelect = (props, ref) => { ...@@ -116,7 +116,6 @@ const TreeSelect = (props, ref) => {
} }
let keys = new Set([]); let keys = new Set([]);
let list = lodash.cloneDeep(menuWebList).filter(item => { let list = lodash.cloneDeep(menuWebList).filter(item => {
console.log(item);
keys.add(item.model); keys.add(item.model);
keys.add(item.moduleName + item.model); keys.add(item.moduleName + item.model);
return item.shortName.includes(val) || item.path?.includes(val) || val?.includes(item.path); return item.shortName.includes(val) || item.path?.includes(val) || val?.includes(item.path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment