index.vue
2.48 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<template>
<el-card shadow="never" class="todo-box">
<div slot="header" class="portal-common-title">
<span>{{title}}</span>
</div>
<div class="todo-box-body">
<router-link class="item" to="/workFlow/flowTodo">
<i class="icon-ym icon-ym-flowTodo"></i>
<div class="text">
<p class="num">{{toBeReviewed}}</p>
<p class="name">待我审核</p>
</div>
</router-link>
<router-link class="item" to="/workFlow/entrust">
<i class="icon-ym icon-ym-flowEntrust"></i>
<div class="text">
<p class="num">{{entrust}}</p>
<p class="name">流程委托</p>
</div>
</router-link>
<router-link class="item" to="/workFlow/flowDone">
<i class="icon-ym icon-ym-flowDone"></i>
<div class="text">
<p class="num">{{flowDone}}</p>
<p class="name">已办事宜</p>
</div>
</router-link>
</div>
</el-card>
</template>
<script>
import { getFlowTodoCount } from '@/api/home'
export default {
props: {
title: { type: String, default: '' }
},
data() {
return {
entrust: 0,
flowDone: 0,
toBeReviewed: 0
}
},
created() {
this.getData()
},
methods: {
getData() {
getFlowTodoCount().then(res => {
this.entrust = res.data.entrust || 0
this.flowDone = res.data.flowDone || 0
this.toBeReviewed = res.data.toBeReviewed || 0
})
}
}
}
</script>
<style lang="scss" scoped>
.todo-box {
>>> .el-card__body {
width: 100%;
height: calc(100% - 55px);
}
.todo-box-body {
padding: 0 30px;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.item {
height: 56px;
display: block;
i {
width: 56px;
height: 56px;
margin-right: 14px;
border-radius: 50%;
color: #fff;
display: inline-block;
vertical-align: top;
text-align: center;
line-height: 56px;
font-size: 30px;
&.icon-ym-flowTodo {
background: #f68900;
}
&.icon-ym-flowEntrust {
background: #1890ff;
}
&.icon-ym-flowDone {
background: #7b1ae1;
}
}
.text {
display: inline-block;
height: 56px;
.num {
font-size: 20px;
line-height: 36px;
}
.name {
font-size: 14px;
color: #666;
}
}
}
}
}
</style>