浏览代码

Merge remote-tracking branch 'origin/master'

shiqian 4 年之前
父节点
当前提交
fcd226066a

+ 0 - 2
ruoyi-ui/src/components/DynamicForms/index.vue

@@ -153,8 +153,6 @@
         if (this.formConfig.htmlType == 'checkbox' || this.formConfig.htmlType == 'imageUpload' || this.formConfig.htmlType ==
           'fileUpload') {
           this.config = []
-        }else if (this.formConfig.htmlType == 'select') {
-          this.$set(this.config, this.formConfig.columnName, (this.formConfig.columnValue - 0))
         } else {
           this.$set(this.config, this.formConfig.columnName, (this.formConfig.columnValue || ''))
         }

+ 3 - 3
ruoyi-ui/src/layout/components/Navbar.vue

@@ -5,9 +5,9 @@
     <!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" /> -->
       <!-- <SignNumArr class="SignNumArr"/> -->
 	  <div class="sign_box">
-	    <div class="sign_item" :class="{active: activeMenu.includes((item.path||item.redirect))}"  v-for="item in this.sidebarRouters.filter(res => {
+	    <div class="sign_item" :class="{active: activeMenu.includes((item.path||item.redirect))}"  v-for="(item,index) in this.sidebarRouters.filter(res => {
 	          return res.hidden == false || res.redirect == 'index'
-	        })"
+	        })" :key="index"
 	      @click="tabBtn(item)">
 	      <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
 	      <item v-if="!item.meta" :icon="item.meta && item.meta.icon" :title="'首页'" />
@@ -143,7 +143,7 @@ export default {
 	  }
 	  this.$store.dispatch('TabFn', item.path)
     this.showde = true
-   
+
 	},
 	init() {
 	  const route = this.$route;

+ 4 - 5
ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue

@@ -3,16 +3,14 @@
     <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
       <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
-          <!-- <item :title="onlyOneChild.meta.title" /> -->
           <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
         </el-menu-item>
       </app-link>
     </template>
 
-    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
-      <template slot="title">
+    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body >
+     <template slot="title">
         <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
-        <!-- <item v-if="item.meta" :title="item.meta.title" /> -->
       </template>
       <sidebar-item
         v-for="child in item.children"
@@ -57,7 +55,8 @@ export default {
     return {
     }
   },
-  mounted() {
+  mounted() {
+    // console.log(this.item)
   },
   methods: {
     hasOneShowingChild(children = [], parent) {

+ 32 - 16
ruoyi-ui/src/layout/components/Sidebar/index.vue

@@ -3,8 +3,9 @@
         <logo v-if="showLogo" :collapse="isCollapse" />
         <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
             <el-menu
-                :default-active="activeMenu"
-				:default-openeds="srtw"
+                :default-active="activeMenu"
+                :default-openeds ='[activeMenuT]'
+				        ref="menu"
                 :collapse="isCollapse"
                 :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg"
                 :text-color="settings.sideTheme === 'theme-dark' ? variables.menuText : 'rgba(0,0,0,.65)'"
@@ -12,7 +13,7 @@
                 :active-text-color="settings.theme"
                 :collapse-transition="false"
                 mode="vertical"
-				
+
             >
                 <sidebar-item
                     v-for="(route, index) in handleSide"
@@ -32,18 +33,21 @@ import SidebarItem from "./SidebarItem";
 import variables from "@/assets/styles/variables.scss";
 
 export default {
-	data() {
-	  return {
-	    indexs: 1,
-	    srtw: [0],
-	    showde:true
-	  }
-	},
-    components: { SidebarItem, Logo },
-    mounted() {
+	// data() {
+	//   return {
+	//     indexs: 1,
+	//     srtw: [0],
+	//     showde:true
+	//   }
+	// },
+    components: {
+      SidebarItem, Logo,
+       },
+    mounted() {
       console.log(this.sidebarRouters,this.sidebar,this.settings)
     },
-    computed: {
+    computed: {
+
         ...mapState(["settings"]),
         ...mapGetters(["sidebarRouters", "sidebar","tabIndex"]),
         activeMenu() {
@@ -52,9 +56,16 @@ export default {
             // // if set path, the sidebar will highlight the path you set
             // if (meta.activeMenu) {
             //     return meta.activeMenu;
-            // }
+            // }
+
+          // console.log(this.tabIndex)
 
             return this.tabIndex;
+        },
+        activeMenuT(){
+          let tabshow = {}
+          console.log(this.tabIndex,234)
+         return this.tabIndex
         },
         handleSide() {
           let add = []
@@ -62,7 +73,8 @@ export default {
             if(this.activeMenu.includes(item.path||item.redirect)){
               add.push(item)
             }
-          }
+          }
+          console.log(add)
           return add
         },
         showLogo() {
@@ -73,7 +85,11 @@ export default {
         },
         isCollapse() {
             return !this.sidebar.opened;
-        }
+        },
+        iejgu(){
+          return [0]
+        }
+
     }
 };
 </script>