Commit 6d6c4251 by wenyi.chen

主页修改

parent ecd0dc79
......@@ -531,7 +531,7 @@ onBeforeMount(() => {
// 监听布局配置开启 TagsView 共用,为了演示还原默认值
mittBus.on('openShareTagsView', () => {
if (getThemeConfig.value.isShareTagsView) {
router.push('/claimTasks');
router.push('/home');
state.tagsViewList = [];
state.tagsViewRoutesList.map((v) => {
if (v.meta?.isAffix && !v.meta.isHide) {
......
......@@ -103,7 +103,7 @@ router.beforeEach(async (to, from, next) => {
Session.clear();
NProgress.done();
} else if (token && to.path === '/login') {
next('/claimTasks');
next('/home');
NProgress.done();
} else {
const storesRoutesList = useRoutesList(pinia);
......
......@@ -23,7 +23,7 @@ export const dynamicRoutes = [
path: '/',
name: '/',
component: () => import('/@/layout/index.vue'),
redirect: '/claimTasks',
redirect: '/home',
meta: {
isKeepAlive: false,
},
......@@ -42,7 +42,7 @@ export const notFoundAndNoPower = [
{
path: '/:path(.*)*',
name: 'notFound',
component: () => import('/@/views/claimTasks/user/list/index.vue'),
component: () => import('/@/views/error/401.vue'),
meta: {
title: '页面找不到',
isHide: true,
......
<template>
<div class="home-container layout-pd">
dasdasds
</div>
</template>
<script setup name="home">
import * as echarts from 'echarts';
const router = useRouter();
import { Session } from '/@/utils/storage';
// 定义变量内容
const state = reactive({
});
// 页面加载时
onMounted(() => {
let userInfo = Session.get('userInfo')
if(userInfo){
if(userInfo.department.id == 4){
router.push('/dataScreening/list/index');
}else if(userInfo.department.id ==3 ){
router.push('/claimTasks');
}else if(userInfo.department.id ==2 ){
router.push('/claimTasks');
}else{
router.push('/');
}
}else{
router.push('/dataScreening/list/index');
}
});
</script>
<style scoped lang="scss">
$homeNavLengh: 8;
.home-container {
overflow: hidden;
.home-card-one,
.home-card-two,
.home-card-three {
.home-card-item {
width: 100%;
height: 130px;
border-radius: 4px;
transition: all ease 0.3s;
padding: 20px;
overflow: hidden;
background: var(--el-color-white);
color: var(--el-text-color-primary);
border: 1px solid var(--next-border-color-light);
&:hover {
box-shadow: 0 2px 12px var(--next-color-dark-hover);
transition: all ease 0.3s;
}
&-icon {
width: 70px;
height: 70px;
border-radius: 100%;
flex-shrink: 1;
i {
color: var(--el-text-color-placeholder);
}
}
&-title {
font-size: 15px;
font-weight: bold;
height: 30px;
}
}
}
.home-card-one {
@for $i from 0 through 3 {
.home-one-animation#{$i} {
opacity: 0;
animation-name: error-num;
animation-duration: 0.5s;
animation-fill-mode: forwards;
animation-delay: calc($i/4) + s;
}
}
}
.home-card-two,
.home-card-three {
.home-card-item {
height: 400px;
width: 100%;
overflow: hidden;
.home-monitor {
height: 100%;
.flex-warp-item {
width: 25%;
height: 111px;
display: flex;
.flex-warp-item-box {
margin: auto;
text-align: center;
color: var(--el-text-color-primary);
display: flex;
border-radius: 5px;
background: var(--next-bg-color);
cursor: pointer;
transition: all 0.3s ease;
&:hover {
background: var(--el-color-primary-light-9);
transition: all 0.3s ease;
}
}
@for $i from 0 through $homeNavLengh {
.home-animation#{$i} {
opacity: 0;
animation-name: error-num;
animation-duration: 0.5s;
animation-fill-mode: forwards;
animation-delay: calc($i/10) + s;
}
}
}
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment