@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,402 @@
1
+ /**
2
+ * 工单管理系统 - 管理所有工单信息
3
+ * @type Page
4
+ * @route /ticket-management
5
+ * @screen 1920w
6
+ * @frames web
7
+ */
8
+ import React from 'react';
9
+
10
+
11
+
12
+ class IProps {
13
+ title?: string;
14
+ }
15
+
16
+ /*
17
+ * 数据与接口请求定义
18
+ */
19
+ class IState {
20
+ tickets?: string[];
21
+ loading?: boolean;
22
+ searchKeyword?: string;
23
+ statusFilter?: string;
24
+ selectedTicket?: any;
25
+ showCreateModal?: boolean;
26
+ showDetailModal?: boolean;
27
+ formData?: any;
28
+ }
29
+
30
+ class Document extends React.Component<IProps, IState> {
31
+ state = {
32
+ tickets: [],
33
+ loading: false,
34
+ searchKeyword: '',
35
+ statusFilter: '',
36
+ selectedTicket: null,
37
+ showCreateModal: false,
38
+ showDetailModal: false,
39
+ formData: {},
40
+ };
41
+
42
+ componentDidMount() {
43
+ this.loadTickets();
44
+ }
45
+
46
+ loadTickets() {
47
+ this.setState({
48
+ loading: true,
49
+ });
50
+ setTimeout(() => {
51
+ this.setState({
52
+ tickets: [
53
+ {
54
+ id: 1,
55
+ title: '系统登录失败',
56
+ description: '无法登录系统,提示密码错误',
57
+ priority: '高',
58
+ status: '待处理',
59
+ assignee: '张三',
60
+ createTime: '2024-01-15 10:30:00',
61
+ },
62
+ {
63
+ id: 2,
64
+ title: '数据导出异常',
65
+ description: '导出Excel文件时出现乱码',
66
+ priority: '中',
67
+ status: '处理中',
68
+ assignee: '李四',
69
+ createTime: '2024-01-15 14:20:00',
70
+ },
71
+ {
72
+ id: 3,
73
+ title: '页面加载缓慢',
74
+ description: '首页加载时间超过10秒',
75
+ priority: '低',
76
+ status: '已解决',
77
+ assignee: '王五',
78
+ createTime: '2024-01-14 09:15:00',
79
+ },
80
+ {
81
+ id: 4,
82
+ title: '报表数据不准确',
83
+ description: '月度报表数据与实际不符',
84
+ priority: '高',
85
+ status: '待处理',
86
+ assignee: '张三',
87
+ createTime: '2024-01-16 11:45:00',
88
+ },
89
+ {
90
+ id: 5,
91
+ title: '权限配置问题',
92
+ description: '部分用户无法访问特定模块',
93
+ priority: '中',
94
+ status: '处理中',
95
+ assignee: '李四',
96
+ createTime: '2024-01-16 16:30:00',
97
+ },
98
+ ],
99
+ loading: false,
100
+ });
101
+ }, 500);
102
+ }
103
+
104
+ handleSearch(keyword) {
105
+ this.setState({
106
+ searchKeyword: keyword.trim(),
107
+ });
108
+ }
109
+
110
+ handleStatusFilter(status) {
111
+ this.setState({
112
+ statusFilter: status,
113
+ });
114
+ }
115
+
116
+ handleViewDetail(ticket) {
117
+ this.setState({
118
+ selectedTicket: ticket,
119
+ showDetailModal: true,
120
+ });
121
+ }
122
+
123
+ handleCreateTicket() {
124
+ this.setState({
125
+ showCreateModal: true,
126
+ formData: {},
127
+ });
128
+ }
129
+
130
+ handleCloseCreateModal() {
131
+ this.setState({
132
+ showCreateModal: false,
133
+ });
134
+ }
135
+
136
+ handleCloseDetailModal() {
137
+ this.setState({
138
+ showDetailModal: false,
139
+ });
140
+ }
141
+
142
+ handleFormChange(field, value) {
143
+ this.setState({
144
+ formData: {
145
+ ...this.state.formData,
146
+ [field]: value,
147
+ },
148
+ });
149
+ }
150
+
151
+ handleSubmitTicket() {
152
+ const newTicket = {
153
+ id: this.state.tickets?.length + 1,
154
+ title: this.state.formData?.title || '',
155
+ description: this.state.formData?.description || '',
156
+ priority: this.state.formData?.priority || '中',
157
+ status: '待处理',
158
+ assignee: this.state.formData?.assignee || '',
159
+ createTime: new Date().toLocaleString('zh-CN'),
160
+ };
161
+ this.setState({
162
+ tickets: [newTicket, ...(this.state.tickets || [])],
163
+ showCreateModal: false,
164
+ formData: {},
165
+ });
166
+ }
167
+
168
+ getFilteredTickets() {
169
+ let tickets = this.state.tickets || [];
170
+ if (this.state.searchKeyword) {
171
+ tickets = tickets.filter(
172
+ ticket =>
173
+ ticket?.title?.includes(this.state.searchKeyword) ||
174
+ ticket?.description?.includes(this.state.searchKeyword)
175
+ );
176
+ }
177
+ if (this.state.statusFilter) {
178
+ tickets = tickets.filter(
179
+ ticket => ticket?.status === this.state.statusFilter
180
+ );
181
+ }
182
+ return tickets;
183
+ }
184
+
185
+ getPriorityColor(priority) {
186
+ const colors = {
187
+ 高: '#ff4d4f',
188
+ 中: '#faad14',
189
+ 低: '#52c41a',
190
+ };
191
+ return colors[priority] || '#d9d9d9';
192
+ }
193
+
194
+ getStatusColor(status) {
195
+ const colors = {
196
+ 待处理: '#ff4d4f',
197
+ 处理中: '#1890ff',
198
+ 已解决: '#52c41a',
199
+ 已关闭: '#d9d9d9',
200
+ };
201
+ return colors[status] || '#d9d9d9';
202
+ }
203
+
204
+ render() {
205
+ return (
206
+ <Page className="p-[24px]">
207
+ <View className="flex justify-between items-center mb-[24px]">
208
+ <Text className="text-2xl font-bold">
209
+ {this.props.title || '工单管理系统'}
210
+ </Text>
211
+ <Button type="primary" onClick={() => this.handleCreateTicket()}>
212
+ 新增工单
213
+ </Button>
214
+ </View>
215
+ <View className="gap-4 mb-[16px] flex">
216
+ <Input
217
+ placeholder="请输入工单标题或描述搜索"
218
+ value={this.state.searchKeyword}
219
+ onChange={e => this.handleSearch(e.target.value)}
220
+ className="flex-1"
221
+ />
222
+ <Select
223
+ placeholder="选择工单状态"
224
+ value={this.state.statusFilter}
225
+ onChange={value => this.handleStatusFilter(value)}
226
+ allowClear={true}
227
+ className="w-[192px]"
228
+ >
229
+ <Select.Option value="待处理">待处理</Select.Option>
230
+ <Select.Option value="处理中">处理中</Select.Option>
231
+ <Select.Option value="已解决">已解决</Select.Option>
232
+ <Select.Option value="已关闭">已关闭</Select.Option>
233
+ </Select>
234
+ </View>
235
+ <Table
236
+ columns={[
237
+ { title: '工单ID', dataIndex: 'id', key: 'id', width: 80 },
238
+ { title: '工单标题', dataIndex: 'title', key: 'title' },
239
+ {
240
+ title: '优先级',
241
+ dataIndex: 'priority',
242
+ key: 'priority',
243
+ render: priority => (
244
+ <Text
245
+ style={{
246
+ color: this.getPriorityColor(priority),
247
+ fontWeight: 'bold',
248
+ }}
249
+ >
250
+ {priority}
251
+ </Text>
252
+ ),
253
+ },
254
+ {
255
+ title: '状态',
256
+ dataIndex: 'status',
257
+ key: 'status',
258
+ render: status => (
259
+ <Text
260
+ style={{
261
+ color: this.getStatusColor(status),
262
+ fontWeight: 'bold',
263
+ }}
264
+ >
265
+ {status}
266
+ </Text>
267
+ ),
268
+ },
269
+ { title: '处理人', dataIndex: 'assignee', key: 'assignee' },
270
+ { title: '创建时间', dataIndex: 'createTime', key: 'createTime' },
271
+ {
272
+ title: '操作',
273
+ key: 'action',
274
+ render: (text, record) => (
275
+ <Button
276
+ type="link"
277
+ onClick={() => this.handleViewDetail(record)}
278
+ >
279
+ 查看详情
280
+ </Button>
281
+ ),
282
+ },
283
+ ]}
284
+ dataSource={this.getFilteredTickets()}
285
+ loading={this.state.loading}
286
+ rowKey="id"
287
+ />
288
+ <Modal
289
+ title="新增工单"
290
+ open={this.state.showCreateModal}
291
+ onOk={() => this.handleSubmitTicket()}
292
+ onCancel={() => this.handleCloseCreateModal()}
293
+ width={600}
294
+ >
295
+ <Form layout="vertical">
296
+ <Form.Item label="工单标题" required={true}>
297
+ <Input
298
+ placeholder="请输入工单标题"
299
+ value={this.state.formData?.title || ''}
300
+ onChange={e => this.handleFormChange('title', e.target.value)}
301
+ />
302
+ </Form.Item>
303
+ <Form.Item label="工单描述" required={true}>
304
+ <Input.TextArea
305
+ placeholder="请输入工单描述"
306
+ rows={4}
307
+ value={this.state.formData?.description || ''}
308
+ onChange={e =>
309
+ this.handleFormChange('description', e.target.value)
310
+ }
311
+ />
312
+ </Form.Item>
313
+ <Form.Item label="优先级" required={true}>
314
+ <Select
315
+ placeholder="请选择优先级"
316
+ value={this.state.formData?.priority}
317
+ onChange={value => this.handleFormChange('priority', value)}
318
+ >
319
+ <Select.Option value="高">高</Select.Option>
320
+ <Select.Option value="中">中</Select.Option>
321
+ <Select.Option value="低">低</Select.Option>
322
+ </Select>
323
+ </Form.Item>
324
+ <Form.Item label="处理人">
325
+ <Input
326
+ placeholder="请输入处理人"
327
+ value={this.state.formData?.assignee || ''}
328
+ onChange={e =>
329
+ this.handleFormChange('assignee', e.target.value)
330
+ }
331
+ />
332
+ </Form.Item>
333
+ </Form>
334
+ </Modal>
335
+ <Modal
336
+ title="工单详情"
337
+ open={this.state.showDetailModal}
338
+ onCancel={() => this.handleCloseDetailModal()}
339
+ footer={[
340
+ <Button key="close" onClick={() => this.handleCloseDetailModal()}>
341
+ 关闭
342
+ </Button>,
343
+ ]}
344
+ width={700}
345
+ >
346
+ {!!this.state.selectedTicket && (
347
+ <View>
348
+ <View className="mb-[16px]">
349
+ <Text className="font-bold">工单ID:</Text>
350
+ <Text>{this.state.selectedTicket?.id}</Text>
351
+ </View>
352
+ <View className="mb-[16px]">
353
+ <Text className="font-bold">工单标题:</Text>
354
+ <Text>{this.state.selectedTicket?.title}</Text>
355
+ </View>
356
+ <View className="mb-[16px]">
357
+ <Text className="font-bold">工单描述:</Text>
358
+ <Text>{this.state.selectedTicket?.description}</Text>
359
+ </View>
360
+ <View className="mb-[16px]">
361
+ <Text className="font-bold">优先级:</Text>
362
+ <Text
363
+ style={{
364
+ color: this.getPriorityColor(
365
+ this.state.selectedTicket?.priority
366
+ ),
367
+ fontWeight: 'bold',
368
+ }}
369
+ >
370
+ {this.state.selectedTicket?.priority}
371
+ </Text>
372
+ </View>
373
+ <View className="mb-[16px]">
374
+ <Text className="font-bold">状态:</Text>
375
+ <Text
376
+ style={{
377
+ color: this.getStatusColor(
378
+ this.state.selectedTicket?.status
379
+ ),
380
+ fontWeight: 'bold',
381
+ }}
382
+ >
383
+ {this.state.selectedTicket?.status}
384
+ </Text>
385
+ </View>
386
+ <View className="mb-[16px]">
387
+ <Text className="font-bold">处理人:</Text>
388
+ <Text>{this.state.selectedTicket?.assignee}</Text>
389
+ </View>
390
+ <View className="mb-[16px]">
391
+ <Text className="font-bold">创建时间:</Text>
392
+ <Text>{this.state.selectedTicket?.createTime}</Text>
393
+ </View>
394
+ </View>
395
+ )}
396
+ </Modal>
397
+ </Page>
398
+ );
399
+ }
400
+ }
401
+
402
+ export default Document;