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,158 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {LtmplConfigRes, RouterCompProps} from '../tmpl/interface';
|
|
3
|
+
import Units from "../units";
|
|
4
|
+
import ActTable from '../table/act-table'
|
|
5
|
+
// import StatActTable from '../table/stat-act-table'
|
|
6
|
+
import HCDataSource from "../tmpl/hc-data-source";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface LtmplRouteProps extends RouterCompProps {
|
|
10
|
+
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export interface LtmplRouteState {
|
|
14
|
+
|
|
15
|
+
ltmplConfigRes: LtmplConfigRes,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
19
|
+
|
|
20
|
+
state = {
|
|
21
|
+
ltmplConfigRes: undefined,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async componentDidMount() {
|
|
25
|
+
this.loadData();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
onRoute = (path) => {
|
|
29
|
+
this.props.history.push(path);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
getMenuId=()=>{
|
|
33
|
+
const {location} = this.props;
|
|
34
|
+
console.log("this.props.match.params",this.props);
|
|
35
|
+
var searchParams = new URLSearchParams( location.search);
|
|
36
|
+
let menuId = searchParams.get('menuId');
|
|
37
|
+
return menuId;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
loadData = async () => {
|
|
41
|
+
const {location} = this.props;
|
|
42
|
+
const { sourceId} = this.props.match.params;
|
|
43
|
+
let criteriaData = Units.transQueryStrToParams(this.props.location.search);
|
|
44
|
+
console.log('acttable location search:', this.props.location.search);
|
|
45
|
+
let ltmplConfigRes = await HCDataSource.requestLtmplConfig(sourceId);
|
|
46
|
+
this.setState({
|
|
47
|
+
ltmplConfigRes,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async componentDidUpdate(prevProps) {
|
|
52
|
+
const {location} = this.props;
|
|
53
|
+
const { sourceId} = this.props.match.params;
|
|
54
|
+
let { sourceId: preSourceId} = prevProps.match.params;
|
|
55
|
+
let {location: preLocation} = prevProps;
|
|
56
|
+
|
|
57
|
+
if ( !sourceId ||
|
|
58
|
+
( !preSourceId && this.state.ltmplConfigRes)
|
|
59
|
+
|| (location.pathname == preLocation.pathname && location.search == preLocation.search)
|
|
60
|
+
) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.loadData();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
showView = (code: string) => {
|
|
67
|
+
const { sourceId} = this.props.match.params;
|
|
68
|
+
this.onRoute(`/${sourceId}/detail-view?code=${code}&menuId=${this.getMenuId()}`);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
doEdit = (code: string,mode:string) => {
|
|
72
|
+
const { sourceId} = this.props.match.params;
|
|
73
|
+
let mainCode = this.getMainCode();
|
|
74
|
+
let path = `/${sourceId}/detail-edit?code=${code}&menuId=${this.getMenuId()}&mode=${mode}`;
|
|
75
|
+
if (mainCode) {
|
|
76
|
+
path = path + `&mainCode=${mainCode}`;
|
|
77
|
+
}
|
|
78
|
+
this.onRoute(path);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
getMainCode = () => {
|
|
82
|
+
const {location} = this.props;
|
|
83
|
+
let search = location.search;
|
|
84
|
+
let mainCode = undefined;
|
|
85
|
+
let criteriaData = Units.transQueryStrToParams(search);
|
|
86
|
+
if (search.indexOf('mainCode') > 0) {
|
|
87
|
+
criteriaData = Units.transQueryStrToParams(search);
|
|
88
|
+
mainCode = criteriaData['mainCode'];
|
|
89
|
+
}
|
|
90
|
+
return mainCode;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
doCreate = () => {
|
|
94
|
+
const { sourceId} = this.props.match.params;
|
|
95
|
+
let path = `/${sourceId}/detail-edit?menuId=${this.getMenuId()}`;
|
|
96
|
+
let mainCode = this.getMainCode();
|
|
97
|
+
if (mainCode) {
|
|
98
|
+
path = path + `&mainCode=${mainCode}`;
|
|
99
|
+
}
|
|
100
|
+
this.onRoute(path);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
doSearch = (params_) => {
|
|
104
|
+
const { sourceId} = this.props.match.params;
|
|
105
|
+
//const oldfliter = history.location.search.slice(1);
|
|
106
|
+
|
|
107
|
+
let params = {...params_}
|
|
108
|
+
//追加过滤条件,hiddenColIds,innerQueryKey
|
|
109
|
+
let mainCode = this.getMainCode();
|
|
110
|
+
if (mainCode) {
|
|
111
|
+
params['mainCode'] = mainCode;
|
|
112
|
+
}
|
|
113
|
+
params['sourceId'] = sourceId;
|
|
114
|
+
const newfliter = Units.transQueryParamsToStr(params);
|
|
115
|
+
// let flag = true;
|
|
116
|
+
//if (newfliter && oldfliter != newfliter) { //查询条件更新时
|
|
117
|
+
this.onRoute(`/${sourceId}/act-table?menuId=${this.getMenuId()}&${newfliter}`)
|
|
118
|
+
// }else{
|
|
119
|
+
// params['serial']=Units.getRandomNum(6);
|
|
120
|
+
// }
|
|
121
|
+
// else {
|
|
122
|
+
// this.loadData(hiddenColIds, hiddenRowCodes, sortedColConfigs);
|
|
123
|
+
// }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
render() {
|
|
128
|
+
const {ltmplConfigRes} = this.state;
|
|
129
|
+
const {location, match} = this.props;
|
|
130
|
+
const { sourceId} = match.params;
|
|
131
|
+
let menuId = undefined;
|
|
132
|
+
let mainCode = undefined;
|
|
133
|
+
let search = location.search;
|
|
134
|
+
let criteriaData = Units.transQueryStrToParams(search);
|
|
135
|
+
if (search.indexOf('menuId') > 0) {
|
|
136
|
+
menuId = criteriaData['menuId'];
|
|
137
|
+
criteriaData['menuId']=undefined;
|
|
138
|
+
} else {
|
|
139
|
+
menuId = sourceId;
|
|
140
|
+
}
|
|
141
|
+
if (search.indexOf('mainCode') > 0) {
|
|
142
|
+
criteriaData = Units.transQueryStrToParams(search);
|
|
143
|
+
mainCode = criteriaData['mainCode'];
|
|
144
|
+
}
|
|
145
|
+
if (!ltmplConfigRes) {
|
|
146
|
+
return <></>;
|
|
147
|
+
} else {
|
|
148
|
+
return <ActTable menuId={this.getMenuId()} mainCode={mainCode} showView={this.showView}
|
|
149
|
+
doSearch={this.doSearch} doEdit={this.doEdit} doCreate={this.doCreate}
|
|
150
|
+
sourceId={sourceId} criteriaData={criteriaData}
|
|
151
|
+
ltmplConfig={ltmplConfigRes.ltmplConfig}/>
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export default LtmplRoute;
|
|
158
|
+
|