@appthen/cli 1.2.8 → 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.
- package/.gitignore +1 -0
- package/bin/main.js +45 -0
- package/dist/index.js +1277 -909
- package/package.json +1 -1
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1406 -0
- package/tests/test-app/.appthen/shadow-space-unknown-user-test-app-e99876b1.json +1060 -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/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/SLAManagement.tsx +668 -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/TicketManagementPage.tsx +1238 -0
- package/tests/test-app/src/pages/VisualAIIDEUpgrade.tsx +245 -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/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/component/WorkOrderCard.tsx +140 -0
- package/tests/test-app/src/pages/cover.tsx +42 -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/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/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/testPage.css +3 -0
- package/tests/test-app/src/pages/testPage.tsx +158 -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//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,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 后台根布局6
|
|
3
|
+
* @type Page
|
|
4
|
+
* @screen 1400w
|
|
5
|
+
* @frames web
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { AtIcon, Page, View } from '@appthen/react';
|
|
9
|
+
import { ProConfigProvider, ProLayout } from '@appthen/antd-pro';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IProps {}
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* 数据与接口请求定义
|
|
16
|
+
*/
|
|
17
|
+
class IState {
|
|
18
|
+
/* 菜单数据 */
|
|
19
|
+
menu?: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class Document extends React.Component<IProps, IState> {
|
|
23
|
+
state = {};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 页面加载后执行
|
|
27
|
+
*/
|
|
28
|
+
componentDidMount() {
|
|
29
|
+
const globalMenu = this.utils.getGlobalData('ADMIN_MENU');
|
|
30
|
+
if (globalMenu) {
|
|
31
|
+
const menu = JSON.parse(JSON.stringify(globalMenu));
|
|
32
|
+
// 转换图标
|
|
33
|
+
menu.routes = this.transformMenus(menu.routes);
|
|
34
|
+
this.setState(
|
|
35
|
+
{
|
|
36
|
+
menu,
|
|
37
|
+
},
|
|
38
|
+
() => {
|
|
39
|
+
console.log(
|
|
40
|
+
111,
|
|
41
|
+
this.history?.location?.pathname ||
|
|
42
|
+
this.state.menu?.routes[0]?.routes?.[0]?.path ||
|
|
43
|
+
this.state.menu?.routes[0]?.path
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 菜单转换
|
|
52
|
+
*/
|
|
53
|
+
transformMenus(routes) {
|
|
54
|
+
return routes.map(menu => {
|
|
55
|
+
if (menu.icon && menu.icon.includes('<svg')) {
|
|
56
|
+
menu.icon = React.createElement('div', {
|
|
57
|
+
style: {
|
|
58
|
+
width: '14px',
|
|
59
|
+
height: '18px',
|
|
60
|
+
lineHeight: 1,
|
|
61
|
+
},
|
|
62
|
+
dangerouslySetInnerHTML: {
|
|
63
|
+
__html: menu.icon,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
menu.routes =
|
|
68
|
+
menu.route?.length > 0 ? this.transformMenus(menu.routes) : [];
|
|
69
|
+
return menu;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
render() {
|
|
74
|
+
return (
|
|
75
|
+
<Page>
|
|
76
|
+
<ProConfigProvider
|
|
77
|
+
autoClearCache={false}
|
|
78
|
+
needDeps={false}
|
|
79
|
+
dark={false}
|
|
80
|
+
hashed={false}
|
|
81
|
+
>
|
|
82
|
+
<ProLayout
|
|
83
|
+
avatarProps={{
|
|
84
|
+
src: 'https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg',
|
|
85
|
+
size: 'small',
|
|
86
|
+
title: 'Nickname',
|
|
87
|
+
}}
|
|
88
|
+
devops={false}
|
|
89
|
+
route={this.state.menu}
|
|
90
|
+
location={{
|
|
91
|
+
pathname:
|
|
92
|
+
this.history?.location?.pathname ||
|
|
93
|
+
this.state.menu?.routes[0]?.routes?.[0]?.path ||
|
|
94
|
+
this.state.menu?.routes[0]?.path,
|
|
95
|
+
}}
|
|
96
|
+
title="后台管理系统"
|
|
97
|
+
links={[]}
|
|
98
|
+
menu={{
|
|
99
|
+
locale: false,
|
|
100
|
+
defaultOpenAll: false,
|
|
101
|
+
ignoreFlatMenu: false,
|
|
102
|
+
loading: false,
|
|
103
|
+
params: {},
|
|
104
|
+
type: 'sub',
|
|
105
|
+
}}
|
|
106
|
+
siderWidth={280}
|
|
107
|
+
contentWidth="Fluid"
|
|
108
|
+
token={{}}
|
|
109
|
+
layout="mix"
|
|
110
|
+
content={
|
|
111
|
+
<View
|
|
112
|
+
inlineStyle={[
|
|
113
|
+
{
|
|
114
|
+
enable: this.props.__designMode === 'design',
|
|
115
|
+
name: '开发模式',
|
|
116
|
+
style: { height: '100%', backgroundColor: '#f5f5f5' },
|
|
117
|
+
},
|
|
118
|
+
]}
|
|
119
|
+
__hidePh={true}
|
|
120
|
+
>
|
|
121
|
+
{this.props.children}
|
|
122
|
+
</View>
|
|
123
|
+
}
|
|
124
|
+
key={this.state.menu?.routes?.length}
|
|
125
|
+
_unsafe_MixedSetter_key_select="VariableSetter"
|
|
126
|
+
contentStyle={{
|
|
127
|
+
paddingTop: '0px',
|
|
128
|
+
paddingRight: '0px',
|
|
129
|
+
paddingBottom: '0px',
|
|
130
|
+
paddingLeft: '0px',
|
|
131
|
+
}}
|
|
132
|
+
onPageChange={location => {
|
|
133
|
+
if (location?.pathname) {
|
|
134
|
+
this.history.push(location?.pathname);
|
|
135
|
+
}
|
|
136
|
+
}}
|
|
137
|
+
_unsafe_extendAttr={[{ key: 'splitMenus', value: true }]}
|
|
138
|
+
splitMenus={true}
|
|
139
|
+
logo={
|
|
140
|
+
<View>
|
|
141
|
+
<AtIcon
|
|
142
|
+
color="#5281ff"
|
|
143
|
+
size={30}
|
|
144
|
+
svg="<svg t="1754273789163" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5352" width="100%" height="100%"><path d="M832.8 289L543.2 120.6c-19.4-11.4-43.3-11.4-62.4 0L191.2 289c-19.4 11.4-31.2 31.8-31.2 54.6v336.8c0 22.4 11.7 43.2 31.2 54.6l289.6 168.4c19.4 11.4 43.3 11.4 62.4 0L832.8 735c19.4-11.4 31.2-31.8 31.2-54.6V343.2c0-22.4-11.7-43.2-31.2-54.2zM731.5 406.4l-184.3 94.2v218.1c0 19.6-15.8 35.5-35.2 35.5-19.4 0-35.2-15.9-35.2-35.5V500.6l-184.3-94.2c-17.4-9-24.3-30.2-15.4-47.7 8.9-17.5 30-24.5 47.4-15.5L512 439.4l187.9-95.8c17.4-9 38.5-1.6 47.4 15.5 9 17.1 1.7 38.7-15.8 47.3z m0 0" p-id="5353" fill="currentColor"/></path></svg>"
|
|
145
|
+
/>
|
|
146
|
+
</View>
|
|
147
|
+
}
|
|
148
|
+
_unsafe_MixedSetter_logo_select="SlotSetter"
|
|
149
|
+
className="min-h-screen"
|
|
150
|
+
/>
|
|
151
|
+
</ProConfigProvider>
|
|
152
|
+
</Page>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export default Document;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 后台根布局7
|
|
3
|
+
* @type Page
|
|
4
|
+
* @screen 1400w
|
|
5
|
+
* @frames web
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { AtIcon, Page, View } from '@appthen/react';
|
|
9
|
+
import { ProConfigProvider, ProLayout } from '@appthen/antd-pro';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IProps {}
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* 数据与接口请求定义
|
|
16
|
+
*/
|
|
17
|
+
class IState {
|
|
18
|
+
/* 菜单数据 */
|
|
19
|
+
menu?: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class Document extends React.Component<IProps, IState> {
|
|
23
|
+
state = {};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 页面加载后执行
|
|
27
|
+
*/
|
|
28
|
+
componentDidMount() {
|
|
29
|
+
const globalMenu = this.utils.getGlobalData('ADMIN_MENU');
|
|
30
|
+
if (globalMenu) {
|
|
31
|
+
const menu = JSON.parse(JSON.stringify(globalMenu));
|
|
32
|
+
// 转换图标
|
|
33
|
+
menu.routes = this.transformMenus(menu.routes);
|
|
34
|
+
this.setState(
|
|
35
|
+
{
|
|
36
|
+
menu,
|
|
37
|
+
},
|
|
38
|
+
() => {
|
|
39
|
+
console.log(
|
|
40
|
+
111,
|
|
41
|
+
this.history?.location?.pathname ||
|
|
42
|
+
this.state.menu?.routes[0]?.routes?.[0]?.path ||
|
|
43
|
+
this.state.menu?.routes[0]?.path
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 菜单转换
|
|
52
|
+
*/
|
|
53
|
+
transformMenus(routes) {
|
|
54
|
+
return routes.map(menu => {
|
|
55
|
+
if (menu.icon && menu.icon.includes('<svg')) {
|
|
56
|
+
menu.icon = React.createElement('div', {
|
|
57
|
+
style: {
|
|
58
|
+
width: '14px',
|
|
59
|
+
height: '14px',
|
|
60
|
+
lineHeight: 1,
|
|
61
|
+
},
|
|
62
|
+
dangerouslySetInnerHTML: {
|
|
63
|
+
__html: menu.icon,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
menu.routes =
|
|
68
|
+
menu.route?.length > 0 ? this.transformMenus(menu.routes) : [];
|
|
69
|
+
return menu;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
render() {
|
|
74
|
+
return (
|
|
75
|
+
<Page>
|
|
76
|
+
<ProConfigProvider
|
|
77
|
+
autoClearCache={false}
|
|
78
|
+
needDeps={false}
|
|
79
|
+
dark={false}
|
|
80
|
+
hashed={false}
|
|
81
|
+
>
|
|
82
|
+
<ProLayout
|
|
83
|
+
avatarProps={{
|
|
84
|
+
src: 'https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg',
|
|
85
|
+
size: 'small',
|
|
86
|
+
title: 'Nickname',
|
|
87
|
+
}}
|
|
88
|
+
devops={false}
|
|
89
|
+
route={this.state.menu}
|
|
90
|
+
location={{
|
|
91
|
+
pathname:
|
|
92
|
+
this.history?.location?.pathname ||
|
|
93
|
+
this.state.menu?.routes[0]?.routes?.[0]?.path ||
|
|
94
|
+
this.state.menu?.routes[0]?.path,
|
|
95
|
+
}}
|
|
96
|
+
title="后台管理系统"
|
|
97
|
+
links={[]}
|
|
98
|
+
menu={{
|
|
99
|
+
locale: false,
|
|
100
|
+
defaultOpenAll: false,
|
|
101
|
+
ignoreFlatMenu: false,
|
|
102
|
+
loading: false,
|
|
103
|
+
params: {},
|
|
104
|
+
type: 'sub',
|
|
105
|
+
}}
|
|
106
|
+
siderWidth={280}
|
|
107
|
+
contentWidth="Fluid"
|
|
108
|
+
token={{}}
|
|
109
|
+
layout="mix"
|
|
110
|
+
content={
|
|
111
|
+
<View
|
|
112
|
+
inlineStyle={[
|
|
113
|
+
{
|
|
114
|
+
enable: this.props.__designMode === 'design',
|
|
115
|
+
name: '开发模式',
|
|
116
|
+
style: { height: '100%', backgroundColor: '#f5f5f5' },
|
|
117
|
+
},
|
|
118
|
+
]}
|
|
119
|
+
__hidePh={true}
|
|
120
|
+
>
|
|
121
|
+
{this.props.children}
|
|
122
|
+
</View>
|
|
123
|
+
}
|
|
124
|
+
key={this.state.menu?.routes?.length}
|
|
125
|
+
_unsafe_MixedSetter_key_select="VariableSetter"
|
|
126
|
+
contentStyle={{
|
|
127
|
+
paddingTop: '0px',
|
|
128
|
+
paddingRight: '0px',
|
|
129
|
+
paddingBottom: '0px',
|
|
130
|
+
paddingLeft: '0px',
|
|
131
|
+
}}
|
|
132
|
+
onPageChange={location => {
|
|
133
|
+
if (location?.pathname) {
|
|
134
|
+
this.history.push(location?.pathname);
|
|
135
|
+
}
|
|
136
|
+
}}
|
|
137
|
+
_unsafe_extendAttr={[{ key: 'splitMenus', value: true }]}
|
|
138
|
+
splitMenus={true}
|
|
139
|
+
logo={
|
|
140
|
+
<View>
|
|
141
|
+
<AtIcon
|
|
142
|
+
color="#5281ff"
|
|
143
|
+
size={30}
|
|
144
|
+
svg="<svg t="1754273789163" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5352" width="100%" height="100%"><path d="M832.8 289L543.2 120.6c-19.4-11.4-43.3-11.4-62.4 0L191.2 289c-19.4 11.4-31.2 31.8-31.2 54.6v336.8c0 22.4 11.7 43.2 31.2 54.6l289.6 168.4c19.4 11.4 43.3 11.4 62.4 0L832.8 735c19.4-11.4 31.2-31.8 31.2-54.6V343.2c0-22.4-11.7-43.2-31.2-54.2zM731.5 406.4l-184.3 94.2v218.1c0 19.6-15.8 35.5-35.2 35.5-19.4 0-35.2-15.9-35.2-35.5V500.6l-184.3-94.2c-17.4-9-24.3-30.2-15.4-47.7 8.9-17.5 30-24.5 47.4-15.5L512 439.4l187.9-95.8c17.4-9 38.5-1.6 47.4 15.5 9 17.1 1.7 38.7-15.8 47.3z m0 0" p-id="5353" fill="currentColor"/></path></svg>"
|
|
145
|
+
/>
|
|
146
|
+
</View>
|
|
147
|
+
}
|
|
148
|
+
_unsafe_MixedSetter_logo_select="SlotSetter"
|
|
149
|
+
className="min-h-screen"
|
|
150
|
+
/>
|
|
151
|
+
</ProConfigProvider>
|
|
152
|
+
</Page>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export default Document;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 后台根布局8
|
|
3
|
+
* @type Page
|
|
4
|
+
* @screen 1400w
|
|
5
|
+
* @frames web
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { AtIcon, Page, View } from '@appthen/react';
|
|
9
|
+
import { ProConfigProvider, ProLayout } from '@appthen/antd-pro';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IProps {}
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* 数据与接口请求定义
|
|
16
|
+
*/
|
|
17
|
+
class IState {
|
|
18
|
+
/* 菜单数据 */
|
|
19
|
+
menu?: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class Document extends React.Component<IProps, IState> {
|
|
23
|
+
state = {};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 页面加载后执行
|
|
27
|
+
*/
|
|
28
|
+
componentDidMount() {
|
|
29
|
+
const globalMenu = this.utils.getGlobalData('ADMIN_MENU');
|
|
30
|
+
if (globalMenu) {
|
|
31
|
+
const menu = JSON.parse(JSON.stringify(globalMenu));
|
|
32
|
+
// 转换图标
|
|
33
|
+
menu.routes = this.transformMenus(menu.routes);
|
|
34
|
+
this.setState(
|
|
35
|
+
{
|
|
36
|
+
menu,
|
|
37
|
+
},
|
|
38
|
+
() => {
|
|
39
|
+
console.log(
|
|
40
|
+
111,
|
|
41
|
+
this.history?.location?.pathname ||
|
|
42
|
+
this.state.menu?.routes[0]?.routes?.[0]?.path ||
|
|
43
|
+
this.state.menu?.routes[0]?.path
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 菜单转换
|
|
52
|
+
*/
|
|
53
|
+
transformMenus(routes) {
|
|
54
|
+
return routes.map(menu => {
|
|
55
|
+
if (menu.icon && menu.icon.includes('<svg')) {
|
|
56
|
+
menu.icon = React.createElement('div', {
|
|
57
|
+
style: {
|
|
58
|
+
width: '14px',
|
|
59
|
+
height: '14px',
|
|
60
|
+
lineHeight: 1,
|
|
61
|
+
},
|
|
62
|
+
dangerouslySetInnerHTML: {
|
|
63
|
+
__html: menu.icon,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
menu.routes =
|
|
68
|
+
menu.route?.length > 0 ? this.transformMenus(menu.routes) : [];
|
|
69
|
+
return menu;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
render() {
|
|
74
|
+
return (
|
|
75
|
+
<Page>
|
|
76
|
+
<ProConfigProvider
|
|
77
|
+
autoClearCache={false}
|
|
78
|
+
needDeps={false}
|
|
79
|
+
dark={false}
|
|
80
|
+
hashed={false}
|
|
81
|
+
>
|
|
82
|
+
<ProLayout
|
|
83
|
+
avatarProps={{
|
|
84
|
+
src: 'https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg',
|
|
85
|
+
size: 'small',
|
|
86
|
+
title: 'Nickname',
|
|
87
|
+
}}
|
|
88
|
+
devops={false}
|
|
89
|
+
route={this.state.menu}
|
|
90
|
+
location={{
|
|
91
|
+
pathname:
|
|
92
|
+
this.history?.location?.pathname ||
|
|
93
|
+
this.state.menu?.routes[0]?.routes?.[0]?.path ||
|
|
94
|
+
this.state.menu?.routes[0]?.path,
|
|
95
|
+
}}
|
|
96
|
+
title="后台管理系统"
|
|
97
|
+
links={[]}
|
|
98
|
+
menu={{
|
|
99
|
+
locale: false,
|
|
100
|
+
defaultOpenAll: false,
|
|
101
|
+
ignoreFlatMenu: false,
|
|
102
|
+
loading: false,
|
|
103
|
+
params: {},
|
|
104
|
+
type: 'sub',
|
|
105
|
+
}}
|
|
106
|
+
siderWidth={280}
|
|
107
|
+
contentWidth="Fluid"
|
|
108
|
+
token={{}}
|
|
109
|
+
layout="mix"
|
|
110
|
+
content={
|
|
111
|
+
<View
|
|
112
|
+
inlineStyle={[
|
|
113
|
+
{
|
|
114
|
+
enable: this.props.__designMode === 'design',
|
|
115
|
+
name: '开发模式',
|
|
116
|
+
style: { height: '100%', backgroundColor: '#f5f5f5' },
|
|
117
|
+
},
|
|
118
|
+
]}
|
|
119
|
+
__hidePh={true}
|
|
120
|
+
>
|
|
121
|
+
{this.props.children}
|
|
122
|
+
</View>
|
|
123
|
+
}
|
|
124
|
+
key={this.state.menu?.routes?.length}
|
|
125
|
+
_unsafe_MixedSetter_key_select="VariableSetter"
|
|
126
|
+
contentStyle={{
|
|
127
|
+
paddingTop: '0px',
|
|
128
|
+
paddingRight: '0px',
|
|
129
|
+
paddingBottom: '0px',
|
|
130
|
+
paddingLeft: '0px',
|
|
131
|
+
}}
|
|
132
|
+
onPageChange={location => {
|
|
133
|
+
if (location?.pathname) {
|
|
134
|
+
this.history.push(location?.pathname);
|
|
135
|
+
}
|
|
136
|
+
}}
|
|
137
|
+
_unsafe_extendAttr={[{ key: 'splitMenus', value: true }]}
|
|
138
|
+
splitMenus={true}
|
|
139
|
+
logo={
|
|
140
|
+
<View>
|
|
141
|
+
<AtIcon
|
|
142
|
+
color="#5281ff"
|
|
143
|
+
size={30}
|
|
144
|
+
svg="<svg t="1754273789163" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5352" width="100%" height="100%"><path d="M832.8 289L543.2 120.6c-19.4-11.4-43.3-11.4-62.4 0L191.2 289c-19.4 11.4-31.2 31.8-31.2 54.6v336.8c0 22.4 11.7 43.2 31.2 54.6l289.6 168.4c19.4 11.4 43.3 11.4 62.4 0L832.8 735c19.4-11.4 31.2-31.8 31.2-54.6V343.2c0-22.4-11.7-43.2-31.2-54.2zM731.5 406.4l-184.3 94.2v218.1c0 19.6-15.8 35.5-35.2 35.5-19.4 0-35.2-15.9-35.2-35.5V500.6l-184.3-94.2c-17.4-9-24.3-30.2-15.4-47.7 8.9-17.5 30-24.5 47.4-15.5L512 439.4l187.9-95.8c17.4-9 38.5-1.6 47.4 15.5 9 17.1 1.7 38.7-15.8 47.3z m0 0" p-id="5353" fill="currentColor"/></path></svg>"
|
|
145
|
+
/>
|
|
146
|
+
</View>
|
|
147
|
+
}
|
|
148
|
+
_unsafe_MixedSetter_logo_select="SlotSetter"
|
|
149
|
+
className="min-h-screen"
|
|
150
|
+
/>
|
|
151
|
+
</ProConfigProvider>
|
|
152
|
+
</Page>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export default Document;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 后台根布局9
|
|
3
|
+
* @type Page
|
|
4
|
+
* @screen 1400w
|
|
5
|
+
* @frames web
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { AtIcon, Page, View } from '@appthen/react';
|
|
9
|
+
import { ProConfigProvider, ProLayout } from '@appthen/antd-pro';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IProps {}
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* 数据与接口请求定义
|
|
16
|
+
*/
|
|
17
|
+
class IState {
|
|
18
|
+
/* 菜单数据 */
|
|
19
|
+
menu?: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class Document extends React.Component<IProps, IState> {
|
|
23
|
+
state = {};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 页面加载后执行
|
|
27
|
+
*/
|
|
28
|
+
componentDidMount() {
|
|
29
|
+
const globalMenu = this.utils.getGlobalData('ADMIN_MENU');
|
|
30
|
+
if (globalMenu) {
|
|
31
|
+
const menu = JSON.parse(JSON.stringify(globalMenu));
|
|
32
|
+
// 转换图标
|
|
33
|
+
menu.routes = this.transformMenus(menu.routes);
|
|
34
|
+
this.setState(
|
|
35
|
+
{
|
|
36
|
+
menu,
|
|
37
|
+
},
|
|
38
|
+
() => {
|
|
39
|
+
console.log(
|
|
40
|
+
111,
|
|
41
|
+
this.history?.location?.pathname ||
|
|
42
|
+
this.state.menu?.routes[0]?.routes?.[0]?.path ||
|
|
43
|
+
this.state.menu?.routes[0]?.path
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 菜单转换
|
|
52
|
+
*/
|
|
53
|
+
transformMenus(routes) {
|
|
54
|
+
return routes.map(menu => {
|
|
55
|
+
if (menu.icon && menu.icon.includes('<svg')) {
|
|
56
|
+
menu.icon = React.createElement('div', {
|
|
57
|
+
style: {
|
|
58
|
+
width: '14px',
|
|
59
|
+
height: '14px',
|
|
60
|
+
lineHeight: 1,
|
|
61
|
+
},
|
|
62
|
+
dangerouslySetInnerHTML: {
|
|
63
|
+
__html: menu.icon,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
menu.routes =
|
|
68
|
+
menu.route?.length > 0 ? this.transformMenus(menu.routes) : [];
|
|
69
|
+
return menu;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
render() {
|
|
74
|
+
return (
|
|
75
|
+
<Page>
|
|
76
|
+
<ProConfigProvider
|
|
77
|
+
autoClearCache={false}
|
|
78
|
+
needDeps={false}
|
|
79
|
+
dark={false}
|
|
80
|
+
hashed={false}
|
|
81
|
+
>
|
|
82
|
+
<ProLayout
|
|
83
|
+
avatarProps={{
|
|
84
|
+
src: 'https://gw.alipayobjects.com/zos/antfincdn/efFD%24IOql2/weixintupian_20170331104822.jpg',
|
|
85
|
+
size: 'small',
|
|
86
|
+
title: 'Nickname',
|
|
87
|
+
}}
|
|
88
|
+
devops={false}
|
|
89
|
+
route={this.state.menu}
|
|
90
|
+
location={{
|
|
91
|
+
pathname:
|
|
92
|
+
this.history?.location?.pathname ||
|
|
93
|
+
this.state.menu?.routes[0]?.routes?.[0]?.path ||
|
|
94
|
+
this.state.menu?.routes[0]?.path,
|
|
95
|
+
}}
|
|
96
|
+
title="后台管理系统"
|
|
97
|
+
links={[]}
|
|
98
|
+
menu={{
|
|
99
|
+
locale: false,
|
|
100
|
+
defaultOpenAll: false,
|
|
101
|
+
ignoreFlatMenu: false,
|
|
102
|
+
loading: false,
|
|
103
|
+
params: {},
|
|
104
|
+
type: 'sub',
|
|
105
|
+
}}
|
|
106
|
+
siderWidth={280}
|
|
107
|
+
contentWidth="Fluid"
|
|
108
|
+
token={{}}
|
|
109
|
+
layout="mix"
|
|
110
|
+
content={
|
|
111
|
+
<View
|
|
112
|
+
inlineStyle={[
|
|
113
|
+
{
|
|
114
|
+
enable: this.props.__designMode === 'design',
|
|
115
|
+
name: '开发模式',
|
|
116
|
+
style: { height: '100%', backgroundColor: '#f5f5f5' },
|
|
117
|
+
},
|
|
118
|
+
]}
|
|
119
|
+
__hidePh={true}
|
|
120
|
+
>
|
|
121
|
+
{this.props.children}
|
|
122
|
+
</View>
|
|
123
|
+
}
|
|
124
|
+
key={this.state.menu?.routes?.length}
|
|
125
|
+
_unsafe_MixedSetter_key_select="VariableSetter"
|
|
126
|
+
contentStyle={{
|
|
127
|
+
paddingTop: '0px',
|
|
128
|
+
paddingRight: '0px',
|
|
129
|
+
paddingBottom: '0px',
|
|
130
|
+
paddingLeft: '0px',
|
|
131
|
+
}}
|
|
132
|
+
onPageChange={location => {
|
|
133
|
+
if (location?.pathname) {
|
|
134
|
+
this.history.push(location?.pathname);
|
|
135
|
+
}
|
|
136
|
+
}}
|
|
137
|
+
_unsafe_extendAttr={[{ key: 'splitMenus', value: true }]}
|
|
138
|
+
splitMenus={true}
|
|
139
|
+
logo={
|
|
140
|
+
<View>
|
|
141
|
+
<AtIcon
|
|
142
|
+
color="#5281ff"
|
|
143
|
+
size={30}
|
|
144
|
+
svg="<svg t="1754273789163" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5352" width="100%" height="100%"><path d="M832.8 289L543.2 120.6c-19.4-11.4-43.3-11.4-62.4 0L191.2 289c-19.4 11.4-31.2 31.8-31.2 54.6v336.8c0 22.4 11.7 43.2 31.2 54.6l289.6 168.4c19.4 11.4 43.3 11.4 62.4 0L832.8 735c19.4-11.4 31.2-31.8 31.2-54.6V343.2c0-22.4-11.7-43.2-31.2-54.2zM731.5 406.4l-184.3 94.2v218.1c0 19.6-15.8 35.5-35.2 35.5-19.4 0-35.2-15.9-35.2-35.5V500.6l-184.3-94.2c-17.4-9-24.3-30.2-15.4-47.7 8.9-17.5 30-24.5 47.4-15.5L512 439.4l187.9-95.8c17.4-9 38.5-1.6 47.4 15.5 9 17.1 1.7 38.7-15.8 47.3z m0 0" p-id="5353" fill="currentColor"/></path></svg>"
|
|
145
|
+
/>
|
|
146
|
+
</View>
|
|
147
|
+
}
|
|
148
|
+
_unsafe_MixedSetter_logo_select="SlotSetter"
|
|
149
|
+
className="min-h-screen"
|
|
150
|
+
/>
|
|
151
|
+
</ProConfigProvider>
|
|
152
|
+
</Page>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export default Document;
|