ViewTitle.vue
2.45 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
110
111
112
113
<template>
<div class="content flex">
<div class="logo user-select">
<img style="height: 4vh" src="@/assets/images/logo.svg" alt="logo" />
</div>
<div class="view-title flex user-select">XXX集团客户池数据大屏</div>
<div class="time">
<div class="top flex">
<img src="@/assets/images/time.svg" class="icon" />
<div class="now">{{ now }}</div>
</div>
<div class="bottom flex">
<div class="merchant">已同步门店数:160</div>
数据截止至 {{ yesterday }}
</div>
</div>
<div class="center-control">
<view-control />
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'ViewTitle',
data () {
return {
yesterday: '',
now: new Date().format('yyyy-MM-dd hh:mm:ss')
}
},
mounted () {
this.yesterday = new Date(new Date().setDate(new Date().getDate() - 1)).format('yyyy-MM-dd')
this.timer()
},
methods: {
timer () {
setInterval(() => {
this.now = new Date().format('yyyy-MM-dd hh:mm:ss')
}, 1e3)
}
}
}
</script>
<style scoped lang="scss">
.content {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0 24px;
position: relative;
background: #1d1c1c;
z-index: 9999999999;
.view-title {
color: transparent;
background: linear-gradient(left, #e60115 10%, #eb6001 25%, #f5aa01 50%, #fdf006 100%);
-webkit-background-clip: text;
font-size: 22px;
font-weight: 600;
&::before {
content: '';
display: block;
background: #373739;
width: 1px;
height: 20px;
margin: 0 8px;
}
}
.time {
margin-left: auto;
text-align: right;
font-size: 14px;
color: #ffffff;
.top {
justify-content: flex-end;
}
.icon {
width: 16px;
height: 16px;
margin-right: 8px;
}
.bottom {
font-size: 10px;
line-height: 16px;
color: #fff;
.merchant {
color: #eb6001;
margin-right: 10px;
padding-right: 10px;
position: relative;
&::after {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 1px;
height: 1.5vh;
content: '';
background-color: #606266;
}
}
}
}
.center-control {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 2;
}
}
</style>