Commit 5291decf by 无尘

fix: 测试 刷新

parent 06d5d0fc
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-10-10 14:44:45 * @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-10-23 10:41:31 * @LastEditTime: 2020-12-01 17:09:04
--> -->
<template> <template>
<div class="enterprise-wrap"> <div class="enterprise-wrap">
...@@ -112,6 +112,11 @@ export default { ...@@ -112,6 +112,11 @@ export default {
} }
// 这里考虑有子级情况,后端接口返回是一个一个的菜单,不是父子级 // 这里考虑有子级情况,后端接口返回是一个一个的菜单,不是父子级
that.appMenuData = await that.treeData(JSON.parse(JSON.stringify(res.result))); that.appMenuData = await that.treeData(JSON.parse(JSON.stringify(res.result)));
// 避免刷新后跳转路由改变
const pathArr = res.result.map(ele => ele.menuUrl).join(',');
if (pathArr.indexOf(that.$route.path) != -1) {
return false;
}
if (that.appMenuData[0] && !!that.appMenuData[0].children && !!that.appMenuData[0].children.length && !!that.appMenuData[0].children[0].children && !!that.appMenuData[0].children[0].children.length) { if (that.appMenuData[0] && !!that.appMenuData[0].children && !!that.appMenuData[0].children.length && !!that.appMenuData[0].children[0].children && !!that.appMenuData[0].children[0].children.length) {
that.$router.push(`${that.appMenuData[0].children[0].children[0].menuUrl}?applicationId=${that.$route.query.applicationId}`); that.$router.push(`${that.appMenuData[0].children[0].children[0].menuUrl}?applicationId=${that.$route.query.applicationId}`);
return false; return false;
......
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