befly-admin-ui 1.46.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/views/projectStats/index.vue +71 -58
package/package.json
CHANGED
|
@@ -9,40 +9,51 @@
|
|
|
9
9
|
<div class="section-content">
|
|
10
10
|
<div class="project-row-list">
|
|
11
11
|
<div v-for="item in $Computed.productRows" :key="item.key" class="product-row">
|
|
12
|
-
<div class="
|
|
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
|
-
|
|
12
|
+
<div class="product-title">{{ $Method.formatProductTitle(item) }}</div>
|
|
13
|
+
|
|
14
|
+
<t-row :gutter="[16, 16]">
|
|
15
|
+
<t-col :xs="12" :sm="6" :md="4" :lg="2" class="metric-col">
|
|
16
|
+
<div class="metric-card">
|
|
17
|
+
<span class="metric-label">在线人数</span>
|
|
18
|
+
<strong class="metric-value-online">{{ item.onlineCount }}</strong>
|
|
19
|
+
</div>
|
|
20
|
+
</t-col>
|
|
21
|
+
|
|
22
|
+
<t-col :xs="12" :sm="6" :md="4" :lg="2" class="metric-col">
|
|
23
|
+
<div class="metric-card">
|
|
24
|
+
<span class="metric-label">今日访客</span>
|
|
25
|
+
<strong class="metric-value-visitor">{{ item.today }}</strong>
|
|
26
|
+
</div>
|
|
27
|
+
</t-col>
|
|
28
|
+
|
|
29
|
+
<t-col :xs="12" :sm="6" :md="4" :lg="2" class="metric-col">
|
|
30
|
+
<div class="metric-card">
|
|
31
|
+
<span class="metric-label">昨日访客</span>
|
|
32
|
+
<strong class="metric-value-visitor">{{ item.yesterday }}</strong>
|
|
33
|
+
</div>
|
|
34
|
+
</t-col>
|
|
35
|
+
|
|
36
|
+
<t-col :xs="12" :sm="6" :md="4" :lg="2" class="metric-col">
|
|
37
|
+
<div class="metric-card">
|
|
38
|
+
<span class="metric-label">前天访客</span>
|
|
39
|
+
<strong class="metric-value-visitor">{{ item.dayBeforeYesterday }}</strong>
|
|
40
|
+
</div>
|
|
41
|
+
</t-col>
|
|
42
|
+
|
|
43
|
+
<t-col :xs="12" :sm="6" :md="4" :lg="2" class="metric-col">
|
|
44
|
+
<div class="metric-card">
|
|
45
|
+
<span class="metric-label">近30天访客</span>
|
|
46
|
+
<strong class="metric-value-visitor">{{ item.recent30 }}</strong>
|
|
47
|
+
</div>
|
|
48
|
+
</t-col>
|
|
49
|
+
|
|
50
|
+
<t-col :xs="12" :sm="6" :md="4" :lg="2" class="metric-col">
|
|
51
|
+
<div class="metric-card">
|
|
52
|
+
<span class="metric-label">本月访客</span>
|
|
53
|
+
<strong class="metric-value-visitor">{{ item.month }}</strong>
|
|
54
|
+
</div>
|
|
55
|
+
</t-col>
|
|
56
|
+
</t-row>
|
|
46
57
|
</div>
|
|
47
58
|
</div>
|
|
48
59
|
</div>
|
|
@@ -52,6 +63,7 @@
|
|
|
52
63
|
|
|
53
64
|
<script setup>
|
|
54
65
|
import { ChartIcon } from "tdesign-icons-vue-next";
|
|
66
|
+
import { Col as TCol, Row as TRow } from "tdesign-vue-next";
|
|
55
67
|
import { computed, reactive } from "vue";
|
|
56
68
|
|
|
57
69
|
import { $Http } from "@/plugins/http.js";
|
|
@@ -77,6 +89,16 @@ const $Method = {
|
|
|
77
89
|
month: Number(visitItem?.month || 0)
|
|
78
90
|
};
|
|
79
91
|
},
|
|
92
|
+
formatProductTitle: function (row) {
|
|
93
|
+
const productName = row?.productName;
|
|
94
|
+
const productCode = row?.productCode;
|
|
95
|
+
|
|
96
|
+
if (productName && productCode) {
|
|
97
|
+
return `${productName}(${productCode})`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return productName || productCode || "-";
|
|
101
|
+
},
|
|
80
102
|
mapProjectRows: function (infoStatsData, onlineStatsData) {
|
|
81
103
|
const onlineMap = new Map();
|
|
82
104
|
|
|
@@ -137,14 +159,24 @@ $Method.fetchData();
|
|
|
137
159
|
.project-row-list {
|
|
138
160
|
display: flex;
|
|
139
161
|
flex-direction: column;
|
|
140
|
-
gap:
|
|
162
|
+
gap: 20px;
|
|
141
163
|
}
|
|
142
164
|
|
|
143
165
|
.product-row {
|
|
144
|
-
display:
|
|
145
|
-
|
|
146
|
-
gap:
|
|
147
|
-
|
|
166
|
+
display: flex;
|
|
167
|
+
flex-direction: column;
|
|
168
|
+
gap: 12px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.product-title {
|
|
172
|
+
font-size: 16px;
|
|
173
|
+
font-weight: 700;
|
|
174
|
+
color: var(--text-primary);
|
|
175
|
+
line-height: 1.2;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.metric-col {
|
|
179
|
+
min-width: 0;
|
|
148
180
|
}
|
|
149
181
|
|
|
150
182
|
.metric-label {
|
|
@@ -157,12 +189,6 @@ $Method.fetchData();
|
|
|
157
189
|
color: var(--error-color);
|
|
158
190
|
}
|
|
159
191
|
|
|
160
|
-
.metric-value-name {
|
|
161
|
-
@include dashboardCard.dashboardCardMainValue();
|
|
162
|
-
|
|
163
|
-
text-align: left;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
192
|
.metric-card {
|
|
167
193
|
display: flex;
|
|
168
194
|
flex-direction: column;
|
|
@@ -173,7 +199,6 @@ $Method.fetchData();
|
|
|
173
199
|
|
|
174
200
|
gap: 8px;
|
|
175
201
|
justify-content: flex-start;
|
|
176
|
-
min-height: 100%;
|
|
177
202
|
padding: 12px;
|
|
178
203
|
}
|
|
179
204
|
|
|
@@ -184,16 +209,4 @@ $Method.fetchData();
|
|
|
184
209
|
text-align: left;
|
|
185
210
|
white-space: nowrap;
|
|
186
211
|
}
|
|
187
|
-
|
|
188
|
-
@media (max-width: 1280px) {
|
|
189
|
-
.product-row {
|
|
190
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
@media (max-width: 720px) {
|
|
195
|
-
.product-row {
|
|
196
|
-
grid-template-columns: 1fr;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
212
|
</style>
|