页面样式修改,工作组统计
This commit is contained in:
+145
-61
@@ -1,58 +1,128 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view v-if="!isBoolean"/>
|
||||
<div class="content-box" v-if="isBoolean">
|
||||
<nav-menu></nav-menu>
|
||||
<div class="sub-container">
|
||||
<div style="background-color: #0068B7; height: 65px; width: 100%">
|
||||
<span style="color: #fff; line-height: 65px; float: left; font-size: 20px; font-weight: 600;">
|
||||
标准法规管理系统 Standard and Regulation Management System
|
||||
</span>
|
||||
<!-- header头部 右侧内容 当前登录人和退出-->
|
||||
<div class="header-right" style="display: inline-block; float: right; margin-right: 20px; color: #fff">
|
||||
<div class="user-info">
|
||||
<el-dropdown
|
||||
<!-- <router-view v-if="!isBoolean"/>-->
|
||||
<span v-if="this.$route.name === 'Login'">
|
||||
<router-view />
|
||||
</span>
|
||||
<span v-else>
|
||||
<div class="content-box" v-if="isCollapse">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div>
|
||||
<img style="height: 50px;width: 100%" :src="require('@/assets/images/shangqi/home/top-logo.png')">
|
||||
</div>
|
||||
<div style="float: right; margin-right: 20px;">
|
||||
<div class="user-info">
|
||||
<el-dropdown
|
||||
trigger="click"
|
||||
@command="handleCommand"
|
||||
>
|
||||
<div class="user-box" style="margin-top: 23px;">
|
||||
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
|
||||
<span class="iconfont" v-else style="color: #FFFFFF;"></span>
|
||||
<span style="color: #FFFFFF;">{{ $store.getters.userInfo.uName }}</span>
|
||||
<i style="color: #FFFFFF;" class="el-icon-arrow-down"/>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
>
|
||||
<div class="user-box">
|
||||
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
|
||||
<span class="iconfont" v-else style="color: #000;"></span>
|
||||
<span style="color: #000;">{{ $store.getters.userInfo.uName }}</span>
|
||||
<i style="color: #000;" class="el-icon-arrow-down"/>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="logo">-->
|
||||
<!-- <img :src="logo" />-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<!-- <com-header></com-header>-->
|
||||
<div class="container-box">
|
||||
<router-view />
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<nav-menu></nav-menu>
|
||||
<div class="sub-container" style="margin-left: 60px">
|
||||
<div class="container-box">
|
||||
<router-view/>
|
||||
</div>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-box" v-else>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div>
|
||||
<img style="height: 50px;width: 100%" :src="require('@/assets/images/shangqi/home/top-logo.png')">
|
||||
</div>
|
||||
<div style="float: right; margin-right: 20px;">
|
||||
<div class="user-info">
|
||||
<el-dropdown
|
||||
trigger="click"
|
||||
@command="handleCommand"
|
||||
>
|
||||
<div class="user-box">
|
||||
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
|
||||
<span class="iconfont" v-else style="color: #000;"></span>
|
||||
<span style="color: #000;">{{ $store.getters.userInfo.uName }}</span>
|
||||
<i style="color: #000;" class="el-icon-arrow-down"/>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<nav-menu></nav-menu>
|
||||
<div class="sub-container" style="margin-left: 200px">
|
||||
<!-- <div style="background-color: #0068B7; height: 65px; width: 100%">
|
||||
<span style="color: #fff; line-height: 65px; float: left; font-size: 20px; font-weight: 600;">
|
||||
标准法规管理系统 Standard and Regulation Management System
|
||||
</span>
|
||||
header头部 右侧内容 当前登录人和退出
|
||||
<div class="header-right" style="display: inline-block; float: right; margin-right: 20px; color: #fff">
|
||||
<div class="user-info">
|
||||
<el-dropdown
|
||||
trigger="click"
|
||||
@command="handleCommand"
|
||||
>
|
||||
<div class="user-box" style="margin-top: 23px;">
|
||||
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
|
||||
<span class="iconfont" v-else style="color: #FFFFFF;"></span>
|
||||
<span style="color: #FFFFFF;">{{ $store.getters.userInfo.uName }}</span>
|
||||
<i style="color: #FFFFFF;" class="el-icon-arrow-down"/>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="logo">
|
||||
<img :src="logo" />
|
||||
</div>
|
||||
</div>
|
||||
<com-header></com-header>-->
|
||||
<div class="container-box">
|
||||
<router-view/>
|
||||
</div>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapState} from 'vuex'
|
||||
import { webLoginType } from '@/sysConfig'
|
||||
import {webLoginType} from '@/sysConfig'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
isBoolean: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 点击下拉选项事件
|
||||
handleCommand (command) {
|
||||
handleCommand(command) {
|
||||
// 退出登录
|
||||
if (command === 'loginOut') {
|
||||
this.$confirm('您确认要退出吗?', '提示', {
|
||||
@@ -62,19 +132,20 @@ export default {
|
||||
confirmButtonClass: 'common-button-primary',
|
||||
roundButton: false
|
||||
}).then(() => {
|
||||
if(webLoginType != null && webLoginType === 'idm' ) {
|
||||
window.location.href= 'http://sso.foton.com.cn/logout?service='
|
||||
if (webLoginType != null && webLoginType === 'idm') {
|
||||
window.location.href = 'http://sso.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'){
|
||||
} 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 => {})
|
||||
}, 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'
|
||||
@@ -96,7 +167,7 @@ export default {
|
||||
* @author: xx
|
||||
* @date: 2018-08-29 14:56:39
|
||||
*/
|
||||
setTheme (theme) {
|
||||
setTheme(theme) {
|
||||
document.getElementById('app').className = theme
|
||||
},
|
||||
|
||||
@@ -108,32 +179,32 @@ export default {
|
||||
banBackSpace(e) {
|
||||
var ev = e || window.event;
|
||||
//各种浏览器下获取事件对象
|
||||
var obj = ev.relatedTarget || ev.srcElement || ev.target ||ev.currentTarget;
|
||||
var obj = ev.relatedTarget || ev.srcElement || ev.target || ev.currentTarget;
|
||||
//按下Backspace键
|
||||
if(ev.keyCode == 8){
|
||||
if (ev.keyCode == 8) {
|
||||
var tagName = obj.nodeName //标签名称
|
||||
//如果标签不是input或者textarea则阻止Backspace
|
||||
if(tagName!='INPUT' && tagName!='TEXTAREA'){
|
||||
if (tagName != 'INPUT' && tagName != 'TEXTAREA') {
|
||||
return this.stopIt(ev);
|
||||
}
|
||||
var tagType = obj.type.toUpperCase();//标签类型
|
||||
//input标签除了下面几种类型,全部阻止Backspace
|
||||
if(tagName=='INPUT' && (tagType!='TEXT' && tagType!='TEXTAREA' && tagType!='PASSWORD')){
|
||||
if (tagName == 'INPUT' && (tagType != 'TEXT' && tagType != 'TEXTAREA' && tagType != 'PASSWORD')) {
|
||||
return this.stopIt(ev);
|
||||
}
|
||||
//input或者textarea输入框如果不可编辑则阻止Backspace
|
||||
if((tagName=='INPUT' || tagName=='TEXTAREA') && (obj.readOnly==true || obj.disabled ==true)){
|
||||
if ((tagName == 'INPUT' || tagName == 'TEXTAREA') && (obj.readOnly == true || obj.disabled == true)) {
|
||||
return this.stopIt(ev);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
stopIt(ev) {
|
||||
if(ev.preventDefault){
|
||||
if (ev.preventDefault) {
|
||||
//preventDefault()方法阻止元素发生默认的行为
|
||||
ev.preventDefault();
|
||||
}
|
||||
if(ev.returnValue){
|
||||
if (ev.returnValue) {
|
||||
//IE浏览器下用window.event.returnValue = false;实现阻止元素发生默认的行为
|
||||
ev.returnValue = false;
|
||||
}
|
||||
@@ -148,25 +219,25 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
// 获取用户头像
|
||||
userAvator () {
|
||||
userAvator() {
|
||||
return this.$store.getters.userInfo.avator || require('@/assets/images/avator_default.png')
|
||||
},
|
||||
...mapGetters([
|
||||
'getWebSocketList', 'getTheme', 'getMenuList'
|
||||
]),
|
||||
...mapState(['userInfoModifyTime','isCollapse'])
|
||||
...mapState(['userInfoModifyTime', 'isCollapse'])
|
||||
},
|
||||
watch: {
|
||||
// 'userInfoModifyTime'() {
|
||||
// // console.log('watch global, userInfoModifyTime')
|
||||
// this.refresh()
|
||||
// },
|
||||
getTheme (val) {
|
||||
getTheme(val) {
|
||||
// 主题修改
|
||||
this.setTheme(val)
|
||||
},
|
||||
// 监听路由 控制isBoolean
|
||||
$route () {
|
||||
$route() {
|
||||
if (this.$route.name !== 'Login' && this.$route.name !== 'Home' && !this.$route.meta.isBoolean && this.$route.name !== 'beeEChungLogin' && this.$route.name !== 'beeEnergyLogin' && this.$route.name !== 'mdLawLogin' && this.$route.name !== 'nuoBLogin' && this.$route.name !== 'sTLogin' && this.$route.name !== 'StandardSearch') {
|
||||
this.isBoolean = true
|
||||
} else {
|
||||
@@ -174,7 +245,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.setTheme(this.getTheme)
|
||||
//实现对字符码的截获,keypress中屏蔽了这些功能按键
|
||||
document.onkeypress = this.banBackSpace
|
||||
@@ -195,7 +266,9 @@ export default {
|
||||
this.$store.dispatch('syncStorageData')
|
||||
|
||||
const currentPage = this.$route.name
|
||||
if (currentPage === 'Login') {return}
|
||||
if (currentPage === 'Login') {
|
||||
return
|
||||
}
|
||||
this.currentMinute = 3
|
||||
this.loading && this.loading.close()
|
||||
this.loading = this.$loading({
|
||||
@@ -285,35 +358,45 @@ export default {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-y: hidden;
|
||||
background-color: #F0F2F5;
|
||||
//background: url('~@/assets/images/shangqi/home/BG.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-family: MicrosoftYaHei,微软雅黑;
|
||||
& > div{
|
||||
font-family: MicrosoftYaHei, 微软雅黑;
|
||||
|
||||
& > div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.el-main {
|
||||
padding: 10px 10px 0 10px;
|
||||
}
|
||||
.content-box {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
|
||||
.el-header {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sub-container {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.container-box {
|
||||
position: relative;
|
||||
height: calc(~'100% - 65px');
|
||||
height: calc(~'100% - 10px');
|
||||
//flex: 1;
|
||||
background: #F4F4F4;
|
||||
overflow-y: auto;
|
||||
padding: 10px 0 10px 0;
|
||||
//padding: 10px 10px 0;
|
||||
|
||||
.pagination {
|
||||
border-top: 1px solid #f4f4f4;
|
||||
width: calc(~'100% - 20px');
|
||||
@@ -322,7 +405,8 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
/deep/.el-menu--vertical {
|
||||
|
||||
/deep/ .el-menu--vertical {
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user