aldehyde 0.2.99 → 0.2.100
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/dist/bundle.021f784b1c84781461d2.js +1 -0
- package/dist/bundle.03c542ca824e205fe307.js +2 -0
- package/dist/bundle.03c542ca824e205fe307.js.LICENSE.txt +27 -0
- package/dist/bundle.03c542ca824e205fe307.js.gz +0 -0
- package/dist/bundle.15cb660c34802f6cccf5.js +1 -0
- package/dist/bundle.15cb660c34802f6cccf5.js.gz +0 -0
- package/dist/bundle.2f9c2d692fe0277a37aa.js +2 -0
- package/dist/bundle.2f9c2d692fe0277a37aa.js.LICENSE.txt +1 -0
- package/dist/bundle.2f9c2d692fe0277a37aa.js.gz +0 -0
- package/dist/bundle.320c02187dd135005102.js +2 -0
- package/dist/bundle.320c02187dd135005102.js.LICENSE.txt +6 -0
- package/dist/bundle.320c02187dd135005102.js.gz +0 -0
- package/dist/bundle.35a4af7e2d0da1942d79.js +10 -0
- package/dist/bundle.35a4af7e2d0da1942d79.js.gz +0 -0
- package/dist/bundle.3f9072b1629cdb384b46.js +2 -0
- package/dist/bundle.3f9072b1629cdb384b46.js.LICENSE.txt +5 -0
- package/dist/bundle.3f9072b1629cdb384b46.js.gz +0 -0
- package/dist/bundle.46e2295b5360a725bcd5.js +1 -0
- package/dist/bundle.46e2295b5360a725bcd5.js.gz +0 -0
- package/dist/bundle.4c3c988531c3cf360b87.js +1 -0
- package/dist/bundle.4c3c988531c3cf360b87.js.gz +0 -0
- package/dist/bundle.4df89546fd2e9d665dfb.js +2 -0
- package/dist/bundle.4df89546fd2e9d665dfb.js.LICENSE.txt +5 -0
- package/dist/bundle.4df89546fd2e9d665dfb.js.gz +0 -0
- package/dist/bundle.5a9afb9ee6cceca506fa.js +5 -0
- package/dist/bundle.5a9afb9ee6cceca506fa.js.LICENSE.txt +10 -0
- package/dist/bundle.5a9afb9ee6cceca506fa.js.gz +0 -0
- package/dist/bundle.5e6cccd06b34a0e3a2ff.js +1 -0
- package/dist/bundle.5e6cccd06b34a0e3a2ff.js.gz +0 -0
- package/dist/bundle.62c62e6aaa7f3c20761e.js +2 -0
- package/dist/bundle.62c62e6aaa7f3c20761e.js.LICENSE.txt +17 -0
- package/dist/bundle.62c62e6aaa7f3c20761e.js.gz +0 -0
- package/dist/bundle.6fd2dadd29083268c5a6.js +2 -0
- package/dist/bundle.6fd2dadd29083268c5a6.js.LICENSE.txt +17 -0
- package/dist/bundle.6fd2dadd29083268c5a6.js.gz +0 -0
- package/dist/bundle.8241d8d05e35988dd480.js +1 -0
- package/dist/bundle.8241d8d05e35988dd480.js.gz +0 -0
- package/dist/bundle.829683dfa6a98c78c58e.js +2 -0
- package/dist/bundle.829683dfa6a98c78c58e.js.LICENSE.txt +14 -0
- package/dist/bundle.829683dfa6a98c78c58e.js.gz +0 -0
- package/dist/bundle.840e28984e710e12f467.js +75 -0
- package/dist/bundle.840e28984e710e12f467.js.LICENSE.txt +8 -0
- package/dist/bundle.840e28984e710e12f467.js.gz +0 -0
- package/dist/bundle.85ce5221fe6ab1d91f7d.js +2 -0
- package/dist/bundle.85ce5221fe6ab1d91f7d.js.LICENSE.txt +1 -0
- package/dist/bundle.85ce5221fe6ab1d91f7d.js.gz +0 -0
- package/dist/bundle.9cfd99a04bde7f781c30.js +1 -0
- package/dist/bundle.9cfd99a04bde7f781c30.js.gz +0 -0
- package/dist/bundle.a049dc8814bbbf59160f.js +1 -0
- package/dist/bundle.a049dc8814bbbf59160f.js.gz +0 -0
- package/dist/bundle.a94f7811fac19aa9d6a3.js +2 -0
- package/dist/bundle.a94f7811fac19aa9d6a3.js.LICENSE.txt +1 -0
- package/dist/bundle.a94f7811fac19aa9d6a3.js.gz +0 -0
- package/dist/bundle.abdde6e82ee9f60d1bf3.js +2 -0
- package/dist/bundle.abdde6e82ee9f60d1bf3.js.LICENSE.txt +30 -0
- package/dist/bundle.abdde6e82ee9f60d1bf3.js.gz +0 -0
- package/dist/bundle.b207a66d5902f39d0c5a.js +1 -0
- package/dist/bundle.b207a66d5902f39d0c5a.js.gz +0 -0
- package/dist/bundle.b7b86a025aa95dea0e19.js +2 -0
- package/dist/bundle.b7b86a025aa95dea0e19.js.LICENSE.txt +8 -0
- package/dist/bundle.b7b86a025aa95dea0e19.js.gz +0 -0
- package/dist/bundle.b7e3eb480b649b3de67b.js +2 -0
- package/dist/bundle.b7e3eb480b649b3de67b.js.LICENSE.txt +5 -0
- package/dist/bundle.b7e3eb480b649b3de67b.js.gz +0 -0
- package/dist/bundle.c1c6028fd703ebf78c2e.js +2 -0
- package/dist/bundle.c1c6028fd703ebf78c2e.js.LICENSE.txt +5 -0
- package/dist/bundle.c1c6028fd703ebf78c2e.js.gz +0 -0
- package/dist/bundle.cd10ae07e0e0c36d0dee.js +2 -0
- package/dist/bundle.cd10ae07e0e0c36d0dee.js.LICENSE.txt +22 -0
- package/dist/bundle.cd10ae07e0e0c36d0dee.js.gz +0 -0
- package/dist/bundle.cf6a1933769c2aee4e6e.js +1 -0
- package/dist/bundle.cf6a1933769c2aee4e6e.js.gz +0 -0
- package/dist/bundle.d158d417d1d7a8acb2a1.js +1 -0
- package/dist/bundle.d158d417d1d7a8acb2a1.js.gz +0 -0
- package/dist/bundle.db40aa107272f4303ece.js +1 -0
- package/dist/bundle.db40aa107272f4303ece.js.gz +0 -0
- package/dist/bundle.ddefe6d8f235ef95d470.js +1 -0
- package/dist/bundle.ddefe6d8f235ef95d470.js.gz +0 -0
- package/dist/bundle.e02a7a16b4a6b3bb412f.js +2 -0
- package/dist/bundle.e02a7a16b4a6b3bb412f.js.LICENSE.txt +16 -0
- package/dist/bundle.e02a7a16b4a6b3bb412f.js.gz +0 -0
- package/dist/bundle.e760a70171cf0ae4567b.js +1 -0
- package/dist/bundle.e760a70171cf0ae4567b.js.gz +0 -0
- package/dist/bundle.f3ce062a620fe456c152.js +1 -0
- package/dist/bundle.f6e1c4fda58154810fe2.js +2 -0
- package/dist/bundle.f6e1c4fda58154810fe2.js.LICENSE.txt +41 -0
- package/dist/bundle.f6e1c4fda58154810fe2.js.gz +0 -0
- package/dist/bundle.fe9c09b8ace9c3117b0a.js +1 -0
- package/dist/bundle.fe9c09b8ace9c3117b0a.js.gz +0 -0
- package/dist/bundle.feaa17bec2057a4ee54f.js +1 -0
- package/dist/bundle.feaa17bec2057a4ee54f.js.gz +0 -0
- package/dist/css/chemstruc-graph-6437e59640f8b99b774f.css +12 -0
- package/dist/css/chemstruc-graph-6437e59640f8b99b774f.css.gz +0 -0
- package/dist/css/common-901df6b21f13391f2a53.css +56 -0
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css +886 -0
- package/dist/css/html-editor-draft-5e8e152675ab7d201c00.css.gz +0 -0
- package/dist/css/main-f3c8fdebab315e61e7be.css +865 -0
- package/dist/css/main-f3c8fdebab315e61e7be.css.gz +0 -0
- package/dist/images/development-30de07a0.png +0 -0
- package/dist/images/logo-54b328b7.png +0 -0
- package/dist/images/pain-point-8f02421e.png +0 -0
- package/dist/images/target-13a5b4b9.png +0 -0
- package/dist/images/time-cost-cb40d2c2.png +0 -0
- package/dist/images/time-prograss-44b86b36.png +0 -0
- package/dist/index.html +4 -0
- package/lib/controls/collapse-card/index.d.ts +11 -2
- package/lib/controls/collapse-card/index.d.ts.map +1 -1
- package/lib/controls/collapse-card/index.js +18 -16
- package/lib/controls/collapse-card/index.js.map +1 -1
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js +2 -1
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/detail/button/fix-right-submit-button-bar.js +1 -1
- package/lib/detail/button/fix-right-submit-button-bar.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +1 -1
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/field-view-group.d.ts +10 -1
- package/lib/detail/view/field-view-group.d.ts.map +1 -1
- package/lib/detail/view/field-view-group.js +17 -11
- package/lib/detail/view/field-view-group.js.map +1 -1
- package/lib/form/criteria-form.js +3 -3
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/form/form-Item-group.js +1 -1
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/layout/MainPage.js +1 -1
- package/lib/layout/MainPage.js.map +1 -1
- package/lib/layout/header/index.js +3 -3
- package/lib/layout/header/index.js.map +1 -1
- package/lib/layout/menu/block.d.ts +13 -1
- package/lib/layout/menu/block.d.ts.map +1 -1
- package/lib/layout/menu/block.js +66 -8
- package/lib/layout/menu/block.js.map +1 -1
- package/lib/layout/menu/menu-2layers.d.ts +10 -0
- package/lib/layout/menu/menu-2layers.d.ts.map +1 -1
- package/lib/layout/menu/menu-2layers.js +32 -9
- package/lib/layout/menu/menu-2layers.js.map +1 -1
- package/lib/layout/sidebar/index.d.ts.map +1 -1
- package/lib/layout/sidebar/index.js +3 -1
- package/lib/layout/sidebar/index.js.map +1 -1
- package/lib/locale/LocaleProvider.d.ts.map +1 -1
- package/lib/locale/LocaleProvider.js +10 -8
- package/lib/locale/LocaleProvider.js.map +1 -1
- package/lib/locale/translate.d.ts.map +1 -1
- package/lib/locale/translate.js +10 -8
- package/lib/locale/translate.js.map +1 -1
- package/lib/routable/ltmpl-route.d.ts +2 -2
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +22 -21
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +18 -8
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-selector.d.ts.map +1 -1
- package/lib/table/column/column-selector.js +20 -18
- package/lib/table/column/column-selector.js.map +1 -1
- package/lib/table/query-table.d.ts +10 -1
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +47 -41
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.js +4 -4
- package/lib/table/relation-table.js.map +1 -1
- package/lib/tree/tmpl-tree.d.ts.map +1 -1
- package/lib/tree/tmpl-tree.js +9 -6
- package/lib/tree/tmpl-tree.js.map +1 -1
- package/lib/tree/tree-node.d.ts.map +1 -1
- package/lib/tree/tree-node.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +6 -5
- package/src/aldehyde/controls/collapse-card/index.tsx +96 -54
- package/src/aldehyde/controls/entry-control.tsx +2 -1
- package/src/aldehyde/detail/button/fix-right-submit-button-bar.tsx +1 -1
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +1 -1
- package/src/aldehyde/detail/view/field-view-group.tsx +62 -47
- package/src/aldehyde/form/criteria-form.tsx +3 -3
- package/src/aldehyde/form/form-Item-group.tsx +1 -1
- package/src/aldehyde/layout/MainPage.tsx +1 -1
- package/src/aldehyde/layout/header/index.tsx +4 -4
- package/src/aldehyde/layout/menu/block.less +11 -0
- package/src/aldehyde/layout/menu/block.tsx +132 -72
- package/src/aldehyde/layout/menu/menu-2layers.tsx +99 -64
- package/src/aldehyde/layout/sidebar/index.tsx +5 -1
- package/src/aldehyde/locale/LocaleProvider.tsx +10 -9
- package/src/aldehyde/locale/translate.ts +10 -7
- package/src/aldehyde/routable/ltmpl-route.tsx +220 -196
- package/src/aldehyde/table/act-table.tsx +26 -9
- package/src/aldehyde/table/column/column-selector.tsx +111 -72
- package/src/aldehyde/table/query-table.tsx +354 -304
- package/src/aldehyde/table/relation-table.tsx +4 -4
- package/src/aldehyde/tree/tmpl-tree.tsx +19 -3
- package/src/aldehyde/tree/tree-node.tsx +0 -3
|
@@ -1,207 +1,231 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
AddOrUpdate,
|
|
4
|
+
LtmplConfigRes,
|
|
5
|
+
RouterCompProps,
|
|
6
|
+
} from "../tmpl/interface";
|
|
3
7
|
import Units from "../units";
|
|
4
|
-
import ActTable from
|
|
8
|
+
import ActTable from "../table/act-table";
|
|
5
9
|
// import StatActTable from '../table/stat-act-table'
|
|
6
10
|
import HCDataSource from "../tmpl/hc-data-source";
|
|
7
11
|
import withRouter from "../routable/withroute";
|
|
8
|
-
export interface LtmplRouteProps extends RouterCompProps {
|
|
9
|
-
|
|
10
|
-
};
|
|
12
|
+
export interface LtmplRouteProps extends RouterCompProps {}
|
|
11
13
|
|
|
12
14
|
export interface LtmplRouteState {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
15
|
+
ltmplConfigRes?: LtmplConfigRes;
|
|
16
|
+
pageNo?: number;
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
}
|
|
17
19
|
|
|
18
20
|
class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
21
|
+
static defaultProps = {
|
|
22
|
+
basePath: "",
|
|
23
|
+
};
|
|
24
|
+
state = {
|
|
25
|
+
ltmplConfigRes: undefined,
|
|
26
|
+
pageNo: undefined,
|
|
27
|
+
pageSize: undefined,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
async componentDidMount() {
|
|
31
|
+
this.loadData();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
onRoute = (path) => {
|
|
35
|
+
this.props.navigate(path);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
getMenuId = () => {
|
|
39
|
+
const { searchParams } = this.props;
|
|
40
|
+
let menuId = searchParams.get("menuId");
|
|
41
|
+
return menuId;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
loadData = async () => {
|
|
45
|
+
const { params } = this.props;
|
|
46
|
+
const { sourceId } = params;
|
|
47
|
+
let ltmplConfigRes: LtmplConfigRes = await HCDataSource.requestLtmplConfig(
|
|
48
|
+
null,
|
|
49
|
+
sourceId
|
|
50
|
+
);
|
|
51
|
+
this.setState({
|
|
52
|
+
ltmplConfigRes: ltmplConfigRes,
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
async componentDidUpdate(prevProps) {
|
|
57
|
+
const { location, params } = this.props;
|
|
58
|
+
const { sourceId } = params;
|
|
59
|
+
let { sourceId: preSourceId } = prevProps.params;
|
|
60
|
+
let { location: preLocation } = prevProps;
|
|
61
|
+
if (
|
|
62
|
+
!sourceId ||
|
|
63
|
+
(!preSourceId && this.state.ltmplConfigRes) ||
|
|
64
|
+
(location.pathname == preLocation.pathname &&
|
|
65
|
+
location.search == preLocation.search)
|
|
66
|
+
) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.loadData();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
showView = (code: string, toCustomPage: boolean = false) => {
|
|
73
|
+
const { basePath } = this.props;
|
|
74
|
+
const { sourceId } = this.props.params;
|
|
75
|
+
const { ltmplConfigRes } = this.state;
|
|
76
|
+
let path = `${basePath}/${sourceId}/detail-view?code=${code}&menuId=${this.getMenuId()}`;
|
|
77
|
+
if (toCustomPage && ltmplConfigRes.ltmplConfig.customViewPagePath) {
|
|
78
|
+
path = `${basePath}${
|
|
79
|
+
ltmplConfigRes.ltmplConfig.customViewPagePath
|
|
80
|
+
}?menuId=${this.getMenuId()}&sourceId=${sourceId}`;
|
|
81
|
+
}
|
|
82
|
+
this.onRoute(path);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
doEdit = (code: string, mode: AddOrUpdate, toCustomPage: boolean = false) => {
|
|
86
|
+
const { basePath } = this.props;
|
|
87
|
+
const { sourceId } = this.props.params;
|
|
88
|
+
const { ltmplConfigRes } = this.state;
|
|
89
|
+
let mainCode = this.getMainCode();
|
|
90
|
+
|
|
91
|
+
let path = `${basePath}/${sourceId}/detail-edit?code=${code}&menuId=${this.getMenuId()}&mode=${mode}`;
|
|
92
|
+
if (toCustomPage && ltmplConfigRes.ltmplConfig.customEditPagePath) {
|
|
93
|
+
path = `${basePath}/page/${sourceId}${
|
|
94
|
+
ltmplConfigRes.ltmplConfig.customEditPagePath
|
|
95
|
+
}?code=${code}&menuId=${this.getMenuId()}`;
|
|
96
|
+
}
|
|
97
|
+
if (mainCode) {
|
|
98
|
+
path = path + `&mainCode=${mainCode}`;
|
|
99
|
+
}
|
|
100
|
+
this.onRoute(path);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
getMainCode = () => {
|
|
104
|
+
const { searchParams } = this.props;
|
|
105
|
+
let mainCode = undefined;
|
|
106
|
+
// let criteriaData = Units.transQueryStrToParams(search);
|
|
107
|
+
let mcode = searchParams.get("mainCode");
|
|
108
|
+
if (mcode) {
|
|
109
|
+
// criteriaData = Units.transQueryStrToParams(search);
|
|
110
|
+
mainCode = mcode;
|
|
111
|
+
}
|
|
112
|
+
return mainCode;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
doCreate = (addTmplId: string, toCustomPage: boolean = false) => {
|
|
116
|
+
const { basePath } = this.props;
|
|
117
|
+
const { sourceId } = this.props.params;
|
|
118
|
+
const { ltmplConfigRes } = this.state;
|
|
119
|
+
let path = `${basePath}/${sourceId}/detail-edit?menuId=${this.getMenuId()}&addTmplId=${
|
|
120
|
+
addTmplId ? addTmplId : ""
|
|
121
|
+
}`;
|
|
122
|
+
if (toCustomPage && ltmplConfigRes.ltmplConfig.customEditPagePath) {
|
|
123
|
+
path = `${basePath}/page/${sourceId}${
|
|
124
|
+
ltmplConfigRes.ltmplConfig.customEditPagePath
|
|
125
|
+
}?menuId=${this.getMenuId()}`;
|
|
126
|
+
}
|
|
127
|
+
let mainCode = this.getMainCode();
|
|
128
|
+
if (mainCode) {
|
|
129
|
+
path = path + `&mainCode=${mainCode}`;
|
|
130
|
+
}
|
|
131
|
+
this.onRoute(path);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
doRAction = (ractionId: string, mainCode: String) => {
|
|
135
|
+
const { basePath } = this.props;
|
|
136
|
+
let path = `${basePath}/${ractionId}/act-table?mainCode=${mainCode}&menuId=${this.getMenuId()}`;
|
|
137
|
+
this.onRoute(path);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
doSearch = (params_) => {
|
|
141
|
+
const { basePath } = this.props;
|
|
142
|
+
const { sourceId } = this.props.params;
|
|
143
|
+
let params = { ...params_ };
|
|
144
|
+
//params['sourceId'] = sourceId;
|
|
145
|
+
const newfliter = Units.transQueryParamsToStr(params);
|
|
146
|
+
this.props.navigate(`${basePath}/${sourceId}/act-table?${newfliter}`, {
|
|
147
|
+
replace: true,
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
onChangeSearch = (params_) => {
|
|
151
|
+
let params = { ...params_ };
|
|
152
|
+
//追加过滤条件,hiddenColIds,innerQueryKey
|
|
153
|
+
const { searchParams } = this.props;
|
|
154
|
+
let mcode = searchParams.get("mainCode");
|
|
155
|
+
if (mcode) {
|
|
156
|
+
params["mainCode"] = mcode;
|
|
157
|
+
}
|
|
158
|
+
const { pageSize, pageNo } = this.state;
|
|
159
|
+
if (pageSize) {
|
|
160
|
+
params["pageNo"] = pageNo;
|
|
161
|
+
}
|
|
162
|
+
if (pageNo) {
|
|
163
|
+
params["pageSize"] = pageSize;
|
|
164
|
+
}
|
|
165
|
+
params["menuId"] = this.getMenuId();
|
|
166
|
+
params["sourceId"] = this.getMenuId();
|
|
167
|
+
this.doSearch(params);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
onChangePage = (pageNo: number, pageSize: number) => {
|
|
171
|
+
const { location } = this.props;
|
|
172
|
+
let search = location.search;
|
|
173
|
+
let params = Units.transQueryStrToParams(search);
|
|
174
|
+
params["pageNo"] = pageNo;
|
|
175
|
+
params["pageSize"] = pageSize;
|
|
176
|
+
this.doSearch(params);
|
|
177
|
+
|
|
178
|
+
// this.setState({
|
|
179
|
+
// pageNo,
|
|
180
|
+
// pageSize
|
|
181
|
+
// })
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
render() {
|
|
185
|
+
const { ltmplConfigRes } = this.state;
|
|
186
|
+
const { location, params } = this.props;
|
|
187
|
+
const { sourceId } = params;
|
|
188
|
+
//let menuId = undefined;
|
|
189
|
+
let mainCode = undefined;
|
|
190
|
+
|
|
191
|
+
let search = location.search;
|
|
192
|
+
let criteriaData = Units.transQueryStrToParams(search);
|
|
193
|
+
// if (search.indexOf('menuId') > 0) {
|
|
194
|
+
// menuId = criteriaData['menuId'];
|
|
195
|
+
// criteriaData['menuId'] = undefined;
|
|
196
|
+
// } else {
|
|
197
|
+
// menuId = sourceId;
|
|
198
|
+
// }
|
|
199
|
+
let pageSize = criteriaData["pageSize"];
|
|
200
|
+
let pageNo = criteriaData["pageNo"];
|
|
201
|
+
|
|
202
|
+
if (search.indexOf("mainCode") > 0) {
|
|
203
|
+
//criteriaData = Units.transQueryStrToParams(search);
|
|
204
|
+
mainCode = criteriaData["mainCode"];
|
|
205
|
+
}
|
|
206
|
+
if (!ltmplConfigRes) {
|
|
207
|
+
return <></>;
|
|
208
|
+
} else {
|
|
209
|
+
return (
|
|
210
|
+
<ActTable
|
|
211
|
+
serverKey={null}
|
|
212
|
+
pageSize={pageSize}
|
|
213
|
+
pageNo={pageNo}
|
|
214
|
+
onChangePage={this.onChangePage}
|
|
215
|
+
menuId={this.getMenuId()}
|
|
216
|
+
mainCode={mainCode}
|
|
217
|
+
showView={this.showView}
|
|
218
|
+
doSearch={this.onChangeSearch}
|
|
219
|
+
doEdit={this.doEdit}
|
|
220
|
+
doCreate={this.doCreate}
|
|
221
|
+
sourceId={sourceId}
|
|
222
|
+
criteriaData={criteriaData}
|
|
223
|
+
ltmplConfig={ltmplConfigRes ? ltmplConfigRes.ltmplConfig : null}
|
|
224
|
+
doRAction={this.doRAction}
|
|
225
|
+
/>
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
204
229
|
}
|
|
205
230
|
|
|
206
231
|
export default withRouter(LtmplRoute);
|
|
207
|
-
|
|
@@ -76,7 +76,7 @@ const { Panel } = Collapse;
|
|
|
76
76
|
type Level = "l1" | "l2";
|
|
77
77
|
|
|
78
78
|
const defaultDisabledColIds: string[] = ["20000", "10000"];
|
|
79
|
-
|
|
79
|
+
let refresh=true;
|
|
80
80
|
interface ActTableProps extends TmplBaseProps {
|
|
81
81
|
criteriaData: object;
|
|
82
82
|
pageNo: number;
|
|
@@ -284,7 +284,11 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
284
284
|
column["render"] = (text, record, index) => <label>{index + 1}</label>;
|
|
285
285
|
item["sorter"] = undefined;
|
|
286
286
|
} else if (item.id == "10000") {
|
|
287
|
-
column["title"] =
|
|
287
|
+
column["title"] = (
|
|
288
|
+
<Tooltip title={translate("${拖拽排序}")}>
|
|
289
|
+
{translate("${" + item.title + "}")}
|
|
290
|
+
</Tooltip>
|
|
291
|
+
);
|
|
288
292
|
column["width"] = 30;
|
|
289
293
|
column["dataIndex"] = item.id;
|
|
290
294
|
column["className"] = "drag-visible";
|
|
@@ -511,6 +515,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
511
515
|
);
|
|
512
516
|
} else {
|
|
513
517
|
column["className"] = "opsColumn";
|
|
518
|
+
column["title"] = translate("${" + item.title + "}");
|
|
514
519
|
column["render"] = (text, record) => {
|
|
515
520
|
return (
|
|
516
521
|
<ViewControl
|
|
@@ -523,6 +528,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
523
528
|
};
|
|
524
529
|
}
|
|
525
530
|
});
|
|
531
|
+
|
|
526
532
|
return tableColumns;
|
|
527
533
|
};
|
|
528
534
|
|
|
@@ -540,6 +546,8 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
540
546
|
this.loadData(defaultDisabledColIds, [], sortedColConfigs);
|
|
541
547
|
}
|
|
542
548
|
|
|
549
|
+
|
|
550
|
+
|
|
543
551
|
async componentDidUpdate(prevProps) {
|
|
544
552
|
const { sourceId, criteriaData, ltmplConfig } = this.props;
|
|
545
553
|
const { translate } = this.context;
|
|
@@ -550,7 +558,8 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
550
558
|
} = prevProps;
|
|
551
559
|
|
|
552
560
|
let { hiddenColIds, sortedColConfigs } = this.state;
|
|
553
|
-
|
|
561
|
+
|
|
562
|
+
if (refresh ||
|
|
554
563
|
(sourceId && preSourceId != sourceId) ||
|
|
555
564
|
(ltmplConfig &&
|
|
556
565
|
(!preLtmplConfig || ltmplConfig.id != preLtmplConfig.id)) ||
|
|
@@ -563,8 +572,11 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
563
572
|
"pageNo",
|
|
564
573
|
])
|
|
565
574
|
) {
|
|
575
|
+
//5秒后允许再次请求数据
|
|
576
|
+
refresh=false;
|
|
577
|
+
|
|
566
578
|
if (ltmplConfig.id == preLtmplConfig.id) {
|
|
567
|
-
this.loadData(hiddenColIds, [], sortedColConfigs);
|
|
579
|
+
await this.loadData(hiddenColIds, [], sortedColConfigs);
|
|
568
580
|
} else {
|
|
569
581
|
let sColConfigs = undefined;
|
|
570
582
|
if (ltmplConfig) {
|
|
@@ -577,8 +589,11 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
577
589
|
this.setState({
|
|
578
590
|
viewModels: ["table"],
|
|
579
591
|
});
|
|
580
|
-
this.loadData(defaultDisabledColIds, [], sColConfigs);
|
|
592
|
+
await this.loadData(defaultDisabledColIds, [], sColConfigs);
|
|
581
593
|
}
|
|
594
|
+
setTimeout( function() {
|
|
595
|
+
refresh=true;
|
|
596
|
+
},2000);
|
|
582
597
|
}
|
|
583
598
|
}
|
|
584
599
|
|
|
@@ -930,7 +945,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
930
945
|
<ExportFrame //导出组件
|
|
931
946
|
serverKey={serverKey}
|
|
932
947
|
queryKey={queryKey}
|
|
933
|
-
title={ltmplConfig.title}
|
|
948
|
+
title={translate("${" + ltmplConfig.title + "}")}
|
|
934
949
|
/>
|
|
935
950
|
}
|
|
936
951
|
title={translate("${导出}")}
|
|
@@ -1006,7 +1021,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1006
1021
|
</Col>
|
|
1007
1022
|
<Col span={24}>
|
|
1008
1023
|
<Checkbox value={"verticalList"}>
|
|
1009
|
-
{translate("纵向列表")}
|
|
1024
|
+
{translate("${纵向列表}")}
|
|
1010
1025
|
</Checkbox>
|
|
1011
1026
|
</Col>
|
|
1012
1027
|
{/*<Col span={24}><Checkbox value={'horizontalList'}>横向列表</Checkbox></Col>*/}
|
|
@@ -1132,6 +1147,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1132
1147
|
onChangePage,
|
|
1133
1148
|
serverKey,
|
|
1134
1149
|
} = this.props;
|
|
1150
|
+
const { translate } = this.context;
|
|
1135
1151
|
|
|
1136
1152
|
if (!ltmplConfig || !sourceId) {
|
|
1137
1153
|
return (
|
|
@@ -1202,7 +1218,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1202
1218
|
) : null}
|
|
1203
1219
|
<h3>
|
|
1204
1220
|
{" "}
|
|
1205
|
-
{title ? title : ltmplConfig.title}
|
|
1221
|
+
{translate("${" + (title ? title : ltmplConfig.title) + "}")}
|
|
1206
1222
|
<p className="fr">{this.renderHeaderButtons()}</p>
|
|
1207
1223
|
</h3>
|
|
1208
1224
|
</span>
|
|
@@ -1252,6 +1268,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1252
1268
|
initCollapse,
|
|
1253
1269
|
tip,
|
|
1254
1270
|
} = this.props;
|
|
1271
|
+
const { translate } = this.context;
|
|
1255
1272
|
|
|
1256
1273
|
if (!ltmplConfig || !sourceId) {
|
|
1257
1274
|
return (
|
|
@@ -1270,7 +1287,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1270
1287
|
initCollapse={initCollapse}
|
|
1271
1288
|
title={
|
|
1272
1289
|
<>
|
|
1273
|
-
{title ? title : ltmplConfig.title}
|
|
1290
|
+
{translate("${" + (title ? title : ltmplConfig.title) + "}")}
|
|
1274
1291
|
<ToolTipBar
|
|
1275
1292
|
content={tip ? tip : ltmplConfig ? ltmplConfig.tip : null}
|
|
1276
1293
|
/>
|