@appthen/cli 1.2.10 → 1.2.11

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 (122) hide show
  1. package/.gitignore +1 -0
  2. package/bin/main.js +45 -0
  3. package/dist/index.js +1108 -267
  4. package/package.json +1 -1
  5. package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1406 -0
  6. package/tests/test-app/.appthen/shadow-space-unknown-user-test-app-e99876b1.json +1060 -0
  7. package/tests/test-app/.appthen/space-config.json +8 -0
  8. package/tests/test-app/docs/AI-Workflow.flow +112 -0
  9. package/tests/test-app/docs/Logic-1.flow +16 -0
  10. package/tests/test-app/docs/Logic.flow +16 -0
  11. package/tests/test-app/docs/Project-Blueprint-1.flow +119 -0
  12. package/tests/test-app/docs/Project-Blueprint.flow +119 -0
  13. package/tests/test-app/docs/README.md +3 -0
  14. package/tests/test-app/docs/claude.md +194 -0
  15. package/tests/test-app/docs/page_requirement_analysis.md +149 -0
  16. 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
  17. package/tests/test-app/src/apis/AddTodoPost.api.ts +42 -0
  18. package/tests/test-app/src/apis/DeleteTodoPost.api.ts +32 -0
  19. package/tests/test-app/src/apis/GetListPost.api.ts +38 -0
  20. package/tests/test-app/src/apis/TicketAttachmentUploadPost.api.ts +42 -0
  21. package/tests/test-app/src/apis/UpdateTodoPost.api.ts +46 -0
  22. package/tests/test-app/src/app.css +15 -0
  23. package/tests/test-app/src/cloud_functions/ticket|attachment|upload.node.ts +86 -0
  24. package/tests/test-app/src/cloud_functions/ticket|comment|add.node.ts +65 -0
  25. package/tests/test-app/src/cloud_functions/types|entity|Ticket.node.ts +88 -0
  26. package/tests/test-app/src/cloud_functions/types|entity|TicketAttachment.node.ts +70 -0
  27. package/tests/test-app/src/cloud_functions/types|entity|TicketCategory.node.ts +56 -0
  28. package/tests/test-app/src/cloud_functions/types|entity|TicketComment.node.ts +62 -0
  29. package/tests/test-app/src/cloud_functions/types|entity|TicketHistory.node.ts +74 -0
  30. package/tests/test-app/src/cloud_functions/types|entity|TicketPriority.node.ts +68 -0
  31. package/tests/test-app/src/cloud_functions/types|entity|TicketStatus.node.ts +63 -0
  32. package/tests/test-app/src/cloud_functions/types|models|CreateTicketParams.node.ts +20 -0
  33. package/tests/test-app/src/cloud_functions/types|models|TicketListParams.node.ts +30 -0
  34. package/tests/test-app/src/cloud_functions/types|models|UpdateTicketParams.node.ts +22 -0
  35. package/tests/test-app/src/components/Button.js +11 -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/SLAManagement.tsx +668 -0
  63. package/tests/test-app/src/pages/TicketCreate.tsx +27 -0
  64. package/tests/test-app/src/pages/TicketDetail.tsx +27 -0
  65. package/tests/test-app/src/pages/TicketList.tsx +27 -0
  66. package/tests/test-app/src/pages/TicketManagementPage.tsx +1238 -0
  67. package/tests/test-app/src/pages/VisualAIIDEUpgrade.tsx +245 -0
  68. package/tests/test-app/src/pages/appthen_guide/ComponentTreeUnderstanding.tsx +26 -0
  69. package/tests/test-app/src/pages/appthen_guide/DataBindingLearning.tsx +26 -0
  70. package/tests/test-app/src/pages/back-end/adminRootLayout.tsx +155 -0
  71. package/tests/test-app/src/pages/back-end/adminRootLayout10.tsx +157 -0
  72. package/tests/test-app/src/pages/back-end/adminRootLayout2.tsx +156 -0
  73. package/tests/test-app/src/pages/back-end/adminRootLayout3.tsx +156 -0
  74. package/tests/test-app/src/pages/back-end/adminRootLayout4.tsx +157 -0
  75. package/tests/test-app/src/pages/back-end/adminRootLayout5.tsx +157 -0
  76. package/tests/test-app/src/pages/back-end/adminRootLayout6.tsx +157 -0
  77. package/tests/test-app/src/pages/back-end/adminRootLayout7.tsx +157 -0
  78. package/tests/test-app/src/pages/back-end/adminRootLayout8.tsx +157 -0
  79. package/tests/test-app/src/pages/back-end/adminRootLayout9.tsx +157 -0
  80. package/tests/test-app/src/pages/back-end/backgroundManagementSystem.css +5 -0
  81. package/tests/test-app/src/pages/back-end/backgroundManagementSystem.tsx +1745 -0
  82. package/tests/test-app/src/pages/component/WorkOrderCard.tsx +140 -0
  83. package/tests/test-app/src/pages/cover.tsx +42 -0
  84. package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.css +181 -0
  85. package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.tsx +225 -0
  86. package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.css +181 -0
  87. package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.tsx +138 -0
  88. package/tests/test-app/src/pages/data_dashboard/component_library/BlueBrightGreenBorder.tsx +47 -0
  89. package/tests/test-app/src/pages/data_dashboard/component_library/FullScreenContainer.tsx +133 -0
  90. package/tests/test-app/src/pages/description_of_mock_interface.md +32 -0
  91. package/tests/test-app/src/pages/digitalLargeScreen.css +181 -0
  92. package/tests/test-app/src/pages/digitalLargeScreen.tsx +1417 -0
  93. package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.css +3 -0
  94. package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.tsx +362 -0
  95. package/tests/test-app/src/pages/mobile_terminal/WorkOrderHomepage.tsx +337 -0
  96. package/tests/test-app/src/pages/mobile_terminal/newWorkOrder.tsx +224 -0
  97. package/tests/test-app/src/pages/mobile_terminal/tabbar.tsx +67 -0
  98. package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +638 -0
  99. package/tests/test-app/src/pages/mobile_terminal/workOrderDetails.tsx +346 -0
  100. package/tests/test-app/src/pages/mobile_terminal/workOrderPage.tsx +345 -0
  101. package/tests/test-app/src/pages/testPage.css +3 -0
  102. package/tests/test-app/src/pages/testPage.tsx +158 -0
  103. package/tests/test-app/src/pages/web_version/website.css +205 -0
  104. package/tests/test-app/src/pages/web_version/website.tsx +1066 -0
  105. package/tests/test-app/src/pages//345/276/205/345/212/236.apidoc.json +336 -0
  106. package/tests/test-app/src/project.json +1120 -0
  107. package/tests/test-app/src/store/global.store.ts +10 -0
  108. package/tests/test-app/src/types/CreateTicketParams.m.ts +20 -0
  109. package/tests/test-app/src/types/SLAPolicy.ts +50 -0
  110. package/tests/test-app/src/types/Ticket.ts +68 -0
  111. package/tests/test-app/src/types/TicketAttachment.m.ts +67 -0
  112. package/tests/test-app/src/types/TicketComment.m.ts +59 -0
  113. package/tests/test-app/src/types/TicketEvaluation.ts +44 -0
  114. package/tests/test-app/src/types/TicketHistory.m.ts +71 -0
  115. package/tests/test-app/src/types/TicketListParams.m.ts +30 -0
  116. package/tests/test-app/src/types/TicketPriority.m.ts +65 -0
  117. package/tests/test-app/src/types/TicketRecord.ts +47 -0
  118. package/tests/test-app/src/types/TrainDoor.ts +284 -0
  119. package/tests/test-app/src/types/UpdateTicketParams.m.ts +22 -0
  120. package/tests/test-app/src/utils/__afterRequest.util.ts +3 -0
  121. package/tests/test-app/src/utils/__beforeRequest.util.ts +10 -0
  122. package/tests/test-app/src/utils/testGlobalAction.util.ts +7 -0
@@ -0,0 +1,284 @@
1
+ /**
2
+ * 列车车门系统状态枚举
3
+ */
4
+ export enum DoorSystemStatus {
5
+ NORMAL = 'normal',
6
+ WARNING = 'warning',
7
+ FAULT = 'fault',
8
+ OFFLINE = 'offline'
9
+ }
10
+
11
+ /**
12
+ * 车门故障类型枚举
13
+ */
14
+ export enum DoorFaultType {
15
+ MECHANICAL = 'mechanical',
16
+ ELECTRICAL = 'electrical',
17
+ SENSOR = 'sensor',
18
+ CONTROL = 'control',
19
+ COMMUNICATION = 'communication'
20
+ }
21
+
22
+ /**
23
+ * 车门运行状态枚举
24
+ */
25
+ export enum DoorOperatingStatus {
26
+ OPEN = 'open',
27
+ CLOSED = 'closed',
28
+ OPENING = 'opening',
29
+ CLOSING = 'closing',
30
+ STUCK = 'stuck',
31
+ MAINTENANCE = 'maintenance'
32
+ }
33
+
34
+ /**
35
+ * 车门数据实体
36
+ * 用于存储车门的基本信息和状态
37
+ */
38
+ @Entity({
39
+ name: "train_doors"
40
+ })
41
+ export class TrainDoor {
42
+ id: number;
43
+
44
+ /* 列车ID */
45
+ @Column({
46
+ type: "varchar",
47
+ length: 50,
48
+ nullable: false
49
+ })
50
+ trainId: string = "";
51
+
52
+ /* 车厢号 */
53
+ @Column({
54
+ type: "varchar",
55
+ length: 20,
56
+ nullable: false
57
+ })
58
+ carriageNumber: string = "";
59
+
60
+ /* 车门编号 */
61
+ @Column({
62
+ type: "varchar",
63
+ length: 30,
64
+ nullable: false
65
+ })
66
+ doorNumber: string = "";
67
+
68
+ /* 车门位置(左侧/右侧) */
69
+ @Column({
70
+ type: "varchar",
71
+ length: 10,
72
+ nullable: false
73
+ })
74
+ doorPosition: string = "";
75
+
76
+ /* 车门状态 */
77
+ @Column({
78
+ type: "varchar",
79
+ length: 20,
80
+ nullable: false
81
+ })
82
+ status: DoorSystemStatus = DoorSystemStatus.NORMAL;
83
+
84
+ /* 运行状态 */
85
+ @Column({
86
+ type: "varchar",
87
+ length: 20,
88
+ nullable: false
89
+ })
90
+ operatingStatus: DoorOperatingStatus = DoorOperatingStatus.CLOSED;
91
+
92
+ /* 开关次数 */
93
+ @Column({
94
+ type: "int",
95
+ nullable: false
96
+ })
97
+ operationCount: number = 0;
98
+
99
+ /* 故障次数 */
100
+ @Column({
101
+ type: "int",
102
+ nullable: false
103
+ })
104
+ faultCount: number = 0;
105
+
106
+ /* 上次维护时间 */
107
+ @Column({
108
+ type: "timestamp",
109
+ nullable: true
110
+ })
111
+ lastMaintenanceTime?: Date;
112
+
113
+ /* 下次维护时间 */
114
+ @Column({
115
+ type: "timestamp",
116
+ nullable: true
117
+ })
118
+ nextMaintenanceTime?: Date;
119
+
120
+ /* 使用寿命(百分比) */
121
+ @Column({
122
+ type: "decimal",
123
+ precision: 5,
124
+ scale: 2,
125
+ nullable: false
126
+ })
127
+ lifespanPercentage: number = 100;
128
+
129
+ /* 创建时间 */
130
+ createdAt: Date = new Date();
131
+
132
+ /* 更新时间 */
133
+ updatedAt: Date = new Date();
134
+ }
135
+
136
+ /**
137
+ * 车门故障记录实体
138
+ */
139
+ @Entity({
140
+ name: "door_fault_records"
141
+ })
142
+ export class DoorFaultRecord {
143
+ id: number;
144
+
145
+ /* 车门ID */
146
+ @Column({
147
+ type: "int",
148
+ nullable: false
149
+ })
150
+ doorId: number;
151
+
152
+ /* 故障类型 */
153
+ @Column({
154
+ type: "varchar",
155
+ length: 30,
156
+ nullable: false
157
+ })
158
+ faultType: DoorFaultType = DoorFaultType.MECHANICAL;
159
+
160
+ /* 故障描述 */
161
+ @Column({
162
+ type: "text",
163
+ nullable: false
164
+ })
165
+ description: string = "";
166
+
167
+ /* 故障严重程度(1-5) */
168
+ @Column({
169
+ type: "int",
170
+ nullable: false
171
+ })
172
+ severity: number = 1;
173
+
174
+ /* 故障开始时间 */
175
+ @Column({
176
+ type: "timestamp",
177
+ nullable: false
178
+ })
179
+ faultStartTime: Date = new Date();
180
+
181
+ /* 故障结束时间 */
182
+ @Column({
183
+ type: "timestamp",
184
+ nullable: true
185
+ })
186
+ faultEndTime?: Date;
187
+
188
+ /* 修复时间(分钟) */
189
+ @Column({
190
+ type: "int",
191
+ nullable: true
192
+ })
193
+ repairDuration?: number;
194
+
195
+ /* 维修人员 */
196
+ @Column({
197
+ type: "varchar",
198
+ length: 50,
199
+ nullable: true
200
+ })
201
+ repairPerson?: string;
202
+
203
+ /* 故障状态 */
204
+ @Column({
205
+ type: "varchar",
206
+ length: 20,
207
+ nullable: false
208
+ })
209
+ status: string = "active"; // active, resolved, maintenance
210
+
211
+ /* 创建时间 */
212
+ createdAt: Date = new Date();
213
+ }
214
+
215
+ /**
216
+ * 车门运行记录实体
217
+ */
218
+ @Entity({
219
+ name: "door_operation_records"
220
+ })
221
+ export class DoorOperationRecord {
222
+ id: number;
223
+
224
+ /* 车门ID */
225
+ @Column({
226
+ type: "int",
227
+ nullable: false
228
+ })
229
+ doorId: number;
230
+
231
+ /* 操作类型 */
232
+ @Column({
233
+ type: "varchar",
234
+ length: 20,
235
+ nullable: false
236
+ })
237
+ operationType: DoorOperatingStatus = DoorOperatingStatus.OPEN;
238
+
239
+ /* 操作开始时间 */
240
+ @Column({
241
+ type: "timestamp",
242
+ nullable: false
243
+ })
244
+ operationStartTime: Date = new Date();
245
+
246
+ /* 操作结束时间 */
247
+ @Column({
248
+ type: "timestamp",
249
+ nullable: true
250
+ })
251
+ operationEndTime?: Date;
252
+
253
+ /* 操作持续时间(毫秒) */
254
+ @Column({
255
+ type: "int",
256
+ nullable: true
257
+ })
258
+ duration?: number;
259
+
260
+ /* 操作是否成功 */
261
+ @Column({
262
+ type: "boolean",
263
+ nullable: false
264
+ })
265
+ success: boolean = true;
266
+
267
+ /* 错误信息 */
268
+ @Column({
269
+ type: "text",
270
+ nullable: true
271
+ })
272
+ errorMessage?: string;
273
+
274
+ /* 站点信息 */
275
+ @Column({
276
+ type: "varchar",
277
+ length: 100,
278
+ nullable: true
279
+ })
280
+ station?: string;
281
+
282
+ /* 创建时间 */
283
+ createdAt: Date = new Date();
284
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 更新工单参数
3
+ * 用于更新工单信息时的参数定义
4
+ */
5
+ export class UpdateTicketParams {
6
+ /* 工单标题 */
7
+ title: string = "";
8
+ /* 工单描述 */
9
+ description: string = "";
10
+ /* 分类ID */
11
+ categoryId: number = 0;
12
+ /* 优先级ID */
13
+ priorityId: number = 0;
14
+ /* 处理人ID */
15
+ assigneeId: string = "";
16
+ /* 状态ID */
17
+ statusId: number = 0;
18
+ /* 标签 */
19
+ tags: string[] = [];
20
+ /* 截止日期 */
21
+ dueDate: Date = new Date();
22
+ }
@@ -0,0 +1,3 @@
1
+ function __afterRequest(response) {
2
+ return response;
3
+ }
@@ -0,0 +1,10 @@
1
+ async function __beforeRequest(options) {
2
+ const accessToken = this.utils.getGlobalData('accessToken');
3
+ if (accessToken) {
4
+ options.headers = {
5
+ ...options.headers,
6
+ Authorization: accessToken,
7
+ }
8
+ }
9
+ return options;
10
+ }
@@ -0,0 +1,7 @@
1
+ function testGlobalAction() {
2
+
3
+ this.utils.notification.success({
4
+ message: `测试全局动作`,
5
+ description: '内容',
6
+ })
7
+ }