|
@@ -160,8 +160,17 @@ const handleMenu = () => {
|
|
|
openKeys.value = preOpenKeys.value;
|
|
openKeys.value = preOpenKeys.value;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ // 配置是否显示下半部分
|
|
|
|
|
+ function setShowBottomPart(code: string): boolean {
|
|
|
|
|
+ // 显示下半部分 这里保存的是市场对应的 code
|
|
|
|
|
+ const show = [
|
|
|
|
|
+ 'outaccount_status', // 仓单贸易
|
|
|
|
|
+ ];
|
|
|
|
|
+ return show.includes(code);
|
|
|
|
|
+ }
|
|
|
function menuClick(value: any) {
|
|
function menuClick(value: any) {
|
|
|
|
|
+ console.log('菜单: ', value);
|
|
|
|
|
+ setShowBottomPart(value.key);
|
|
|
router.push({ name: value.key });
|
|
router.push({ name: value.key });
|
|
|
}
|
|
}
|
|
|
// 一级菜单图标
|
|
// 一级菜单图标
|
|
@@ -189,7 +198,7 @@ const handleMenu = () => {
|
|
|
}
|
|
}
|
|
|
return '#' + result;
|
|
return '#' + result;
|
|
|
}
|
|
}
|
|
|
- return { collapsed, selectedKeys, menuList, openKeys, collapse, menuClick, fontIcon };
|
|
|
|
|
|
|
+ return { collapsed, selectedKeys, menuList, openKeys, collapse, menuClick, setShowBottomPart, fontIcon };
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
function testAction() {
|
|
function testAction() {
|
|
@@ -227,14 +236,7 @@ const onSearch = () => {
|
|
|
}
|
|
}
|
|
|
return { search };
|
|
return { search };
|
|
|
};
|
|
};
|
|
|
-// 配置是否显示下半部分
|
|
|
|
|
-function setShowBottomPart(code: string): boolean {
|
|
|
|
|
- // 不显示下半部分 这里保存的是市场对应的 code
|
|
|
|
|
- const unShow = [
|
|
|
|
|
- 'outaccount_status', // 仓单贸易
|
|
|
|
|
- ];
|
|
|
|
|
- return unShow.includes(code);
|
|
|
|
|
-}
|
|
|
|
|
|
|
+
|
|
|
// 控制消息弹窗
|
|
// 控制消息弹窗
|
|
|
function controlNotice() {
|
|
function controlNotice() {
|
|
|
const { openAction } = openModal('notice');
|
|
const { openAction } = openModal('notice');
|
|
@@ -250,7 +252,7 @@ export default defineComponent({
|
|
|
Drawer,
|
|
Drawer,
|
|
|
},
|
|
},
|
|
|
setup(props, context) {
|
|
setup(props, context) {
|
|
|
- const { collapsed, selectedKeys, openKeys, menuList, collapse, menuClick, fontIcon } = handleMenu();
|
|
|
|
|
|
|
+ const { collapsed, selectedKeys, openKeys, menuList, collapse, menuClick, setShowBottomPart, fontIcon } = handleMenu();
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
// 控制消息弹窗
|
|
// 控制消息弹窗
|
|
|
const { openNotice } = controlNotice();
|
|
const { openNotice } = controlNotice();
|
|
@@ -272,8 +274,12 @@ export default defineComponent({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const code = list[firstIndex].children[secondeIndex].code;
|
|
const code = list[firstIndex].children[secondeIndex].code;
|
|
|
- selectedKeys.value = [code];
|
|
|
|
|
- openKeys.value = [list[firstIndex].code];
|
|
|
|
|
|
|
+ selectedKeys.value.length = 0;
|
|
|
|
|
+ selectedKeys.value.push(code);
|
|
|
|
|
+ openKeys.value.length = 0;
|
|
|
|
|
+ openKeys.value.push(list[firstIndex].code);
|
|
|
|
|
+ // selectedKeys.value = [code];
|
|
|
|
|
+ // openKeys.value = [list[firstIndex].code];
|
|
|
context.emit('chooseMenu', setShowBottomPart(code));
|
|
context.emit('chooseMenu', setShowBottomPart(code));
|
|
|
// 处理页面刷新时候 引发路由乱跳的bug
|
|
// 处理页面刷新时候 引发路由乱跳的bug
|
|
|
if (router.currentRoute.value.fullPath === '/home') {
|
|
if (router.currentRoute.value.fullPath === '/home') {
|