From fe29cab3d9bf8ddfeb1bc93a25a79c20276d8171 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 30 十二月 2025 15:35:49 +0800
Subject: [PATCH] 最新版本541200007最新版本541200007
---
admin/src/components/common/CommonHeader.vue | 197 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 158 insertions(+), 39 deletions(-)
diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue
index 0c5afee..8773c62 100644
--- a/admin/src/components/common/CommonHeader.vue
+++ b/admin/src/components/common/CommonHeader.vue
@@ -2,7 +2,7 @@
<div class="common-header">
<div class="header">
<div class="logo">
- <div class="title">{{ title }}</div>
+ <div class="title"> <img src="@/assets/system.png" alt="" />{{sysConfig.subtitle || title }}</div>
<div class="list">
<div :class="index==currentIndex?'item active':'item'" v-for="(item,index) in topMenuList.list" :key="item.id" @click="getHeaderNav(item,index)" :index="index">{{item.label}}
<div v-if="index==currentIndex" class="linellae"></div>
@@ -10,18 +10,48 @@
</div>
</div>
<div class="user">
- <el-dropdown v-if="isLogined" trigger="click">
- <span class="el-dropdown-link">
- <!-- <img v-if="userInfo != null" :src="userInfo.avatar == null ? `${require('@/assets/avatar/man.png')}` : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon--right"></i> -->
- <img v-if="userInfo != null" style="width: 30px !important" src="@/assets/avatar/man.png" alt="" />{{
- userInfo | displayName
- }}<i class="el-icon-arrow-down el-icon--right"></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="changePwd">淇敼瀵嗙爜</el-dropdown-item>
- <el-dropdown-item @click.native="logout">閫�鍑虹櫥褰�</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
+ <div class="user-search">
+ <div class="user-search-left">
+ <span>鍏ㄩ儴</span>
+ <img src="@/assets/icons/xl.png" alt="">
+ </div>
+ <div class="user-search-right">
+ <input type="text" placeholder="璇疯緭鍏�" />
+ <img src="@/assets/icons/sousuo.png" alt="">
+ </div>
+ </div>
+ <div class="user-images">
+<!-- <img src="@/assets/icons/ic_1.jpg" alt="">-->
+<!-- <img src="@/assets/icons/ic_2.png" alt="">-->
+ <img src="@/assets/icons/ic_3.jpg" alt="">
+ <img src="@/assets/icons/ic_4.jpg" alt="">
+ <img src="@/assets/icons/ic_5.jpg" alt="">
+<!-- <img src="@/assets/icons/ic_6.jpg" alt="">-->
+ <img src="@/assets/icons/ic_7.jpg" alt="">
+<!-- <img src="@/assets/icons/ic_8.jpg" alt="">-->
+ </div>
+ <el-dropdown v-if="isLogined" trigger="click">
+ <span class="el-dropdown-link" style="cursor: pointer; color: rgba(255,255,255,.56);">
+ {{ userInfo | displayName }}
+ <i class="el-icon-arrow-down el-icon--right"></i>
+ </span>
+ <el-dropdown-menu slot="dropdown">
+ <el-dropdown-item @click.native="changePwd">淇敼瀵嗙爜</el-dropdown-item>
+ <el-dropdown-item @click.native="logout">閫�鍑虹櫥褰�</el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
+<!-- <el-dropdown v-if="isLogined" trigger="click">-->
+<!-- <span class="el-dropdown-link">-->
+<!-- <!– <img v-if="userInfo != null" :src="userInfo.avatar == null ? `${require('@/assets/avatar/man.png')}` : userInfo.avatar" alt="">{{userInfo | displayName}}<i class="el-icon-arrow-down el-icon--right"></i> –>-->
+<!-- <img v-if="userInfo != null" style="width: 30px !important" src="@/assets/avatar/man.png" alt="" />{{-->
+<!-- userInfo | displayName-->
+<!-- }}<i class="el-icon-arrow-down el-icon--right"></i>-->
+<!-- </span>-->
+<!-- <el-dropdown-menu slot="dropdown">-->
+<!-- <el-dropdown-item @click.native="changePwd">淇敼瀵嗙爜</el-dropdown-item>-->
+<!-- <el-dropdown-item @click.native="logout">閫�鍑虹櫥褰�</el-dropdown-item>-->
+<!-- </el-dropdown-menu>-->
+<!-- </el-dropdown>-->
</div>
</div>
<!-- 淇敼瀵嗙爜 -->
@@ -51,7 +81,7 @@
<script>
import { mapState, mapMutations } from 'vuex'
import GlobalAlertWindow from './GlobalAlertWindow'
-import { logout, updatePwd } from '@/api/system/common'
+import { getSystemConfig, logout, updatePwd } from '@/api/system/common'
import { getAppHeaderNav } from '@/api'
export default {
name: 'CommonHeader',
@@ -98,13 +128,13 @@
}
},
computed: {
- ...mapState(['menuData', 'userInfo', 'topMenuList', 'currentIndex'])
+ ...mapState(['menuData', 'userInfo', 'topMenuList', 'currentIndex', 'sysConfig'])
// title () {
// return this.$route.meta.title
// }
},
created () {
-
+ this.getSystemConfig()
},
mounted () {
// needChangePwd 0 : 榛樿瀵嗙爜闇�瑕佷慨鏀癸紝1 涓嶉渶瑕�
@@ -125,13 +155,23 @@
}
},
methods: {
- ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent', 'setCurrentIndex']),
+ ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo', 'setTopMenuCurrent', 'setCurrentIndex', 'setSysconfig']),
// 淇敼瀵嗙爜
changePwd () {
this.visible.changePwd = true
this.$nextTick(() => {
this.$refs.changePwdDataForm.resetFields()
})
+ },
+ getSystemConfig () {
+ if (!this.sysConfig.subTitle) {
+ getSystemConfig()
+ .then((res) => {
+ if (res && res.subtitle) {
+ this.setSysconfig(res)
+ }
+ })
+ }
},
validatePassword (rule, value, callback) {
if (!value) {
@@ -151,11 +191,11 @@
// } else {
// callback() // 楠岃瘉閫氳繃
// }
- let typeCount = 0;
- if (/[a-z]/.test(value)) typeCount++; // 灏忓啓瀛楁瘝
- if (/[A-Z]/.test(value)) typeCount++; // 澶у啓瀛楁瘝
- if (/\d/.test(value)) typeCount++; // 鏁板瓧
- if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(value)) typeCount++; // 鐗规畩瀛楃
+ let typeCount = 0
+ if (/[a-z]/.test(value)) typeCount++ // 灏忓啓瀛楁瘝
+ if (/[A-Z]/.test(value)) typeCount++ // 澶у啓瀛楁瘝
+ if (/\d/.test(value)) typeCount++ // 鏁板瓧
+ if (/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(value)) typeCount++ // 鐗规畩瀛楃
if (typeCount >= 3) {
callback()
} else {
@@ -163,11 +203,11 @@
}
}
},
- getHeaderNav (item,index) {
+ getHeaderNav (item, index) {
this.setCurrentIndex(index)
- if(item.linkType === 0){
+ if (item.linkType === 0) {
this.setTopMenuCurrent(item)
- }else{
+ } else {
if (item.url && item.url === 'goHKAF' && item.params != null) {
this.getHKAFHeaderNav(item.params, item.label)
} else if (item.url && item.url.indexOf('http') === 0) {
@@ -178,10 +218,10 @@
getHKAFHeaderNav (type, label) {
getAppHeaderNav(type).then(res => {
if (label === '瀹夐槻涓績') {
- let openWindow = window.open(res, '_blank')
- setTimeout(() => {
- openWindow.close()
- }, 7 * 1000)
+ const openWindow = window.open(res, '_blank')
+ // setTimeout(() => {
+ // openWindow.close()
+ // }, 7 * 1000)
} else {
window.open(res, '_blank')
}
@@ -270,8 +310,9 @@
newPwd: this.changePwdData.form.newPwd
})
.then(() => {
+ console.log('淇敼鎴愬姛')
this.$tip.apiSuccess('淇敼鎴愬姛')
- this.$store.commit('setUserInfo', { needChangePwd: 1 })
+ // this.$store.commit('setUserInfo', { needChangePwd: 1 })
this.visible.changePwd = false
})
.catch(e => {
@@ -303,7 +344,7 @@
@import "@/assets/style/variables.scss";
.common-header {
- background-color: #2080f7;
+ background-color: #1E7FFF;
}
.list {
@@ -313,14 +354,14 @@
display: flex;
align-items: center;
.item {
- margin-right: 40px;
+ margin-right: 24px;
font-size: 16px;
font-weight: 400;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
- height: 40px;
+ height: 49px;
cursor: pointer;
.linellae {
@@ -348,7 +389,7 @@
box-sizing: border-box;
min-width: 360px;
height: 56px;
- padding: 10px 30px;
+ padding: 10px 12px;
// flex-shrink: 0;
line-height: 36px;
font-size: 22px;
@@ -358,8 +399,18 @@
align-items: center;
.title {
+ display: flex;
+ color: rgb(255, 255, 255);
font-size: 18px;
- width: 320px;
+ font-weight: 700;
+ font-family: "Microsoft Yahei", "sans-serif", "segoe UI", "PingFang SC", arial, Helvetica;
+ //font-size: 18px;
+ //width: 320px;
+ img{
+ width:auto ;
+ height: 32px;
+ margin-right: 5px;
+ }
}
// display: inline;
@@ -371,15 +422,83 @@
}
.user {
- width: 152px;
+ /*width: 152px;*/
box-sizing: border-box;
height: 56px;
padding-right: 25px;
- background: url("../../assets/images/top_ic_bolang@2x.png") no-repeat;
+ /*background: url("../../assets/images/top_ic_bolang@2x.png") no-repeat;*/
flex-shrink: 0;
text-align: right;
- cursor: pointer;
-
+ display: flex;
+ align-items: center;
+ .user-search {
+ width: 346px;
+ height: 32px;
+ border-radius: 30px;
+ border: 1px solid rgba(255,255,255,.56);
+ margin-right: 15px;
+ display: flex;
+ align-items: center;
+ .user-search-left {
+ flex-shrink: 0;
+ width: 106px;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ span {
+ font-size: 14px;
+ font-weight: 400;
+ color: rgba(255,255,255,.56);
+ margin-right: 10px;
+ }
+ img {
+ top: 0;
+ margin: 0;
+ width: 20px;
+ height: 16px;
+ }
+ }
+ .user-search-right {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-right: 10px;
+ box-sizing: border-box;
+ input {
+ flex: 1;
+ height: 100%;
+ font-size: 14px;
+ font-weight: 400;
+ color: rgba(255,255,255,.56);
+ border: none;
+ outline: none;
+ background-color: rgba(0,0,0,0);
+ &::placeholder {
+ color: rgba(255,255,255,.56);
+ }
+ }
+ img {
+ top: 0;
+ margin: 0;
+ width: 20px;
+ height: 20px;
+ }
+ }
+ }
+ .user-images {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ img {
+ top: 0 !important;
+ width: 18px;
+ height: 18px;
+ margin-right: 12px;
+ }
+ }
.el-dropdown {
top: 2px;
color: #fff;
--
Gitblit v1.9.3