|
@@ -7,7 +7,6 @@ import { |
|
@@ -7,7 +7,6 @@ import { |
7
|
Col,
|
7
|
Col,
|
8
|
DatePicker,
|
8
|
DatePicker,
|
9
|
Divider,
|
9
|
Divider,
|
10
|
- Form,
|
|
|
11
|
Input,
|
10
|
Input,
|
12
|
InputNumber,
|
11
|
InputNumber,
|
13
|
Modal,
|
12
|
Modal,
|
|
@@ -15,6 +14,7 @@ import { |
|
@@ -15,6 +14,7 @@ import { |
15
|
Select,
|
14
|
Select,
|
16
|
Space,
|
15
|
Space,
|
17
|
Table,
|
16
|
Table,
|
|
|
17
|
+ Tooltip,
|
18
|
message,
|
18
|
message,
|
19
|
} from 'antd';
|
19
|
} from 'antd';
|
20
|
import React, { useCallback, useEffect, useState } from 'react';
|
20
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
@@ -148,30 +148,24 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -148,30 +148,24 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
148
|
),
|
148
|
),
|
149
|
dataIndex: 'code',
|
149
|
dataIndex: 'code',
|
150
|
className: 'code-header',
|
150
|
className: 'code-header',
|
151
|
- width: '200px',
|
151
|
+ width: '150px',
|
152
|
key: 'code',
|
152
|
key: 'code',
|
153
|
render: (text, record) => {
|
153
|
render: (text, record) => {
|
154
|
const strTitle = (text as string) || '';
|
154
|
const strTitle = (text as string) || '';
|
155
|
const index = strTitle.indexOf(searchValue);
|
155
|
const index = strTitle.indexOf(searchValue);
|
156
|
return (
|
156
|
return (
|
157
|
- <Form.Item
|
|
|
158
|
- name={'code' + record.id}
|
|
|
159
|
- style={{ margin: 0 }}
|
|
|
160
|
- // initialValue={record.code}
|
|
|
161
|
- >
|
|
|
162
|
- <Input
|
|
|
163
|
- style={{ color: index > -1 && searchValue ? '#1890ff' : '' }}
|
|
|
164
|
- draggable={true}
|
|
|
165
|
- onDragStart={(event) => {
|
|
|
166
|
- event.stopPropagation();
|
|
|
167
|
- event.preventDefault();
|
|
|
168
|
- }}
|
|
|
169
|
- defaultValue={record.code}
|
|
|
170
|
- bordered={false}
|
|
|
171
|
- disabled={record.disabled || typeDis}
|
|
|
172
|
- onBlur={(e) => handleChange(e, record, 'code')}
|
|
|
173
|
- />
|
|
|
174
|
- </Form.Item>
|
157
|
+ <Input
|
|
|
158
|
+ style={{ color: index > -1 && searchValue ? '#1890ff' : '' }}
|
|
|
159
|
+ draggable={true}
|
|
|
160
|
+ onDragStart={(event) => {
|
|
|
161
|
+ event.stopPropagation();
|
|
|
162
|
+ event.preventDefault();
|
|
|
163
|
+ }}
|
|
|
164
|
+ defaultValue={record.code}
|
|
|
165
|
+ bordered={false}
|
|
|
166
|
+ disabled={record.disabled || typeDis}
|
|
|
167
|
+ onBlur={(e) => handleChange(e, record, 'code')}
|
|
|
168
|
+ />
|
175
|
);
|
169
|
);
|
176
|
},
|
170
|
},
|
177
|
},
|
171
|
},
|
|
@@ -190,24 +184,18 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -190,24 +184,18 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
190
|
const strTitle = (record.title as string) || '';
|
184
|
const strTitle = (record.title as string) || '';
|
191
|
const index = strTitle.indexOf(searchValue);
|
185
|
const index = strTitle.indexOf(searchValue);
|
192
|
return (
|
186
|
return (
|
193
|
- <Form.Item
|
|
|
194
|
- name={'title' + record.id}
|
|
|
195
|
- style={{ margin: 0 }}
|
|
|
196
|
- // initialValue={record.title}
|
|
|
197
|
- >
|
|
|
198
|
- <Input
|
|
|
199
|
- style={{ color: index > -1 && searchValue ? '#1890ff' : '' }}
|
|
|
200
|
- draggable={true}
|
|
|
201
|
- onDragStart={(event) => {
|
|
|
202
|
- event.stopPropagation();
|
|
|
203
|
- event.preventDefault();
|
|
|
204
|
- }}
|
|
|
205
|
- defaultValue={record.title}
|
|
|
206
|
- bordered={false}
|
|
|
207
|
- disabled={record.disabled || typeDis}
|
|
|
208
|
- onBlur={(e) => handleChange(e, record, 'title')}
|
|
|
209
|
- />
|
|
|
210
|
- </Form.Item>
|
187
|
+ <Input
|
|
|
188
|
+ style={{ color: index > -1 && searchValue ? '#1890ff' : '' }}
|
|
|
189
|
+ draggable={true}
|
|
|
190
|
+ onDragStart={(event) => {
|
|
|
191
|
+ event.stopPropagation();
|
|
|
192
|
+ event.preventDefault();
|
|
|
193
|
+ }}
|
|
|
194
|
+ defaultValue={record.title}
|
|
|
195
|
+ bordered={false}
|
|
|
196
|
+ disabled={record.disabled || typeDis}
|
|
|
197
|
+ onBlur={(e) => handleChange(e, record, 'title')}
|
|
|
198
|
+ />
|
211
|
);
|
199
|
);
|
212
|
},
|
200
|
},
|
213
|
},
|
201
|
},
|
|
@@ -220,29 +208,25 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -220,29 +208,25 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
220
|
),
|
208
|
),
|
221
|
dataIndex: 'type',
|
209
|
dataIndex: 'type',
|
222
|
className: 'ps-table-cell',
|
210
|
className: 'ps-table-cell',
|
223
|
- width: '102px',
|
211
|
+ width: '95px',
|
224
|
key: 'type',
|
212
|
key: 'type',
|
225
|
render: (text, record) => (
|
213
|
render: (text, record) => (
|
226
|
- <Form.Item
|
|
|
227
|
- style={{ margin: 0 }}
|
|
|
228
|
- name={'type' + record.id}
|
|
|
229
|
- // initialValue={record.type}
|
214
|
+ <Select
|
|
|
215
|
+ bordered={false}
|
|
|
216
|
+ disabled={record.disabled || typeDis}
|
|
|
217
|
+ defaultValue={record.type}
|
|
|
218
|
+ popupMatchSelectWidth
|
|
|
219
|
+ // dropdownStyle={{width: '1000px'}}
|
|
|
220
|
+ onSelect={(e) => handleChange(e, record, 'type')}
|
230
|
>
|
221
|
>
|
231
|
- <Select
|
|
|
232
|
- bordered={false}
|
|
|
233
|
- disabled={record.disabled || typeDis}
|
|
|
234
|
- defaultValue={record.type}
|
|
|
235
|
- onSelect={(e) => handleChange(e, record, 'type')}
|
|
|
236
|
- >
|
|
|
237
|
- {valueOptions.map((item) => {
|
|
|
238
|
- return (
|
|
|
239
|
- <Select.Option key={item.key} value={item.key}>
|
|
|
240
|
- {item.title}
|
|
|
241
|
- </Select.Option>
|
|
|
242
|
- );
|
|
|
243
|
- })}
|
|
|
244
|
- </Select>
|
|
|
245
|
- </Form.Item>
|
222
|
+ {valueOptions.map((item) => {
|
|
|
223
|
+ return (
|
|
|
224
|
+ <Select.Option key={item.key} value={item.key}>
|
|
|
225
|
+ {item.title}
|
|
|
226
|
+ </Select.Option>
|
|
|
227
|
+ );
|
|
|
228
|
+ })}
|
|
|
229
|
+ </Select>
|
246
|
),
|
230
|
),
|
247
|
},
|
231
|
},
|
248
|
{
|
232
|
{
|
|
@@ -253,7 +237,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -253,7 +237,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
253
|
),
|
237
|
),
|
254
|
dataIndex: 'valueMapping',
|
238
|
dataIndex: 'valueMapping',
|
255
|
className: 'ps-table-cell',
|
239
|
className: 'ps-table-cell',
|
256
|
- width: '116px',
|
240
|
+ width: '200px',
|
257
|
key: 'valueMapping',
|
241
|
key: 'valueMapping',
|
258
|
render: (text, record) => (
|
242
|
render: (text, record) => (
|
259
|
<div className="editable-cell-default ">
|
243
|
<div className="editable-cell-default ">
|
|
@@ -319,24 +303,18 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -319,24 +303,18 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
319
|
key: 'description',
|
303
|
key: 'description',
|
320
|
width: '120px',
|
304
|
width: '120px',
|
321
|
render: (text, record) => (
|
305
|
render: (text, record) => (
|
322
|
- <Form.Item
|
|
|
323
|
- name={'description' + record.id}
|
|
|
324
|
- style={{ margin: 0 }}
|
|
|
325
|
- // initialValue={text}
|
|
|
326
|
- >
|
|
|
327
|
- <Input
|
|
|
328
|
- draggable={true}
|
|
|
329
|
- onDragStart={(event) => {
|
|
|
330
|
- event.stopPropagation();
|
|
|
331
|
- event.preventDefault();
|
|
|
332
|
- }}
|
|
|
333
|
- key={inputKey}
|
|
|
334
|
- defaultValue={text}
|
|
|
335
|
- bordered={false}
|
|
|
336
|
- disabled={record.disabled || typeDis}
|
|
|
337
|
- onBlur={(e) => handleChange(e, record, 'description')}
|
|
|
338
|
- />
|
|
|
339
|
- </Form.Item>
|
306
|
+ <Input
|
|
|
307
|
+ draggable={true}
|
|
|
308
|
+ onDragStart={(event) => {
|
|
|
309
|
+ event.stopPropagation();
|
|
|
310
|
+ event.preventDefault();
|
|
|
311
|
+ }}
|
|
|
312
|
+ key={inputKey}
|
|
|
313
|
+ defaultValue={text}
|
|
|
314
|
+ bordered={false}
|
|
|
315
|
+ disabled={record.disabled || typeDis}
|
|
|
316
|
+ onBlur={(e) => handleChange(e, record, 'description')}
|
|
|
317
|
+ />
|
340
|
),
|
318
|
),
|
341
|
},
|
319
|
},
|
342
|
{
|
320
|
{
|
|
@@ -357,11 +335,15 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -357,11 +335,15 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
357
|
<Button
|
335
|
<Button
|
358
|
size={'small'}
|
336
|
size={'small'}
|
359
|
type="link"
|
337
|
type="link"
|
360
|
- disabled={record.disabled || typeDis}
|
338
|
+ disabled={typeDis}
|
361
|
icon={
|
339
|
icon={
|
362
|
- <QxBaseIcon style={{ fontSize: 16 }} type={'qx-icon-plus'} />
|
340
|
+ <QxBaseIcon
|
|
|
341
|
+ className={'title-btn'}
|
|
|
342
|
+ style={{ fontSize: 16 }}
|
|
|
343
|
+ type={'qx-icon-plus'}
|
|
|
344
|
+ />
|
363
|
}
|
345
|
}
|
364
|
- onClick={() => handleAdd(record.pid)}
|
346
|
+ onClick={() => handleAdd(record)}
|
365
|
/>
|
347
|
/>
|
366
|
)}
|
348
|
)}
|
367
|
{(record.type === 'OBJECT' || record.type === 'ARRAY') &&
|
349
|
{(record.type === 'OBJECT' || record.type === 'ARRAY') &&
|
|
@@ -371,25 +353,32 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -371,25 +353,32 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
371
|
type="link"
|
353
|
type="link"
|
372
|
disabled={record.disabled || typeDis}
|
354
|
disabled={record.disabled || typeDis}
|
373
|
icon={
|
355
|
icon={
|
374
|
- <Icon style={{ fontSize: 16 }} component={SubNodeIcon} />
|
356
|
+ <Icon
|
|
|
357
|
+ style={{ fontSize: 16 }}
|
|
|
358
|
+ className={'title-btn'}
|
|
|
359
|
+ component={SubNodeIcon}
|
|
|
360
|
+ />
|
375
|
}
|
361
|
}
|
376
|
onClick={() => handleAddTree(record.id)}
|
362
|
onClick={() => handleAddTree(record.id)}
|
377
|
/>
|
363
|
/>
|
378
|
)}
|
364
|
)}
|
379
|
- <Button
|
|
|
380
|
- size={'small'}
|
|
|
381
|
- type="link"
|
|
|
382
|
- className="btn-high-del"
|
|
|
383
|
- disabled={record.disabled || typeDis}
|
|
|
384
|
- icon={
|
|
|
385
|
- <QxBaseIcon
|
|
|
386
|
- style={{ fontSize: 16 }}
|
|
|
387
|
- className={'title-btn-del-btn'}
|
|
|
388
|
- type={'qx-icon-delete'}
|
|
|
389
|
- />
|
|
|
390
|
- }
|
|
|
391
|
- onClick={() => handleDelete(record)}
|
|
|
392
|
- />
|
365
|
+
|
|
|
366
|
+ {!record.disabled && (
|
|
|
367
|
+ <Button
|
|
|
368
|
+ size={'small'}
|
|
|
369
|
+ type="link"
|
|
|
370
|
+ className="btn-high-del"
|
|
|
371
|
+ disabled={record.disabled || typeDis}
|
|
|
372
|
+ icon={
|
|
|
373
|
+ <QxBaseIcon
|
|
|
374
|
+ style={{ fontSize: 16 }}
|
|
|
375
|
+ className={'title-btn title-btn-del-btn'}
|
|
|
376
|
+ type={'qx-icon-delete'}
|
|
|
377
|
+ />
|
|
|
378
|
+ }
|
|
|
379
|
+ onClick={() => handleDelete(record)}
|
|
|
380
|
+ />
|
|
|
381
|
+ )}
|
393
|
</Space>
|
382
|
</Space>
|
394
|
);
|
383
|
);
|
395
|
},
|
384
|
},
|
|
@@ -404,7 +393,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -404,7 +393,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
404
|
),
|
393
|
),
|
405
|
dataIndex: 'qxProps',
|
394
|
dataIndex: 'qxProps',
|
406
|
className: 'ps-table-cell',
|
395
|
className: 'ps-table-cell',
|
407
|
- width: '350px',
|
396
|
+ width: '360px',
|
408
|
key: 'qxProps',
|
397
|
key: 'qxProps',
|
409
|
render: (qxProps: any, record: any) => {
|
398
|
render: (qxProps: any, record: any) => {
|
410
|
switch (record.type) {
|
399
|
switch (record.type) {
|
|
@@ -592,17 +581,15 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -592,17 +581,15 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
592
|
key: 'required',
|
581
|
key: 'required',
|
593
|
width: '86px',
|
582
|
width: '86px',
|
594
|
render: (text, record) => (
|
583
|
render: (text, record) => (
|
595
|
- <Form.Item name={'required' + record.id} style={{ margin: 0 }}>
|
|
|
596
|
- <Select
|
|
|
597
|
- defaultValue={text || false}
|
|
|
598
|
- bordered={false}
|
|
|
599
|
- disabled={record.disabled || typeDis}
|
|
|
600
|
- onSelect={(e) => props.handleChange(e, record, 'required')}
|
|
|
601
|
- >
|
|
|
602
|
- <Select.Option value={true}>是</Select.Option>
|
|
|
603
|
- <Select.Option value={false}>否</Select.Option>
|
|
|
604
|
- </Select>
|
|
|
605
|
- </Form.Item>
|
584
|
+ <Select
|
|
|
585
|
+ defaultValue={text || false}
|
|
|
586
|
+ bordered={false}
|
|
|
587
|
+ disabled={record.disabled || typeDis}
|
|
|
588
|
+ onSelect={(e) => props.handleChange(e, record, 'required')}
|
|
|
589
|
+ >
|
|
|
590
|
+ <Select.Option value={true}>是</Select.Option>
|
|
|
591
|
+ <Select.Option value={false}>否</Select.Option>
|
|
|
592
|
+ </Select>
|
606
|
),
|
593
|
),
|
607
|
};
|
594
|
};
|
608
|
|
595
|
|
|
@@ -789,17 +776,37 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -789,17 +776,37 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
789
|
setMidData(_data);
|
776
|
setMidData(_data);
|
790
|
};
|
777
|
};
|
791
|
|
778
|
|
|
|
779
|
+ const RenderTitle = (
|
|
|
780
|
+ <div>
|
|
|
781
|
+ 高级参数设计器
|
|
|
782
|
+ <Tooltip placement="top" title="帮助">
|
|
|
783
|
+ <span
|
|
|
784
|
+ className={'render-right__help'}
|
|
|
785
|
+ // onClick={() => {
|
|
|
786
|
+ // const _url = GoToHelpUrl(selectedNode?.type || '');
|
|
|
787
|
+ // _url && handleWindowOpen(_url);
|
|
|
788
|
+ // }}
|
|
|
789
|
+ >
|
|
|
790
|
+ <QxBaseIcon
|
|
|
791
|
+ className={'qx-data-flow__icon'}
|
|
|
792
|
+ type={'qx-icon-help-circle-fill'}
|
|
|
793
|
+ />
|
|
|
794
|
+ </span>
|
|
|
795
|
+ </Tooltip>
|
|
|
796
|
+ </div>
|
|
|
797
|
+ );
|
|
|
798
|
+
|
792
|
return (
|
799
|
return (
|
793
|
<>
|
800
|
<>
|
794
|
<Modal
|
801
|
<Modal
|
795
|
- title="高级参数设计器"
|
802
|
+ title={RenderTitle}
|
796
|
open={visible}
|
803
|
open={visible}
|
797
|
destroyOnClose
|
804
|
destroyOnClose
|
798
|
footer={null}
|
805
|
footer={null}
|
799
|
// onOk={handleCancel}
|
806
|
// onOk={handleCancel}
|
800
|
onCancel={onCancel}
|
807
|
onCancel={onCancel}
|
801
|
width={1200}
|
808
|
width={1200}
|
802
|
- wrapClassName={'qx-common__modal'}
|
809
|
+ wrapClassName={'qx-common__modal qx-parameter-setting__modal'}
|
803
|
closeIcon={
|
810
|
closeIcon={
|
804
|
<QxBaseIcon
|
811
|
<QxBaseIcon
|
805
|
className={'qx-common__modal--close'}
|
812
|
className={'qx-common__modal--close'}
|
|
@@ -914,7 +921,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
|
@@ -914,7 +921,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { |
914
|
}}
|
921
|
}}
|
915
|
className="parameter-setting-table"
|
922
|
className="parameter-setting-table"
|
916
|
onRow={onRow}
|
923
|
onRow={onRow}
|
917
|
- scroll={{ x: 1000 }}
|
924
|
+ scroll={{ y: 350 }}
|
918
|
bordered
|
925
|
bordered
|
919
|
pagination={false}
|
926
|
pagination={false}
|
920
|
size={'small'}
|
927
|
size={'small'}
|