Browse Source

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

dukai 3 years ago
parent
commit
42842a3daf
2 changed files with 13 additions and 96 deletions
  1. 6 91
      src/assets/styles/common.scss
  2. 7 5
      src/layout/components/Sidebar.vue

+ 6 - 91
src/assets/styles/common.scss

@@ -1,93 +1,8 @@
-//页面容器
-.page-container {
-	width: 100%;
-	height: calc(100vh - 50px);
-	overflow: auto;
-	display: flex;
-	flex-direction: column;
-	background-color: #f0f2f5;
-	// 条件选择、搜索容器
-	.search-container {
-		width: 100%;
-		background-color: #fff;
-		padding: 10px 10px;
-		box-sizing: border-box;
-		margin-top: 7px;
-	}
-	//主要内容容器
-	.content-container {
-		width: 100%;
-		flex-grow: 1;
-		display: flex;
-		margin-top: 7px;
-		.main {
-			width: calc(100% - 287px);
-			height: 100%;
-			padding: 10px 10px;
-			box-sizing: border-box;
-			background-color: #fff;
-			.table-nav {
-				display: flex;
-				justify-content: space-between;
-				.tags {
-					display: flex;
-					.tag {
-						width: 90px;
-						height: 40px;
-						text-align: center;
-						line-height: 40px;
-						font-size: 14px;
-						border-top: 1px solid #dfe6ec;
-						border-left: 1px solid #dfe6ec;
-						cursor: pointer;
-						&:first-child {
-							border-top-left-radius: 5px;
-						}
-						&:last-child {
-							border-right: 1px solid #dfe6ec;
-							border-top-right-radius: 5px;
-						}
-					}
-				}
-			}
-			&:first-child {
-				width: 100%;
-			}
-		}
-	}
+//公用样式文件
+
+//单行页面标题
+.page_title_single {
 }
 }
-.hasTagsView {
-	.page-container {
-		height: calc(100vh - 86px);
-	}
-}
-//消息提示框样式
-.message-style {
-	&.success {
-		background-color: #f0f9eb;
-	}
-	&.warning {
-		background-color: #fdf6ec;
-	}
-	&.info {
-		background-color: #f4f4f4;
-	}
-	&.error {
-		background-color: #fef0f0;
-	}
-	.el-notification__icon {
-		font-size: 30px !important;
-	}
-	.el-notification__group {
-		.el-notification__title {
-			font-size: 14px !important;
-		}
-		.el-notification__content {
-			margin: 0 !important;
-		}
-	}
-}
-//a标签链接样式
-a.linked {
-	color: #1890ff;
+//双行页面标题
+.page_title_double {
 }
 }

+ 7 - 5
src/layout/components/Sidebar.vue

@@ -5,11 +5,13 @@
 			<img v-else src="~@/assets/logo/mini_logo.png" width="30" />
 			<img v-else src="~@/assets/logo/mini_logo.png" width="30" />
 		</div>
 		</div>
 		<div class="sidebar-box">
 		<div class="sidebar-box">
-			<div class="sidebar-box-item" :class="{ active: active == 'index' }" @click="toIndex">
-				<router-link to="/index">风险办公</router-link>
+			<div class="sidebar-box-item" :class="{ active: active == 'index' }" @click="toIndex" :style="{ paddingLeft: sidebar.opened ? '40px' : '20px' }" title="风险办公">
+				<item icon="druid" title="风险办公" v-if="sidebar.opened" />
+				<svg-icon className="druid" iconClass="druid" v-else />
 			</div>
 			</div>
-			<div v-for="item in sidebarRouters" :key="item.path" class="sidebar-box-item" :class="{ active: item.path == active }" @click="toMainMenu(item)">
-				<item :icon="item.icon" :title="item.menuName" />
+			<div v-for="item in sidebarRouters" :key="item.path" class="sidebar-box-item" :class="{ active: item.path == active }" @click="toMainMenu(item)" :title="item.menuName" :style="{ paddingLeft: sidebar.opened ? '40px' : '20px' }">
+				<item :icon="item.icon" :title="item.menuName" v-if="sidebar.opened" />
+				<svg-icon :className="item.icon" :iconClass="item.icon" v-else />
 			</div>
 			</div>
 		</div>
 		</div>
 	</div>
 	</div>
@@ -34,6 +36,7 @@ export default {
 		toIndex() {
 		toIndex() {
 			this.active = 'index'
 			this.active = 'index'
 			sessionStorage.setItem('sidebarActive', 'index')
 			sessionStorage.setItem('sidebarActive', 'index')
+			this.$router.replace('/index')
 		},
 		},
 		toMainMenu(item) {
 		toMainMenu(item) {
 			if (this.$route.query.id == item.menuId) {
 			if (this.$route.query.id == item.menuId) {
@@ -70,7 +73,6 @@ export default {
 		height: 49px;
 		height: 49px;
 		font-size: 16px;
 		font-size: 16px;
 		color: #fff;
 		color: #fff;
-		text-align: center;
 		line-height: 49px;
 		line-height: 49px;
 		cursor: pointer;
 		cursor: pointer;
 		user-select: none;
 		user-select: none;