aldehyde 0.2.73 → 0.2.74
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/detail/view/act-dtmpl-view.d.ts +1 -0
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +2 -2
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts +4 -3
- package/lib/detail/view/modal-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.js +2 -6
- package/lib/detail/view/modal-dtmpl-view.js.map +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/menu-render.d.ts.map +1 -1
- package/lib/layout/menu/menu-render.js +3 -0
- package/lib/layout/menu/menu-render.js.map +1 -1
- package/lib/layout/menu/userinfo-bar.js +1 -1
- package/lib/layout/menu/userinfo-bar.js.map +1 -1
- package/lib/module/dtmpl-view-card.d.ts +1 -0
- package/lib/module/dtmpl-view-card.d.ts.map +1 -1
- package/lib/module/dtmpl-view-card.js +1 -1
- package/lib/module/dtmpl-view-card.js.map +1 -1
- package/lib/module/dtmpl-view-drawer.js +1 -1
- package/lib/module/dtmpl-view-drawer.js.map +1 -1
- package/lib/routable/ttmpl-route.d.ts +12 -0
- package/lib/routable/ttmpl-route.d.ts.map +1 -0
- package/lib/routable/ttmpl-route.js +187 -0
- package/lib/routable/ttmpl-route.js.map +1 -0
- package/lib/tmpl/interface.d.ts +6 -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 +1 -0
- package/lib/tree/act-tree.d.ts.map +1 -0
- package/lib/tree/act-tree.js +113 -0
- package/lib/tree/act-tree.js.map +1 -0
- package/lib/tree/tmpl-tree.d.ts +1 -0
- package/lib/tree/tmpl-tree.d.ts.map +1 -0
- package/lib/tree/tmpl-tree.js +482 -0
- package/lib/tree/tmpl-tree.js.map +1 -0
- package/package.json +1 -1
- package/src/aldehyde/controls/entity-select/entity-select.tsx +1 -1
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +3 -2
- package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +6 -6
- package/src/aldehyde/index.tsx +2 -1
- package/src/aldehyde/layout/menu/menu-render.tsx +3 -0
- package/src/aldehyde/layout/menu/userinfo-bar.tsx +1 -1
- package/src/aldehyde/module/dtmpl-view-card.tsx +2 -1
- package/src/aldehyde/module/dtmpl-view-drawer.tsx +2 -2
- package/src/aldehyde/routable/ttmpl-route.tsx +207 -0
- package/src/aldehyde/tmpl/interface.tsx +7 -1
- package/src/aldehyde/tree/act-tree.tsx +111 -0
- package/src/aldehyde/tree/tmpl-tree.tsx +480 -0
|
@@ -11,6 +11,7 @@ import ToolTipBar from "../tooltipbar";
|
|
|
11
11
|
|
|
12
12
|
export interface ActDtmplViewProps extends DtmplBaseProps {
|
|
13
13
|
versionId?: number;
|
|
14
|
+
title?:any,
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export interface ActDtmplViewStat {
|
|
@@ -81,7 +82,7 @@ class ActDtmplView extends React.PureComponent<ActDtmplViewProps, ActDtmplViewSt
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
render() {
|
|
84
|
-
const {showRightNav, rightBarPositionRight, code, sourceId,goDtmpl,serverKey,codeSource} = this.props;
|
|
85
|
+
const {showRightNav, rightBarPositionRight, code, sourceId,goDtmpl,serverKey,codeSource,title} = this.props;
|
|
85
86
|
const {dtmplConfig, premisesTitle, loading, layout, snapshotOpen,refreshCode} = this.state;
|
|
86
87
|
const buttons = dtmplConfig ? dtmplConfig.buttons : undefined;
|
|
87
88
|
const premises = dtmplConfig ? dtmplConfig.premises : undefined;
|
|
@@ -96,7 +97,7 @@ class ActDtmplView extends React.PureComponent<ActDtmplViewProps, ActDtmplViewSt
|
|
|
96
97
|
className="hoverable pageHeader"
|
|
97
98
|
>
|
|
98
99
|
<h3>
|
|
99
|
-
{'详情'}{dtmplConfig?<ToolTipBar content={dtmplConfig.tip} />:null}
|
|
100
|
+
{title?title:'详情'}{dtmplConfig?<ToolTipBar content={dtmplConfig.tip} />:null}
|
|
100
101
|
<div className="fr">
|
|
101
102
|
{buttons && buttons.includes("dtmplEdit") && goDtmpl && !dtmplConfig.editAction ?
|
|
102
103
|
<Button
|
|
@@ -2,9 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import {Modal, ModalProps as AntdModalProps,Form,Button} from 'antd'
|
|
3
3
|
import ActDtmplView, {ActDtmplViewProps} from "./act-dtmpl-view";
|
|
4
4
|
import Scrollbars from 'react-custom-scrollbars';
|
|
5
|
-
interface ModalDtmplViewProps extends
|
|
6
|
-
height
|
|
5
|
+
interface ModalDtmplViewProps extends ActDtmplViewProps{
|
|
6
|
+
height?:any,
|
|
7
7
|
onCancel:()=>any,
|
|
8
|
+
open?:boolean,
|
|
9
|
+
children?:any,
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
interface ModalDtmplViewState {
|
|
@@ -33,13 +35,11 @@ export default class ModalDtmplView extends React.PureComponent<ModalDtmplViewPr
|
|
|
33
35
|
|
|
34
36
|
render() {
|
|
35
37
|
// console.log('antdModalProps:',this.antdModalProps);
|
|
36
|
-
const {
|
|
37
|
-
|
|
38
|
-
//const {code} = this.state;o
|
|
38
|
+
const {code,sourceId,serverKey,open,onCancel,height} = this.props
|
|
39
|
+
|
|
39
40
|
return <Modal
|
|
40
41
|
open={open}
|
|
41
42
|
title={"查看"}
|
|
42
|
-
// style={style}
|
|
43
43
|
width={"82vw"}
|
|
44
44
|
centered
|
|
45
45
|
wrapClassName={'aaa'}
|
package/src/aldehyde/index.tsx
CHANGED
|
@@ -52,6 +52,7 @@ import ImportRoute from './routable/import-route';
|
|
|
52
52
|
// const ImportRoute = loadable(() =>
|
|
53
53
|
// import("./routable/import-route"), {fallback: Loading});
|
|
54
54
|
import LtmplRoute from "./routable/ltmpl-route";
|
|
55
|
+
import TtmplRoute from "./routable/ttmpl-route";
|
|
55
56
|
// const LtmplRoute = loadable(() =>
|
|
56
57
|
// import("./routable/ltmpl-route"), {fallback: Loading});
|
|
57
58
|
import DtmplViewCard from './module/dtmpl-view-card';
|
|
@@ -115,7 +116,7 @@ import DatePicker from './controls/date-picker';
|
|
|
115
116
|
|
|
116
117
|
import ModelStrucV3 from './tmpl/model-struc-v3';
|
|
117
118
|
|
|
118
|
-
export {ActTable,SelectTable,Login,DtmplRoute,ImportRoute,LtmplRoute,DtmplViewCard,DtmplEditDrawer,DtmplEditModal,LtmplModal,LtmplDrawer,LtmplTable,Menu2layers,Block,UserBar,
|
|
119
|
+
export {ActTable,SelectTable,Login,DtmplRoute,ImportRoute,LtmplRoute,TtmplRoute,DtmplViewCard,DtmplEditDrawer,DtmplEditModal,LtmplModal,LtmplDrawer,LtmplTable,Menu2layers,Block,UserBar,
|
|
119
120
|
ResetPassword,Footer,EntryControl,ViewControl,ProgramConfig,HydrocarbonService,QuickEntrance,Workbench,PopoverEntitySelect,DtmplEditCard,RouterLogin
|
|
120
121
|
,DatePicker,DtmplEditPage,TmplInterface,TmplDataSource,Superagent,DtmplEdit,HCWelcome,MainPage,ExcelImportRoute,CustomPageRouter,HCCustomPageRouter,L2MenuMessageBar,L2MenuQuickBar,ContextSetter,withRouter,ModelStrucV3}
|
|
121
122
|
|
|
@@ -43,7 +43,7 @@ class UserInfoBar extends React.PureComponent<UserInfoBarProps, UserInfoBarState
|
|
|
43
43
|
<>{userCode?
|
|
44
44
|
<>
|
|
45
45
|
<span onClick={this.showDraw}>个人信息</span>
|
|
46
|
-
{showDraw ?<DtmplViewDrawer serverKey={null} editable={editable} title={'个人信息'}
|
|
46
|
+
{showDraw ?<DtmplViewDrawer serverKey={null} editable={editable} title={'个人信息'} sourceId={gtmplSourceId} open={showDraw} code={userCode} onClose={this.closeDrawer}></DtmplViewDrawer>:null}
|
|
47
47
|
</>:null } </>
|
|
48
48
|
);
|
|
49
49
|
}
|
|
@@ -6,6 +6,7 @@ import {CodeSource} from "../tmpl/interface";
|
|
|
6
6
|
//以列表为入口的,页面内列表,基本原则是所有交互在页面内完成,不会触发路由。
|
|
7
7
|
|
|
8
8
|
export interface DtmplViewCardProps {
|
|
9
|
+
title?:any,
|
|
9
10
|
serverKey?:string,
|
|
10
11
|
sourceId?:string,
|
|
11
12
|
code?:string;
|
|
@@ -51,7 +52,7 @@ class DtmplViewCard extends React.PureComponent<DtmplViewCardProps, DtmplViewCar
|
|
|
51
52
|
|
|
52
53
|
render() {
|
|
53
54
|
const {showDtmplEdit} = this.state;
|
|
54
|
-
const { sourceId,code,mainCode,editable,serverKey,codeSource} = this.props;
|
|
55
|
+
const { sourceId,code,mainCode,editable,serverKey,codeSource,title} = this.props;
|
|
55
56
|
return <>
|
|
56
57
|
<ActDtmplView codeSource={codeSource} serverKey={serverKey} goDtmpl={editable?this.goDtmpl:null} sourceId={sourceId} code={code} mainCode={mainCode}></ActDtmplView>
|
|
57
58
|
{showDtmplEdit? <DtmplEditModal codeSource={codeSource} serverKey={serverKey} open={showDtmplEdit} onCancel={()=>{
|
|
@@ -49,7 +49,7 @@ class DtmplViewDrawer extends React.PureComponent<DtmplViewDrawerProps, DtmplVie
|
|
|
49
49
|
open={open}
|
|
50
50
|
width={width}
|
|
51
51
|
style={{
|
|
52
|
-
maxWidth: "
|
|
52
|
+
maxWidth: "92vw",
|
|
53
53
|
}}
|
|
54
54
|
extra={
|
|
55
55
|
<Space>
|
|
@@ -57,7 +57,7 @@ class DtmplViewDrawer extends React.PureComponent<DtmplViewDrawerProps, DtmplVie
|
|
|
57
57
|
</Space>
|
|
58
58
|
}
|
|
59
59
|
>
|
|
60
|
-
<DtmplViewCard
|
|
60
|
+
<DtmplViewCard codeSource={codeSource} serverKey={serverKey} editable={editable} sourceId={sourceId} code={code}></DtmplViewCard>
|
|
61
61
|
</Drawer>)
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import {AddOrUpdate, LtmplConfigRes, RouterCompProps} from '../tmpl/interface';
|
|
3
|
+
import Units from "../units";
|
|
4
|
+
import ActTable from '../table/act-table'
|
|
5
|
+
// import StatActTable from '../table/stat-act-table'
|
|
6
|
+
import HCDataSource from "../tmpl/hc-data-source";
|
|
7
|
+
import withRouter from "../routable/withroute";
|
|
8
|
+
export interface TtmplRouteProps extends RouterCompProps {
|
|
9
|
+
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export interface TtmplRouteState {
|
|
13
|
+
ltmplConfigRes?: LtmplConfigRes,
|
|
14
|
+
pageNo?: number,
|
|
15
|
+
pageSize?: number,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
class TtmplRoute extends React.PureComponent<TtmplRouteProps, TtmplRouteState> {
|
|
19
|
+
static defaultProps = {
|
|
20
|
+
basePath: "",
|
|
21
|
+
}
|
|
22
|
+
state = {
|
|
23
|
+
ltmplConfigRes: undefined,
|
|
24
|
+
pageNo: undefined,
|
|
25
|
+
pageSize: undefined,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
async componentDidMount() {
|
|
29
|
+
this.loadData();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
onRoute = (path) => {
|
|
33
|
+
this.props.navigate(path);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getMenuId = () => {
|
|
37
|
+
const {searchParams} = this.props;
|
|
38
|
+
let menuId = searchParams.get('menuId');
|
|
39
|
+
return menuId;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
loadData = async () => {
|
|
43
|
+
const {params} = this.props;
|
|
44
|
+
const {sourceId} = params;
|
|
45
|
+
let ltmplConfigRes:LtmplConfigRes = await HCDataSource.requestLtmplConfig(null,sourceId);
|
|
46
|
+
this.setState({
|
|
47
|
+
ltmplConfigRes:ltmplConfigRes,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async componentDidUpdate(prevProps) {
|
|
52
|
+
const {location,params} = this.props;
|
|
53
|
+
const {sourceId} = params;
|
|
54
|
+
let {sourceId: preSourceId} = prevProps.params;
|
|
55
|
+
let {location: preLocation} = prevProps;
|
|
56
|
+
if (!sourceId ||
|
|
57
|
+
(!preSourceId && this.state.ltmplConfigRes)
|
|
58
|
+
|| (location.pathname == preLocation.pathname && location.search == preLocation.search)
|
|
59
|
+
) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this.loadData();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
showView = (code: string, toCustomPage: boolean = false) => {
|
|
66
|
+
const {basePath} = this.props;
|
|
67
|
+
const {sourceId} = this.props.params;
|
|
68
|
+
const {ltmplConfigRes} = this.state;
|
|
69
|
+
let path = `${basePath}/${sourceId}/detail-view?code=${code}&menuId=${this.getMenuId()}`;
|
|
70
|
+
if (toCustomPage && ltmplConfigRes.ltmplConfig.customViewPagePath) {
|
|
71
|
+
path = `${basePath}${ltmplConfigRes.ltmplConfig.customViewPagePath}?menuId=${this.getMenuId()}&sourceId=${sourceId}`;
|
|
72
|
+
}
|
|
73
|
+
this.onRoute(path);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
doEdit = (code: string, mode: AddOrUpdate, toCustomPage: boolean = false) => {
|
|
77
|
+
const {basePath} = this.props;
|
|
78
|
+
const {sourceId} = this.props.params;
|
|
79
|
+
const {ltmplConfigRes} = this.state;
|
|
80
|
+
let mainCode = this.getMainCode();
|
|
81
|
+
|
|
82
|
+
let path = `${basePath}/${sourceId}/detail-edit?code=${code}&menuId=${this.getMenuId()}&mode=${mode}`;
|
|
83
|
+
if (toCustomPage && ltmplConfigRes.ltmplConfig.customEditPagePath) {
|
|
84
|
+
path = `${basePath}/page/${sourceId}${ltmplConfigRes.ltmplConfig.customEditPagePath}?code=${code}&menuId=${this.getMenuId()}`;
|
|
85
|
+
}
|
|
86
|
+
if (mainCode) {
|
|
87
|
+
path = path + `&mainCode=${mainCode}`;
|
|
88
|
+
}
|
|
89
|
+
this.onRoute(path);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
getMainCode = () => {
|
|
93
|
+
const {searchParams} = this.props;
|
|
94
|
+
let mainCode = undefined;
|
|
95
|
+
// let criteriaData = Units.transQueryStrToParams(search);
|
|
96
|
+
let mcode=searchParams.get('mainCode');
|
|
97
|
+
if (mcode) {
|
|
98
|
+
// criteriaData = Units.transQueryStrToParams(search);
|
|
99
|
+
mainCode = mcode;
|
|
100
|
+
}
|
|
101
|
+
return mainCode;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
doCreate = (toCustomPage: boolean = false) => {
|
|
105
|
+
const {basePath} = this.props;
|
|
106
|
+
const {sourceId} = this.props.params;
|
|
107
|
+
const {ltmplConfigRes} = this.state;
|
|
108
|
+
let path = `${basePath}/${sourceId}/detail-edit?menuId=${this.getMenuId()}`;
|
|
109
|
+
if (toCustomPage && ltmplConfigRes.ltmplConfig.customEditPagePath) {
|
|
110
|
+
path = `${basePath}/page/${sourceId}${ltmplConfigRes.ltmplConfig.customEditPagePath}?menuId=${this.getMenuId()}`;
|
|
111
|
+
}
|
|
112
|
+
let mainCode = this.getMainCode();
|
|
113
|
+
if (mainCode) {
|
|
114
|
+
path = path + `&mainCode=${mainCode}`;
|
|
115
|
+
}
|
|
116
|
+
this.onRoute(path);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
doRAction = (ractionId: string, mainCode: String) => {
|
|
120
|
+
const {basePath} = this.props;
|
|
121
|
+
let path = `${basePath}/${ractionId}/act-table?mainCode=${mainCode}&menuId=${this.getMenuId()}`;
|
|
122
|
+
this.onRoute(path);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
doSearch = (params_) => {
|
|
126
|
+
const {basePath} = this.props;
|
|
127
|
+
const {sourceId} = this.props.params;
|
|
128
|
+
let params = {...params_}
|
|
129
|
+
//params['sourceId'] = sourceId;
|
|
130
|
+
const newfliter = Units.transQueryParamsToStr(params);
|
|
131
|
+
this.props.navigate(`${basePath}/${sourceId}/act-table?${newfliter}`,{replace:true})
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
onChangeSearch = (params_) => {
|
|
135
|
+
let params = {...params_}
|
|
136
|
+
//追加过滤条件,hiddenColIds,innerQueryKey
|
|
137
|
+
const {searchParams} = this.props;
|
|
138
|
+
let mcode=searchParams.get("mainCode");
|
|
139
|
+
if (mcode) {
|
|
140
|
+
params['mainCode'] = mcode;
|
|
141
|
+
}
|
|
142
|
+
const {pageSize,pageNo} = this.state;
|
|
143
|
+
if(pageSize){
|
|
144
|
+
params['pageNo'] = pageNo;
|
|
145
|
+
}
|
|
146
|
+
if(pageNo){
|
|
147
|
+
params['pageSize'] = pageSize;
|
|
148
|
+
}
|
|
149
|
+
params['menuId']=this.getMenuId();
|
|
150
|
+
params['sourceId']=this.getMenuId();
|
|
151
|
+
this.doSearch(params);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
onChangePage = (pageNo: number, pageSize: number) => {
|
|
155
|
+
const {location} = this.props;
|
|
156
|
+
let search = location.search;
|
|
157
|
+
let params = Units.transQueryStrToParams(search);
|
|
158
|
+
params['pageNo'] = pageNo;
|
|
159
|
+
params['pageSize'] = pageSize;
|
|
160
|
+
this.doSearch(params);
|
|
161
|
+
|
|
162
|
+
// this.setState({
|
|
163
|
+
// pageNo,
|
|
164
|
+
// pageSize
|
|
165
|
+
// })
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
render() {
|
|
170
|
+
const {ltmplConfigRes} = this.state;
|
|
171
|
+
const {location, params} = this.props;
|
|
172
|
+
const {sourceId} = params;
|
|
173
|
+
//let menuId = undefined;
|
|
174
|
+
let mainCode = undefined;
|
|
175
|
+
|
|
176
|
+
let search = location.search;
|
|
177
|
+
let criteriaData = Units.transQueryStrToParams(search);
|
|
178
|
+
// if (search.indexOf('menuId') > 0) {
|
|
179
|
+
// menuId = criteriaData['menuId'];
|
|
180
|
+
// criteriaData['menuId'] = undefined;
|
|
181
|
+
// } else {
|
|
182
|
+
// menuId = sourceId;
|
|
183
|
+
// }
|
|
184
|
+
let pageSize = criteriaData['pageSize'];
|
|
185
|
+
let pageNo = criteriaData['pageNo'];
|
|
186
|
+
|
|
187
|
+
if (search.indexOf('mainCode') > 0) {
|
|
188
|
+
//criteriaData = Units.transQueryStrToParams(search);
|
|
189
|
+
mainCode = criteriaData['mainCode'];
|
|
190
|
+
}
|
|
191
|
+
if (!ltmplConfigRes) {
|
|
192
|
+
return <></>;
|
|
193
|
+
} else {
|
|
194
|
+
return <ActTable serverKey={null} pageSize={pageSize} pageNo={pageNo} onChangePage={this.onChangePage}
|
|
195
|
+
menuId={this.getMenuId()} mainCode={mainCode} showView={this.showView}
|
|
196
|
+
doSearch={this.onChangeSearch} doEdit={this.doEdit} doCreate={this.doCreate}
|
|
197
|
+
sourceId={sourceId} criteriaData={criteriaData}
|
|
198
|
+
ltmplConfig={ltmplConfigRes?ltmplConfigRes.ltmplConfig:null}
|
|
199
|
+
doRAction={this.doRAction}
|
|
200
|
+
/>
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export default withRouter(TtmplRoute);
|
|
207
|
+
|
|
@@ -84,7 +84,7 @@ export interface Level2Menu extends MenuBase {
|
|
|
84
84
|
displayTotal?: boolean;
|
|
85
85
|
count?:number;
|
|
86
86
|
defaultCriteriaValue?:object,
|
|
87
|
-
pageType:'列表'|'详情'|'编辑'|'添加'|'编辑或添加'
|
|
87
|
+
pageType:'列表'|'详情'|'编辑'|'添加'|'编辑或添加'|'树'
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export interface Level1Menu extends MenuBase {
|
|
@@ -200,6 +200,12 @@ export interface LtmplConfigRes {
|
|
|
200
200
|
ltmplConfig?: LtmplConfig;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
+
export interface TtmplConfigRes {
|
|
204
|
+
sourceId: string;
|
|
205
|
+
ltmplConfig?: LtmplConfig;
|
|
206
|
+
parentLtmplConfig?: LtmplConfig;
|
|
207
|
+
}
|
|
208
|
+
|
|
203
209
|
// export interface StatViewConfig extends SelectConfig {
|
|
204
210
|
//
|
|
205
211
|
// // reStat query analysis
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// import React from 'react'
|
|
2
|
+
// import {Col, Empty, Layout, Row, Tabs, Button, Affix, Space, Card, Typography} from 'antd';
|
|
3
|
+
// import ModelService from "../utils/modelService";
|
|
4
|
+
// import {DndProvider} from 'react-dnd';
|
|
5
|
+
// import {HTML5Backend} from 'react-dnd-html5-backend';
|
|
6
|
+
// import TmplTree from "../tree/module-group-tree";
|
|
7
|
+
// import './index.css';
|
|
8
|
+
// import {DtmplEditCard, DtmplEditPage} from "aldehyde";
|
|
9
|
+
// import HydrogenConstant from "../hydrogen-constant";
|
|
10
|
+
// const {Content, Sider} = Layout;
|
|
11
|
+
// const {Text, Title} = Typography
|
|
12
|
+
// interface PageConfigProps {
|
|
13
|
+
//
|
|
14
|
+
// }
|
|
15
|
+
//
|
|
16
|
+
// interface PageConfigState {
|
|
17
|
+
// pageCode: string,
|
|
18
|
+
// moduleCode:string,
|
|
19
|
+
// moduleType: string,
|
|
20
|
+
// moduleName:string,
|
|
21
|
+
// titleClickedKey: string | number,
|
|
22
|
+
// activeKey: string,
|
|
23
|
+
// pageSearchValue:string,
|
|
24
|
+
// menuSearchValue:string,
|
|
25
|
+
// }
|
|
26
|
+
//
|
|
27
|
+
// export default class ActTree extends React.PureComponent<PageConfigProps, PageConfigState> {
|
|
28
|
+
//
|
|
29
|
+
// static defaultProps = {}
|
|
30
|
+
// state = {
|
|
31
|
+
// pageCode: undefined,
|
|
32
|
+
// moduleCode:undefined,
|
|
33
|
+
// moduleType: undefined,
|
|
34
|
+
// moduleName:undefined,
|
|
35
|
+
// currentPage: "workbench",
|
|
36
|
+
// titleClickedKey: undefined,
|
|
37
|
+
// activeKey: "menu-config",
|
|
38
|
+
// pageSearchValue:undefined,
|
|
39
|
+
// menuSearchValue:undefined,
|
|
40
|
+
//
|
|
41
|
+
// }
|
|
42
|
+
//
|
|
43
|
+
// refGtmplTree:any=React.createRef();
|
|
44
|
+
//
|
|
45
|
+
// async componentDidMount() {
|
|
46
|
+
// }
|
|
47
|
+
//
|
|
48
|
+
// onChangeModule=(moduleCode:string,pageCode:string)=>{
|
|
49
|
+
// this.setState({moduleCode,pageCode})
|
|
50
|
+
// }
|
|
51
|
+
//
|
|
52
|
+
//
|
|
53
|
+
// componentDidUpdate(preProps){
|
|
54
|
+
//
|
|
55
|
+
// }
|
|
56
|
+
//
|
|
57
|
+
// getGtmplRatmplSourceId=(moduleType:string)=>{
|
|
58
|
+
// return moduleType=='SQL统计模型'?HydrogenConstant.moduleGstmplRatmpl.sourceId:moduleType=='SQL查询模型'?HydrogenConstant.moduleGqtmplRatmpl.sourceId: HydrogenConstant.moduleGtmplRatmpl.sourceId;
|
|
59
|
+
// }
|
|
60
|
+
//
|
|
61
|
+
// render() {
|
|
62
|
+
// const {} = this.props;
|
|
63
|
+
// const {titleClickedKey,pageSearchValue,menuSearchValue,moduleType,moduleCode,pageCode,moduleName} = this.state;
|
|
64
|
+
// return (<Layout hasSider style={{backgroundColor: '#fff'}}>
|
|
65
|
+
// <DndProvider backend={HTML5Backend}>
|
|
66
|
+
// <Sider width={360} theme={'light'}
|
|
67
|
+
// style={{
|
|
68
|
+
// height: '100vh',
|
|
69
|
+
// position: 'fixed',
|
|
70
|
+
// left: 0,
|
|
71
|
+
// top: 0,
|
|
72
|
+
// bottom: 0,
|
|
73
|
+
// marginLeft:184
|
|
74
|
+
// }}
|
|
75
|
+
// >
|
|
76
|
+
// <div style={{height: 30, margin: 16, background: 'rgba(0, 0, 0, 0.2)'}}/>
|
|
77
|
+
// <TmplTree
|
|
78
|
+
// onChangeSearchValue={(pageSearchValue)=>this.setState({pageSearchValue})}
|
|
79
|
+
// searchValue={pageSearchValue}
|
|
80
|
+
// onEditPage={(moduleCode,moduleName,moduleType,pageCode)=>this.setState({
|
|
81
|
+
// moduleCode,moduleType,pageCode,moduleName
|
|
82
|
+
// })}
|
|
83
|
+
// ref={this.refGtmplTree}
|
|
84
|
+
// draggable={false}></TmplTree>
|
|
85
|
+
// </Sider>
|
|
86
|
+
// <Layout style={{marginLeft:382, backgroundColor: '#fff'}}>
|
|
87
|
+
// <Content style={{overflow: 'initial'}}>
|
|
88
|
+
// {moduleType? <DtmplEditCard title={<>{pageCode?"编辑 页面":"添加 页面"} - {'当前模块:'+moduleName}</>}
|
|
89
|
+
// mainCode={moduleCode}
|
|
90
|
+
// sourceId={this.getGtmplRatmplSourceId(moduleType)}
|
|
91
|
+
// code={pageCode} onOk={(pageCode)=>{this.refGtmplTree?.current?.refresh();
|
|
92
|
+
// this.setState({pageCode})
|
|
93
|
+
// }}
|
|
94
|
+
// />:
|
|
95
|
+
// <Card style={{marginTop:14}} bodyStyle={{padding: '12px 6px 6px 6px'}}>
|
|
96
|
+
// <Space direction="vertical">
|
|
97
|
+
// <Title level={5}>【页面定义】使用说明</Title>
|
|
98
|
+
// <span><Text
|
|
99
|
+
// type="danger">1.模型生成页面:</Text><Text>鼠标悬停在【模型节点】的【名称】上,点击气泡卡片的【同步默认页面】按钮。</Text></span>
|
|
100
|
+
// <span><Text
|
|
101
|
+
// type="danger">2.创建页面:</Text><Text>鼠标悬停在【模型节点】的【名称】上,点击气泡卡片的【+创建页面】按钮,填写并保存右边弹出的抽屉页面。</Text></span>
|
|
102
|
+
// <span><Text
|
|
103
|
+
// type="danger">3.复制页面:</Text><Text>鼠标悬停在【页面节点】的【名称】上,点击气泡卡片的【复制】按钮。</Text></span>
|
|
104
|
+
// </Space>
|
|
105
|
+
// </Card>}
|
|
106
|
+
// </Content>
|
|
107
|
+
// </Layout>
|
|
108
|
+
// </DndProvider>
|
|
109
|
+
// </Layout>)
|
|
110
|
+
// }
|
|
111
|
+
// }
|