aldehyde 0.2.126 → 0.2.128
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/action/utils.js +1 -1
- package/lib/controls/action/utils.js.map +1 -1
- package/lib/controls/entity-select/entity-select.d.ts +2 -0
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +34 -12
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js +3 -0
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/controls/password-setter/index.js +1 -1
- package/lib/controls/password-setter/index.js.map +1 -1
- package/lib/controls/rfield/index.d.ts +1 -1
- package/lib/controls/rfield/index.d.ts.map +1 -1
- package/lib/controls/rfield/index.js +5 -2
- package/lib/controls/rfield/index.js.map +1 -1
- package/lib/controls/text/ellipsis-text.d.ts +1 -3
- package/lib/controls/text/ellipsis-text.d.ts.map +1 -1
- package/lib/controls/text/ellipsis-text.js +10 -12
- package/lib/controls/text/ellipsis-text.js.map +1 -1
- package/lib/controls/upload/index.js +1 -1
- package/lib/controls/upload/index.js.map +1 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +126 -121
- package/lib/controls/view-control.js.map +1 -1
- package/lib/form/criteria-form.d.ts.map +1 -1
- package/lib/form/criteria-form.js +12 -19
- 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/import/excel-import.js +1 -1
- package/lib/import/excel-import.js.map +1 -1
- package/lib/layout/MainPage.js +1 -1
- package/lib/layout/MainPage.js.map +1 -1
- package/lib/layout/header/index.d.ts.map +1 -1
- package/lib/layout/header/index.js +5 -1
- package/lib/layout/header/index.js.map +1 -1
- package/lib/layout/menu/menu-render.d.ts.map +1 -1
- package/lib/layout/menu/menu-render.js +1 -1
- package/lib/layout/menu/menu-render.js.map +1 -1
- package/lib/login/context-setter.d.ts.map +1 -1
- package/lib/login/context-setter.js +5 -2
- package/lib/login/context-setter.js.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +24 -2
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/query-table.d.ts +10 -0
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +68 -27
- package/lib/table/query-table.js.map +1 -1
- package/lib/tmpl/control-type-supportor.d.ts.map +1 -1
- package/lib/tmpl/control-type-supportor.js +1 -0
- package/lib/tmpl/control-type-supportor.js.map +1 -1
- package/lib/tmpl/hcservice-v3.js +7 -7
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +4 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/model-struc-v3.js +5 -5
- package/lib/tmpl/model-struc-v3.js.map +1 -1
- package/lib/tmpl/superagent.js +2 -2
- package/lib/tmpl/superagent.js.map +1 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/utils.tsx +1 -1
- package/src/aldehyde/controls/entity-select/entity-select.tsx +36 -13
- package/src/aldehyde/controls/entry-control.tsx +9 -0
- package/src/aldehyde/controls/password-setter/index.js +1 -1
- package/src/aldehyde/controls/rfield/index.tsx +9 -2
- package/src/aldehyde/controls/text/ellipsis-text.tsx +13 -13
- package/src/aldehyde/controls/upload/index.tsx +1 -1
- package/src/aldehyde/controls/view-control.tsx +144 -142
- package/src/aldehyde/form/criteria-form.tsx +57 -65
- package/src/aldehyde/form/form-Item-group.tsx +1 -1
- package/src/aldehyde/import/excel-import.tsx +1 -1
- package/src/aldehyde/layout/MainPage.tsx +3 -3
- package/src/aldehyde/layout/header/index.tsx +5 -1
- package/src/aldehyde/layout/menu/menu-render.tsx +1 -11
- package/src/aldehyde/login/context-setter.tsx +6 -3
- package/src/aldehyde/table/act-table.tsx +26 -3
- package/src/aldehyde/table/query-table.tsx +80 -28
- package/src/aldehyde/tmpl/control-type-supportor.tsx +1 -0
- package/src/aldehyde/tmpl/hcservice-v3.tsx +7 -7
- package/src/aldehyde/tmpl/interface.tsx +4 -0
- package/src/aldehyde/tmpl/model-struc-v3.tsx +5 -5
- package/src/aldehyde/tmpl/superagent.js +2 -2
- package/src/aldehyde/units/index.tsx +1 -0
|
@@ -262,6 +262,8 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
262
262
|
let s = 0;
|
|
263
263
|
let colConfigs = sortedColConfigs ? sortedColConfigs : ltmplConfig.columns;
|
|
264
264
|
|
|
265
|
+
let currentDataColIndex = 0;
|
|
266
|
+
|
|
265
267
|
colConfigs.forEach((item) => {
|
|
266
268
|
let column = {};
|
|
267
269
|
if (!hiddenColIds || !hiddenColIds.includes(item.id)) {
|
|
@@ -272,6 +274,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
272
274
|
if (item["colWidth"]) column["width"] = item["colWidth"];
|
|
273
275
|
if (item["statColType"]) column["statColType"] = item["statColType"];
|
|
274
276
|
if (item["aggFunc"]) column["cal"] = item["aggFunc"];
|
|
277
|
+
if (item["order"]) column["order"] = Number(item["order"]);
|
|
275
278
|
// column['ellipsis']= true;
|
|
276
279
|
s++;
|
|
277
280
|
let itemType = SupportInputTypes.getSupportControlType(item);
|
|
@@ -283,6 +286,8 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
283
286
|
//特殊列处理
|
|
284
287
|
//序号
|
|
285
288
|
if (item.title === "序号") {
|
|
289
|
+
column["width"] = item.colWidth ? item.colWidth : 50;
|
|
290
|
+
column["title"] = translate("${序号}");
|
|
286
291
|
//item.fixed='left';
|
|
287
292
|
column["render"] = (text, record, index) => <label>{index + 1}</label>;
|
|
288
293
|
item["sorter"] = undefined;
|
|
@@ -299,7 +304,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
299
304
|
} else if (item.id == "20000") {
|
|
300
305
|
//隐藏
|
|
301
306
|
column["align"] = "center";
|
|
302
|
-
column["width"] =
|
|
307
|
+
column["width"] = 40;
|
|
303
308
|
column["title"] = (
|
|
304
309
|
<>
|
|
305
310
|
{hiddenRowCodes.length > 0 ? (
|
|
@@ -333,6 +338,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
333
338
|
} else if (item.title === "操作") {
|
|
334
339
|
column["fixed"] = "right";
|
|
335
340
|
column["align"] = "center";
|
|
341
|
+
column["width"] = item.colWidth ? item.colWidth : 160;
|
|
336
342
|
column["className"] = "opsColumn";
|
|
337
343
|
column["title"] = <>{translate("${操作}")}</>;
|
|
338
344
|
column["render"] = (text, record) => (
|
|
@@ -517,8 +523,24 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
517
523
|
</Space>
|
|
518
524
|
);
|
|
519
525
|
} else {
|
|
526
|
+
currentDataColIndex++;
|
|
520
527
|
column["className"] = "opsColumn";
|
|
521
528
|
column["title"] = translate("${" + item.title + "}");
|
|
529
|
+
column["width"] = item.colWidth ? item.colWidth : 160;
|
|
530
|
+
column["ellipsis"] = { showTitle: true };
|
|
531
|
+
column["align"]=item.valueAlign?item.valueAlign:"left";
|
|
532
|
+
if (
|
|
533
|
+
ltmplConfig.leftFixedCols &&
|
|
534
|
+
ltmplConfig.leftFixedCols >= currentDataColIndex
|
|
535
|
+
) {
|
|
536
|
+
column["fixed"] = "left";
|
|
537
|
+
} else {
|
|
538
|
+
column["fixed"] = item.colFixed
|
|
539
|
+
? item.colFixed == "right"
|
|
540
|
+
? "right"
|
|
541
|
+
: "left"
|
|
542
|
+
: false;
|
|
543
|
+
}
|
|
522
544
|
column["render"] = (text, record) => {
|
|
523
545
|
return (
|
|
524
546
|
<ViewControl
|
|
@@ -1081,9 +1103,10 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1081
1103
|
|
|
1082
1104
|
criteriaFormUseful = () => {
|
|
1083
1105
|
const { ltmplConfig } = this.props;
|
|
1084
|
-
let { buttons, criterias,updrillButtonConfigs } = ltmplConfig;
|
|
1106
|
+
let { buttons, criterias, updrillButtonConfigs } = ltmplConfig;
|
|
1085
1107
|
if (
|
|
1086
|
-
((buttons.includes("query") ||
|
|
1108
|
+
((buttons.includes("query") ||
|
|
1109
|
+
(updrillButtonConfigs && updrillButtonConfigs.length > 0)) &&
|
|
1087
1110
|
((criterias && criterias.length > 0) ||
|
|
1088
1111
|
buttons.includes("drilling"))) ||
|
|
1089
1112
|
this.checkBoxUseful()
|
|
@@ -21,6 +21,7 @@ import ViewControl from "../controls/view-control";
|
|
|
21
21
|
import Scrollbars from "react-custom-scrollbars";
|
|
22
22
|
import { LocaleContext } from "../locale/LocaleProvider";
|
|
23
23
|
import { BigNumber } from "bignumber.js";
|
|
24
|
+
import Column from "antd/es/table/Column";
|
|
24
25
|
const { Panel } = Collapse;
|
|
25
26
|
const SortableItem = SortableElement((props) => <tr {...props} />);
|
|
26
27
|
const SortableBody = SortableContainer((props) => <tbody {...props} />);
|
|
@@ -37,6 +38,11 @@ interface QueryTableProps {
|
|
|
37
38
|
pageNo: number;
|
|
38
39
|
pageSize: number;
|
|
39
40
|
};
|
|
41
|
+
tableProps?: {
|
|
42
|
+
size?: "small" | "middle" | "large";
|
|
43
|
+
clickDisplayTotal?: boolean;
|
|
44
|
+
scrollY?: number;
|
|
45
|
+
};
|
|
40
46
|
primaryColumn?: ColumnConfig;
|
|
41
47
|
columns: any[];
|
|
42
48
|
serverKey?: string;
|
|
@@ -73,6 +79,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
73
79
|
pageSize: 10,
|
|
74
80
|
virtualEndPageNo: undefined,
|
|
75
81
|
},
|
|
82
|
+
tableProps: {
|
|
83
|
+
size: "small",
|
|
84
|
+
clickDisplayTotal: false,
|
|
85
|
+
scrollY: 500,
|
|
86
|
+
},
|
|
76
87
|
hiddenRowCodes: [],
|
|
77
88
|
selectedRows: [],
|
|
78
89
|
viewModels: ["table"],
|
|
@@ -168,7 +179,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
168
179
|
});
|
|
169
180
|
let { queryDataCache } = this.state;
|
|
170
181
|
|
|
171
|
-
let { serverKey } = this.props;
|
|
182
|
+
let { serverKey, tableProps } = this.props;
|
|
172
183
|
let queryCache: Map<string, CacheData>;
|
|
173
184
|
if (cleanCache || !queryDataCache) {
|
|
174
185
|
queryCache = new Map<string, CacheData>();
|
|
@@ -213,6 +224,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
213
224
|
touchEnd,
|
|
214
225
|
loading: false,
|
|
215
226
|
});
|
|
227
|
+
|
|
228
|
+
if (!tableProps.clickDisplayTotal) {
|
|
229
|
+
await this.queryTotal();
|
|
230
|
+
}
|
|
231
|
+
// }
|
|
216
232
|
}
|
|
217
233
|
};
|
|
218
234
|
|
|
@@ -349,7 +365,6 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
349
365
|
getTableSummaryNumberValue(value: "" | string[]) {
|
|
350
366
|
if (value === undefined || value === null) return 0;
|
|
351
367
|
if (typeof value === "string") return Number(value);
|
|
352
|
-
|
|
353
368
|
return Number(value[0].split("@R@")[1]);
|
|
354
369
|
}
|
|
355
370
|
|
|
@@ -442,8 +457,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
442
457
|
const columns = _columns;
|
|
443
458
|
for (const d of data) {
|
|
444
459
|
for (const [k, v] of Object.entries(d)) {
|
|
445
|
-
if (
|
|
460
|
+
if (v == null || v == "null") {
|
|
461
|
+
d[k] = "";
|
|
462
|
+
} else if (typeof v === "string" && (v as string)?.includes("@R@")) {
|
|
446
463
|
d[k] = (v as string).split("@R@")[1];
|
|
464
|
+
}
|
|
447
465
|
}
|
|
448
466
|
}
|
|
449
467
|
|
|
@@ -457,7 +475,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
457
475
|
colIdToNameMp[col["dataIndex"]] = col["title"];
|
|
458
476
|
colNameToIdMp[col["title"]] = col["dataIndex"];
|
|
459
477
|
if (col.statColType !== undefined)
|
|
460
|
-
colMp[col.statColType].push(
|
|
478
|
+
colMp[col.statColType].push(this.deepClone(col));
|
|
461
479
|
}
|
|
462
480
|
console.log("colIdToNameMp", colIdToNameMp);
|
|
463
481
|
console.log("colNameToIdMp", colNameToIdMp);
|
|
@@ -480,9 +498,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
480
498
|
}
|
|
481
499
|
console.log("canReadData", canReadData);
|
|
482
500
|
|
|
483
|
-
let proSummaryTableColumns = [
|
|
484
|
-
...JSON.parse(JSON.stringify(colMp.dimension)),
|
|
485
|
-
],
|
|
501
|
+
let proSummaryTableColumns = [...this.deepClone(colMp.dimension)],
|
|
486
502
|
proSummaryTableData = [],
|
|
487
503
|
excludeGroupSumData = [];
|
|
488
504
|
|
|
@@ -508,9 +524,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
508
524
|
const tnode = {
|
|
509
525
|
title: k,
|
|
510
526
|
_type: v,
|
|
511
|
-
children: [
|
|
512
|
-
...JSON.parse(JSON.stringify(i === 0 ? colMp.fact : tnodes)),
|
|
513
|
-
],
|
|
527
|
+
children: [...this.deepClone(i === 0 ? colMp.fact : tnodes)],
|
|
514
528
|
};
|
|
515
529
|
_tnodes.push(tnode);
|
|
516
530
|
}
|
|
@@ -520,7 +534,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
520
534
|
|
|
521
535
|
const sumCol = {
|
|
522
536
|
title: calTxt,
|
|
523
|
-
children: [...
|
|
537
|
+
children: [...this.deepClone(colMp.fact)],
|
|
524
538
|
TYPE: cal,
|
|
525
539
|
};
|
|
526
540
|
this.buildColTag([sumCol]);
|
|
@@ -595,7 +609,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
595
609
|
cal
|
|
596
610
|
);
|
|
597
611
|
|
|
598
|
-
excludeGroupSumData =
|
|
612
|
+
excludeGroupSumData = this.deepClone(proSummaryTableData);
|
|
599
613
|
console.log("excludeGroupSumData", excludeGroupSumData);
|
|
600
614
|
|
|
601
615
|
if (
|
|
@@ -623,6 +637,18 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
623
637
|
);
|
|
624
638
|
}
|
|
625
639
|
|
|
640
|
+
// 序号
|
|
641
|
+
if (columns[0].title === "序号") {
|
|
642
|
+
const col: any = { dataIndex: "序号", title: "序号", width: 160 };
|
|
643
|
+
if (columns[0].colWidth) {
|
|
644
|
+
col.width = columns[0].colWidth;
|
|
645
|
+
}
|
|
646
|
+
proSummaryTableColumns.unshift(col);
|
|
647
|
+
proSummaryTableData.forEach((_, idx) => {
|
|
648
|
+
_["序号"] = idx + 1;
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
|
|
626
652
|
// 做总计
|
|
627
653
|
if (
|
|
628
654
|
this.props.summaryConfigs &&
|
|
@@ -635,8 +661,8 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
635
661
|
].map((i) => this.buildKeys(i));
|
|
636
662
|
|
|
637
663
|
const sumData = {
|
|
638
|
-
[
|
|
639
|
-
cal === "sum" ? translate("合计") : translate("均值"),
|
|
664
|
+
[proSummaryTableColumns[0]?.dataIndex]:
|
|
665
|
+
cal === "sum" ? translate("${合计}") : translate("${均值}"),
|
|
640
666
|
_type: cal,
|
|
641
667
|
_calRange: "all",
|
|
642
668
|
};
|
|
@@ -661,6 +687,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
661
687
|
// 给小计和总计染色
|
|
662
688
|
this.stain(proSummaryTableColumns);
|
|
663
689
|
|
|
690
|
+
// 排序
|
|
691
|
+
proSummaryTableColumns = proSummaryTableColumns.sort((a, b) => {
|
|
692
|
+
return a.order < b.order ? -1 : 1;
|
|
693
|
+
});
|
|
694
|
+
|
|
664
695
|
console.log("proSummaryTableColumns", proSummaryTableColumns);
|
|
665
696
|
console.log("proSummaryTableData", proSummaryTableData);
|
|
666
697
|
|
|
@@ -700,7 +731,9 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
700
731
|
}
|
|
701
732
|
}
|
|
702
733
|
|
|
703
|
-
if (data[key] === undefined
|
|
734
|
+
if (data[key] === undefined || data[key] == "") {
|
|
735
|
+
data[key] = BigNumber(0);
|
|
736
|
+
}
|
|
704
737
|
if (cal === "sum")
|
|
705
738
|
data[key] = colTarget.reduce(
|
|
706
739
|
(last, d) => last.plus(BigNumber(d[targetKey])),
|
|
@@ -712,14 +745,16 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
712
745
|
last.plus(BigNumber(d[targetKey]).div(colTarget.length)),
|
|
713
746
|
BigNumber(0)
|
|
714
747
|
);
|
|
715
|
-
data[key] =
|
|
748
|
+
data[key] =
|
|
749
|
+
data[key]?.toString() == "NaN" ? "0" : data[key]?.toString();
|
|
716
750
|
}
|
|
717
751
|
|
|
718
752
|
for (const calCol of flatSummaryCalTitle) {
|
|
719
753
|
const key = this.buildKeys(calCol);
|
|
720
754
|
const sumDataIndex = calCol[calCol.length - 1].sumDataIndex;
|
|
721
755
|
|
|
722
|
-
if (data[key] === undefined
|
|
756
|
+
if (data[key] === undefined || data[key] == "")
|
|
757
|
+
data[key] = BigNumber(0);
|
|
723
758
|
if (cal === "sum")
|
|
724
759
|
data[key] = sumDataIndex.reduce(
|
|
725
760
|
(last, dataKey) => last.plus(BigNumber(data[dataKey])),
|
|
@@ -733,6 +768,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
733
768
|
);
|
|
734
769
|
data[key] = data[key]?.toString();
|
|
735
770
|
}
|
|
771
|
+
// debugger
|
|
736
772
|
list.push(data);
|
|
737
773
|
} else {
|
|
738
774
|
for (const [k, v] of Object.entries(rowMp)) {
|
|
@@ -745,7 +781,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
745
781
|
flatSummaryCalTitle,
|
|
746
782
|
cal,
|
|
747
783
|
idx + 1,
|
|
748
|
-
|
|
784
|
+
this.deepClone(data),
|
|
749
785
|
list
|
|
750
786
|
);
|
|
751
787
|
}
|
|
@@ -827,6 +863,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
827
863
|
summaryConfigs,
|
|
828
864
|
subtotalXColumn,
|
|
829
865
|
subtotalYColumn,
|
|
866
|
+
tableProps,
|
|
830
867
|
} = this.props;
|
|
831
868
|
const { touchEnd, total, loading, virtualEndPageNo } = this.state;
|
|
832
869
|
const { translate } = this.context;
|
|
@@ -838,24 +875,39 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
838
875
|
proSummaryTableData,
|
|
839
876
|
} = this.handleProSummaryTable(this.getUnHidenDataSource());
|
|
840
877
|
|
|
878
|
+
let current_cols = isProSumarryTable
|
|
879
|
+
? proSummaryTableColumns
|
|
880
|
+
: columns
|
|
881
|
+
? columns
|
|
882
|
+
: [];
|
|
883
|
+
console.log(current_cols);
|
|
884
|
+
let table_x = 20;
|
|
885
|
+
current_cols.forEach((c) => {
|
|
886
|
+
table_x = table_x + (c.width ? c.width : 140);
|
|
887
|
+
});
|
|
888
|
+
|
|
841
889
|
return (
|
|
842
890
|
<>
|
|
843
891
|
{viewModels.includes("table") ? (
|
|
844
892
|
<Table
|
|
845
|
-
size={
|
|
893
|
+
size={tableProps.size ? tableProps.size : undefined}
|
|
846
894
|
rowSelection={this.getRowSelection()}
|
|
847
|
-
columns={
|
|
848
|
-
isProSumarryTable
|
|
849
|
-
? proSummaryTableColumns
|
|
850
|
-
: columns
|
|
851
|
-
? columns
|
|
852
|
-
: []
|
|
853
|
-
}
|
|
895
|
+
columns={current_cols}
|
|
854
896
|
dataSource={
|
|
855
897
|
isProSumarryTable
|
|
856
898
|
? proSummaryTableData
|
|
857
899
|
: this.getUnHidenDataSource()
|
|
858
900
|
}
|
|
901
|
+
//tableLayout={'fixed'}
|
|
902
|
+
//sticky
|
|
903
|
+
scroll={
|
|
904
|
+
tableProps.scrollY == -1
|
|
905
|
+
? null
|
|
906
|
+
: {
|
|
907
|
+
y: tableProps.scrollY == 0 ? 420 : tableProps.scrollY,
|
|
908
|
+
x: table_x,
|
|
909
|
+
}
|
|
910
|
+
}
|
|
859
911
|
bordered
|
|
860
912
|
pagination={false}
|
|
861
913
|
style={{ display: columns ? "block" : "none" }}
|
|
@@ -883,11 +935,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
883
935
|
}
|
|
884
936
|
|
|
885
937
|
sumConfigs["sum"].push({
|
|
886
|
-
value: translate("合计"),
|
|
938
|
+
value: translate("${合计}"),
|
|
887
939
|
id: "title",
|
|
888
940
|
});
|
|
889
941
|
sumConfigs["avg"].push({
|
|
890
|
-
value: translate("均值"),
|
|
942
|
+
value: translate("${均值}"),
|
|
891
943
|
id: "title",
|
|
892
944
|
});
|
|
893
945
|
|
|
@@ -208,7 +208,7 @@ export default class HcserviceV3 {
|
|
|
208
208
|
url
|
|
209
209
|
) {
|
|
210
210
|
if (!sourceId) {
|
|
211
|
-
message.error("SourceId is undefined!");
|
|
211
|
+
message.error("SourceId is undefined!",5);
|
|
212
212
|
} else {
|
|
213
213
|
let res = await Super.super({
|
|
214
214
|
url: url,
|
|
@@ -236,7 +236,7 @@ export default class HcserviceV3 {
|
|
|
236
236
|
if (res.status === "success") {
|
|
237
237
|
return res.entities;
|
|
238
238
|
} else {
|
|
239
|
-
message.error(translate("${没有找到实体}!"));
|
|
239
|
+
message.error(translate("${没有找到实体}!"),5);
|
|
240
240
|
return null;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
@@ -279,7 +279,7 @@ export default class HcserviceV3 {
|
|
|
279
279
|
if (res.status === "success") {
|
|
280
280
|
return res.entity;
|
|
281
281
|
} else {
|
|
282
|
-
message.error(translate("${实体不存在}!"));
|
|
282
|
+
message.error(translate("${实体不存在}!"),5);
|
|
283
283
|
return null;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
@@ -409,7 +409,7 @@ export default class HcserviceV3 {
|
|
|
409
409
|
// }
|
|
410
410
|
} else {
|
|
411
411
|
if (message) {
|
|
412
|
-
message.error(translate("${保存失败}!"));
|
|
412
|
+
message.error(translate("${保存失败}!"),5);
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
return { code, status: res ? res.status : "error" };
|
|
@@ -541,12 +541,12 @@ export default class HcserviceV3 {
|
|
|
541
541
|
if (item.code) {
|
|
542
542
|
codes.push(item.code);
|
|
543
543
|
} else {
|
|
544
|
-
message.error(translate("${没找到所选数据的Code}!!"));
|
|
544
|
+
message.error(translate("${没找到所选数据的Code}!!"),5);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
|
|
548
548
|
if (codes.length < 1) {
|
|
549
|
-
message.error(translate("${没找到所选数据的Code}!!"));
|
|
549
|
+
message.error(translate("${没找到所选数据的Code}!!"),5);
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
return codes;
|
|
@@ -575,7 +575,7 @@ export default class HcserviceV3 {
|
|
|
575
575
|
message.success(translate("${删除成功}"), 1);
|
|
576
576
|
return true;
|
|
577
577
|
} else {
|
|
578
|
-
message.error(translate("${删除成功}"));
|
|
578
|
+
message.error(translate("${删除成功}"),5);
|
|
579
579
|
//console.log("删除失败消息",res.message);
|
|
580
580
|
return false;
|
|
581
581
|
}
|
|
@@ -117,6 +117,8 @@ export interface CriteriaConfig extends FieldConfig {}
|
|
|
117
117
|
export interface ColumnConfig extends FieldConfig {
|
|
118
118
|
statColType?: StatColType;
|
|
119
119
|
colWidth?: number;
|
|
120
|
+
colFixed?:"left"|'right'|boolean,
|
|
121
|
+
valueAlign?:"left"|'right'|'center',
|
|
120
122
|
id: string;
|
|
121
123
|
}
|
|
122
124
|
|
|
@@ -268,6 +270,8 @@ export interface SelectConfig extends TmplBase {
|
|
|
268
270
|
orderColumn: ColumnConfig;
|
|
269
271
|
totalColummConfigs?: ColumnConfig[];
|
|
270
272
|
showDim?: boolean;
|
|
273
|
+
clickDisplayTotal?:boolean;
|
|
274
|
+
leftFixedCols?:number;
|
|
271
275
|
}
|
|
272
276
|
|
|
273
277
|
export interface TtmplConfigRes {
|
|
@@ -33,7 +33,7 @@ export default class ModelStrucV3 {
|
|
|
33
33
|
}
|
|
34
34
|
} else {
|
|
35
35
|
if (message) {
|
|
36
|
-
message.error(translate("${保存失败}!"));
|
|
36
|
+
message.error(translate("${保存失败}!"),5);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
return { code, status: res ? res.status : "error" };
|
|
@@ -61,12 +61,12 @@ export default class ModelStrucV3 {
|
|
|
61
61
|
code = res.entityCode ? res.entityCode : res.code;
|
|
62
62
|
} else {
|
|
63
63
|
if (res.message) {
|
|
64
|
-
message.error(translate("${查询失败}!") + res.message,
|
|
64
|
+
message.error(translate("${查询失败}!") + res.message, 5);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
} else {
|
|
68
68
|
if (message) {
|
|
69
|
-
message.error(translate("${查询失败}!"));
|
|
69
|
+
message.error(translate("${查询失败}!"),5);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
return res ? res : { status: "error" };
|
|
@@ -94,12 +94,12 @@ export default class ModelStrucV3 {
|
|
|
94
94
|
code = res.entityCode ? res.entityCode : res.code;
|
|
95
95
|
} else {
|
|
96
96
|
if (res.message) {
|
|
97
|
-
message.error(translate("${删除失败}!") + res.message,
|
|
97
|
+
message.error(translate("${删除失败}!") + res.message, 5);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
} else {
|
|
101
101
|
if (message) {
|
|
102
|
-
message.error(translate("${删除失败}!"));
|
|
102
|
+
message.error(translate("${删除失败}!"),5);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
return res;
|
|
@@ -61,7 +61,7 @@ export default class Superagent {
|
|
|
61
61
|
let result = res.body;
|
|
62
62
|
if (result) {
|
|
63
63
|
if (result.status === "error") {
|
|
64
|
-
message.error(translate("${错误消息}: ") + result.message,
|
|
64
|
+
message.error(translate("${错误消息}: ") + result.message, 5);
|
|
65
65
|
}
|
|
66
66
|
// else if(result.message){
|
|
67
67
|
// message.warn(result.message,4)
|
|
@@ -74,7 +74,7 @@ export default class Superagent {
|
|
|
74
74
|
} else if (res.status === 403) {
|
|
75
75
|
Units.toLogin();
|
|
76
76
|
} else if (res.status === 405 || res.status === 406) {
|
|
77
|
-
message.error(translate("${权限不足}"));
|
|
77
|
+
message.error(translate("${权限不足}"),5);
|
|
78
78
|
resolve(res);
|
|
79
79
|
} else if (res.status === 404 || res.status === 504) {
|
|
80
80
|
//因为hydrogen v2 首次跳转时会报此错误,影响用户感受
|