time-search.vue
3.39 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<template>
<a-row align="center" class="time-search">
<a-col>
<a-row align="center" style="width: 100%;">
<!-- 左侧时间范围 -->
<a-col :span="12">
<a-space>
<a-typography-text class="search-label">时间范围</a-typography-text>
<a-range-picker class="search-picker" :time-picker-props="{ defaultValue: ['00:00:00', '09:09:06'] }"
format="YYYY-MM-DD">
</a-range-picker>
<a-button type="primary" class="search-button">查询</a-button>
</a-space>
</a-col>
<!-- 右侧年月日返回 -->
<a-col :span="12" style="text-align: right;">
<a-space>
<a-button type="primary" class="time-button">年</a-button>
<a-button type="primary" class="time-button">月</a-button>
<a-button type="primary" class="time-button">日</a-button>
<a-button type="primary" class="search-button" @click="back">
<img src="@/assets/bi/technology/icon-back.png" alt="">
返回</a-button>
</a-space>
</a-col>
</a-row>
</a-col>
</a-row>
</template>
<script setup lang="ts">
import {useRoute, useRouter} from "vue-router";
const route = useRoute()
const router = useRouter();
// 返回
const back = () => {
console.log("返回");
if(route.path === '/biTwo'){
router.push({
path: '/bi',
query: {tId: 2}
})
}
}
</script>
<style lang="less" scoped>
@font-size: 16px;
@font-size-mini: 14px;
@font-size-medium: 18px;
@font-size-large: 24px;
@color-w: white;
@font-family: Source Han Sans;
.time-search {
padding: 12px 32px;
box-sizing: border-box;
font-family: @font-family;
.arco-col {
height: 100%;
}
.search-label {
font-size: @font-size-medium;
font-weight: normal;
color: #fff;
margin-right: 20px;
}
/* 时间选择器 */
:deep(.arco-picker) {
width: 328px;
background-color: transparent;
border: 1px solid rgba(15, 141, 255, 0.6);
.arco-picker-range {
z-index: 2;
}
input {
background-color: transparent;
color: @color-w;
text-align: center;
}
input::placeholder {
color: @color-w;
}
.arco-picker-separator {
color: @color-w;
}
.arco-picker-suffix-icon {
color: @color-w;
}
}
:deep(.arco-picker-week-list-item) {
font-size: @font-size-medium;
}
/* 查询,返回按钮 */
.search-button {
padding: 5px 16px;
box-sizing: border-box;
background: linear-gradient(0deg, rgba(15, 141, 255, 0.4) 0%, rgba(15, 141, 255, 0) 100%);
border: 1px solid rgba(15, 141, 255, 0.1);
margin-left: 20px;
font-size: @font-size-medium;
font-weight: normal;
line-height: 22px;
color: @color-w;
&:hover {
background: linear-gradient(0deg, rgba(15, 141, 255, 0.6) 0%, rgba(15, 141, 255, 0) 100%);
}
img {
margin-right: 8px;
}
}
/* 年月日按钮 */
.time-button {
padding: 3px 7px;
border-radius: 4px;
box-sizing: border-box;
border: 1px solid #3490E3;
background-color: transparent;
&:hover {
background: linear-gradient(0deg, rgba(15, 141, 255, 0.6) 0%, rgba(15, 141, 255, 0) 100%);
}
}
}
</style>