Merge branch 'develop' of ssh://gitlab.91isoft.com:10022/LAWS/laws-system-front-FOTON into develop
This commit is contained in:
+100
-100
@@ -225,109 +225,109 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setTheme(this.getTheme)
|
||||
//实现对字符码的截获,keypress中屏蔽了这些功能按键
|
||||
document.onkeypress = this.banBackSpace
|
||||
//对功能按键的获取
|
||||
document.onkeydown = this.banBackSpace
|
||||
this.visibilitychangeFn = (e) => { //这个方法是监测浏览器窗口发生变化的时候执行
|
||||
// 切换到当前页面
|
||||
if (document.hidden == false) {
|
||||
const userInfoModifyTime = this.userInfoModifyTime
|
||||
const userInfoModifyTimeInLocalStorage = localStorage.getItem('userInfoModifyTime')
|
||||
|
||||
// 用户未切换 不执行任何操作
|
||||
if (userInfoModifyTime === userInfoModifyTimeInLocalStorage) {
|
||||
return
|
||||
}
|
||||
|
||||
if (userInfoModifyTimeInLocalStorage === null && webLoginType === 'idm') {
|
||||
this.$store.dispatch('syncStorageData')
|
||||
|
||||
const currentPage = this.$route.name
|
||||
if (currentPage === 'Login') {
|
||||
return
|
||||
}
|
||||
this.currentMinute = 3
|
||||
this.loading && this.loading.close()
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
// text: 'Loading',
|
||||
// spinner: 'el-icon-loading',
|
||||
// background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.messageForLogin && this.messageForLogin.close()
|
||||
this.messageForLogin = this.$message({
|
||||
message: `用户已退出,${this.currentMinute}秒后将跳转到登录1页面`,
|
||||
type: 'warning'
|
||||
})
|
||||
|
||||
|
||||
this.intervalForLogin = setInterval(() => {
|
||||
if (this.currentMinute === 0) {
|
||||
clearInterval(this.intervalForLogin)
|
||||
this.loading.close()
|
||||
|
||||
this.$router.push('/login')
|
||||
console.log('切换到登录页面', currentPage)
|
||||
}
|
||||
this.currentMinute--
|
||||
this.messageForLogin.message = `用户已退出,${this.currentMinute}秒后将跳转到登录页面`
|
||||
}, 0)
|
||||
|
||||
} else if (userInfoModifyTime !== userInfoModifyTimeInLocalStorage && webLoginType === 'idm') {
|
||||
this.$store.dispatch('syncStorageData')
|
||||
|
||||
console.log('用户信息已更改,同步数据')
|
||||
|
||||
this.currentMinute = 3
|
||||
|
||||
this.loading && this.loading.close()
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
// text: 'Loading',
|
||||
// spinner: 'el-icon-loading',
|
||||
// background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
|
||||
this.messageForHome && this.messageForHome.close()
|
||||
this.messageForHome = this.$message({
|
||||
message: `用户已切换,${this.currentMinute}秒后将跳转到用户首页`,
|
||||
type: 'warning'
|
||||
})
|
||||
this.intervalForHome = setInterval(() => {
|
||||
if (this.currentMinute === 0) {
|
||||
clearInterval(this.intervalForHome)
|
||||
this.loading.close()
|
||||
|
||||
this.$router.push({
|
||||
path: '/redirect',
|
||||
query: '/home2'
|
||||
})
|
||||
}
|
||||
this.currentMinute--
|
||||
this.messageForHome.message = `用户已切换,${this.currentMinute}秒后将跳转到用户首页`
|
||||
}, 1000)
|
||||
|
||||
// const route = this.$router.resolve('/home')
|
||||
// this.$router.push({
|
||||
// path: '/redirect',
|
||||
// query: '/home'
|
||||
// })
|
||||
// location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
document.addEventListener('visibilitychange', this.visibilitychangeFn);
|
||||
// this.setTheme(this.getTheme)
|
||||
// //实现对字符码的截获,keypress中屏蔽了这些功能按键
|
||||
// document.onkeypress = this.banBackSpace
|
||||
// //对功能按键的获取
|
||||
// document.onkeydown = this.banBackSpace
|
||||
// this.visibilitychangeFn = (e) => { //这个方法是监测浏览器窗口发生变化的时候执行
|
||||
// // 切换到当前页面
|
||||
// if (document.hidden == false) {
|
||||
// const userInfoModifyTime = this.userInfoModifyTime
|
||||
// const userInfoModifyTimeInLocalStorage = localStorage.getItem('userInfoModifyTime')
|
||||
//
|
||||
// // 用户未切换 不执行任何操作
|
||||
// if (userInfoModifyTime === userInfoModifyTimeInLocalStorage) {
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// if (userInfoModifyTimeInLocalStorage === null && webLoginType === 'idm') {
|
||||
// this.$store.dispatch('syncStorageData')
|
||||
//
|
||||
// const currentPage = this.$route.name
|
||||
// if (currentPage === 'Login') {
|
||||
// return
|
||||
// }
|
||||
// this.currentMinute = 3
|
||||
// this.loading && this.loading.close()
|
||||
// this.loading = this.$loading({
|
||||
// lock: true,
|
||||
// // text: 'Loading',
|
||||
// // spinner: 'el-icon-loading',
|
||||
// // background: 'rgba(0, 0, 0, 0.7)'
|
||||
// });
|
||||
// this.messageForLogin && this.messageForLogin.close()
|
||||
// this.messageForLogin = this.$message({
|
||||
// message: `用户已退出,${this.currentMinute}秒后将跳转到登录1页面`,
|
||||
// type: 'warning'
|
||||
// })
|
||||
//
|
||||
//
|
||||
// this.intervalForLogin = setInterval(() => {
|
||||
// if (this.currentMinute === 0) {
|
||||
// clearInterval(this.intervalForLogin)
|
||||
// this.loading.close()
|
||||
//
|
||||
// this.$router.push('/login')
|
||||
// console.log('切换到登录页面', currentPage)
|
||||
// }
|
||||
// this.currentMinute--
|
||||
// this.messageForLogin.message = `用户已退出,${this.currentMinute}秒后将跳转到登录页面`
|
||||
// }, 0)
|
||||
//
|
||||
// } else if (userInfoModifyTime !== userInfoModifyTimeInLocalStorage && webLoginType === 'idm') {
|
||||
// this.$store.dispatch('syncStorageData')
|
||||
//
|
||||
// console.log('用户信息已更改,同步数据')
|
||||
//
|
||||
// this.currentMinute = 3
|
||||
//
|
||||
// this.loading && this.loading.close()
|
||||
// this.loading = this.$loading({
|
||||
// lock: true,
|
||||
// // text: 'Loading',
|
||||
// // spinner: 'el-icon-loading',
|
||||
// // background: 'rgba(0, 0, 0, 0.7)'
|
||||
// });
|
||||
//
|
||||
// this.messageForHome && this.messageForHome.close()
|
||||
// this.messageForHome = this.$message({
|
||||
// message: `用户已切换,${this.currentMinute}秒后将跳转到用户首页`,
|
||||
// type: 'warning'
|
||||
// })
|
||||
// this.intervalForHome = setInterval(() => {
|
||||
// if (this.currentMinute === 0) {
|
||||
// clearInterval(this.intervalForHome)
|
||||
// this.loading.close()
|
||||
//
|
||||
// this.$router.push({
|
||||
// path: '/redirect',
|
||||
// query: '/home2'
|
||||
// })
|
||||
// }
|
||||
// this.currentMinute--
|
||||
// this.messageForHome.message = `用户已切换,${this.currentMinute}秒后将跳转到用户首页`
|
||||
// }, 1000)
|
||||
//
|
||||
// // const route = this.$router.resolve('/home')
|
||||
// // this.$router.push({
|
||||
// // path: '/redirect',
|
||||
// // query: '/home'
|
||||
// // })
|
||||
// // location.reload();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// document.addEventListener('visibilitychange', this.visibilitychangeFn);
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
document.onkeypress = null
|
||||
document.onkeydown = null
|
||||
document.removeEventListener('visibilitychange', this.visibilitychangeFn)
|
||||
clearInterval(this.intervalForLogin)
|
||||
clearInterval(this.intervalForHome)
|
||||
// document.onkeypress = null
|
||||
// document.onkeydown = null
|
||||
// document.removeEventListener('visibilitychange', this.visibilitychangeFn)
|
||||
// clearInterval(this.intervalForLogin)
|
||||
// clearInterval(this.intervalForHome)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<el-table-column
|
||||
prop="standName"
|
||||
label="中文名称"
|
||||
width="180px"
|
||||
min-width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
|
||||
@@ -142,7 +142,7 @@
|
||||
<el-table-column
|
||||
prop="standEnName"
|
||||
align="center"
|
||||
width="180px"
|
||||
min-width="180px"
|
||||
label="英文名称">
|
||||
<template slot-scope="scope">
|
||||
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standEnName }}</a>
|
||||
@@ -189,7 +189,7 @@
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="sycpx"
|
||||
width="180px"
|
||||
min-width="180px"
|
||||
align="center"
|
||||
label="适用产品线">
|
||||
</el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user