@appthen/cli 1.2.11 → 1.2.12
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/bin/main.js +47 -0
- package/dist/index.js +6165 -14980
- package/package.json +8 -1
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1197 -741
- package/tests/test-app/.appthen/space-config.json +2 -2
- package/tests/test-app/src/components/MessageCenter.tsx +506 -0
- package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
- package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
- package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
- package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
- package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
- package/tests/test-app/src/pages/DataReport.tsx +298 -0
- package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
- package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
- package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
- package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
- package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
- package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
- package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
- package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
- package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
- package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
- package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
- package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
- package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
- package/tests/test-app/src/pages/UserProfile.tsx +404 -0
- package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
- package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
- package/tests/test-app/src/pages/article-list.tsx +222 -0
- package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
- package/tests/test-app/src/pages/category-list.tsx +179 -0
- package/tests/test-app/src/pages/comment-list.tsx +194 -0
- package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
- package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
- package/tests/test-app/src/pages/data-overview.tsx +600 -0
- package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
- package/tests/test-app/src/pages/department-list.tsx +183 -0
- package/tests/test-app/src/pages/goods-list.tsx +233 -0
- package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
- package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +1 -1
- package/tests/test-app/src/pages/notice-list.tsx +217 -0
- package/tests/test-app/src/pages/order-detail.tsx +330 -0
- package/tests/test-app/src/pages/order-list.tsx +195 -0
- package/tests/test-app/src/pages/order-management.tsx +563 -0
- package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
- package/tests/test-app/src/pages/role-list.tsx +184 -0
- package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
- package/tests/test-app/src/pages/simple-page.tsx +43 -0
- package/tests/test-app/src/pages/test-destructure.tsx +44 -0
- package/tests/test-app/src/pages/test-error-page.tsx +75 -0
- package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
- package/tests/test-app/src/pages/test-page.tsx +101 -0
- package/tests/test-app/src/pages/test-render.tsx +52 -0
- package/tests/test-app/src/pages/test-return-type.tsx +41 -0
- package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
- package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
- package/tests/test-app/src/pages/user-list.tsx +212 -0
- package/tests/test-app/src/pages/wrong-page.tsx +50 -0
- package/tests/test-app/.appthen/shadow-space-unknown-user-test-app-e99876b1.json +0 -1060
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 数据分析中心 - 业务监控大屏
|
|
3
|
+
* 实时监控业务数据,提供多维度分析
|
|
4
|
+
*
|
|
5
|
+
* @type Page
|
|
6
|
+
* @route /data-overview
|
|
7
|
+
* @screen 1920w
|
|
8
|
+
* @frames web
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IProps {
|
|
15
|
+
autoRefresh?: boolean;
|
|
16
|
+
refreshInterval?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* 数据与接口请求定义
|
|
21
|
+
*/
|
|
22
|
+
class IState {
|
|
23
|
+
/* 总销售额 */
|
|
24
|
+
totalSales?: number;
|
|
25
|
+
/* 今日访问 */
|
|
26
|
+
todayVisits?: number;
|
|
27
|
+
/* 新增用户 */
|
|
28
|
+
newUsers?: number;
|
|
29
|
+
/* 转化率 */
|
|
30
|
+
conversionRate?: number;
|
|
31
|
+
/* 平均客单价 */
|
|
32
|
+
avgOrderValue?: number;
|
|
33
|
+
/* 完成订单 */
|
|
34
|
+
completedOrders?: number;
|
|
35
|
+
/* 退款率 */
|
|
36
|
+
refundRate?: number;
|
|
37
|
+
/* 客户满意度 */
|
|
38
|
+
satisfactionRate?: number;
|
|
39
|
+
/* 销售数据(月份) */
|
|
40
|
+
monthlySales?: {
|
|
41
|
+
/* @example 1月 */month?: string,
|
|
42
|
+
/* @example 185000 */sales?: number,
|
|
43
|
+
/* @example 150000 */target?: number,
|
|
44
|
+
}[];
|
|
45
|
+
/* 分类销售占比 */
|
|
46
|
+
categorySales?: {
|
|
47
|
+
/* @example 电子产品 */name?: string,
|
|
48
|
+
/* @example 45 */value?: number,
|
|
49
|
+
/* @example #3b82f6 */color?: string,
|
|
50
|
+
/* @example 📱 */icon?: string,
|
|
51
|
+
}[];
|
|
52
|
+
/* 渠道流量 */
|
|
53
|
+
channelTraffic?: {
|
|
54
|
+
/* @example 直接访问 */name?: string,
|
|
55
|
+
/* @example 42 */value?: number,
|
|
56
|
+
/* @example #6366f1 */color?: string,
|
|
57
|
+
}[];
|
|
58
|
+
/* 热门地区 */
|
|
59
|
+
hotRegions?: {
|
|
60
|
+
/* @example 广东省 */name?: string,
|
|
61
|
+
/* @example 2850 */value?: number,
|
|
62
|
+
/* @example 22.5 */percentage?: number,
|
|
63
|
+
}[];
|
|
64
|
+
/* 活跃时段 */
|
|
65
|
+
activeHours?: {
|
|
66
|
+
/* @example 0-2 */hour?: string,
|
|
67
|
+
/* @example 320 */value?: number,
|
|
68
|
+
}[];
|
|
69
|
+
/* 最新活动 */
|
|
70
|
+
recentActivities?: {
|
|
71
|
+
/* @example order */type?: string,
|
|
72
|
+
/* @example 用户 28563 */user?: string,
|
|
73
|
+
/* @example 完成了一笔订单 */action?: string,
|
|
74
|
+
/* @example ¥12,580 */amount?: string,
|
|
75
|
+
/* @example 2分钟前 */time?: string,
|
|
76
|
+
}[];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
class Document extends React.Component<IProps, IState> {
|
|
80
|
+
state = {
|
|
81
|
+
totalSales: 2847560,
|
|
82
|
+
todayVisits: 15680,
|
|
83
|
+
newUsers: 892,
|
|
84
|
+
conversionRate: 4.8,
|
|
85
|
+
avgOrderValue: 385,
|
|
86
|
+
completedOrders: 7390,
|
|
87
|
+
refundRate: 2.1,
|
|
88
|
+
satisfactionRate: 96.5,
|
|
89
|
+
monthlySales: [
|
|
90
|
+
{ month: '1月', sales: 185000, target: 150000 },
|
|
91
|
+
{ month: '2月', sales: 223000, target: 150000 },
|
|
92
|
+
{ month: '3月', sales: 278000, target: 200000 },
|
|
93
|
+
{ month: '4月', sales: 245000, target: 200000 },
|
|
94
|
+
{ month: '5月', sales: 312000, target: 250000 },
|
|
95
|
+
{ month: '6月', sales: 356000, target: 300000 },
|
|
96
|
+
{ month: '7月', sales: 398000, target: 350000 },
|
|
97
|
+
{ month: '8月', sales: 425000, target: 350000 },
|
|
98
|
+
{ month: '9月', sales: 368000, target: 350000 },
|
|
99
|
+
{ month: '10月', sales: 389000, target: 350000 },
|
|
100
|
+
{ month: '11月', sales: 456000, target: 400000 },
|
|
101
|
+
{ month: '12月', sales: 512000, target: 500000 },
|
|
102
|
+
],
|
|
103
|
+
categorySales: [
|
|
104
|
+
{ name: '电子产品', value: 45, color: '#3b82f6', icon: '📱' },
|
|
105
|
+
{ name: '服装服饰', value: 28, color: '#10b981', icon: '👕' },
|
|
106
|
+
{ name: '家居生活', value: 15, color: '#f59e0b', icon: '🏠' },
|
|
107
|
+
{ name: '食品饮料', value: 8, color: '#ef4444', icon: '🍔' },
|
|
108
|
+
{ name: '其他', value: 4, color: '#8b5cf6', icon: '📦' },
|
|
109
|
+
],
|
|
110
|
+
channelTraffic: [
|
|
111
|
+
{ name: '直接访问', value: 42, color: '#6366f1' },
|
|
112
|
+
{ name: '搜索引擎', value: 28, color: '#ec4899' },
|
|
113
|
+
{ name: '社交媒体', value: 18, color: '#14b8a6' },
|
|
114
|
+
{ name: '广告投放', value: 8, color: '#f97316' },
|
|
115
|
+
{ name: '其他', value: 4, color: '#84cc16' },
|
|
116
|
+
],
|
|
117
|
+
hotRegions: [
|
|
118
|
+
{ name: '广东省', value: 2850, percentage: 22.5 },
|
|
119
|
+
{ name: '浙江省', value: 2180, percentage: 17.2 },
|
|
120
|
+
{ name: '江苏省', value: 1920, percentage: 15.1 },
|
|
121
|
+
{ name: '北京市', value: 1560, percentage: 12.3 },
|
|
122
|
+
{ name: '上海市', value: 1420, percentage: 11.2 },
|
|
123
|
+
],
|
|
124
|
+
activeHours: [
|
|
125
|
+
{ hour: '0-2', value: 320 },
|
|
126
|
+
{ hour: '2-4', value: 180 },
|
|
127
|
+
{ hour: '4-6', value: 150 },
|
|
128
|
+
{ hour: '6-8', value: 520 },
|
|
129
|
+
{ hour: '8-10', value: 1850 },
|
|
130
|
+
{ hour: '10-12', value: 2380 },
|
|
131
|
+
{ hour: '12-14', value: 1960 },
|
|
132
|
+
{ hour: '14-16', value: 2250 },
|
|
133
|
+
{ hour: '16-18', value: 2680 },
|
|
134
|
+
{ hour: '18-20', value: 3150 },
|
|
135
|
+
{ hour: '20-22', value: 2850 },
|
|
136
|
+
{ hour: '22-24', value: 890 },
|
|
137
|
+
],
|
|
138
|
+
recentActivities: [
|
|
139
|
+
{
|
|
140
|
+
type: 'order',
|
|
141
|
+
user: '用户 28563',
|
|
142
|
+
action: '完成了一笔订单',
|
|
143
|
+
amount: '¥12,580',
|
|
144
|
+
time: '2分钟前',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'register',
|
|
148
|
+
user: '新用户',
|
|
149
|
+
action: '注册成功',
|
|
150
|
+
amount: '-',
|
|
151
|
+
time: '5分钟前',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
type: 'refund',
|
|
155
|
+
user: '用户 18234',
|
|
156
|
+
action: '申请退款',
|
|
157
|
+
amount: '¥3,280',
|
|
158
|
+
time: '8分钟前',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: 'review',
|
|
162
|
+
user: '用户 45921',
|
|
163
|
+
action: '发布了评价',
|
|
164
|
+
amount: '⭐⭐⭐⭐⭐',
|
|
165
|
+
time: '12分钟前',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
type: 'order',
|
|
169
|
+
user: '用户 67123',
|
|
170
|
+
action: '完成了一笔订单',
|
|
171
|
+
amount: '¥8,950',
|
|
172
|
+
time: '15分钟前',
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
componentDidMount() {
|
|
178
|
+
this.loadData();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
async loadData() {
|
|
182
|
+
// 加载数据逻辑
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
getActivityIcon(type) {
|
|
186
|
+
const icons = {
|
|
187
|
+
order: '🛒',
|
|
188
|
+
register: '👤',
|
|
189
|
+
refund: '↩️',
|
|
190
|
+
review: '⭐',
|
|
191
|
+
};
|
|
192
|
+
return icons[type] || '📌';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
getActivityColor(type) {
|
|
196
|
+
const colors = {
|
|
197
|
+
order: 'bg-green-100 text-green-700',
|
|
198
|
+
register: 'bg-blue-100 text-blue-700',
|
|
199
|
+
refund: 'bg-red-100 text-red-700',
|
|
200
|
+
review: 'bg-yellow-100 text-yellow-700',
|
|
201
|
+
};
|
|
202
|
+
return colors[type] || 'bg-gray-100 text-gray-700';
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
render() {
|
|
206
|
+
return (
|
|
207
|
+
<Page className="bg-gradient-to-br from-[#0f172a] via-purple-900 to-[#0f172a] min-h-screen">
|
|
208
|
+
<View className="bg-slate-900/50 backdrop-blur-md border-white/10 pl-[32px] pr-[32px] pt-[24px] pb-[24px] border-b-[1px] border-b-solid">
|
|
209
|
+
<View className="flex items-center justify-between ml-[auto] mr-[auto]">
|
|
210
|
+
<View>
|
|
211
|
+
<h1 className="bg-gradient-to-r from-blue-400 via-purple-400 to-[#f472b6] [WebkitBackgroundClip:text] [WebkitTextFillColor:transparent] [backgroundClip:text] [backgroundClip:text] [WebkitBackgroundClip:text] text-[transparent] text-3xl font-bold">
|
|
212
|
+
🎯 数据分析中心
|
|
213
|
+
</h1>
|
|
214
|
+
<p className="text-[#9ca3af] mt-[4px]">
|
|
215
|
+
实时监控 · 智能分析 · 数据驱动
|
|
216
|
+
</p>
|
|
217
|
+
</View>
|
|
218
|
+
<View className="space-x-4 flex items-center">
|
|
219
|
+
<View className="bg-green-500/20 border-green-500/30 pl-[16px] pr-[16px] pt-[8px] pb-[8px] rounded-full border border-solid">
|
|
220
|
+
<Text className="text-[var(--green-400)] text-sm font-medium">
|
|
221
|
+
● 系统运行中
|
|
222
|
+
</Text>
|
|
223
|
+
</View>
|
|
224
|
+
<button
|
|
225
|
+
onClick={() => this.loadData()}
|
|
226
|
+
className="hover:shadow-lg hover:scale-105 transition-all duration-300 bg-gradient-to-r from-purple-500 to-[#ec4899] pl-[16px] pr-[16px] pt-[8px] pb-[8px] text-[#ffffff] rounded-lg font-medium"
|
|
227
|
+
>
|
|
228
|
+
🔄 刷新
|
|
229
|
+
</button>
|
|
230
|
+
</View>
|
|
231
|
+
</View>
|
|
232
|
+
</View>
|
|
233
|
+
<View className="p-[32px] ml-[auto] mr-[auto]">
|
|
234
|
+
<Row gutter={[24, 24]} className="mb-[32px]">
|
|
235
|
+
<Col xs={24} sm={12} lg={6}>
|
|
236
|
+
<View className="backdrop-blur-sm border-blue-500/30 hover:shadow-2xl hover:border-blue-400/50 transition-all duration-300 group bg-gradient-to-br from-[var(--blue-500/20)] to-[var(--blue-600/10)] border border-solid rounded-2xl p-[24px]">
|
|
237
|
+
<View className="flex items-center justify-between mb-[16px]">
|
|
238
|
+
<View className="group-hover:scale-110 transition-transform duration-300 text-4xl">
|
|
239
|
+
💰
|
|
240
|
+
</View>
|
|
241
|
+
<View className="bg-green-500/20 pl-[12px] pr-[12px] pt-[4px] pb-[4px] rounded-full text-[var(--green-400)] text-sm font-medium">
|
|
242
|
+
+15.2%
|
|
243
|
+
</View>
|
|
244
|
+
</View>
|
|
245
|
+
<View className="text-[#9ca3af] text-sm mb-[4px]">
|
|
246
|
+
总销售额
|
|
247
|
+
</View>
|
|
248
|
+
<View className="text-3xl font-bold text-[#ffffff] mb-[8px]">
|
|
249
|
+
¥<Text>{this.state.totalSales?.toLocaleString()}</Text>
|
|
250
|
+
</View>
|
|
251
|
+
<View className="text-[#6b7280] text-xs">目标达成率 96.8%</View>
|
|
252
|
+
</View>
|
|
253
|
+
</Col>
|
|
254
|
+
<Col xs={24} sm={12} lg={6}>
|
|
255
|
+
<View className="backdrop-blur-sm border-purple-500/30 hover:shadow-2xl hover:border-purple-400/50 transition-all duration-300 group bg-gradient-to-br from-[var(--purple-500/20)] to-[var(--purple-600/10)] border border-solid rounded-2xl p-[24px]">
|
|
256
|
+
<View className="flex items-center justify-between mb-[16px]">
|
|
257
|
+
<View className="group-hover:scale-110 transition-transform duration-300 text-4xl">
|
|
258
|
+
👁️
|
|
259
|
+
</View>
|
|
260
|
+
<View className="bg-green-500/20 pl-[12px] pr-[12px] pt-[4px] pb-[4px] rounded-full text-[var(--green-400)] text-sm font-medium">
|
|
261
|
+
+8.5%
|
|
262
|
+
</View>
|
|
263
|
+
</View>
|
|
264
|
+
<View className="text-[#9ca3af] text-sm mb-[4px]">
|
|
265
|
+
今日访问
|
|
266
|
+
</View>
|
|
267
|
+
<View className="text-3xl font-bold text-[#ffffff] mb-[8px]">
|
|
268
|
+
<Text>{this.state.todayVisits?.toLocaleString()}</Text>
|
|
269
|
+
</View>
|
|
270
|
+
<View className="text-[#6b7280] text-xs">较昨日增加 1,230</View>
|
|
271
|
+
</View>
|
|
272
|
+
</Col>
|
|
273
|
+
<Col xs={24} sm={12} lg={6}>
|
|
274
|
+
<View className="backdrop-blur-sm border-pink-500/30 hover:shadow-2xl hover:border-pink-400/50 transition-all duration-300 group bg-gradient-to-br from-[var(--pink-500/20)] to-[var(--pink-600/10)] border border-solid rounded-2xl p-[24px]">
|
|
275
|
+
<View className="flex items-center justify-between mb-[16px]">
|
|
276
|
+
<View className="group-hover:scale-110 transition-transform duration-300 text-4xl">
|
|
277
|
+
👥
|
|
278
|
+
</View>
|
|
279
|
+
<View className="bg-green-500/20 pl-[12px] pr-[12px] pt-[4px] pb-[4px] rounded-full text-[var(--green-400)] text-sm font-medium">
|
|
280
|
+
+12.3%
|
|
281
|
+
</View>
|
|
282
|
+
</View>
|
|
283
|
+
<View className="text-[#9ca3af] text-sm mb-[4px]">
|
|
284
|
+
新增用户
|
|
285
|
+
</View>
|
|
286
|
+
<View className="text-3xl font-bold text-[#ffffff] mb-[8px]">
|
|
287
|
+
<Text>{this.state.newUsers?.toLocaleString()}</Text>
|
|
288
|
+
</View>
|
|
289
|
+
<View className="text-[#6b7280] text-xs">用户总数 28,562</View>
|
|
290
|
+
</View>
|
|
291
|
+
</Col>
|
|
292
|
+
<Col xs={24} sm={12} lg={6}>
|
|
293
|
+
<View className="backdrop-blur-sm border-cyan-500/30 hover:shadow-2xl hover:border-cyan-400/50 transition-all duration-300 group bg-gradient-to-br from-[var(--cyan-500/20)] to-[var(--cyan-600/10)] border border-solid rounded-2xl p-[24px]">
|
|
294
|
+
<View className="flex items-center justify-between mb-[16px]">
|
|
295
|
+
<View className="group-hover:scale-110 transition-transform duration-300 text-4xl">
|
|
296
|
+
📊
|
|
297
|
+
</View>
|
|
298
|
+
<View className="bg-yellow-500/20 pl-[12px] pr-[12px] pt-[4px] pb-[4px] rounded-full text-[var(--yellow-400)] text-sm font-medium">
|
|
299
|
+
-2.1%
|
|
300
|
+
</View>
|
|
301
|
+
</View>
|
|
302
|
+
<View className="text-[#9ca3af] text-sm mb-[4px]">转化率</View>
|
|
303
|
+
<View className="text-3xl font-bold text-[#ffffff] mb-[8px]">
|
|
304
|
+
<Text>{this.state.conversionRate}</Text>%
|
|
305
|
+
</View>
|
|
306
|
+
<View className="text-[#6b7280] text-xs">行业平均 3.5%</View>
|
|
307
|
+
</View>
|
|
308
|
+
</Col>
|
|
309
|
+
</Row>
|
|
310
|
+
<Row gutter={[24, 24]} className="mb-[32px]">
|
|
311
|
+
<Col xs={24} sm={12} lg={4}>
|
|
312
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:bg-slate-700/50 transition-all duration-300 border border-solid rounded-xl p-[16px]">
|
|
313
|
+
<View className="text-[#9ca3af] text-xs mb-[8px]">
|
|
314
|
+
平均客单价
|
|
315
|
+
</View>
|
|
316
|
+
<View className="text-xl font-bold text-[#ffffff]">
|
|
317
|
+
¥<Text>{this.state.avgOrderValue}</Text>
|
|
318
|
+
</View>
|
|
319
|
+
</View>
|
|
320
|
+
</Col>
|
|
321
|
+
<Col xs={24} sm={12} lg={4}>
|
|
322
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:bg-slate-700/50 transition-all duration-300 border border-solid rounded-xl p-[16px]">
|
|
323
|
+
<View className="text-[#9ca3af] text-xs mb-[8px]">
|
|
324
|
+
完成订单
|
|
325
|
+
</View>
|
|
326
|
+
<View className="text-xl font-bold text-[#ffffff]">
|
|
327
|
+
<Text>{this.state.completedOrders?.toLocaleString()}</Text>
|
|
328
|
+
</View>
|
|
329
|
+
</View>
|
|
330
|
+
</Col>
|
|
331
|
+
<Col xs={24} sm={12} lg={4}>
|
|
332
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:bg-slate-700/50 transition-all duration-300 border border-solid rounded-xl p-[16px]">
|
|
333
|
+
<View className="text-[#9ca3af] text-xs mb-[8px]">退款率</View>
|
|
334
|
+
<View className="text-xl font-bold text-[#ffffff]">
|
|
335
|
+
<Text>{this.state.refundRate}</Text>%
|
|
336
|
+
</View>
|
|
337
|
+
</View>
|
|
338
|
+
</Col>
|
|
339
|
+
<Col xs={24} sm={12} lg={4}>
|
|
340
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:bg-slate-700/50 transition-all duration-300 border border-solid rounded-xl p-[16px]">
|
|
341
|
+
<View className="text-[#9ca3af] text-xs mb-[8px]">
|
|
342
|
+
客户满意度
|
|
343
|
+
</View>
|
|
344
|
+
<View className="text-xl font-bold text-[var(--green-400)]">
|
|
345
|
+
<Text>{this.state.satisfactionRate}</Text>%
|
|
346
|
+
</View>
|
|
347
|
+
</View>
|
|
348
|
+
</Col>
|
|
349
|
+
</Row>
|
|
350
|
+
<Row gutter={[24, 24]} className="mb-[32px]">
|
|
351
|
+
<Col xs={24}>
|
|
352
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:border-purple-500/30 transition-all duration-300 border border-solid rounded-2xl p-[24px]">
|
|
353
|
+
<View className="flex items-center justify-between mb-[24px]">
|
|
354
|
+
<h2 className="text-xl font-bold text-[#ffffff] flex items-center">{`月度销售趋势`}</h2>
|
|
355
|
+
<View className="space-x-4 flex items-center text-sm">
|
|
356
|
+
<Text className="text-[#9ca3af]">2024年度</Text>
|
|
357
|
+
<Text className="bg-green-500/20 pl-[12px] pr-[12px] pt-[4px] pb-[4px] rounded-full text-[var(--green-400)]">
|
|
358
|
+
达成率 94.2%
|
|
359
|
+
</Text>
|
|
360
|
+
</View>
|
|
361
|
+
</View>
|
|
362
|
+
<View className="space-y-3">
|
|
363
|
+
{this.state.monthlySales.map((item, index) => {
|
|
364
|
+
const actualPercent = (item.sales / 520000) * 100;
|
|
365
|
+
const targetPercent = (item.target / 520000) * 100;
|
|
366
|
+
const isOverTarget = item.sales >= item.target;
|
|
367
|
+
return (
|
|
368
|
+
<View key={index} className="flex items-center">
|
|
369
|
+
<View className="w-[48px] text-[#9ca3af] text-sm">
|
|
370
|
+
<Text>{item.month}</Text>
|
|
371
|
+
</View>
|
|
372
|
+
<View className="space-x-2 flex-1 flex items-center">
|
|
373
|
+
<View className="bg-slate-700/50 flex-1 rounded-full h-[24px] overflow-hidden relative">
|
|
374
|
+
<View
|
|
375
|
+
className="absolute top-0 left-0 h-full bg-gradient-to-r from-purple-500 to-pink-500 transition-all duration-500"
|
|
376
|
+
style={{ width: `${actualPercent}%` }}
|
|
377
|
+
/>
|
|
378
|
+
<View
|
|
379
|
+
className="absolute top-0 left-0 h-full border-2 border-dashed border-white/30 transition-all duration-500"
|
|
380
|
+
style={{ width: `${targetPercent}%` }}
|
|
381
|
+
/>
|
|
382
|
+
</View>
|
|
383
|
+
</View>
|
|
384
|
+
<View className="w-[96px] text-[var(--right)]">
|
|
385
|
+
<View
|
|
386
|
+
className={`text-sm font-medium ${
|
|
387
|
+
isOverTarget ? 'text-green-400' : 'text-white'
|
|
388
|
+
}`}
|
|
389
|
+
>
|
|
390
|
+
¥<Text>{(item.sales / 10000).toFixed(1)}</Text>万
|
|
391
|
+
</View>
|
|
392
|
+
</View>
|
|
393
|
+
</View>
|
|
394
|
+
);
|
|
395
|
+
})}
|
|
396
|
+
</View>
|
|
397
|
+
<View className="space-x-6 flex items-center justify-center mt-[16px] text-xs text-[#6b7280]">
|
|
398
|
+
<Text className="flex items-center">
|
|
399
|
+
<Text className="bg-gradient-to-r from-purple-500 to-[#ec4899] w-[16px] h-[16px] rounded mr-[8px]" />
|
|
400
|
+
实际销售
|
|
401
|
+
</Text>
|
|
402
|
+
<Text className="flex items-center">
|
|
403
|
+
<Text className="border-2 border-dashed border-white/30 w-[16px] h-[16px] rounded mr-[8px]" />
|
|
404
|
+
目标销售
|
|
405
|
+
</Text>
|
|
406
|
+
</View>
|
|
407
|
+
</View>
|
|
408
|
+
</Col>
|
|
409
|
+
</Row>
|
|
410
|
+
<Row gutter={[24, 24]} className="mb-[32px]">
|
|
411
|
+
<Col xs={24} lg={12}>
|
|
412
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:border-blue-500/30 transition-all duration-300 border border-solid rounded-2xl p-[24px]">
|
|
413
|
+
<h2 className="text-xl font-bold text-[#ffffff] mb-[24px] flex items-center">{`分类销售占比`}</h2>
|
|
414
|
+
<View className="space-y-4">
|
|
415
|
+
{this.state.categorySales.map((item, index) => (
|
|
416
|
+
<View key={index}>
|
|
417
|
+
<View className="flex items-center justify-between mb-[8px]">
|
|
418
|
+
<View className="flex items-center">
|
|
419
|
+
<Text className="text-2xl mr-[12px]">
|
|
420
|
+
{item.icon}
|
|
421
|
+
</Text>
|
|
422
|
+
<Text className="text-[#d1d5db] font-medium">
|
|
423
|
+
{item.name}
|
|
424
|
+
</Text>
|
|
425
|
+
</View>
|
|
426
|
+
<Text className="text-[#ffffff] font-bold">
|
|
427
|
+
{item.value}%
|
|
428
|
+
</Text>
|
|
429
|
+
</View>
|
|
430
|
+
<View className="bg-slate-700/50 w-full rounded-full h-[12px] overflow-hidden">
|
|
431
|
+
<View
|
|
432
|
+
className="h-full rounded-full transition-all duration-500"
|
|
433
|
+
style={{
|
|
434
|
+
width: `${item.value}%`,
|
|
435
|
+
backgroundColor: item.color,
|
|
436
|
+
}}
|
|
437
|
+
/>
|
|
438
|
+
</View>
|
|
439
|
+
</View>
|
|
440
|
+
))}
|
|
441
|
+
</View>
|
|
442
|
+
</View>
|
|
443
|
+
</Col>
|
|
444
|
+
<Col xs={24} lg={12}>
|
|
445
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:border-pink-500/30 transition-all duration-300 border border-solid rounded-2xl p-[24px]">
|
|
446
|
+
<h2 className="text-xl font-bold text-[#ffffff] mb-[24px] flex items-center">{`渠道流量来源`}</h2>
|
|
447
|
+
<View className="space-y-4">
|
|
448
|
+
{this.state.channelTraffic.map((item, index) => (
|
|
449
|
+
<View key={index}>
|
|
450
|
+
<View className="flex items-center justify-between mb-[8px]">
|
|
451
|
+
<Text className="text-[#d1d5db] font-medium">
|
|
452
|
+
{item.name}
|
|
453
|
+
</Text>
|
|
454
|
+
<Text className="text-[#ffffff] font-bold">
|
|
455
|
+
{item.value}%
|
|
456
|
+
</Text>
|
|
457
|
+
</View>
|
|
458
|
+
<View className="bg-slate-700/50 w-full rounded-full h-[12px] overflow-hidden">
|
|
459
|
+
<View
|
|
460
|
+
className="h-full rounded-full transition-all duration-500"
|
|
461
|
+
style={{
|
|
462
|
+
width: `${item.value}%`,
|
|
463
|
+
backgroundColor: item.color,
|
|
464
|
+
}}
|
|
465
|
+
/>
|
|
466
|
+
</View>
|
|
467
|
+
</View>
|
|
468
|
+
))}
|
|
469
|
+
</View>
|
|
470
|
+
</View>
|
|
471
|
+
</Col>
|
|
472
|
+
</Row>
|
|
473
|
+
<Row gutter={[24, 24]} className="mb-[32px]">
|
|
474
|
+
<Col xs={24} lg={12}>
|
|
475
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:border-green-500/30 transition-all duration-300 border border-solid rounded-2xl p-[24px]">
|
|
476
|
+
<h2 className="text-xl font-bold text-[#ffffff] mb-[24px] flex items-center">{`热门地区 TOP 5`}</h2>
|
|
477
|
+
<View className="space-y-4">
|
|
478
|
+
{this.state.hotRegions.map((region, index) => (
|
|
479
|
+
<View
|
|
480
|
+
key={index}
|
|
481
|
+
className="flex items-center justify-between"
|
|
482
|
+
>
|
|
483
|
+
<View className="flex items-center">
|
|
484
|
+
<View
|
|
485
|
+
className={`w-8 h-8 rounded-lg flex items-center justify-center mr-3 text-white font-bold ${
|
|
486
|
+
index === 0
|
|
487
|
+
? 'bg-gradient-to-br from-yellow-400 to-yellow-600'
|
|
488
|
+
: index === 1
|
|
489
|
+
? 'bg-gradient-to-br from-gray-400 to-gray-600'
|
|
490
|
+
: index === 2
|
|
491
|
+
? 'bg-gradient-to-br from-orange-400 to-orange-600'
|
|
492
|
+
: 'bg-gradient-to-br from-slate-500 to-slate-600'
|
|
493
|
+
}`}
|
|
494
|
+
>
|
|
495
|
+
<Text>{index + 1}</Text>
|
|
496
|
+
</View>
|
|
497
|
+
<Text className="text-[#d1d5db] font-medium">
|
|
498
|
+
{region.name}
|
|
499
|
+
</Text>
|
|
500
|
+
</View>
|
|
501
|
+
<View className="text-[var(--right)]">
|
|
502
|
+
<View className="text-[#ffffff] font-bold">
|
|
503
|
+
<Text>{region.value?.toLocaleString()}</Text>
|
|
504
|
+
</View>
|
|
505
|
+
<View className="text-[#6b7280] text-xs">
|
|
506
|
+
<Text>{region.percentage}</Text>%
|
|
507
|
+
</View>
|
|
508
|
+
</View>
|
|
509
|
+
</View>
|
|
510
|
+
))}
|
|
511
|
+
</View>
|
|
512
|
+
</View>
|
|
513
|
+
</Col>
|
|
514
|
+
<Col xs={24} lg={12}>
|
|
515
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:border-orange-500/30 transition-all duration-300 border border-solid rounded-2xl p-[24px]">
|
|
516
|
+
<h2 className="text-xl font-bold text-[#ffffff] mb-[24px] flex items-center">{`活跃时段分布`}</h2>
|
|
517
|
+
<View className="space-y-2">
|
|
518
|
+
{this.state.activeHours.map((item, index) => {
|
|
519
|
+
const max = Math.max(
|
|
520
|
+
...this.state.activeHours.map(h => h.value)
|
|
521
|
+
);
|
|
522
|
+
const percent = (item.value / max) * 100;
|
|
523
|
+
const isActive = item.value >= 2000;
|
|
524
|
+
return (
|
|
525
|
+
<View key={index} className="flex items-center">
|
|
526
|
+
<View className="w-[56px] text-[#9ca3af] text-sm">
|
|
527
|
+
<Text>{item.hour}</Text>
|
|
528
|
+
</View>
|
|
529
|
+
<View className="bg-slate-700/50 flex-1 rounded-full h-[20px] overflow-hidden">
|
|
530
|
+
<View
|
|
531
|
+
className={`h-full rounded-full transition-all duration-300 ${
|
|
532
|
+
isActive
|
|
533
|
+
? 'bg-gradient-to-r from-orange-400 to-pink-500'
|
|
534
|
+
: 'bg-gradient-to-r from-slate-600 to-slate-500'
|
|
535
|
+
}`}
|
|
536
|
+
style={{ width: `${percent}%` }}
|
|
537
|
+
/>
|
|
538
|
+
</View>
|
|
539
|
+
<View className="w-[64px] text-[#9ca3af] text-sm">
|
|
540
|
+
<Text>{item.value}</Text>
|
|
541
|
+
</View>
|
|
542
|
+
</View>
|
|
543
|
+
);
|
|
544
|
+
})}
|
|
545
|
+
</View>
|
|
546
|
+
</View>
|
|
547
|
+
</Col>
|
|
548
|
+
</Row>
|
|
549
|
+
<Row gutter={[24, 24]}>
|
|
550
|
+
<Col xs={24}>
|
|
551
|
+
<View className="bg-slate-800/50 backdrop-blur-sm border-slate-700/50 hover:border-cyan-500/30 transition-all duration-300 border border-solid rounded-2xl p-[24px]">
|
|
552
|
+
<h2 className="text-xl font-bold text-[#ffffff] mb-[24px] flex items-center">{`最新动态`}</h2>
|
|
553
|
+
<View className="space-y-3">
|
|
554
|
+
{this.state.recentActivities.map((activity, index) => (
|
|
555
|
+
<View
|
|
556
|
+
key={index}
|
|
557
|
+
className="bg-slate-700/30 hover:bg-slate-700/50 transition-all duration-300 flex items-center justify-between p-[16px] rounded-xl cursor-pointer"
|
|
558
|
+
>
|
|
559
|
+
<View className="flex items-center flex-1">
|
|
560
|
+
<View
|
|
561
|
+
className={`w-10 h-10 rounded-full flex items-center justify-center mr-4 ${this.getActivityColor(
|
|
562
|
+
activity.type
|
|
563
|
+
)}`}
|
|
564
|
+
>
|
|
565
|
+
<Text className="text-lg">
|
|
566
|
+
{this.getActivityIcon(activity.type)}
|
|
567
|
+
</Text>
|
|
568
|
+
</View>
|
|
569
|
+
<View className="flex-1">
|
|
570
|
+
<View className="space-x-2 flex items-center">
|
|
571
|
+
<Text className="text-[#ffffff] font-medium">
|
|
572
|
+
{activity.user}
|
|
573
|
+
</Text>
|
|
574
|
+
<Text className="text-[#9ca3af]">
|
|
575
|
+
{activity.action}
|
|
576
|
+
</Text>
|
|
577
|
+
</View>
|
|
578
|
+
<View className="text-[#6b7280] text-sm mt-[4px]">
|
|
579
|
+
<Text>{activity.time}</Text>
|
|
580
|
+
</View>
|
|
581
|
+
</View>
|
|
582
|
+
</View>
|
|
583
|
+
<View className="text-[var(--right)] ml-[16px]">
|
|
584
|
+
<View className="text-[#ffffff] font-bold">
|
|
585
|
+
<Text>{activity.amount}</Text>
|
|
586
|
+
</View>
|
|
587
|
+
</View>
|
|
588
|
+
</View>
|
|
589
|
+
))}
|
|
590
|
+
</View>
|
|
591
|
+
</View>
|
|
592
|
+
</Col>
|
|
593
|
+
</Row>
|
|
594
|
+
</View>
|
|
595
|
+
</Page>
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export default Document;
|