aldehyde 0.2.493 → 0.2.495
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/icon-selector/icon/phonenode-menu-icon/iconfont.css +63 -63
- 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/layout2/page.d.ts +2 -1
- package/lib/layout2/page.d.ts.map +1 -1
- package/lib/layout2/page.js +19 -8
- package/lib/layout2/page.js.map +1 -1
- package/lib/layout2/type/layout-type.d.ts +1 -0
- package/lib/layout2/type/layout-type.d.ts.map +1 -1
- package/lib/lowcode-components/base-table/index.less +61 -61
- package/lib/lowcode-components/base-text/index.less +19 -19
- package/lib/lowcode-components/column-chart/index.js +2 -2
- package/lib/lowcode-components/column-chart/index.js.map +1 -1
- 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/line-bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-bar-chart/index.js +6 -2
- package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-chart/index.js +6 -2
- package/lib/lowcode-components/line-chart/index.js.map +1 -1
- package/lib/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
- 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/ltmpl-table.d.ts +7 -0
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +12 -16
- 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 +8 -2
- package/lib/routable/dtmpl-route.js.map +1 -1
- package/lib/routable/import-route.d.ts.map +1 -1
- package/lib/routable/import-route.js +9 -1
- package/lib/routable/import-route.js.map +1 -1
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +13 -6
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/routable/splitview-ltmpl-route.d.ts.map +1 -1
- package/lib/routable/splitview-ltmpl-route.js +11 -10
- package/lib/routable/splitview-ltmpl-route.js.map +1 -1
- package/lib/routable/ttmpl-route.d.ts.map +1 -1
- package/lib/routable/ttmpl-route.js +9 -2
- package/lib/routable/ttmpl-route.js.map +1 -1
- 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 +31 -9
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/page-chart.js +1 -1
- package/lib/table/page-chart.js.map +1 -1
- package/lib/table/row-table.d.ts +6 -0
- package/lib/table/row-table.d.ts.map +1 -1
- package/lib/table/row-table.js +21 -6
- package/lib/table/row-table.js.map +1 -1
- package/lib/tmpl/interface.d.ts +1 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tree/act-tree.d.ts +1 -0
- package/lib/tree/act-tree.d.ts.map +1 -1
- package/lib/tree/act-tree.js +6 -7
- package/lib/tree/act-tree.js.map +1 -1
- package/lib/tree/tree-utils.d.ts +1 -1
- package/lib/tree/tree-utils.d.ts.map +1 -1
- package/lib/tree/tree-utils.js +4 -4
- package/lib/tree/tree-utils.js.map +1 -1
- package/lib/units/index.d.ts +4 -0
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +10 -3
- package/lib/units/index.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +63 -63
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.json +93 -93
- 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/layout2/page.tsx +17 -9
- package/src/aldehyde/layout2/type/layout-type.ts +1 -0
- package/src/aldehyde/layout4/imgs/user.svg +26 -26
- 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/base-text/index.less +19 -19
- package/src/aldehyde/lowcode-components/column-chart/index.tsx +2 -2
- 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/line-bar-chart/index.tsx +5 -2
- package/src/aldehyde/lowcode-components/line-chart/index.tsx +5 -2
- 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 +91 -91
- 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/ltmpl-table.tsx +14 -15
- package/src/aldehyde/routable/dtmpl-route.tsx +14 -8
- package/src/aldehyde/routable/import-route.tsx +12 -5
- package/src/aldehyde/routable/ltmpl-route.tsx +14 -9
- package/src/aldehyde/routable/splitview-ltmpl-route.tsx +11 -8
- package/src/aldehyde/routable/ttmpl-route.tsx +13 -8
- package/src/aldehyde/table/act-table.tsx +28 -9
- package/src/aldehyde/table/page-chart.tsx +1 -1
- package/src/aldehyde/table/row-table.tsx +29 -6
- package/src/aldehyde/tmpl/interface.tsx +1 -0
- package/src/aldehyde/tree/act-tree.tsx +8 -6
- package/src/aldehyde/tree/tree-utils.tsx +4 -4
- package/src/aldehyde/units/index.tsx +11 -3
|
@@ -67,6 +67,12 @@ class DtmplRoute extends React.Component<DtmplRouteProps, DtmplRoutePropsStat> {
|
|
|
67
67
|
return menuId;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
+
getServerKey = () => { // 获取serverKey
|
|
71
|
+
const { searchParams } = this.props;
|
|
72
|
+
let serverKey = searchParams.get("serverKey");
|
|
73
|
+
return serverKey || null;
|
|
74
|
+
};
|
|
75
|
+
|
|
70
76
|
getCodeSource = () => {
|
|
71
77
|
const { searchParams } = this.props;
|
|
72
78
|
// let params=Units.transQueryStrToParams(location.search);
|
|
@@ -84,16 +90,15 @@ class DtmplRoute extends React.Component<DtmplRouteProps, DtmplRoutePropsStat> {
|
|
|
84
90
|
};
|
|
85
91
|
|
|
86
92
|
goNavigatel = () => {
|
|
87
|
-
this.props.navigate(window.location.hash.replace("#/","/"));
|
|
93
|
+
this.props.navigate(window.location.hash.replace("#/", "/"));
|
|
88
94
|
//.reload();
|
|
89
95
|
};
|
|
90
96
|
|
|
91
97
|
goDtmpl = (code: string) => {
|
|
92
98
|
const { sourceId } = this.props.params;
|
|
93
99
|
const { basePath } = this.props;
|
|
94
|
-
let url = `${basePath}${
|
|
95
|
-
this.
|
|
96
|
-
}/${sourceId}/detail-edit?menuId=${this.getMenuId()}`;
|
|
100
|
+
let url = `${basePath}${this.computedLayoutPath
|
|
101
|
+
}/${sourceId}/detail-edit?menuId=${this.getMenuId()}`;
|
|
97
102
|
if (code) {
|
|
98
103
|
url = url + `&code=${code}`;
|
|
99
104
|
}
|
|
@@ -130,6 +135,7 @@ class DtmplRoute extends React.Component<DtmplRouteProps, DtmplRoutePropsStat> {
|
|
|
130
135
|
render() {
|
|
131
136
|
const { location, params, searchParams } = this.props;
|
|
132
137
|
const { sourceId } = params;
|
|
138
|
+
const serverKey = this.getServerKey();
|
|
133
139
|
|
|
134
140
|
const { codeSource } = this.state;
|
|
135
141
|
if (!location) {
|
|
@@ -143,8 +149,8 @@ class DtmplRoute extends React.Component<DtmplRouteProps, DtmplRoutePropsStat> {
|
|
|
143
149
|
let versionId = params["versionId"];
|
|
144
150
|
if (location.pathname.endsWith("detail-view")) {
|
|
145
151
|
return (
|
|
146
|
-
<TabActDtmplView key={sourceId+code+versionId}
|
|
147
|
-
serverKey={
|
|
152
|
+
<TabActDtmplView key={sourceId + code + versionId}
|
|
153
|
+
serverKey={serverKey}
|
|
148
154
|
goBackToLtmpl={codeSource ? undefined : this.goBackToLtmpl}
|
|
149
155
|
goDtmpl={this.goDtmpl}
|
|
150
156
|
sourceId={sourceId}
|
|
@@ -155,9 +161,9 @@ class DtmplRoute extends React.Component<DtmplRouteProps, DtmplRoutePropsStat> {
|
|
|
155
161
|
);
|
|
156
162
|
} else {
|
|
157
163
|
return (
|
|
158
|
-
<DtmplEdit key={sourceId+code+versionId}
|
|
164
|
+
<DtmplEdit key={sourceId + code + versionId}
|
|
159
165
|
addTmplId={searchParams.get("addTmplId")}
|
|
160
|
-
serverKey={
|
|
166
|
+
serverKey={serverKey}
|
|
161
167
|
addOrUpdate={this.getMode()}
|
|
162
168
|
sourceId={sourceId}
|
|
163
169
|
code={code}
|
|
@@ -2,13 +2,12 @@ import React from "react";
|
|
|
2
2
|
import { RouterCompProps } from "../tmpl/interface";
|
|
3
3
|
import ExcelImport from "../import/excel-import";
|
|
4
4
|
import withRouter from "./withroute";
|
|
5
|
-
import Units from "../units";
|
|
6
5
|
|
|
7
6
|
export interface ImportRouteProps extends RouterCompProps {
|
|
8
7
|
serverKey?: string;
|
|
9
8
|
layoutRootPath?: string;
|
|
10
9
|
}
|
|
11
|
-
interface ImportRouteStat {}
|
|
10
|
+
interface ImportRouteStat { }
|
|
12
11
|
|
|
13
12
|
class ExcelImportRoute extends React.PureComponent<
|
|
14
13
|
ImportRouteProps,
|
|
@@ -16,7 +15,7 @@ class ExcelImportRoute extends React.PureComponent<
|
|
|
16
15
|
> {
|
|
17
16
|
state = {};
|
|
18
17
|
|
|
19
|
-
async componentDidMount() {}
|
|
18
|
+
async componentDidMount() { }
|
|
20
19
|
|
|
21
20
|
get computedLayoutPath() {
|
|
22
21
|
const { layoutRootPath } = this.props;
|
|
@@ -24,11 +23,19 @@ class ExcelImportRoute extends React.PureComponent<
|
|
|
24
23
|
return "";
|
|
25
24
|
}
|
|
26
25
|
|
|
26
|
+
getServerKey = () => { // 获取serverKey
|
|
27
|
+
const { searchParams, serverKey } = this.props;
|
|
28
|
+
if (serverKey) return serverKey;
|
|
29
|
+
let temServerKey = searchParams.get("serverKey");
|
|
30
|
+
return temServerKey || null;
|
|
31
|
+
};
|
|
32
|
+
|
|
27
33
|
render() {
|
|
28
|
-
const { params
|
|
34
|
+
const { params } = this.props;
|
|
29
35
|
const { sourceId } = params;
|
|
36
|
+
const serverKey = this.getServerKey();
|
|
30
37
|
return (
|
|
31
|
-
<ExcelImport key={"excelimport"+sourceId} serverKey={serverKey} sourceId={sourceId}></ExcelImport>
|
|
38
|
+
<ExcelImport key={"excelimport" + sourceId} serverKey={serverKey} sourceId={sourceId}></ExcelImport>
|
|
32
39
|
);
|
|
33
40
|
}
|
|
34
41
|
}
|
|
@@ -137,6 +137,12 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
137
137
|
return menuId;
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
+
getServerKey = () => { // 获取serverKey
|
|
141
|
+
const { searchParams } = this.props;
|
|
142
|
+
let serverKey = searchParams.get("serverKey");
|
|
143
|
+
return serverKey || null;
|
|
144
|
+
};
|
|
145
|
+
|
|
140
146
|
doClose = () => {
|
|
141
147
|
this.setState(
|
|
142
148
|
{
|
|
@@ -155,10 +161,8 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
155
161
|
loadData = async () => {
|
|
156
162
|
const { params } = this.props;
|
|
157
163
|
const { sourceId } = params;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
sourceId
|
|
161
|
-
);
|
|
164
|
+
const serverKey = this.getServerKey();
|
|
165
|
+
let ltmplConfigRes: LtmplConfigRes = await HCDataSource.requestLtmplConfig(serverKey, sourceId);
|
|
162
166
|
this.setState({ ltmplConfigRes: ltmplConfigRes });
|
|
163
167
|
};
|
|
164
168
|
|
|
@@ -399,6 +403,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
399
403
|
} = this.state;
|
|
400
404
|
const { location, params, tableType, rowOperatable, defShowType } = this.props;
|
|
401
405
|
const { sourceId } = params;
|
|
406
|
+
const serverKey = this.getServerKey();
|
|
402
407
|
const { translate } = this.context;
|
|
403
408
|
//let menuId = undefined;
|
|
404
409
|
let mainCode = undefined;
|
|
@@ -435,7 +440,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
435
440
|
return (
|
|
436
441
|
<>
|
|
437
442
|
<ActTable key={"acttable" + sourceId}
|
|
438
|
-
tableType={tableType} serverKey={
|
|
443
|
+
tableType={tableType} serverKey={serverKey} pageSize={pageSize} pageNo={pageNo} onChangePage={this.onChangePage}
|
|
439
444
|
menuId={this.getMenuId()} operatable={rowOperatable}
|
|
440
445
|
mainCode={mainCode} showView={this.showView} doSearch={this.onChangeSearch} doEdit={this.doEdit}
|
|
441
446
|
doCreate={this.doCreate} sourceId={sourceId}
|
|
@@ -459,14 +464,14 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
459
464
|
}
|
|
460
465
|
styles={{ body: { minWidth: "720px" } }}
|
|
461
466
|
>
|
|
462
|
-
<LtmplTable serverKey={
|
|
467
|
+
<LtmplTable serverKey={serverKey} sourceId={ractionId} mainCode={selectedCode} />
|
|
463
468
|
</Drawer>
|
|
464
469
|
) : null}
|
|
465
470
|
{showViewDrawer && selectedCode ? (
|
|
466
471
|
toCustomPage && ltmplConfig.customViewPagePath ? <CustomDetailModalPage width={1000} minHeight="70vh" mainCode={mainCode} sourceId={sourceId} code={selectedCode} open={showViewDrawer} customPath={ltmplConfig.customViewPagePath} onCancel={this.doClose} />
|
|
467
472
|
:
|
|
468
473
|
<DtmplViewDrawer
|
|
469
|
-
serverKey={
|
|
474
|
+
serverKey={serverKey} placement={ltmplConfig?.buttonViewConfig?.windowPosition}
|
|
470
475
|
width={windowWidth}
|
|
471
476
|
height={windowHeight}
|
|
472
477
|
onClose={this.doClose}
|
|
@@ -479,7 +484,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
479
484
|
toCustomPage && ltmplConfig.customViewPagePath ? <CustomDetailModalPage width={1000} minHeight="70vh" mainCode={mainCode} sourceId={sourceId} code={selectedCode} open={showViewModal} customPath={ltmplConfig.customViewPagePath} onCancel={this.doClose} />
|
|
480
485
|
:
|
|
481
486
|
<DtmplViewModal
|
|
482
|
-
serverKey={
|
|
487
|
+
serverKey={serverKey} width={windowWidth} height={windowHeight} onClose={this.doClose}
|
|
483
488
|
open={showViewModal} sourceId={viewSourceId ? viewSourceId : sourceId}
|
|
484
489
|
code={selectedCode}
|
|
485
490
|
/>
|
|
@@ -500,7 +505,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
|
|
|
500
505
|
) : (
|
|
501
506
|
<DtmplEditPage
|
|
502
507
|
defaultDtmplData={ltmplConfig.defaultDtmplData}
|
|
503
|
-
serverKey={
|
|
508
|
+
serverKey={serverKey}
|
|
504
509
|
pageType={showWindowType == "modal" ? "modal" : "drawer"}
|
|
505
510
|
placement={ltmplConfig?.buttonEditConfig?.windowPosition}
|
|
506
511
|
open={showEdit}
|
|
@@ -49,15 +49,16 @@ const Index = (props: Props) => {
|
|
|
49
49
|
const navigate = useNavigate();
|
|
50
50
|
const computedLayoutPath = layoutRootPath !== undefined ? `/${layoutRootPath}` : "";
|
|
51
51
|
|
|
52
|
-
const { mainCode, menuId } = useMemo(() => {
|
|
52
|
+
const { mainCode, menuId, serverKey } = useMemo(() => {
|
|
53
53
|
const temParams = new URLSearchParams(search);
|
|
54
54
|
const mainCode = temParams.get("mainCode");
|
|
55
55
|
const menuId = temParams.get("menuId");
|
|
56
|
-
|
|
56
|
+
const serverKey = temParams.get("serverKey") || null;
|
|
57
|
+
return { mainCode, menuId, serverKey }
|
|
57
58
|
}, [search])
|
|
58
59
|
|
|
59
60
|
const getLtmplConfig = async () => {
|
|
60
|
-
const ltmplConfigRes: LtmplConfigRes = await HCDataSource.requestLtmplConfig(
|
|
61
|
+
const ltmplConfigRes: LtmplConfigRes = await HCDataSource.requestLtmplConfig(serverKey, sourceId);
|
|
61
62
|
const ltmplConfig = ltmplConfigRes?.ltmplConfig;
|
|
62
63
|
setLtmplConfig(ltmplConfig);
|
|
63
64
|
setSplitterSize(`${ltmplConfig?.rightPercent || 50}%`);
|
|
@@ -224,7 +225,7 @@ const Index = (props: Props) => {
|
|
|
224
225
|
return <></>;
|
|
225
226
|
}
|
|
226
227
|
return <ActTable key={"acttable" + sourceId}
|
|
227
|
-
tableType={tableType} serverKey={
|
|
228
|
+
tableType={tableType} serverKey={serverKey} pageSize={pageSize} pageNo={pageInfo?.pageNo} onChangePage={onChangePage}
|
|
228
229
|
menuId={menuId} operatable={rowOperatable}
|
|
229
230
|
mainCode={mainCode} showView={onShowView} doSearch={onChangeSearch} doEdit={doEdit}
|
|
230
231
|
doCreate={doCreate} sourceId={sourceId}
|
|
@@ -299,6 +300,7 @@ const Index = (props: Props) => {
|
|
|
299
300
|
isReset={false}
|
|
300
301
|
onOk={() => doSearch({ serial_number: new Date().getTime() })}
|
|
301
302
|
isCopy={isCopy}
|
|
303
|
+
serverKey={serverKey}
|
|
302
304
|
/>
|
|
303
305
|
: null}
|
|
304
306
|
{showView && selectedCode && showWindowType === "default" ?
|
|
@@ -306,6 +308,7 @@ const Index = (props: Props) => {
|
|
|
306
308
|
mainCode={mainCode}
|
|
307
309
|
sourceId={sourceId}
|
|
308
310
|
code={selectedCode}
|
|
311
|
+
serverKey={serverKey}
|
|
309
312
|
/>
|
|
310
313
|
: null}
|
|
311
314
|
</Splitter.Panel>
|
|
@@ -323,14 +326,14 @@ const Index = (props: Props) => {
|
|
|
323
326
|
</Space>
|
|
324
327
|
}
|
|
325
328
|
>
|
|
326
|
-
<LtmplTable serverKey={
|
|
329
|
+
<LtmplTable serverKey={serverKey} sourceId={ractionId} mainCode={selectedCode} />
|
|
327
330
|
</Drawer>
|
|
328
331
|
) : null}
|
|
329
332
|
{showView && showWindowType === "drawer" && selectedCode ? (
|
|
330
333
|
toCustomPage && ltmplConfig?.customViewPagePath ? <CustomDetailModalPage width={1000} minHeight="70vh" mainCode={mainCode} sourceId={sourceId} code={selectedCode} open={showView} customPath={ltmplConfig?.customViewPagePath} onCancel={doClose} />
|
|
331
334
|
:
|
|
332
335
|
<DtmplViewDrawer
|
|
333
|
-
serverKey={
|
|
336
|
+
serverKey={serverKey} placement={ltmplConfig?.buttonViewConfig?.windowPosition}
|
|
334
337
|
width={windowSize.width}
|
|
335
338
|
height={windowSize.height}
|
|
336
339
|
onClose={doClose}
|
|
@@ -343,7 +346,7 @@ const Index = (props: Props) => {
|
|
|
343
346
|
toCustomPage && ltmplConfig?.customViewPagePath ? <CustomDetailModalPage width={1000} minHeight="70vh" mainCode={mainCode} sourceId={sourceId} code={selectedCode} open={showView} customPath={ltmplConfig?.customViewPagePath} onCancel={doClose} />
|
|
344
347
|
:
|
|
345
348
|
<DtmplViewModal
|
|
346
|
-
serverKey={
|
|
349
|
+
serverKey={serverKey} width={windowSize.width} height={windowSize.height} onClose={doClose}
|
|
347
350
|
open={showView} sourceId={viewSourceId ? viewSourceId : sourceId}
|
|
348
351
|
code={selectedCode}
|
|
349
352
|
/>
|
|
@@ -362,7 +365,7 @@ const Index = (props: Props) => {
|
|
|
362
365
|
) : (
|
|
363
366
|
<DtmplEditPage
|
|
364
367
|
defaultDtmplData={ltmplConfig?.defaultDtmplData}
|
|
365
|
-
serverKey={
|
|
368
|
+
serverKey={serverKey}
|
|
366
369
|
pageType={showWindowType === "modal" ? "modal" : "drawer"}
|
|
367
370
|
placement={ltmplConfig?.buttonEditConfig?.windowPosition}
|
|
368
371
|
open={showEdit}
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import HCDataSource from "../tmpl/hc-data-source";
|
|
7
7
|
import withRouter from "../routable/withroute";
|
|
8
8
|
import ActTree from "../tree/act-tree";
|
|
9
|
-
import {Card, message} from "antd";
|
|
9
|
+
import { Card, message } from "antd";
|
|
10
10
|
export interface TtmplRouteProps extends RouterCompProps {
|
|
11
11
|
layoutRootPath?: string;
|
|
12
|
-
treeTop?:number,
|
|
12
|
+
treeTop?: number,
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface TtmplRouteState {
|
|
@@ -44,13 +44,17 @@ class TtmplRoute extends React.PureComponent<TtmplRouteProps, TtmplRouteState> {
|
|
|
44
44
|
return menuId;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
+
getServerKey = () => { // 获取serverKey
|
|
48
|
+
const { searchParams } = this.props;
|
|
49
|
+
let serverKey = searchParams.get("serverKey");
|
|
50
|
+
return serverKey || null;
|
|
51
|
+
};
|
|
52
|
+
|
|
47
53
|
loadData = async () => {
|
|
48
54
|
const { params } = this.props;
|
|
49
55
|
const { sourceId } = params;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
sourceId
|
|
53
|
-
);
|
|
56
|
+
const serverKey = this.getServerKey();
|
|
57
|
+
let ttmplConfig: TtmplConfig = await HCDataSource.requestTtmplConfig(serverKey, sourceId);
|
|
54
58
|
// debugger;
|
|
55
59
|
if (ttmplConfig.type == "1M") {//此处待优化。不建议支持
|
|
56
60
|
message.error("不支持的配置树。请联系管理员!")
|
|
@@ -76,14 +80,15 @@ class TtmplRoute extends React.PureComponent<TtmplRouteProps, TtmplRouteState> {
|
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
render() {
|
|
79
|
-
const {treeTop} = this.props;
|
|
83
|
+
const { treeTop } = this.props;
|
|
80
84
|
const { ttmplConfig } = this.state;
|
|
85
|
+
const serverKey = this.getServerKey();
|
|
81
86
|
if (!ttmplConfig) {
|
|
82
87
|
return <Card loading={true}></Card>;
|
|
83
88
|
} else {
|
|
84
89
|
return (
|
|
85
90
|
<>
|
|
86
|
-
<ActTree key={ttmplConfig.sourceId} top={treeTop} ttmplConfig={ttmplConfig}></ActTree>
|
|
91
|
+
<ActTree key={ttmplConfig.sourceId} top={treeTop} ttmplConfig={ttmplConfig} serverKey={serverKey}></ActTree>
|
|
87
92
|
</>
|
|
88
93
|
);
|
|
89
94
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import {
|
|
3
3
|
Button, Card, Checkbox, Col, Divider, Popover, Row, Space, Drawer, Tooltip,
|
|
4
|
-
message, Layout, Table, Form as AntdForm, FormInstance, Modal, Input, Alert, Tabs, Radio, Typography
|
|
4
|
+
message, Layout, Table, Form as AntdForm, FormInstance, Modal, Input, Alert, Tabs, Radio, Typography,
|
|
5
|
+
Dropdown
|
|
5
6
|
} from "antd";
|
|
6
7
|
import {
|
|
7
8
|
ExportOutlined, FundOutlined, LineChartOutlined,
|
|
8
9
|
PlusCircleOutlined, PlusOutlined, ReloadOutlined, RetweetOutlined, SearchOutlined,
|
|
9
|
-
TableOutlined, ImportOutlined, AppstoreAddOutlined
|
|
10
|
+
TableOutlined, ImportOutlined, AppstoreAddOutlined, PlusSquareOutlined, DeleteOutlined
|
|
10
11
|
} from "@ant-design/icons";
|
|
11
12
|
import _ from "lodash";
|
|
12
13
|
import "./index.css";
|
|
@@ -1017,6 +1018,19 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1017
1018
|
setUserPageConfig({ ...val, criteriaData: undefined });
|
|
1018
1019
|
}
|
|
1019
1020
|
|
|
1021
|
+
// 更新多表格数量及缓存
|
|
1022
|
+
editRowTableNum = (type: "add" | "delete") => {
|
|
1023
|
+
const { ltmplConfig, setUserPageConfig, userPageConfig } = this.props;
|
|
1024
|
+
const { rowTableNumber, rowTableCondig } = userPageConfig || {};
|
|
1025
|
+
let { defTableSize } = ltmplConfig;
|
|
1026
|
+
const temNum = (rowTableNumber || defTableSize || 0) + (type === "add" ? 1 : -1);
|
|
1027
|
+
if (setUserPageConfig) {
|
|
1028
|
+
const temRowTableCondig = (type === "delete" && rowTableCondig) ? rowTableCondig.slice(0, -1) : rowTableCondig;
|
|
1029
|
+
setUserPageConfig({ rowTableNumber: temNum, rowTableCondig: temRowTableCondig }); // 缓存多表格数量
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// 渲染顶部操作栏
|
|
1020
1034
|
renderHeaderButtons = () => {
|
|
1021
1035
|
let {
|
|
1022
1036
|
hiddenColIds, viewModels, sortedColConfigs, disabledColIds, showL2Chart,
|
|
@@ -1027,7 +1041,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1027
1041
|
funcMode, customCreatable, serverKey, readOnly, userPageConfig, allowUserConfig, showTableAdd
|
|
1028
1042
|
} = this.props;
|
|
1029
1043
|
const { translate } = this.context;
|
|
1030
|
-
let { buttons
|
|
1044
|
+
let { buttons } = ltmplConfig;
|
|
1031
1045
|
const version = localStorage.getItem("version") || "";
|
|
1032
1046
|
|
|
1033
1047
|
return (
|
|
@@ -1035,9 +1049,14 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1035
1049
|
<Space>
|
|
1036
1050
|
{userPageConfig && allowUserConfig ? <PageConfigButton menuCode={menuId} handleResetUserPageConfig={this.handleResetUserPageConfig} handleUpdateUserPageConfig={this.handleUpdateUserPageConfig} userCriteriaData={userCriteriaData} /> : ""}
|
|
1037
1051
|
{(showTableAdd !== false && buttons.includes("showTableAdd")) ?
|
|
1038
|
-
<
|
|
1039
|
-
|
|
1040
|
-
|
|
1052
|
+
<Dropdown styles={{ item: { padding: 0 } }} menu={{
|
|
1053
|
+
items: [
|
|
1054
|
+
{ key: "add", label: <Button type="text" onClick={() => this.editRowTableNum("add")}><PlusSquareOutlined />{translate("${添加列表}")}</Button> },
|
|
1055
|
+
{ key: "delete", label: <Button type="text" disabled={(userPageConfig?.rowTableNumber || 0) <= 1} onClick={() => this.editRowTableNum("delete")}><DeleteOutlined />{translate("${删除列表}")}</Button> }]
|
|
1056
|
+
}} arrow>
|
|
1057
|
+
<Button><AppstoreAddOutlined /></Button>
|
|
1058
|
+
</Dropdown>
|
|
1059
|
+
: ""}
|
|
1041
1060
|
{funcMode == "common" && this.criteriaFormUseful() ? (
|
|
1042
1061
|
<Popover trigger="click" content={this.renderCriteriaForm()}>
|
|
1043
1062
|
<Button>
|
|
@@ -1526,14 +1545,14 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1526
1545
|
renderContent = () => {
|
|
1527
1546
|
let {
|
|
1528
1547
|
queryKey, loading, selectedRows, hiddenRowCodes, viewModels, sortedColConfigs, hiddenColIds, showL2ActTable,
|
|
1529
|
-
pageInfo, editings, userCriteriaData, tabsOptions, tabActiveKey, pageSizeOptions
|
|
1548
|
+
pageInfo, editings, userCriteriaData, tabsOptions, tabActiveKey, pageSizeOptions
|
|
1530
1549
|
} = this.state;
|
|
1531
1550
|
let {
|
|
1532
1551
|
mainCode, sourceId, ltmplConfig, funcMode, operatable,
|
|
1533
1552
|
title, collapsible,
|
|
1534
1553
|
onChangePage, serverKey, criteriaData, showEmpty, loadDataCallback,
|
|
1535
1554
|
showView, doEdit, doRAction, customEditable, readOnly, tableType, showPagination, showAggregates, userPageConfig,
|
|
1536
|
-
doEdit2D, doView2D, showTableAdd
|
|
1555
|
+
doEdit2D, doView2D, showTableAdd, setUserPageConfig
|
|
1537
1556
|
} = this.props;
|
|
1538
1557
|
const { translate } = this.context;
|
|
1539
1558
|
|
|
@@ -1707,7 +1726,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1707
1726
|
)}
|
|
1708
1727
|
</Col>
|
|
1709
1728
|
</Row> : null}
|
|
1710
|
-
{(showTableAdd !== false && buttons.includes("showTableAdd")) ? <RowTable mainTable={renderTable} ltmplConfig={ltmplConfig} tableNumber={
|
|
1729
|
+
{(showTableAdd !== false && buttons.includes("showTableAdd")) ? <RowTable mainTable={renderTable} ltmplConfig={ltmplConfig} tableNumber={userPageConfig?.rowTableNumber} sourceId={sourceId} rowTableCondig={userPageConfig?.rowTableCondig || []} setUserPageConfig={setUserPageConfig} /> : renderTable}
|
|
1711
1730
|
{/*此处放页脚*/}
|
|
1712
1731
|
{ltmplConfig.footer ? (
|
|
1713
1732
|
<div
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactElement, memo } from "react";
|
|
2
|
-
import { Row, Col } from "antd";
|
|
2
|
+
import { Row, Col, Card } from "antd";
|
|
3
|
+
import _ from "lodash";
|
|
3
4
|
import { LtmplConfig } from "../tmpl/interface";
|
|
4
5
|
import { LtmplTable } from "../index";
|
|
5
6
|
|
|
@@ -8,15 +9,37 @@ interface Props {
|
|
|
8
9
|
ltmplConfig: LtmplConfig;
|
|
9
10
|
tableNumber: number; // 表格数量
|
|
10
11
|
sourceId: string;
|
|
12
|
+
rowTableCondig?: { [key: string]: any }[];
|
|
13
|
+
setUserPageConfig?: (config: { [key: string]: any }) => void; // 更新用户页面配置本地缓存
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
const Index = memo((props: Props) => {
|
|
14
|
-
const { mainTable, ltmplConfig, tableNumber, sourceId } = props;
|
|
15
|
-
const
|
|
17
|
+
const { mainTable, ltmplConfig, tableNumber, sourceId, rowTableCondig, setUserPageConfig } = props;
|
|
18
|
+
const { defTableSize, singleTableSpan } = ltmplConfig;
|
|
19
|
+
const showTableNum = (tableNumber || defTableSize || 1) - 1;
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
// 处理缓存
|
|
22
|
+
const handleUserPageConfig = (val: { [key: string]: any }, index: number) => {
|
|
23
|
+
if (!setUserPageConfig) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const temConfig = _.cloneDeep(rowTableCondig);
|
|
27
|
+
temConfig[index] = { ...temConfig[index], ...val };
|
|
28
|
+
setUserPageConfig({ rowTableCondig: temConfig });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return <Row gutter={12}>
|
|
32
|
+
<Col span={singleTableSpan || 24}>
|
|
33
|
+
<Card styles={{ body: { padding: 12 } }}>
|
|
34
|
+
{mainTable}
|
|
35
|
+
</Card>
|
|
36
|
+
</Col>
|
|
37
|
+
{Array(showTableNum).fill(1).map((_, index) =>
|
|
38
|
+
<Col span={singleTableSpan || 24} key={index}>
|
|
39
|
+
<Card styles={{ body: { padding: 12 } }}>
|
|
40
|
+
<LtmplTable funcMode="search" sourceId={sourceId} userPageConfig={rowTableCondig?.[index]} setUserPageConfig={val => handleUserPageConfig(val, index)} />
|
|
41
|
+
</Card>
|
|
42
|
+
</Col>)}
|
|
20
43
|
</Row>;
|
|
21
44
|
});
|
|
22
45
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Card, Layout
|
|
2
|
+
import { Card, Layout } from "antd";
|
|
3
3
|
import TmplTree from "./tmpl-tree";
|
|
4
4
|
import TreeUtils, { TtmplNodeConfig } from "./tree-utils";
|
|
5
5
|
import { TtmplConfig } from "../tmpl/interface";
|
|
@@ -8,11 +8,11 @@ import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
|
8
8
|
import { LocaleContext } from "../locale/LocaleProvider";
|
|
9
9
|
|
|
10
10
|
const { Content, Sider } = Layout;
|
|
11
|
-
const { Text, Title } = Typography;
|
|
12
11
|
|
|
13
12
|
interface ActTreeProps {
|
|
14
13
|
ttmplConfig: TtmplConfig;
|
|
15
|
-
top: number
|
|
14
|
+
top: number;
|
|
15
|
+
serverKey?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
interface ActTreeState {
|
|
@@ -51,8 +51,8 @@ export default class ActTree extends React.PureComponent<
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
loadData = async () => {
|
|
54
|
-
const { ttmplConfig } = this.props;
|
|
55
|
-
let ttmplNodeConfig = await TreeUtils.initTtmplNodeConfig(ttmplConfig);
|
|
54
|
+
const { ttmplConfig, serverKey } = this.props;
|
|
55
|
+
let ttmplNodeConfig = await TreeUtils.initTtmplNodeConfig(ttmplConfig, serverKey);
|
|
56
56
|
this.setState({
|
|
57
57
|
ttmplNodeConfig,
|
|
58
58
|
showEdit: false,
|
|
@@ -138,7 +138,7 @@ export default class ActTree extends React.PureComponent<
|
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
render() {
|
|
141
|
-
const { top } = this.props;
|
|
141
|
+
const { top, serverKey } = this.props;
|
|
142
142
|
const { translate, siderCollapsed } = this.context;
|
|
143
143
|
|
|
144
144
|
|
|
@@ -200,6 +200,7 @@ export default class ActTree extends React.PureComponent<
|
|
|
200
200
|
let a = this.refTmplTree.current?.reloadData(mainCode, recordCode);
|
|
201
201
|
this.setState({ recordCode });
|
|
202
202
|
}}
|
|
203
|
+
serverKey={serverKey}
|
|
203
204
|
/>
|
|
204
205
|
) : null}
|
|
205
206
|
{showView ? (
|
|
@@ -207,6 +208,7 @@ export default class ActTree extends React.PureComponent<
|
|
|
207
208
|
mainCode={mainCode}
|
|
208
209
|
sourceId={sourceId}
|
|
209
210
|
code={recordCode}
|
|
211
|
+
serverKey={serverKey}
|
|
210
212
|
/>
|
|
211
213
|
) : null}
|
|
212
214
|
</Content>
|
|
@@ -25,26 +25,26 @@ export interface TreeDataNode extends DataNode {
|
|
|
25
25
|
|
|
26
26
|
export default class TreeUtils {
|
|
27
27
|
|
|
28
|
-
static initTtmplNodeConfig = async (config: TtmplConfig) => {
|
|
28
|
+
static initTtmplNodeConfig = async (config: TtmplConfig, serverKey?: string) => {
|
|
29
29
|
|
|
30
30
|
if (!config) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
33
|
let ttmplNodeConfig: TtmplNodeConfig = { ...config }
|
|
34
34
|
if (ttmplNodeConfig.rootGtmplId) {
|
|
35
|
-
let res: LtmplConfigRes = await HCDataSource.requestLtmplConfig(null, ttmplNodeConfig.rootGtmplId);
|
|
35
|
+
let res: LtmplConfigRes = await HCDataSource.requestLtmplConfig(serverKey || null, ttmplNodeConfig.rootGtmplId);
|
|
36
36
|
let rootLTmplConfig: LtmplConfig = res.ltmplConfig;
|
|
37
37
|
ttmplNodeConfig.rootLTmplConfig = rootLTmplConfig;
|
|
38
38
|
ttmplNodeConfig.rootTitleId = rootLTmplConfig.extDisplayConfig.primaryColumn?.id;
|
|
39
39
|
}
|
|
40
40
|
if (ttmplNodeConfig.branchRatmplId) {
|
|
41
|
-
let res: LtmplConfigRes = await HCDataSource.requestLtmplConfig(null, ttmplNodeConfig.branchRatmplId);
|
|
41
|
+
let res: LtmplConfigRes = await HCDataSource.requestLtmplConfig(serverKey || null, ttmplNodeConfig.branchRatmplId);
|
|
42
42
|
let branchLTmplConfig: LtmplConfig = res.ltmplConfig;
|
|
43
43
|
ttmplNodeConfig.branchLTmplConfig = branchLTmplConfig;
|
|
44
44
|
ttmplNodeConfig.branchTitleId = branchLTmplConfig.extDisplayConfig.primaryColumn?.id;
|
|
45
45
|
}
|
|
46
46
|
if (ttmplNodeConfig.leafRatmplId) {
|
|
47
|
-
let res: LtmplConfigRes = await HCDataSource.requestLtmplConfig(null, ttmplNodeConfig.leafRatmplId);
|
|
47
|
+
let res: LtmplConfigRes = await HCDataSource.requestLtmplConfig(serverKey || null, ttmplNodeConfig.leafRatmplId);
|
|
48
48
|
let leafLTmplConfig: LtmplConfig = res.ltmplConfig;
|
|
49
49
|
ttmplNodeConfig.leafLTmplConfig = leafLTmplConfig;
|
|
50
50
|
ttmplNodeConfig.leafTitleId = leafLTmplConfig.extDisplayConfig.primaryColumn?.id;
|
|
@@ -52,6 +52,8 @@ const pageConfigCommons = {}; // 用户页面自定义配置
|
|
|
52
52
|
|
|
53
53
|
let components2DMap = {}; // 2D图形组件
|
|
54
54
|
|
|
55
|
+
let Cross_Project_Code = {}; // 跨项目编码
|
|
56
|
+
|
|
55
57
|
// let siderCollapsed:boolean = true;
|
|
56
58
|
|
|
57
59
|
export default {
|
|
@@ -229,8 +231,8 @@ export default {
|
|
|
229
231
|
},
|
|
230
232
|
programCode(key?: string) {
|
|
231
233
|
let programCode = null;
|
|
232
|
-
if (key) {
|
|
233
|
-
programCode = window.localStorage.getItem(key + "programCode");
|
|
234
|
+
if (key) { // 存在key时优先从本地缓存获取是否是跨项目的菜单
|
|
235
|
+
programCode = this.getCrossProjectCode(key) || window.localStorage.getItem(key + "programCode");
|
|
234
236
|
if (!programCode && key === "localDevopsServer") { // 2D图图片上传模型,配置为空则使用默认值
|
|
235
237
|
programCode = "282877560559017986";
|
|
236
238
|
}
|
|
@@ -297,7 +299,7 @@ export default {
|
|
|
297
299
|
},
|
|
298
300
|
api(key?: string) {
|
|
299
301
|
let appi = null;
|
|
300
|
-
if (key) {
|
|
302
|
+
if (key && !key.startsWith("cp_")) { // 跨项目菜单的api走原来配置
|
|
301
303
|
appi = window.localStorage.getItem(key + "hydrocarbonServer");
|
|
302
304
|
} else {
|
|
303
305
|
appi = window.localStorage.getItem(
|
|
@@ -1363,5 +1365,11 @@ export default {
|
|
|
1363
1365
|
}
|
|
1364
1366
|
const item = Object.values(components2DMap).flat(Infinity).find((r: any) => r.type === type);
|
|
1365
1367
|
return item;
|
|
1368
|
+
},
|
|
1369
|
+
setCrossProjectCode(codes: { [key: string]: string }) { // 设置全局跨项目code
|
|
1370
|
+
Cross_Project_Code = codes;
|
|
1371
|
+
},
|
|
1372
|
+
getCrossProjectCode(sourceId: string) { // 获取全局跨项目code
|
|
1373
|
+
return Cross_Project_Code[sourceId];
|
|
1366
1374
|
}
|
|
1367
1375
|
};
|