@appthen/cli 1.2.10 → 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.
Files changed (173) hide show
  1. package/.gitignore +1 -0
  2. package/bin/main.js +92 -0
  3. package/dist/index.js +7014 -14988
  4. package/package.json +8 -1
  5. package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1862 -0
  6. package/tests/test-app/.appthen/space-config.json +8 -0
  7. package/tests/test-app/docs/AI-Workflow.flow +112 -0
  8. package/tests/test-app/docs/Logic-1.flow +16 -0
  9. package/tests/test-app/docs/Logic.flow +16 -0
  10. package/tests/test-app/docs/Project-Blueprint-1.flow +119 -0
  11. package/tests/test-app/docs/Project-Blueprint.flow +119 -0
  12. package/tests/test-app/docs/README.md +3 -0
  13. package/tests/test-app/docs/claude.md +194 -0
  14. package/tests/test-app/docs/page_requirement_analysis.md +149 -0
  15. package/tests/test-app/docs//345/267/245/345/215/225/347/256/241/347/220/206/347/263/273/347/273/237/350/257/246/347/273/206/350/256/276/350/256/241.md +377 -0
  16. package/tests/test-app/src/apis/AddTodoPost.api.ts +42 -0
  17. package/tests/test-app/src/apis/DeleteTodoPost.api.ts +32 -0
  18. package/tests/test-app/src/apis/GetListPost.api.ts +38 -0
  19. package/tests/test-app/src/apis/TicketAttachmentUploadPost.api.ts +42 -0
  20. package/tests/test-app/src/apis/UpdateTodoPost.api.ts +46 -0
  21. package/tests/test-app/src/app.css +15 -0
  22. package/tests/test-app/src/cloud_functions/ticket|attachment|upload.node.ts +86 -0
  23. package/tests/test-app/src/cloud_functions/ticket|comment|add.node.ts +65 -0
  24. package/tests/test-app/src/cloud_functions/types|entity|Ticket.node.ts +88 -0
  25. package/tests/test-app/src/cloud_functions/types|entity|TicketAttachment.node.ts +70 -0
  26. package/tests/test-app/src/cloud_functions/types|entity|TicketCategory.node.ts +56 -0
  27. package/tests/test-app/src/cloud_functions/types|entity|TicketComment.node.ts +62 -0
  28. package/tests/test-app/src/cloud_functions/types|entity|TicketHistory.node.ts +74 -0
  29. package/tests/test-app/src/cloud_functions/types|entity|TicketPriority.node.ts +68 -0
  30. package/tests/test-app/src/cloud_functions/types|entity|TicketStatus.node.ts +63 -0
  31. package/tests/test-app/src/cloud_functions/types|models|CreateTicketParams.node.ts +20 -0
  32. package/tests/test-app/src/cloud_functions/types|models|TicketListParams.node.ts +30 -0
  33. package/tests/test-app/src/cloud_functions/types|models|UpdateTicketParams.node.ts +22 -0
  34. package/tests/test-app/src/components/Button.js +11 -0
  35. package/tests/test-app/src/components/MessageCenter.tsx +506 -0
  36. package/tests/test-app/src/components/MouduleDemoNzp.tsx +40 -0
  37. package/tests/test-app/src/components/Timeline.tsx +145 -0
  38. package/tests/test-app/src/index.ts +2 -0
  39. package/tests/test-app/src/modules/work_order_module/apis/TicketCommentAddPost.api.ts +48 -0
  40. package/tests/test-app/src/modules/work_order_module/apis/TicketCreatePost.api.ts +52 -0
  41. package/tests/test-app/src/modules/work_order_module/apis/TicketDeleteDelete.api.ts +39 -0
  42. package/tests/test-app/src/modules/work_order_module/apis/TicketDetailGet.api.ts +39 -0
  43. package/tests/test-app/src/modules/work_order_module/apis/TicketListGet.api.ts +61 -0
  44. package/tests/test-app/src/modules/work_order_module/apis/TicketUpdatePut.api.ts +57 -0
  45. package/tests/test-app/src/modules/work_order_module/apis/TrainDoorFaultListGet.ts +76 -0
  46. package/tests/test-app/src/modules/work_order_module/apis/TrainDoorListGet.ts +76 -0
  47. package/tests/test-app/src/modules/work_order_module/apis/TrainDoorOperationRecordsGet.ts +284 -0
  48. package/tests/test-app/src/modules/work_order_module/apis/TrainDoorStatisticsGet.ts +96 -0
  49. package/tests/test-app/src/modules/work_order_module/cloud_function/category|list.node.ts +40 -0
  50. package/tests/test-app/src/modules/work_order_module/cloud_function/priority|list.node.ts +26 -0
  51. package/tests/test-app/src/modules/work_order_module/cloud_function/status|list.node.ts +26 -0
  52. package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|create.node.ts +54 -0
  53. package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|delete.node.ts +55 -0
  54. package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|detail.node.ts +65 -0
  55. package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|list.node.ts +85 -0
  56. package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|update.node.ts +73 -0
  57. package/tests/test-app/src/modules/work_order_module/data_model/Ticket.m.ts +85 -0
  58. package/tests/test-app/src/modules/work_order_module/data_model/TicketCategory.m.ts +53 -0
  59. package/tests/test-app/src/modules/work_order_module/data_model/TicketStatus.m.ts +60 -0
  60. package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/344/272/247/345/223/201/350/256/276/350/256/241/346/226/207/346/241/243.md +301 -0
  61. package/tests/test-app/src/modules/work_order_module//345/267/245/345/215/225/347/263/273/347/273/237/345/274/200/345/217/221/344/273/273/345/212/241/345/210/206/345/267/245/346/226/207/346/241/243.md +345 -0
  62. package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
  63. package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
  64. package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
  65. package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
  66. package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
  67. package/tests/test-app/src/pages/DataReport.tsx +298 -0
  68. package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
  69. package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
  70. package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
  71. package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
  72. package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
  73. package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
  74. package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
  75. package/tests/test-app/src/pages/SLAManagement.tsx +668 -0
  76. package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
  77. package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
  78. package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
  79. package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
  80. package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
  81. package/tests/test-app/src/pages/TicketCreate.tsx +27 -0
  82. package/tests/test-app/src/pages/TicketDetail.tsx +27 -0
  83. package/tests/test-app/src/pages/TicketList.tsx +27 -0
  84. package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
  85. package/tests/test-app/src/pages/TicketManagementPage.tsx +1238 -0
  86. package/tests/test-app/src/pages/UserProfile.tsx +404 -0
  87. package/tests/test-app/src/pages/VisualAIIDEUpgrade.tsx +245 -0
  88. package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
  89. package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
  90. package/tests/test-app/src/pages/appthen_guide/ComponentTreeUnderstanding.tsx +26 -0
  91. package/tests/test-app/src/pages/appthen_guide/DataBindingLearning.tsx +26 -0
  92. package/tests/test-app/src/pages/article-list.tsx +222 -0
  93. package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
  94. package/tests/test-app/src/pages/back-end/adminRootLayout.tsx +155 -0
  95. package/tests/test-app/src/pages/back-end/adminRootLayout10.tsx +157 -0
  96. package/tests/test-app/src/pages/back-end/adminRootLayout2.tsx +156 -0
  97. package/tests/test-app/src/pages/back-end/adminRootLayout3.tsx +156 -0
  98. package/tests/test-app/src/pages/back-end/adminRootLayout4.tsx +157 -0
  99. package/tests/test-app/src/pages/back-end/adminRootLayout5.tsx +157 -0
  100. package/tests/test-app/src/pages/back-end/adminRootLayout6.tsx +157 -0
  101. package/tests/test-app/src/pages/back-end/adminRootLayout7.tsx +157 -0
  102. package/tests/test-app/src/pages/back-end/adminRootLayout8.tsx +157 -0
  103. package/tests/test-app/src/pages/back-end/adminRootLayout9.tsx +157 -0
  104. package/tests/test-app/src/pages/back-end/backgroundManagementSystem.css +5 -0
  105. package/tests/test-app/src/pages/back-end/backgroundManagementSystem.tsx +1745 -0
  106. package/tests/test-app/src/pages/category-list.tsx +179 -0
  107. package/tests/test-app/src/pages/comment-list.tsx +194 -0
  108. package/tests/test-app/src/pages/component/WorkOrderCard.tsx +140 -0
  109. package/tests/test-app/src/pages/cover.tsx +42 -0
  110. package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
  111. package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
  112. package/tests/test-app/src/pages/data-overview.tsx +600 -0
  113. package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.css +181 -0
  114. package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.tsx +225 -0
  115. package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.css +181 -0
  116. package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.tsx +138 -0
  117. package/tests/test-app/src/pages/data_dashboard/component_library/BlueBrightGreenBorder.tsx +47 -0
  118. package/tests/test-app/src/pages/data_dashboard/component_library/FullScreenContainer.tsx +133 -0
  119. package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
  120. package/tests/test-app/src/pages/department-list.tsx +183 -0
  121. package/tests/test-app/src/pages/description_of_mock_interface.md +32 -0
  122. package/tests/test-app/src/pages/digitalLargeScreen.css +181 -0
  123. package/tests/test-app/src/pages/digitalLargeScreen.tsx +1417 -0
  124. package/tests/test-app/src/pages/goods-list.tsx +233 -0
  125. package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
  126. package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.css +3 -0
  127. package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.tsx +362 -0
  128. package/tests/test-app/src/pages/mobile_terminal/WorkOrderHomepage.tsx +337 -0
  129. package/tests/test-app/src/pages/mobile_terminal/newWorkOrder.tsx +224 -0
  130. package/tests/test-app/src/pages/mobile_terminal/tabbar.tsx +67 -0
  131. package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +638 -0
  132. package/tests/test-app/src/pages/mobile_terminal/workOrderDetails.tsx +346 -0
  133. package/tests/test-app/src/pages/mobile_terminal/workOrderPage.tsx +345 -0
  134. package/tests/test-app/src/pages/notice-list.tsx +217 -0
  135. package/tests/test-app/src/pages/order-detail.tsx +330 -0
  136. package/tests/test-app/src/pages/order-list.tsx +195 -0
  137. package/tests/test-app/src/pages/order-management.tsx +563 -0
  138. package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
  139. package/tests/test-app/src/pages/role-list.tsx +184 -0
  140. package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
  141. package/tests/test-app/src/pages/simple-page.tsx +43 -0
  142. package/tests/test-app/src/pages/test-destructure.tsx +44 -0
  143. package/tests/test-app/src/pages/test-error-page.tsx +75 -0
  144. package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
  145. package/tests/test-app/src/pages/test-page.tsx +101 -0
  146. package/tests/test-app/src/pages/test-render.tsx +52 -0
  147. package/tests/test-app/src/pages/test-return-type.tsx +41 -0
  148. package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
  149. package/tests/test-app/src/pages/testPage.css +3 -0
  150. package/tests/test-app/src/pages/testPage.tsx +158 -0
  151. package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
  152. package/tests/test-app/src/pages/user-list.tsx +212 -0
  153. package/tests/test-app/src/pages/web_version/website.css +205 -0
  154. package/tests/test-app/src/pages/web_version/website.tsx +1066 -0
  155. package/tests/test-app/src/pages/wrong-page.tsx +50 -0
  156. package/tests/test-app/src/pages//345/276/205/345/212/236.apidoc.json +336 -0
  157. package/tests/test-app/src/project.json +1120 -0
  158. package/tests/test-app/src/store/global.store.ts +10 -0
  159. package/tests/test-app/src/types/CreateTicketParams.m.ts +20 -0
  160. package/tests/test-app/src/types/SLAPolicy.ts +50 -0
  161. package/tests/test-app/src/types/Ticket.ts +68 -0
  162. package/tests/test-app/src/types/TicketAttachment.m.ts +67 -0
  163. package/tests/test-app/src/types/TicketComment.m.ts +59 -0
  164. package/tests/test-app/src/types/TicketEvaluation.ts +44 -0
  165. package/tests/test-app/src/types/TicketHistory.m.ts +71 -0
  166. package/tests/test-app/src/types/TicketListParams.m.ts +30 -0
  167. package/tests/test-app/src/types/TicketPriority.m.ts +65 -0
  168. package/tests/test-app/src/types/TicketRecord.ts +47 -0
  169. package/tests/test-app/src/types/TrainDoor.ts +284 -0
  170. package/tests/test-app/src/types/UpdateTicketParams.m.ts +22 -0
  171. package/tests/test-app/src/utils/__afterRequest.util.ts +3 -0
  172. package/tests/test-app/src/utils/__beforeRequest.util.ts +10 -0
  173. package/tests/test-app/src/utils/testGlobalAction.util.ts +7 -0
@@ -0,0 +1,179 @@
1
+ /**
2
+ * 分类列表
3
+ * 查看和管理所有商品分类
4
+ *
5
+ * @type Page
6
+ * @route /categories
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
+ categories?: {
21
+ /* @example 1 */id?: number,
22
+ /* @example 手机数码 */name?: string,
23
+ /* @example 无 */parent?: string,
24
+ /* @example 2580 */goodsCount?: number,
25
+ /* @example enabled */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
+ categories: [
35
+ {
36
+ id: 1,
37
+ name: '手机数码',
38
+ parent: '无',
39
+ goodsCount: 2580,
40
+ status: 'enabled',
41
+ createTime: '2024-01-15',
42
+ },
43
+ {
44
+ id: 2,
45
+ name: '电脑办公',
46
+ parent: '无',
47
+ goodsCount: 1680,
48
+ status: 'enabled',
49
+ createTime: '2024-02-20',
50
+ },
51
+ {
52
+ id: 3,
53
+ name: '手机',
54
+ parent: '手机数码',
55
+ goodsCount: 1280,
56
+ status: 'enabled',
57
+ createTime: '2024-03-10',
58
+ },
59
+ {
60
+ id: 4,
61
+ name: '笔记本电脑',
62
+ parent: '电脑办公',
63
+ goodsCount: 980,
64
+ status: 'enabled',
65
+ createTime: '2024-04-05',
66
+ },
67
+ {
68
+ id: 5,
69
+ name: '服装鞋帽',
70
+ parent: '无',
71
+ goodsCount: 5860,
72
+ status: 'enabled',
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 === 'enabled') {
100
+ return <Tag color="green">启用</Tag>;
101
+ }
102
+ return <Tag color="gray">禁用</Tag>;
103
+ }
104
+
105
+ render() {
106
+ return (
107
+ <Page className="p-[24px] bg-[var(--gray-50)] min-h-screen">
108
+ <View className="mb-[24px]">
109
+ <h1 className="text-2xl font-bold text-[#1f2937]">分类列表</h1>
110
+ <p className="text-[#6b7280] text-sm mt-[4px]">
111
+ 管理系统中的所有商品分类
112
+ </p>
113
+ </View>
114
+ <Card className="mb-[24px]">
115
+ <View className="flex items-center justify-between">
116
+ <Input
117
+ placeholder="搜索分类名称"
118
+ value={this.state.searchKeyword}
119
+ onChange={e => this.handleSearch(e.target.value)}
120
+ prefix="🔍"
121
+ className=""
122
+ />
123
+ <Button type="primary" onClick={() => this.handleAdd()}>
124
+ + 新增分类
125
+ </Button>
126
+ </View>
127
+ </Card>
128
+ <Card>
129
+ <Table
130
+ loading={this.state.loading}
131
+ columns={[
132
+ { title: 'ID', dataIndex: 'id', key: 'id', width: 80 },
133
+ { title: '分类名称', dataIndex: 'name', key: 'name' },
134
+ { title: '父级分类', dataIndex: 'parent', key: 'parent' },
135
+ { title: '商品数量', dataIndex: 'goodsCount', key: 'goodsCount' },
136
+ {
137
+ title: '状态',
138
+ dataIndex: 'status',
139
+ key: 'status',
140
+ render: function (text) {
141
+ return this.getStatusTag(text);
142
+ },
143
+ },
144
+ { title: '创建时间', dataIndex: 'createTime', key: 'createTime' },
145
+ {
146
+ title: '操作',
147
+ key: 'action',
148
+ render: (text, record) => (
149
+ <Space>
150
+ <Button type="link" onClick={() => this.handleEdit(record)}>
151
+ 编辑
152
+ </Button>
153
+ <Button
154
+ type="link"
155
+ danger={true}
156
+ onClick={() => this.handleDelete(record)}
157
+ >
158
+ 删除
159
+ </Button>
160
+ </Space>
161
+ ),
162
+ },
163
+ ]}
164
+ dataSource={this.state.categories}
165
+ rowKey="id"
166
+ pagination={{
167
+ pageSize: 10,
168
+ showTotal: function (total) {
169
+ return `共 ${total} 条`;
170
+ },
171
+ }}
172
+ />
173
+ </Card>
174
+ </Page>
175
+ );
176
+ }
177
+ }
178
+
179
+ export default Document;
@@ -0,0 +1,194 @@
1
+ /**
2
+ * 评论列表
3
+ * 查看和管理所有用户评论
4
+ *
5
+ * @type Page
6
+ * @route /comments
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
+ comments?: {
21
+ /* @example 1 */id?: number,
22
+ /* @example 张三 */author?: string,
23
+ /* @example 这篇文章写得非常好,受益匪浅! */content?: string,
24
+ /* @example React入门教程 */article?: string,
25
+ /* @example 128 */likes?: number,
26
+ /* @example approved */status?: string,
27
+ /* @example 2024-01-15 */createTime?: string,
28
+ }[];
29
+ loading?: boolean;
30
+ searchKeyword?: string;
31
+ }
32
+
33
+ class Document extends React.Component<IProps, IState> {
34
+ state = {
35
+ comments: [
36
+ {
37
+ id: 1,
38
+ author: '张三',
39
+ content: '这篇文章写得非常好,受益匪浅!',
40
+ article: 'React入门教程',
41
+ likes: 128,
42
+ status: 'approved',
43
+ createTime: '2024-01-15',
44
+ },
45
+ {
46
+ id: 2,
47
+ author: '李四',
48
+ content: '希望能有更多关于TypeScript的教程',
49
+ article: 'JavaScript高级特性',
50
+ likes: 56,
51
+ status: 'approved',
52
+ createTime: '2024-02-20',
53
+ },
54
+ {
55
+ id: 3,
56
+ author: '王五',
57
+ content: '这个观点我不太认同,需要更多证据',
58
+ article: '2024年前端趋势',
59
+ likes: 23,
60
+ status: 'pending',
61
+ createTime: '2024-03-10',
62
+ },
63
+ {
64
+ id: 4,
65
+ author: '赵六',
66
+ content: '感谢分享,学到了很多',
67
+ article: 'Vue3最佳实践',
68
+ likes: 89,
69
+ status: 'approved',
70
+ createTime: '2024-04-05',
71
+ },
72
+ {
73
+ id: 5,
74
+ author: '钱七',
75
+ content: '代码示例很清晰,值得收藏',
76
+ article: 'TypeScript入门指南',
77
+ likes: 156,
78
+ status: 'approved',
79
+ createTime: '2024-05-12',
80
+ },
81
+ ],
82
+ loading: false,
83
+ searchKeyword: '',
84
+ };
85
+
86
+ handleSearch(value) {
87
+ this.setState({
88
+ searchKeyword: value,
89
+ });
90
+ }
91
+
92
+ handleAdd() {
93
+ console.log('添加评论');
94
+ }
95
+
96
+ handleEdit(record) {
97
+ console.log('编辑评论', record);
98
+ }
99
+
100
+ handleDelete(record) {
101
+ console.log('删除评论', record);
102
+ }
103
+
104
+ getStatusTag(status) {
105
+ if (status === 'approved') {
106
+ return <Tag color="green">已通过</Tag>;
107
+ }
108
+ if (status === 'pending') {
109
+ return <Tag color="orange">待审核</Tag>;
110
+ }
111
+ return <Tag color="red">已拒绝</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: 'author', key: 'author' },
143
+ {
144
+ title: '评论内容',
145
+ dataIndex: 'content',
146
+ key: 'content',
147
+ ellipsis: true,
148
+ },
149
+ { title: '文章标题', dataIndex: 'article', key: 'article' },
150
+ { title: '点赞数', dataIndex: 'likes', key: 'likes' },
151
+ {
152
+ title: '状态',
153
+ dataIndex: 'status',
154
+ key: 'status',
155
+ render: function (text) {
156
+ return this.getStatusTag(text);
157
+ },
158
+ },
159
+ { title: '创建时间', dataIndex: 'createTime', key: 'createTime' },
160
+ {
161
+ title: '操作',
162
+ key: 'action',
163
+ render: (text, record) => (
164
+ <Space>
165
+ <Button type="link" onClick={() => this.handleEdit(record)}>
166
+ 编辑
167
+ </Button>
168
+ <Button
169
+ type="link"
170
+ danger={true}
171
+ onClick={() => this.handleDelete(record)}
172
+ >
173
+ 删除
174
+ </Button>
175
+ </Space>
176
+ ),
177
+ },
178
+ ]}
179
+ dataSource={this.state.comments}
180
+ rowKey="id"
181
+ pagination={{
182
+ pageSize: 10,
183
+ showTotal: function (total) {
184
+ return `共 ${total} 条`;
185
+ },
186
+ }}
187
+ />
188
+ </Card>
189
+ </Page>
190
+ );
191
+ }
192
+ }
193
+
194
+ export default Document;
@@ -0,0 +1,140 @@
1
+ /**
2
+ * 工单卡片
3
+ * @type Component
4
+ * @screen 375x194 #f5f5f5
5
+ * @frames app, web
6
+ */
7
+ import React from 'react';
8
+ import { AtIcon, Component, Text, View } from 'cross-ui';
9
+
10
+
11
+ class IProps {
12
+ /* 工单状态 */
13
+ status: string;
14
+ /* 跳转详情函数 */
15
+ onGoDetail: Function;
16
+ }
17
+
18
+ /*
19
+ * 数据与接口请求定义
20
+ */
21
+ class IState {}
22
+
23
+ class Document extends React.Component<IProps, IState> {
24
+ static defaultProps = { status: '' };
25
+ state = {};
26
+
27
+ render() {
28
+ return (
29
+ <React.Fragment>
30
+ <View className="pr-[1px] flex flex-row">
31
+ <View
32
+ __hidePh={true}
33
+ inlineStyle={[
34
+ {
35
+ enable: this.props.status == 'completed',
36
+ name: '动态样式1',
37
+ style: { backgroundColor: '#3b82f6' },
38
+ },
39
+ ]}
40
+ className="bottom-[0px] top-[0px] left-[0px] w-[17px] rounded-tl-[20px] rounded-bl-[20px] mr-[-11px]"
41
+ />
42
+ <View
43
+ __hidePh={true}
44
+ className="bg-[#ffffff] rounded-xl relative flex-1 pt-[10px] pb-[10px] pl-[10px] pr-[10px]"
45
+ >
46
+ <View className="flex flex-row items-center">
47
+ <View className="flex-1">
48
+ <Text className="text-sm text-[#666666]">WO-2023110001</Text>
49
+ </View>
50
+ <View className="bg-[#22c55e] pt-[6px] pr-[10px] pb-[6px] pl-[10px] rounded-[15px]">
51
+ <Text className="text-xs text-[#ffffff]">已完成</Text>
52
+ </View>
53
+ </View>
54
+ <View className="mt-[10px]">
55
+ <Text className="text-sm text-[#333] font-bold">
56
+ 设备故障维修申请
57
+ </Text>
58
+ </View>
59
+ <View className="mt-[10px]">
60
+ <Text numberOfLines={1} className="text-xs text-[#333]">
61
+ 3号生产线主轴电机出现异常噪音,需要紧急检修以比
62
+ </Text>
63
+ </View>
64
+ <View className="mt-[10px] flex flex-row items-center">
65
+ <View className="flex flex-row">
66
+ <AtIcon
67
+ color="#666"
68
+ size={20}
69
+ svg="&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34; ?&#62;&#10;&#60;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; xmlns:xlink=&#34;http://www.w3.org/1999/xlink&#34; width=&#34;100%&#34; height=&#34;100%&#34; viewBox=&#34;0 0 12 12&#34;&#62;&#10;\t&#60;defs&#62;&#10;\t\t&#60;clipPath id=&#34;clipPath5115394031&#34;&#62;&#10;\t\t\t&#60;path d=&#34;M0 0L12 0L12 12L0 12L0 0Z&#34; fill-rule=&#34;nonzero&#34; transform=&#34;matrix(1 0 0 1 0 0)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t\t&#60;/clipPath&#62;&#10;\t&#60;/defs&#62;&#10;\t&#60;g clip-path=&#34;url(#clipPath5115394031)&#34;&#62;&#10;\t\t&#60;path d=&#34;M1.67816 6.0308L1.67816 2.65931C1.67816 2.45221 1.51027 2.28431 1.30316 2.28431C1.09606 2.28431 0.928164 2.45221 0.928164 2.65931L0.928164 6.0308Q0.936713 6.57501 1.32039 6.95267Q1.70406 7.33034 2.24242 7.33034Q2.78078 7.33034 3.16446 6.95267Q3.54813 6.57501 3.55663 6.03672L3.55973 1.61191Q3.56967 0.794366 2.99203 0.209683Q2.4144 -0.375 1.5925 -0.375Q0.770602 -0.375 0.192968 0.209683Q-0.384667 0.794366 -0.374698 1.6162L-0.374726 6.06056Q-0.390517 7.14867 0.377193 7.92757Q1.1449 8.70648 2.23856 8.70648Q3.33221 8.70648 4.09992 7.92758Q4.86763 7.14867 4.8518 6.05513L4.85184 1.90322C4.85184 1.69611 4.68394 1.52822 4.47684 1.52822C4.26973 1.52822 4.10184 1.69611 4.10184 1.90322L4.10188 6.06599Q4.11316 6.84572 3.56576 7.4011Q3.01836 7.95648 2.23856 7.95648Q1.45875 7.95648 0.911348 7.4011Q0.363947 6.84572 0.375274 6.06056L0.375246 1.60711Q0.369078 1.09857 0.726504 0.736788Q1.08393 0.375 1.5925 0.375Q2.10107 0.375 2.4585 0.736788Q2.81592 1.09858 2.80973 1.6114L2.80673 6.02487Q2.80308 6.25601 2.63833 6.41817Q2.47359 6.58034 2.24242 6.58034Q2.01126 6.58034 1.84651 6.41817Q1.68177 6.25601 1.67816 6.0308Z&#34; fill-rule=&#34;evenodd&#34; transform=&#34;matrix(1 0 0 1 3.76121 1.84069)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t&#60;/g&#62;&#10;&#60;/svg&#62;&#10;"
70
+ />
71
+ </View>
72
+ <View className="ml-[5px]">
73
+ <Text className="text-xs text-[#666666]">2个附件</Text>
74
+ </View>
75
+ </View>
76
+ <View className="mt-[10px] flex flex-row">
77
+ <View className="flex flex-row items-center">
78
+ <View className="w-[28px] h-[28px] bg-[#add2ff] rounded-[15px] flex flex-col justify-center items-center">
79
+ <Text className="text-sm text-[#3b82f6]">李</Text>
80
+ </View>
81
+ <View className="ml-[10px]">
82
+ <Text className="text-sm text-[#666666]">李明</Text>
83
+ </View>
84
+ </View>
85
+ <View className="flex-row flex-1 flex justify-end">
86
+ <View
87
+ __hidePh={true}
88
+ onClick={e => {
89
+ this.props.onGoDetail();
90
+ }}
91
+ className="bg-[#f3f4f6] w-[40px] h-[40px] rounded-[20px] flex flex-col justify-center items-center mr-[10px]"
92
+ >
93
+ <AtIcon
94
+ color="#666"
95
+ size={20}
96
+ svg="&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34; ?&#62;&#10;&#60;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; xmlns:xlink=&#34;http://www.w3.org/1999/xlink&#34; width=&#34;100%&#34; height=&#34;100%&#34; viewBox=&#34;0 0 20 20&#34;&#62;&#10;\t&#60;defs&#62;&#10;\t\t&#60;clipPath id=&#34;clipPath0894376390&#34;&#62;&#10;\t\t\t&#60;path d=&#34;M0 0L20 0L20 20L0 20L0 0Z&#34; fill-rule=&#34;nonzero&#34; transform=&#34;matrix(1 0 0 1 0 0)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t\t&#60;/clipPath&#62;&#10;\t&#60;/defs&#62;&#10;\t&#60;g clip-path=&#34;url(#clipPath0894376390)&#34;&#62;&#10;\t\t&#60;circle cx=&#34;2.5&#34; cy=&#34;2.5&#34; r=&#34;2.5&#34; transform=&#34;matrix(1 0 0 1 7.5 7.5)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t\t&#60;path d=&#34;M18.5492 5.57031C17.5156 3.97188 16.1746 2.61406 14.6715 1.64336C13.0086 0.568359 11.1727 0 9.36252 0C7.70158 0 6.06837 0.474609 4.50822 1.41055C2.9172 2.36484 1.4758 3.75898 0.223843 5.55391C0.079313 5.76135 0.00477175 5.99146 0.000219643 6.24425C-0.00433246 6.49703 0.0618755 6.72968 0.198843 6.94219C1.23048 8.55664 2.55822 9.91641 4.03791 10.8738C5.70392 11.9531 7.49689 12.5 9.36252 12.5C11.1871 12.5 13.027 11.9363 14.6828 10.8703C16.1852 9.90273 17.5235 8.53984 18.5531 6.92812C18.6852 6.72088 18.7509 6.49438 18.7501 6.24865C18.7494 6.00291 18.6825 5.7768 18.5492 5.57031ZM9.3758 10C8.34026 10 7.45638 9.63388 6.72415 8.90165C5.99191 8.16942 5.6258 7.28553 5.6258 6.25C5.6258 5.21447 5.99191 4.33058 6.72415 3.59835C7.45638 2.86612 8.34026 2.5 9.3758 2.5C10.4113 2.5 11.2952 2.86612 12.0274 3.59835C12.7597 4.33058 13.1258 5.21447 13.1258 6.25C13.1246 7.28504 12.7581 8.16851 12.0262 8.90039C11.2943 9.63228 10.4108 9.99882 9.3758 10Z&#34; fill-rule=&#34;nonzero&#34; transform=&#34;matrix(1 0 0 1 0.624204 3.75)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t&#60;/g&#62;&#10;&#60;/svg&#62;&#10;"
97
+ />
98
+ </View>
99
+ <View
100
+ __hidePh={true}
101
+ className="bg-[#f3f4f6] w-[40px] h-[40px] rounded-[20px] flex flex-col justify-center items-center mr-[10px]"
102
+ >
103
+ <AtIcon
104
+ color="#666"
105
+ size={20}
106
+ svg="&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34; ?&#62;&#10;&#60;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; xmlns:xlink=&#34;http://www.w3.org/1999/xlink&#34; width=&#34;100%&#34; height=&#34;100%&#34; viewBox=&#34;0 0 20 20&#34;&#62;&#10;\t&#60;defs&#62;&#10;\t\t&#60;clipPath id=&#34;clipPath2557746411&#34;&#62;&#10;\t\t\t&#60;path d=&#34;M0 0L20 0L20 20L0 20L0 0Z&#34; fill-rule=&#34;nonzero&#34; transform=&#34;matrix(1 0 0 1 0 0)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t\t&#60;/clipPath&#62;&#10;\t&#60;/defs&#62;&#10;\t&#60;g clip-path=&#34;url(#clipPath2557746411)&#34;&#62;&#10;\t\t&#60;path d=&#34;M12.7935 -0.418716L12.7938 -0.419009Q13.2343 -0.859375 13.8572 -0.859375Q14.4804 -0.859375 14.921 -0.418751L14.9505 -0.389229Q15.3907 0.0513004 15.3907 0.674075Q15.3907 1.29685 14.9502 1.7376L14.4897 2.19815Q14.4299 2.258 14.3595 2.30503Q14.2891 2.35205 14.2109 2.38444Q14.1327 2.41683 14.0497 2.43334Q13.9667 2.44986 13.882 2.44986Q13.7974 2.44986 13.7144 2.43334Q13.6314 2.41683 13.5532 2.38444Q13.475 2.35205 13.4046 2.30503Q13.3342 2.258 13.2744 2.19815L12.3327 1.25649Q12.2729 1.19661 12.2259 1.12621Q12.1789 1.05582 12.1465 0.977606Q12.1142 0.899394 12.0977 0.816373Q12.0812 0.733351 12.0812 0.64871Q12.0813 0.564069 12.0978 0.481061Q12.1144 0.398054 12.1468 0.319869Q12.1792 0.241685 12.2263 0.171328Q12.2733 0.100972 12.3332 0.0411472L12.7935 -0.418716ZM10.6665 1.70781L0.035724 12.3648Q-0.084919 12.4857 -0.150137 12.6436L-0.794278 14.203Q-0.826593 14.2812 -0.843025 14.3643Q-0.859457 14.4473 -0.859375 14.5319Q-0.859292 14.6166 -0.842699 14.6996Q-0.826106 14.7826 -0.793639 14.8607Q-0.761172 14.9389 -0.71408 15.0092Q-0.666988 15.0796 -0.607079 15.1394Q-0.547171 15.1992 -0.476749 15.2461Q-0.406327 15.2931 -0.328097 15.3254Q-0.170506 15.3905 7.45058e-09 15.3905Q0.170506 15.3905 0.328097 15.3254L1.88747 14.6812Q2.04536 14.616 2.1663 14.4954L12.8225 3.8653Q12.8825 3.80553 12.9296 3.73521Q12.9767 3.66489 13.0092 3.58673Q13.0417 3.50857 13.0583 3.42558Q13.0749 3.34259 13.075 3.25794Q13.0751 3.1733 13.0587 3.09027Q13.0423 3.00723 13.01 2.929Q12.9777 2.85076 12.9308 2.78032Q12.8838 2.70989 12.824 2.64997L11.8819 1.70781Q11.822 1.64796 11.7517 1.60094Q11.6813 1.55391 11.6031 1.52152Q11.5249 1.48913 11.4419 1.47262Q11.3589 1.45611 11.2742 1.45611Q11.1896 1.45611 11.1066 1.47262Q11.0235 1.48913 10.9453 1.52152Q10.8672 1.55391 10.7968 1.60094Q10.7264 1.64796 10.6665 1.70781Z&#34; fill-rule=&#34;evenodd&#34; transform=&#34;matrix(1 0 0 1 2.73438 2.73452)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t&#60;/g&#62;&#10;&#60;/svg&#62;&#10;"
107
+ />
108
+ </View>
109
+ <View
110
+ __hidePh={true}
111
+ className="bg-[#f3f4f6] w-[40px] h-[40px] rounded-[20px] flex flex-col justify-center items-center"
112
+ >
113
+ <AtIcon
114
+ color="#666"
115
+ size={20}
116
+ svg="&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34; ?&#62;&#10;&#60;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; xmlns:xlink=&#34;http://www.w3.org/1999/xlink&#34; width=&#34;100%&#34; height=&#34;100%&#34; viewBox=&#34;0 0 20 20&#34;&#62;&#10;\t&#60;defs&#62;&#10;\t\t&#60;clipPath id=&#34;clipPath0406936548&#34;&#62;&#10;\t\t\t&#60;path d=&#34;M0 0L20 0L20 20L0 20L0 0Z&#34; fill-rule=&#34;nonzero&#34; transform=&#34;matrix(1 0 0 1 0 0)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t\t&#60;/clipPath&#62;&#10;\t&#60;/defs&#62;&#10;\t&#60;g clip-path=&#34;url(#clipPath0406936548)&#34;&#62;&#10;\t\t&#60;path d=&#34;M12.5003 6.875C11.6972 6.875 10.9206 6.51641 10.3128 5.86563C9.72178 5.23086 9.36084 4.38438 9.29717 3.48281C9.2292 2.52109 9.52256 1.63672 10.123 0.992188C10.7233 0.347657 11.5628 0 12.5003 0C13.4312 0 14.273 0.353906 14.8714 0.996875C15.4757 1.64609 15.7698 2.52891 15.7019 3.48242C15.6366 4.38516 15.2761 5.23125 14.6862 5.86523C14.08 6.51641 13.3038 6.875 12.5003 6.875ZM17.6499 13.75L7.35108 13.75C7.18329 13.7509 7.02391 13.7147 6.87293 13.6415C6.72196 13.5683 6.59488 13.4655 6.4917 13.3332C6.3823 13.1898 6.30957 13.0298 6.27353 12.853C6.23748 12.6763 6.24172 12.5006 6.28623 12.3258C6.61514 11.0051 7.42999 9.90976 8.64248 9.15859C9.71866 8.49219 11.0886 8.125 12.5003 8.125C13.9398 8.125 15.2737 8.47656 16.3562 9.14258C17.5714 9.88984 18.3874 10.9914 18.7148 12.3281C18.7587 12.503 18.7625 12.6788 18.726 12.8554C18.6896 13.032 18.6166 13.1919 18.5069 13.3352C18.4039 13.4669 18.2771 13.5691 18.1265 13.642C17.976 13.7149 17.8171 13.7509 17.6499 13.75ZM5.11749 7.03125C3.74288 7.03125 2.53428 5.75313 2.42217 4.18242C2.3667 3.37773 2.61749 2.63359 3.1253 2.08789C3.62764 1.54766 4.33624 1.25 5.11749 1.25C5.89874 1.25 6.60186 1.54922 7.10694 2.09258C7.61866 2.64258 7.86866 3.38516 7.81006 4.1832C7.69795 5.75352 6.48975 7.03125 5.11749 7.03125ZM7.68233 8.25977C6.99522 7.92383 6.10342 7.75586 5.11788 7.75586C3.96709 7.75586 2.84952 8.05586 1.97061 8.60039C0.974126 9.21875 0.303814 10.1191 0.0331106 11.2063C-0.00701755 11.3646 -0.010671 11.5239 0.0221504 11.6839C0.0549717 11.844 0.120995 11.9889 0.22022 12.1187C0.314407 12.2397 0.430431 12.3336 0.568293 12.4006C0.706154 12.4676 0.851718 12.5007 1.00499 12.5L5.34092 12.5C5.41644 12.5 5.48318 12.4758 5.54114 12.4274C5.59911 12.379 5.63485 12.3177 5.64834 12.2434C5.65264 12.2187 5.65811 12.1941 5.66436 12.1699C5.99561 10.8395 6.77178 9.71523 7.91866 8.8957C8.01024 8.82968 8.05338 8.74029 8.04808 8.62751C8.04277 8.51473 7.99143 8.42978 7.89405 8.37265C7.83272 8.33672 7.76241 8.29883 7.68233 8.25977Z&#34; fill-rule=&#34;nonzero&#34; transform=&#34;matrix(1 0 0 1 0.624702 3.125)&#34; fill=&#34;currentColor&#34;/&#62;&#10;\t&#60;/g&#62;&#10;&#60;/svg&#62;&#10;"
117
+ />
118
+ </View>
119
+ </View>
120
+ </View>
121
+ <View className="mt-[10px] flex flex-row items-center justify-between">
122
+ <View>
123
+ <Text className="text-sm text-[#9b9b9b]">
124
+ 创建于 2023-11-05
125
+ </Text>
126
+ </View>
127
+ <View>
128
+ <Text className="text-sm text-[#ef4444]">
129
+ 期望完成:2023-11-08
130
+ </Text>
131
+ </View>
132
+ </View>
133
+ </View>
134
+ </View>
135
+ </React.Fragment>
136
+ );
137
+ }
138
+ }
139
+
140
+ export default Document;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * 封面管理
3
+ * 封面列表与操作
4
+ *
5
+ * @type Page
6
+ * @screen 400x250
7
+ * @frames app, web
8
+ * @clients weapp
9
+ */
10
+ import React from 'react';
11
+ import { Page, Text, View } from '@appthen/react';
12
+
13
+
14
+ class IProps {}
15
+
16
+ /*
17
+ * 数据与接口请求定义
18
+ */
19
+ class IState {
20
+ newField?: string;
21
+ }
22
+
23
+ class Document extends React.Component<IProps, IState> {
24
+ state = {};
25
+
26
+ render() {
27
+ return (
28
+ <Page
29
+ statusBarMode="light"
30
+ backgroundImage="https://cdn.appthen.com/Fmk8IZVxeE9QYk9hKJM-D2L4Q52_"
31
+ >
32
+ <View className="h-[250px] bg-[rgba(58,58,58,0.74)] flex flex-col justify-center items-center">
33
+ <Text className="text-[40px] text-[#40a9ff] font-bold">
34
+ 快速上手指南
35
+ </Text>
36
+ </View>
37
+ </Page>
38
+ );
39
+ }
40
+ }
41
+
42
+ export default Document;