Merge branch 'develop' of ssh://gitlab.91isoft.com:10022/LAWS/laws-system-front-FOTON into develop

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