aldehyde 0.2.410 → 0.2.413
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/color-picker/index.d.ts.map +1 -1
- package/lib/controls/color-picker/index.js +2 -1
- package/lib/controls/color-picker/index.js.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.js +1 -1
- package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
- package/lib/controls/enum-badge/index.js +1 -1
- package/lib/controls/enum-badge/index.js.map +1 -1
- package/lib/layout2/components/theme-button.d.ts +5 -1
- package/lib/layout2/components/theme-button.d.ts.map +1 -1
- package/lib/layout2/components/theme-button.js +30 -5
- package/lib/layout2/components/theme-button.js.map +1 -1
- package/lib/layout2/components/user-button.d.ts.map +1 -1
- package/lib/layout2/components/user-button.js +20 -3
- package/lib/layout2/components/user-button.js.map +1 -1
- package/lib/layout2/css/header.css +10 -6
- package/lib/layout2/css/tabs-layout.less +6 -0
- package/lib/layout2/header.d.ts +1 -1
- package/lib/layout2/header.d.ts.map +1 -1
- package/lib/layout2/header.js +4 -9
- package/lib/layout2/header.js.map +1 -1
- package/lib/layout2/main.js +1 -1
- package/lib/layout2/main.js.map +1 -1
- package/lib/layout2/page.d.ts +1 -1
- package/lib/layout2/page.d.ts.map +1 -1
- package/lib/layout2/page.js +15 -7
- package/lib/layout2/page.js.map +1 -1
- package/lib/layout2/type/layout-type.d.ts +2 -0
- package/lib/layout2/type/layout-type.d.ts.map +1 -1
- package/lib/layout3/header.js +2 -4
- package/lib/layout3/header.js.map +1 -1
- package/lib/layout3/page.d.ts.map +1 -1
- package/lib/layout3/page.js +17 -5
- package/lib/layout3/page.js.map +1 -1
- package/lib/layout4/header.d.ts +1 -1
- package/lib/layout4/header.d.ts.map +1 -1
- package/lib/layout4/header.js +3 -6
- package/lib/layout4/header.js.map +1 -1
- package/lib/layout4/page.d.ts +1 -1
- package/lib/layout4/page.d.ts.map +1 -1
- package/lib/layout4/page.js +21 -6
- package/lib/layout4/page.js.map +1 -1
- package/lib/layout5/css/sider.less +6 -0
- package/lib/layout5/header.js +2 -4
- package/lib/layout5/header.js.map +1 -1
- package/lib/layout5/page.d.ts +1 -1
- package/lib/layout5/page.d.ts.map +1 -1
- package/lib/layout5/page.js +21 -6
- package/lib/layout5/page.js.map +1 -1
- package/lib/layout5/sider.d.ts +1 -1
- package/lib/layout5/sider.d.ts.map +1 -1
- package/lib/layout5/sider.js +1 -2
- package/lib/layout5/sider.js.map +1 -1
- package/lib/list/card-list/index.less +6 -4
- package/lib/list/vertical-list/index.less +120 -21
- package/lib/list/vertical-list/item.d.ts.map +1 -1
- package/lib/list/vertical-list/item.js +51 -44
- package/lib/list/vertical-list/item.js.map +1 -1
- package/lib/locale/LocaleButton.d.ts +5 -1
- package/lib/locale/LocaleButton.d.ts.map +1 -1
- package/lib/locale/LocaleButton.js +13 -3
- package/lib/locale/LocaleButton.js.map +1 -1
- package/lib/login3/img/login-bg.png +0 -0
- package/lib/lowcode-components/assets/china.json +1 -99420
- package/lib/lowcode-components/lowcode-view/component/font/FontGlobal.css +4 -4
- package/lib/module/dtmpl-view-modal.d.ts +1 -0
- package/lib/module/dtmpl-view-modal.d.ts.map +1 -1
- package/lib/module/dtmpl-view-modal.js +2 -1
- package/lib/module/dtmpl-view-modal.js.map +1 -1
- package/lib/module/index.less +5 -0
- package/lib/table/act-table.d.ts +1 -0
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +28 -2
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-builder.d.ts.map +1 -1
- package/lib/table/column/column-builder.js +25 -7
- package/lib/table/column/column-builder.js.map +1 -1
- package/lib/table/column/index.less +7 -5
- package/lib/table/index.css +57 -0
- package/lib/table/query-table.d.ts +0 -4
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +7 -63
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +3 -0
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/report-table.d.ts.map +1 -1
- package/lib/table/report-table.js +1 -1
- package/lib/table/report-table.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +1 -0
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +16 -0
- 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/interface.js.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.js +1 -1
- package/lib/tmpl/tmpl-config-analysis.js.map +1 -1
- package/lib/units/index.d.ts +3 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +22 -4
- package/lib/units/index.js.map +1 -1
- package/lib/welcome/HCWelcome.js +20 -3
- package/lib/welcome/HCWelcome.js.map +1 -1
- package/lib/welcome/components/page-card.d.ts.map +1 -1
- package/lib/welcome/components/page-card.js +4 -0
- package/lib/welcome/components/page-card.js.map +1 -1
- package/lib/welcome/components/workbench.js +2 -1
- package/lib/welcome/components/workbench.js.map +1 -1
- package/lib/welcome/img/welcome2.png +0 -0
- package/package.json +1 -1
- package/src/aldehyde/controls/color-picker/index.tsx +3 -1
- package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +1 -1
- package/src/aldehyde/controls/enum-badge/index.tsx +1 -1
- package/src/aldehyde/layout2/components/theme-button.tsx +17 -6
- package/src/aldehyde/layout2/components/user-button.tsx +19 -4
- package/src/aldehyde/layout2/css/header.css +10 -6
- package/src/aldehyde/layout2/css/tabs-layout.less +6 -0
- package/src/aldehyde/layout2/header.tsx +10 -14
- package/src/aldehyde/layout2/main.tsx +2 -2
- package/src/aldehyde/layout2/page.tsx +16 -8
- package/src/aldehyde/layout2/type/layout-type.ts +2 -0
- package/src/aldehyde/layout3/header.tsx +4 -4
- package/src/aldehyde/layout3/page.tsx +9 -5
- package/src/aldehyde/layout4/header.tsx +6 -7
- package/src/aldehyde/layout4/page.tsx +14 -7
- package/src/aldehyde/layout5/css/sider.less +6 -0
- package/src/aldehyde/layout5/header.tsx +4 -4
- package/src/aldehyde/layout5/page.tsx +14 -7
- package/src/aldehyde/layout5/sider.tsx +5 -8
- package/src/aldehyde/list/card-list/index.less +6 -4
- package/src/aldehyde/list/vertical-list/index.less +120 -21
- package/src/aldehyde/list/vertical-list/item.tsx +66 -60
- package/src/aldehyde/locale/LocaleButton.tsx +11 -10
- package/src/aldehyde/login3/img/login-bg.png +0 -0
- package/src/aldehyde/lowcode-components/assets/china.json +1 -99420
- package/src/aldehyde/lowcode-components/lowcode-view/component/font/DingTalk-JinBuTi.woff2 +0 -0
- package/src/aldehyde/lowcode-components/lowcode-view/component/font/DouyinSansBold.woff +0 -0
- package/src/aldehyde/lowcode-components/lowcode-view/component/font/FontGlobal.css +4 -4
- package/src/aldehyde/lowcode-components/lowcode-view/component/font/PangMenZhengDaoBiaoTiTiMianFeiBan.woff2 +0 -0
- package/src/aldehyde/lowcode-components/lowcode-view/component/font/YouSheBiaoTiHei.woff2 +0 -0
- package/src/aldehyde/module/dtmpl-view-modal.tsx +26 -24
- package/src/aldehyde/module/index.less +5 -0
- package/src/aldehyde/table/act-table.tsx +35 -2
- package/src/aldehyde/table/column/column-builder.tsx +28 -10
- package/src/aldehyde/table/column/index.less +7 -5
- package/src/aldehyde/table/index.css +57 -0
- package/src/aldehyde/table/query-table.tsx +6 -63
- package/src/aldehyde/table/report-table.tsx +69 -69
- package/src/aldehyde/tmpl/hcservice-v3.tsx +14 -0
- package/src/aldehyde/tmpl/interface.tsx +4 -0
- package/src/aldehyde/tmpl/tmpl-config-analysis.tsx +1 -1
- package/src/aldehyde/units/index.tsx +21 -4
- package/src/aldehyde/welcome/HCWelcome.js +17 -1
- package/src/aldehyde/welcome/components/page-card.tsx +4 -0
- package/src/aldehyde/welcome/components/workbench.tsx +1 -1
- package/src/aldehyde/welcome/img/welcome2.png +0 -0
- package/lib/lowcode-components/lowcode-view/component/font/DingTalk JinBuTi.ttf +0 -0
- package/lib/lowcode-components/lowcode-view/component/font/DouyinSansBold.ttf +0 -0
- package/lib/lowcode-components/lowcode-view/component/font//344/274/230/350/256/276/346/240/207/351/242/230/351/273/221.ttf +0 -0
- package/lib/lowcode-components/lowcode-view/component/font//345/272/236/351/227/250/346/255/243/351/201/223/346/240/207/351/242/230/344/275/223/345/205/215/350/264/271/347/211/210.ttf +0 -0
- package/src/aldehyde/lowcode-components/lowcode-view/component/font/DingTalk JinBuTi.ttf +0 -0
- package/src/aldehyde/lowcode-components/lowcode-view/component/font/DouyinSansBold.ttf +0 -0
- package/src/aldehyde/lowcode-components/lowcode-view/component/font//344/274/230/350/256/276/346/240/207/351/242/230/351/273/221.ttf +0 -0
- package/src/aldehyde/lowcode-components/lowcode-view/component/font//345/272/236/351/227/250/346/255/243/351/201/223/346/240/207/351/242/230/344/275/223/345/205/215/350/264/271/347/211/210.ttf +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "DingTalk JinBuTi";
|
|
3
|
-
src: url('./DingTalk
|
|
3
|
+
src: url('./DingTalk-JinBuTi.woff2');
|
|
4
4
|
font-weight: normal;
|
|
5
5
|
font-style: normal;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
@font-face {
|
|
9
9
|
font-family: "DouyinSansBold";
|
|
10
|
-
src: url('./DouyinSansBold.
|
|
10
|
+
src: url('./DouyinSansBold.woff');
|
|
11
11
|
font-weight: normal;
|
|
12
12
|
font-style: normal;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@font-face {
|
|
16
16
|
font-family: "优设标题黑";
|
|
17
|
-
src: url('
|
|
17
|
+
src: url('./YouSheBiaoTiHei.woff2');
|
|
18
18
|
font-weight: normal;
|
|
19
19
|
font-style: normal;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
@font-face {
|
|
23
23
|
font-family: "庞门正道标题体免费版";
|
|
24
|
-
src: url('
|
|
24
|
+
src: url('./PangMenZhengDaoBiaoTiTiMianFeiBan.woff2');
|
|
25
25
|
font-weight: normal;
|
|
26
26
|
font-style: normal;
|
|
27
27
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import React, {ReactNode} from 'react'
|
|
2
|
-
import { Modal} from 'antd'
|
|
1
|
+
import React, { ReactNode } from 'react'
|
|
3
2
|
import DtmplViewCard from "./dtmpl-view-card";
|
|
4
|
-
import {DtmplBaseProps} from "../tmpl/interface";
|
|
3
|
+
import { DtmplBaseProps } from "../tmpl/interface";
|
|
5
4
|
import Scrollbars from 'react-custom-scrollbars';
|
|
6
5
|
import DraggableModal from "./draggable-modal";
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import "./index.less";
|
|
7
|
+
|
|
8
|
+
interface DtmplViewModalProps extends DtmplBaseProps {
|
|
9
|
+
title?: ReactNode,
|
|
9
10
|
open: boolean,
|
|
10
11
|
onClose: () => void,
|
|
11
|
-
width?:string|number,
|
|
12
|
-
height?:string|number,
|
|
12
|
+
width?: string | number,
|
|
13
|
+
height?: string | number,
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
interface DtmplViewModalState {
|
|
@@ -18,16 +19,16 @@ interface DtmplViewModalState {
|
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
class DtmplViewModal extends React.PureComponent<DtmplViewModalProps, DtmplViewModalState> {
|
|
21
|
-
state={
|
|
22
|
+
state = {
|
|
22
23
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
static defaultProps = {
|
|
26
27
|
height: "82vh",
|
|
27
|
-
width:"82vw",
|
|
28
|
+
width: "82vw",
|
|
28
29
|
forceRender: true,
|
|
29
|
-
style: {maxWidth: 'calc(100vw - 60px)', maxHeight: 'calc(100vh - 50px)'},
|
|
30
|
-
open:false,
|
|
30
|
+
style: { maxWidth: 'calc(100vw - 60px)', maxHeight: 'calc(100vh - 50px)' },
|
|
31
|
+
open: false,
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
async componentDidMount() {
|
|
@@ -35,20 +36,21 @@ class DtmplViewModal extends React.PureComponent<DtmplViewModalProps, DtmplViewM
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
render() {
|
|
38
|
-
const {title,sourceId,code,open,onClose,width,height,serverKey,codeSource}=this.props;
|
|
39
|
+
const { title, sourceId, code, open, onClose, width, height, serverKey, codeSource } = this.props;
|
|
39
40
|
return <DraggableModal
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
open={open}
|
|
42
|
+
width={width}
|
|
43
|
+
title={title}
|
|
44
|
+
styles={{ body: { height: height, overflow: 'auto' }, header: { minHeight: "24px" } }}
|
|
45
|
+
destroyOnHidden={true}
|
|
46
|
+
centered
|
|
47
|
+
onCancel={onClose}
|
|
48
|
+
className='dtmpl-view-modal'
|
|
49
|
+
>
|
|
50
|
+
<Scrollbars autoHide autoHideTimeout={1000}>
|
|
51
|
+
<DtmplViewCard codeSource={codeSource} serverKey={serverKey} sourceId={sourceId} code={code}></DtmplViewCard>
|
|
52
|
+
</Scrollbars>
|
|
53
|
+
</DraggableModal>
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
|
|
@@ -34,6 +34,8 @@ import ColumnBuilder from "./column/column-builder";
|
|
|
34
34
|
import ReportTable from "./report-table";
|
|
35
35
|
import EntryControl from "../controls/entry-control";
|
|
36
36
|
import DraggableModal from "../module/draggable-modal";
|
|
37
|
+
import Icon from "../icon/aliIcon";
|
|
38
|
+
|
|
37
39
|
const { Content, Sider } = Layout;
|
|
38
40
|
type Level = "l1" | "l2";
|
|
39
41
|
|
|
@@ -1321,6 +1323,37 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1321
1323
|
this.setState({ tabActiveKey: val });
|
|
1322
1324
|
}
|
|
1323
1325
|
|
|
1326
|
+
renderAggregates() { // 统计数据渲染
|
|
1327
|
+
const { aggregateVO } = this.state;
|
|
1328
|
+
const { ltmplConfig } = this.props;
|
|
1329
|
+
const aggregates = aggregateVO?.aggregates || [];
|
|
1330
|
+
const columns = ltmplConfig?.columns || [];
|
|
1331
|
+
return aggregates?.length ? <div className="aggregates">{aggregates.map(item => {
|
|
1332
|
+
const column = columns.find(r => r.id === item.fieldId);
|
|
1333
|
+
if (!column) {
|
|
1334
|
+
return "";
|
|
1335
|
+
}
|
|
1336
|
+
const { dataUnit, themeColor, themeIcon } = column;
|
|
1337
|
+
return <Card className="aggregate-card" hoverable styles={{ body: { padding: 20 } }}>
|
|
1338
|
+
<div style={{ display: "flex", alignItems: "start", justifyContent: "space-between" }}>
|
|
1339
|
+
<div style={{ width: "calc(100% - 40px)" }}>
|
|
1340
|
+
<p className="title">{item.fieldTitle}</p>
|
|
1341
|
+
<div className="value">
|
|
1342
|
+
<span className="number">{item.value}</span>
|
|
1343
|
+
{dataUnit ? <span className="unit">{dataUnit}</span> : ""}
|
|
1344
|
+
</div>
|
|
1345
|
+
</div>
|
|
1346
|
+
{themeIcon ?
|
|
1347
|
+
<div className="icon" style={{ color: themeColor, background: `${themeColor}26` }}>
|
|
1348
|
+
<Icon type={themeIcon} />
|
|
1349
|
+
</div> :
|
|
1350
|
+
""}
|
|
1351
|
+
</div>
|
|
1352
|
+
</Card>
|
|
1353
|
+
}).filter(Boolean)
|
|
1354
|
+
}</div > : "";
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1324
1357
|
renderContent = () => {
|
|
1325
1358
|
let {
|
|
1326
1359
|
queryKey, loading, selectedRows, hiddenRowCodes, viewModels, sortedColConfigs, hiddenColIds, showL2ActTable,
|
|
@@ -1402,8 +1435,6 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1402
1435
|
onChangePage={onChangePage}
|
|
1403
1436
|
viewModels={viewModels}
|
|
1404
1437
|
primaryColumn={ltmplConfig.primaryColumn}
|
|
1405
|
-
defaultShowTotalCols={ltmplConfig.defaultShowTotalCols}
|
|
1406
|
-
rowTotalCols={ltmplConfig.rowTotalCols}
|
|
1407
1438
|
columnConfigs={columnConfigs} summaryConfigs={ltmplConfig.totalColumnConfigs}
|
|
1408
1439
|
maxSelectedRows={this.props?.tableType === "select" || this.checkBoxUseful() ? 10000 : -1}
|
|
1409
1440
|
selectedRows={selectedRows} columns={tableColumns}
|
|
@@ -1424,6 +1455,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1424
1455
|
ltmplConfig={ltmplConfig}
|
|
1425
1456
|
showView={showView}
|
|
1426
1457
|
showPagination={showPagination}
|
|
1458
|
+
onChangeAggregateVO={(val) => this.setState({ aggregateVO: val })}
|
|
1427
1459
|
/>);
|
|
1428
1460
|
|
|
1429
1461
|
return (
|
|
@@ -1488,6 +1520,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1488
1520
|
</Sider>
|
|
1489
1521
|
<Layout style={{ backgroundColor: "#fff" }}>
|
|
1490
1522
|
<Content style={{ overflow: "initial" }}>
|
|
1523
|
+
{this.renderAggregates()}
|
|
1491
1524
|
{displayCriteriaCard ? this.renderCriteriaForm() : null}
|
|
1492
1525
|
{buttons.includes("rowEdit") ? <AntdForm ref={this.formRef} component={false} onValuesChange={this.doRowEditFormChange}>{renderActTable}</AntdForm> : renderActTable}
|
|
1493
1526
|
</Content>
|
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
sortedColConfigs, unHiden,
|
|
79
79
|
onHide, translate,
|
|
80
80
|
sortColumns, serverKey,
|
|
81
|
-
editings, mainCode, criteriaData, actTableDoSearch
|
|
81
|
+
editings, mainCode, criteriaData, actTableDoSearch, showView
|
|
82
82
|
} = props;
|
|
83
83
|
|
|
84
84
|
const { primaryColumn, primaryColumnLabel } = ltmplConfig
|
|
@@ -158,6 +158,21 @@ export default {
|
|
|
158
158
|
: false;
|
|
159
159
|
}
|
|
160
160
|
column["render"] = (text, record) => {
|
|
161
|
+
let detailParams = undefined;
|
|
162
|
+
if (showView && primaryColumn?.id === item.id) { // 首字段增加主题色显示/查看详情功能
|
|
163
|
+
if (buttons.includes("detail")) {
|
|
164
|
+
const classView = ltmplConfig.classViewConfigs.find(r => ActionUtils.isShow(r.preposes, [record], undefined));
|
|
165
|
+
if (classView) {
|
|
166
|
+
detailParams = { code: record.code, dtmplSourceId: classView.id };
|
|
167
|
+
} else {
|
|
168
|
+
const isdetail = ActionUtils.isShow(ltmplConfig.buttonViewAction?.preposes, [record], undefined);
|
|
169
|
+
detailParams = isdetail ? { code: record.code } : undefined;
|
|
170
|
+
}
|
|
171
|
+
} else if (buttons.includes("customDetail")) {
|
|
172
|
+
detailParams = { code: record.code, toCustomPage: true };
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
161
176
|
return (editings.includes(record.code) || buttons.includes("multiRowEdit") ?
|
|
162
177
|
<FormItem style={{ margin: 0 }}
|
|
163
178
|
name={record.code + "_" + item.id}
|
|
@@ -171,23 +186,26 @@ export default {
|
|
|
171
186
|
/>
|
|
172
187
|
</FormItem> :
|
|
173
188
|
<div className={record['dataType'] ? record['dataType'] === "小计" ? "xiaoji" : 'heji' : ""}>
|
|
174
|
-
{primaryColumn?.id === item.id
|
|
189
|
+
{primaryColumn?.id === item.id ?
|
|
175
190
|
<div className="column-table-primary">
|
|
176
|
-
<div className="primary-column">
|
|
191
|
+
<div className="primary-column" onClick={() => detailParams && showView(detailParams)}>
|
|
177
192
|
<ViewControl
|
|
178
193
|
serverKey={serverKey}
|
|
179
194
|
fieldConfig={item}
|
|
180
195
|
value={record[item.id]}
|
|
181
196
|
holderType="table"
|
|
182
|
-
/> </div>
|
|
183
|
-
<div className="primary-column-label" >
|
|
184
|
-
<ViewControl
|
|
185
|
-
serverKey={serverKey}
|
|
186
|
-
fieldConfig={primaryColumnLabel}
|
|
187
|
-
value={record[primaryColumnLabel.id]}
|
|
188
|
-
holderType="table"
|
|
189
197
|
/>
|
|
190
198
|
</div>
|
|
199
|
+
{primaryColumnLabel?.id ?
|
|
200
|
+
<div className="primary-column-label" >
|
|
201
|
+
<ViewControl
|
|
202
|
+
serverKey={serverKey}
|
|
203
|
+
fieldConfig={primaryColumnLabel}
|
|
204
|
+
value={record[primaryColumnLabel.id]}
|
|
205
|
+
holderType="table"
|
|
206
|
+
/>
|
|
207
|
+
</div> :
|
|
208
|
+
""}
|
|
191
209
|
</div>
|
|
192
210
|
: <ViewControl
|
|
193
211
|
serverKey={serverKey}
|
|
@@ -20,15 +20,17 @@
|
|
|
20
20
|
text-overflow: ellipsis;
|
|
21
21
|
overflow: hidden;
|
|
22
22
|
white-space: nowrap;
|
|
23
|
+
color: var(--ant-color-primary-active);
|
|
24
|
+
cursor: pointer;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
.primary-column-label {
|
|
26
|
-
|
|
28
|
+
margin-left: 8px;
|
|
27
29
|
|
|
28
|
-
.
|
|
29
|
-
font-size:
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
.tag {
|
|
31
|
+
font-size: 12px !important;
|
|
32
|
+
padding: 2px 6px !important;
|
|
33
|
+
white-space: nowrap;
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -102,4 +102,61 @@
|
|
|
102
102
|
|
|
103
103
|
.actTable .ant-tabs-nav::before {
|
|
104
104
|
display: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.aggregates {
|
|
108
|
+
display: grid;
|
|
109
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
110
|
+
gap: 16px;
|
|
111
|
+
|
|
112
|
+
@media (min-width: 768px) {
|
|
113
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (min-width: 1024px) {
|
|
117
|
+
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.aggregate-card .title {
|
|
122
|
+
margin-bottom: 16px;
|
|
123
|
+
font-size: 14px;
|
|
124
|
+
line-height: 20px;
|
|
125
|
+
color: var(--ant-color-text-secondary);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.aggregate-card .value {
|
|
129
|
+
display: flex;
|
|
130
|
+
gap: 4px;
|
|
131
|
+
align-items: baseline;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.aggregate-card .value .number {
|
|
135
|
+
font-size: 28px;
|
|
136
|
+
line-height: 32px;
|
|
137
|
+
font-weight: 700;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
text-overflow: ellipsis;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.aggregate-card .value .unit {
|
|
143
|
+
font-size: 16px;
|
|
144
|
+
line-height: 20px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.aggregate-card .icon {
|
|
148
|
+
padding: 8px;
|
|
149
|
+
border-radius: 8px;
|
|
150
|
+
background-color: var(--ant-layout-body-bg);
|
|
151
|
+
font-size: 20px;
|
|
152
|
+
display: flex;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
align-items: center;
|
|
155
|
+
transition-property: all;
|
|
156
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
157
|
+
transition-duration: 300ms;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.aggregate-card:hover .icon {
|
|
161
|
+
transform: scale(1.1);
|
|
105
162
|
}
|
|
@@ -42,7 +42,6 @@ interface QueryTableStat {
|
|
|
42
42
|
touchEnd?: boolean;
|
|
43
43
|
aggregateVO?: AggregateVO;
|
|
44
44
|
beforeSelectedRows?: number;
|
|
45
|
-
aggregateShowSize?: number;
|
|
46
45
|
errorText?: string;
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -62,8 +61,6 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
62
61
|
selectedRows: [],
|
|
63
62
|
viewModels: ["table"],
|
|
64
63
|
summaryConfigs: [],
|
|
65
|
-
rowTotalCols: 4,
|
|
66
|
-
defaultShowTotalCols: 7,
|
|
67
64
|
cardListConfig: {},
|
|
68
65
|
ltmplConfig: {},
|
|
69
66
|
showPagination: true,
|
|
@@ -79,7 +76,6 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
79
76
|
touchEnd: undefined,
|
|
80
77
|
aggregateVO: undefined,
|
|
81
78
|
beforeSelectedRows: undefined,
|
|
82
|
-
aggregateShowSize: undefined,
|
|
83
79
|
errorText: undefined
|
|
84
80
|
};
|
|
85
81
|
|
|
@@ -87,12 +83,9 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
87
83
|
context: React.ContextType<typeof LocaleContext>;
|
|
88
84
|
|
|
89
85
|
async componentDidMount() {
|
|
90
|
-
const { queryKey, pageInfo
|
|
86
|
+
const { queryKey, pageInfo } = this.props;
|
|
91
87
|
if (queryKey) {
|
|
92
88
|
await this.loadData(queryKey.key, pageInfo);
|
|
93
|
-
this.setState({
|
|
94
|
-
aggregateShowSize: defaultShowTotalCols,
|
|
95
|
-
});
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
91
|
|
|
@@ -244,7 +237,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
244
237
|
};
|
|
245
238
|
|
|
246
239
|
queryTotal = async () => {
|
|
247
|
-
const { queryKey, serverKey, queryTotal } = this.props;
|
|
240
|
+
const { queryKey, serverKey, queryTotal, onChangeAggregateVO } = this.props;
|
|
248
241
|
const { aggregateVO: stateAggregateVO } = this.state;
|
|
249
242
|
let aggregateVO;
|
|
250
243
|
if (stateAggregateVO && stateAggregateVO.queryKey == queryKey.key) {
|
|
@@ -255,9 +248,8 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
255
248
|
} else {
|
|
256
249
|
aggregateVO = await HcserviceV3.requestQueryAggregates(serverKey, queryKey.key);
|
|
257
250
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
});
|
|
251
|
+
onChangeAggregateVO(aggregateVO)
|
|
252
|
+
this.setState({ aggregateVO });
|
|
261
253
|
}
|
|
262
254
|
};
|
|
263
255
|
|
|
@@ -437,14 +429,14 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
437
429
|
groupIColumns,
|
|
438
430
|
hiddenRowCodes,
|
|
439
431
|
columnConfigs,
|
|
440
|
-
serverKey,
|
|
432
|
+
serverKey,
|
|
441
433
|
cardListConfig,
|
|
442
434
|
ltmplConfig,
|
|
443
435
|
showView,
|
|
444
436
|
showPagination
|
|
445
437
|
} = this.props;
|
|
446
438
|
//debugger
|
|
447
|
-
const { touchEnd, aggregateVO, loading, virtualEndPageNo, dataSource,
|
|
439
|
+
const { touchEnd, aggregateVO, loading, virtualEndPageNo, dataSource, errorText } = this.state;
|
|
448
440
|
const isProSumarryTable = Boolean(subtotalXColumn);
|
|
449
441
|
// 是否是树形表格(存在甘特图视图展示且存在展开关系)
|
|
450
442
|
const isTreeTable = viewModels.includes("ganttChart") && ltmplConfig.gttSubOpenRatmplId;
|
|
@@ -531,58 +523,9 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
531
523
|
this.mergeRowInCol(_, rowIdx, colIdx, mergeMp, current_cols.length))
|
|
532
524
|
);
|
|
533
525
|
}
|
|
534
|
-
let aggregateItems = [];
|
|
535
|
-
if (aggregateVO && aggregateVO.aggregates) {
|
|
536
|
-
if (aggregateShowSize < aggregateVO.aggregates.length) {
|
|
537
|
-
aggregateVO.aggregates.forEach(av => {
|
|
538
|
-
if (aggregateItems.length == aggregateShowSize) {
|
|
539
|
-
aggregateItems.push({
|
|
540
|
-
key: "opt",
|
|
541
|
-
label: <Button icon={<DownOutlined />} type={'link'} onClick={() => {
|
|
542
|
-
this.setState({ aggregateShowSize: aggregateVO.aggregates.length })
|
|
543
|
-
}}>{translate("${展开}")}</Button>,
|
|
544
|
-
children: null
|
|
545
|
-
// <div style={{fontSize:24}}>{av.value}</div>
|
|
546
|
-
})
|
|
547
|
-
} else if (aggregateItems.length < aggregateShowSize) {
|
|
548
|
-
aggregateItems.push({
|
|
549
|
-
key: av.fieldId,
|
|
550
|
-
label: <div style={{ fontSize: 14 }}>{translate("${" + av.fieldTitle + "}")}</div>,
|
|
551
|
-
children: <Statistic valueStyle={{ fontSize: 16 }} value={av.value ? av.value : 0} />
|
|
552
|
-
// <div style={{fontSize:24}}>{av.value}</div>
|
|
553
|
-
})
|
|
554
|
-
}
|
|
555
|
-
})
|
|
556
|
-
} else {
|
|
557
|
-
aggregateVO.aggregates.forEach(av => {
|
|
558
|
-
aggregateItems.push({
|
|
559
|
-
key: av.fieldId,
|
|
560
|
-
label: <div style={{ fontSize: 14 }}>{translate("${" + av.fieldTitle + "}")}</div>,
|
|
561
|
-
children: <Statistic valueStyle={{ fontSize: 16 }} value={av.value ? av.value : 0} />
|
|
562
|
-
})
|
|
563
|
-
});
|
|
564
|
-
if (this.defaultAggregateShowSize < aggregateVO.aggregates.length) {
|
|
565
|
-
aggregateItems.push({
|
|
566
|
-
key: "opt",
|
|
567
|
-
label: <Button icon={<UpOutlined />} type={'link'} onClick={() => {
|
|
568
|
-
this.setState({ aggregateShowSize: this.defaultAggregateShowSize })
|
|
569
|
-
}}>{translate("${收起}")}</Button>,
|
|
570
|
-
children: null
|
|
571
|
-
// <div style={{fontSize:24}}>{av.value}</div>
|
|
572
|
-
})
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
526
|
|
|
577
527
|
return (
|
|
578
528
|
<>
|
|
579
|
-
{aggregateVO?.aggregates?.length > 0 ?
|
|
580
|
-
<Card variant="borderless" styles={{ body: { paddingLeft: 10, paddingTop: 4, paddingBottom: 4, paddingRight: 10 } }}>
|
|
581
|
-
<Descriptions
|
|
582
|
-
column={rowTotalCols} colon={false}
|
|
583
|
-
items={aggregateItems}
|
|
584
|
-
/>
|
|
585
|
-
</Card> : null}
|
|
586
529
|
{/*{viewModels.includes("table") ? (*/}
|
|
587
530
|
{/* <Table*/}
|
|
588
531
|
{/* size={tableProps.size ? tableProps.size : undefined}*/}
|