aldehyde 0.2.319 → 0.2.321
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.map +1 -1
- package/lib/controls/direct-file-view/index.js +8 -4
- package/lib/controls/direct-file-view/index.js.map +1 -1
- package/lib/controls/entity-select/entity-select.js +1 -1
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.js +5 -3
- package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
- package/lib/controls/relation-existion/index.d.ts.map +1 -1
- package/lib/controls/relation-existion/index.js +1 -1
- package/lib/controls/relation-existion/index.js.map +1 -1
- package/lib/form/criteria-form.d.ts.map +1 -1
- package/lib/form/criteria-form.js +3 -2
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +8 -1
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/select-table.d.ts +16 -2
- package/lib/table/select-table.d.ts.map +1 -1
- package/lib/table/select-table.js +102 -29
- package/lib/table/select-table.js.map +1 -1
- package/lib/tmpl/control-type-supportor.d.ts.map +1 -1
- package/lib/tmpl/control-type-supportor.js +2 -0
- package/lib/tmpl/control-type-supportor.js.map +1 -1
- package/lib/tmpl/interface.d.ts +1 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.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 +5 -4
- package/lib/tree/tree-utils.js.map +1 -1
- package/lib/units/index.d.ts +1 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +32 -13
- package/lib/units/index.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/direct-file-view/index.tsx +8 -2
- package/src/aldehyde/controls/entity-select/entity-select.tsx +1 -1
- package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +15 -11
- package/src/aldehyde/controls/relation-existion/index.tsx +4 -2
- package/src/aldehyde/form/criteria-form.tsx +110 -109
- package/src/aldehyde/table/relation-table.tsx +134 -127
- package/src/aldehyde/table/select-table.tsx +221 -79
- package/src/aldehyde/tmpl/control-type-supportor.tsx +2 -0
- package/src/aldehyde/tmpl/interface.tsx +3 -2
- package/src/aldehyde/tree/tree-utils.tsx +84 -83
- package/src/aldehyde/units/index.tsx +25 -9
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Space, Button, Popconfirm } from "antd";
|
|
3
|
+
import { DeleteOutlined, EditOutlined, AlignCenterOutlined } from "@ant-design/icons";
|
|
4
|
+
import debounce from "lodash/debounce";
|
|
5
|
+
import "./index.css";
|
|
6
|
+
import { DtmplData, QueryKey, SelectConfig, SelectedRow, ControlBaseProps, LtmplConfig } from "../tmpl/interface";
|
|
4
7
|
import TableUnits from "./table-util";
|
|
5
8
|
import SupportInputTypes from '../tmpl/control-type-supportor';
|
|
6
9
|
import HCDataSource from '../tmpl/hc-data-source';
|
|
@@ -9,13 +12,16 @@ import QueryTable from './query-table';
|
|
|
9
12
|
import CriteriaForm from "../form/criteria-form";
|
|
10
13
|
import ViewControl from "../controls/view-control";
|
|
11
14
|
import { LocaleContext } from "../locale/LocaleProvider";
|
|
15
|
+
import DtmplViewDrawer from "../module/dtmpl-view-drawer";
|
|
16
|
+
import DtmplEditPage from "../module/dtmpl-edit-page";
|
|
17
|
+
import DtmplCustomEditModalPage from "../custom-page/dtmpl-custom-edit-modal-page";
|
|
12
18
|
|
|
13
|
-
interface SelectTableProps {
|
|
14
|
-
mainCode?:string,
|
|
19
|
+
interface SelectTableProps extends ControlBaseProps {
|
|
20
|
+
mainCode?: string,
|
|
15
21
|
maxSelectedRows?: number,
|
|
16
|
-
serverKey?:string,
|
|
22
|
+
serverKey?: string,
|
|
17
23
|
sourceId: string,
|
|
18
|
-
showActions?:boolean,
|
|
24
|
+
showActions?: boolean,
|
|
19
25
|
selectedRows: SelectedRow[];
|
|
20
26
|
selectedDatas?: DtmplData[];
|
|
21
27
|
// onCancel: () => void,
|
|
@@ -29,8 +35,12 @@ interface SelectTableStat {
|
|
|
29
35
|
queryKey?: QueryKey;
|
|
30
36
|
loading?: boolean;
|
|
31
37
|
criteriaData?: object;
|
|
32
|
-
pageNo?:number,
|
|
33
|
-
pageSize?:number,
|
|
38
|
+
pageNo?: number,
|
|
39
|
+
pageSize?: number,
|
|
40
|
+
showView?: boolean;
|
|
41
|
+
drawCode?: string;
|
|
42
|
+
showEdit?: boolean;
|
|
43
|
+
ltmplConfig?: LtmplConfig;
|
|
34
44
|
};
|
|
35
45
|
|
|
36
46
|
class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat> {
|
|
@@ -39,8 +49,8 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
39
49
|
|
|
40
50
|
static defaultProps = {
|
|
41
51
|
maxSelectedRows: 1000,
|
|
42
|
-
selectedDatas:[],
|
|
43
|
-
showActions:false
|
|
52
|
+
selectedDatas: [],
|
|
53
|
+
showActions: false
|
|
44
54
|
}
|
|
45
55
|
state = {
|
|
46
56
|
selectConfig: undefined,
|
|
@@ -49,32 +59,34 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
49
59
|
loading: true,
|
|
50
60
|
criteriaData: undefined,
|
|
51
61
|
disableCols: undefined,
|
|
52
|
-
pageNo:1,
|
|
53
|
-
pageSize:undefined,
|
|
62
|
+
pageNo: 1,
|
|
63
|
+
pageSize: undefined,
|
|
64
|
+
showView: false,
|
|
65
|
+
drawCode: undefined,
|
|
66
|
+
showEdit: false,
|
|
67
|
+
ltmplConfig: undefined,
|
|
54
68
|
}
|
|
55
69
|
|
|
56
|
-
loadData = async (selectConfig: SelectConfig, criteriaData: object,npageNo?:number) => {
|
|
57
|
-
this.setState({
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
const {
|
|
61
|
-
const
|
|
62
|
-
const {defaultPageSize} = selectConfig;
|
|
63
|
-
const pno=npageNo?npageNo:pageNo;
|
|
70
|
+
loadData = async (selectConfig: SelectConfig, criteriaData: object, npageNo?: number) => {
|
|
71
|
+
this.setState({ loading: true });
|
|
72
|
+
const { mainCode, serverKey, sourceId } = this.props;
|
|
73
|
+
const { pageNo, pageSize } = this.state;
|
|
74
|
+
const { defaultPageSize } = selectConfig;
|
|
75
|
+
const pno = npageNo ? npageNo : pageNo;
|
|
64
76
|
let pageInfo = {
|
|
65
77
|
pageNo: pno,
|
|
66
|
-
pageSize: pageSize?pageSize:defaultPageSize ? defaultPageSize : 10,
|
|
78
|
+
pageSize: pageSize ? pageSize : defaultPageSize ? defaultPageSize : 10,
|
|
67
79
|
virtualEndPageNo: undefined,
|
|
68
80
|
}
|
|
69
81
|
/** 构建 dataSource **/
|
|
70
|
-
|
|
71
|
-
let queryKey: QueryKey = await HcserviceV3.requestLtmplQueryKey(serverKey,sourceId, {...criteriaData, ...pageInfo,mainCode});
|
|
82
|
+
//构建过滤条件
|
|
83
|
+
let queryKey: QueryKey = await HcserviceV3.requestLtmplQueryKey(serverKey, sourceId, { ...criteriaData, ...pageInfo, mainCode });
|
|
72
84
|
this.setState({
|
|
73
|
-
pageNo:pno,
|
|
85
|
+
pageNo: pno,
|
|
74
86
|
queryKey,
|
|
75
87
|
criteriaData,
|
|
76
88
|
loading: false,
|
|
77
|
-
})
|
|
89
|
+
});
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
async componentDidMount() {
|
|
@@ -83,76 +95,100 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
83
95
|
|
|
84
96
|
loadConfig = async () => {
|
|
85
97
|
const { translate } = this.context;
|
|
86
|
-
const {sourceId,serverKey,showActions} = this.props;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
let selectConfig = await HCDataSource.requestSelectConfig(serverKey,sourceId);
|
|
98
|
+
const { sourceId, serverKey, showActions, fieldConfig } = this.props;
|
|
99
|
+
const actions = fieldConfig.actions;
|
|
100
|
+
this.setState({ loading: true });
|
|
101
|
+
let selectConfig = await HCDataSource.requestSelectConfig(serverKey, sourceId);
|
|
92
102
|
/** 构建column **/
|
|
93
103
|
let columns = [];
|
|
94
|
-
|
|
95
104
|
let s = 0;
|
|
96
105
|
selectConfig.columns.forEach((item) => {
|
|
97
106
|
let column = {};
|
|
98
|
-
|
|
99
|
-
if (item.title == "操作" && showActions) {
|
|
100
|
-
columns.push(column);
|
|
101
|
-
}else{
|
|
102
|
-
columns.push(column);
|
|
103
|
-
}
|
|
104
107
|
column['dataIndex'] = item.id;
|
|
105
108
|
column["title"] = translate("${" + item.title + "}");
|
|
106
109
|
column["width"] = item.colWidth ? item.colWidth : 160;
|
|
107
110
|
column["align"] = item.valueAlign ? item.valueAlign : "left";
|
|
108
|
-
// column['ellipsis']= true;
|
|
109
111
|
s++;
|
|
110
112
|
let itemType = SupportInputTypes.getSupportControlType(item);
|
|
111
113
|
if (s < 12 && item.sortable) {
|
|
112
114
|
TableUnits.sort(column, itemType);
|
|
113
115
|
}
|
|
114
116
|
//特殊列处理
|
|
115
|
-
//序号
|
|
116
117
|
if (item.title === "序号") {
|
|
117
118
|
column["width"] = item.colWidth ? item.colWidth : 50;
|
|
118
119
|
column["align"] = item.valueAlign ? item.valueAlign : "center";
|
|
119
|
-
column['render'] = (text, record, index) => (
|
|
120
|
-
|
|
121
|
-
)
|
|
122
|
-
item['sorter'] = undefined;
|
|
120
|
+
column['render'] = (text, record, index) => (<label>{index + 1}</label>);
|
|
121
|
+
column['sorter'] = undefined;
|
|
123
122
|
} else {
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
if (item.title === "操作" && actions) {
|
|
124
|
+
column['render'] = (text, record) => {
|
|
125
|
+
const actionButtons = [];
|
|
126
|
+
if (actions.includes("detail")) {
|
|
127
|
+
actionButtons.push(
|
|
128
|
+
<Button
|
|
129
|
+
size="small"
|
|
130
|
+
type="primary"
|
|
131
|
+
icon={<AlignCenterOutlined />}
|
|
132
|
+
onClick={() => this.showItem(record.code)}
|
|
133
|
+
/>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
if (actions.includes("edit")) {
|
|
137
|
+
actionButtons.push(<Button
|
|
138
|
+
size="small"
|
|
139
|
+
type="dashed"
|
|
140
|
+
icon={<EditOutlined />}
|
|
141
|
+
onClick={() => this.editItem(record.code)}
|
|
142
|
+
/>);
|
|
143
|
+
}
|
|
144
|
+
if (actions.includes("delete")) {
|
|
145
|
+
actionButtons.push(<Popconfirm
|
|
146
|
+
placement="rightBottom"
|
|
147
|
+
title={translate("${确定要[删除]此数据吗}?")}
|
|
148
|
+
onConfirm={() => this.doDeleteByCode(record.code)}
|
|
149
|
+
okText={translate("${确定}")}
|
|
150
|
+
cancelText={translate("${取消}")}
|
|
151
|
+
okType={"danger"}
|
|
152
|
+
>
|
|
153
|
+
<Button size="small" type="dashed" danger>
|
|
154
|
+
<DeleteOutlined />
|
|
155
|
+
</Button>
|
|
156
|
+
</Popconfirm>);
|
|
157
|
+
}
|
|
158
|
+
return <Space size={[0, 4]} wrap>{actionButtons}</Space>;
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
column['render'] = (text, record) => <ViewControl serverKey={serverKey} holderType={'table'} fieldConfig={item} value={record[item.id]} />;
|
|
126
162
|
}
|
|
127
163
|
}
|
|
164
|
+
const isAction = actions?.some(r => ["detail", "edit", "delete"].includes(r));
|
|
165
|
+
if (item.title !== "操作" || (item.title === "操作" && showActions && isAction)) {
|
|
166
|
+
columns.push(column);
|
|
167
|
+
}
|
|
128
168
|
});
|
|
129
169
|
this.setState({
|
|
130
170
|
columns,
|
|
131
171
|
selectConfig,
|
|
132
172
|
loading: false,
|
|
133
|
-
})
|
|
173
|
+
});
|
|
134
174
|
return selectConfig;
|
|
135
175
|
}
|
|
136
176
|
|
|
137
177
|
async componentDidUpdate(prevProps) {
|
|
138
|
-
const {} = this.
|
|
139
|
-
const {selectConfig, criteriaData, queryKey, loading} = this.state;
|
|
140
|
-
const {exceptCodes: preExceptCodes, open: preOpen} = prevProps;
|
|
178
|
+
const { selectConfig, criteriaData, queryKey, loading } = this.state;
|
|
141
179
|
let config = selectConfig;
|
|
142
|
-
//if (visible) {
|
|
143
180
|
if (!config) {
|
|
144
181
|
config = await this.loadConfig();
|
|
145
182
|
}
|
|
146
183
|
if (!queryKey && !loading) {
|
|
147
184
|
await this.loadData(config, criteriaData);
|
|
148
185
|
}
|
|
149
|
-
//}
|
|
150
186
|
}
|
|
151
187
|
|
|
152
188
|
doSearch = async (params_) => {
|
|
153
|
-
const {selectConfig} = this.state;
|
|
154
|
-
let params = {...params_}
|
|
155
|
-
await this.loadData(selectConfig, params,1);
|
|
189
|
+
const { selectConfig } = this.state;
|
|
190
|
+
let params = { ...params_ }
|
|
191
|
+
await this.loadData(selectConfig, params, 1);
|
|
156
192
|
}
|
|
157
193
|
|
|
158
194
|
// handleOk = () => {
|
|
@@ -176,7 +212,7 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
176
212
|
//console.log('changeRowSelection:', allRowKeys);
|
|
177
213
|
let selectedRows_new: SelectedRow[];
|
|
178
214
|
let selectedDatas_new: DtmplData[] = [];
|
|
179
|
-
const {selectedRows, selectedDatas, onChange, maxSelectedRows} = this.props;
|
|
215
|
+
const { selectedRows, selectedDatas, onChange, maxSelectedRows } = this.props;
|
|
180
216
|
if (allRowKeys) {
|
|
181
217
|
let selectedKeys = [];
|
|
182
218
|
let selectedRows_1: SelectedRow[] = [];
|
|
@@ -225,28 +261,86 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
225
261
|
onChange(selectedRows_new, selectedDatas_new);
|
|
226
262
|
}
|
|
227
263
|
|
|
228
|
-
onChangePage=(pageNo,pageSize)=>{
|
|
264
|
+
onChangePage = (pageNo, pageSize) => {
|
|
265
|
+
this.setState({ pageNo, pageSize });
|
|
266
|
+
}
|
|
229
267
|
|
|
230
|
-
|
|
268
|
+
loadLtmplConfig = async () => {
|
|
269
|
+
const { sourceId, serverKey } = this.props;
|
|
270
|
+
const { ltmplConfig } = this.state;
|
|
271
|
+
let ltmplConfig_ = ltmplConfig;
|
|
272
|
+
if (!ltmplConfig_) {
|
|
273
|
+
ltmplConfig_ = (await HCDataSource.requestLtmplConfig(serverKey, sourceId))?.ltmplConfig;
|
|
274
|
+
}
|
|
275
|
+
this.setState({ ltmplConfig: ltmplConfig_ });
|
|
276
|
+
return ltmplConfig_;
|
|
277
|
+
};
|
|
231
278
|
|
|
232
|
-
|
|
279
|
+
doClose = () => {
|
|
280
|
+
this.setState({
|
|
281
|
+
drawCode: undefined,
|
|
282
|
+
showEdit: false,
|
|
283
|
+
showView: false,
|
|
284
|
+
});
|
|
285
|
+
};
|
|
233
286
|
|
|
287
|
+
drawSubmited = () => {
|
|
288
|
+
this.doClose();
|
|
289
|
+
debounce(() => this.loadData(this.state.selectConfig, {}), 100)();
|
|
290
|
+
};
|
|
234
291
|
|
|
235
|
-
|
|
236
|
-
let
|
|
237
|
-
|
|
292
|
+
showItem = async (code) => {
|
|
293
|
+
let ltmplConfig = await this.loadLtmplConfig();
|
|
294
|
+
this.setState({
|
|
295
|
+
showEdit: false,
|
|
296
|
+
showView: true,
|
|
297
|
+
drawCode: code,
|
|
298
|
+
ltmplConfig,
|
|
299
|
+
});
|
|
300
|
+
};
|
|
238
301
|
|
|
302
|
+
editItem = async (code?) => {
|
|
303
|
+
let ltmplConfig = await this.loadLtmplConfig();
|
|
304
|
+
this.setState({
|
|
305
|
+
showEdit: true,
|
|
306
|
+
showView: false,
|
|
307
|
+
drawCode: code,
|
|
308
|
+
ltmplConfig,
|
|
309
|
+
});
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
doDeleteByCode = async (code: string) => {
|
|
313
|
+
const { sourceId, serverKey, mainCode } = this.props;
|
|
314
|
+
this.setState({ loading: true });
|
|
315
|
+
let result: boolean = await HcserviceV3.deleteByCode(
|
|
316
|
+
serverKey,
|
|
317
|
+
sourceId,
|
|
318
|
+
[code],
|
|
319
|
+
mainCode
|
|
320
|
+
);
|
|
321
|
+
if (result) { //重新加载数据
|
|
322
|
+
this.loadData(this.state.selectConfig, {});
|
|
323
|
+
} else {
|
|
324
|
+
this.setState({ loading: false });
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
render() {
|
|
330
|
+
let { maxSelectedRows, selectedRows, selectedDatas, serverKey, sourceId, mainCode, fieldConfig } = this.props;
|
|
331
|
+
let { queryKey, columns, selectConfig, criteriaData, loading, pageNo, pageSize, showView, drawCode, showEdit, ltmplConfig } = this.state;
|
|
239
332
|
if (!selectConfig) {
|
|
240
333
|
return <>
|
|
241
334
|
</>
|
|
242
335
|
}
|
|
243
|
-
let {
|
|
336
|
+
let { actions } = fieldConfig;
|
|
337
|
+
let { buttons, criterias, jumps, fileExports } = selectConfig;
|
|
244
338
|
let displayCriteriaCard: boolean = false;
|
|
245
339
|
if (buttons.includes('batchDelete') || (buttons.includes('query') && criterias && criterias.length > 0) ||
|
|
246
|
-
(actions && actions.length > 0) || (jumps && jumps.length > 0) || (fileExports && fileExports.length>0)) {
|
|
340
|
+
(actions && actions.length > 0) || (jumps && jumps.length > 0) || (fileExports && fileExports.length > 0)) {
|
|
247
341
|
displayCriteriaCard = true;
|
|
248
342
|
}
|
|
249
|
-
|
|
343
|
+
// debugger
|
|
250
344
|
return (
|
|
251
345
|
// <Card
|
|
252
346
|
// // title={<SelectedRowsCard value={selectedRows} onChange={this.changeRowSelection}></SelectedRowsCard>}
|
|
@@ -254,20 +348,68 @@ class SelectTable extends React.PureComponent<SelectTableProps, SelectTableStat>
|
|
|
254
348
|
// // onOk={this.handleOk}
|
|
255
349
|
// >
|
|
256
350
|
<div className="actTable"
|
|
257
|
-
|
|
351
|
+
// style={{width: 1100,maxWidth: 'calc(100vw - 60px)', maxHeight: 'calc(100vh - 50px)',overflow:'auto'}}
|
|
258
352
|
>
|
|
259
|
-
<
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
353
|
+
<div style={{ position: 'relative' }}>
|
|
354
|
+
<CriteriaForm
|
|
355
|
+
key={"CriteriaForm" + sourceId}
|
|
356
|
+
serverKey={serverKey}
|
|
357
|
+
selectedRows={selectedRows}
|
|
358
|
+
selectedDatas={selectedDatas}
|
|
359
|
+
ltmplConfig={{ ...selectConfig, customButtons: actions?.includes("add") ? [...(selectConfig.customButtons || []), { id: "add", buttonType: 'primary', title: '添加', defDisabled: false, onClick: () => { this.editItem() } }] : selectConfig.customButtons }}
|
|
360
|
+
data={criteriaData}
|
|
361
|
+
doSearch={this.doSearch} loading={loading}
|
|
362
|
+
doCustomButton={() => this.editItem()}
|
|
363
|
+
/>
|
|
364
|
+
</div>
|
|
365
|
+
<QueryTable key={"QueryTable" + sourceId} serverKey={serverKey} maxSelectedRows={maxSelectedRows ? maxSelectedRows : selectConfig.maxSelectedRows}
|
|
366
|
+
selectedRows={selectedRows}
|
|
367
|
+
primaryColumn={selectConfig.primaryColumn}
|
|
368
|
+
columns={columns}
|
|
369
|
+
pageInfo={{
|
|
370
|
+
pageNo,
|
|
371
|
+
pageSize: pageSize ? pageSize : selectConfig.defaultPageSize
|
|
372
|
+
}}
|
|
373
|
+
onChangePage={this.onChangePage}
|
|
374
|
+
queryKey={queryKey}
|
|
375
|
+
onChangeRowSelection={this.changeRowSelection}
|
|
376
|
+
sortColumnData={[]}
|
|
377
|
+
doSearch={this.doSearch}
|
|
378
|
+
/>
|
|
379
|
+
{showView && drawCode ? (
|
|
380
|
+
<DtmplViewDrawer
|
|
381
|
+
serverKey={serverKey}
|
|
382
|
+
placement={"left"}
|
|
383
|
+
onClose={this.doClose}
|
|
384
|
+
open={showView}
|
|
385
|
+
sourceId={sourceId}
|
|
386
|
+
code={drawCode}
|
|
387
|
+
/>
|
|
388
|
+
) : null}
|
|
389
|
+
{showEdit && ltmplConfig ? (
|
|
390
|
+
ltmplConfig.customEditPagePath ? (
|
|
391
|
+
<DtmplCustomEditModalPage
|
|
392
|
+
open={showEdit}
|
|
393
|
+
onOk={this.drawSubmited}
|
|
394
|
+
customPath={ltmplConfig.customEditPagePath}
|
|
395
|
+
sourceId={sourceId}
|
|
396
|
+
mainCode={mainCode}
|
|
397
|
+
code={drawCode}
|
|
398
|
+
/>
|
|
399
|
+
) : (
|
|
400
|
+
<DtmplEditPage
|
|
401
|
+
defaultDtmplData={fieldConfig.defaultDtmplData}
|
|
402
|
+
serverKey={serverKey}
|
|
403
|
+
pageType={"modal"}
|
|
404
|
+
open={showEdit}
|
|
405
|
+
onCancel={this.doClose}
|
|
406
|
+
mainCode={mainCode}
|
|
407
|
+
sourceId={sourceId}
|
|
408
|
+
code={drawCode}
|
|
409
|
+
onOk={this.drawSubmited}
|
|
410
|
+
/>
|
|
411
|
+
)
|
|
412
|
+
) : null}
|
|
271
413
|
</div>
|
|
272
414
|
// </Card>
|
|
273
415
|
);
|
|
@@ -74,6 +74,8 @@ SupportInputTypes.add('table-entity-select');
|
|
|
74
74
|
SupportInputTypes.add('modal-entity-select');
|
|
75
75
|
SupportInputTypes.add('color');
|
|
76
76
|
SupportInputTypes.add('url');
|
|
77
|
+
SupportInputTypes.add('pc-icon-selector');
|
|
78
|
+
SupportInputTypes.add('app-icon-selector');
|
|
77
79
|
SupportInputTypes.add('hidden');
|
|
78
80
|
SupportInputTypes.add('lab-tree-select');
|
|
79
81
|
SupportInputTypes.add('tree-entity-select-value');
|
|
@@ -149,6 +149,7 @@ export interface CustomButton extends ButtonConfig {
|
|
|
149
149
|
windowHeight: string;
|
|
150
150
|
windowWidth: string;
|
|
151
151
|
preposes: FieldConfig[];
|
|
152
|
+
defDisabled?: boolean;
|
|
152
153
|
}
|
|
153
154
|
|
|
154
155
|
export interface FileExportButton extends ButtonConfig {
|
|
@@ -329,7 +330,7 @@ export interface FieldGroupConfig extends OrderableTmplBase {
|
|
|
329
330
|
viewModel?: "table" | "verticalList";
|
|
330
331
|
addOrEditType?: "singleCol" | "doubleCol" | "tableRow";
|
|
331
332
|
batchAddFileField?: FieldConfig;
|
|
332
|
-
addRowPosition?:"begin"|"end";
|
|
333
|
+
addRowPosition?: "begin" | "end";
|
|
333
334
|
}
|
|
334
335
|
|
|
335
336
|
export type SaveJumpType = "list" | "add" | "edit";
|
|
@@ -411,7 +412,7 @@ export interface FieldConfig extends FieldBase {
|
|
|
411
412
|
sortable?: boolean;
|
|
412
413
|
itemBreakLine?: boolean;
|
|
413
414
|
configChanged?: boolean;
|
|
414
|
-
rowEditType?:"editable"|"readonly"|"editonly"|"addonly";
|
|
415
|
+
rowEditType?: "editable" | "readonly" | "editonly" | "addonly";
|
|
415
416
|
}
|
|
416
417
|
|
|
417
418
|
export interface ActionRenderProps {
|