浏览代码

Merge branch 'master' of http://182.92.174.150:3000/dukai/CZO_Boss

lz 3 年之前
父节点
当前提交
b325e18e31
共有 1 个文件被更改,包括 37 次插入6 次删除
  1. 37 6
      src/views/system/menu/mainMenu.vue

+ 37 - 6
src/views/system/menu/mainMenu.vue

@@ -5,7 +5,9 @@
 				<span class="pr15 pl15" style="font-weight: bold">{{ title }}</span>
 			</div>
 			<div class="GeneralSelectDiv1">
-				<ul class="productsuse inlineblock vm"></ul>
+				<div class="item bg_tool">工具/发送区</div>
+				<div class="item bg_statistics">统计/分析区</div>
+				<div class="item bg_set">设置/编辑区</div>
 			</div>
 			<div class="clearboth"></div>
 		</div>
@@ -32,7 +34,7 @@ export default {
 			//选中的小文档数组
 			// selectDocList: [],
 			//当前菜单路由id
-			routeId: undefined,
+			routeId: undefined
 			// 记录选中顺序
 			// sort: 0
 		}
@@ -56,10 +58,15 @@ export default {
 	methods: {
 		// 获取菜单
 		init(routeId) {
-			// this.docList = this.sidebarRouters.filter((item) => item.menuId == routeId)
-			console.log(this.sidebarRouters)
-		},
-	},
+			if (this.$store.state.permission.routes) {
+				const routes = this.$store.state.permission.routes
+				this.$nextTick(() => {
+					this.docList = routes.filter((item, index, c) => item.parentId == routeId)
+					console.log(this.docList)
+				})
+			}
+		}
+	}
 }
 </script>
 
@@ -88,4 +95,28 @@ export default {
 	min-width: 150px;
 	float: left;
 }
+.GeneralSelectDiv1 {
+	display: flex;
+}
+.item {
+	width: 160px;
+	height: 45px;
+	margin-left: 5px;
+	margin-top: 10px;
+	border-radius: 5px;
+	line-height: 45px;
+	text-align: center;
+	color: #000;
+	font-size: 16px;
+	font-weight: 600;
+}
+.bg_tool {
+	background: #c2e6f2;
+}
+.bg_statistics{
+	background: #c6efcd;
+}
+.bg_set{
+	background: #fcf2d5;
+}
 </style>