瀏覽代碼

修改农业可视化页面标头和链接跳转问题

wang_xy 2 年之前
父節點
當前提交
fce9793c0b
共有 2 個文件被更改,包括 25 次插入16 次删除
  1. 10 1
      src/components/v-fastmenu.vue
  2. 15 15
      src/components/v-header.vue

+ 10 - 1
src/components/v-fastmenu.vue

@@ -22,7 +22,7 @@
 						<el-button type="primary" size="small" @click="resetPwd">修改密码</el-button>
 						<el-button type="warning" size="small" @click="logout">退出登录</el-button>
 					</div>
-					<a href="https://117.78.49.164:15001/index58" style="border-top: 1px solid #334780;"><i class="el-icon-s-home"></i>返回首页</a>
+					<a @click="backToMainPage" style="border-top: 1px solid #334780;"><i class="el-icon-s-home"></i>返回首页</a>
 <!--					<a href="#"><i class="el-icon-monitor"></i>管理系统</a>-->
 				</div>
 				<div slot="reference" style="text-align: center; width:4rem;height:3rem;">
@@ -69,6 +69,15 @@ import { getUserProfile } from "@/api/system/user";
       this.getUser()
     },
 		methods: {
+      backToMainPage(){
+        let href = window.location.href
+        let protacal = href.substr(0,href.indexOf("://")+3)
+        let mo = href.lastIndexOf(":") > 6  ? href.lastIndexOf(":") : href.lastIndexOf("/")
+        let ip = href.substr(href.indexOf("://")+3,mo);
+        let url =href.substr(0,mo)
+        let toUrl = url +":15001/index58"
+        window.location.href = toUrl
+      },
       getUser(){
         getUserProfile().then(response => {
           this.nickName=response.data.nickName

+ 15 - 15
src/components/v-header.vue

@@ -5,11 +5,11 @@
 		<!--中间LOGO -->
 		<a class="title" href="/integrated/index" >
 			<!-- <img src="@/assets/images/integrated/bigdata-header-nav-left2.png" /> -->
-			<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />四平市态势感知平台 {{titlename}}
+			<h3><img class="logo" src="@/assets/images/integrated/logo-small.png" />通榆县乡村振兴监管平台 {{titlename}}
 			</h3>
 			<!-- <img src="@/assets/images/integrated/bigdata-header-nav-right2.png" /> -->
 		</a>
-		
+
 		<!--中间导航-->
 		<div class="bignav">
 			<img src="@/assets/images/integrated/bigdata-header-nav-left.png" />
@@ -32,14 +32,14 @@
 		components:{
 			VfastMenu,
 			Clock
-			
+
 		},
 		created(){
 			this.navbar
 		},
 		data(){
 			return{
-				
+
 			}
 		},
 		methods:{
@@ -53,7 +53,7 @@
 				return constantRoutes.slice(1)
 			},
 		},
-		
+
 	}
 </script>
 
@@ -70,13 +70,13 @@
 		z-index: 1000;
 		position: absolute;
 		top: 0;
-	
+
 		.title {
 			display: flex;
 			position: fixed;
 			left: 50%;
 			transform: translateX(-50%);
-	
+
 			h3 {
 				display: flex;
 				align-items: center;
@@ -84,13 +84,13 @@
 				color: $white;
 				font-size: 1.8rem;
 				font-family: $fontFk;
-	
+
 				img {
 					margin-right: .5rem;
 				}
 			}
 		}
-	
+
 		.bignav {
 			height: 40px;
 			position: fixed;
@@ -102,14 +102,14 @@
 			display: flex;
 			justify-content: cetner;
 			align-items: center;
-	
+
 			.bignav-list {
 				background: url(../assets/images/integrated/bigdata-header-nav-re.png) repeat-x center;
 				float: left;
 				display: flex;
 				justify-content: cetner;
 				align-items: center;
-				color: $fListTitle;	
+				color: $fListTitle;
 				height: 40px;
 				font-size: 12px;
 				padding: 0 23px;
@@ -118,7 +118,7 @@
 				transform: translateY(0);
 				transition: all 0.3s ease-in-out;
 			}
-	
+
 			.router-link-active,
 			.bignav-list:hover {
 				filter: brightness(2.3);
@@ -127,9 +127,9 @@
 				color: $inBlueHover;
 				border-bottom: 1px solid $inBlueHover;
 				transition: all 0.3s ease-in-out;
-	
+
 			}
 		}
-	
+
 	}
-</style>
+</style>