@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.
- package/.gitignore +1 -0
- package/bin/main.js +92 -0
- package/dist/index.js +7014 -14988
- package/package.json +8 -1
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1862 -0
- package/tests/test-app/.appthen/space-config.json +8 -0
- package/tests/test-app/docs/AI-Workflow.flow +112 -0
- package/tests/test-app/docs/Logic-1.flow +16 -0
- package/tests/test-app/docs/Logic.flow +16 -0
- package/tests/test-app/docs/Project-Blueprint-1.flow +119 -0
- package/tests/test-app/docs/Project-Blueprint.flow +119 -0
- package/tests/test-app/docs/README.md +3 -0
- package/tests/test-app/docs/claude.md +194 -0
- package/tests/test-app/docs/page_requirement_analysis.md +149 -0
- 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
- package/tests/test-app/src/apis/AddTodoPost.api.ts +42 -0
- package/tests/test-app/src/apis/DeleteTodoPost.api.ts +32 -0
- package/tests/test-app/src/apis/GetListPost.api.ts +38 -0
- package/tests/test-app/src/apis/TicketAttachmentUploadPost.api.ts +42 -0
- package/tests/test-app/src/apis/UpdateTodoPost.api.ts +46 -0
- package/tests/test-app/src/app.css +15 -0
- package/tests/test-app/src/cloud_functions/ticket|attachment|upload.node.ts +86 -0
- package/tests/test-app/src/cloud_functions/ticket|comment|add.node.ts +65 -0
- package/tests/test-app/src/cloud_functions/types|entity|Ticket.node.ts +88 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketAttachment.node.ts +70 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketCategory.node.ts +56 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketComment.node.ts +62 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketHistory.node.ts +74 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketPriority.node.ts +68 -0
- package/tests/test-app/src/cloud_functions/types|entity|TicketStatus.node.ts +63 -0
- package/tests/test-app/src/cloud_functions/types|models|CreateTicketParams.node.ts +20 -0
- package/tests/test-app/src/cloud_functions/types|models|TicketListParams.node.ts +30 -0
- package/tests/test-app/src/cloud_functions/types|models|UpdateTicketParams.node.ts +22 -0
- package/tests/test-app/src/components/Button.js +11 -0
- package/tests/test-app/src/components/MessageCenter.tsx +506 -0
- package/tests/test-app/src/components/MouduleDemoNzp.tsx +40 -0
- package/tests/test-app/src/components/Timeline.tsx +145 -0
- package/tests/test-app/src/index.ts +2 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCommentAddPost.api.ts +48 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketCreatePost.api.ts +52 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDeleteDelete.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketDetailGet.api.ts +39 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketListGet.api.ts +61 -0
- package/tests/test-app/src/modules/work_order_module/apis/TicketUpdatePut.api.ts +57 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorFaultListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorListGet.ts +76 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorOperationRecordsGet.ts +284 -0
- package/tests/test-app/src/modules/work_order_module/apis/TrainDoorStatisticsGet.ts +96 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/category|list.node.ts +40 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/priority|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/status|list.node.ts +26 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|create.node.ts +54 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|delete.node.ts +55 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|detail.node.ts +65 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|list.node.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/cloud_function/ticket|update.node.ts +73 -0
- package/tests/test-app/src/modules/work_order_module/data_model/Ticket.m.ts +85 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketCategory.m.ts +53 -0
- package/tests/test-app/src/modules/work_order_module/data_model/TicketStatus.m.ts +60 -0
- 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
- 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
- package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
- package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
- package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
- package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
- package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
- package/tests/test-app/src/pages/DataReport.tsx +298 -0
- package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
- package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
- package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
- package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
- package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
- package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
- package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
- package/tests/test-app/src/pages/SLAManagement.tsx +668 -0
- package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
- package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
- package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
- package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
- package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
- package/tests/test-app/src/pages/TicketCreate.tsx +27 -0
- package/tests/test-app/src/pages/TicketDetail.tsx +27 -0
- package/tests/test-app/src/pages/TicketList.tsx +27 -0
- package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
- package/tests/test-app/src/pages/TicketManagementPage.tsx +1238 -0
- package/tests/test-app/src/pages/UserProfile.tsx +404 -0
- package/tests/test-app/src/pages/VisualAIIDEUpgrade.tsx +245 -0
- package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
- package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
- package/tests/test-app/src/pages/appthen_guide/ComponentTreeUnderstanding.tsx +26 -0
- package/tests/test-app/src/pages/appthen_guide/DataBindingLearning.tsx +26 -0
- package/tests/test-app/src/pages/article-list.tsx +222 -0
- package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout.tsx +155 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout10.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout2.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout3.tsx +156 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout4.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout5.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout6.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout7.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout8.tsx +157 -0
- package/tests/test-app/src/pages/back-end/adminRootLayout9.tsx +157 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.css +5 -0
- package/tests/test-app/src/pages/back-end/backgroundManagementSystem.tsx +1745 -0
- package/tests/test-app/src/pages/category-list.tsx +179 -0
- package/tests/test-app/src/pages/comment-list.tsx +194 -0
- package/tests/test-app/src/pages/component/WorkOrderCard.tsx +140 -0
- package/tests/test-app/src/pages/cover.tsx +42 -0
- package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
- package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
- package/tests/test-app/src/pages/data-overview.tsx +600 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueBrightGreenTechnologyWind.tsx +225 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.css +181 -0
- package/tests/test-app/src/pages/data_dashboard/blueLargeScreen.tsx +138 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/BlueBrightGreenBorder.tsx +47 -0
- package/tests/test-app/src/pages/data_dashboard/component_library/FullScreenContainer.tsx +133 -0
- package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
- package/tests/test-app/src/pages/department-list.tsx +183 -0
- package/tests/test-app/src/pages/description_of_mock_interface.md +32 -0
- package/tests/test-app/src/pages/digitalLargeScreen.css +181 -0
- package/tests/test-app/src/pages/digitalLargeScreen.tsx +1417 -0
- package/tests/test-app/src/pages/goods-list.tsx +233 -0
- package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.css +3 -0
- package/tests/test-app/src/pages/mobile_terminal/PersonalCenter.tsx +362 -0
- package/tests/test-app/src/pages/mobile_terminal/WorkOrderHomepage.tsx +337 -0
- package/tests/test-app/src/pages/mobile_terminal/newWorkOrder.tsx +224 -0
- package/tests/test-app/src/pages/mobile_terminal/tabbar.tsx +67 -0
- package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +638 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderDetails.tsx +346 -0
- package/tests/test-app/src/pages/mobile_terminal/workOrderPage.tsx +345 -0
- package/tests/test-app/src/pages/notice-list.tsx +217 -0
- package/tests/test-app/src/pages/order-detail.tsx +330 -0
- package/tests/test-app/src/pages/order-list.tsx +195 -0
- package/tests/test-app/src/pages/order-management.tsx +563 -0
- package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
- package/tests/test-app/src/pages/role-list.tsx +184 -0
- package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
- package/tests/test-app/src/pages/simple-page.tsx +43 -0
- package/tests/test-app/src/pages/test-destructure.tsx +44 -0
- package/tests/test-app/src/pages/test-error-page.tsx +75 -0
- package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
- package/tests/test-app/src/pages/test-page.tsx +101 -0
- package/tests/test-app/src/pages/test-render.tsx +52 -0
- package/tests/test-app/src/pages/test-return-type.tsx +41 -0
- package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
- package/tests/test-app/src/pages/testPage.css +3 -0
- package/tests/test-app/src/pages/testPage.tsx +158 -0
- package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
- package/tests/test-app/src/pages/user-list.tsx +212 -0
- package/tests/test-app/src/pages/web_version/website.css +205 -0
- package/tests/test-app/src/pages/web_version/website.tsx +1066 -0
- package/tests/test-app/src/pages/wrong-page.tsx +50 -0
- package/tests/test-app/src/pages//345/276/205/345/212/236.apidoc.json +336 -0
- package/tests/test-app/src/project.json +1120 -0
- package/tests/test-app/src/store/global.store.ts +10 -0
- package/tests/test-app/src/types/CreateTicketParams.m.ts +20 -0
- package/tests/test-app/src/types/SLAPolicy.ts +50 -0
- package/tests/test-app/src/types/Ticket.ts +68 -0
- package/tests/test-app/src/types/TicketAttachment.m.ts +67 -0
- package/tests/test-app/src/types/TicketComment.m.ts +59 -0
- package/tests/test-app/src/types/TicketEvaluation.ts +44 -0
- package/tests/test-app/src/types/TicketHistory.m.ts +71 -0
- package/tests/test-app/src/types/TicketListParams.m.ts +30 -0
- package/tests/test-app/src/types/TicketPriority.m.ts +65 -0
- package/tests/test-app/src/types/TicketRecord.ts +47 -0
- package/tests/test-app/src/types/TrainDoor.ts +284 -0
- package/tests/test-app/src/types/UpdateTicketParams.m.ts +22 -0
- package/tests/test-app/src/utils/__afterRequest.util.ts +3 -0
- package/tests/test-app/src/utils/__beforeRequest.util.ts +10 -0
- package/tests/test-app/src/utils/testGlobalAction.util.ts +7 -0
|
@@ -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,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 演示错误页面
|
|
3
|
+
* @type Page
|
|
4
|
+
* @route /demo-error
|
|
5
|
+
* @screen 1920w
|
|
6
|
+
* @frames web
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IProps {
|
|
13
|
+
pageTitle?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* 数据与接口请求定义
|
|
18
|
+
*/
|
|
19
|
+
class IState {
|
|
20
|
+
userList?: string[];
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
selectedUser?: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
class Document extends React.Component<IProps, IState> {
|
|
26
|
+
state = { userList: [], loading: false, selectedUser: null };
|
|
27
|
+
|
|
28
|
+
loadData() {
|
|
29
|
+
this.setState({
|
|
30
|
+
loading: true,
|
|
31
|
+
});
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
this.setState({
|
|
34
|
+
loading: false,
|
|
35
|
+
userList: [
|
|
36
|
+
{
|
|
37
|
+
id: 1,
|
|
38
|
+
name: '张三',
|
|
39
|
+
email: 'zhangsan@example.com',
|
|
40
|
+
age: 25,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 2,
|
|
44
|
+
name: '李四',
|
|
45
|
+
email: 'lisi@example.com',
|
|
46
|
+
age: 30,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 3,
|
|
50
|
+
name: '王五',
|
|
51
|
+
email: 'wangwu@example.com',
|
|
52
|
+
age: 28,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
});
|
|
56
|
+
}, 1000);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
selectUser(user) {
|
|
60
|
+
this.setState({
|
|
61
|
+
selectedUser: user,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
render() {
|
|
66
|
+
return (
|
|
67
|
+
<Page className="p-[24px]">
|
|
68
|
+
<Card title="用户管理">
|
|
69
|
+
<Space direction="vertical" className="w-full">
|
|
70
|
+
<Button type="primary" onClick={() => this.loadData()}>
|
|
71
|
+
加载数据
|
|
72
|
+
</Button>
|
|
73
|
+
{!!this.state.loading && <View>加载中...</View>}
|
|
74
|
+
<Table
|
|
75
|
+
columns={[
|
|
76
|
+
{
|
|
77
|
+
title: 'ID',
|
|
78
|
+
dataIndex: 'id',
|
|
79
|
+
render: id => <Text>#{id}</Text>,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: '姓名',
|
|
83
|
+
dataIndex: 'name',
|
|
84
|
+
render: name => <Text>{name}</Text>,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: '邮箱',
|
|
88
|
+
dataIndex: 'email',
|
|
89
|
+
render: email => <Text>{email}</Text>,
|
|
90
|
+
},
|
|
91
|
+
]}
|
|
92
|
+
dataSource={this.state.userList}
|
|
93
|
+
loading={this.state.loading}
|
|
94
|
+
/>
|
|
95
|
+
{this.state.userList.map((user, index) => (
|
|
96
|
+
<View key={user.id}>
|
|
97
|
+
<Text>{user.name}</Text>
|
|
98
|
+
<Text>{user.email}</Text>
|
|
99
|
+
<Text>{user.age}</Text>
|
|
100
|
+
<Button size="small" onClick={() => this.selectUser(user)}>
|
|
101
|
+
选择
|
|
102
|
+
</Button>
|
|
103
|
+
</View>
|
|
104
|
+
))}
|
|
105
|
+
{!!this.state.selectedUser && (
|
|
106
|
+
<Card title="已选用户">
|
|
107
|
+
<p>姓名:{this.state.selectedUser.name}</p>
|
|
108
|
+
<p>邮箱:{this.state.selectedUser.email}</p>
|
|
109
|
+
<p>年龄:{this.state.selectedUser.age}</p>
|
|
110
|
+
</Card>
|
|
111
|
+
)}
|
|
112
|
+
</Space>
|
|
113
|
+
</Card>
|
|
114
|
+
</Page>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export default Document;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 部门列表
|
|
3
|
+
* 查看和管理所有部门信息
|
|
4
|
+
*
|
|
5
|
+
* @type Page
|
|
6
|
+
* @route /departments
|
|
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
|
+
departments?: {
|
|
21
|
+
/* @example 1 */id?: number,
|
|
22
|
+
/* @example 技术部 */name?: string,
|
|
23
|
+
/* @example 张三 */manager?: string,
|
|
24
|
+
/* @example 25 */memberCount?: 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
|
+
departments: [
|
|
35
|
+
{
|
|
36
|
+
id: 1,
|
|
37
|
+
name: '技术部',
|
|
38
|
+
manager: '张三',
|
|
39
|
+
memberCount: 25,
|
|
40
|
+
status: 'enabled',
|
|
41
|
+
createTime: '2024-01-15',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 2,
|
|
45
|
+
name: '市场部',
|
|
46
|
+
manager: '李四',
|
|
47
|
+
memberCount: 18,
|
|
48
|
+
status: 'enabled',
|
|
49
|
+
createTime: '2024-02-20',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 3,
|
|
53
|
+
name: '人事部',
|
|
54
|
+
manager: '王五',
|
|
55
|
+
memberCount: 8,
|
|
56
|
+
status: 'enabled',
|
|
57
|
+
createTime: '2024-03-10',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 4,
|
|
61
|
+
name: '财务部',
|
|
62
|
+
manager: '赵六',
|
|
63
|
+
memberCount: 12,
|
|
64
|
+
status: 'enabled',
|
|
65
|
+
createTime: '2024-04-05',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: 5,
|
|
69
|
+
name: '运营部',
|
|
70
|
+
manager: '钱七',
|
|
71
|
+
memberCount: 15,
|
|
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: 'manager', key: 'manager' },
|
|
135
|
+
{
|
|
136
|
+
title: '成员数量',
|
|
137
|
+
dataIndex: 'memberCount',
|
|
138
|
+
key: 'memberCount',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
title: '状态',
|
|
142
|
+
dataIndex: 'status',
|
|
143
|
+
key: 'status',
|
|
144
|
+
render: function (text) {
|
|
145
|
+
return this.getStatusTag(text);
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{ title: '创建时间', dataIndex: 'createTime', key: 'createTime' },
|
|
149
|
+
{
|
|
150
|
+
title: '操作',
|
|
151
|
+
key: 'action',
|
|
152
|
+
render: (text, record) => (
|
|
153
|
+
<Space>
|
|
154
|
+
<Button type="link" onClick={() => this.handleEdit(record)}>
|
|
155
|
+
编辑
|
|
156
|
+
</Button>
|
|
157
|
+
<Button
|
|
158
|
+
type="link"
|
|
159
|
+
danger={true}
|
|
160
|
+
onClick={() => this.handleDelete(record)}
|
|
161
|
+
>
|
|
162
|
+
删除
|
|
163
|
+
</Button>
|
|
164
|
+
</Space>
|
|
165
|
+
),
|
|
166
|
+
},
|
|
167
|
+
]}
|
|
168
|
+
dataSource={this.state.departments}
|
|
169
|
+
rowKey="id"
|
|
170
|
+
pagination={{
|
|
171
|
+
pageSize: 10,
|
|
172
|
+
showTotal: function (total) {
|
|
173
|
+
return `共 ${total} 条`;
|
|
174
|
+
},
|
|
175
|
+
}}
|
|
176
|
+
/>
|
|
177
|
+
</Card>
|
|
178
|
+
</Page>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
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
|
+
// 所有参数都可选择不传或者传空字符串
|