@appthen/cli 1.2.11 → 1.2.13

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.
Files changed (59) hide show
  1. package/bin/main.js +47 -0
  2. package/dist/index.js +6185 -15001
  3. package/package.json +8 -4
  4. package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1197 -741
  5. package/tests/test-app/.appthen/space-config.json +2 -2
  6. package/tests/test-app/src/components/MessageCenter.tsx +506 -0
  7. package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
  8. package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
  9. package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
  10. package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
  11. package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
  12. package/tests/test-app/src/pages/DataReport.tsx +298 -0
  13. package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
  14. package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
  15. package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
  16. package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
  17. package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
  18. package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
  19. package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
  20. package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
  21. package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
  22. package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
  23. package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
  24. package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
  25. package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
  26. package/tests/test-app/src/pages/UserProfile.tsx +404 -0
  27. package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
  28. package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
  29. package/tests/test-app/src/pages/article-list.tsx +222 -0
  30. package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
  31. package/tests/test-app/src/pages/category-list.tsx +179 -0
  32. package/tests/test-app/src/pages/comment-list.tsx +194 -0
  33. package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
  34. package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
  35. package/tests/test-app/src/pages/data-overview.tsx +600 -0
  36. package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
  37. package/tests/test-app/src/pages/department-list.tsx +183 -0
  38. package/tests/test-app/src/pages/goods-list.tsx +233 -0
  39. package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
  40. package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +1 -1
  41. package/tests/test-app/src/pages/notice-list.tsx +217 -0
  42. package/tests/test-app/src/pages/order-detail.tsx +330 -0
  43. package/tests/test-app/src/pages/order-list.tsx +195 -0
  44. package/tests/test-app/src/pages/order-management.tsx +563 -0
  45. package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
  46. package/tests/test-app/src/pages/role-list.tsx +184 -0
  47. package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
  48. package/tests/test-app/src/pages/simple-page.tsx +43 -0
  49. package/tests/test-app/src/pages/test-destructure.tsx +44 -0
  50. package/tests/test-app/src/pages/test-error-page.tsx +75 -0
  51. package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
  52. package/tests/test-app/src/pages/test-page.tsx +101 -0
  53. package/tests/test-app/src/pages/test-render.tsx +52 -0
  54. package/tests/test-app/src/pages/test-return-type.tsx +41 -0
  55. package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
  56. package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
  57. package/tests/test-app/src/pages/user-list.tsx +212 -0
  58. package/tests/test-app/src/pages/wrong-page.tsx +50 -0
  59. package/tests/test-app/.appthen/shadow-space-unknown-user-test-app-e99876b1.json +0 -1060
@@ -0,0 +1,195 @@
1
+ /**
2
+ * 订单列表
3
+ * 查看和管理所有订单信息
4
+ *
5
+ * @type Page
6
+ * @route /orders-list
7
+ * @screen 1920w
8
+ * @frames web
9
+ */
10
+ import React from 'react';
11
+
12
+
13
+
14
+ class IProps {}
15
+
16
+ /*
17
+ * 数据与接口请求定义
18
+ */
19
+ class IState {
20
+ orders?: {
21
+ /* @example 1 */id?: number,
22
+ /* @example ORD-2024-001 */orderNo?: string,
23
+ /* @example 张三 */customer?: string,
24
+ /* @example 12999 */amount?: number,
25
+ /* @example completed */status?: string,
26
+ /* @example 2024-01-15 */createTime?: string,
27
+ }[];
28
+ loading?: boolean;
29
+ searchKeyword?: string;
30
+ }
31
+
32
+ class Document extends React.Component<IProps, IState> {
33
+ state = {
34
+ orders: [
35
+ {
36
+ id: 1,
37
+ orderNo: 'ORD-2024-001',
38
+ customer: '张三',
39
+ amount: 12999,
40
+ status: 'completed',
41
+ createTime: '2024-01-15',
42
+ },
43
+ {
44
+ id: 2,
45
+ orderNo: 'ORD-2024-002',
46
+ customer: '李四',
47
+ amount: 5999,
48
+ status: 'pending',
49
+ createTime: '2024-02-20',
50
+ },
51
+ {
52
+ id: 3,
53
+ orderNo: 'ORD-2024-003',
54
+ customer: '王五',
55
+ amount: 8999,
56
+ status: 'shipped',
57
+ createTime: '2024-03-10',
58
+ },
59
+ {
60
+ id: 4,
61
+ orderNo: 'ORD-2024-004',
62
+ customer: '赵六',
63
+ amount: 25999,
64
+ status: 'processing',
65
+ createTime: '2024-04-05',
66
+ },
67
+ {
68
+ id: 5,
69
+ orderNo: 'ORD-2024-005',
70
+ customer: '钱七',
71
+ amount: 799,
72
+ status: 'cancelled',
73
+ createTime: '2024-05-12',
74
+ },
75
+ ],
76
+ loading: false,
77
+ searchKeyword: '',
78
+ };
79
+
80
+ handleSearch(value) {
81
+ this.setState({
82
+ searchKeyword: value,
83
+ });
84
+ }
85
+
86
+ handleAdd() {
87
+ console.log('添加订单');
88
+ }
89
+
90
+ handleEdit(record) {
91
+ console.log('编辑订单', record);
92
+ }
93
+
94
+ handleDelete(record) {
95
+ console.log('删除订单', record);
96
+ }
97
+
98
+ getStatusTag(status) {
99
+ if (status === 'completed') {
100
+ return <Tag color="green">已完成</Tag>;
101
+ }
102
+ if (status === 'pending') {
103
+ return <Tag color="orange">待付款</Tag>;
104
+ }
105
+ if (status === 'processing') {
106
+ return <Tag color="blue">处理中</Tag>;
107
+ }
108
+ if (status === 'shipped') {
109
+ return <Tag color="cyan">已发货</Tag>;
110
+ }
111
+ return <Tag color="gray">已取消</Tag>;
112
+ }
113
+
114
+ render() {
115
+ return (
116
+ <Page className="p-[24px] bg-[var(--gray-50)] min-h-screen">
117
+ <View className="mb-[24px]">
118
+ <h1 className="text-2xl font-bold text-[#1f2937]">订单列表</h1>
119
+ <p className="text-[#6b7280] text-sm mt-[4px]">
120
+ 管理系统中的所有订单信息
121
+ </p>
122
+ </View>
123
+ <Card className="mb-[24px]">
124
+ <View className="flex items-center justify-between">
125
+ <Input
126
+ placeholder="搜索订单号/客户姓名"
127
+ value={this.state.searchKeyword}
128
+ onChange={e => this.handleSearch(e.target.value)}
129
+ prefix="🔍"
130
+ className=""
131
+ />
132
+ <Button type="primary" onClick={() => this.handleAdd()}>
133
+ + 新增订单
134
+ </Button>
135
+ </View>
136
+ </Card>
137
+ <Card>
138
+ <Table
139
+ loading={this.state.loading}
140
+ columns={[
141
+ { title: 'ID', dataIndex: 'id', key: 'id', width: 80 },
142
+ { title: '订单号', dataIndex: 'orderNo', key: 'orderNo' },
143
+ { title: '客户', dataIndex: 'customer', key: 'customer' },
144
+ {
145
+ title: '金额',
146
+ dataIndex: 'amount',
147
+ key: 'amount',
148
+ render: function (text) {
149
+ return `¥${text}`;
150
+ },
151
+ },
152
+ {
153
+ title: '状态',
154
+ dataIndex: 'status',
155
+ key: 'status',
156
+ render: function (text) {
157
+ return this.getStatusTag(text);
158
+ },
159
+ },
160
+ { title: '创建时间', dataIndex: 'createTime', key: 'createTime' },
161
+ {
162
+ title: '操作',
163
+ key: 'action',
164
+ render: (text, record) => (
165
+ <Space>
166
+ <Button type="link" onClick={() => this.handleEdit(record)}>
167
+ 编辑
168
+ </Button>
169
+ <Button
170
+ type="link"
171
+ danger={true}
172
+ onClick={() => this.handleDelete(record)}
173
+ >
174
+ 删除
175
+ </Button>
176
+ </Space>
177
+ ),
178
+ },
179
+ ]}
180
+ dataSource={this.state.orders}
181
+ rowKey="id"
182
+ pagination={{
183
+ pageSize: 10,
184
+ showTotal: function (total) {
185
+ return `共 ${total} 条`;
186
+ },
187
+ }}
188
+ />
189
+ </Card>
190
+ </Page>
191
+ );
192
+ }
193
+ }
194
+
195
+ export default Document;