commit
This commit is contained in:
+24
-8
@@ -42,6 +42,7 @@
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapState} from 'vuex'
|
||||
import { webLoginType } from '@/sysConfig'
|
||||
export default {
|
||||
name: 'App',
|
||||
data () {
|
||||
@@ -61,17 +62,31 @@
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: false
|
||||
}).then(() => {
|
||||
if(webLoginType != null && webLoginType === 'idm' ) {
|
||||
window.location.href= 'http://testsso1.foton.com.cn/logout?service='
|
||||
// this.$http.post('logout', {}, res => {
|
||||
// window.location.href= 'http://testsso1.foton.com.cn/logout?service='
|
||||
// })
|
||||
}else if(webLoginType != null && webLoginType === 'dev'){
|
||||
this.$store.commit('setTypeFlag', 'loginOut')
|
||||
this.$http.get('logout', {}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$store.dispatch('logout')
|
||||
this.$router.push('/login')
|
||||
}, e => {})
|
||||
}
|
||||
// this.$http.post('/logout', {}, res => {
|
||||
// window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code'
|
||||
// })
|
||||
// return
|
||||
this.$store.commit('setTypeFlag', 'loginOut')
|
||||
this.$http.get('logout', {}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$store.dispatch('logout')
|
||||
this.$router.push('/login')
|
||||
}, e => {})
|
||||
// this.$store.commit('setTypeFlag', 'loginOut')
|
||||
// this.$http.get('logout', {}, {
|
||||
// _this: this
|
||||
// }, res => {
|
||||
// this.$store.dispatch('logout')
|
||||
// this.$router.push('/login')
|
||||
// }, e => {})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
@@ -271,7 +286,8 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
background: url('~@/assets/images/shangqi/home/BG.png') no-repeat;
|
||||
background-color: #F0F2F5;
|
||||
//background: url('~@/assets/images/shangqi/home/BG.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-family: MicrosoftYaHei,微软雅黑;
|
||||
& > div{
|
||||
|
||||
@@ -3,8 +3,13 @@
|
||||
<div class="header-left">
|
||||
<span class="logo" @click="toHome" title="回到首页"></span>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<span style="color: #fff; line-height: 65px; font-size: 20px;">
|
||||
标准法规管理系统 standard and regulations management system
|
||||
</span>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="date">{{currentTime}}</span>
|
||||
<span class="date">{{ currentTime }}</span>
|
||||
<span class="divide-line"> | </span>
|
||||
<span class="user-img"></span>
|
||||
<span class="user">{{ $store.getters.userInfo.uName }}</span>
|
||||
@@ -16,7 +21,7 @@
|
||||
>
|
||||
<div class="iconfont" style="color: #fff;"><i class="el-icon-arrow-down"></i></div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item name="logout" command="logout">{{$t('m.exit')}}</el-dropdown-item>
|
||||
<el-dropdown-item name="logout" command="logout">{{ $t("m.exit") }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@@ -25,78 +30,84 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapMutations} from 'vuex'
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'useImg',
|
||||
data () {
|
||||
name: "useImg",
|
||||
data() {
|
||||
return {
|
||||
// 当前系统时间
|
||||
currentTime: '',
|
||||
currentTime: "",
|
||||
userInfoVisible: false
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toHome () {
|
||||
this.$router.push('/home2')
|
||||
toHome() {
|
||||
this.$router.push("/home2");
|
||||
},
|
||||
// 获取当前时间
|
||||
getTime () {
|
||||
this.currentTime = this.$dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss')
|
||||
getTime() {
|
||||
this.currentTime = this.$dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss");
|
||||
},
|
||||
// 用户菜单栏点击
|
||||
userInfoOpen (name) {
|
||||
userInfoOpen(name) {
|
||||
switch (name) {
|
||||
case 'personal':
|
||||
this.$router.push('/personal')
|
||||
break
|
||||
case 'logout':
|
||||
this.$confirm('您确认要退出吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
case "personal":
|
||||
this.$router.push("/personal");
|
||||
break;
|
||||
case "logout":
|
||||
this.$confirm("您确认要退出吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
confirmButtonClass: "common-button-primary",
|
||||
roundButton: true
|
||||
}).then(() => {
|
||||
this.userLoginOut()
|
||||
}).catch(() => {})
|
||||
break
|
||||
this.userLoginOut();
|
||||
}).catch(() => {
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 用户退出登录
|
||||
userLoginOut () {
|
||||
this.$http.get('logout', {}, {
|
||||
userLoginOut() {
|
||||
this.$http.get("logout", {}, {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.$store.dispatch('logout')
|
||||
this.$router.push('/sign_in')
|
||||
}, e => {})
|
||||
this.$store.dispatch("logout");
|
||||
this.$router.push("/sign_in");
|
||||
}, e => {
|
||||
});
|
||||
},
|
||||
...mapMutations(['setProcess', 'setDynamicTotal'])
|
||||
...mapMutations(["setProcess", "setDynamicTotal"])
|
||||
},
|
||||
mounted () {
|
||||
this.getTime()
|
||||
mounted() {
|
||||
this.getTime();
|
||||
},
|
||||
computed: {
|
||||
// 用户头像
|
||||
userAvator () {
|
||||
return this.$store.getters.userInfo.avator || require('@/assets/images/avator_default.png')
|
||||
userAvator() {
|
||||
return this.$store.getters.userInfo.avator || require("@/assets/images/avator_default.png");
|
||||
},
|
||||
uName () {
|
||||
return this.$store.getters.userInfo.uName
|
||||
uName() {
|
||||
return this.$store.getters.userInfo.uName;
|
||||
},
|
||||
...mapGetters(['getDynamicTotal', 'getMenuList'])
|
||||
...mapGetters(["getDynamicTotal", "getMenuList"])
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.header{
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #171E4A;
|
||||
color: #fff;
|
||||
.header-left{
|
||||
|
||||
.header-left {
|
||||
text-align: left;
|
||||
width: 50%;
|
||||
//width: 50%;
|
||||
|
||||
.logo {
|
||||
display: inline-block;
|
||||
width: 160px;
|
||||
@@ -106,19 +117,25 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.header-right{
|
||||
width: 49%;
|
||||
.header-center{
|
||||
width: 70%;
|
||||
}
|
||||
.header-right {
|
||||
//width: 49%;
|
||||
text-align: right;
|
||||
line-height: 61px;
|
||||
height: 61px;
|
||||
display: flex;
|
||||
margin-right: 20px;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
.date{
|
||||
|
||||
.date {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.user-img{
|
||||
|
||||
.user-img {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 21px;
|
||||
@@ -126,11 +143,13 @@ export default {
|
||||
background-size: 100% 100%;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.divide-line{
|
||||
|
||||
.divide-line {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.user{
|
||||
|
||||
.user {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="standard-search-content">
|
||||
<div style="position: absolute;left: 0;right: 0;top: 0;bottom: 0;">
|
||||
<div class="content-left">
|
||||
<div class="search">
|
||||
<div class="search" style="padding: 40px;">
|
||||
<div class="search-box">
|
||||
<div class="home-input">
|
||||
<el-input
|
||||
@@ -2565,7 +2565,7 @@
|
||||
border-bottom-left-radius: 20px;
|
||||
}
|
||||
.standard-search {
|
||||
padding: 6px 26px;
|
||||
//padding: 6px 26px;
|
||||
@borderColor: #BFBFBF;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
@@ -2641,7 +2641,7 @@
|
||||
}
|
||||
@media screen and (min-width: 1920px) {
|
||||
.header{
|
||||
height: 75px;
|
||||
height: 65px;
|
||||
}
|
||||
}
|
||||
.standard-search-content{
|
||||
@@ -3065,7 +3065,7 @@
|
||||
}
|
||||
.router-link{
|
||||
position: relative;
|
||||
color: #fff;
|
||||
color: #333;
|
||||
top: 17px;
|
||||
left: 44px;
|
||||
font-family: PingFang-SC-Medium;
|
||||
@@ -3074,7 +3074,7 @@
|
||||
}
|
||||
.router-link1{
|
||||
position: relative;
|
||||
color: #fff;
|
||||
color: #333;
|
||||
top: 17px;
|
||||
left: 54px;
|
||||
font-family: PingFang-SC-Medium;
|
||||
@@ -3107,7 +3107,8 @@
|
||||
border-radius: 20px;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-top: 20px;
|
||||
//margin-top: 20px;
|
||||
margin: 20px 26px 0 26px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.all-box__wrap {
|
||||
|
||||
Reference in New Issue
Block a user