aldehyde 0.0.1
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/LICENSE +201 -0
- package/README.md +1 -0
- package/dist/163.js +2 -0
- package/dist/163.js.LICENSE.txt +43 -0
- package/dist/41.js +1 -0
- package/dist/aldehyde.js +2 -0
- package/dist/aldehyde.js.LICENSE.txt +122 -0
- package/dist/chemstruc-graph.js +1 -0
- package/dist/css/163-24392163d3c7b54ea806.css +11 -0
- package/dist/css/290-5e8e152675ab7d201c00.css +886 -0
- package/dist/css/chemstruc-graph-87868f791bf92fb80db9.css +29 -0
- package/dist/css/main-2e6725ec1b56da516cee.css +256 -0
- package/dist/html-editor-draft.js +2 -0
- package/dist/html-editor-draft.js.LICENSE.txt +5 -0
- package/dist/images/logo-06f6a5d8.png +0 -0
- package/dist/index.html +4 -0
- package/dist/signature.js +2 -0
- package/dist/signature.js.LICENSE.txt +17 -0
- package/package.json +180 -0
- package/src/components/chart/antd/Chart.js +32 -0
- package/src/components/chart/antd/Chart10000.js +90 -0
- package/src/components/chart/antd/Max2DimLineChart.js +128 -0
- package/src/components/chart/antd/PieChart1.js +54 -0
- package/src/components/chart/antd/PieChart2.js +56 -0
- package/src/components/chart/antd/chart-utils.tsx +50 -0
- package/src/components/chart/antd/column-chart-sub.tsx +67 -0
- package/src/components/chart/antd/line-chart-sub.tsx +65 -0
- package/src/components/chart/antd/pie-chart-sub.tsx +54 -0
- package/src/components/chart/antd/statview-d2-chart.tsx +125 -0
- package/src/components/chart/statview-l2-chart.tsx +69 -0
- package/src/components/controls/action/index.css +9 -0
- package/src/components/controls/action/index.tsx +228 -0
- package/src/components/controls/action/utils.tsx +122 -0
- package/src/components/controls/auto-complete/index.tsx +80 -0
- package/src/components/controls/cascader/index.js +97 -0
- package/src/components/controls/chemstruc/graph.tsx +150 -0
- package/src/components/controls/chemstruc/index.css +28 -0
- package/src/components/controls/collapse-card/index.css +9 -0
- package/src/components/controls/collapse-card/index.tsx +59 -0
- package/src/components/controls/color-picker/index.css +27 -0
- package/src/components/controls/color-picker/index.tsx +88 -0
- package/src/components/controls/cquery/cquick-button.tsx +117 -0
- package/src/components/controls/date-picker/index.tsx +141 -0
- package/src/components/controls/entity-select/entity-select.tsx +277 -0
- package/src/components/controls/entity-select/index.css +6 -0
- package/src/components/controls/entity-select/popover-entity-select.tsx +112 -0
- package/src/components/controls/entry-control.tsx +240 -0
- package/src/components/controls/enum-badge/index.tsx +28 -0
- package/src/components/controls/enum-tag/index.tsx +30 -0
- package/src/components/controls/file-view/drawer-file-view.tsx +69 -0
- package/src/components/controls/file-view/index.tsx +145 -0
- package/src/components/controls/html-editor/draft.tsx +161 -0
- package/src/components/controls/html-editor/tinymce.js +55 -0
- package/src/components/controls/input-number/index.tsx +101 -0
- package/src/components/controls/input-range/index.tsx +48 -0
- package/src/components/controls/password-setter/index.css +3 -0
- package/src/components/controls/password-setter/index.js +70 -0
- package/src/components/controls/progress/index.tsx +61 -0
- package/src/components/controls/relation-existion/index.css +4 -0
- package/src/components/controls/relation-existion/index.tsx +108 -0
- package/src/components/controls/rfield/index.css +4 -0
- package/src/components/controls/rfield/index.tsx +161 -0
- package/src/components/controls/signature/index.tsx +162 -0
- package/src/components/controls/steps/index.tsx +58 -0
- package/src/components/controls/text/ellipsis-text.tsx +70 -0
- package/src/components/controls/upload/index.tsx +122 -0
- package/src/components/controls/view-control.tsx +177 -0
- package/src/components/detail/button/cquery-button-bar.tsx +112 -0
- package/src/components/detail/button/index.css +43 -0
- package/src/components/detail/button/submit-button-bar.tsx +151 -0
- package/src/components/detail/dtmpl.css +53 -0
- package/src/components/detail/edit/dtmpl-edit.tsx +218 -0
- package/src/components/detail/edit/fields-edit-card.tsx +103 -0
- package/src/components/detail/edit/modal-dtmpl-edit.tsx +198 -0
- package/src/components/detail/edit/modal-row-edit.tsx +72 -0
- package/src/components/detail/edit/post-result/index.tsx +52 -0
- package/src/components/detail/edit/row-edit-card.tsx +125 -0
- package/src/components/detail/edit/row-editor.tsx +71 -0
- package/src/components/detail/rightbar/index.css +35 -0
- package/src/components/detail/rightbar/index.tsx +76 -0
- package/src/components/detail/view/act-dtmpl-view.tsx +155 -0
- package/src/components/detail/view/dtmpl-view.tsx +143 -0
- package/src/components/detail/view/field-view-group.tsx +73 -0
- package/src/components/detail/view/modal-dtmpl-view.tsx +56 -0
- package/src/components/detail/view/snapshot-timeline.tsx +130 -0
- package/src/components/exportor/export-frame.css +3 -0
- package/src/components/exportor/export-frame.tsx +194 -0
- package/src/components/exportor/index.tsx +60 -0
- package/src/components/form/criteria-form.tsx +241 -0
- package/src/components/form/dtmpl-form.css +4 -0
- package/src/components/form/dtmpl-form.tsx +272 -0
- package/src/components/form/field-group-form.tsx +75 -0
- package/src/components/form/fields-form.tsx +51 -0
- package/src/components/form/form-Item-group.tsx +99 -0
- package/src/components/form/index.css +13 -0
- package/src/components/import/excel-import.tsx +316 -0
- package/src/components/import/index.css +54 -0
- package/src/components/import/template-builder.js +474 -0
- package/src/components/import/template.css +51 -0
- package/src/components/layout/MainPage.tsx +230 -0
- package/src/components/layout/footer/index.css +6 -0
- package/src/components/layout/footer/index.js +17 -0
- package/src/components/layout/header/index.css +86 -0
- package/src/components/layout/header/index.tsx +58 -0
- package/src/components/layout/menu/block.tsx +88 -0
- package/src/components/layout/menu/l2menu-message-bar.tsx +118 -0
- package/src/components/layout/menu/l2menu-quick-bar.tsx +132 -0
- package/src/components/layout/menu/menu-2layers.tsx +92 -0
- package/src/components/layout/menu/menu-render.tsx +49 -0
- package/src/components/layout/menu/reset-password.tsx +185 -0
- package/src/components/layout/menu/user-bar.tsx +97 -0
- package/src/components/layout/menu/userinfo-bar.tsx +70 -0
- package/src/components/layout/sidebar/index.css +26 -0
- package/src/components/layout/sidebar/index.tsx +38 -0
- package/src/components/login.js +137 -0
- package/src/components/module/criteria-page.tsx +175 -0
- package/src/components/module/dtmpl-page.tsx +70 -0
- package/src/components/module/ltmpl-page.tsx +181 -0
- package/src/components/routable/dtmpl-route.tsx +96 -0
- package/src/components/routable/import-route.tsx +28 -0
- package/src/components/routable/ltmpl-route.tsx +158 -0
- package/src/components/table/act-table.tsx +635 -0
- package/src/components/table/column/column-selector.tsx +79 -0
- package/src/components/table/column/index.css +14 -0
- package/src/components/table/index.css +45 -0
- package/src/components/table/l2-act-table.tsx +85 -0
- package/src/components/table/modal-select-table.tsx +248 -0
- package/src/components/table/pagination.css +15 -0
- package/src/components/table/pagination.tsx +72 -0
- package/src/components/table/query-table.tsx +331 -0
- package/src/components/table/relation-table.tsx +600 -0
- package/src/components/table/select-table.tsx +247 -0
- package/src/components/table/selected-rows-card.tsx +62 -0
- package/src/components/table/stat/restat.tsx +79 -0
- package/src/components/table/table-util.tsx +33 -0
- package/src/components/tmpl/control-type-supportor.tsx +97 -0
- package/src/components/tmpl/hc-data-source.tsx +230 -0
- package/src/components/tmpl/hcservice-v3.tsx +624 -0
- package/src/components/tmpl/interface.tsx +308 -0
- package/src/components/tmpl/superagent.js +93 -0
- package/src/components/tmpl/tmpl-config-analysis.tsx +111 -0
- package/src/components/units/EncryptUtils.js +38 -0
- package/src/components/units/image.d.ts +8 -0
- package/src/components/units/index.tsx +536 -0
- package/src/components/units/logo.png +0 -0
- package/src/components/units/storage.js +3 -0
- package/src/components/welcome/HCWelcome.js +232 -0
- package/src/components/welcome/index.css +13 -0
- package/src/components/welcome/logo.png +0 -0
- package/src/components/welcome/quick-entrance.tsx +77 -0
- package/src/components/welcome/workbench.tsx +76 -0
- package/src/index.js +4 -0
- package/src/style/common.css +79 -0
- package/src/style/coverstyle.css +49 -0
- package/src/style/transstyle.css +24 -0
- package/tsconfig.json +106 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import AntdPieChart from "../chart/antd/PieChart2";
|
|
3
|
+
import {Card, Col, Row,Image,Carousel} from 'antd';
|
|
4
|
+
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
5
|
+
import QuickEntrance from './quick-entrance'
|
|
6
|
+
import Workbench from './workbench';
|
|
7
|
+
import './index.css';
|
|
8
|
+
import * as Echarts from 'echarts';
|
|
9
|
+
import TimeCost from '../../../public/time-cost.png';
|
|
10
|
+
import TimePrograss from '../../../public/time-prograss.png';
|
|
11
|
+
import PainPoint from '../../../public/pain-point.png';
|
|
12
|
+
import Target from '../../../public/target.png';
|
|
13
|
+
import Development from '../../../public/development.png';
|
|
14
|
+
|
|
15
|
+
export default class HCWelcome extends React.Component {
|
|
16
|
+
state = {}
|
|
17
|
+
|
|
18
|
+
intervals: any[] = [];
|
|
19
|
+
|
|
20
|
+
async componentDidMount() {
|
|
21
|
+
let l2MenuCharts = await HcserviceV3.requestSimpleCharts();
|
|
22
|
+
let piecharts = [];
|
|
23
|
+
for (const item of l2MenuCharts) {
|
|
24
|
+
let data = await HcserviceV3.requestSimpleChartsEntities( item.id);
|
|
25
|
+
if (data) {
|
|
26
|
+
piecharts.push(<Col span={12}> <AntdPieChart data={data} key={item.id}></AntdPieChart></Col>)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var chartDom = document.getElementById('echart1');
|
|
31
|
+
var myChart = Echarts.init(chartDom);
|
|
32
|
+
var option;
|
|
33
|
+
|
|
34
|
+
option = {
|
|
35
|
+
title: {
|
|
36
|
+
text: 'Line'
|
|
37
|
+
},
|
|
38
|
+
tooltip: {
|
|
39
|
+
trigger: 'axis'
|
|
40
|
+
},
|
|
41
|
+
legend: {
|
|
42
|
+
data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
|
|
43
|
+
},
|
|
44
|
+
grid: {
|
|
45
|
+
left: '3%',
|
|
46
|
+
right: '4%',
|
|
47
|
+
bottom: '3%',
|
|
48
|
+
containLabel: true
|
|
49
|
+
},
|
|
50
|
+
toolbox: {
|
|
51
|
+
feature: {
|
|
52
|
+
saveAsImage: {}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
xAxis: {
|
|
56
|
+
type: 'category',
|
|
57
|
+
boundaryGap: false,
|
|
58
|
+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
59
|
+
},
|
|
60
|
+
yAxis: {
|
|
61
|
+
type: 'value'
|
|
62
|
+
},
|
|
63
|
+
series: [
|
|
64
|
+
{
|
|
65
|
+
name: 'Email',
|
|
66
|
+
type: 'line',
|
|
67
|
+
stack: 'Total',
|
|
68
|
+
data: [120, 132, 101, 134, 90, 230, 210]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Union Ads',
|
|
72
|
+
type: 'line',
|
|
73
|
+
stack: 'Total',
|
|
74
|
+
data: [220, 182, 191, 234, 290, 330, 310]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'Video Ads',
|
|
78
|
+
type: 'line',
|
|
79
|
+
stack: 'Total',
|
|
80
|
+
data: [150, 232, 201, 154, 190, 330, 410]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Direct',
|
|
84
|
+
type: 'line',
|
|
85
|
+
stack: 'Total',
|
|
86
|
+
data: [320, 332, 301, 334, 390, 330, 320]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'Search Engine',
|
|
90
|
+
type: 'line',
|
|
91
|
+
stack: 'Total',
|
|
92
|
+
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
option && myChart.setOption(option);
|
|
98
|
+
|
|
99
|
+
var chartDom = document.getElementById('echart2');
|
|
100
|
+
var myChart = Echarts.init(chartDom);
|
|
101
|
+
var option;
|
|
102
|
+
|
|
103
|
+
option = {
|
|
104
|
+
legend: {
|
|
105
|
+
top: 'bottom'
|
|
106
|
+
},
|
|
107
|
+
toolbox: {
|
|
108
|
+
show: true,
|
|
109
|
+
feature: {
|
|
110
|
+
mark: { show: true },
|
|
111
|
+
dataView: { show: true, readOnly: false },
|
|
112
|
+
restore: { show: true },
|
|
113
|
+
saveAsImage: { show: true }
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
series: [
|
|
117
|
+
{
|
|
118
|
+
name: 'Nightingale Chart',
|
|
119
|
+
type: 'pie',
|
|
120
|
+
radius: [16, 80],
|
|
121
|
+
center: ['50%', '50%'],
|
|
122
|
+
roseType: 'area',
|
|
123
|
+
itemStyle: {
|
|
124
|
+
borderRadius: 8
|
|
125
|
+
},
|
|
126
|
+
data: [
|
|
127
|
+
{ value: 40, name: 'rose 1' },
|
|
128
|
+
{ value: 38, name: 'rose 2' },
|
|
129
|
+
{ value: 32, name: 'rose 3' },
|
|
130
|
+
{ value: 30, name: 'rose 4' },
|
|
131
|
+
{ value: 28, name: 'rose 5' },
|
|
132
|
+
{ value: 26, name: 'rose 6' },
|
|
133
|
+
{ value: 22, name: 'rose 7' },
|
|
134
|
+
{ value: 18, name: 'rose 8' }
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
option && myChart.setOption(option);
|
|
141
|
+
|
|
142
|
+
this.setState({
|
|
143
|
+
piecharts
|
|
144
|
+
})
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
componentWillUnmount(): void {
|
|
148
|
+
if (this.intervals.length > 0) {
|
|
149
|
+
for (let i of this.intervals) {
|
|
150
|
+
clearInterval(i);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
this.intervals = [];
|
|
154
|
+
}
|
|
155
|
+
cardStyle = {
|
|
156
|
+
height: '400px',
|
|
157
|
+
// background: '#364d79',
|
|
158
|
+
};
|
|
159
|
+
carouselStyle={
|
|
160
|
+
background: '#fff',
|
|
161
|
+
borderRadius:'6px'
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
render() {
|
|
165
|
+
return <>
|
|
166
|
+
<Row className={'home-page'} gutter={{xs: 8, sm: 16, md: 24, lg: 32}}>
|
|
167
|
+
<Col span={24} >
|
|
168
|
+
<Card className="hovercard">
|
|
169
|
+
<Row gutter={{xs: 8, sm: 16, md: 24, lg: 32}}>
|
|
170
|
+
<Col span={12}><Image src={PainPoint} ></Image></Col>
|
|
171
|
+
<Col span={12}> <Image src={Target} ></Image></Col>
|
|
172
|
+
</Row>
|
|
173
|
+
</Card>
|
|
174
|
+
{/*<Card className="hovercard">*/}
|
|
175
|
+
{/* */}
|
|
176
|
+
{/*</Card>*/}
|
|
177
|
+
</Col>
|
|
178
|
+
<Col span={24} >
|
|
179
|
+
<Row style={{minHeight:'100px'}} gutter={{xs: 8, sm: 16, md: 24, lg: 32}}>
|
|
180
|
+
<Col span={12} style={{width: '100%'}}>
|
|
181
|
+
<Workbench className="hovercard" ></Workbench>
|
|
182
|
+
<QuickEntrance className="hovercard"></QuickEntrance>
|
|
183
|
+
</Col>
|
|
184
|
+
<Col span={12} style={{'height':'410px'}} >
|
|
185
|
+
<Card className="hovercard" style={this.cardStyle} bodyStyle={{padding:'2px'}}>
|
|
186
|
+
<Carousel autoplay >
|
|
187
|
+
<div >
|
|
188
|
+
<Image src={TimePrograss} ></Image>
|
|
189
|
+
</div >
|
|
190
|
+
<div >
|
|
191
|
+
<Image src={Development} ></Image>
|
|
192
|
+
</div>
|
|
193
|
+
<div >
|
|
194
|
+
<Image src={TimeCost} ></Image>
|
|
195
|
+
</div>
|
|
196
|
+
</Carousel>
|
|
197
|
+
</Card>
|
|
198
|
+
</Col>
|
|
199
|
+
</Row>
|
|
200
|
+
</Col>
|
|
201
|
+
{/*<Col span={24} >*/}
|
|
202
|
+
{/* <Row style={{minHeight:'100px'}} gutter={{xs: 8, sm: 16, md: 24, lg: 32}}>*/}
|
|
203
|
+
{/* <Col span={12} style={{width: '100%','height':'400px'}}>*/}
|
|
204
|
+
{/* <Image src={Development} ></Image>*/}
|
|
205
|
+
{/* </Col>*/}
|
|
206
|
+
{/* <Col span={12} style={{'height':'400px'}} >*/}
|
|
207
|
+
{/* <Image src={TimeCost} ></Image>*/}
|
|
208
|
+
{/* </Col>*/}
|
|
209
|
+
{/* </Row>*/}
|
|
210
|
+
{/*</Col>*/}
|
|
211
|
+
<Col span={24}>
|
|
212
|
+
< Row gutter={{xs: 8, sm: 16, md: 24, lg: 32}}>
|
|
213
|
+
<Col style={{width: '100%'}}>
|
|
214
|
+
<Card className="hovercard"
|
|
215
|
+
title={'统计视图'}>
|
|
216
|
+
< Row gutter={[{xs: 8, sm: 16, md: 24, lg: 32},{xs: 8, sm: 16, md: 24, lg: 32}]}>
|
|
217
|
+
{/*{this.state.piecharts}*/}
|
|
218
|
+
<Col span={16} style={{'height':'400px'}} id={'echart1'} >
|
|
219
|
+
</Col>
|
|
220
|
+
<Col span={8} style={{'height':'400px'}} id={'echart2'}>
|
|
221
|
+
</Col>
|
|
222
|
+
{/*{this.state.piecharts}*/}
|
|
223
|
+
</Row>
|
|
224
|
+
</Card>
|
|
225
|
+
</Col>
|
|
226
|
+
</Row>
|
|
227
|
+
</Col>
|
|
228
|
+
</Row>
|
|
229
|
+
</>
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {Badge, Button, Card, Layout, Space,CardProps} from 'antd'
|
|
3
|
+
import {CodeTwoTone} from '@ant-design/icons';
|
|
4
|
+
import 'antd/dist/antd.css';
|
|
5
|
+
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
6
|
+
import HCDataSource from '../tmpl/hc-data-source'
|
|
7
|
+
import {Level2Menu} from "../tmpl/interface";
|
|
8
|
+
|
|
9
|
+
interface QuickEntranceProps extends CardProps{
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface QuickEntranceState {
|
|
13
|
+
l2Menus:Level2Menu[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class QuickEntrance extends React.PureComponent<QuickEntranceProps, QuickEntranceState> {
|
|
17
|
+
state={
|
|
18
|
+
l2Menus:undefined
|
|
19
|
+
}
|
|
20
|
+
intervals:any[]=[];
|
|
21
|
+
async componentDidMount() {
|
|
22
|
+
let l2Menus:Level2Menu[] = await HCDataSource.quickEntranceMenus();
|
|
23
|
+
for (const item of l2Menus) {
|
|
24
|
+
if (item.displayTotal == true) {
|
|
25
|
+
let i= setInterval(async () => {
|
|
26
|
+
let count = await HcserviceV3.requestLtmplCount(item.id);
|
|
27
|
+
item.count = count;
|
|
28
|
+
this.setState({})
|
|
29
|
+
}, 180000);
|
|
30
|
+
this.intervals.push(i);
|
|
31
|
+
let count = await HcserviceV3.requestLtmplCount(item.id);
|
|
32
|
+
item.count = count;
|
|
33
|
+
this.setState({})
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
this.setState({
|
|
37
|
+
l2Menus
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
componentWillUnmount(): void {
|
|
42
|
+
if(this.intervals.length>0){
|
|
43
|
+
for(let i of this.intervals){
|
|
44
|
+
console.log('快捷入口移除定时任务');
|
|
45
|
+
clearInterval( i);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
this.intervals=[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
render() {
|
|
52
|
+
|
|
53
|
+
const {title,...other}=this.props;
|
|
54
|
+
const {l2Menus}=this.state;
|
|
55
|
+
|
|
56
|
+
let faceplateL2MenuComp = [];
|
|
57
|
+
l2Menus && l2Menus.forEach((l2Menu) => {
|
|
58
|
+
let comp =
|
|
59
|
+
<Badge key={l2Menu.id} count={l2Menu.count}>
|
|
60
|
+
<Button shape="round" icon={<CodeTwoTone/>} href={`#/${l2Menu.id}/act-table?menuId=${l2Menu.id}`}
|
|
61
|
+
size='large'>{l2Menu.title}</Button>
|
|
62
|
+
</Badge>
|
|
63
|
+
|
|
64
|
+
faceplateL2MenuComp.push(comp);
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<Card {...other} >
|
|
69
|
+
<Space size={[16, 16]} wrap>
|
|
70
|
+
{faceplateL2MenuComp}
|
|
71
|
+
</Space>
|
|
72
|
+
</Card>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export default QuickEntrance
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {Button, Card, Space, Statistic,CardProps} from 'antd'
|
|
3
|
+
import {LikeOutlined,RightCircleOutlined,HeartOutlined,RocketOutlined,RocketTwoTone } from '@ant-design/icons';
|
|
4
|
+
import 'antd/dist/antd.css';
|
|
5
|
+
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
6
|
+
import HCDataSource from '../tmpl/hc-data-source'
|
|
7
|
+
import {Level2Menu} from "../tmpl/interface";
|
|
8
|
+
|
|
9
|
+
interface WorkbenchProps extends CardProps {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface WorkbenchState {
|
|
13
|
+
l2Menus: Level2Menu[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class Workbench extends React.PureComponent<WorkbenchProps, WorkbenchState> {
|
|
17
|
+
state = {
|
|
18
|
+
l2Menus: undefined
|
|
19
|
+
}
|
|
20
|
+
intervals: any[] = [];
|
|
21
|
+
|
|
22
|
+
async componentDidMount() {
|
|
23
|
+
let l2Menus: Level2Menu[] = await HCDataSource.workbenchMenus();
|
|
24
|
+
for (const item of l2Menus) {
|
|
25
|
+
let i = setInterval(async () => {
|
|
26
|
+
let count = await HcserviceV3.requestLtmplCount( item.id);
|
|
27
|
+
item.count = count;
|
|
28
|
+
this.setState({})
|
|
29
|
+
}, 180000);
|
|
30
|
+
this.intervals.push(i);
|
|
31
|
+
let count = await HcserviceV3.requestLtmplCount( item.id);
|
|
32
|
+
item.count = count;
|
|
33
|
+
this.setState({})
|
|
34
|
+
}
|
|
35
|
+
this.setState({
|
|
36
|
+
l2Menus
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
componentWillUnmount(): void {
|
|
41
|
+
if (this.intervals.length > 0) {
|
|
42
|
+
for (let i of this.intervals) {
|
|
43
|
+
console.log('workbanch移除定时任务');
|
|
44
|
+
clearInterval(i);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
this.intervals = [];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
render() {
|
|
51
|
+
|
|
52
|
+
const {title, ...other} = this.props;
|
|
53
|
+
const {l2Menus} = this.state;
|
|
54
|
+
|
|
55
|
+
let faceplateStatisticL2MenusComp = [];
|
|
56
|
+
l2Menus && l2Menus.forEach((l2Menu) => {
|
|
57
|
+
let comp =
|
|
58
|
+
(<Card key={l2Menu.id}><Statistic prefix={<RocketTwoTone />} title={l2Menu.title} value={l2Menu.count}/>
|
|
59
|
+
<Button style={{marginTop: 12}} href={`#/${l2Menu.id}/act-table?menuId=${l2Menu.id}`} >
|
|
60
|
+
查看
|
|
61
|
+
</Button>
|
|
62
|
+
</Card>)
|
|
63
|
+
faceplateStatisticL2MenusComp.push(comp);
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<Card {...other} title={title ? title : '工作台'}>
|
|
68
|
+
<Space size={[16, 16]} wrap>
|
|
69
|
+
{faceplateStatisticL2MenusComp}
|
|
70
|
+
</Space>
|
|
71
|
+
</Card>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default Workbench
|
package/src/index.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
|
|
2
|
+
body {
|
|
3
|
+
margin: 0;
|
|
4
|
+
padding: 0;
|
|
5
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
|
6
|
+
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
|
7
|
+
sans-serif;
|
|
8
|
+
-webkit-font-smoothing: antialiased;
|
|
9
|
+
-moz-osx-font-smoothing: grayscale;
|
|
10
|
+
}
|
|
11
|
+
.container{
|
|
12
|
+
display:flex;
|
|
13
|
+
min-width: 620px;
|
|
14
|
+
}
|
|
15
|
+
.nav-left{
|
|
16
|
+
min-width: 50px;
|
|
17
|
+
background: #001529;
|
|
18
|
+
height: calc(100vh);
|
|
19
|
+
overflow: auto;
|
|
20
|
+
}
|
|
21
|
+
.nav-left::-webkit-scrollbar {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
.main{
|
|
25
|
+
flex:1;
|
|
26
|
+
height: calc(100vh);
|
|
27
|
+
background: #eee;
|
|
28
|
+
overflow: auto;
|
|
29
|
+
/*min-width: 620px;*/
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.content{
|
|
33
|
+
position: relative;
|
|
34
|
+
background: #fff;
|
|
35
|
+
flex:1;
|
|
36
|
+
min-height:calc(75vh);
|
|
37
|
+
}
|
|
38
|
+
.login{
|
|
39
|
+
position: relative;
|
|
40
|
+
height:calc(100vh);
|
|
41
|
+
background: #001529
|
|
42
|
+
}
|
|
43
|
+
.login form{
|
|
44
|
+
background: #fff;
|
|
45
|
+
position: absolute;
|
|
46
|
+
top:50%;
|
|
47
|
+
left:50%;
|
|
48
|
+
transform: translate(-50%,-50%);
|
|
49
|
+
padding:30px 20px;
|
|
50
|
+
border-radius: 5px
|
|
51
|
+
}
|
|
52
|
+
.buttonDiv{
|
|
53
|
+
background: #fff;
|
|
54
|
+
padding:15px 10px 10px;
|
|
55
|
+
}
|
|
56
|
+
.hoverbig:hover{
|
|
57
|
+
-ms-transform:scale(1.2,1.2); /* IE 9 */
|
|
58
|
+
-webkit-transform: scale(1.2,1.2); /* Safari */
|
|
59
|
+
transform: scale(1.2,1.2); /* 标准语法 */
|
|
60
|
+
transition: all .5s;
|
|
61
|
+
z-index: 99;
|
|
62
|
+
}
|
|
63
|
+
.fr{
|
|
64
|
+
position: relative;
|
|
65
|
+
top:-4px;
|
|
66
|
+
float: right;
|
|
67
|
+
}
|
|
68
|
+
.fr button{
|
|
69
|
+
margin-right: 5px;
|
|
70
|
+
}
|
|
71
|
+
.hoverable:hover{
|
|
72
|
+
box-shadow: 4px 4px 10px rgba(0,0,0,.09);
|
|
73
|
+
border-color: rgba(0,0,0,.09);
|
|
74
|
+
}
|
|
75
|
+
.hovercard{
|
|
76
|
+
box-shadow: 4px 4px 10px rgba(0,0,0,.09);
|
|
77
|
+
border-color: rgba(0,0,0,.09);
|
|
78
|
+
border-radius: 4px;
|
|
79
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.ant-card-head-title{
|
|
2
|
+
padding:10px 0;
|
|
3
|
+
}
|
|
4
|
+
.login form .ant-form-item,.ant-card{
|
|
5
|
+
margin-bottom: 14px
|
|
6
|
+
}
|
|
7
|
+
.ant-tabs .ant-tabs-top-content, .ant-tabs .ant-tabs-bottom-content{
|
|
8
|
+
padding:0 20px 20px;
|
|
9
|
+
}
|
|
10
|
+
.ant-tabs-tab-btn-disabled, .ant-tabs-tab-btn-disabled:hover{
|
|
11
|
+
color:#fff;
|
|
12
|
+
}
|
|
13
|
+
.ant-upload-list{
|
|
14
|
+
width:220px
|
|
15
|
+
}
|
|
16
|
+
:root .ant-tabs-tab-prev-icon-target, :root .ant-tabs-tab-next-icon-target{
|
|
17
|
+
font-size: 20px;
|
|
18
|
+
}
|
|
19
|
+
.ant-message{
|
|
20
|
+
z-index: 1090;
|
|
21
|
+
}
|
|
22
|
+
.ant-tabs-bar{
|
|
23
|
+
z-index: 99;
|
|
24
|
+
}
|
|
25
|
+
.ant-card-extra{
|
|
26
|
+
padding:0;
|
|
27
|
+
}
|
|
28
|
+
.ant-card-head{
|
|
29
|
+
min-height: 40px;
|
|
30
|
+
}
|
|
31
|
+
.ant-table{
|
|
32
|
+
line-height: 1;
|
|
33
|
+
overflow-x: auto;
|
|
34
|
+
}
|
|
35
|
+
.ant-table-thead > tr > th, .ant-table-tbody > tr > td{
|
|
36
|
+
padding:8px 10px;
|
|
37
|
+
white-space :nowrap;
|
|
38
|
+
text-align: left;
|
|
39
|
+
}
|
|
40
|
+
.ant-table-pagination.ant-pagination{
|
|
41
|
+
margin:10px 0;
|
|
42
|
+
}
|
|
43
|
+
.ant-table-thead > tr > th.ant-table-selection-column, .ant-table-tbody > tr > td.ant-table-selection-column{
|
|
44
|
+
min-width: 0;
|
|
45
|
+
}
|
|
46
|
+
.ant-avatar{
|
|
47
|
+
width:50px;
|
|
48
|
+
height:50px;
|
|
49
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.fade-enter, .fade-appear {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.fade-enter-active, .fade-appear-active {
|
|
6
|
+
opacity: 1;
|
|
7
|
+
transition: opacity 1s ease-in;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.fade-enter-done {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.fade-exit {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
}
|
|
17
|
+
.fade-exit-active {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
transition: opacity 1s ease-in;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.fade-exit-done{
|
|
23
|
+
opacity: 0;
|
|
24
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Projects */
|
|
6
|
+
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
+
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
|
9
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
|
10
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
+
|
|
13
|
+
/* Language and Environment */
|
|
14
|
+
"target": "es2015", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
15
|
+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
16
|
+
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
17
|
+
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
18
|
+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
19
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
|
20
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
21
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
|
22
|
+
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
|
23
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
24
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
25
|
+
|
|
26
|
+
/* Modules */
|
|
27
|
+
"module": "commonjs", /* Specify what module code is generated. */
|
|
28
|
+
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
29
|
+
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
30
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
31
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
32
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
33
|
+
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
|
34
|
+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
35
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
36
|
+
// "resolveJsonModule": true, /* Enable importing .json files */
|
|
37
|
+
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
|
38
|
+
|
|
39
|
+
/* JavaScript Support */
|
|
40
|
+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
|
|
41
|
+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
42
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
|
43
|
+
|
|
44
|
+
/* Emit */
|
|
45
|
+
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
46
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
47
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
48
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
49
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
50
|
+
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
|
51
|
+
// "removeComments": true, /* Disable emitting comments. */
|
|
52
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
53
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
54
|
+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
|
55
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
56
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
57
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
58
|
+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
59
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
60
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
61
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
62
|
+
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
|
63
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
|
64
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
65
|
+
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
|
66
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
67
|
+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
68
|
+
|
|
69
|
+
/* Interop Constraints */
|
|
70
|
+
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
71
|
+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
72
|
+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
|
|
73
|
+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
74
|
+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
75
|
+
|
|
76
|
+
/* Type Checking */
|
|
77
|
+
"strict": true, /* Enable all strict type-checking options. */
|
|
78
|
+
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
|
79
|
+
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
|
80
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
81
|
+
// "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
|
82
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
83
|
+
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
|
84
|
+
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
|
85
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
86
|
+
// "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
|
87
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
|
88
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
89
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
90
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
91
|
+
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
92
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
93
|
+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
|
94
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
95
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
96
|
+
|
|
97
|
+
/* Completeness */
|
|
98
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
99
|
+
"skipLibCheck": true , /* Skip type checking all .d.ts files. */
|
|
100
|
+
"strictNullChecks": false,
|
|
101
|
+
"resolveJsonModule": true,
|
|
102
|
+
"noImplicitAny": false,
|
|
103
|
+
"jsx": "react"
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
}
|