aldehyde 0.2.514 → 0.2.516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controls/direct-file-view/index.d.ts +1 -1
- package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +99 -99
- package/lib/detail/button/cquery-button-bar.d.ts +1 -1
- package/lib/detail/rightbar/index.d.ts +1 -1
- package/lib/draw-canvas-edit/components/asset-bar/index.js +3 -3
- package/lib/draw-canvas-edit/components/asset-bar/index.js.map +1 -1
- package/lib/draw-canvas-edit/components/asset-bar/index.less +35 -35
- package/lib/draw-canvas-edit/components/main-header/index.less +23 -23
- package/lib/form/field-group-form.d.ts +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts +1 -1
- package/lib/layout2/page.d.ts.map +1 -1
- package/lib/layout2/page.js +3 -0
- package/lib/layout2/page.js.map +1 -1
- package/lib/layout3/css/main.less +17 -17
- package/lib/layout4/css/main.less +18 -17
- package/lib/locale/LocaleProvider.d.ts.map +1 -1
- package/lib/locale/LocaleProvider.js +4 -2
- package/lib/locale/LocaleProvider.js.map +1 -1
- package/lib/lowcode-components/base-table/index.less +61 -61
- package/lib/lowcode-components/data-number/index.less +10 -10
- package/lib/lowcode-components/date-time/index.less +4 -4
- package/lib/lowcode-components/four-angle-glow-border/index.less +49 -49
- package/lib/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
- package/lib/lowcode-components/lowcode-view/component/group-layer/index.d.ts +1 -1
- package/lib/lowcode-components/lowcode-view/component/screen-fit/index.less +13 -13
- package/lib/lowcode-components/text-scroller/index.less +28 -28
- package/lib/module/index.less +6 -0
- package/lib/module/ltmpl-table.d.ts +3 -0
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +2 -2
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/module/ttmpl-table.d.ts +41 -0
- package/lib/module/ttmpl-table.d.ts.map +1 -0
- package/lib/module/ttmpl-table.js +188 -0
- package/lib/module/ttmpl-table.js.map +1 -0
- package/lib/routable/index.less +6 -0
- package/lib/routable/ttmpl-table-route.d.ts +12 -0
- package/lib/routable/ttmpl-table-route.d.ts.map +1 -0
- package/lib/routable/ttmpl-table-route.js +283 -0
- package/lib/routable/ttmpl-table-route.js.map +1 -0
- package/lib/table/act-table.d.ts +11 -3
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +2 -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 +7 -3
- package/lib/table/column/column-builder.js.map +1 -1
- package/lib/table/index.css +2 -2
- package/lib/table/l2-act-table.d.ts +1 -1
- package/lib/table/page-chart.d.ts +1 -1
- package/lib/table/pagination.d.ts +1 -0
- package/lib/table/pagination.d.ts.map +1 -1
- package/lib/table/pagination.js +5 -4
- package/lib/table/pagination.js.map +1 -1
- package/lib/table/query-table.d.ts +2 -0
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +10 -6
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +2 -2
- package/lib/tmpl/hc-data-source.d.ts +2 -1
- package/lib/tmpl/hc-data-source.d.ts.map +1 -1
- package/lib/tmpl/hc-data-source.js +12 -0
- package/lib/tmpl/hc-data-source.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 +12 -0
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +16 -1
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/welcome/components/page-card.d.ts +1 -1
- package/package.json +4 -2
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +99 -99
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.json +156 -156
- package/src/aldehyde/draw-canvas-edit/components/asset-bar/index.less +35 -35
- package/src/aldehyde/draw-canvas-edit/components/asset-bar/index.tsx +110 -110
- package/src/aldehyde/draw-canvas-edit/components/main-header/index.less +23 -23
- package/src/aldehyde/draw-canvas-edit/components/main-header/index.tsx +263 -263
- package/src/aldehyde/draw-canvas-edit/components/render/draws/index.ts +7 -7
- package/src/aldehyde/draw-canvas-edit/components/render/graphs/base-graph.ts +241 -241
- package/src/aldehyde/draw-canvas-edit/components/render/graphs/circle.ts +699 -699
- package/src/aldehyde/draw-canvas-edit/components/render/graphs/curve.ts +500 -500
- package/src/aldehyde/draw-canvas-edit/components/render/graphs/index.ts +5 -5
- package/src/aldehyde/draw-canvas-edit/components/render/graphs/line.ts +493 -493
- package/src/aldehyde/draw-canvas-edit/components/render/graphs/rect.ts +680 -680
- package/src/aldehyde/draw-canvas-edit/components/render/handlers/drag-handlers.ts +68 -68
- package/src/aldehyde/draw-canvas-edit/components/render/handlers/graph-handlers.ts +113 -113
- package/src/aldehyde/draw-canvas-edit/components/render/handlers/index.ts +9 -9
- package/src/aldehyde/draw-canvas-edit/components/render/handlers/key-move-handlers.ts +49 -49
- package/src/aldehyde/draw-canvas-edit/components/render/handlers/link-handlers.ts +45 -45
- package/src/aldehyde/draw-canvas-edit/components/render/handlers/shutcut-handlers.ts +45 -45
- package/src/aldehyde/draw-canvas-edit/components/render/handlers/text-handlers.ts +81 -81
- package/src/aldehyde/draw-canvas-edit/components/render/handlers/zoom-handlers.ts +59 -59
- package/src/aldehyde/draw-canvas-edit/components/render/tools/align-tool.ts +89 -89
- package/src/aldehyde/draw-canvas-edit/components/render/tools/asset-tool.ts +154 -154
- package/src/aldehyde/draw-canvas-edit/components/render/tools/link-tool.ts +222 -222
- package/src/aldehyde/draw-canvas-edit/components/render/tools/z-index-tool.ts +224 -224
- package/src/aldehyde/draw-canvas-edit/components/render/utils/a-star.ts +116 -116
- package/src/aldehyde/draw-canvas-edit/components/render/utils/bezier-scene-func.ts +72 -72
- package/src/aldehyde/draw-canvas-edit/components/setting-form/imag-upload.tsx +119 -119
- package/src/aldehyde/index.tsx +3 -1
- package/src/aldehyde/layout2/page.tsx +3 -0
- package/src/aldehyde/layout3/css/main.less +17 -17
- package/src/aldehyde/layout4/css/main.less +18 -17
- package/src/aldehyde/layout4/imgs/user.svg +26 -26
- package/src/aldehyde/locale/LocaleProvider.tsx +4 -2
- package/src/aldehyde/lowcode-components/base-color-block/index.tsx +31 -31
- package/src/aldehyde/lowcode-components/base-table/index.less +61 -61
- package/src/aldehyde/lowcode-components/data-number/index.less +10 -10
- package/src/aldehyde/lowcode-components/date-time/index.less +4 -4
- package/src/aldehyde/lowcode-components/date-time/index.tsx +64 -64
- package/src/aldehyde/lowcode-components/four-angle-glow-border/index.less +49 -49
- package/src/aldehyde/lowcode-components/four-angle-glow-border/index.tsx +53 -53
- package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-controller.ts +64 -64
- package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-definition.ts +77 -77
- package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-designer-loader.ts +36 -36
- package/src/aldehyde/lowcode-components/lowcode-view/component/component-container.tsx +144 -144
- package/src/aldehyde/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
- package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/controller.ts +36 -36
- package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/definition.ts +53 -53
- package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/index.tsx +15 -15
- package/src/aldehyde/lowcode-components/lowcode-view/component/layer-builder.tsx +98 -98
- package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.less +13 -13
- package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.tsx +121 -121
- package/src/aldehyde/lowcode-components/placeholder-component/index.tsx +81 -81
- package/src/aldehyde/lowcode-components/text-scroller/index.less +28 -28
- package/src/aldehyde/lowcode-components/text-scroller/index.tsx +173 -173
- package/src/aldehyde/module/index.less +6 -0
- package/src/aldehyde/module/ltmpl-table.tsx +8 -1
- package/src/aldehyde/module/ttmpl-table.tsx +349 -0
- package/src/aldehyde/routable/index.less +6 -0
- package/src/aldehyde/routable/ttmpl-table-route.tsx +390 -0
- package/src/aldehyde/table/act-table.tsx +9 -1
- package/src/aldehyde/table/column/column-builder.tsx +5 -3
- package/src/aldehyde/table/index.css +2 -2
- package/src/aldehyde/table/pagination.tsx +11 -9
- package/src/aldehyde/table/query-table.tsx +13 -4
- package/src/aldehyde/tmpl/hc-data-source.tsx +12 -0
- package/src/aldehyde/tmpl/hcservice-v3.tsx +11 -0
- package/src/aldehyde/tmpl/interface.tsx +14 -2
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import React, { useEffect, useState, useMemo } from "react";
|
|
2
|
+
import { useParams, useLocation, useNavigate } from "react-router-dom";
|
|
3
|
+
import { DoEditParam, LtmplConfig, LtmplConfigRes, PageType, RouterCompProps, ShowViewParam, ActTableViewModel, ThemeConfig, EttmplConfig } from "../tmpl/interface";
|
|
4
|
+
import Units from "../units";
|
|
5
|
+
import ActTable from "../table/act-table";
|
|
6
|
+
import HCDataSource from "../tmpl/hc-data-source";
|
|
7
|
+
import withRouter from "../routable/withroute";
|
|
8
|
+
import { Button, Drawer, Space, theme } from "antd";
|
|
9
|
+
import LtmplTable from "../module/ltmpl-table";
|
|
10
|
+
import TtmplTable from "../module/ttmpl-table";
|
|
11
|
+
import DtmplViewDrawer from "../module/dtmpl-view-drawer";
|
|
12
|
+
import DtmplCustomEditModalPage from "../custom-page/dtmpl-custom-edit-modal-page";
|
|
13
|
+
import CustomDetailModalPage from "../custom-page/custom-detail-modal-page";
|
|
14
|
+
import DtmplEditPage from "../module/dtmpl-edit-page";
|
|
15
|
+
import DtmplViewModal from "../module/dtmpl-view-modal";
|
|
16
|
+
import { useLocale } from "../index";
|
|
17
|
+
import "./index.less";
|
|
18
|
+
|
|
19
|
+
const { useToken } = theme;
|
|
20
|
+
|
|
21
|
+
export interface Props extends RouterCompProps {
|
|
22
|
+
layoutRootPath?: string;
|
|
23
|
+
tableType?: "common" | "report";
|
|
24
|
+
rowOperatable?: boolean;
|
|
25
|
+
defShowType?: ActTableViewModel;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const Index = (props: Props) => {
|
|
29
|
+
const { layoutRootPath, tableType, rowOperatable, basePath = "", defShowType } = props;
|
|
30
|
+
const [pageInfo, setPageInfo] = useState<{ pageNo: number, pageSize: number }>();
|
|
31
|
+
const [ltmplConfig, setLtmplConfig] = useState<LtmplConfig>();
|
|
32
|
+
const [pageLayout, setPageLayout] = useState<string>("none");
|
|
33
|
+
const [selectedCode, setSelectedCode] = useState<string>();
|
|
34
|
+
const [showEdit, setShowEdit] = useState<boolean>(true);
|
|
35
|
+
const [ractionId, setRactionId] = useState<string>();
|
|
36
|
+
const [showDraw, setShowDraw] = useState<boolean>(false);
|
|
37
|
+
const [showView, setShowView] = useState<boolean>(false);
|
|
38
|
+
const [showWindowType, setShowWindowType] = useState<PageType>("default");
|
|
39
|
+
const [toCustomPage, setToCustomPage] = useState<boolean>(false);
|
|
40
|
+
const [viewSourceId, setViewSourceId] = useState<string>();
|
|
41
|
+
const [editSourceId, setEditSourceId] = useState<string>();
|
|
42
|
+
const [userPageConfig, setUserPageConfig] = useState<{ [key: string]: any }>();
|
|
43
|
+
const [userPageConfigLoading, setUserPageConfigLoading] = useState<boolean>(true);
|
|
44
|
+
const [pageSizeOptions, setPageSizeOptions] = useState<number[]>([]); // 分页条数
|
|
45
|
+
const [themeConfig, setThemeConfig] = useState<ThemeConfig>(); // 主题配置信息
|
|
46
|
+
const [drawerSize, setDrawerSize] = useState<number | string>("92vw");
|
|
47
|
+
const [isCopy, setIsCopy] = useState<boolean>(false); // 是否复制
|
|
48
|
+
const [ettmplConfig, setEttmplConfig] = useState<EttmplConfig>(); // 展开树配置
|
|
49
|
+
const { sourceId } = useParams();
|
|
50
|
+
const { search } = useLocation();
|
|
51
|
+
const { translate } = useLocale();
|
|
52
|
+
const navigate = useNavigate();
|
|
53
|
+
const { token } = useToken();
|
|
54
|
+
const computedLayoutPath = layoutRootPath !== undefined ? `/${layoutRootPath}` : "";
|
|
55
|
+
|
|
56
|
+
const { mainCode, menuId, serverKey } = useMemo(() => {
|
|
57
|
+
const temParams = new URLSearchParams(search);
|
|
58
|
+
const mainCode = temParams.get("mainCode");
|
|
59
|
+
const menuId = temParams.get("menuId");
|
|
60
|
+
const serverKey = temParams.get("serverKey") || null;
|
|
61
|
+
return { mainCode, menuId, serverKey }
|
|
62
|
+
}, [search])
|
|
63
|
+
|
|
64
|
+
const getLtmplConfig = async () => {
|
|
65
|
+
const ltmplConfigRes: LtmplConfigRes = await HCDataSource.requestLtmplConfig(serverKey, sourceId);
|
|
66
|
+
const ettmplConfig: EttmplConfig = await HCDataSource.requestEttmplConfig(serverKey, sourceId);
|
|
67
|
+
const ltmplConfig = ltmplConfigRes?.ltmplConfig;
|
|
68
|
+
setLtmplConfig(ltmplConfig);
|
|
69
|
+
setEttmplConfig(ettmplConfig);
|
|
70
|
+
setPageLayout(ltmplConfig?.pageLayout || "none");
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// 获取用户页面配置
|
|
74
|
+
const getUserPageConfig = async () => {
|
|
75
|
+
const config = await Units.getUserPageConfig(sourceId);
|
|
76
|
+
setUserPageConfig(config);
|
|
77
|
+
setUserPageConfigLoading(false);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// 获取全局主题配置
|
|
81
|
+
const getThemeConfig = async () => {
|
|
82
|
+
const theme: ThemeConfig = await Units.getThemeConfig();
|
|
83
|
+
setThemeConfig(theme);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 设置用户页面配置
|
|
87
|
+
const handleSetUserPageConfig = (config: { [key: string]: any }) => {
|
|
88
|
+
const temConfig = Units.setUserPageConfig(sourceId, config);
|
|
89
|
+
setUserPageConfig(temConfig);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// 重置本地缓存页面配置
|
|
93
|
+
const resetUserPageConfig = () => {
|
|
94
|
+
Units.resetUserPageConfig(sourceId);
|
|
95
|
+
setUserPageConfig(undefined);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (sourceId) {
|
|
100
|
+
getLtmplConfig();
|
|
101
|
+
getUserPageConfig();
|
|
102
|
+
getThemeConfig();
|
|
103
|
+
}
|
|
104
|
+
}, [sourceId]);
|
|
105
|
+
|
|
106
|
+
const doSearch = (params_) => {
|
|
107
|
+
let params = {
|
|
108
|
+
...Units.transQueryStrToParams(search, ltmplConfig),
|
|
109
|
+
...params_,
|
|
110
|
+
};
|
|
111
|
+
const newfliter = Units.transQueryParamsToStr({ ...params });
|
|
112
|
+
navigate(`${basePath}${computedLayoutPath}/${sourceId}/tree-act-table?${newfliter}`, { replace: true });
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const onChangePage = (pageNo: number, pageSize: number, pageSizes?: number[]) => {
|
|
116
|
+
const temPageSizeOptions = pageSizes ? pageSizes : pageSizeOptions;
|
|
117
|
+
let params = Units.transQueryStrToParams(search, null);
|
|
118
|
+
params["pageNo"] = pageNo;
|
|
119
|
+
params["pageSize"] = pageSize;
|
|
120
|
+
doSearch(params);
|
|
121
|
+
const temPagesize = temPageSizeOptions.indexOf(pageSize);
|
|
122
|
+
if (temPagesize == -1) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
setPageSizeOptions(temPageSizeOptions);
|
|
126
|
+
setPageInfo({ pageNo, pageSize });
|
|
127
|
+
handleSetUserPageConfig({ pageSize: temPagesize });
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// 更新分页数数组
|
|
131
|
+
const onUpdatePageSizeOptions = (val: number[]) => {
|
|
132
|
+
setPageSizeOptions(val);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const onShowView = (showViewParam: ShowViewParam) => {
|
|
136
|
+
doClose();
|
|
137
|
+
let showType: PageType = !ltmplConfig.buttonViewConfig ? "default" : ltmplConfig.buttonViewConfig.showType;
|
|
138
|
+
let dtmplSourceId = showViewParam.dtmplSourceId ? showViewParam.dtmplSourceId : sourceId;
|
|
139
|
+
let path = `${basePath}${computedLayoutPath}/${dtmplSourceId}/detail-view?code=${showViewParam.code}&menuId=${menuId}`;
|
|
140
|
+
if (showViewParam.toCustomPage && ltmplConfig.customViewPagePath) {
|
|
141
|
+
path = `${basePath}${computedLayoutPath}${ltmplConfig.customViewPagePath}?menuId=${menuId}&sourceId=${sourceId}`;
|
|
142
|
+
}
|
|
143
|
+
if (showType === "routing") {
|
|
144
|
+
navigate(path);
|
|
145
|
+
} else if (showType === "blank") {
|
|
146
|
+
window.open("#" + path, '_blank');
|
|
147
|
+
} else {
|
|
148
|
+
setShowView(true);
|
|
149
|
+
setSelectedCode(showViewParam.code);
|
|
150
|
+
setViewSourceId(dtmplSourceId);
|
|
151
|
+
setToCustomPage(showViewParam.toCustomPage);
|
|
152
|
+
setShowWindowType(pageLayout === "none" ? "drawer" : showType);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const onChangeSearch = (params_) => {
|
|
157
|
+
let params = { ...params_ };
|
|
158
|
+
if (mainCode) {
|
|
159
|
+
params["mainCode"] = mainCode;
|
|
160
|
+
}
|
|
161
|
+
params["pageNo"] = 1;
|
|
162
|
+
if (pageInfo?.pageSize) {
|
|
163
|
+
params["pageSize"] = pageInfo?.pageSize;
|
|
164
|
+
}
|
|
165
|
+
params["menuId"] = menuId;
|
|
166
|
+
params["sourceId"] = sourceId;
|
|
167
|
+
doSearch(params);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const doEdit = (param: DoEditParam) => {
|
|
171
|
+
doClose();
|
|
172
|
+
let showType: PageType = !ltmplConfig.buttonEditConfig ? "default" : ltmplConfig.buttonEditConfig.showType;
|
|
173
|
+
let dtmplSourceId = param.dtmplSourceId ? param.dtmplSourceId : sourceId;
|
|
174
|
+
let path = `${basePath}${computedLayoutPath}/${dtmplSourceId}/detail-edit?code=${param.code}&menuId=${menuId}&mode=${param.mode}`;
|
|
175
|
+
if (param.toCustomPage && ltmplConfig.customEditPagePath) {
|
|
176
|
+
path = `${basePath}${computedLayoutPath}/page/${dtmplSourceId}${ltmplConfig.customEditPagePath}?code=${param.code}&menuId=${menuId}`;
|
|
177
|
+
}
|
|
178
|
+
if (mainCode) {
|
|
179
|
+
path = path + `&mainCode=${mainCode}`;
|
|
180
|
+
}
|
|
181
|
+
if (showType === "routing") {
|
|
182
|
+
navigate(path);
|
|
183
|
+
} else if (showType === "blank") {
|
|
184
|
+
window.open("#" + path, '_blank');
|
|
185
|
+
} else {
|
|
186
|
+
setShowEdit(true);
|
|
187
|
+
setShowWindowType(pageLayout === "none" ? "drawer" : showType);
|
|
188
|
+
setEditSourceId(dtmplSourceId);
|
|
189
|
+
setSelectedCode(param.code);
|
|
190
|
+
setIsCopy(param.mode === "copy");
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const doCreate = (addTmplId: string, toCustomPage: boolean = false) => {
|
|
195
|
+
doClose();
|
|
196
|
+
let showType: PageType = !ltmplConfig.buttonAddConfig ? "default" : ltmplConfig.buttonAddConfig.showType;
|
|
197
|
+
let path = `${basePath}${computedLayoutPath}/${sourceId}/detail-edit?menuId=${menuId}&addTmplId=${addTmplId ? addTmplId : ""}`;
|
|
198
|
+
if (toCustomPage && ltmplConfig.customEditPagePath) {
|
|
199
|
+
path = `${basePath}${computedLayoutPath}/page/${sourceId}${ltmplConfig.customEditPagePath}?menuId=${menuId}`;
|
|
200
|
+
}
|
|
201
|
+
if (mainCode) {
|
|
202
|
+
path = path + `&mainCode=${mainCode}`;
|
|
203
|
+
}
|
|
204
|
+
if (showType === "routing") {
|
|
205
|
+
navigate(path);
|
|
206
|
+
} else if (showType === "blank") {
|
|
207
|
+
window.open("#" + path, '_blank');
|
|
208
|
+
} else {
|
|
209
|
+
let editSourceId = addTmplId ? addTmplId : sourceId;
|
|
210
|
+
setTimeout(() => {
|
|
211
|
+
setShowEdit(true);
|
|
212
|
+
setShowWindowType(pageLayout === "none" ? "drawer" : showType);
|
|
213
|
+
setEditSourceId(editSourceId);
|
|
214
|
+
}, 100);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const doRAction = (ractionId: string, mainCode: string) => {
|
|
219
|
+
setSelectedCode(mainCode);
|
|
220
|
+
setRactionId(ractionId);
|
|
221
|
+
setShowDraw(true);
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
// 嵌套表格配置
|
|
225
|
+
const expandedRowRender = (val: { [key: string]: any }) => {
|
|
226
|
+
const { subNodes, recursiveRatmplId } = ettmplConfig;
|
|
227
|
+
return <div style={{ marginLeft: "24px", background: token.colorBgContainer }}>
|
|
228
|
+
{recursiveRatmplId ?
|
|
229
|
+
<TtmplTable
|
|
230
|
+
ettmplConfig={ettmplConfig}
|
|
231
|
+
hideOnSinglePage={true}
|
|
232
|
+
funcMode="simple"
|
|
233
|
+
serverKey={serverKey}
|
|
234
|
+
sourceId={recursiveRatmplId}
|
|
235
|
+
mainCode={val.code}
|
|
236
|
+
bordered={false} showHeader={false} /> : ""}
|
|
237
|
+
{subNodes?.map(item => <div>
|
|
238
|
+
{subNodes.length > 1 ? <h4 style={{ padding: "12px 0 0 12px" }}>{item.title}</h4> : ""}
|
|
239
|
+
<TtmplTable
|
|
240
|
+
ettmplConfig={item}
|
|
241
|
+
hideOnSinglePage={true}
|
|
242
|
+
funcMode="simple"
|
|
243
|
+
serverKey={serverKey}
|
|
244
|
+
sourceId={item.sourceId}
|
|
245
|
+
mainCode={val.code}
|
|
246
|
+
bordered={false} showHeader={false} />
|
|
247
|
+
</div>
|
|
248
|
+
)}
|
|
249
|
+
</div>;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
const renderActTable = () => {
|
|
253
|
+
const { subNodes, recursiveRatmplId } = ettmplConfig || {};
|
|
254
|
+
let criteriaData = Units.transQueryStrToParams(search, ltmplConfig);
|
|
255
|
+
const cachePageSize = userPageConfig?.pageSize; // 获取缓存分页数配置,其配置的是分页数组下标
|
|
256
|
+
let pageSize = cachePageSize ? pageSizeOptions[cachePageSize] : pageInfo?.pageSize;
|
|
257
|
+
if (!ltmplConfig || userPageConfigLoading) {
|
|
258
|
+
return <></>;
|
|
259
|
+
}
|
|
260
|
+
return <ActTable key={"acttable" + sourceId}
|
|
261
|
+
tableType={tableType} serverKey={serverKey} pageSize={pageSize} pageNo={pageInfo?.pageNo} onChangePage={onChangePage}
|
|
262
|
+
menuId={menuId} operatable={rowOperatable}
|
|
263
|
+
mainCode={mainCode} showView={onShowView} doSearch={onChangeSearch} doEdit={doEdit}
|
|
264
|
+
doCreate={doCreate} sourceId={sourceId}
|
|
265
|
+
criteriaData={criteriaData} ltmplConfig={ltmplConfig || null} doRAction={doRAction}
|
|
266
|
+
defShowType={defShowType}
|
|
267
|
+
userPageConfig={userPageConfig}
|
|
268
|
+
setUserPageConfig={handleSetUserPageConfig}
|
|
269
|
+
resetUserPageConfig={resetUserPageConfig}
|
|
270
|
+
allowUserConfig={themeConfig?.allowUserConfig}
|
|
271
|
+
onUpdatePageSizeOptions={onUpdatePageSizeOptions}
|
|
272
|
+
expandable={(recursiveRatmplId || subNodes.length) ? { expandedRowRender } : undefined} // 嵌套表格
|
|
273
|
+
bordered={false}
|
|
274
|
+
showHeader={false}
|
|
275
|
+
/>;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
const doSubmited = (code?: string, isContinueSave?: boolean) => {
|
|
279
|
+
onChangeSearch({ serial_number: Units.getReactKey() });
|
|
280
|
+
if (isContinueSave) {
|
|
281
|
+
setSelectedCode(code);
|
|
282
|
+
} else {
|
|
283
|
+
doClose();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
const doClose = () => {
|
|
288
|
+
setShowDraw(false);
|
|
289
|
+
setShowView(false);
|
|
290
|
+
setShowEdit(false);
|
|
291
|
+
setShowWindowType(undefined);
|
|
292
|
+
setSelectedCode(undefined);
|
|
293
|
+
setToCustomPage(false);
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
// 关联查询close
|
|
297
|
+
const doCloseShowDraw = () => {
|
|
298
|
+
if (showWindowType === "default") {
|
|
299
|
+
doCreate(editSourceId);
|
|
300
|
+
} else {
|
|
301
|
+
doClose();
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const windowSize = useMemo(() => {
|
|
306
|
+
const { buttonViewConfig, buttonEditConfig } = ltmplConfig || {};
|
|
307
|
+
let width = buttonViewConfig?.windowWidth
|
|
308
|
+
width = width && width > 0 ? width : 1280;
|
|
309
|
+
let height: number | string = buttonViewConfig?.windowHeight;
|
|
310
|
+
height = height && height > 0 ? height : '80vh';
|
|
311
|
+
let editWidth = buttonEditConfig?.windowWidth;
|
|
312
|
+
editWidth = editWidth && editWidth > 0 ? editWidth : 1280;
|
|
313
|
+
let editHeight: number | string = buttonEditConfig?.windowHeight;
|
|
314
|
+
editHeight = editHeight && editHeight > 0 ? editHeight : '80vh';
|
|
315
|
+
return { width, height, editWidth, editHeight };
|
|
316
|
+
}, [ltmplConfig]);
|
|
317
|
+
|
|
318
|
+
return <div className="ttmpl-table-route">
|
|
319
|
+
{renderActTable()}
|
|
320
|
+
{showDraw ? (
|
|
321
|
+
<Drawer
|
|
322
|
+
placement="left" title={translate("${关联查询}")} closable={true} mask={false} onClose={doCloseShowDraw}
|
|
323
|
+
open={showDraw}
|
|
324
|
+
resizable={{ onResize: (newSize => setDrawerSize(newSize)) }}
|
|
325
|
+
size={drawerSize}
|
|
326
|
+
styles={{ body: { minWidth: "720px" } }}
|
|
327
|
+
extra={
|
|
328
|
+
<Space>
|
|
329
|
+
<Button onClick={doCloseShowDraw}>{translate("${关闭}")}</Button>
|
|
330
|
+
</Space>
|
|
331
|
+
}
|
|
332
|
+
>
|
|
333
|
+
<LtmplTable serverKey={serverKey} sourceId={ractionId} mainCode={selectedCode} />
|
|
334
|
+
</Drawer>
|
|
335
|
+
) : null}
|
|
336
|
+
{showView && showWindowType === "drawer" && selectedCode ? (
|
|
337
|
+
toCustomPage && ltmplConfig?.customViewPagePath ? <CustomDetailModalPage width={1000} minHeight="70vh" mainCode={mainCode} sourceId={sourceId} code={selectedCode} open={showView} customPath={ltmplConfig?.customViewPagePath} onCancel={doClose} />
|
|
338
|
+
:
|
|
339
|
+
<DtmplViewDrawer
|
|
340
|
+
serverKey={serverKey} placement={ltmplConfig?.buttonViewConfig?.windowPosition}
|
|
341
|
+
width={windowSize.width}
|
|
342
|
+
height={windowSize.height}
|
|
343
|
+
onClose={doClose}
|
|
344
|
+
open={showView}
|
|
345
|
+
sourceId={viewSourceId ? viewSourceId : sourceId}
|
|
346
|
+
code={selectedCode}
|
|
347
|
+
/>
|
|
348
|
+
) : null}
|
|
349
|
+
{showView && showWindowType === "modal" && selectedCode ? (
|
|
350
|
+
toCustomPage && ltmplConfig?.customViewPagePath ? <CustomDetailModalPage width={1000} minHeight="70vh" mainCode={mainCode} sourceId={sourceId} code={selectedCode} open={showView} customPath={ltmplConfig?.customViewPagePath} onCancel={doClose} />
|
|
351
|
+
:
|
|
352
|
+
<DtmplViewModal
|
|
353
|
+
serverKey={serverKey} width={windowSize.width} height={windowSize.height} onClose={doClose}
|
|
354
|
+
open={showView} sourceId={viewSourceId ? viewSourceId : sourceId}
|
|
355
|
+
code={selectedCode}
|
|
356
|
+
/>
|
|
357
|
+
) : null}
|
|
358
|
+
{showEdit && showWindowType !== "default" && ltmplConfig ? (
|
|
359
|
+
ltmplConfig?.customEditPagePath ? (
|
|
360
|
+
<DtmplCustomEditModalPage
|
|
361
|
+
open={showEdit}
|
|
362
|
+
onOk={doSubmited}
|
|
363
|
+
customPath={ltmplConfig?.customEditPagePath}
|
|
364
|
+
sourceId={sourceId}
|
|
365
|
+
mainCode={mainCode}
|
|
366
|
+
code={selectedCode}
|
|
367
|
+
isCopy={isCopy}
|
|
368
|
+
/>
|
|
369
|
+
) : (
|
|
370
|
+
<DtmplEditPage
|
|
371
|
+
defaultDtmplData={ltmplConfig?.defaultDtmplData}
|
|
372
|
+
serverKey={serverKey}
|
|
373
|
+
pageType={showWindowType === "modal" ? "modal" : "drawer"}
|
|
374
|
+
placement={ltmplConfig?.buttonEditConfig?.windowPosition}
|
|
375
|
+
open={showEdit}
|
|
376
|
+
width={windowSize.editWidth}
|
|
377
|
+
height={windowSize.editHeight}
|
|
378
|
+
onCancel={doClose}
|
|
379
|
+
mainCode={mainCode}
|
|
380
|
+
sourceId={editSourceId}
|
|
381
|
+
code={selectedCode}
|
|
382
|
+
onOk={doSubmited}
|
|
383
|
+
isCopy={isCopy}
|
|
384
|
+
/>
|
|
385
|
+
)
|
|
386
|
+
) : null}
|
|
387
|
+
</div>;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export default withRouter(Index);
|
|
@@ -89,6 +89,10 @@ interface ActTableProps extends TmplBaseProps {
|
|
|
89
89
|
doEdit2D?: (val: string) => void; // 2D图编辑
|
|
90
90
|
doView2D?: (val: string) => void; // 2D图查看
|
|
91
91
|
showTableAdd?: boolean; // 是否支持添加列表
|
|
92
|
+
expandable?: { expandedRowRender: (val: { [key: string]: any }) => React.JSX.Element }; // 嵌套表格
|
|
93
|
+
hideOnSinglePage?: boolean; // 分页配置,只有一页时是否隐藏分页器
|
|
94
|
+
bordered?: boolean; // 表格是否显示边框
|
|
95
|
+
showHeader?: boolean; // 表格是否显示表头
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
interface ActTableStat {
|
|
@@ -1565,7 +1569,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1565
1569
|
title, collapsible,
|
|
1566
1570
|
onChangePage, serverKey, criteriaData, showEmpty, loadDataCallback,
|
|
1567
1571
|
showView, doEdit, doRAction, customEditable, readOnly, tableType, showPagination, showAggregates, userPageConfig,
|
|
1568
|
-
doEdit2D, doView2D, showTableAdd, setUserPageConfig
|
|
1572
|
+
doEdit2D, doView2D, showTableAdd, setUserPageConfig, expandable, hideOnSinglePage, bordered, showHeader
|
|
1569
1573
|
} = this.props;
|
|
1570
1574
|
const { translate } = this.context;
|
|
1571
1575
|
|
|
@@ -1667,6 +1671,10 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1667
1671
|
pageSizeOptions={pageSizeOptions}
|
|
1668
1672
|
showEmpty={showEmpty}
|
|
1669
1673
|
loadDataCallback={loadDataCallback}
|
|
1674
|
+
expandable={expandable}
|
|
1675
|
+
hideOnSinglePage={hideOnSinglePage}
|
|
1676
|
+
bordered={bordered}
|
|
1677
|
+
showHeader={showHeader}
|
|
1670
1678
|
/>);
|
|
1671
1679
|
|
|
1672
1680
|
// tab拆解条件渲染
|
|
@@ -122,13 +122,15 @@ export default {
|
|
|
122
122
|
column["sorter"] = (a, b) => {
|
|
123
123
|
let aVal = a[column["dataIndex"]];
|
|
124
124
|
let bVal = b[column["dataIndex"]];
|
|
125
|
-
if (aVal
|
|
126
|
-
if (bVal
|
|
125
|
+
if (Array.isArray(aVal)) aVal = aVal[0];
|
|
126
|
+
if (Array.isArray(bVal)) bVal = bVal[0];
|
|
127
|
+
if (aVal?.includes("@R@")) aVal = aVal.split("@R@")[1];
|
|
128
|
+
if (bVal?.includes("@R@")) bVal = bVal.split("@R@")[1];
|
|
127
129
|
// 判断是否为字符串数字
|
|
128
130
|
const numA = Number(aVal);
|
|
129
131
|
const numB = Number(bVal);
|
|
130
132
|
const isNumeric = aVal && bVal && !isNaN(numA) && !isNaN(numB);
|
|
131
|
-
return isNumeric ? numA - numB : aVal
|
|
133
|
+
return isNumeric ? numA - numB : aVal?.localeCompare(bVal);
|
|
132
134
|
};
|
|
133
135
|
column["showSorterTooltip"] = false;
|
|
134
136
|
column["sortIcon"] = ({ sortOrder }) =>
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
/* padding:0px;*/
|
|
76
76
|
/*}*/
|
|
77
77
|
|
|
78
|
-
.ant-table-cell:has(.xiaoji) {
|
|
78
|
+
.ant-table-cell:not(.ant-table-expanded-row > .ant-table-cell):has(.xiaoji) {
|
|
79
79
|
background-color: var(--color-1) !important;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.ant-table-cell:has(.heji) {
|
|
82
|
+
.ant-table-cell:not(.ant-table-expanded-row > .ant-table-cell):has(.heji) {
|
|
83
83
|
background-color: var(--color-3) !important;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -15,6 +15,7 @@ interface PaginationProps {
|
|
|
15
15
|
touchEnd: boolean;
|
|
16
16
|
paginationPosition?: "left" | "middle" | "right";
|
|
17
17
|
pageSizeOptions?: number[]; //配置的分页数
|
|
18
|
+
hideOnSinglePage?: boolean; // 只有一页时是否隐藏分页器
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
interface PaginationStat { }
|
|
@@ -24,7 +25,7 @@ class Pagination extends React.PureComponent<PaginationProps, PaginationStat> {
|
|
|
24
25
|
context: React.ContextType<typeof LocaleContext>;
|
|
25
26
|
|
|
26
27
|
render() {
|
|
27
|
-
const { queryTotal, pageInfo, total, pageTo, touchEnd, paginationPosition, pageSizeOptions } = this.props;
|
|
28
|
+
const { queryTotal, pageInfo, total, pageTo, touchEnd, paginationPosition, pageSizeOptions, hideOnSinglePage } = this.props;
|
|
28
29
|
const { translate } = this.context;
|
|
29
30
|
|
|
30
31
|
if (!pageInfo) {
|
|
@@ -53,13 +54,14 @@ class Pagination extends React.PureComponent<PaginationProps, PaginationStat> {
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
return (
|
|
56
|
-
<div className="Pagination" style={{ justifyContent: paginationPosition === "middle" ? "center" : (paginationPosition || "left") }}>
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
<div className="Pagination" style={{ justifyContent: paginationPosition === "middle" ? "center" : (paginationPosition || "left"), marginTop: !(hideOnSinglePage && (total < (pageInfo.pageSize || 10))) ? "10px" : 0 }}>
|
|
58
|
+
{!(hideOnSinglePage && (total < (pageInfo.pageSize || 10))) ?
|
|
59
|
+
<span
|
|
60
|
+
className={sewTotal ? "sewTotal" : "seeTotal"}
|
|
61
|
+
onClick={queryTotal}
|
|
62
|
+
>
|
|
63
|
+
{seeTotalTitle}
|
|
64
|
+
</span> : ""}
|
|
63
65
|
<AntdPagination
|
|
64
66
|
style={{ display: "inline-block" }}
|
|
65
67
|
showQuickJumper
|
|
@@ -70,7 +72,7 @@ class Pagination extends React.PureComponent<PaginationProps, PaginationStat> {
|
|
|
70
72
|
pageSize={pageInfo.pageSize ? pageInfo.pageSize : 10}
|
|
71
73
|
onChange={(page, pageSize) => { pageTo(page, pageSize) }}
|
|
72
74
|
//onShowSizeChange={(current, size) => {debugger;pageTo(current, size)}}
|
|
73
|
-
hideOnSinglePage={total === 0}
|
|
75
|
+
hideOnSinglePage={hideOnSinglePage || (total === 0)}
|
|
74
76
|
total={virtualTotal}
|
|
75
77
|
/>
|
|
76
78
|
</div>
|
|
@@ -66,6 +66,8 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
66
66
|
ltmplConfig: {},
|
|
67
67
|
showPagination: true,
|
|
68
68
|
showEmpty: true,
|
|
69
|
+
bordered: true,
|
|
70
|
+
showHeader: true,
|
|
69
71
|
};
|
|
70
72
|
|
|
71
73
|
defaultAggregateShowSize = 7;
|
|
@@ -131,7 +133,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
131
133
|
const index = dataSource.findIndex(
|
|
132
134
|
(x) => x.key === restProps["data-row-key"]
|
|
133
135
|
);
|
|
134
|
-
|
|
136
|
+
// 处理嵌套子表格展开收起异常
|
|
137
|
+
const rowProps: any = { ...restProps, className, style };
|
|
138
|
+
return (
|
|
139
|
+
<SortableItem key={index} index={index} {...rowProps} />
|
|
140
|
+
);
|
|
135
141
|
} else {
|
|
136
142
|
return <></>;
|
|
137
143
|
}
|
|
@@ -448,7 +454,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
448
454
|
onChangeResize,
|
|
449
455
|
pageSizeOptions,
|
|
450
456
|
onChangePage,
|
|
451
|
-
showEmpty
|
|
457
|
+
showEmpty, expandable, hideOnSinglePage, bordered, showHeader
|
|
452
458
|
} = this.props;
|
|
453
459
|
//debugger
|
|
454
460
|
const { touchEnd, aggregateVO, loading, virtualEndPageNo, dataSource, errorText, localSorter } = this.state;
|
|
@@ -594,6 +600,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
594
600
|
{/*)}*/}
|
|
595
601
|
{viewModels.includes("table") ? (
|
|
596
602
|
<ResizableTable
|
|
603
|
+
rowKey="code"
|
|
597
604
|
tableLayout={ltmplConfig.tableLayout || "fixed"}
|
|
598
605
|
size={tableProps.size ? tableProps.size : undefined}
|
|
599
606
|
rowSelection={this.getRowSelection()}
|
|
@@ -607,7 +614,6 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
607
614
|
x: table_x,
|
|
608
615
|
}
|
|
609
616
|
}
|
|
610
|
-
bordered
|
|
611
617
|
pagination={false}
|
|
612
618
|
style={{ display: columns ? "block" : "none" }}
|
|
613
619
|
summary={summary}
|
|
@@ -626,8 +632,10 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
626
632
|
this.getChildrenData(record.code);
|
|
627
633
|
}
|
|
628
634
|
}
|
|
629
|
-
} :
|
|
635
|
+
} : expandable}
|
|
630
636
|
onChangeResize={onChangeResize}
|
|
637
|
+
bordered={bordered}
|
|
638
|
+
showHeader={showHeader}
|
|
631
639
|
/>
|
|
632
640
|
) : (
|
|
633
641
|
""
|
|
@@ -671,6 +679,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
671
679
|
total={aggregateVO?.count}
|
|
672
680
|
paginationPosition={ltmplConfig?.paginationPosition}
|
|
673
681
|
pageSizeOptions={pageSizeOptions}
|
|
682
|
+
hideOnSinglePage={hideOnSinglePage}
|
|
674
683
|
/> : ""}
|
|
675
684
|
</>
|
|
676
685
|
);
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
LtmplConfigRes,
|
|
11
11
|
SelectConfig,
|
|
12
12
|
TtmplConfig,
|
|
13
|
+
EttmplConfig
|
|
13
14
|
} from "./interface";
|
|
14
15
|
import HcserviceV3 from "./hcservice-v3";
|
|
15
16
|
import ControlTypeSupportor from "./control-type-supportor";
|
|
@@ -46,6 +47,7 @@ const l2LtmplConfigMap: Map<string, LtmplConfigRes> = new Map<
|
|
|
46
47
|
>();
|
|
47
48
|
const dtmplConfigMap: Map<string, DtmplConfig> = new Map<string, DtmplConfig>();
|
|
48
49
|
const ttmplConfigMap: Map<string, TtmplConfig> = new Map<string, TtmplConfig>();
|
|
50
|
+
const ettmplConfigMap: Map<string, EttmplConfig> = new Map<string, EttmplConfig>();
|
|
49
51
|
const viewDtmplConfigMap: Map<string, DtmplConfig> = new Map<
|
|
50
52
|
string,
|
|
51
53
|
DtmplConfig
|
|
@@ -316,6 +318,15 @@ HCDataSource.requestTtmplConfig = async function (
|
|
|
316
318
|
return ttmplConfigMap.get(sourceId);
|
|
317
319
|
};
|
|
318
320
|
|
|
321
|
+
// 展开树请求
|
|
322
|
+
HCDataSource.requestEttmplConfig = async function (serverKey: string, sourceId: string) {
|
|
323
|
+
if (!ettmplConfigMap.has(sourceId)) {
|
|
324
|
+
let res = await HcserviceV3.requestEttmplConfig(serverKey, sourceId);
|
|
325
|
+
ettmplConfigMap.set(sourceId, res);
|
|
326
|
+
}
|
|
327
|
+
return ettmplConfigMap.get(sourceId);
|
|
328
|
+
};
|
|
329
|
+
|
|
319
330
|
HCDataSource.requestViewDtmplConfig = async function (
|
|
320
331
|
serverKey: string,
|
|
321
332
|
sourceId: string
|
|
@@ -569,6 +580,7 @@ HCDataSource.clear = async function () {
|
|
|
569
580
|
// workbenchCache.splice(0, workbenchCache.length);
|
|
570
581
|
objctCacheMap.clear();
|
|
571
582
|
ttmplConfigMap.clear();
|
|
583
|
+
ettmplConfigMap.clear();
|
|
572
584
|
};
|
|
573
585
|
|
|
574
586
|
export default HCDataSource; //对外 TmplDataSource
|
|
@@ -126,6 +126,17 @@ export default class HcserviceV3 {
|
|
|
126
126
|
return res.ttmplConfig;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
static async requestEttmplConfig(serverKey: string, sourceId: string) {
|
|
130
|
+
let url = `/v3/ettmpl/config`;
|
|
131
|
+
let res = await Super.super({
|
|
132
|
+
url,
|
|
133
|
+
serverKey,
|
|
134
|
+
method: "GET",
|
|
135
|
+
query: { sourceId },
|
|
136
|
+
});
|
|
137
|
+
return res.ettmplConfig;
|
|
138
|
+
}
|
|
139
|
+
|
|
129
140
|
static async requestViewDtmplConfig(serverKey: string, sourceId: string) {
|
|
130
141
|
let url = `/v3/view-dtmpl/config`;
|
|
131
142
|
let res = await Super.super({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MenuProps } from "antd/lib/menu";
|
|
2
|
-
import { FormInstance } from "antd";
|
|
2
|
+
import { FormInstance, PaginationProps } from "antd";
|
|
3
3
|
import { HTMLAttributeAnchorTarget, RefObject } from "react";
|
|
4
4
|
import { ButtonShape, ButtonType } from "antd/lib/button";
|
|
5
5
|
|
|
@@ -100,6 +100,10 @@ export interface QueryTableProps extends ReportTableProps {
|
|
|
100
100
|
pageSizeOptions?: number[]; // 分页数配置
|
|
101
101
|
showEmpty?: boolean; // 是否显示空状态
|
|
102
102
|
loadDataCallback?: (val: object[]) => void; // 请求数据回调函数
|
|
103
|
+
expandable?: { expandedRowRender: (val: { [key: string]: any }) => React.JSX.Element }; // 嵌套表格
|
|
104
|
+
hideOnSinglePage?: boolean; // 分页配置,只有一页时是否隐藏分页器
|
|
105
|
+
bordered?: boolean;
|
|
106
|
+
showHeader?: boolean;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
export interface AggregateVO {
|
|
@@ -586,6 +590,14 @@ export interface TtmplConfig extends TmplBase {
|
|
|
586
590
|
allSameModel?: boolean;
|
|
587
591
|
}
|
|
588
592
|
|
|
593
|
+
export interface EttmplConfig {
|
|
594
|
+
id: string;
|
|
595
|
+
sourceId: string;
|
|
596
|
+
title: string;
|
|
597
|
+
recursiveRatmplId: string;
|
|
598
|
+
subNodes: EttmplConfig[];
|
|
599
|
+
}
|
|
600
|
+
|
|
589
601
|
// export interface StatViewConfig extends SelectConfig {
|
|
590
602
|
//
|
|
591
603
|
// // reStat query analysis
|
|
@@ -918,7 +930,7 @@ export interface BlockType {
|
|
|
918
930
|
hiddenOnDisabled?: boolean; // 是否隐藏
|
|
919
931
|
customPath?: string; // 自定义页面路径
|
|
920
932
|
dragDropPageId?: string;
|
|
921
|
-
pageType?: "列表" | "详情" | "编辑" | "添加" | "编辑或添加" | "树" | "导入" | "报表" | "分屏-列表" | "分屏-报表" | "甘特图" | "日历"; // 页面类型
|
|
933
|
+
pageType?: "列表" | "详情" | "编辑" | "添加" | "编辑或添加" | "树" | "导入" | "报表" | "分屏-列表" | "分屏-报表" | "甘特图" | "日历" | "可展开列表"; // 页面类型
|
|
922
934
|
defaultCriteriaValue?: { [key: string]: string }; // 一些组件参数
|
|
923
935
|
linkTarget?: HTMLAttributeAnchorTarget; // 页面跳转方式
|
|
924
936
|
items?: BlockType[];
|