From 740f596cb7c5b5e3576ba8aab9c4cc5732b3ccf2 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期日, 08 十月 2023 08:39:24 +0800
Subject: [PATCH] 油烟-报警
---
src/views/layout/components/Header/index.vue | 97 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 93 insertions(+), 4 deletions(-)
diff --git a/src/views/layout/components/Header/index.vue b/src/views/layout/components/Header/index.vue
index 487de32..685859d 100644
--- a/src/views/layout/components/Header/index.vue
+++ b/src/views/layout/components/Header/index.vue
@@ -6,6 +6,17 @@
<div class="menu-left__item" v-for="(item, index) in menuLeftList" :key="item.id" @click="changeActive(index)">
<span :class="item.checked ? 'my-active' : 'my-activeno'" @click="menuChange(item)">{{ item.label }}</span>
</div>
+ <div class="menu-left__item" v-for="(item, index) in menuLinkList" :key="item.id+index" >
+ <span class="link-active" @click="menuOpen(item)">{{ item.name }}</span>
+ </div>
+ <el-dropdown trigger="click" @command="handleCommand" v-if="linkLeng">
+ <span class="el-dropdown-link">
+ <i class="el-icon-arrow-down el-icon--right"></i>
+ </span>
+ <el-dropdown-menu slot="dropdown" >
+ <el-dropdown-item v-for="(i,dx) in menuLinkLists" :key="i.id+dx" :command="i">{{i.name}}</el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
</div>
<!-- 鍙充晶鑿滃崟 -->
<div class="header-right">
@@ -123,6 +134,7 @@
import updatePassword from "./updatePassword";
import users from "@/api/users";
import { Message } from "element-ui";
+import {searchexternalLinks} from "@/api/system/portal/externalLinks";
export default {
components: {
@@ -130,6 +142,9 @@
},
data() {
return {
+ linkLeng:false,
+ menuLinkLists:[],
+ menuLinkList:[],
baseInformationVisible: false,
updatePasswordDialog: false,
channelSettingVisible: false,
@@ -138,7 +153,7 @@
{
label: '椹鹃┒鑸�',
checked: false,
- url: '',
+ url: 'http://10.53.156.63/cockpit/dist/board.html#/share-board/6CorSPZG',
id: '1f'
},
{
@@ -152,6 +167,12 @@
checked: false,
url: '',
id: '3f',
+ },
+ {
+ label: '娌圭儫妫�娴�',
+ checked: false,
+ url: 'http://116.62.234.187:8120/#/SpecificLogin?subname=sccgj',
+ id: '4f',
},
],
flag: {
@@ -171,8 +192,47 @@
},
created() {
this.setLoginInfo();
+ this.getExternalLinks()
+ },
+ mounted(){
+ window.eventBus.$on('setFeaturesData', ()=>{ // 涓嶅甫鍙傛暟
+ this.getExternalLinks()
+ })
+ },
+ watch:{
+ $route() {
+ this.menuLeftList.map(item=>{
+ item.checked = false
+ })
+ },
},
methods: {
+ handleCommand(e){
+ console.log(e)
+ this.menuOpen(e)
+ },
+ menuOpen(row){
+ window.open('http://'+row.url, '_blank');
+ },
+ async getExternalLinks() {
+ await searchexternalLinks().then((res) => {
+ let that = this
+ that.menuLinkList=[]
+ if (res.length > 5) {
+ that.linkLeng = true
+ }
+ that.menuLinkLists = res
+ for (let i = 0; i < res.length; i++) {
+ that.menuLinkList.push(res[i])
+ if (i == 4) {
+ break;
+ }
+ }
+ // console.log(that.menuLinkLists)
+ // this.menuLinkList = res
+
+ });
+ },
cancelChannel(){
this.channelSettingVisible=false
},
@@ -293,7 +353,7 @@
},
menuChange(data) {
if (data.id === '1f') {
- window.open('http://cockpit.patstech.net:28081/cockpit/dist/board.html#/share-board/zfu0LsJ9', '_blank');
+ window.open('http://10.53.156.63:18081/cockpit/dist/board.html#/share-board/6CorSPZG', '_blank');
}
if (data.id === '2f') {
this.$router.push({ path: "/home/video" })
@@ -301,12 +361,20 @@
if (data.id === '3f') {
this.$router.push({ path: "/home/operate/casepool/pool" })
}
+ if (data.id === '4f') {
+ window.open('http://116.62.234.187:8120/#/SpecificLogin?subname=sccgj', '_blank');
+ }
+
}
}
};
</script>
<style lang="scss" scoped>
+.el-dropdown-link {
+ cursor: pointer;
+ color: #409EFF;
+}
::v-deep .el-form {
padding: 3vh 5vw;
@@ -328,7 +396,7 @@
.header-left {
display: flex;
flex: 1;
-
+align-items: center;
.menu-left__item {
width: 120px;
@@ -343,7 +411,19 @@
}
}
}
+.link-active{
+ overflow:hidden;
+ white-space: nowrap;
+
+ text-overflow: ellipsis;
+
+ -o-text-overflow:ellipsis;
+}
+ .link-active:hover{
+ color: #2f54eb;
+ background-color: #313350;
+ }
.my-active {
border-radius: 20px;
color: #2f54eb;
@@ -352,6 +432,14 @@
.my-activeno{
border-radius: 20px;
color: #fff;
+ background-color: #313350;
+ }
+ .my-active:hover {
+ color: #2f54eb;
+ background-color: #313350;
+ }
+ .my-activeno:hover{
+ color: #2f54eb;
background-color: #313350;
}
}
@@ -466,8 +554,9 @@
.user:hover,
.btn:hover {
- background-color: #092c4a;
+ //background-color: #092c4a;
cursor: pointer;
+ color: #2f54eb;
}
}
}
--
Gitblit v1.8.0