Commit 4dc1e2eb authored by lei's avatar lei

fix:普通用户不可以解除警报、浸润线的tootip非共享显示

parent b58506ca
This diff is collapsed.
<template>
<div class="mian-navbar">
<div class="title-ctn">
<h2 v-if="!!pondName">{{pondName}}<!-- 安全监测系统 --></h2>
<h2 v-if="!!pondName">
{{ pondName
}}<!-- 安全监测系统 -->
</h2>
</div>
<div class="navbar">
<div class="right">
<div class="right-menu">
<div>
<el-tooltip content="三维大屏" v-if="d3_screnn" effect="dark" placement="bottom">
<a class="el-icon-monitor" href="/3d/index.html" target="_blank" ></a>
<el-tooltip
content="三维大屏"
v-if="d3_screnn"
effect="dark"
placement="bottom"
>
<a
class="el-icon-monitor"
href="/3d/index.html"
target="_blank"
></a>
</el-tooltip>
<el-tooltip content="风险大屏" v-if="risk_entrance" effect="dark" placement="bottom">
<a class="el-icon-data-line" href="/edge/ScreenFX" target="_blank" ></a>
<el-tooltip
content="风险大屏"
v-if="risk_entrance"
effect="dark"
placement="bottom"
>
<a
class="el-icon-data-line"
href="/edge/ScreenFX"
target="_blank"
></a>
</el-tooltip>
<el-tooltip content="可视化大屏" effect="dark" placement="bottom">
<a class="el-icon-s-platform" href="/edge/Screen" target="_blank" ></a>
<a
class="el-icon-s-platform"
href="/edge/Screen"
target="_blank"
></a>
</el-tooltip>
</div>
<!-- <template >
......@@ -25,10 +50,20 @@
</template> -->
</div>
<div class="navbar-line">
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<el-dropdown
class="avatar-container right-menu-item hover-effect"
trigger="click"
>
<div class="avatar-wrapper el-icon-caret-bottom">
<img :src="user.avatarName ? baseApi + '/avatar/' + user.avatarName : Avatar" class="user-avatar">
<span>{{user.nickName}}</span>
<img
:src="
user.avatarName
? baseApi + '/avatar/' + user.avatarName
: Avatar
"
class="user-avatar"
/>
<span>{{ user.nickName }}</span>
</div>
<el-dropdown-menu slot="dropdown">
<!-- <span style="display:block;" @click="show = true">
......@@ -55,40 +90,38 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { mapGetters } from "vuex";
//import Screenfull from '@/components/Screenfull'
import { reqApi} from '@/assets/js/httpApi.js';
import { reqApi } from "@/assets/js/httpApi.js";
export default {
//components: {Screenfull},
data() {
return {
dialogVisible: false,
pondName:'',
risk_entrance:0,
d3_screnn:1,
}
pondName: "",
risk_entrance: 0,
d3_screnn: 1
};
},
computed: {
...mapGetters([
'user',
'baseApi',
'device',
]),
...mapGetters(["user", "baseApi", "device"]),
show: {
get() {
return this.$store.state.settings.showSettings
return this.$store.state.settings.showSettings;
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
this.$store.dispatch("settings/changeSetting", {
key: "showSettings",
value: val
})
});
}
}
},
created() {
var self = this;
reqApi.common.requstEdge('get', 'tab/tailpondinfor/dryinfo', {}).then(function(res){
reqApi.common
.requstEdge("get", "tab/tailpondinfor/dryinfo", {})
.then(function(res) {
var body = res.body || {};
var tailingname = body.tailingname;
//self.pondName = tailingname.indexOf('尾矿库') > -1 ? tailingname : (tailingname||'') + '尾矿库';
......@@ -102,70 +135,115 @@ export default {
},
methods: {
open() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("确定注销并退出系统吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.logout()
})
this.logout();
});
},
logout() {
this.$store.dispatch('LogOut').then(() => {
location.reload()
})
this.$store.dispatch("LogOut").then(() => {
location.reload();
});
}
}
}
};
</script>
<style lang="scss" scoped>
.mian-navbar{
position:relative;height:.65rem;width:100%;line-height:.65rem;
background-image:linear-gradient(to right, #071C6B, #0C5AAF, #138FE7);
display:flex;
.mian-navbar {
position: relative;
height: 0.65rem;
width: 100%;
line-height: 0.65rem;
background-image: linear-gradient(to right, #071c6b, #0c5aaf, #138fe7);
display: flex;
.title-ctn{
height:100%;display:flex;align-items:center;margin-left:1.093vw;
h2{
font-size:.29rem;background-image:-webkit-linear-gradient(top, white, white, #b5cbfa);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
.title-ctn {
height: 100%;
display: flex;
align-items: center;
margin-left: 1.093vw;
h2 {
font-size: 0.29rem;
background-image: -webkit-linear-gradient(top, white, white, #b5cbfa);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.navbar{
flex:1;height:100%;
background:no-repeat left bottom url('~@/assets/images/layout/title_3.png');
background-size:100% auto;
.navbar {
flex: 1;
height: 100%;
background: no-repeat left bottom url("~@/assets/images/layout/title_3.png");
background-size: 100% auto;
.right{
display:flex;align-items:center;justify-content:flex-end;user-select:none;cursor:normal;
position:absolute;top:0;right:1.2vw;height:100%;
&>div{
display:flex;align-items:center;
a{font-size:24px;margin-right:.10rem;}
.right {
display: flex;
align-items: center;
justify-content: flex-end;
user-select: none;
cursor: normal;
position: absolute;
top: 0;
right: 1.2vw;
height: 100%;
& > div {
display: flex;
align-items: center;
a {
font-size: 24px;
margin-right: 0.1rem;
}
}
}
.avatar-wrapper{
&:before{position:absolute;right:0;height:auto;width:12px;}
.avatar-wrapper {
&:before {
position: absolute;
right: 0;
height: auto;
width: 12px;
}
position:relative;display:flex;align-items:center;padding-right:15px;color:#51dbff;font-size:13px;
img{height:26px;width:26px;border-radius:4px;margin-right:4px;border:0;}
span{display:block;max-width:55px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-wrap:normal;}
position: relative;
display: flex;
align-items: center;
padding-right: 15px;
color: #51dbff;
font-size: 13px;
img {
height: 26px;
width: 26px;
border-radius: 4px;
margin-right: 4px;
border: 0;
}
span {
display: block;
max-width: 55px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-wrap: normal;
}
}
&:focus {
outline: none;
}
.right-menu{
flex:1;color:#ADCBBC;margin-right:.20rem;
&>div:last-child{
display:flex;margin-left:10px;
&:not(rect){
font-size:18px;
.right-menu {
flex: 1;
color: #adcbbc;
margin-right: 0.2rem;
& > div:last-child {
display: flex;
margin-left: 10px;
&:not(rect) {
font-size: 18px;
}
}
}
......@@ -175,6 +253,5 @@ export default {
display: inline-block;
vertical-align: top;
}
}
}
</style>
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,7 @@ const Mode = 'src'; // 'src' 'src-neuter'(中性)
// copy-webpack-plugin@4.5.2
const CopyWebpackPlugin = require('copy-webpack-plugin');
//var HtmlWebpackPlugin = require('html-webpack-plugin');
const defaultSettings = require('./'+Mode+'/settings.js');
const defaultSettings = require('./' + Mode + '/settings.js');
function resolve(dir) {
return path.join(__dirname, dir)
......@@ -26,10 +26,10 @@ module.exports = {
productionSourceMap: false,
//indexPath: 'index3.html',
//integrity:true,
lintOnSave:false, // 关闭代码核查
pages:{
lintOnSave: false, // 关闭代码核查
pages: {
index: {
entry: Mode+'/main.js',
entry: Mode + '/main.js',
// 模板来源
template: './public/index.html',
// 在 dist/index.html 的输出
......@@ -45,17 +45,17 @@ module.exports = {
},
edge: {
// 页面的入口文件
entry: Mode+'/edge.js',
entry: Mode + '/edge.js',
// 页面的模板文件
template: './public/edge.html',
// build 生成的文件名称 例: dist/index.html
filename: 'edge.html',
chunks:["edge", "runtime", "chunk-libs", "chunk-elementUI"],
chunks: ["edge", "runtime", "chunk-libs", "chunk-elementUI"],
}
},
devServer: {
port: port,
host: VUE_APP_BASE_API && VUE_APP_BASE_API.split(/\/\/|:/).slice(-2)[0],
host: '',
open: false,
overlay: {
warnings: false,
......@@ -109,8 +109,8 @@ module.exports = {
name: name,
resolve: {
alias: {
'@': resolve(Mode+''),
'@crud': resolve(Mode+'/components/Crud')
'@': resolve(Mode + ''),
'@crud': resolve(Mode + '/components/Crud')
}
}
},
......@@ -121,12 +121,12 @@ module.exports = {
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve(Mode+'/assets/icons'))
.exclude.add(resolve(Mode + '/assets/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve(Mode+'/assets/icons'))
.include.add(resolve(Mode + '/assets/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
......@@ -180,7 +180,7 @@ module.exports = {
},
commons: {
name: 'chunk-commons',
test: resolve(Mode+'/components'), // can customize your rules
test: resolve(Mode + '/components'), // can customize your rules
minChunks: 3, // minimum common number
priority: 5,
reuseExistingChunk: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment