@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,181 @@
1
+ :root {
2
+ --primary-color: #1a1b2f;
3
+ --secondary-color: #2a2b3f;
4
+ --accent-color: #81d3fc;
5
+ --text-color: #ffffff;
6
+ --warning-color: #ffcc00;
7
+ --danger-color: #ff4d4f;
8
+ --success-color: #52c41a;
9
+ }
10
+
11
+ body {
12
+ margin: 0;
13
+ padding: 0;
14
+ font-family: 'Arial', sans-serif;
15
+ background-color: var(--primary-color);
16
+ color: var(--text-color);
17
+ }
18
+
19
+ .container {
20
+ width: 100%;
21
+ height: 100vh;
22
+ display: grid;
23
+ grid-template-rows: 80px 1fr;
24
+ grid-template-columns: 1fr;
25
+ }
26
+
27
+ .header {
28
+ background-color: var(--secondary-color);
29
+ padding: 0 20px;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: space-between;
33
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
34
+ }
35
+
36
+ .header-title {
37
+ font-size: 24px;
38
+ font-weight: bold;
39
+ color: var(--accent-color);
40
+ }
41
+
42
+ .header-status {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: 15px;
46
+ }
47
+
48
+ .status-indicator {
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 5px;
52
+ }
53
+
54
+ .status-dot {
55
+ width: 10px;
56
+ height: 10px;
57
+ border-radius: 50%;
58
+ }
59
+
60
+ .status-dot.online {
61
+ background-color: var(--success-color);
62
+ }
63
+
64
+ .main-content {
65
+ display: grid;
66
+ grid-template-columns: 300px 1fr 300px;
67
+ gap: 20px;
68
+ padding: 20px;
69
+ }
70
+
71
+ .panel {
72
+ background-color: var(--secondary-color);
73
+ border-radius: 8px;
74
+ padding: 15px;
75
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
76
+ }
77
+
78
+ .panel-title {
79
+ font-size: 18px;
80
+ font-weight: bold;
81
+ color: var(--accent-color);
82
+ margin-bottom: 15px;
83
+ padding-bottom: 10px;
84
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
85
+ }
86
+
87
+ .metro-map {
88
+ display: flex;
89
+ flex-direction: column;
90
+ }
91
+
92
+ .train-list {
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: 15px;
96
+ }
97
+
98
+ .train-card {
99
+ background-color: rgba(42, 43, 63, 0.8);
100
+ border-radius: 6px;
101
+ padding: 15px;
102
+ border-left: 4px solid var(--accent-color);
103
+ }
104
+
105
+ .train-info {
106
+ display: flex;
107
+ justify-content: space-between;
108
+ margin-bottom: 10px;
109
+ }
110
+
111
+ .train-id {
112
+ font-weight: bold;
113
+ color: var(--accent-color);
114
+ }
115
+
116
+ .train-status {
117
+ padding: 3px 8px;
118
+ border-radius: 4px;
119
+ font-size: 12px;
120
+ }
121
+
122
+ .status-normal {
123
+ background-color: var(--success-color);
124
+ }
125
+
126
+ .status-warning {
127
+ background-color: var(--warning-color);
128
+ }
129
+
130
+ .status-danger {
131
+ background-color: var(--danger-color);
132
+ }
133
+
134
+ .train-details {
135
+ display: grid;
136
+ grid-template-columns: repeat(2, 1fr);
137
+ gap: 10px;
138
+ }
139
+
140
+ .detail-item {
141
+ font-size: 14px;
142
+ }
143
+
144
+ .detail-label {
145
+ color: rgba(255, 255, 255, 0.7);
146
+ margin-right: 5px;
147
+ }
148
+
149
+ .alert-list {
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: 10px;
153
+ }
154
+
155
+ .alert-item {
156
+ background-color: rgba(42, 43, 63, 0.8);
157
+ border-radius: 6px;
158
+ padding: 12px;
159
+ border-left: 4px solid var(--danger-color);
160
+ }
161
+
162
+ .alert-time {
163
+ font-size: 12px;
164
+ color: rgba(255, 255, 255, 0.7);
165
+ }
166
+
167
+ .alert-message {
168
+ font-weight: bold;
169
+ margin: 5px 0;
170
+ }
171
+
172
+ .alert-train {
173
+ font-size: 12px;
174
+ color: var(--accent-color);
175
+ }
176
+
177
+ @media (max-width: 1200px) {
178
+ .main-content {
179
+ grid-template-columns: 1fr;
180
+ }
181
+ }
@@ -0,0 +1,138 @@
1
+ /**
2
+ * 蓝色大屏
3
+ * @type Page
4
+ * @screen 1920x1080 #2c2c2c
5
+ * @frames web
6
+ */
7
+ import React from 'react';
8
+ import { Page, Text, View } from '@appthen/react';
9
+ import BlueBrightGreenBorder from '/src/pages/border/BlueBrightGreenBorder';
10
+ import FullScreenContainer from '/src/pages/screen/FullScreenContainer';
11
+ import './blueLargeScreen.css';
12
+
13
+ class IProps {}
14
+
15
+ /*
16
+ * 数据与接口请求定义
17
+ */
18
+ class IState {}
19
+
20
+ class Document extends React.Component<IProps, IState> {
21
+ state = {};
22
+
23
+ render() {
24
+ return (
25
+ <Page className="h-screen">
26
+ <FullScreenContainer
27
+ content={
28
+ <View className="h-full flex flex-col">
29
+ <View
30
+ key="header"
31
+ style={{
32
+ height: '100px',
33
+ backgroundImage:
34
+ 'url(https://cdn.appthen.com/Fu5bWQQXD0SVPRCq31hi3903u5xD)',
35
+ backgroundSize: 'cover',
36
+ backgroundPosition: 'center',
37
+ display: 'flex',
38
+ flexDirection: 'column',
39
+ }}
40
+ >
41
+ <View className="flex-1 flex flex-row">
42
+ <View __hidePh={true} className="flex-1" />
43
+ <View className="flex-1 flex flex-col justify-center items-center">
44
+ <Text className="text-[44px] text-[#81d3fc] font-extrabold mt-[-10px]">
45
+ 蓝色科技风数据可视化大屏
46
+ </Text>
47
+ </View>
48
+ <View __hidePh={true} className="flex-1" />
49
+ </View>
50
+ </View>
51
+ <View key="main" className="flex-1 flex flex-row mt-[-24px]">
52
+ <View className="flex-1 pl-[20px] pr-[10px] flex flex-col">
53
+ <BlueBrightGreenBorder
54
+ content={
55
+ <View className="p-[16px] flex flex-col h-full">
56
+ <Text className="text-lg font-bold text-[#ffffff] mb-[16px]">
57
+ 标题
58
+ </Text>
59
+ <View className="mt-[16px] grid grid-cols-1 gap-4" />
60
+ </View>
61
+ }
62
+ className="flex flex-col h-[537px]"
63
+ />
64
+ <BlueBrightGreenBorder
65
+ content={
66
+ <View className="p-[16px] flex flex-col h-full">
67
+ <Text className="text-lg font-bold text-[#ffffff] mb-[16px]">
68
+ 标题
69
+ </Text>
70
+ <View className="mt-[16px] grid grid-cols-1 gap-4" />
71
+ </View>
72
+ }
73
+ className="flex flex-col flex-1"
74
+ />
75
+ </View>
76
+ <View className="flex-1 flex flex-col pt-[66px] pl-[10px] pr-[10px]">
77
+ <BlueBrightGreenBorder
78
+ content={
79
+ <View className="p-[16px] flex flex-col h-full">
80
+ <Text className="text-lg font-bold text-[#ffffff] mb-[16px]">
81
+ 标题
82
+ </Text>
83
+ <View className="mt-[16px] grid grid-cols-1 gap-4" />
84
+ </View>
85
+ }
86
+ className="flex flex-col h-[537px] flex-1"
87
+ />
88
+ <BlueBrightGreenBorder
89
+ content={
90
+ <View className="p-[16px] flex flex-col h-full">
91
+ <Text className="text-lg font-bold text-[#ffffff] mb-[16px]">
92
+ 标题
93
+ </Text>
94
+ </View>
95
+ }
96
+ className="h-[500px] flex flex-col"
97
+ />
98
+ </View>
99
+ <View className="flex-1 pr-[20px] pl-[10px] flex flex-col">
100
+ <BlueBrightGreenBorder
101
+ content={
102
+ <View className="p-[16px] flex flex-col h-full">
103
+ <Text className="text-xl font-bold text-[#ffffff] mb-[16px]">
104
+ 告警列表
105
+ </Text>
106
+ </View>
107
+ }
108
+ className="h-[534px] flex flex-col"
109
+ />
110
+ <BlueBrightGreenBorder
111
+ content={
112
+ <View className="p-[16px] flex flex-col h-full">
113
+ <Text className="text-xl font-bold text-[#ffffff] mb-[16px]">
114
+ 预警列表
115
+ </Text>
116
+ </View>
117
+ }
118
+ className="flex flex-col flex-1"
119
+ />
120
+ </View>
121
+ </View>
122
+ <View key="footer" className="bg-[#1a1b2f] p-[16px]">
123
+ <Text className="text-[#ffffff]">
124
+ 系统状态: 在线 | 最后更新:{new Date().toLocaleString()}
125
+ </Text>
126
+ </View>
127
+ </View>
128
+ }
129
+ baseWidth={2560}
130
+ baseHeight={1440}
131
+ className="h-screen bg-[#0f1129] flex flex-col"
132
+ />
133
+ </Page>
134
+ );
135
+ }
136
+ }
137
+
138
+ export default Document;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * 蓝亮绿边框
3
+ * @type Component
4
+ * @screen 500x300 #0d0d21
5
+ * @frames web
6
+ */
7
+ import React from 'react';
8
+ import { Component, View } from '@appthen/react';
9
+
10
+
11
+ class IProps {
12
+ /* 组件内容 */
13
+ @Form({
14
+ setter: "SlotSetter"
15
+ })
16
+ content: any;
17
+ }
18
+
19
+ /*
20
+ * 数据与接口请求定义
21
+ */
22
+ class IState {}
23
+
24
+ class Document extends React.Component<IProps, IState> {
25
+ state = {};
26
+
27
+ render() {
28
+ return (
29
+ <React.Fragment fill={true}>
30
+ <View
31
+ className="blue-green-panel"
32
+ style={this.props.style}
33
+ _unsafe_classNameJson={[{ selector: 'blue-green-panel' }]}
34
+ >
35
+ <View
36
+ className="blue-green-panel-panel flex-1 flex flex-col"
37
+ _unsafe_classNameJson={[{ selector: 'blue-green-panel-panel' }]}
38
+ >
39
+ {this.props.content}
40
+ </View>
41
+ </View>
42
+ </React.Fragment>
43
+ );
44
+ }
45
+ }
46
+
47
+ export default Document;
@@ -0,0 +1,133 @@
1
+ /**
2
+ * 全屏容器
3
+ * @type Component
4
+ * @screen 1400w
5
+ * @frames web
6
+ */
7
+ import React from 'react';
8
+ import { Component, View } from '@appthen/react';
9
+
10
+
11
+ class IProps {
12
+ /* 窗口宽度 */
13
+ baseWidth: number;
14
+ /* 窗口高度 */
15
+ baseHeight: number;
16
+ /* 组件节点 */
17
+ @Form({
18
+ setter: "SlotSetter"
19
+ })
20
+ content: any;
21
+ }
22
+
23
+ /*
24
+ * 数据与接口请求定义
25
+ */
26
+ class IState {
27
+ /* 容器ID */
28
+ containerId: any;
29
+ baseWidth: number;
30
+ baseHeight: number;
31
+ }
32
+
33
+ class Document extends React.Component<IProps, IState> {
34
+ state = {
35
+ containerId: `fullscreen-container-${Math.random()
36
+ .toString(36)
37
+ .substr(2, 9)}`,
38
+ baseWidth: 1920,
39
+ baseHeight: 1080,
40
+ };
41
+
42
+ /**
43
+ * * * 页面加载后执行
44
+ */
45
+ componentDidMount() {
46
+ const { baseWidth = 1920, baseHeight = 1080 } = this.props;
47
+ this.setState(
48
+ {
49
+ baseWidth,
50
+ baseHeight,
51
+ },
52
+ () => {
53
+ this.initContainer();
54
+ window.addEventListener('resize', this.handleResize);
55
+ setTimeout(() => {
56
+ this.handleResize();
57
+ }, 500);
58
+ }
59
+ );
60
+ }
61
+
62
+ /**
63
+ * * * 组件卸载前执行
64
+ */
65
+ componentWillUnmount() {
66
+ window.removeEventListener('resize', this.handleResize);
67
+ }
68
+
69
+ /**
70
+ * * * 初始化容器
71
+ */
72
+ initContainer() {
73
+ const container = (
74
+ window.AliLowCodeEngine?.project?.simulatorHost?.contentDocument ||
75
+ document
76
+ ).getElementById(this.state.containerId);
77
+ if (!container) {
78
+ if (!this.retry || this.retry < 2) {
79
+ this.retry = (this.retry || 0) + 1;
80
+ setTimeout(() => {
81
+ this.initContainer();
82
+ }, 500);
83
+ }
84
+ return;
85
+ }
86
+ const width = window.screen.width;
87
+ const height = window.screen.height;
88
+ container.style.width = `${width}px`;
89
+ container.style.height = `${height}px`;
90
+ container.style.transformOrigin = 'left top';
91
+ this.updateScale();
92
+ }
93
+
94
+ /**
95
+ * * * 处理窗口大小变化
96
+ */
97
+ handleResize() {
98
+ this.updateScale();
99
+ }
100
+
101
+ /**
102
+ * * * 更新缩放比例
103
+ */
104
+ updateScale() {
105
+ const _document =
106
+ window.AliLowCodeEngine?.project?.simulatorHost?.contentDocument ||
107
+ document;
108
+ const container = _document.getElementById(this.state.containerId);
109
+ if (!container) return;
110
+ const scaleX = _document.body.clientWidth / this.state.baseWidth;
111
+ const scaleY = _document.body.clientHeight / this.state.baseHeight;
112
+ const scale = Math.min(scaleX, scaleY);
113
+ container.style.width = `${this.state.baseWidth}px`;
114
+ container.style.height = `${this.state.baseHeight}px`;
115
+ container.style.transform = `scale(${scale})`;
116
+ }
117
+
118
+ render() {
119
+ return (
120
+ <React.Fragment>
121
+ <View
122
+ id={this.state.containerId}
123
+ className="full-screen-container"
124
+ style={this.props.style}
125
+ >
126
+ {this.props.content}
127
+ </View>
128
+ </React.Fragment>
129
+ );
130
+ }
131
+ }
132
+
133
+ export default Document;
@@ -0,0 +1,32 @@
1
+ # 数据大屏Mock接口说明
2
+
3
+ ## 接口权限验证
4
+
5
+ JWT Header: Authorization
6
+ Token
7
+ ```
8
+ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc1JlZnJlc2giOmZhbHNlLCJpZCI6MSwidGVuYW50SWQiOm51bGwsImlhdCI6MTc1MDQwNDk0NCwiZXhwIjoyMDY1NzY0OTQ0fQ.ksKiI0bwJ9d1NaQu-kvVdmdot62myiAytuzpETjIgmI
9
+ ```
10
+
11
+ ## 获取故障统计信息
12
+
13
+ URL: http://106.13.174.178:8001/app/phm-base/fault/statistics
14
+ Method: GET
15
+
16
+ ## 获取故障列表
17
+
18
+ URL: http://106.13.174.178:8001/app/phm-base/fault/page
19
+ Method: POST
20
+
21
+ 参数说明:
22
+
23
+ ```js
24
+ {
25
+ "productName":"hvac",
26
+ "carNo":"1",
27
+ "deviceNo":"1",
28
+ "startTime":"2025-07-15T11:49:27.000Z",
29
+ "endTime":"2025-07-15T11:51:27.000Z"
30
+ }
31
+ ```
32
+ // 所有参数都可选择不传或者传空字符串
@@ -0,0 +1,181 @@
1
+ :root {
2
+ --primary-color: #1a1b2f;
3
+ --secondary-color: #2a2b3f;
4
+ --accent-color: #81d3fc;
5
+ --text-color: #ffffff;
6
+ --warning-color: #ffcc00;
7
+ --danger-color: #ff4d4f;
8
+ --success-color: #52c41a;
9
+ }
10
+
11
+ body {
12
+ margin: 0;
13
+ padding: 0;
14
+ font-family: 'Arial', sans-serif;
15
+ background-color: var(--primary-color);
16
+ color: var(--text-color);
17
+ }
18
+
19
+ .container {
20
+ width: 100%;
21
+ height: 100vh;
22
+ display: grid;
23
+ grid-template-rows: 80px 1fr;
24
+ grid-template-columns: 1fr;
25
+ }
26
+
27
+ .header {
28
+ background-color: var(--secondary-color);
29
+ padding: 0 20px;
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: space-between;
33
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
34
+ }
35
+
36
+ .header-title {
37
+ font-size: 24px;
38
+ font-weight: bold;
39
+ color: var(--accent-color);
40
+ }
41
+
42
+ .header-status {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: 15px;
46
+ }
47
+
48
+ .status-indicator {
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 5px;
52
+ }
53
+
54
+ .status-dot {
55
+ width: 10px;
56
+ height: 10px;
57
+ border-radius: 50%;
58
+ }
59
+
60
+ .status-dot.online {
61
+ background-color: var(--success-color);
62
+ }
63
+
64
+ .main-content {
65
+ display: grid;
66
+ grid-template-columns: 300px 1fr 300px;
67
+ gap: 20px;
68
+ padding: 20px;
69
+ }
70
+
71
+ .panel {
72
+ background-color: var(--secondary-color);
73
+ border-radius: 8px;
74
+ padding: 15px;
75
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
76
+ }
77
+
78
+ .panel-title {
79
+ font-size: 18px;
80
+ font-weight: bold;
81
+ color: var(--accent-color);
82
+ margin-bottom: 15px;
83
+ padding-bottom: 10px;
84
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
85
+ }
86
+
87
+ .metro-map {
88
+ display: flex;
89
+ flex-direction: column;
90
+ }
91
+
92
+ .train-list {
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: 15px;
96
+ }
97
+
98
+ .train-card {
99
+ background-color: rgba(42, 43, 63, 0.8);
100
+ border-radius: 6px;
101
+ padding: 15px;
102
+ border-left: 4px solid var(--accent-color);
103
+ }
104
+
105
+ .train-info {
106
+ display: flex;
107
+ justify-content: space-between;
108
+ margin-bottom: 10px;
109
+ }
110
+
111
+ .train-id {
112
+ font-weight: bold;
113
+ color: var(--accent-color);
114
+ }
115
+
116
+ .train-status {
117
+ padding: 3px 8px;
118
+ border-radius: 4px;
119
+ font-size: 12px;
120
+ }
121
+
122
+ .status-normal {
123
+ background-color: var(--success-color);
124
+ }
125
+
126
+ .status-warning {
127
+ background-color: var(--warning-color);
128
+ }
129
+
130
+ .status-danger {
131
+ background-color: var(--danger-color);
132
+ }
133
+
134
+ .train-details {
135
+ display: grid;
136
+ grid-template-columns: repeat(2, 1fr);
137
+ gap: 10px;
138
+ }
139
+
140
+ .detail-item {
141
+ font-size: 14px;
142
+ }
143
+
144
+ .detail-label {
145
+ color: rgba(255, 255, 255, 0.7);
146
+ margin-right: 5px;
147
+ }
148
+
149
+ .alert-list {
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: 10px;
153
+ }
154
+
155
+ .alert-item {
156
+ background-color: rgba(42, 43, 63, 0.8);
157
+ border-radius: 6px;
158
+ padding: 12px;
159
+ border-left: 4px solid var(--danger-color);
160
+ }
161
+
162
+ .alert-time {
163
+ font-size: 12px;
164
+ color: rgba(255, 255, 255, 0.7);
165
+ }
166
+
167
+ .alert-message {
168
+ font-weight: bold;
169
+ margin: 5px 0;
170
+ }
171
+
172
+ .alert-train {
173
+ font-size: 12px;
174
+ color: var(--accent-color);
175
+ }
176
+
177
+ @media (max-width: 1200px) {
178
+ .main-content {
179
+ grid-template-columns: 1fr;
180
+ }
181
+ }