1
lzhe
2024-04-14 ce13be0bec67641a173e4eb0405b3a2bebda3747
src/views/login/components/passwordForm.vue
@@ -102,11 +102,19 @@
                        clonedItem.children = addComponentToLastLevel(clonedItem.children);  
                     } else {  
                        // 如果没有 children 属性,说明是最后一级,添加 component 对象  
                        clonedItem.component = clonedItem.path.split("/")[1];
                        var len = clonedItem.path.length;
                        if(item.name == "任务调度") {
                           //clonedItem.component = clonedItem.path;   //有component不可以使用iframe
                        }else {
                           clonedItem.component = clonedItem.path.substring(1,len);
                        }
                     } 
                     //console.log(clonedItem.source)
                     clonedItem.meta = {title: clonedItem.name,icon: "el-icon-takeaway-box", type: "menu"}
                     return clonedItem;
                     if(item.name == "任务调度") {
                        clonedItem.meta = {title: clonedItem.name,icon: "el-icon-takeaway-box", type: "iframe"}
                     }else {
                        clonedItem.meta = {title: clonedItem.name,icon: "el-icon-takeaway-box", type: "menu"}
                     }
                     return clonedItem;
                  });  
               }   
               var transformedArray = addComponentToLastLevel(res.data); 
@@ -117,13 +125,26 @@
                  name: "工作台",
                  path: "/dashboard"
               }] 
               // this.$HTTP.get("/api/blade-system/workbench/list?status=1").then(resp=> {
               //    if(resp.data.length) {
               //       console.log(resp.data,resp.data[0].name,333);
                     // resp.data.forEach(item=> {
                     //    item.component = "home";
                     //    item.meta = {title: item.nam, icon: 'el-icon-menu', affix: true};
                     //    item.path = "/dashboard";
                     //    item.parentId = item.id;
                     // })
                     // transformedArray[0].path = "/home";
                     // transformedArray[0].children = resp.data;
               //    }
               // })
               //结束
               var obj = {
                  dashboardGrid: ["welcome", "ver", "time", "progress", "echarts", "about"],
                  menu: transformedArray,
                  permissions: ["list.add", "list.edit", "list.delete", "user.add", "user.edit", "user.delete"]
               }
               console.log(obj.menu)
               console.log(transformedArray,123)
               // this.$API.system.menu.myMenus.get().then(resp=> {
               //    Object.assign({},transformedArray,resp.data.menu);
               //    this.$TOOL.data.set("MENU", obj.menu)
@@ -145,6 +166,6 @@
</script>
<style>
.login-form {margin: 0 auto;margin-top: 46px;width: 354px;}
.inputHeight {height: 60px;line-height: 60px;}
.login-form {margin: 0 auto;margin-top: 46px;width: 294px;}
.inputHeight {height: 40px;line-height: 40px;}
</style>