feat : 测试sso单点登录之后的重定向路径4
This commit is contained in:
@@ -15,7 +15,14 @@ const init = () => {
|
||||
})
|
||||
if (authStore.casToken(tokenValue)) {
|
||||
loading.close()
|
||||
router.push('/')
|
||||
const toView = sessionStorage.getItem('toView')
|
||||
console.log(toView, 'toView');
|
||||
if (toView) {
|
||||
let parse = JSON.parse(toView);
|
||||
window.location.href = window.location.origin + parse.path + parse.query
|
||||
} else {
|
||||
router.push('/')
|
||||
}
|
||||
}
|
||||
}
|
||||
init()
|
||||
|
||||
@@ -12,28 +12,28 @@
|
||||
<span>科研管理平台</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <el-row :gutter="10" type="flex">-->
|
||||
<!-- <el-col :span="6" :xs="8" :sm="16" :md="18" :lg="20" :xl="24" >-->
|
||||
<!-- <div v-for="(item,index) in list" :key="index" class="block">-->
|
||||
<!-- <div>{{item.title}}</div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <el-icon><User/></el-icon>-->
|
||||
<!-- <span>{{item.num}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row :gutter="10" type="flex">-->
|
||||
<!-- <el-col :span="6" :xs="8" :sm="16" :md="18" :lg="20" :xl="24" >-->
|
||||
<!-- <div v-for="(item,index) in list" :key="index" class="block">-->
|
||||
<!-- <div>{{item.title}}</div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <el-icon><User/></el-icon>-->
|
||||
<!-- <span>{{item.num}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6" v-for="item in 4">1</el-col>
|
||||
<!-- <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="11"-->
|
||||
<!-- >2<div class="grid-content ep-bg-purple-light"-->
|
||||
<!-- /></el-col>-->
|
||||
<!-- <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="11"-->
|
||||
<!-- >3<div class="grid-content ep-bg-purple"-->
|
||||
<!-- /></el-col>-->
|
||||
<!-- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="1"-->
|
||||
<!-- >4<div class="grid-content ep-bg-purple-light"-->
|
||||
<!-- /></el-col>-->
|
||||
<!-- <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="11"-->
|
||||
<!-- >2<div class="grid-content ep-bg-purple-light"-->
|
||||
<!-- /></el-col>-->
|
||||
<!-- <el-col :xs="4" :sm="6" :md="8" :lg="9" :xl="11"-->
|
||||
<!-- >3<div class="grid-content ep-bg-purple"-->
|
||||
<!-- /></el-col>-->
|
||||
<!-- <el-col :xs="8" :sm="6" :md="4" :lg="3" :xl="1"-->
|
||||
<!-- >4<div class="grid-content ep-bg-purple-light"-->
|
||||
<!-- /></el-col>-->
|
||||
</el-row>
|
||||
<div class="container">
|
||||
<div id="bar1" ref="bar1"></div>
|
||||
@@ -51,25 +51,25 @@
|
||||
import * as echarts from 'echarts'
|
||||
import homeImage from "@/assets/home/home.png"
|
||||
import coffee from "@/assets/home/coffee.png"
|
||||
import { useRouter } from 'vue-router';
|
||||
import {useRouter} from 'vue-router';
|
||||
|
||||
const router = useRouter()
|
||||
const list=ref([
|
||||
const list = ref([
|
||||
{
|
||||
title: '在线用户量',
|
||||
num:2142
|
||||
num: 2142
|
||||
},
|
||||
{
|
||||
title: '在线用户量',
|
||||
num:2142
|
||||
num: 2142
|
||||
},
|
||||
{
|
||||
title: '在线用户量',
|
||||
num:2142
|
||||
num: 2142
|
||||
},
|
||||
{
|
||||
title: '在线用户量',
|
||||
num:2142
|
||||
num: 2142
|
||||
}
|
||||
])
|
||||
const barOption = {
|
||||
@@ -178,14 +178,15 @@ const init = () => {
|
||||
const redirectView = () => {
|
||||
const toView = sessionStorage.getItem('toView')
|
||||
console.log(toView, 'toView');
|
||||
let jsonView = JSON.parse(toView)
|
||||
toView ?
|
||||
router.push({
|
||||
path: JSON.parse(toView).path,
|
||||
query: {
|
||||
...JSON.parse(toView).query
|
||||
}
|
||||
}) :
|
||||
null
|
||||
router.push({
|
||||
path: jsonView.path,
|
||||
query: {
|
||||
...jsonView.query
|
||||
}
|
||||
}) :
|
||||
null
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -242,12 +243,14 @@ window.addEventListener('resize', () => {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
.statistics{
|
||||
|
||||
.statistics {
|
||||
//display: flex;
|
||||
.block{
|
||||
.block {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
height: calc((100vh / 2) - 150px);
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user