aldehyde 0.2.144 → 0.2.146
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/lib/controls/collapse-card/index.js +1 -1
- package/lib/controls/collapse-card/index.js.map +1 -1
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +1 -3
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entry-control.js +3 -3
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/detail/edit/dtmpl-edit.d.ts.map +1 -1
- package/lib/detail/edit/dtmpl-edit.js +20 -6
- package/lib/detail/edit/dtmpl-edit.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts +2 -0
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.js +9 -4
- package/lib/module/dtmpl-edit-card.js.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts +2 -0
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.js +21 -4
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/module/embed-dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/embed-dtmpl-edit-page.js +11 -1
- package/lib/module/embed-dtmpl-edit-page.js.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +43 -25
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/query-table.d.ts +3 -0
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +61 -26
- package/lib/table/query-table.js.map +1 -1
- package/lib/tmpl/hcservice-v3.js +1 -1
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +6 -1
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/welcome/HCWelcome.js +2 -1
- package/lib/welcome/HCWelcome.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/collapse-card/index.tsx +1 -1
- package/src/aldehyde/controls/entity-select/entity-select.tsx +1 -3
- package/src/aldehyde/controls/entry-control.tsx +3 -3
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +19 -6
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +1 -0
- package/src/aldehyde/module/dtmpl-edit-card.tsx +11 -5
- package/src/aldehyde/module/dtmpl-edit-page.tsx +21 -5
- package/src/aldehyde/module/embed-dtmpl-edit-page.tsx +11 -1
- package/src/aldehyde/table/act-table.tsx +83 -51
- package/src/aldehyde/table/query-table.tsx +1063 -1010
- package/src/aldehyde/tmpl/hcservice-v3.tsx +1 -1
- package/src/aldehyde/tmpl/interface.tsx +17 -13
- package/src/aldehyde/welcome/HCWelcome.js +10 -2
|
@@ -36,6 +36,7 @@ interface ModalEditorProps extends DtmplBaseProps {
|
|
|
36
36
|
|
|
37
37
|
interface ModalEditorState {
|
|
38
38
|
id?: string;
|
|
39
|
+
queryingCode?:string;
|
|
39
40
|
dtmplConfig?: DtmplConfig;
|
|
40
41
|
loading?: boolean;
|
|
41
42
|
serial?: number;
|
|
@@ -70,6 +71,7 @@ export default class DtmplEditPage extends React.PureComponent<
|
|
|
70
71
|
state = {
|
|
71
72
|
id: "modelDtmplEdit" + Units.getRandomNum(6),
|
|
72
73
|
dtmplConfig: undefined,
|
|
74
|
+
queryingCode:undefined,
|
|
73
75
|
loading: true,
|
|
74
76
|
serial: 1,
|
|
75
77
|
dtmplData: undefined,
|
|
@@ -124,8 +126,16 @@ export default class DtmplEditPage extends React.PureComponent<
|
|
|
124
126
|
addTmplId
|
|
125
127
|
);
|
|
126
128
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
// 直接复制
|
|
130
|
+
if(dtmplConfig?.entity && dtmplConfig?.entity?.code==code){
|
|
131
|
+
this.setState({
|
|
132
|
+
dtmplData: dtmplConfig.entity,
|
|
133
|
+
id: code,
|
|
134
|
+
loading: false,
|
|
135
|
+
});
|
|
136
|
+
}else{
|
|
137
|
+
await this.loadData(dtmplConfig);
|
|
138
|
+
}
|
|
129
139
|
this.setState({
|
|
130
140
|
dtmplConfig,
|
|
131
141
|
loading: false,
|
|
@@ -165,9 +175,11 @@ export default class DtmplEditPage extends React.PureComponent<
|
|
|
165
175
|
if (!code && codeSource) {
|
|
166
176
|
code = await HcserviceV3.queryCode(sourceId, codeSource, serverKey);
|
|
167
177
|
}
|
|
178
|
+
|
|
168
179
|
if (code) {
|
|
169
180
|
this.setState({
|
|
170
181
|
loading: true,
|
|
182
|
+
queryingCode:code,
|
|
171
183
|
dtmplData:undefined,
|
|
172
184
|
});
|
|
173
185
|
|
|
@@ -178,10 +190,14 @@ export default class DtmplEditPage extends React.PureComponent<
|
|
|
178
190
|
code
|
|
179
191
|
);
|
|
180
192
|
|
|
193
|
+
if( (!this.state.queryingCode || this.state.queryingCode==dtmplData_.code) &&
|
|
194
|
+
(!dtmplData_.sourceId || (this.props.sourceId==dtmplData_.sourceId))){
|
|
195
|
+
this.setState({
|
|
196
|
+
dtmplData: dtmplData_,
|
|
197
|
+
id: code,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
181
200
|
this.setState({
|
|
182
|
-
dtmplData: dtmplData_,
|
|
183
|
-
id: code,
|
|
184
|
-
// changedGroupData:new Map<number,DtmplData[]>(),
|
|
185
201
|
loading: false,
|
|
186
202
|
});
|
|
187
203
|
} else if (defaultDtmplData) {
|
|
@@ -78,7 +78,17 @@ export default class EmbedDtmplEditPage extends React.PureComponent<EmbedDtmplEd
|
|
|
78
78
|
}else{
|
|
79
79
|
dtmplConfig = await HCDataSource.requestAddDtmplConfig(serverKey,sourceId,addTmplId);
|
|
80
80
|
}
|
|
81
|
-
|
|
81
|
+
|
|
82
|
+
if(dtmplConfig?.entity && dtmplConfig?.entity?.code==code){
|
|
83
|
+
this.setState({
|
|
84
|
+
dtmplData: dtmplConfig.entity,
|
|
85
|
+
id: code,
|
|
86
|
+
loading: false,
|
|
87
|
+
});
|
|
88
|
+
}else{
|
|
89
|
+
await this.loadData(dtmplConfig);
|
|
90
|
+
}
|
|
91
|
+
|
|
82
92
|
this.setState({
|
|
83
93
|
dtmplConfig,
|
|
84
94
|
loading: false,
|
|
@@ -23,7 +23,8 @@ import {
|
|
|
23
23
|
EyeInvisibleOutlined,
|
|
24
24
|
EyeOutlined,
|
|
25
25
|
FormOutlined,
|
|
26
|
-
FundOutlined,
|
|
26
|
+
FundOutlined,
|
|
27
|
+
KeyOutlined,
|
|
27
28
|
LineChartOutlined,
|
|
28
29
|
MenuOutlined,
|
|
29
30
|
PlusCircleOutlined,
|
|
@@ -38,7 +39,8 @@ import "./index.css";
|
|
|
38
39
|
import {
|
|
39
40
|
ActTableMode,
|
|
40
41
|
ActTableViewModel,
|
|
41
|
-
AddOrUpdate,
|
|
42
|
+
AddOrUpdate,
|
|
43
|
+
BuiltInButtonName,
|
|
42
44
|
ClassifiedAddConfig,
|
|
43
45
|
ColumnConfig,
|
|
44
46
|
DtmplData,
|
|
@@ -116,8 +118,8 @@ interface ActTableStat {
|
|
|
116
118
|
viewModels?: ActTableViewModel[];
|
|
117
119
|
showL2ActTable?: boolean;
|
|
118
120
|
showL2Chart?: boolean;
|
|
119
|
-
recordCode?:string;
|
|
120
|
-
blockMenuTreeDrawerOpen?:boolean;
|
|
121
|
+
recordCode?: string;
|
|
122
|
+
blockMenuTreeDrawerOpen?: boolean;
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
@@ -136,8 +138,8 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
136
138
|
disabledColIds: undefined,
|
|
137
139
|
showL2ActTable: false,
|
|
138
140
|
showL2Chart: false,
|
|
139
|
-
recordCode:undefined,
|
|
140
|
-
blockMenuTreeDrawerOpen:false,
|
|
141
|
+
recordCode: undefined,
|
|
142
|
+
blockMenuTreeDrawerOpen: false,
|
|
141
143
|
};
|
|
142
144
|
|
|
143
145
|
static contextType = LocaleContext;
|
|
@@ -166,6 +168,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
166
168
|
pageSize,
|
|
167
169
|
serverKey,
|
|
168
170
|
} = this.props;
|
|
171
|
+
|
|
169
172
|
if (!ltmplConfig) {
|
|
170
173
|
return;
|
|
171
174
|
}
|
|
@@ -231,18 +234,22 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
231
234
|
});
|
|
232
235
|
}
|
|
233
236
|
|
|
237
|
+
if(!queryKey.sourceId || queryKey.sourceId==this.props.sourceId){
|
|
238
|
+
this.setState({
|
|
239
|
+
disabledColIds,
|
|
240
|
+
hiddenColIds: hiddenColIds_,
|
|
241
|
+
hiddenRowCodes,
|
|
242
|
+
sortedColConfigs,
|
|
243
|
+
queryKey,
|
|
244
|
+
showL2Chart: false,
|
|
245
|
+
selectedRows: [],
|
|
246
|
+
selectedDatas: [],
|
|
247
|
+
viewModels:
|
|
248
|
+
this.state.viewModels.length > 0 ? this.state.viewModels : ["table"],
|
|
249
|
+
});
|
|
250
|
+
}
|
|
234
251
|
this.setState({
|
|
235
|
-
disabledColIds,
|
|
236
|
-
hiddenColIds: hiddenColIds_,
|
|
237
|
-
hiddenRowCodes,
|
|
238
|
-
sortedColConfigs,
|
|
239
|
-
queryKey,
|
|
240
252
|
loading: false,
|
|
241
|
-
showL2Chart: false,
|
|
242
|
-
selectedRows: [],
|
|
243
|
-
selectedDatas: [],
|
|
244
|
-
viewModels:
|
|
245
|
-
this.state.viewModels.length > 0 ? this.state.viewModels : ["table"],
|
|
246
253
|
});
|
|
247
254
|
};
|
|
248
255
|
|
|
@@ -262,7 +269,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
262
269
|
sourceId,
|
|
263
270
|
} = this.props;
|
|
264
271
|
const { translate } = this.context;
|
|
265
|
-
const { buttons,builtInButtons } = ltmplConfig;
|
|
272
|
+
const { buttons, builtInButtons } = ltmplConfig;
|
|
266
273
|
let tableColumns = [];
|
|
267
274
|
let s = 0;
|
|
268
275
|
let colConfigs = sortedColConfigs ? sortedColConfigs : ltmplConfig.columns;
|
|
@@ -293,7 +300,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
293
300
|
if (item.title === "序号") {
|
|
294
301
|
column["width"] = item.colWidth ? item.colWidth : 50;
|
|
295
302
|
column["title"] = translate("${序号}");
|
|
296
|
-
column["align"]=
|
|
303
|
+
column["align"] = "center";
|
|
297
304
|
//item.fixed='left';
|
|
298
305
|
column["render"] = (text, record, index) => <label>{index + 1}</label>;
|
|
299
306
|
item["sorter"] = undefined;
|
|
@@ -387,19 +394,25 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
387
394
|
) : (
|
|
388
395
|
""
|
|
389
396
|
)}
|
|
390
|
-
{builtInButtons?.includes("blockAuthMenuTree") &&
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
397
|
+
{builtInButtons?.includes("blockAuthMenuTree") && !readOnly ? (
|
|
398
|
+
<Button
|
|
399
|
+
size="small"
|
|
400
|
+
type="dashed"
|
|
401
|
+
icon={
|
|
402
|
+
<KeyOutlined
|
|
403
|
+
rotate={180}
|
|
404
|
+
style={{ color: "#f5222d", marginRight: "4px" }}
|
|
405
|
+
/>
|
|
406
|
+
}
|
|
407
|
+
onClick={() =>
|
|
408
|
+
this.setState({
|
|
409
|
+
blockMenuTreeDrawerOpen: true,
|
|
410
|
+
recordCode: record.code,
|
|
411
|
+
})
|
|
412
|
+
}
|
|
413
|
+
></Button>
|
|
401
414
|
) : (
|
|
402
|
-
|
|
415
|
+
""
|
|
403
416
|
)}
|
|
404
417
|
{(buttons.includes("dtmplCustomEdit") || customEditable) &&
|
|
405
418
|
doEdit &&
|
|
@@ -548,7 +561,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
548
561
|
column["title"] = translate("${" + item.title + "}");
|
|
549
562
|
column["width"] = item.colWidth ? item.colWidth : 160;
|
|
550
563
|
column["ellipsis"] = { showTitle: true };
|
|
551
|
-
column["align"]=item.valueAlign?item.valueAlign:"left";
|
|
564
|
+
column["align"] = item.valueAlign ? item.valueAlign : "left";
|
|
552
565
|
if (
|
|
553
566
|
ltmplConfig.leftFixedCols &&
|
|
554
567
|
ltmplConfig.leftFixedCols >= currentDataColIndex
|
|
@@ -921,7 +934,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
921
934
|
serverKey,
|
|
922
935
|
readOnly,
|
|
923
936
|
pageNo,
|
|
924
|
-
|
|
937
|
+
pageSize,
|
|
925
938
|
} = this.props;
|
|
926
939
|
const { translate } = this.context;
|
|
927
940
|
let { buttons } = ltmplConfig;
|
|
@@ -990,8 +1003,10 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
990
1003
|
<Popover
|
|
991
1004
|
content={
|
|
992
1005
|
<ExportFrame //导出组件
|
|
993
|
-
|
|
994
|
-
|
|
1006
|
+
currentPage={{
|
|
1007
|
+
pageNo: pageNo ? pageNo : 1,
|
|
1008
|
+
pageSize: pageSize ? pageSize : ltmplConfig.defaultPageSize,
|
|
1009
|
+
}}
|
|
995
1010
|
serverKey={serverKey}
|
|
996
1011
|
queryKey={queryKey}
|
|
997
1012
|
title={translate("${" + ltmplConfig.title + "}")}
|
|
@@ -1312,6 +1327,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1312
1327
|
? null
|
|
1313
1328
|
: ltmplConfig.subtotalYColumn
|
|
1314
1329
|
}
|
|
1330
|
+
groupIColumns={ltmplConfig.groupIColumns}
|
|
1315
1331
|
/>
|
|
1316
1332
|
)}
|
|
1317
1333
|
{/*此处放页脚*/}
|
|
@@ -1327,7 +1343,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1327
1343
|
};
|
|
1328
1344
|
|
|
1329
1345
|
render() {
|
|
1330
|
-
let { queryKey, loading,blockMenuTreeDrawerOpen,recordCode } = this.state;
|
|
1346
|
+
let { queryKey, loading, blockMenuTreeDrawerOpen, recordCode } = this.state;
|
|
1331
1347
|
let {
|
|
1332
1348
|
sourceId,
|
|
1333
1349
|
ltmplConfig,
|
|
@@ -1338,7 +1354,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1338
1354
|
} = this.props;
|
|
1339
1355
|
const { translate } = this.context;
|
|
1340
1356
|
|
|
1341
|
-
if (!ltmplConfig || !sourceId
|
|
1357
|
+
if (!ltmplConfig || !sourceId) {
|
|
1342
1358
|
return (
|
|
1343
1359
|
<>
|
|
1344
1360
|
<Card loading={loading}></Card>
|
|
@@ -1347,19 +1363,30 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1347
1363
|
);
|
|
1348
1364
|
}
|
|
1349
1365
|
|
|
1366
|
+
debugger
|
|
1350
1367
|
return (
|
|
1351
1368
|
<>
|
|
1352
1369
|
{" "}
|
|
1353
1370
|
{collapsible ? (
|
|
1354
1371
|
<CollapseCard
|
|
1355
1372
|
initCollapse={initCollapse}
|
|
1373
|
+
// title={
|
|
1374
|
+
// <>
|
|
1375
|
+
// {!title
|
|
1376
|
+
// ? translate("${" + ltmplConfig.title + "}")
|
|
1377
|
+
// : typeof title == "string"
|
|
1378
|
+
// ? translate("${" + title + "}")
|
|
1379
|
+
// : title}
|
|
1380
|
+
// title={
|
|
1381
|
+
// <>
|
|
1382
|
+
// <>{!title
|
|
1383
|
+
// ? ltmplConfig.title
|
|
1384
|
+
// : typeof title == "string"
|
|
1385
|
+
// ? title
|
|
1386
|
+
// : title}</>
|
|
1356
1387
|
title={
|
|
1357
|
-
<>
|
|
1358
|
-
|
|
1359
|
-
? translate("${" + ltmplConfig.title + "}")
|
|
1360
|
-
: typeof title == "string"
|
|
1361
|
-
? translate("${" + title + "}")
|
|
1362
|
-
: title}
|
|
1388
|
+
<>{!title?ltmplConfig.title
|
|
1389
|
+
: title}
|
|
1363
1390
|
<ToolTipBar
|
|
1364
1391
|
content={tip ? tip : ltmplConfig ? ltmplConfig.tip : null}
|
|
1365
1392
|
/>
|
|
@@ -1378,15 +1405,20 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1378
1405
|
) : (
|
|
1379
1406
|
<>{this.renderContent()}</>
|
|
1380
1407
|
)}
|
|
1381
|
-
<BlockMenuTreeDrawer
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1408
|
+
<BlockMenuTreeDrawer
|
|
1409
|
+
onOk={() => {
|
|
1410
|
+
this.setState({
|
|
1411
|
+
blockMenuTreeDrawerOpen: false,
|
|
1412
|
+
});
|
|
1413
|
+
}}
|
|
1414
|
+
onCancel={() => {
|
|
1415
|
+
this.setState({
|
|
1416
|
+
blockMenuTreeDrawerOpen: false,
|
|
1417
|
+
});
|
|
1418
|
+
}}
|
|
1419
|
+
open={blockMenuTreeDrawerOpen}
|
|
1420
|
+
roleCode={recordCode}
|
|
1421
|
+
/>
|
|
1390
1422
|
</>
|
|
1391
1423
|
);
|
|
1392
1424
|
}
|