404.vue
1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<template>
<div class="page">
<div class="image-404"></div>
<div class="right">
<div class="text-404"></div>
<div class="text">抱歉,你访问的页面不存在</div>
<el-button type="primary" size="medium" @click="handleClick"
>返回首页</el-button
>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import { PERMISSION_USER_MAP } from '@/utils/mappingData'
export default {
computed: {
...mapState(['roles'])
},
methods: {
handleClick() {
if (this.roles === PERMISSION_USER_MAP.auditor.code) {
this.$router.push({ path: '/task/work' })
} else {
this.$router.push({ path: '/' })
}
}
}
}
</script>
<style lang="scss" scoped>
.page {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
background-color: #f0f2f5;
.image-404 {
width: 443px;
height: 342px;
margin-right: 121px;
background-image: url('../assets/image/404image.png');
background-repeat: no-repeat;
}
.right {
height: 342px;
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: flex-start;
.text-404 {
width: 161px;
height: 74px;
background-image: url('../assets/image/404.png');
background-repeat: no-repeat;
}
.text {
margin: 24px 0 16px 0;
width: 240px;
height: 28px;
font-size: 20px;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 28px;
}
}
}
</style>