You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

639 lines
14 KiB

1 year ago
<template>
<div class="head">
<div class="head-content">
<!-- <div class="head-content-all">
<div class="head-content-left">
<img
src="@/assets/image/logo_shuili.png"
:style="{ width: '59px', height: '61px' }"
alt=""
/>
<span class="head-content-left-text"
>广东省水利建设市场信用信息平台</span
>
1 year ago
</div>
<div class="head-content-right">
<img src="@/assets/image/shuiliting.png" alt="" />
<span class="head-content-right-text">广东省水利厅</span>
1 year ago
</div>
</div> -->
1 year ago
</div>
1 year ago
<div class="menu-content">
<div class="menu-wrap" ref="menuWp">
1 year ago
<hk-menu
:collapse-transition="false"
ref="menu"
:default-active="activeIndex"
class="el-menu-demo"
mode="horizontal"
menu-trigger="click"
@select="handleSelect"
>
1 year ago
<template v-for="(item, index) in menus">
1 year ago
<el-menu-item
v-if="!item.children"
:key="index"
:index="item.path"
:id="item.path"
>
1 year ago
<span class="span4" slot="title">{{ item.name }}</span>
</el-menu-item>
</template>
</hk-menu>
</div>
</div>
<!-- 通知栏 -->
<div v-if="isNoticeShow" class="notice-tips">
<div class="n-wrap">
<img src="@/assets/image/icon/notice.png" alt="">
<span>声明平台中企业档案的信息源于企业自行填报其真实性有效性由企业负责各企业对所填报的信息保密性负责不得含有涉密内容</span>
</div>
</div>
1 year ago
</div>
</template>
<script>
1 year ago
import { loginOut } from "@/api/login";
1 year ago
import hkMenu from "./hkMenu/index.vue";
export default {
props: ["menu", "count"],
1 year ago
components: { hkMenu },
1 year ago
data() {
return {
1 year ago
input: "",
1 year ago
showSubMenu: false,
activeIndex: "",
menus: this.$partten.menus,
1 year ago
subMenus: ["hkdata", "hkknowledge", "service"],
isHome: true,
isNoticeShow: true
1 year ago
};
},
watch: {
$route: {
handler(val, oldval) {
1 year ago
if (val.path == "/home") {
1 year ago
this.isHome = true;
1 year ago
} else {
1 year ago
this.isHome = false;
1 year ago
}
1 year ago
this.activeIndex = val.matched[1].name;
// 判断是否显示通知栏
if (val.path === '/home'
|| val.path === '/summarizedInformation'
|| val.path === '/enterpriseInformation'
|| val.path === '/announcement'
1 month ago
|| val.path === '/policyDoc'
) {
this.isNoticeShow = true
} else {
this.isNoticeShow = false
}
1 year ago
},
// 深度观察监听
deep: true,
1 year ago
immediate: true
1 year ago
}
1 year ago
},
created() {
this.activeIndex = this.$route.matched[1].name;
},
mounted() {
1 year ago
// this.changeStyle();
1 year ago
let menuWp = this.$refs.menuWp;
1 year ago
if (menuWp) {
1 year ago
menuWp.addEventListener("mouseleave", this.handleMenuClose);
1 year ago
}
},
destroyed() {
1 year ago
let menuWp = this.$refs.menuWp;
1 year ago
if (menuWp) {
1 year ago
menuWp.removeEventListener("mouseleave", this.handleMenuClose);
1 year ago
}
},
methods: {
1 year ago
searchEnterpriseName() {
if (this.input) {
this.$router.push({
path: "/enterpriseInformation",
query: {
enterpriseName: this.input
}
});
}
},
1 year ago
handleMenuClose(e) {
1 year ago
this.handleClose();
1 year ago
},
handleClose() {
if (!this.showSubMenu) {
1 year ago
return;
1 year ago
}
1 year ago
this.showSubMenu = false;
this.subMenus.forEach(path => this.$refs.menu.closeMenu(path));
1 year ago
},
//修改首页头部导航二级菜单的位置
1 year ago
changeStyle: function() {
this.$refs.clearFix[0].popperElm.style.marginLeft = "40px";
this.$refs.clearFix[1].popperElm.style.marginLeft = "40px";
this.$refs.clearFix[2].popperElm.style.marginLeft = "40px";
1 year ago
},
handleSelect(key, keyPath) {
1 year ago
if (key == "https://www.zg-learn.com") {
window.open(key, "_black");
this.handleClose();
1 year ago
} else {
this.$router.push("/" + key);
1 year ago
this.$store.commit("SET_QUERY_PARAMS", "");
this.handleClose();
1 year ago
}
},
handleLoginOut() {
loginOut().then(() => {
this.$store.commit("setToken", "");
this.$store.commit("setUserInfo", "");
this.$router.push("/");
});
1 year ago
}
1 year ago
},
filters: {
ellipsis(value) {
if (!value) return "";
if (value.length > 12) {
return value.slice(0, 12) + "...";
}
return value;
1 year ago
}
}
1 year ago
};
</script>
<style lang="less" scoped>
.head {
1 year ago
.head-content {
// padding: 0 375px 0 385px;
// box-sizing: border-box;
// background: url("../assets/image/banner.png");
// background-size: 100% 100%;
// position: relative;
// opacity: 0.3;
// height: 137px;
// background: linear-gradient(
// 180deg,
// rgba(99, 183, 255, 0.3) 0%,
// rgba(255, 255, 255, 0.3) 100%
// );
height: 219px;
// height: 160px;
background: url("~@/assets/image/header/banner.png");
background-size: 100% 100%;
.head-content-all {
height: 137px;
max-width: 1200px;
padding: 0 15px 0 25px;
margin: 0 auto;
display: flex;
justify-content: space-between;
}
.head-content-left {
opacity: 1;
margin: 33px 0 43px 0;
display: flex;
align-items: center;
.head-content-left-text {
font-size: 38px;
color: #045adf;
margin-left: 10px;
font-weight: bold;
// height: 54px;
// line-height: 54px;
}
}
.head-content-right {
opacity: 1;
margin: 43px 0 51px 0;
display: flex;
align-items: center;
.head-content-right-text {
font-size: 28px;
color: #f50000;
margin-left: 6px;
font-weight: bold;
// height: 54px;
// line-height: 54px;
}
}
1 year ago
1 year ago
.bottom-img {
position: absolute;
display: block;
width: 100%;
height: 50px;
bottom: 0;
left: 0;
}
1 year ago
1 year ago
.content-wrap {
width: 1200px;
height: 100%;
margin: 0 auto;
1 year ago
1 year ago
.incorrect-wrap {
float: right;
display: flex;
margin-top: 20px;
1 year ago
1 year ago
.incorrect-item {
display: flex;
align-items: center;
margin-left: 30px;
cursor: pointer;
1 year ago
1 year ago
img {
display: block;
width: 16px;
height: 16px;
}
1 year ago
1 year ago
span {
display: block;
1 year ago
font-size: 14px;
1 year ago
font-weight: 600;
1 year ago
color: #005eb7;
1 year ago
margin-left: 5px;
1 year ago
}
}
1 year ago
}
1 year ago
1 year ago
#clear {
clear: both;
}
1 year ago
1 year ago
.title-search {
margin-top: 30px;
display: flex;
flex-direction: column;
align-items: center;
1 year ago
1 year ago
.title-content {
display: flex;
flex-direction: column;
align-items: center;
1 year ago
1 year ago
img {
display: block;
1 year ago
}
1 year ago
}
1 year ago
1 year ago
.search-content {
margin-top: 10px;
.search-input {
width: 600px;
height: 50px;
/deep/.el-input {
height: 50px;
border-radius: 8px;
.el-input__inner {
height: 50px;
border-radius: 8px 0 0 8px;
1 year ago
border: 1px solid #aad8fb;
1 year ago
}
.el-input__inner::placeholder {
color: #999999;
font-size: 16px;
}
.el-input-group__append {
1 year ago
background: #0059a5;
color: #ffffff;
1 year ago
border-radius: 0 8px 8px 0;
.el-button {
display: flex;
align-items: center;
padding-left: 15px;
padding-right: 15px;
.el-icon-search {
font-size: 20px;
}
span {
display: block;
font-size: 16px;
}
}
}
}
1 year ago
}
1 year ago
.search-word {
display: flex;
margin-top: 15px;
.img-tip {
display: flex;
align-items: center;
img {
display: block;
}
1 year ago
1 year ago
span {
display: block;
font-size: 16px;
color: #333333;
margin-left: 5px;
}
1 year ago
}
1 year ago
.word-wrap {
display: flex;
span {
display: block;
font-size: 16px;
cursor: pointer;
margin-right: 30px;
}
span:nth-child(1) {
1 year ago
color: #de0000;
1 year ago
}
1 year ago
}
}
}
1 year ago
}
}
}
.head-content2 {
height: 80px;
1 year ago
background: linear-gradient(180deg, #63b7ff 0%, #ffffff 100%);
1 year ago
.content2-wrap {
width: 1200px;
height: 100%;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
.content2-right {
display: flex;
.incorrect-item {
display: flex;
align-items: center;
margin-left: 30px;
cursor: pointer;
img {
display: block;
width: 16px;
height: 16px;
}
1 year ago
1 year ago
span {
display: block;
font-size: 14px;
font-weight: 600;
1 year ago
color: #005eb7;
1 year ago
margin-left: 5px;
}
1 year ago
}
}
}
}
1 year ago
.menu-content {
width: 100%;
height: 80px;
background: #005EB7;
// padding-top: 15px;
// background: linear-gradient(
// 270deg,
// #1b68e1 0%,
// #2f8dec 26%,
// #3aa2f2 53%,
// #2180e9 80%,
// #045adf 100%
// );
// background: #0055a6;
1 year ago
// border-bottom: 1px solid #FFFFFF;
1 year ago
1 year ago
.menu-wrap {
width: 1200px;
height: 100%;
margin: 0 auto;
1 year ago
& > .el-menu-demo {
height: 100%;
1 year ago
background-color: inherit;
border-bottom: 0;
1 year ago
& > .el-menu-item:not(.is-disabled):focus,
1 year ago
.el-menu-item:not(.is-disabled):hover,
.el-submenu .el-submenu__title:hover {
background-color: inherit;
}
1 year ago
& > .el-menu-item {
width: 160px;
height: 100%;
line-height: 72px;
text-align: center;
1 year ago
font-weight: 400;
// color: rgba(255, 255, 255, 0.89);
color: #fff;
1 year ago
letter-spacing: 0px;
font-size: 24px;
1 year ago
padding: 0;
// margin: 0 55px;
margin-right: 50px;
1 year ago
padding-bottom: 60px;
1 year ago
}
1 year ago
& > .el-menu-item:first-child {
margin-left: 0;
1 year ago
}
.span4 {
font-weight: 500;
// color: rgba(255, 255, 255, 0.89);
1 year ago
letter-spacing: 0px;
font-size: 24px;
1 year ago
padding: 0;
font-family: PingFang SC, MicrosoftYaHei;
1 year ago
}
1 year ago
& > .el-menu-item.is-active {
1 year ago
border-bottom: 0;
position: relative;
font-weight: 600;
background: #0055A6;
.span4 {
font-weight: 600;
}
1 year ago
}
1 year ago
1 year ago
& > .el-submenu {
// height: 51px;
// line-height: 40px;
1 year ago
}
1 year ago
& > .el-submenu.is-active {
1 year ago
.el-submenu__title {
//border-bottom: none;
position: relative;
1 year ago
1 year ago
&::after {
content: "";
position: absolute;
display: inline-block;
width: 16px;
height: 3px;
1 year ago
background: #ffffff;
1 year ago
border-radius: 2px;
left: 50%;
margin-left: -8px;
bottom: 0;
}
}
}
1 year ago
& > .el-menu-item.is-active::after {
1 year ago
content: "";
position: absolute;
width: 30px;
1 year ago
height: 5px;
1 year ago
background: #ffffff;
border-radius: 3px;
1 year ago
left: 50%;
margin-left: -16px;
1 year ago
bottom: 0;
}
1 year ago
& > .el-menu-item.is-active {
// background-color: transparent !important;
background-color: #0055A6 !important;
1 year ago
}
1 year ago
& > .el-menu-item:hover {
// background-color: transparent !important;
background-color: #0055A6 !important;
1 year ago
}
1 year ago
& > .el-submenu /deep/ .el-submenu__title:hover {
// background-color: transparent !important;
background-color: #0055A6 !important;
1 year ago
// background-color: #41a3fb !important;
}
1 year ago
/deep/ .el-menu-item,
/deep/ .el-submenu__title {
1 year ago
//height: 45px !important;
//line-height: 45px !important;
// height: 40px !important;
// line-height: 40px !important;
1 year ago
//border-bottom: 2px solid #5ee6f8;
border-bottom: none;
}
/deep/ .el-submenu__title {
margin: 0 55px;
padding: 0px;
}
/deep/ .el-submenu .el-submenu__icon-arrow {
display: none;
}
}
}
1 year ago
& > img {
1 year ago
cursor: pointer;
width: 18px;
margin-left: 30px;
}
}
1 year ago
& > div {
1 year ago
/deep/ .el-badge__content {
border: none;
background: #f53502;
}
/deep/ .el-badge__content.is-fixed {
right: 5px !important;
}
.username {
height: 20px;
line-height: 20px;
1 year ago
& > span {
1 year ago
color: #b0adad;
font-size: 14px;
position: relative;
cursor: pointer;
font-weight: 500;
font-family: MicrosoftYaHei;
1 year ago
& > span {
1 year ago
position: absolute;
background-color: #f53502;
letter-spacing: 0px;
border-radius: 50%;
line-height: 15px;
height: 15px;
width: 15px;
text-align: center;
color: #ffffff;
font-size: 12px;
top: -3px;
right: -8px;
}
}
}
1 year ago
& > img {
1 year ago
margin-left: 37px;
width: 20px;
cursor: pointer;
}
}
.notice-tips {
width: 100%;
height: 40px;
background: #FFF5EF;
.n-wrap {
width: 1200px;
height: 100%;
display: flex;
align-items: center;
margin: 0 auto;
img {
// height: 16px;
}
span {
font-size: 16px;
line-height: 14px;
color: #FF6200;
margin-left: 10px;
}
}
}
1 year ago
}
</style>