Commit a9a5978f1aea52ce2a1a8eb7f1272f5fb3ebd438

Authored by qiang.tian
2 parents 589e3d4a 53b4e4ef

Merge branch 'feature/dataflow' of http://gitlab.qgutech.com/tianqiang/qx-common…

… into feature/dataflow
1 { 1 {
2 "name": "@qx/common", 2 "name": "@qx/common",
3 - "version": "3.0.0-alpha.31", 3 + "version": "3.0.0-alpha.32",
4 "description": "A react library developed with dumi", 4 "description": "A react library developed with dumi",
5 "license": "MIT", 5 "license": "MIT",
6 "module": "dist/index.js", 6 "module": "dist/index.js",
@@ -70,6 +70,7 @@ const FormSelectMain: React.FC<FormSelectProps>= (props)=> { @@ -70,6 +70,7 @@ const FormSelectMain: React.FC<FormSelectProps>= (props)=> {
70 appId: appId, 70 appId: appId,
71 code: it.code, 71 code: it.code,
72 name: it.name, 72 name: it.name,
  73 + appName: it.extract?.appName
73 }; 74 };
74 } 75 }
75 }); 76 });
@@ -85,6 +86,7 @@ const FormSelectMain: React.FC<FormSelectProps>= (props)=> { @@ -85,6 +86,7 @@ const FormSelectMain: React.FC<FormSelectProps>= (props)=> {
85 code: res.code, 86 code: res.code,
86 appId: res?.extract?.appId, 87 appId: res?.extract?.appId,
87 name: res.name, 88 name: res.name,
  89 + appName: res.extract?.appName
88 }); 90 });
89 }); 91 });
90 } 92 }
@@ -119,6 +121,8 @@ const FormSelectMain: React.FC<FormSelectProps>= (props)=> { @@ -119,6 +121,8 @@ const FormSelectMain: React.FC<FormSelectProps>= (props)=> {
119 }} 121 }}
120 disabled={disabled} 122 disabled={disabled}
121 popupOnBody={props?.popupOnBody} 123 popupOnBody={props?.popupOnBody}
  124 + from={'FORM'}
  125 + appName={item.appName}
122 /> 126 />
123 127
124 {state.modalVisible ? ( 128 {state.modalVisible ? (
1 import { DownOutlined, UpOutlined } from '@ant-design/icons'; 1 import { DownOutlined, UpOutlined } from '@ant-design/icons';
2 import { useSetState } from 'ahooks'; 2 import { useSetState } from 'ahooks';
3 -import { Dropdown, Input } from 'antd'; 3 +import {Button, Dropdown, Input } from 'antd';
4 import type { InputProps } from 'antd/lib/input'; 4 import type { InputProps } from 'antd/lib/input';
5 import cls from 'classnames'; 5 import cls from 'classnames';
6 import React, { useImperativeHandle } from 'react'; 6 import React, { useImperativeHandle } from 'react';
@@ -11,6 +11,7 @@ import type { @@ -11,6 +11,7 @@ import type {
11 import DropdownContent from './dropdown-content'; 11 import DropdownContent from './dropdown-content';
12 12
13 import './styles.less'; 13 import './styles.less';
  14 +import {QxBaseIcon} from "@qx/common";
14 15
15 const prefix = 'qx-input-select'; 16 const prefix = 'qx-input-select';
16 17
@@ -25,6 +26,7 @@ export const QxInputSelect = React.forwardRef<any, InputSelectProps>( @@ -25,6 +26,7 @@ export const QxInputSelect = React.forwardRef<any, InputSelectProps>(
25 dropdownProps, 26 dropdownProps,
26 onChange, 27 onChange,
27 disabled, 28 disabled,
  29 + from,
28 ...rest 30 ...rest
29 } = props; 31 } = props;
30 32
@@ -81,16 +83,41 @@ export const QxInputSelect = React.forwardRef<any, InputSelectProps>( @@ -81,16 +83,41 @@ export const QxInputSelect = React.forwardRef<any, InputSelectProps>(
81 } 83 }
82 }} 84 }}
83 onOpenChange={onVisibleChange} 85 onOpenChange={onVisibleChange}
84 - disabled={disabled} 86 + disabled={true}
85 > 87 >
86 - <Input  
87 - placeholder="请选择"  
88 - readOnly  
89 - suffix={inputSuffix}  
90 - onClick={() => setState({ visible: !state.visible })}  
91 - {...rest}  
92 - className={`${prefix}__input`}  
93 - /> 88 + <>
  89 + {
  90 + from === 'FORM'?
  91 + <Button
  92 + disabled={disabled}
  93 + className={`qx-input-select__button`}
  94 + tabIndex={1}
  95 + onClick={() => setState({ visible: !state.visible })}
  96 + >
  97 + {props?.prefix}
  98 + { !props?.value ?
  99 + <span className={'qx-input-select__button-main qx-input-select__button-placeholder'}>{props?.placeholder}</span>:
  100 + <span className={'qx-input-select__button-main'}>
  101 + <span>{props?.appName}</span>
  102 + <QxBaseIcon
  103 + type="qx-icon-left"
  104 + className={'qx-input-select__button-svg'}
  105 + />
  106 + <span>{props?.value}</span>
  107 + </span>
  108 + }
  109 + {inputSuffix}
  110 + </Button>:
  111 + <Input
  112 + placeholder="请选择"
  113 + readOnly
  114 + suffix={inputSuffix}
  115 + onClick={() => setState({ visible: !state.visible })}
  116 + {...rest}
  117 + className={`${prefix}__input`}
  118 + />
  119 + }
  120 + </>
94 </Dropdown> 121 </Dropdown>
95 </div> 122 </div>
96 ); 123 );
@@ -103,6 +130,8 @@ export interface InputSelectProps extends Omit<InputProps, 'onChange'> { @@ -103,6 +130,8 @@ export interface InputSelectProps extends Omit<InputProps, 'onChange'> {
103 dropdownProps?: DropdownContentProps; 130 dropdownProps?: DropdownContentProps;
104 disabled?: boolean; 131 disabled?: boolean;
105 popupOnBody?: boolean; 132 popupOnBody?: boolean;
  133 + from?: string;
  134 + appName?: string;
106 } 135 }
107 export interface InputSelectState { 136 export interface InputSelectState {
108 visible: boolean; 137 visible: boolean;
@@ -69,3 +69,57 @@ @@ -69,3 +69,57 @@
69 color: @N6; 69 color: @N6;
70 } 70 }
71 } 71 }
  72 +
  73 +.qx-input-select__button {
  74 + height: 32px;
  75 + border-radius: 4px;
  76 + padding: 4px 11px;
  77 + display: flex;
  78 + align-items: center;
  79 + font-size: 14px;
  80 + cursor: text;
  81 + transition: all .3s;
  82 + width: 100%;
  83 +
  84 + .qx-form-select__input-prefix {
  85 + color: @B8;
  86 + }
  87 +
  88 + .qx-input-select__button-main {
  89 + height: 22px;
  90 + line-height: 22px;
  91 + margin: 0 4px;
  92 + flex: 1;
  93 + color: @N9;
  94 + display: flex;
  95 + align-items: center;
  96 + overflow: hidden;
  97 + text-overflow: ellipsis;
  98 + white-space: nowrap;
  99 +
  100 + .qx-input-select__button-svg {
  101 + color: @N7;
  102 + transform: rotate(180deg);
  103 + font-size: 16px;
  104 + margin: 0 4px;
  105 + }
  106 +
  107 + }
  108 + .qx-input-select__button-placeholder {
  109 + color: @N6;
  110 + }
  111 + .qx-input-select__input-suffix {
  112 + color: @N6;
  113 + }
  114 + .qx-form-select__input-prefix {
  115 + color: @B8;
  116 + }
  117 +
  118 + .ant-dropdown-menu .ant-dropdown-menu-title-content {
  119 + flex: unset;
  120 + }
  121 + .ant-btn-default:not(:disabled):not(.ant-btn-disabled):hover {
  122 + color: unset;
  123 + }
  124 +
  125 +}
@@ -85,6 +85,7 @@ interface ParameterSettingProps { @@ -85,6 +85,7 @@ interface ParameterSettingProps {
85 handleDelete: (val: any) => void; 85 handleDelete: (val: any) => void;
86 request?: any; 86 request?: any;
87 nodeType?: string | 'START' | 'END'; 87 nodeType?: string | 'START' | 'END';
  88 + type?: string;
88 appId?: string; // 当前应用ID 89 appId?: string; // 当前应用ID
89 } 90 }
90 91
@@ -105,6 +106,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -105,6 +106,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
105 handleChangeField, 106 handleChangeField,
106 inputKey, 107 inputKey,
107 nodeType, 108 nodeType,
  109 + type,
108 } = props; 110 } = props;
109 const [searchValue, setSearchValue] = useState(''); 111 const [searchValue, setSearchValue] = useState('');
110 112
@@ -156,7 +158,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -156,7 +158,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
156 } 158 }
157 return true; 159 return true;
158 }; 160 };
159 - 161 + const typeDis = !!type;
160 const columns = [ 162 const columns = [
161 { 163 {
162 title: ( 164 title: (
@@ -186,7 +188,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -186,7 +188,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
186 }} 188 }}
187 defaultValue={record.code} 189 defaultValue={record.code}
188 bordered={false} 190 bordered={false}
189 - disabled={record.disabled} onBlur={(e) => handleChange(e, record, 'code')} /> 191 + disabled={record.disabled || typeDis} onBlur={(e) => handleChange(e, record, 'code')} />
190 </Form.Item > 192 </Form.Item >
191 ) 193 )
192 }, 194 },
@@ -219,7 +221,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -219,7 +221,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
219 }} 221 }}
220 defaultValue={record.title} 222 defaultValue={record.title}
221 bordered={false} 223 bordered={false}
222 - disabled={record.disabled} onBlur={(e) => handleChange(e, record, 'title')} /> 224 + disabled={record.disabled || typeDis} onBlur={(e) => handleChange(e, record, 'title')} />
223 </Form.Item> 225 </Form.Item>
224 ) 226 )
225 }, 227 },
@@ -242,7 +244,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -242,7 +244,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
242 > 244 >
243 <Select 245 <Select
244 bordered={false} 246 bordered={false}
245 - disabled={record.disabled} 247 + disabled={record.disabled || typeDis}
246 defaultValue={record.type} 248 defaultValue={record.type}
247 onSelect={(e) => handleChange(e, record, 'type')} > 249 onSelect={(e) => handleChange(e, record, 'type')} >
248 { 250 {
@@ -261,7 +263,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -261,7 +263,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
261 render: (text, record) => 263 render: (text, record) =>
262 <div className="editable-cell "> 264 <div className="editable-cell ">
263 <QxFieldSetter 265 <QxFieldSetter
264 - disabled={record.disabled} 266 + disabled={record.disabled || typeDis}
265 value={record.valuesObj || []} 267 value={record.valuesObj || []}
266 params={{ appCode: 'appCode', useId: true }} 268 params={{ appCode: 'appCode', useId: true }}
267 valueOptions={getValueOptions(record)} 269 valueOptions={getValueOptions(record)}
@@ -299,7 +301,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -299,7 +301,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
299 key={inputKey} 301 key={inputKey}
300 defaultValue={text} 302 defaultValue={text}
301 bordered={false} 303 bordered={false}
302 - disabled={record.disabled} onBlur={(e) => handleChange(e, record, 'description')} /> 304 + disabled={record.disabled || typeDis} onBlur={(e) => handleChange(e, record, 'description')} />
303 </Form.Item> 305 </Form.Item>
304 ), 306 ),
305 }, 307 },
@@ -316,7 +318,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -316,7 +318,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
316 <Button 318 <Button
317 size={'small'} 319 size={'small'}
318 type="link" 320 type="link"
319 - disabled={record.disabled} 321 + disabled={record.disabled || typeDis}
320 icon={<QxBaseIcon style={{ fontSize: 16 }} type={'qx-icon-plus'} />} 322 icon={<QxBaseIcon style={{ fontSize: 16 }} type={'qx-icon-plus'} />}
321 onClick={() => handleAdd(record.pid)} 323 onClick={() => handleAdd(record.pid)}
322 /> 324 />
@@ -326,7 +328,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -326,7 +328,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
326 <Button 328 <Button
327 size={'small'} 329 size={'small'}
328 type="link" 330 type="link"
329 - disabled={record.disabled} 331 + disabled={record.disabled || typeDis}
330 icon={<Icon style={{ fontSize: 16 }} component={SubNodeIcon} />} 332 icon={<Icon style={{ fontSize: 16 }} component={SubNodeIcon} />}
331 onClick={() => handleAddTree(record.id)} 333 onClick={() => handleAddTree(record.id)}
332 /> 334 />
@@ -335,7 +337,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -335,7 +337,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
335 size={'small'} 337 size={'small'}
336 type="link" 338 type="link"
337 className="btn-high-del" 339 className="btn-high-del"
338 - disabled={record.disabled} 340 + disabled={record.disabled || typeDis}
339 icon={<QxBaseIcon style={{ fontSize: 16 }} className={'title-btn-del-btn'} type={'qx-icon-delete'} />} 341 icon={<QxBaseIcon style={{ fontSize: 16 }} className={'title-btn-del-btn'} type={'qx-icon-delete'} />}
340 onClick={() => handleDelete(record)} 342 onClick={() => handleDelete(record)}
341 /> 343 />
@@ -361,7 +363,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -361,7 +363,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
361 > 363 >
362 <InputNumber 364 <InputNumber
363 draggable={true} 365 draggable={true}
364 - disabled={record.disabled} 366 + disabled={record.disabled || typeDis}
365 onDragStart={(event) => { 367 onDragStart={(event) => {
366 event.stopPropagation(); 368 event.stopPropagation();
367 event.preventDefault(); 369 event.preventDefault();
@@ -376,7 +378,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -376,7 +378,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
376 <div className='range-cell'>-</div> 378 <div className='range-cell'>-</div>
377 <InputNumber 379 <InputNumber
378 draggable={true} 380 draggable={true}
379 - disabled={record.disabled} 381 + disabled={record.disabled || typeDis}
380 onDragStart={(event) => { 382 onDragStart={(event) => {
381 event.stopPropagation(); 383 event.stopPropagation();
382 event.preventDefault(); 384 event.preventDefault();
@@ -398,7 +400,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -398,7 +400,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
398 > 400 >
399 <div className='range-cell'> 401 <div className='range-cell'>
400 <InputNumber 402 <InputNumber
401 - disabled={record.disabled} 403 + disabled={record.disabled || typeDis}
402 draggable={true} 404 draggable={true}
403 onDragStart={(event) => { 405 onDragStart={(event) => {
404 event.stopPropagation(); 406 event.stopPropagation();
@@ -414,7 +416,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -414,7 +416,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
414 /> 416 />
415 - 417 -
416 <InputNumber 418 <InputNumber
417 - disabled={record.disabled} 419 + disabled={record.disabled || typeDis}
418 draggable={true} 420 draggable={true}
419 onDragStart={(event) => { 421 onDragStart={(event) => {
420 event.stopPropagation(); 422 event.stopPropagation();
@@ -433,7 +435,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -433,7 +435,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
433 <div className='range-cell'> 435 <div className='range-cell'>
434 436
435 <InputNumber 437 <InputNumber
436 - disabled={record.disabled} 438 + disabled={record.disabled || typeDis}
437 draggable={true} 439 draggable={true}
438 onDragStart={(event) => { 440 onDragStart={(event) => {
439 event.stopPropagation(); 441 event.stopPropagation();
@@ -460,7 +462,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -460,7 +462,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
460 <div className='range-cell'> 462 <div className='range-cell'>
461 <DatePicker 463 <DatePicker
462 bordered={false} 464 bordered={false}
463 - disabled={record.disabled} 465 + disabled={record.disabled || typeDis}
464 size='small' 466 size='small'
465 defaultValue={ 467 defaultValue={
466 qxProps?.min 468 qxProps?.min
@@ -475,7 +477,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -475,7 +477,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
475 /> 477 />
476 - 478 -
477 <DatePicker 479 <DatePicker
478 - disabled={record.disabled} 480 + disabled={record.disabled || typeDis}
479 size='small' 481 size='small'
480 bordered={false} 482 bordered={false}
481 defaultValue={ 483 defaultValue={
@@ -493,7 +495,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -493,7 +495,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
493 </div> 495 </div>
494 <div className='range-cell'> 496 <div className='range-cell'>
495 <Select 497 <Select
496 - disabled={record.disabled} 498 + disabled={record.disabled || typeDis}
497 size='small' 499 size='small'
498 // style={{ width: '90px' }} 500 // style={{ width: '90px' }}
499 bordered={false} 501 bordered={false}
@@ -535,7 +537,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -535,7 +537,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
535 onChange={(val: any) => { 537 onChange={(val: any) => {
536 handleChange(val, record, 'qxProps'); 538 handleChange(val, record, 'qxProps');
537 }} 539 }}
538 - disabled={['USER', 'ORG'].includes(record.type) || record.disabled} 540 + disabled={['USER', 'ORG'].includes(record.type) || record.disabled || typeDis}
539 request={props?.request} 541 request={props?.request}
540 /> 542 />
541 </div> 543 </div>
@@ -559,7 +561,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -559,7 +561,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
559 <Select 561 <Select
560 defaultValue={text || false} 562 defaultValue={text || false}
561 bordered={false} 563 bordered={false}
562 - disabled={record.disabled} 564 + disabled={record.disabled || typeDis}
563 onSelect={(e) => props.handleChange(e, record, 'required')} 565 onSelect={(e) => props.handleChange(e, record, 'required')}
564 > 566 >
565 <Select.Option value={true}>是</Select.Option> 567 <Select.Option value={true}>是</Select.Option>
@@ -608,8 +610,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -608,8 +610,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
608 610
609 //每行拖拽渲染 611 //每行拖拽渲染
610 const onRow = () => ({ 612 const onRow = () => ({
611 - draggable: true,  
612 - style: { cursor: 'move' }, 613 + draggable: !type,
  614 + style: !type && { cursor: 'move' },
613 onDragStart: (ev: any) => { 615 onDragStart: (ev: any) => {
614 ev.persist(); 616 ev.persist();
615 ev.dataTransfer.effectAllowed = 'move'; 617 ev.dataTransfer.effectAllowed = 'move';
@@ -758,55 +760,58 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -758,55 +760,58 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
758 /> 760 />
759 } 761 }
760 > 762 >
761 - {isShowJson ? (  
762 - <Row>  
763 - <Col span={12}>  
764 - <Button  
765 - type="link"  
766 - icon={<SnippetsOutlined />}  
767 - onClick={() => setIsShowJson(false)}  
768 - >  
769 - {'表单参数设置'}  
770 - </Button>  
771 - </Col>  
772 - </Row>  
773 - ) : (  
774 - <Row>  
775 - <Col span={12}>  
776 - <Button  
777 - size={'small'}  
778 - type="link"  
779 - icon={<QxBaseIcon style={{ fontSize: 16 }} type={'qx-icon-flow-code'} />} 763 + {!type && (
  764 + isShowJson ? (
  765 + <Row>
  766 + <Col span={12}>
  767 + <Button
  768 + type="link"
  769 + icon={<SnippetsOutlined />}
  770 + onClick={() => setIsShowJson(false)}
  771 + >
  772 + {'表单参数设置'}
  773 + </Button>
  774 + </Col>
  775 + </Row>
  776 + ) : (
  777 + <Row>
  778 + <Col span={12}>
  779 + <Button
  780 + size={'small'}
  781 + type="link"
  782 + icon={<QxBaseIcon style={{ fontSize: 16 }} type={'qx-icon-flow-code'} />}
  783 + style={{
  784 + padding: 0,
  785 + height: '32px',
  786 + lineHeight: '32px',
  787 + }}
  788 + onClick={() => onOpen()}
  789 + >
  790 + JSON参数设置
  791 + </Button>
  792 + </Col>
  793 + <Col
  794 + className="border-none"
  795 + span={12}
780 style={{ 796 style={{
781 - padding: 0,  
782 - height: '32px',  
783 - lineHeight: '32px', 797 + display: 'flex',
  798 + flexDirection: 'row-reverse',
  799 + marginBottom: '16px',
  800 + textAlign: 'center',
784 }} 801 }}
785 - onClick={() => onOpen()}  
786 > 802 >
787 - JSON参数设置  
788 - </Button>  
789 - </Col>  
790 - <Col  
791 - className="border-none"  
792 - span={12}  
793 - style={{  
794 - display: 'flex',  
795 - flexDirection: 'row-reverse',  
796 - marginBottom: '16px',  
797 - textAlign: 'center',  
798 - }}  
799 - >  
800 - <Input  
801 - className={'qx-parameter-setting--search'}  
802 - placeholder="参数编码/参数名搜索"  
803 - prefix={<QxBaseIcon type={'icon-app-search-line'} />}  
804 - onChange={onChange}  
805 - style={{ width: 219 }}  
806 - />  
807 - </Col>  
808 - </Row>  
809 - )} 803 + <Input
  804 + className={'qx-parameter-setting--search'}
  805 + placeholder="参数编码/参数名搜索"
  806 + prefix={<QxBaseIcon type={'icon-app-search-line'} />}
  807 + onChange={onChange}
  808 + style={{ width: 219 }}
  809 + />
  810 + </Col>
  811 + </Row>
  812 + )
  813 + )
  814 + }
810 { 815 {
811 isShowJson ? ( 816 isShowJson ? (
812 <> 817 <>
@@ -31,6 +31,17 @@ export default () => { @@ -31,6 +31,17 @@ export default () => {
31 disabled: false, 31 disabled: false,
32 type: 'FORM', 32 type: 'FORM',
33 }, 33 },
  34 + {
  35 + id: '6370b8fd52484b83ab2222270b05f',
  36 + pid: '',
  37 + code: 'kwkwkw',
  38 + showCode: true,
  39 + title: '维苏威',
  40 + required: true,
  41 + qxProps: {},
  42 + disabled: false,
  43 + type: 'STRING',
  44 + },
34 ]); 45 ]);
35 const handleChange = (newValue) => { 46 const handleChange = (newValue) => {
36 setValue(newValue); 47 setValue(newValue);
@@ -117,6 +128,7 @@ export default () => { @@ -117,6 +128,7 @@ export default () => {
117 isHideSearch={isHide} 128 isHideSearch={isHide}
118 isShowField={true} 129 isShowField={true}
119 title={titleDom} 130 title={titleDom}
  131 + type={'preview'}
120 // component={QxTagsInput} 132 // component={QxTagsInput}
121 request={request} 133 request={request}
122 appId={'5ak3C213YQWEO6IYnIs'} 134 appId={'5ak3C213YQWEO6IYnIs'}
@@ -103,6 +103,7 @@ interface ParameterSettingProps { @@ -103,6 +103,7 @@ interface ParameterSettingProps {
103 // comHandleChange?: (val: any) => void; 103 // comHandleChange?: (val: any) => void;
104 appId?: string; // 当前应用ID 104 appId?: string; // 当前应用ID
105 request?: any, 105 request?: any,
  106 + type?: string,
106 nodeType?: string | 'START' | 'END'; 107 nodeType?: string | 'START' | 'END';
107 } 108 }
108 109
@@ -627,7 +628,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -627,7 +628,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
627 const strTitle = (nodeData.title as string) || ''; 628 const strTitle = (nodeData.title as string) || '';
628 const index = strTitle.indexOf(searchValue); 629 const index = strTitle.indexOf(searchValue);
629 const isShowTree = checkShowTree(nodeData); 630 const isShowTree = checkShowTree(nodeData);
630 - const disabled = nodeData.disabled; 631 + const disabled = !!props.type ? true : nodeData.disabled;
631 return ( 632 return (
632 <div 633 <div
633 onBlur={(e) => onBlur(e)} tabIndex={0} onFocus={(e) => onFocus(e)}> 634 onBlur={(e) => onBlur(e)} tabIndex={0} onFocus={(e) => onFocus(e)}>
@@ -730,28 +731,31 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -730,28 +731,31 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
730 <div> 731 <div>
731 <div className={'qx-parameter-setting-content'}> 732 <div className={'qx-parameter-setting-content'}>
732 <div style={{ display: 'flex', flexDirection: 'row' }}> 733 <div style={{ display: 'flex', flexDirection: 'row' }}>
733 - <Dropdown  
734 - trigger={['click']}  
735 - className={'hidden-select'}  
736 - dropdownRender={() => (  
737 - <Menu  
738 - items={valueOptions}  
739 - className={'dropdown'}  
740 - onClick={onSelect}  
741 - />  
742 - )}  
743 - >  
744 - <Button  
745 - size={'small'}  
746 - type={'link'}  
747 - style={{  
748 - padding: '0 0 0 8px',  
749 - }} 734 + {
  735 + !props.type &&
  736 + <Dropdown
  737 + trigger={['click']}
  738 + className={'hidden-select'}
  739 + dropdownRender={() => (
  740 + <Menu
  741 + items={valueOptions}
  742 + className={'dropdown'}
  743 + onClick={onSelect}
  744 + />
  745 + )}
750 > 746 >
751 - <QxBaseIcon style={{ fontSize: '16px' }} type={'qx-icon-plus'} />  
752 - 添加参数  
753 - </Button>  
754 - </Dropdown> 747 + <Button
  748 + size={'small'}
  749 + type={'link'}
  750 + style={{
  751 + padding: '0 0 0 8px',
  752 + }}
  753 + >
  754 + <QxBaseIcon style={{ fontSize: '16px' }} type={'qx-icon-plus'} />
  755 + 添加参数
  756 + </Button>
  757 + </Dropdown>
  758 + }
755 <Button 759 <Button
756 size={'small'} 760 size={'small'}
757 type={'link'} 761 type={'link'}
@@ -795,7 +799,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -795,7 +799,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
795 titleRender={(nodeData) => renderTitle(nodeData)} 799 titleRender={(nodeData) => renderTitle(nodeData)}
796 style={{ height: '100%' }} 800 style={{ height: '100%' }}
797 onDrop={onDrop} 801 onDrop={onDrop}
798 - draggable 802 + draggable={!props.type}
799 blockNode 803 blockNode
800 expandedKeys={expandedKeys ? expandedKeys : defaultExpandedKeys} 804 expandedKeys={expandedKeys ? expandedKeys : defaultExpandedKeys}
801 autoExpandParent={autoExpandParent} 805 autoExpandParent={autoExpandParent}
@@ -820,6 +824,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -820,6 +824,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
820 request={props?.request} 824 request={props?.request}
821 appId={props?.appId} 825 appId={props?.appId}
822 nodeType={props?.nodeType} 826 nodeType={props?.nodeType}
  827 + type={props?.type}
823 /> 828 />
824 </div> 829 </div>
825 ); 830 );