aldehyde 0.2.235 → 0.2.237
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/index.d.ts +2 -0
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/chemstruc/graph.d.ts +2 -0
- package/lib/controls/chemstruc/graph.d.ts.map +1 -1
- package/lib/controls/collapse-card/index.d.ts +2 -0
- package/lib/controls/collapse-card/index.d.ts.map +1 -1
- package/lib/controls/color-picker/index.d.ts +2 -0
- package/lib/controls/color-picker/index.d.ts.map +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +2 -0
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/date-picker/index.d.ts.map +1 -1
- package/lib/controls/date-picker/index.js +9 -1
- package/lib/controls/date-picker/index.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/lab-tree-select.d.ts +2 -0
- package/lib/controls/entity-select/lab-tree-select.d.ts.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.d.ts +2 -0
- package/lib/controls/entity-select/popover-entity-select.d.ts.map +1 -1
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js +4 -1
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/controls/file-view/drawer-file-view.js +1 -1
- package/lib/controls/file-view/drawer-file-view.js.map +1 -1
- package/lib/controls/file-view/index.d.ts +1 -1
- package/lib/controls/file-view/index.d.ts.map +1 -1
- package/lib/controls/file-view/index.js +3 -3
- package/lib/controls/file-view/index.js.map +1 -1
- package/lib/controls/file-view/multi-file-view.d.ts +12 -0
- package/lib/controls/file-view/multi-file-view.d.ts.map +1 -0
- package/lib/controls/file-view/multi-file-view.js +27 -0
- package/lib/controls/file-view/multi-file-view.js.map +1 -0
- package/lib/controls/password-setter/index.d.ts +2 -0
- package/lib/controls/password-setter/index.d.ts.map +1 -1
- package/lib/controls/relation-existion/index.d.ts +2 -0
- package/lib/controls/relation-existion/index.d.ts.map +1 -1
- package/lib/controls/rfield/index.d.ts +2 -0
- package/lib/controls/rfield/index.d.ts.map +1 -1
- package/lib/controls/select/index.d.ts +2 -0
- package/lib/controls/select/index.d.ts.map +1 -1
- package/lib/controls/signature/index.d.ts +2 -0
- package/lib/controls/signature/index.d.ts.map +1 -1
- package/lib/controls/text/ellipsis-text.d.ts +2 -0
- package/lib/controls/text/ellipsis-text.d.ts.map +1 -1
- package/lib/controls/tree-select/tree-entity-select.d.ts.map +1 -1
- package/lib/controls/tree-select/tree-entity-select.js +0 -1
- package/lib/controls/tree-select/tree-entity-select.js.map +1 -1
- package/lib/controls/upload/index.d.ts +2 -0
- package/lib/controls/upload/index.d.ts.map +1 -1
- package/lib/controls/upload/index.js +3 -2
- package/lib/controls/upload/index.js.map +1 -1
- package/lib/controls/upload/mult-file-upload.d.ts +35 -0
- package/lib/controls/upload/mult-file-upload.d.ts.map +1 -0
- package/lib/controls/upload/mult-file-upload.js +181 -0
- package/lib/controls/upload/mult-file-upload.js.map +1 -0
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +3 -1
- package/lib/controls/view-control.js.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +2 -0
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts.map +1 -1
- package/lib/detail/button/bottom-submit-button-bar.d.ts +2 -0
- package/lib/detail/button/bottom-submit-button-bar.d.ts.map +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts +2 -0
- package/lib/detail/button/cquery-button-bar.d.ts.map +1 -1
- package/lib/detail/button/fix-right-submit-button-bar.d.ts +2 -0
- package/lib/detail/button/fix-right-submit-button-bar.d.ts.map +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +2 -0
- package/lib/detail/edit/fields-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts +2 -0
- package/lib/detail/edit/modal-row-edit.d.ts.map +1 -1
- package/lib/detail/edit/row-edit-card.d.ts +2 -0
- package/lib/detail/edit/row-edit-card.d.ts.map +1 -1
- package/lib/detail/rightbar/index.d.ts +2 -0
- package/lib/detail/rightbar/index.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts +2 -0
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +1 -1
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/dtmpl-view.js +0 -3
- package/lib/detail/view/dtmpl-view.js.map +1 -1
- package/lib/detail/view/field-view-group.d.ts +2 -0
- package/lib/detail/view/field-view-group.d.ts.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts +2 -0
- package/lib/detail/view/modal-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts +2 -0
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/detail/view/tab-act-dtmpl-view.d.ts +68 -0
- package/lib/detail/view/tab-act-dtmpl-view.d.ts.map +1 -0
- package/lib/detail/view/tab-act-dtmpl-view.js +182 -0
- package/lib/detail/view/tab-act-dtmpl-view.js.map +1 -0
- package/lib/export/export-frame.d.ts +2 -0
- package/lib/export/export-frame.d.ts.map +1 -1
- package/lib/export/select-code-export-frame.d.ts +2 -0
- package/lib/export/select-code-export-frame.d.ts.map +1 -1
- package/lib/form/criteria-form.d.ts.map +1 -1
- package/lib/form/criteria-form.js +11 -3
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/form/dtmpl-form.d.ts +2 -0
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/field-group-form.d.ts +2 -0
- package/lib/form/field-group-form.d.ts.map +1 -1
- package/lib/form/form-Item-group.d.ts +2 -0
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/form/form-Item-group.js +3 -2
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/hooks/use-match-route/index.d.ts +10 -0
- package/lib/hooks/use-match-route/index.d.ts.map +1 -0
- package/lib/hooks/use-match-route/index.js +41 -0
- package/lib/hooks/use-match-route/index.js.map +1 -0
- package/lib/hooks/use-tabs/index.d.ts +18 -0
- package/lib/hooks/use-tabs/index.d.ts.map +1 -0
- package/lib/hooks/use-tabs/index.js +112 -0
- package/lib/hooks/use-tabs/index.js.map +1 -0
- package/lib/import/excel-import.d.ts +2 -0
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/layout/MainPage.js +1 -1
- package/lib/layout/MainPage.js.map +1 -1
- package/lib/layout/coverstyle.css +1 -1
- package/lib/layout/menu/block.d.ts +2 -0
- package/lib/layout/menu/block.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts +2 -0
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/menu-2layers.d.ts +2 -0
- package/lib/layout/menu/menu-2layers.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.d.ts +2 -0
- package/lib/layout/menu/reset-password.d.ts.map +1 -1
- package/lib/layout/menu/user-bar.d.ts +2 -0
- package/lib/layout/menu/user-bar.d.ts.map +1 -1
- package/lib/layout/menu/userinfo-bar.d.ts +2 -0
- package/lib/layout/menu/userinfo-bar.d.ts.map +1 -1
- package/lib/layout/sidebar/index.js +4 -2
- package/lib/layout/sidebar/index.js.map +1 -1
- package/lib/layout2/components/userButton.d.ts.map +1 -1
- package/lib/layout2/components/userButton.js +9 -2
- package/lib/layout2/components/userButton.js.map +1 -1
- package/lib/layout2/header.d.ts.map +1 -1
- package/lib/layout2/header.js +4 -66
- package/lib/layout2/header.js.map +1 -1
- package/lib/layout2/main.d.ts +1 -1
- package/lib/layout2/main.d.ts.map +1 -1
- package/lib/layout2/main.js +3 -3
- package/lib/layout2/main.js.map +1 -1
- package/lib/layout2/page.d.ts.map +1 -1
- package/lib/layout2/page.js +20 -2
- package/lib/layout2/page.js.map +1 -1
- package/lib/layout2/sider.d.ts +1 -2
- package/lib/layout2/sider.d.ts.map +1 -1
- package/lib/layout2/sider.js +6 -125
- package/lib/layout2/sider.js.map +1 -1
- package/lib/layout2/tabs/tabs-context.d.ts +20 -0
- package/lib/layout2/tabs/tabs-context.d.ts.map +1 -0
- package/lib/layout2/tabs/tabs-context.js +9 -0
- package/lib/layout2/tabs/tabs-context.js.map +1 -0
- package/lib/layout2/tabs/tabs-layout.d.ts +4 -0
- package/lib/layout2/tabs/tabs-layout.d.ts.map +1 -0
- package/lib/layout2/tabs/tabs-layout.js +87 -0
- package/lib/layout2/tabs/tabs-layout.js.map +1 -0
- package/lib/locale/LocaleProvider.d.ts +2 -0
- package/lib/locale/LocaleProvider.d.ts.map +1 -1
- package/lib/locale/LocaleProvider.js +7 -1
- package/lib/locale/LocaleProvider.js.map +1 -1
- package/lib/locale/useLocale.d.ts +2 -0
- package/lib/locale/useLocale.d.ts.map +1 -1
- package/lib/locale/useLocale.js +8 -2
- package/lib/locale/useLocale.js.map +1 -1
- package/lib/login/login.d.ts +2 -0
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login2/login-page.js +1 -1
- package/lib/login2/login-page.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 +0 -1
- 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-view-card.d.ts.map +1 -1
- package/lib/module/dtmpl-view-card.js +0 -10
- package/lib/module/dtmpl-view-card.js.map +1 -1
- package/lib/module/ltmpl-modal.d.ts +2 -0
- package/lib/module/ltmpl-modal.d.ts.map +1 -1
- package/lib/module/ltmpl-table.d.ts +4 -0
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +3 -2
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/routable/dtmpl-route.d.ts.map +1 -1
- package/lib/routable/dtmpl-route.js +2 -2
- package/lib/routable/dtmpl-route.js.map +1 -1
- 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 +20 -13
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/routable/ttmpl-route.d.ts +1 -0
- package/lib/routable/ttmpl-route.d.ts.map +1 -1
- package/lib/routable/ttmpl-route.js +2 -2
- package/lib/routable/ttmpl-route.js.map +1 -1
- package/lib/routable/withroute.d.ts.map +1 -1
- package/lib/routable/withroute.js +8 -2
- package/lib/routable/withroute.js.map +1 -1
- package/lib/table/act-table.d.ts +13 -2
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +117 -55
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-builder.d.ts +1 -0
- package/lib/table/column/column-builder.d.ts.map +1 -1
- package/lib/table/column/column-builder.js +100 -81
- package/lib/table/column/column-builder.js.map +1 -1
- package/lib/table/modal-select-table.d.ts +2 -0
- package/lib/table/modal-select-table.d.ts.map +1 -1
- package/lib/table/modal-select-table.js +1 -1
- package/lib/table/modal-select-table.js.map +1 -1
- package/lib/table/pagination.d.ts +2 -0
- package/lib/table/pagination.d.ts.map +1 -1
- package/lib/table/query-table.d.ts +7 -3
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +62 -12
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +2 -0
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +1 -1
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/select-table.d.ts +2 -0
- package/lib/table/select-table.d.ts.map +1 -1
- package/lib/table/select-table.js +2 -1
- package/lib/table/select-table.js.map +1 -1
- package/lib/table/selected-rows-card.d.ts +3 -0
- package/lib/table/selected-rows-card.d.ts.map +1 -1
- package/lib/table/selected-rows-card.js +2 -1
- package/lib/table/selected-rows-card.js.map +1 -1
- package/lib/table/stat/restat.d.ts +3 -1
- package/lib/table/stat/restat.d.ts.map +1 -1
- package/lib/table/stat/restat.js +1 -1
- package/lib/table/stat/restat.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +5 -2
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +62 -21
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +28 -1
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/tree/act-tree.d.ts +6 -1
- package/lib/tree/act-tree.d.ts.map +1 -1
- package/lib/tree/act-tree.js +5 -5
- package/lib/tree/act-tree.js.map +1 -1
- package/lib/tree/tmpl-tree.d.ts +2 -0
- package/lib/tree/tmpl-tree.d.ts.map +1 -1
- package/lib/tree/tree-utils.js +1 -1
- package/lib/tree/tree-utils.js.map +1 -1
- package/lib/units/index.d.ts +5 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +25 -0
- package/lib/units/index.js.map +1 -1
- package/lib/welcome/quick-entrance.d.ts +2 -0
- package/lib/welcome/quick-entrance.d.ts.map +1 -1
- package/lib/welcome/workbench.d.ts +2 -0
- package/lib/welcome/workbench.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/aldehyde/controls/date-picker/index.tsx +15 -1
- package/src/aldehyde/controls/entry-control.tsx +4 -1
- package/src/aldehyde/controls/file-view/drawer-file-view.tsx +1 -1
- package/src/aldehyde/controls/file-view/index.tsx +4 -4
- package/src/aldehyde/controls/file-view/multi-file-view.tsx +43 -0
- package/src/aldehyde/controls/tree-select/tree-entity-select.tsx +0 -1
- package/src/aldehyde/controls/upload/index.tsx +8 -3
- package/src/aldehyde/controls/upload/mult-file-upload.tsx +216 -0
- package/src/aldehyde/controls/view-control.tsx +3 -1
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +1 -3
- package/src/aldehyde/detail/view/dtmpl-view.tsx +1 -4
- package/src/aldehyde/detail/view/tab-act-dtmpl-view.tsx +304 -0
- package/src/aldehyde/form/criteria-form.tsx +23 -3
- package/src/aldehyde/form/form-Item-group.tsx +4 -3
- package/src/aldehyde/hooks/use-match-route/index.tsx +63 -0
- package/src/aldehyde/hooks/use-tabs/index.tsx +130 -0
- package/src/aldehyde/layout/MainPage.tsx +1 -1
- package/src/aldehyde/layout/coverstyle.css +1 -1
- package/src/aldehyde/layout/sidebar/index.tsx +4 -4
- package/src/aldehyde/layout2/components/userButton.tsx +15 -2
- package/src/aldehyde/layout2/header.tsx +5 -69
- package/src/aldehyde/layout2/main.tsx +4 -3
- package/src/aldehyde/layout2/page.tsx +25 -3
- package/src/aldehyde/layout2/sider.tsx +5 -133
- package/src/aldehyde/layout2/tabs/tabs-context.tsx +30 -0
- package/src/aldehyde/layout2/tabs/tabs-layout.tsx +152 -0
- package/src/aldehyde/locale/LocaleProvider.tsx +13 -2
- package/src/aldehyde/locale/useLocale.ts +10 -2
- package/src/aldehyde/login2/login-page.tsx +1 -1
- package/src/aldehyde/module/dtmpl-edit-card.tsx +0 -1
- package/src/aldehyde/module/dtmpl-view-card.tsx +0 -11
- package/src/aldehyde/module/ltmpl-table.tsx +13 -27
- package/src/aldehyde/routable/dtmpl-route.tsx +2 -1
- package/src/aldehyde/routable/ltmpl-route.tsx +38 -50
- package/src/aldehyde/routable/ttmpl-route.tsx +3 -2
- package/src/aldehyde/routable/withroute.tsx +12 -2
- package/src/aldehyde/table/act-table.tsx +158 -177
- package/src/aldehyde/table/column/column-builder.tsx +256 -257
- package/src/aldehyde/table/modal-select-table.tsx +3 -2
- package/src/aldehyde/table/query-table.tsx +84 -14
- package/src/aldehyde/table/relation-table.tsx +1 -2
- package/src/aldehyde/table/select-table.tsx +2 -1
- package/src/aldehyde/table/selected-rows-card.tsx +3 -0
- package/src/aldehyde/table/stat/restat.tsx +2 -3
- package/src/aldehyde/tmpl/hcservice-v3.tsx +58 -22
- package/src/aldehyde/tmpl/interface.tsx +36 -3
- package/src/aldehyde/tree/act-tree.tsx +7 -5
- package/src/aldehyde/tree/tree-utils.tsx +1 -1
- package/src/aldehyde/units/index.tsx +40 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import Table from "./control-table-x-axis-wrapper";
|
|
3
2
|
import "./index.css";
|
|
4
3
|
import {
|
|
5
4
|
DtmplData,
|
|
6
5
|
PageInfo,
|
|
7
6
|
QueryData,
|
|
8
|
-
SelectedRow, QueryTableProps
|
|
7
|
+
SelectedRow, QueryTableProps, AggregateVO
|
|
9
8
|
} from "../tmpl/interface";
|
|
10
9
|
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
11
10
|
import Pagination from "./pagination";
|
|
@@ -16,6 +15,7 @@ import { LocaleContext } from "../locale/LocaleProvider";
|
|
|
16
15
|
import { init, merge, statistic } from "../utils/dsu";
|
|
17
16
|
import VerticalList from "../list/vertical-list";
|
|
18
17
|
import SummaryBuilder from "./column/summary-builder";
|
|
18
|
+
import {Card, Descriptions, message, Space, Statistic, Table} from "antd";
|
|
19
19
|
|
|
20
20
|
const SortableItem = SortableElement((props) => (
|
|
21
21
|
<tr className="sortable-item-hover" {...props} />
|
|
@@ -34,7 +34,8 @@ interface QueryTableStat {
|
|
|
34
34
|
dataSource?: object[];
|
|
35
35
|
loading?: boolean;
|
|
36
36
|
touchEnd?: boolean;
|
|
37
|
-
|
|
37
|
+
aggregateVO?: AggregateVO;
|
|
38
|
+
beforeSelectedRows?:number;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
@@ -61,7 +62,8 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
61
62
|
dataSource: undefined,
|
|
62
63
|
loading: true,
|
|
63
64
|
touchEnd: undefined,
|
|
64
|
-
|
|
65
|
+
aggregateVO: undefined,
|
|
66
|
+
beforeSelectedRows:undefined,
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
static contextType = LocaleContext;
|
|
@@ -81,7 +83,8 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
81
83
|
async componentDidUpdate(prevProps) {
|
|
82
84
|
const { queryKey: preQueryKey, pageInfo: prePageInfo } = prevProps;
|
|
83
85
|
const { queryKey, pageInfo } = this.props;
|
|
84
|
-
|
|
86
|
+
// const { aggregateVO } = this.state;
|
|
87
|
+
//debugger
|
|
85
88
|
if (queryKey) {
|
|
86
89
|
if (preQueryKey?.key != queryKey.key) {
|
|
87
90
|
await this.loadData(queryKey.key, pageInfo, true);
|
|
@@ -143,7 +146,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
143
146
|
let queryCache: Map<string, CacheData>;
|
|
144
147
|
if (cleanCache || !queryDataCache) {
|
|
145
148
|
queryCache = new Map<string, CacheData>();
|
|
146
|
-
this.setState({
|
|
149
|
+
this.setState({ aggregateVO: undefined });
|
|
147
150
|
} else {
|
|
148
151
|
queryCache = queryDataCache;
|
|
149
152
|
}
|
|
@@ -186,6 +189,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
186
189
|
pageInfo,
|
|
187
190
|
});
|
|
188
191
|
this.setState({
|
|
192
|
+
beforeSelectedRows:queryData.beforeSelectedRows,
|
|
189
193
|
dataSource,
|
|
190
194
|
virtualEndPageNo: pageInfo.virtualEndPageNo,
|
|
191
195
|
queryDataCache: queryCache,
|
|
@@ -216,10 +220,15 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
216
220
|
};
|
|
217
221
|
|
|
218
222
|
queryTotal = async () => {
|
|
219
|
-
const { queryKey, serverKey } = this.props;
|
|
220
|
-
let
|
|
223
|
+
const { queryKey, serverKey,queryTotal } = this.props;
|
|
224
|
+
let aggregateVO;
|
|
225
|
+
if(queryTotal){
|
|
226
|
+
aggregateVO= await queryTotal();
|
|
227
|
+
}else{
|
|
228
|
+
aggregateVO = await HcserviceV3.requestQueryAggregates(serverKey, queryKey.key);
|
|
229
|
+
}
|
|
221
230
|
this.setState({
|
|
222
|
-
|
|
231
|
+
aggregateVO,
|
|
223
232
|
});
|
|
224
233
|
};
|
|
225
234
|
|
|
@@ -231,7 +240,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
231
240
|
maxSelectedRows,
|
|
232
241
|
primaryColumn,
|
|
233
242
|
} = this.props;
|
|
234
|
-
let { dataSource } = this.state;
|
|
243
|
+
let { dataSource,beforeSelectedRows } = this.state;
|
|
235
244
|
let selectedRowKeys = [];
|
|
236
245
|
|
|
237
246
|
for (let row of selectedRows) {
|
|
@@ -243,14 +252,50 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
243
252
|
allRowKeys.push(d.code);
|
|
244
253
|
}
|
|
245
254
|
}
|
|
246
|
-
|
|
255
|
+
|
|
256
|
+
let tmplMax=maxSelectedRows?maxSelectedRows:0;
|
|
257
|
+
if(beforeSelectedRows>0){
|
|
258
|
+
tmplMax=tmplMax-beforeSelectedRows;
|
|
259
|
+
}
|
|
260
|
+
const { translate } = this.context;
|
|
261
|
+
|
|
262
|
+
if (tmplMax <= -1) {
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (beforeSelectedRows>0 && tmplMax<=0) {
|
|
267
|
+
message.warning(translate("${已选超}") );
|
|
247
268
|
return null;
|
|
248
269
|
}
|
|
270
|
+
|
|
249
271
|
const rowSelection: TableRowSelection<any> = {
|
|
272
|
+
|
|
250
273
|
fixed: true,
|
|
251
274
|
type: maxSelectedRows == 1 ? "radio" : "checkbox",
|
|
252
275
|
selectedRowKeys,
|
|
253
276
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
277
|
+
|
|
278
|
+
if(tmplMax > 0 && selectedRowKeys.length > tmplMax){
|
|
279
|
+
|
|
280
|
+
message.error(translate("${最多只能选择}") + " : "+ tmplMax);
|
|
281
|
+
// message.error({
|
|
282
|
+
// //type: 'error',
|
|
283
|
+
// content: translate("${最多只能选择}") + " : "+ tmplMax,
|
|
284
|
+
// style: {
|
|
285
|
+
// zIndex: 12000,
|
|
286
|
+
// },
|
|
287
|
+
// duration:5
|
|
288
|
+
// });
|
|
289
|
+
|
|
290
|
+
// messageApi.open({
|
|
291
|
+
// type: 'error',
|
|
292
|
+
// content: translate("${最多只能选择}") + " : "+ tmplMax,
|
|
293
|
+
// style: {
|
|
294
|
+
// zIndex: 2000,
|
|
295
|
+
// },
|
|
296
|
+
// });
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
254
299
|
let selectedRows_: SelectedRow[] = [];
|
|
255
300
|
let selectedDatas: DtmplData[] = [];
|
|
256
301
|
let titleColId = primaryColumn?.id;
|
|
@@ -349,7 +394,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
349
394
|
serverKey,
|
|
350
395
|
} = this.props;
|
|
351
396
|
//debugger
|
|
352
|
-
const { touchEnd,
|
|
397
|
+
const { touchEnd, aggregateVO, loading, virtualEndPageNo,dataSource } = this.state;
|
|
353
398
|
|
|
354
399
|
const isProSumarryTable = Boolean(subtotalXColumn );
|
|
355
400
|
const { translate } = this.context;
|
|
@@ -443,7 +488,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
443
488
|
}
|
|
444
489
|
}
|
|
445
490
|
const mergeMp = statistic();
|
|
446
|
-
console.log("统计结果", mergeMp);
|
|
491
|
+
//console.log("统计结果", mergeMp);
|
|
447
492
|
|
|
448
493
|
// 给 col 添加 mergeRowInCol
|
|
449
494
|
current_cols.forEach(
|
|
@@ -451,9 +496,34 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
451
496
|
(col.onCell = (_, rowIdx) =>
|
|
452
497
|
this.mergeRowInCol(_, rowIdx, colIdx, mergeMp, current_cols.length))
|
|
453
498
|
);
|
|
499
|
+
let aggregateItems=[];
|
|
500
|
+
if(aggregateVO && aggregateVO.aggregates){
|
|
501
|
+
aggregateVO.aggregates.forEach(av=>{
|
|
502
|
+
aggregateItems.push({key: av.fieldId,
|
|
503
|
+
label: <div style={{fontSize:14}}>{av.fieldTitle}</div>,
|
|
504
|
+
children: <Statistic value={av.value?av.value:0} />
|
|
505
|
+
// <div style={{fontSize:24}}>{av.value}</div>
|
|
506
|
+
})
|
|
507
|
+
})
|
|
508
|
+
}
|
|
454
509
|
|
|
455
510
|
return (
|
|
456
511
|
<>
|
|
512
|
+
{/*{aggregateVO && aggregateVO.aggregates && aggregateVO.aggregates.length>0?<Card styles={{body:{padding:2}}}>*/}
|
|
513
|
+
{/* <Space size={"large"} style={{marginLeft:50}}>*/}
|
|
514
|
+
{/* {*/}
|
|
515
|
+
{/* aggregateVO.aggregates.map(av=>{*/}
|
|
516
|
+
{/* return <Statistic title={av.fieldTitle} value={av.value} />*/}
|
|
517
|
+
{/* })}*/}
|
|
518
|
+
{/* </Space>*/}
|
|
519
|
+
{/*</Card>:null}*/}
|
|
520
|
+
{aggregateVO && aggregateVO.aggregates && aggregateVO.aggregates.length>0 ?
|
|
521
|
+
<Card variant="borderless" styles={{body:{paddingLeft:10,paddingTop:4,paddingBottom:4,paddingRight:10}}}>
|
|
522
|
+
<Descriptions
|
|
523
|
+
column={6}
|
|
524
|
+
items={aggregateItems}
|
|
525
|
+
/>
|
|
526
|
+
</Card>:null}
|
|
457
527
|
{viewModels.includes("table") ? (
|
|
458
528
|
<Table
|
|
459
529
|
size={tableProps.size ? tableProps.size : undefined}
|
|
@@ -489,7 +559,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
489
559
|
pageInfo={{ ...pageInfo, virtualEndPageNo }}
|
|
490
560
|
pageTo={this.pageTo}
|
|
491
561
|
queryTotal={this.queryTotal}
|
|
492
|
-
total={
|
|
562
|
+
total={aggregateVO?.count}
|
|
493
563
|
/>
|
|
494
564
|
{viewModels.includes("verticalList") ? (
|
|
495
565
|
<VerticalList hiddenRowCodes={hiddenRowCodes}
|
|
@@ -755,9 +755,8 @@ class RelationTable extends React.PureComponent<
|
|
|
755
755
|
tip={fieldGroupConfig.tip}
|
|
756
756
|
id={parentId + fieldGroupConfig.id}
|
|
757
757
|
className={`hoverable`}
|
|
758
|
-
|
|
758
|
+
styles={{header:{ background: "#f2f4f5" },body:{ padding: "6px" }}}
|
|
759
759
|
loading={loading}
|
|
760
|
-
bodyStyle={{ padding: "6px" }}
|
|
761
760
|
//暂时注释掉,后续要支持配置。
|
|
762
761
|
//extra={<Input.Search onSearch={this.searchValue} allowClear placeholder=""/>}
|
|
763
762
|
>
|
|
@@ -246,6 +246,7 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
246
246
|
(actions && actions.length > 0) || (jumps && jumps.length > 0) || (fileExports && fileExports.length>0)) {
|
|
247
247
|
displayCriteriaCard = true;
|
|
248
248
|
}
|
|
249
|
+
// debugger
|
|
249
250
|
return (
|
|
250
251
|
// <Card
|
|
251
252
|
// // title={<SelectedRowsCard value={selectedRows} onChange={this.changeRowSelection}></SelectedRowsCard>}
|
|
@@ -258,7 +259,7 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
258
259
|
<CriteriaForm serverKey={serverKey} selectedRows={selectedRows} selectedDatas={selectedDatas} ltmplConfig={selectConfig}
|
|
259
260
|
data={criteriaData}
|
|
260
261
|
doSearch={this.doSearch} loading={loading}/>
|
|
261
|
-
<QueryTable serverKey={serverKey} maxSelectedRows={maxSelectedRows} selectedRows={selectedRows}
|
|
262
|
+
<QueryTable serverKey={serverKey} maxSelectedRows={maxSelectedRows?maxSelectedRows:selectConfig.maxSelectedRows} selectedRows={selectedRows}
|
|
262
263
|
primaryColumn={selectConfig.primaryColumn}
|
|
263
264
|
columns={columns}
|
|
264
265
|
pageInfo={{pageNo,
|
|
@@ -7,6 +7,7 @@ import { LocaleContext } from "../locale/LocaleProvider";
|
|
|
7
7
|
interface SelectedRowsCardProps {
|
|
8
8
|
value: SelectedRow[];
|
|
9
9
|
onChange?: (value: SelectedRow[]) => void;
|
|
10
|
+
message?: string;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
interface SelectedRowsCardStat {}
|
|
@@ -66,6 +67,8 @@ class SelectedRowsCard extends React.PureComponent<
|
|
|
66
67
|
<h3>
|
|
67
68
|
{translate("${查询点选}:")}
|
|
68
69
|
{this.renderTag()}
|
|
70
|
+
{this.props.message}
|
|
71
|
+
{}
|
|
69
72
|
</h3>
|
|
70
73
|
</div>
|
|
71
74
|
);
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
Card,
|
|
5
5
|
Form as AntdForm,
|
|
6
6
|
FormInstance,
|
|
7
|
-
Popconfirm,
|
|
8
7
|
Popover,
|
|
9
8
|
Space,
|
|
10
9
|
Tooltip,
|
|
@@ -16,7 +15,7 @@ import FormItemGroup from "../../form/form-Item-group";
|
|
|
16
15
|
import HcserviceV3 from "../../tmpl/hcservice-v3";
|
|
17
16
|
import { LocaleContext } from "../../locale/LocaleProvider";
|
|
18
17
|
interface RestatProps {
|
|
19
|
-
onfinish: () => void;
|
|
18
|
+
onfinish: (value) => void;
|
|
20
19
|
fields: FieldConfig[];
|
|
21
20
|
value?: object;
|
|
22
21
|
serverKey?: string;
|
|
@@ -46,7 +45,7 @@ class Restat extends React.PureComponent<RestatProps, RestatStat> {
|
|
|
46
45
|
this.setState({
|
|
47
46
|
loading: false,
|
|
48
47
|
});
|
|
49
|
-
onfinish();
|
|
48
|
+
onfinish(val);
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
render() {
|
|
@@ -57,21 +57,29 @@ export default class HcserviceV3 {
|
|
|
57
57
|
filePath.contentType = this.getFileSuffixFrom(filePath.fileName);
|
|
58
58
|
} else {
|
|
59
59
|
let jsonValue = this.getJsonValue(value);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
filePath.path = this.getFileUrl(serverKey, jsonValue.base?.path);
|
|
63
|
-
filePath.iconPath = jsonValue.icon?.path ? this.getFileUrl(serverKey, jsonValue.icon?.path) : null;
|
|
64
|
-
filePath.fileName = jsonValue.fileName ? jsonValue.fileName : this.getFileNameFrom(jsonValue.base?.path);
|
|
65
|
-
filePath.contentType = this.getFileSuffixFrom(filePath.fileName);
|
|
66
|
-
filePath.valid = jsonValue.valid;
|
|
67
|
-
filePath.baseType=jsonValue.base?.type;
|
|
68
|
-
filePath.basePath=jsonValue.base?.path;
|
|
69
|
-
}
|
|
60
|
+
filePath=this.toFilePathObject(jsonValue,serverKey);
|
|
70
61
|
}
|
|
62
|
+
}else if(value.base){
|
|
63
|
+
filePath=this.toFilePathObject(value,serverKey);
|
|
71
64
|
}
|
|
72
65
|
return filePath;
|
|
73
66
|
}
|
|
74
67
|
|
|
68
|
+
static toFilePathObject(jsonValue,serverKey:string){
|
|
69
|
+
let filePath:any={};
|
|
70
|
+
if (jsonValue) {
|
|
71
|
+
filePath.path = this.getFileUrl(serverKey, jsonValue.base?.path);
|
|
72
|
+
filePath.iconPath = jsonValue.icon?.path ? this.getFileUrl(serverKey, jsonValue.icon?.path) : null;
|
|
73
|
+
filePath.fileName = jsonValue.fileName ? jsonValue.fileName : this.getFileNameFrom(jsonValue.base?.path);
|
|
74
|
+
filePath.contentType = this.getFileSuffixFrom(filePath.fileName);
|
|
75
|
+
filePath.valid = jsonValue.valid;
|
|
76
|
+
filePath.baseType=jsonValue.base?.type;
|
|
77
|
+
filePath.basePath=jsonValue.base?.path;
|
|
78
|
+
return filePath;
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
|
|
75
83
|
static async requestEnumWithPath(serverKey: string, mstrucIds, path) {
|
|
76
84
|
if (mstrucIds.length > 0) {
|
|
77
85
|
let res = await Super.super({
|
|
@@ -667,23 +675,36 @@ export default class HcserviceV3 {
|
|
|
667
675
|
}
|
|
668
676
|
}
|
|
669
677
|
|
|
670
|
-
static async
|
|
678
|
+
static async requestQueryAggregates(serverKey: string, queryKey: string) {
|
|
671
679
|
let res = await Super.super({
|
|
672
680
|
url: `/v3/ltmpl/query/count`,
|
|
673
681
|
serverKey,
|
|
674
682
|
method: "GET",
|
|
675
683
|
query: { queryKey },
|
|
676
684
|
});
|
|
677
|
-
return res
|
|
685
|
+
return res;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
static async doPostRequest(serverKey: string, url:string,params?:object) {
|
|
689
|
+
let res = await Super.super({
|
|
690
|
+
url,
|
|
691
|
+
serverKey,
|
|
692
|
+
method: "POST",
|
|
693
|
+
data: { ...params },
|
|
694
|
+
});
|
|
695
|
+
return res;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
static async doGetRequest(serverKey: string, url:string,params?:object) {
|
|
699
|
+
let res = await Super.super({
|
|
700
|
+
url,
|
|
701
|
+
serverKey,
|
|
702
|
+
method: "GET",
|
|
703
|
+
query: { ...params },
|
|
704
|
+
});
|
|
705
|
+
return res;
|
|
678
706
|
}
|
|
679
707
|
|
|
680
|
-
// static async requestFile(path) {
|
|
681
|
-
// let res = await Super.super({
|
|
682
|
-
// url: Units.joinPath("/v3/files/", path),
|
|
683
|
-
// method: "GET"
|
|
684
|
-
// });
|
|
685
|
-
// return res;
|
|
686
|
-
// }
|
|
687
708
|
|
|
688
709
|
static async postActions(
|
|
689
710
|
serverKey: string,
|
|
@@ -863,13 +884,28 @@ export default class HcserviceV3 {
|
|
|
863
884
|
Units.openFile(path, fileName, toolbar);
|
|
864
885
|
}
|
|
865
886
|
|
|
866
|
-
static getFileUrl(serverKey: string, path) {
|
|
887
|
+
static getFileUrl(serverKey: string, path:string) {
|
|
867
888
|
const hydrocarbonToken = Units.hydrocarbonToken(
|
|
868
889
|
Units.programCode(serverKey)
|
|
869
890
|
);
|
|
870
|
-
let
|
|
871
|
-
|
|
891
|
+
let root;
|
|
892
|
+
let url;
|
|
893
|
+
//判断是否为全URL
|
|
894
|
+
if(path?.startsWith("http") || path?.startsWith("HTTP")){
|
|
895
|
+
root=path;
|
|
896
|
+
if(path.indexOf("?")>0){
|
|
897
|
+
url = root +
|
|
898
|
+
`&@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
899
|
+
}else{
|
|
900
|
+
url = root +
|
|
901
|
+
`?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
902
|
+
}
|
|
903
|
+
}else{
|
|
904
|
+
root=Units.joinPath(Units.api(serverKey), Units.joinPath("/v3/files", path));
|
|
905
|
+
url = root +
|
|
872
906
|
`?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
907
|
+
}
|
|
908
|
+
|
|
873
909
|
let encodeUri = encodeURI(url);
|
|
874
910
|
return encodeUri;
|
|
875
911
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MenuProps } from "antd/lib/menu";
|
|
2
2
|
import { FormInstance } from "antd";
|
|
3
|
-
import React, {
|
|
3
|
+
import React, {HTMLAttributeAnchorTarget, ReactDOM, RefObject} from "react";
|
|
4
4
|
import { ButtonShape, ButtonType } from "antd/lib/button";
|
|
5
5
|
|
|
6
6
|
export type ViewOrEdit = "view" | "edit";
|
|
@@ -16,8 +16,18 @@ export type StatColType = "fact" | "dimension";
|
|
|
16
16
|
export type ActTableViewModel = "table" | "verticalList" | "horizontalList";
|
|
17
17
|
|
|
18
18
|
export type ControlHolderType = "table" | "descriptions";
|
|
19
|
+
|
|
19
20
|
export type PageType = "modal" | "drawer" |"card"| "routing" |"blank";
|
|
20
21
|
|
|
22
|
+
export type CustomButtonType = "request_refresh" | "show_window" |"do_event";
|
|
23
|
+
|
|
24
|
+
export interface CustomButtonConfig{
|
|
25
|
+
getRequestUrl?:(customButton: CustomButton, records?: DtmplData[])=>string;
|
|
26
|
+
doAction?:(customButton: CustomButton, records: DtmplData[])=>void;
|
|
27
|
+
getCurrentPage?:(customButton: CustomButton, records: DtmplData[])=>any;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
21
31
|
export interface ReportTableProps {
|
|
22
32
|
tableProps?: {
|
|
23
33
|
size?: "small" | "middle" | "large";
|
|
@@ -39,7 +49,6 @@ export interface ReportTableProps {
|
|
|
39
49
|
}
|
|
40
50
|
export interface QueryTableProps extends ReportTableProps{
|
|
41
51
|
viewModels?: ActTableViewModel[];
|
|
42
|
-
// defaultPageSize?: number;
|
|
43
52
|
pageInfo: {
|
|
44
53
|
pageNo: number;
|
|
45
54
|
pageSize: number;
|
|
@@ -57,6 +66,19 @@ export interface QueryTableProps extends ReportTableProps{
|
|
|
57
66
|
groupIColumns?: { id: string; title: string; sourceId: string }[]; // 组间合计key
|
|
58
67
|
doSearch?: (params: object) => void;
|
|
59
68
|
sortColumnData?: string[];
|
|
69
|
+
queryTotal?:()=> any;//暂时无用
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface AggregateVO {
|
|
73
|
+
queryKey?: string;
|
|
74
|
+
aggregates?: AggregateValue[];
|
|
75
|
+
count?: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface AggregateValue {
|
|
79
|
+
fieldTitle?: string;
|
|
80
|
+
fieldId?: string;
|
|
81
|
+
value?: number;
|
|
60
82
|
}
|
|
61
83
|
|
|
62
84
|
|
|
@@ -118,7 +140,7 @@ export interface CustomButton extends ButtonConfig {
|
|
|
118
140
|
path:string;
|
|
119
141
|
params:string;
|
|
120
142
|
requestMethod:string;
|
|
121
|
-
doType:
|
|
143
|
+
doType:CustomButtonType;
|
|
122
144
|
windowPosition:'under-table'|'above-table'|'modal-window'|'left-drawer'|'right-drawer';
|
|
123
145
|
windowHeight:string;
|
|
124
146
|
windowWidth:string;
|
|
@@ -304,6 +326,8 @@ export interface DtmplConfig extends TmplBase {
|
|
|
304
326
|
editAction?: ActionConfig;
|
|
305
327
|
actions?: ActionConfig[];
|
|
306
328
|
viewActions?: ActionConfig[];
|
|
329
|
+
viewRactions?:RActionConfig[];
|
|
330
|
+
editRactions?:RActionConfig[];
|
|
307
331
|
premises?: FieldConfig[];
|
|
308
332
|
groups?: FieldGroupConfig[];
|
|
309
333
|
buttonPosition?: ButtonPosition;
|
|
@@ -389,6 +413,8 @@ export interface SelectConfig extends TmplBase {
|
|
|
389
413
|
defaultPageSize: number;
|
|
390
414
|
buttons: ButtonName[];
|
|
391
415
|
builtInButtons: BuiltInButtonName[];
|
|
416
|
+
defShowCriteriaCount:number;
|
|
417
|
+
defShowRowActionCount:number;
|
|
392
418
|
columns: ColumnConfig[];
|
|
393
419
|
criterias: CriteriaConfig[];
|
|
394
420
|
defaultCriteriaValue?: object;
|
|
@@ -401,6 +427,8 @@ export interface SelectConfig extends TmplBase {
|
|
|
401
427
|
scrollY?:number;
|
|
402
428
|
directShowTotal?: boolean;
|
|
403
429
|
leftFixedCols?: number;
|
|
430
|
+
minSelectRows?: number;
|
|
431
|
+
maxSelectRows?: number;
|
|
404
432
|
onCriteriaValuesChange?: (
|
|
405
433
|
changedValues,
|
|
406
434
|
allValues: DtmplData,
|
|
@@ -550,6 +578,7 @@ export interface QueryData {
|
|
|
550
578
|
touchEnd: boolean;
|
|
551
579
|
key: string;
|
|
552
580
|
pageInfo: PageInfo;
|
|
581
|
+
beforeSelectedRows:number;
|
|
553
582
|
}
|
|
554
583
|
|
|
555
584
|
export interface ReportData {
|
|
@@ -595,6 +624,7 @@ export interface RouterCompProps {
|
|
|
595
624
|
navigate?: any;
|
|
596
625
|
params: any;
|
|
597
626
|
searchParams: any;
|
|
627
|
+
// routeMode?:'multiple'|'single';
|
|
598
628
|
}
|
|
599
629
|
|
|
600
630
|
export interface TmplBaseProps {
|
|
@@ -655,6 +685,9 @@ export interface FileLoadInfo {
|
|
|
655
685
|
}
|
|
656
686
|
|
|
657
687
|
export interface FileValue {
|
|
688
|
+
uid?:string,
|
|
689
|
+
url?:string,
|
|
690
|
+
status?:string,
|
|
658
691
|
valid: FileValueValid;
|
|
659
692
|
fileKey?: string;
|
|
660
693
|
fileName?: string;
|
|
@@ -12,6 +12,7 @@ const { Text, Title } = Typography;
|
|
|
12
12
|
|
|
13
13
|
interface ActTreeProps {
|
|
14
14
|
ttmplConfig: TtmplConfig;
|
|
15
|
+
top:number,
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
interface ActTreeState {
|
|
@@ -29,7 +30,7 @@ export default class ActTree extends React.PureComponent<
|
|
|
29
30
|
ActTreeProps,
|
|
30
31
|
ActTreeState
|
|
31
32
|
> {
|
|
32
|
-
static defaultProps = {};
|
|
33
|
+
static defaultProps = {top:66};
|
|
33
34
|
state = {
|
|
34
35
|
ttmplNodeConfig: undefined,
|
|
35
36
|
recordCode: undefined,
|
|
@@ -137,8 +138,9 @@ export default class ActTree extends React.PureComponent<
|
|
|
137
138
|
};
|
|
138
139
|
|
|
139
140
|
render() {
|
|
140
|
-
const {} = this.props;
|
|
141
|
-
const { translate } = this.context;
|
|
141
|
+
const {top} = this.props;
|
|
142
|
+
const { translate,siderCollapsed } = this.context;
|
|
143
|
+
|
|
142
144
|
|
|
143
145
|
const {
|
|
144
146
|
ttmplNodeConfig,
|
|
@@ -162,9 +164,9 @@ export default class ActTree extends React.PureComponent<
|
|
|
162
164
|
height: "90vh",
|
|
163
165
|
position: "fixed",
|
|
164
166
|
left: 0,
|
|
165
|
-
top:
|
|
167
|
+
top: top,
|
|
166
168
|
bottom: 0,
|
|
167
|
-
marginLeft: 210,
|
|
169
|
+
marginLeft: siderCollapsed?10:210,
|
|
168
170
|
}}
|
|
169
171
|
>
|
|
170
172
|
<TmplTree
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import React from 'react'
|
|
2
2
|
import {
|
|
3
|
-
CriteriaConfig,
|
|
3
|
+
CriteriaConfig, CustomButtonConfig,
|
|
4
4
|
DtmplConfig,
|
|
5
5
|
DtmplData,
|
|
6
6
|
DtmplFormProps,
|
|
@@ -18,6 +18,10 @@ let storageKeyPrefix = undefined;
|
|
|
18
18
|
|
|
19
19
|
const CUSTOM_PAGE_MAP = {};
|
|
20
20
|
|
|
21
|
+
let MENU_MAP = {};
|
|
22
|
+
|
|
23
|
+
const CustomButtonConfig_Map={}
|
|
24
|
+
|
|
21
25
|
const CUSTOM_VIEW_CONTROL_MAP = {};
|
|
22
26
|
|
|
23
27
|
const AppDtmplConfigFuncMap = {};
|
|
@@ -30,6 +34,8 @@ const extendServerMap = {};
|
|
|
30
34
|
|
|
31
35
|
let antdUseToken = undefined;
|
|
32
36
|
|
|
37
|
+
// let siderCollapsed:boolean = true;
|
|
38
|
+
|
|
33
39
|
export default {
|
|
34
40
|
setAntdUseToken(antdUseToken_) {
|
|
35
41
|
antdUseToken = antdUseToken_;
|
|
@@ -46,6 +52,26 @@ export default {
|
|
|
46
52
|
AppDtmplConfigFuncMap[key] = func;
|
|
47
53
|
},
|
|
48
54
|
|
|
55
|
+
// setSiderCollapsed(collapsed){
|
|
56
|
+
// siderCollapsed=collapsed;
|
|
57
|
+
// },
|
|
58
|
+
//
|
|
59
|
+
// isSiderCollapsed(){
|
|
60
|
+
// return siderCollapsed;
|
|
61
|
+
// },
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
setMenuMap(menuMap){
|
|
65
|
+
MENU_MAP=menuMap;
|
|
66
|
+
},
|
|
67
|
+
mapMenu(menuId){
|
|
68
|
+
if(menuId=='home'){
|
|
69
|
+
return "首页"
|
|
70
|
+
}
|
|
71
|
+
return MENU_MAP[menuId];
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
|
|
49
75
|
getAppDtmplConfig(
|
|
50
76
|
dtmplConfig: DtmplConfig,
|
|
51
77
|
dtmplData: DtmplData,
|
|
@@ -70,6 +96,19 @@ export default {
|
|
|
70
96
|
return dtmplConfig;
|
|
71
97
|
},
|
|
72
98
|
|
|
99
|
+
setCustomButtonConfig(
|
|
100
|
+
key: string,
|
|
101
|
+
config : CustomButtonConfig
|
|
102
|
+
) {
|
|
103
|
+
CustomButtonConfig_Map[key] = config;
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
getCustomButtonConfig(
|
|
107
|
+
key: string
|
|
108
|
+
) {
|
|
109
|
+
return CustomButtonConfig_Map[key];
|
|
110
|
+
},
|
|
111
|
+
|
|
73
112
|
setAppCtmplConfigFunc(
|
|
74
113
|
key: string,
|
|
75
114
|
func: (ltmplConfig: SelectConfig, data: Object) => SelectConfig
|