aldehyde 0.2.350 → 0.2.352
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/direct-file-view/index.d.ts.map +1 -1
- package/lib/controls/direct-file-view/index.js +10 -3
- package/lib/controls/direct-file-view/index.js.map +1 -1
- package/lib/controls/file-view/index.d.ts.map +1 -1
- package/lib/controls/file-view/index.js +4 -7
- package/lib/controls/file-view/index.js.map +1 -1
- package/lib/custom-page/custom-detail-modal-page.d.ts +18 -0
- package/lib/custom-page/custom-detail-modal-page.d.ts.map +1 -0
- package/lib/custom-page/custom-detail-modal-page.js +21 -0
- package/lib/custom-page/custom-detail-modal-page.js.map +1 -0
- package/lib/layout3/css/main.css +23 -0
- package/lib/layout4/css/main.css +24 -0
- package/lib/list/card-list/card-list-item.d.ts +13 -0
- package/lib/list/card-list/card-list-item.d.ts.map +1 -0
- package/lib/list/card-list/card-list-item.js +80 -0
- package/lib/list/card-list/card-list-item.js.map +1 -0
- package/lib/list/card-list/index.css +144 -0
- package/lib/list/card-list/index.d.ts +13 -0
- package/lib/list/card-list/index.d.ts.map +1 -0
- package/lib/list/card-list/index.js +21 -0
- package/lib/list/card-list/index.js.map +1 -0
- package/lib/routable/ltmpl-route.d.ts +1 -0
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +11 -5
- 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 +9 -9
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-builder.js +1 -1
- package/lib/table/column/column-builder.js.map +1 -1
- package/lib/table/query-table.d.ts +1 -0
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +22 -26
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +2 -1
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/tmpl/interface.d.ts +27 -2
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/welcome/HCWelcome.js +3 -2
- package/lib/welcome/HCWelcome.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/direct-file-view/index.tsx +9 -3
- package/src/aldehyde/controls/file-view/index.tsx +30 -33
- package/src/aldehyde/custom-page/custom-detail-modal-page.tsx +52 -0
- package/src/aldehyde/layout3/css/main.css +23 -0
- package/src/aldehyde/layout4/css/main.css +24 -0
- package/src/aldehyde/list/card-list/card-list-item.tsx +111 -0
- package/src/aldehyde/list/card-list/index.css +144 -0
- package/src/aldehyde/list/card-list/index.tsx +37 -0
- package/src/aldehyde/routable/ltmpl-route.tsx +94 -97
- package/src/aldehyde/table/act-table.tsx +11 -7
- package/src/aldehyde/table/column/column-builder.tsx +1 -1
- package/src/aldehyde/table/query-table.tsx +138 -137
- package/src/aldehyde/tmpl/interface.tsx +29 -2
- package/src/aldehyde/welcome/HCWelcome.js +3 -2
|
@@ -14,10 +14,11 @@ import { arrayMoveImmutable } from "array-move";
|
|
|
14
14
|
import { LocaleContext } from "../locale/LocaleProvider";
|
|
15
15
|
import { init, merge, statistic } from "../utils/dsu";
|
|
16
16
|
import VerticalList from "../list/vertical-list";
|
|
17
|
+
import CardList from "../list/card-list";
|
|
17
18
|
import SummaryBuilder from "./column/summary-builder";
|
|
18
|
-
import {Button, Card, Descriptions, message, Statistic, Table} from "antd";
|
|
19
|
+
import { Button, Card, Descriptions, message, Statistic, Table } from "antd";
|
|
19
20
|
import Units from "../units";
|
|
20
|
-
import {DownOutlined, UpOutlined} from "@ant-design/icons";
|
|
21
|
+
import { DownOutlined, UpOutlined } from "@ant-design/icons";
|
|
21
22
|
import ResizableTable from "./resizable-table";
|
|
22
23
|
|
|
23
24
|
const SortableItem = SortableElement((props) => (
|
|
@@ -38,8 +39,8 @@ interface QueryTableStat {
|
|
|
38
39
|
loading?: boolean;
|
|
39
40
|
touchEnd?: boolean;
|
|
40
41
|
aggregateVO?: AggregateVO;
|
|
41
|
-
beforeSelectedRows?:number;
|
|
42
|
-
aggregateShowSize?:number;
|
|
42
|
+
beforeSelectedRows?: number;
|
|
43
|
+
aggregateShowSize?: number;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
@@ -58,11 +59,12 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
58
59
|
selectedRows: [],
|
|
59
60
|
viewModels: ["table"],
|
|
60
61
|
summaryConfigs: [],
|
|
61
|
-
rowTotalCols:4,
|
|
62
|
-
defaultShowTotalCols:7,
|
|
62
|
+
rowTotalCols: 4,
|
|
63
|
+
defaultShowTotalCols: 7,
|
|
64
|
+
cardListConfig: {}
|
|
63
65
|
};
|
|
64
66
|
|
|
65
|
-
defaultAggregateShowSize=7;
|
|
67
|
+
defaultAggregateShowSize = 7;
|
|
66
68
|
|
|
67
69
|
state = {
|
|
68
70
|
queryDataCache: undefined,
|
|
@@ -71,15 +73,15 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
71
73
|
loading: true,
|
|
72
74
|
touchEnd: undefined,
|
|
73
75
|
aggregateVO: undefined,
|
|
74
|
-
beforeSelectedRows:undefined,
|
|
75
|
-
aggregateShowSize:undefined,
|
|
76
|
+
beforeSelectedRows: undefined,
|
|
77
|
+
aggregateShowSize: undefined,
|
|
76
78
|
};
|
|
77
79
|
|
|
78
80
|
static contextType = LocaleContext;
|
|
79
81
|
context: React.ContextType<typeof LocaleContext>;
|
|
80
82
|
|
|
81
83
|
async componentDidMount() {
|
|
82
|
-
const { queryKey, pageInfo,defaultShowTotalCols,rowTotalCols } = this.props;
|
|
84
|
+
const { queryKey, pageInfo, defaultShowTotalCols, rowTotalCols } = this.props;
|
|
83
85
|
if (queryKey) {
|
|
84
86
|
await this.loadData(queryKey.key, pageInfo);
|
|
85
87
|
this.setState({
|
|
@@ -94,7 +96,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
94
96
|
|
|
95
97
|
async componentDidUpdate(prevProps) {
|
|
96
98
|
const { queryKey: preQueryKey, pageInfo: prePageInfo } = prevProps;
|
|
97
|
-
const { queryKey, pageInfo
|
|
99
|
+
const { queryKey, pageInfo, sourceId } = this.props;
|
|
98
100
|
|
|
99
101
|
if (queryKey) {
|
|
100
102
|
|
|
@@ -201,7 +203,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
201
203
|
pageInfo,
|
|
202
204
|
});
|
|
203
205
|
this.setState({
|
|
204
|
-
beforeSelectedRows:queryData.beforeSelectedRows,
|
|
206
|
+
beforeSelectedRows: queryData.beforeSelectedRows,
|
|
205
207
|
dataSource,
|
|
206
208
|
virtualEndPageNo: pageInfo.virtualEndPageNo,
|
|
207
209
|
queryDataCache: queryCache,
|
|
@@ -220,7 +222,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
220
222
|
|
|
221
223
|
pageTo = async (pageNo: number, pageSize: number) => {
|
|
222
224
|
const { onChangePage } = this.props;
|
|
223
|
-
|
|
225
|
+
// const { virtualEndPageNo } = this.state;
|
|
224
226
|
// let pageInfo = {
|
|
225
227
|
// pageNo,
|
|
226
228
|
// pageSize: pageSize ? pageSize : 10,
|
|
@@ -232,15 +234,15 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
232
234
|
};
|
|
233
235
|
|
|
234
236
|
queryTotal = async () => {
|
|
235
|
-
const { queryKey, serverKey,queryTotal } = this.props;
|
|
236
|
-
const {aggregateVO:stateAggregateVO}=this.state;
|
|
237
|
+
const { queryKey, serverKey, queryTotal } = this.props;
|
|
238
|
+
const { aggregateVO: stateAggregateVO } = this.state;
|
|
237
239
|
let aggregateVO;
|
|
238
|
-
if(stateAggregateVO && stateAggregateVO.queryKey==queryKey.key){
|
|
240
|
+
if (stateAggregateVO && stateAggregateVO.queryKey == queryKey.key) {
|
|
239
241
|
return false;
|
|
240
|
-
}else{
|
|
241
|
-
if(queryTotal){
|
|
242
|
-
aggregateVO= await queryTotal();
|
|
243
|
-
}else{
|
|
242
|
+
} else {
|
|
243
|
+
if (queryTotal) {
|
|
244
|
+
aggregateVO = await queryTotal();
|
|
245
|
+
} else {
|
|
244
246
|
aggregateVO = await HcserviceV3.requestQueryAggregates(serverKey, queryKey.key);
|
|
245
247
|
}
|
|
246
248
|
this.setState({
|
|
@@ -257,7 +259,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
257
259
|
maxSelectedRows,
|
|
258
260
|
primaryColumn,
|
|
259
261
|
} = this.props;
|
|
260
|
-
let { dataSource,beforeSelectedRows } = this.state;
|
|
262
|
+
let { dataSource, beforeSelectedRows } = this.state;
|
|
261
263
|
let selectedRowKeys = [];
|
|
262
264
|
|
|
263
265
|
for (let row of selectedRows) {
|
|
@@ -270,17 +272,17 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
270
272
|
}
|
|
271
273
|
}
|
|
272
274
|
|
|
273
|
-
let tmplMax=maxSelectedRows?maxSelectedRows:0;
|
|
274
|
-
if(beforeSelectedRows>0){
|
|
275
|
-
tmplMax=tmplMax-beforeSelectedRows;
|
|
275
|
+
let tmplMax = maxSelectedRows ? maxSelectedRows : 0;
|
|
276
|
+
if (beforeSelectedRows > 0) {
|
|
277
|
+
tmplMax = tmplMax - beforeSelectedRows;
|
|
276
278
|
}
|
|
277
279
|
const { translate } = this.context;
|
|
278
280
|
if (tmplMax <= -1) {
|
|
279
281
|
return null;
|
|
280
282
|
}
|
|
281
283
|
|
|
282
|
-
if (beforeSelectedRows>0 && tmplMax<=0) {
|
|
283
|
-
message.warning(translate("${已选超}")
|
|
284
|
+
if (beforeSelectedRows > 0 && tmplMax <= 0) {
|
|
285
|
+
message.warning(translate("${已选超}"));
|
|
284
286
|
return null;
|
|
285
287
|
}
|
|
286
288
|
|
|
@@ -290,8 +292,8 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
290
292
|
type: maxSelectedRows == 1 ? "radio" : "checkbox",
|
|
291
293
|
selectedRowKeys,
|
|
292
294
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
293
|
-
if(tmplMax > 0 && selectedRowKeys.length > tmplMax){
|
|
294
|
-
message.error(translate("${最多只能选择}") + " : "+ tmplMax);
|
|
295
|
+
if (tmplMax > 0 && selectedRowKeys.length > tmplMax) {
|
|
296
|
+
message.error(translate("${最多只能选择}") + " : " + tmplMax);
|
|
295
297
|
return;
|
|
296
298
|
}
|
|
297
299
|
let selectedRows_: SelectedRow[] = [];
|
|
@@ -341,17 +343,17 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
341
343
|
return { rowSpan: 0 };
|
|
342
344
|
// return {};
|
|
343
345
|
}
|
|
344
|
-
|
|
346
|
+
sort_serial_number = new Date().getTime();
|
|
345
347
|
|
|
346
348
|
onChange(pagination, filters, sorter, extra) {
|
|
347
349
|
console.log("params", pagination, filters, sorter, extra);
|
|
348
350
|
if (extra.action === "sort") {
|
|
349
351
|
let new_sort_serial_number = new Date().getTime();
|
|
350
|
-
if(new_sort_serial_number - this.sort_serial_number < 2000){
|
|
352
|
+
if (new_sort_serial_number - this.sort_serial_number < 2000) {
|
|
351
353
|
const { translate } = this.context;
|
|
352
354
|
message.warning(translate("${系统忙,请稍后再试}"));
|
|
353
355
|
return;
|
|
354
|
-
}else{
|
|
356
|
+
} else {
|
|
355
357
|
this.sort_serial_number = new_sort_serial_number;
|
|
356
358
|
}
|
|
357
359
|
|
|
@@ -361,11 +363,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
361
363
|
);
|
|
362
364
|
if (sorter.order === "ascend") {
|
|
363
365
|
Object.assign(extParams, {
|
|
364
|
-
sortColIds: [
|
|
366
|
+
sortColIds: [sorter.field + "_" + "asc"],
|
|
365
367
|
});
|
|
366
368
|
} else if (sorter.order === "descend") {
|
|
367
369
|
Object.assign(extParams, {
|
|
368
|
-
sortColIds: [
|
|
370
|
+
sortColIds: [sorter.field + "_" + "desc"],
|
|
369
371
|
});
|
|
370
372
|
} else {
|
|
371
373
|
Object.assign(extParams, {
|
|
@@ -378,7 +380,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
378
380
|
|
|
379
381
|
render() {
|
|
380
382
|
const {
|
|
381
|
-
pageInfo,queryKey,
|
|
383
|
+
pageInfo, queryKey,
|
|
382
384
|
columns,
|
|
383
385
|
viewModels,
|
|
384
386
|
summaryConfigs,
|
|
@@ -386,42 +388,30 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
386
388
|
tableProps,
|
|
387
389
|
groupIColumns,
|
|
388
390
|
hiddenRowCodes,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
+
columnConfigs,
|
|
392
|
+
serverKey, rowTotalCols,
|
|
393
|
+
cardListConfig
|
|
391
394
|
} = this.props;
|
|
392
395
|
//debugger
|
|
393
|
-
const { touchEnd, aggregateVO, loading, virtualEndPageNo,dataSource,aggregateShowSize } = this.state;
|
|
394
|
-
|
|
395
|
-
const isProSumarryTable = Boolean(subtotalXColumn );
|
|
396
|
+
const { touchEnd, aggregateVO, loading, virtualEndPageNo, dataSource, aggregateShowSize } = this.state;
|
|
397
|
+
const isProSumarryTable = Boolean(subtotalXColumn);
|
|
396
398
|
const { translate } = this.context;
|
|
397
399
|
const {
|
|
398
400
|
proSummaryTableColumns,
|
|
399
401
|
proSummaryTableData,
|
|
400
|
-
} =SummaryBuilder.handleProSummaryTable({
|
|
401
|
-
|
|
402
|
-
translate,groupIColumns
|
|
403
|
-
});
|
|
404
|
-
|
|
405
|
-
let current_cols = isProSumarryTable
|
|
406
|
-
? proSummaryTableColumns
|
|
407
|
-
: columns
|
|
408
|
-
? columns
|
|
409
|
-
: [];
|
|
410
|
-
console.log(current_cols);
|
|
402
|
+
} = SummaryBuilder.handleProSummaryTable({ subtotalXColumn, columns, data: this.getUnHidenDataSource(), translate, groupIColumns });
|
|
403
|
+
let current_cols = isProSumarryTable ? proSummaryTableColumns : columns ? columns : [];
|
|
411
404
|
let table_x = 20;
|
|
412
|
-
current_cols.forEach((c) => {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
let
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
return SummaryBuilder.summary({translate,summaryConfigs,
|
|
423
|
-
pageData: dat,columns,
|
|
424
|
-
rowSelection:this.getRowSelection(),groupIColumns});
|
|
405
|
+
current_cols.forEach((c) => { table_x = table_x + (c.width ? c.width : 140); });
|
|
406
|
+
let dat = this.getUnHidenDataSource();
|
|
407
|
+
const originData = isProSumarryTable ? proSummaryTableData : dat;
|
|
408
|
+
|
|
409
|
+
let summary = (pageData1) => {
|
|
410
|
+
return SummaryBuilder.summary({
|
|
411
|
+
translate, summaryConfigs,
|
|
412
|
+
pageData: dat, columns,
|
|
413
|
+
rowSelection: this.getRowSelection(), groupIColumns
|
|
414
|
+
});
|
|
425
415
|
}
|
|
426
416
|
|
|
427
417
|
console.log("%crender data: ", "color: red", originData);
|
|
@@ -429,11 +419,9 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
429
419
|
|
|
430
420
|
const washOriginData = originData.map((i, idx) => {
|
|
431
421
|
const data = {};
|
|
432
|
-
|
|
433
422
|
current_cols.forEach((col) => {
|
|
434
423
|
data[col["dataIndex"]] = i[col["dataIndex"]];
|
|
435
424
|
});
|
|
436
|
-
|
|
437
425
|
data["1"] = idx;
|
|
438
426
|
return data;
|
|
439
427
|
});
|
|
@@ -489,59 +477,61 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
489
477
|
// 给 col 添加 mergeRowInCol
|
|
490
478
|
current_cols.forEach(
|
|
491
479
|
(col, colIdx) =>
|
|
492
|
-
|
|
493
|
-
|
|
480
|
+
(col.onCell = (_, rowIdx) =>
|
|
481
|
+
this.mergeRowInCol(_, rowIdx, colIdx, mergeMp, current_cols.length))
|
|
494
482
|
);
|
|
495
|
-
|
|
496
|
-
if(aggregateVO && aggregateVO.aggregates
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
if(aggregateItems.length==aggregateShowSize){
|
|
500
|
-
aggregateItems.push({
|
|
501
|
-
|
|
502
|
-
|
|
483
|
+
let aggregateItems = [];
|
|
484
|
+
if (aggregateVO && aggregateVO.aggregates) {
|
|
485
|
+
if (aggregateShowSize < aggregateVO.aggregates.length) {
|
|
486
|
+
aggregateVO.aggregates.forEach(av => {
|
|
487
|
+
if (aggregateItems.length == aggregateShowSize) {
|
|
488
|
+
aggregateItems.push({
|
|
489
|
+
key: "opt",
|
|
490
|
+
label: <Button icon={<DownOutlined />} type={'link'} onClick={() => {
|
|
491
|
+
this.setState({ aggregateShowSize: aggregateVO.aggregates.length })
|
|
503
492
|
}}>{translate("${展开}")}</Button>,
|
|
504
493
|
children: null
|
|
505
494
|
// <div style={{fontSize:24}}>{av.value}</div>
|
|
506
495
|
})
|
|
507
|
-
}else if(aggregateItems.length<aggregateShowSize){
|
|
508
|
-
aggregateItems.push({key: av.fieldId,
|
|
509
|
-
label: <div style={{fontSize:14}}>{translate("${"+av.fieldTitle+"}") }</div>,
|
|
510
|
-
children: <Statistic valueStyle={{fontSize:16}} value={av.value?av.value:0} />
|
|
511
|
-
// <div style={{fontSize:24}}>{av.value}</div>
|
|
512
|
-
})
|
|
513
|
-
}
|
|
514
|
-
})
|
|
515
|
-
}else{
|
|
516
|
-
aggregateVO.aggregates.forEach(av=> {
|
|
496
|
+
} else if (aggregateItems.length < aggregateShowSize) {
|
|
517
497
|
aggregateItems.push({
|
|
518
498
|
key: av.fieldId,
|
|
519
|
-
label: <div style={{fontSize: 14}}>{translate("${"+av.fieldTitle+"}")
|
|
520
|
-
children: <Statistic valueStyle={{fontSize:16}}
|
|
521
|
-
})
|
|
522
|
-
});
|
|
523
|
-
if(this.defaultAggregateShowSize < aggregateVO.aggregates.length){
|
|
524
|
-
aggregateItems.push({key: "opt",
|
|
525
|
-
label: <Button icon={<UpOutlined />} type={'link'} onClick={()=>{
|
|
526
|
-
this.setState({aggregateShowSize:this.defaultAggregateShowSize})
|
|
527
|
-
}}>{translate("${收起}")}</Button>,
|
|
528
|
-
children: null
|
|
499
|
+
label: <div style={{ fontSize: 14 }}>{translate("${" + av.fieldTitle + "}")}</div>,
|
|
500
|
+
children: <Statistic valueStyle={{ fontSize: 16 }} value={av.value ? av.value : 0} />
|
|
529
501
|
// <div style={{fontSize:24}}>{av.value}</div>
|
|
530
502
|
})
|
|
531
503
|
}
|
|
504
|
+
})
|
|
505
|
+
} else {
|
|
506
|
+
aggregateVO.aggregates.forEach(av => {
|
|
507
|
+
aggregateItems.push({
|
|
508
|
+
key: av.fieldId,
|
|
509
|
+
label: <div style={{ fontSize: 14 }}>{translate("${" + av.fieldTitle + "}")}</div>,
|
|
510
|
+
children: <Statistic valueStyle={{ fontSize: 16 }} value={av.value ? av.value : 0} />
|
|
511
|
+
})
|
|
512
|
+
});
|
|
513
|
+
if (this.defaultAggregateShowSize < aggregateVO.aggregates.length) {
|
|
514
|
+
aggregateItems.push({
|
|
515
|
+
key: "opt",
|
|
516
|
+
label: <Button icon={<UpOutlined />} type={'link'} onClick={() => {
|
|
517
|
+
this.setState({ aggregateShowSize: this.defaultAggregateShowSize })
|
|
518
|
+
}}>{translate("${收起}")}</Button>,
|
|
519
|
+
children: null
|
|
520
|
+
// <div style={{fontSize:24}}>{av.value}</div>
|
|
521
|
+
})
|
|
532
522
|
}
|
|
533
|
-
|
|
523
|
+
}
|
|
534
524
|
}
|
|
535
525
|
|
|
536
526
|
return (
|
|
537
527
|
<>
|
|
538
|
-
{aggregateVO && aggregateVO.aggregates && aggregateVO.aggregates.length>0 ?
|
|
539
|
-
|
|
540
|
-
|
|
528
|
+
{aggregateVO && aggregateVO.aggregates && aggregateVO.aggregates.length > 0 ?
|
|
529
|
+
<Card variant="borderless" styles={{ body: { paddingLeft: 10, paddingTop: 4, paddingBottom: 4, paddingRight: 10 } }}>
|
|
530
|
+
<Descriptions
|
|
541
531
|
column={rowTotalCols} colon={false}
|
|
542
532
|
items={aggregateItems}
|
|
543
|
-
|
|
544
|
-
|
|
533
|
+
/>
|
|
534
|
+
</Card> : null}
|
|
545
535
|
{/*{viewModels.includes("table") ? (*/}
|
|
546
536
|
{/* <Table*/}
|
|
547
537
|
{/* size={tableProps.size ? tableProps.size : undefined}*/}
|
|
@@ -573,51 +563,62 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
573
563
|
{/* ""*/}
|
|
574
564
|
{/*)}*/}
|
|
575
565
|
{viewModels.includes("table") ? (
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}
|
|
566
|
+
<ResizableTable
|
|
567
|
+
size={tableProps.size ? tableProps.size : undefined}
|
|
568
|
+
rowSelection={this.getRowSelection()}
|
|
569
|
+
columns={current_cols}
|
|
570
|
+
dataSource={originData}
|
|
571
|
+
scroll={
|
|
572
|
+
tableProps.scrollY == -1 || tableProps.scrollY == 0
|
|
573
|
+
? null
|
|
574
|
+
: {
|
|
575
|
+
y: tableProps.scrollY,
|
|
576
|
+
x: table_x,
|
|
588
577
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
578
|
+
}
|
|
579
|
+
bordered
|
|
580
|
+
pagination={false}
|
|
581
|
+
style={{ display: columns ? "block" : "none" }}
|
|
582
|
+
summary={summary}
|
|
583
|
+
loading={loading}
|
|
584
|
+
components={{
|
|
585
|
+
body: {
|
|
586
|
+
wrapper: this.DraggableContainer,
|
|
587
|
+
row: this.DraggableBodyRow,
|
|
588
|
+
},
|
|
589
|
+
}}
|
|
590
|
+
onChange={this.onChange.bind(this)}
|
|
591
|
+
/>
|
|
602
592
|
) : (
|
|
603
|
-
|
|
593
|
+
""
|
|
604
594
|
)}
|
|
605
|
-
|
|
595
|
+
{viewModels.includes("verticalList") ? (
|
|
596
|
+
<VerticalList hiddenRowCodes={hiddenRowCodes}
|
|
597
|
+
dataSource={dataSource}
|
|
598
|
+
columnConfigs={columnConfigs}
|
|
599
|
+
serverKey={serverKey}
|
|
600
|
+
columns={columns} />
|
|
601
|
+
) : (
|
|
602
|
+
""
|
|
603
|
+
)}
|
|
604
|
+
{/* showType */}
|
|
605
|
+
{viewModels.includes("cardList") ? (
|
|
606
|
+
<CardList
|
|
607
|
+
cardListConfig={cardListConfig}
|
|
608
|
+
columns={columns}
|
|
609
|
+
dataSource={dataSource}
|
|
610
|
+
sourceId={this.props.sourceId}
|
|
611
|
+
/>
|
|
612
|
+
) : (
|
|
613
|
+
""
|
|
614
|
+
)}
|
|
615
|
+
<Pagination key={queryKey ? queryKey.key : Units.getReactKey()}
|
|
606
616
|
touchEnd={touchEnd}
|
|
607
617
|
pageInfo={{ ...pageInfo, virtualEndPageNo }}
|
|
608
618
|
pageTo={this.pageTo}
|
|
609
619
|
queryTotal={this.queryTotal}
|
|
610
620
|
total={aggregateVO?.count}
|
|
611
621
|
/>
|
|
612
|
-
{viewModels.includes("verticalList") ? (
|
|
613
|
-
<VerticalList hiddenRowCodes={hiddenRowCodes}
|
|
614
|
-
dataSource={dataSource}
|
|
615
|
-
columnConfigs={columnConfigs}
|
|
616
|
-
serverKey={serverKey}
|
|
617
|
-
columns={columns}/>
|
|
618
|
-
) : (
|
|
619
|
-
""
|
|
620
|
-
)}
|
|
621
622
|
</>
|
|
622
623
|
);
|
|
623
624
|
}
|
|
@@ -13,7 +13,7 @@ export type BeforeExeConfirm = "default" | "danger" | "none";
|
|
|
13
13
|
|
|
14
14
|
export type StatColType = "fact" | "dimension";
|
|
15
15
|
|
|
16
|
-
export type ActTableViewModel = "table" | "verticalList" | "horizontalList";
|
|
16
|
+
export type ActTableViewModel = "table" | "verticalList" | "horizontalList" | "cardList";
|
|
17
17
|
|
|
18
18
|
export type ControlHolderType = "table" | "descriptions";
|
|
19
19
|
|
|
@@ -47,6 +47,22 @@ export interface ReportTableProps {
|
|
|
47
47
|
) => void;
|
|
48
48
|
queryKey: QueryKey;
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
export interface CardListConfig {
|
|
52
|
+
primaryColumn?: ColumnConfig;
|
|
53
|
+
primaryColumnLabel?: ColumnConfig;
|
|
54
|
+
secondColumn?: ColumnConfig;
|
|
55
|
+
secondColumnLabel?: ColumnConfig;
|
|
56
|
+
mainPicture?: ColumnConfig;
|
|
57
|
+
mainPictureLabel?: ColumnConfig;
|
|
58
|
+
labelColumn?: ColumnConfig;
|
|
59
|
+
cardShowCols?: ColumnConfig[];
|
|
60
|
+
rowCardCount?: number;
|
|
61
|
+
buttons?: string[];
|
|
62
|
+
customViewPagePath?: string;
|
|
63
|
+
mainCode?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
50
66
|
export interface QueryTableProps extends ReportTableProps {
|
|
51
67
|
viewModels?: ActTableViewModel[];
|
|
52
68
|
pageInfo: {
|
|
@@ -70,6 +86,7 @@ export interface QueryTableProps extends ReportTableProps {
|
|
|
70
86
|
queryTotal?: () => any;//暂时无用
|
|
71
87
|
defaultShowTotalCols?: number;
|
|
72
88
|
rowTotalCols?: number;
|
|
89
|
+
cardListConfig?: CardListConfig;
|
|
73
90
|
}
|
|
74
91
|
|
|
75
92
|
export interface AggregateVO {
|
|
@@ -328,7 +345,7 @@ export interface FieldGroupConfig extends OrderableTmplBase {
|
|
|
328
345
|
classAddConfigs?: ClassAddConfig[];
|
|
329
346
|
defaultCriteriaValue?: object;
|
|
330
347
|
deleteData?: boolean;
|
|
331
|
-
viewModel?: "table" | "verticalList";
|
|
348
|
+
viewModel?: "table" | "verticalList" | "cardList";
|
|
332
349
|
addOrEditType?: "singleCol" | "doubleCol" | "tableRow";
|
|
333
350
|
batchAddFileField?: FieldConfig;
|
|
334
351
|
addRowPosition?: "begin" | "end";
|
|
@@ -418,6 +435,7 @@ export interface FieldConfig extends FieldBase {
|
|
|
418
435
|
colWidth?: number;
|
|
419
436
|
exceptCodes?: string[];
|
|
420
437
|
relDeduplication?: boolean;
|
|
438
|
+
preview?: boolean; // 图片组件预览配置
|
|
421
439
|
}
|
|
422
440
|
|
|
423
441
|
export interface ActionRenderProps {
|
|
@@ -557,6 +575,15 @@ export interface LtmplConfig extends SelectConfig {
|
|
|
557
575
|
displayTotal?: boolean;
|
|
558
576
|
rowTotalCols?: number;
|
|
559
577
|
defaultShowTotalCols?: number;
|
|
578
|
+
showType?: "table" | "verticalList" | "cardList";
|
|
579
|
+
primaryColumnLabel?: ColumnConfig;
|
|
580
|
+
secondColumn?: ColumnConfig;
|
|
581
|
+
secondColumnLabel?: ColumnConfig;
|
|
582
|
+
mainPicture?: ColumnConfig;
|
|
583
|
+
mainPictureLabel?: ColumnConfig;
|
|
584
|
+
labelColumn?: ColumnConfig;
|
|
585
|
+
cardShowCols?: ColumnConfig[];
|
|
586
|
+
rowCardCount?: number;
|
|
560
587
|
}
|
|
561
588
|
|
|
562
589
|
export interface EnumItem {
|
|
@@ -276,7 +276,8 @@ import { useParams } from "react-router-dom";
|
|
|
276
276
|
// }
|
|
277
277
|
// }
|
|
278
278
|
|
|
279
|
-
const HCWelcome = () => {
|
|
279
|
+
const HCWelcome = (props) => {
|
|
280
|
+
const { layoutRootPath } = props;
|
|
280
281
|
const { programCode } = useParams();
|
|
281
282
|
if (programCode) Units.setProgramCode(programCode);
|
|
282
283
|
|
|
@@ -308,7 +309,7 @@ const HCWelcome = () => {
|
|
|
308
309
|
<QuickEntrance></QuickEntrance>
|
|
309
310
|
</div>
|
|
310
311
|
</div>
|
|
311
|
-
<img src={WelcomeBg} alt="" width="100%" height="100%" />
|
|
312
|
+
{["v2", "v5"].includes(layoutRootPath) ? <img src={WelcomeBg} alt="" width="100%" height="100%" /> : ""}
|
|
312
313
|
</>
|
|
313
314
|
);
|
|
314
315
|
};
|