|
@@ -668,24 +668,18 @@ onMounted(() => {
|
|
|
isCommonsBanner: false,
|
|
|
};
|
|
|
});
|
|
|
- sidebarRoutersCopy.value = proxy.handleTree(res.data, "menuId");
|
|
|
- if (sidebarRoutersCopy.value && sidebarRoutersCopy.value.length > 0) {
|
|
|
- // openLeftBaner(sidebarRoutersCopy.value[0], 0);
|
|
|
- }
|
|
|
- //循环删除 i.status != 0 || i.visible != 0 的元素
|
|
|
- sidebarRoutersCopy.value.map((item) => {
|
|
|
- if (item.children) {
|
|
|
- item.children.map((j) => {
|
|
|
- if (j.children) {
|
|
|
- j.children.map((n) => {
|
|
|
- if (n.status != 0 || n.visible != 0 || n.type != 1) {
|
|
|
- j.children.splice(j.children.indexOf(n), 1);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+ let newArr = [];
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ const menu = res.data[i];
|
|
|
+ if (menu.status == "0" && menu.visible == "0" && menu.type == 1) {
|
|
|
+ newArr.push(menu);
|
|
|
}
|
|
|
- });
|
|
|
+ }
|
|
|
+ sidebarRoutersCopy.value = proxy.handleTree(newArr, "menuId");
|
|
|
+ // if (sidebarRoutersCopy.value && sidebarRoutersCopy.value.length > 0) {
|
|
|
+ // openLeftBaner(sidebarRoutersCopy.value[0], 0);
|
|
|
+ // }
|
|
|
});
|
|
|
getCollectData();
|
|
|
proxy.get("/statistics/workStatistics").then((res) => {
|