Commit e4b98486e46866d56c2cc168e86b2be0b4d2d897
Merge branch 'feature/dataflow' of http://gitlab.qgutech.com/tianqiang/qx-common…
… into feature/dataflow
Showing
8 changed files
with
247 additions
and
109 deletions
| @@ -145,7 +145,7 @@ const QxCheckboxFieldPopover: React.FC<QxCheckboxFieldPopoverProp> = (props) => | @@ -145,7 +145,7 @@ const QxCheckboxFieldPopover: React.FC<QxCheckboxFieldPopoverProp> = (props) => | ||
| 145 | } | 145 | } |
| 146 | placement={'bottomRight'} | 146 | placement={'bottomRight'} |
| 147 | trigger={props.disabled ? undefined : props.trigger || 'click'} | 147 | trigger={props.disabled ? undefined : props.trigger || 'click'} |
| 148 | - open={visible} | 148 | + open={props.disabled ? false: visible} |
| 149 | onOpenChange={(v) => { | 149 | onOpenChange={(v) => { |
| 150 | setVisible(v); | 150 | setVisible(v); |
| 151 | }} | 151 | }} |
| @@ -269,7 +269,7 @@ const QxFieldPopover: React.FC<QxFieldPopoverProp> = (props) => { | @@ -269,7 +269,7 @@ const QxFieldPopover: React.FC<QxFieldPopoverProp> = (props) => { | ||
| 269 | content={fieldsPopContent()} | 269 | content={fieldsPopContent()} |
| 270 | placement={'bottomRight'} | 270 | placement={'bottomRight'} |
| 271 | trigger={props.disabled ? undefined : props.trigger || 'click'} | 271 | trigger={props.disabled ? undefined : props.trigger || 'click'} |
| 272 | - open={visible} | 272 | + open={props.disabled ? false : visible} |
| 273 | onOpenChange={(v) => { | 273 | onOpenChange={(v) => { |
| 274 | if (!v) { | 274 | if (!v) { |
| 275 | setTimeout(() => { | 275 | setTimeout(() => { |
| @@ -39,6 +39,7 @@ import moment from 'dayjs'; | @@ -39,6 +39,7 @@ import moment from 'dayjs'; | ||
| 39 | import { QxBaseIcon } from '@qx/common'; | 39 | import { QxBaseIcon } from '@qx/common'; |
| 40 | import Icon from '@ant-design/icons'; | 40 | import Icon from '@ant-design/icons'; |
| 41 | import { SubNodeIcon } from './sub-node-icon'; | 41 | import { SubNodeIcon } from './sub-node-icon'; |
| 42 | +import { SubDropIcon } from './sub-node-icon'; | ||
| 42 | 43 | ||
| 43 | import '../style/reset.less'; | 44 | import '../style/reset.less'; |
| 44 | 45 | ||
| @@ -162,13 +163,17 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -162,13 +163,17 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 162 | const columns = [ | 163 | const columns = [ |
| 163 | { | 164 | { |
| 164 | title: ( | 165 | title: ( |
| 165 | - <div style={{ display: 'flex', flexDirection: 'row' }}> | ||
| 166 | - <span>参数编码</span> | 166 | + <div style={{ |
| 167 | + display: 'flex', flexDirection: 'row' | ||
| 168 | + , alignContent: 'center', flexWrap: 'wrap' | ||
| 169 | + }}> | ||
| 170 | + <span className='parameter-setting-table-title'>参数编码</span> | ||
| 167 | <span style={{ color: 'red' }}>*</span> | 171 | <span style={{ color: 'red' }}>*</span> |
| 168 | </div> | 172 | </div> |
| 169 | ), | 173 | ), |
| 170 | dataIndex: 'code', | 174 | dataIndex: 'code', |
| 171 | - width: '150px', | 175 | + className: 'code-header', |
| 176 | + width: '200px', | ||
| 172 | key: 'code', | 177 | key: 'code', |
| 173 | render: (text, record) => { | 178 | render: (text, record) => { |
| 174 | const strTitle = (text as string) || ''; | 179 | const strTitle = (text as string) || ''; |
| @@ -196,12 +201,13 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -196,12 +201,13 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 196 | { | 201 | { |
| 197 | title: ( | 202 | title: ( |
| 198 | <div style={{ display: 'flex', flexDirection: 'row' }}> | 203 | <div style={{ display: 'flex', flexDirection: 'row' }}> |
| 199 | - <span>参数名</span> | 204 | + <span className='parameter-setting-table-title'>参数名</span> |
| 200 | <span style={{ color: 'red' }}>*</span> | 205 | <span style={{ color: 'red' }}>*</span> |
| 201 | </div> | 206 | </div> |
| 202 | ), | 207 | ), |
| 203 | dataIndex: 'title', | 208 | dataIndex: 'title', |
| 204 | width: '112px', | 209 | width: '112px', |
| 210 | + className: 'ps-table-cell', | ||
| 205 | key: 'title', | 211 | key: 'title', |
| 206 | render: (text, record) => { | 212 | render: (text, record) => { |
| 207 | const strTitle = (record.title as string) || ''; | 213 | const strTitle = (record.title as string) || ''; |
| @@ -229,11 +235,12 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -229,11 +235,12 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 229 | { | 235 | { |
| 230 | title: ( | 236 | title: ( |
| 231 | <div style={{ display: 'flex', flexDirection: 'row' }}> | 237 | <div style={{ display: 'flex', flexDirection: 'row' }}> |
| 232 | - <span>参数类型</span> | 238 | + <span className='parameter-setting-table-title'>参数类型</span> |
| 233 | <span style={{ color: 'red' }}>*</span> | 239 | <span style={{ color: 'red' }}>*</span> |
| 234 | </div> | 240 | </div> |
| 235 | ), | 241 | ), |
| 236 | dataIndex: 'type', | 242 | dataIndex: 'type', |
| 243 | + className: 'ps-table-cell', | ||
| 237 | width: '102px', | 244 | width: '102px', |
| 238 | key: 'type', | 245 | key: 'type', |
| 239 | render: (text, record) => | 246 | render: (text, record) => |
| @@ -256,8 +263,13 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -256,8 +263,13 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 256 | </Form.Item> | 263 | </Form.Item> |
| 257 | }, | 264 | }, |
| 258 | { | 265 | { |
| 259 | - title: '默认值', | 266 | + title: ( |
| 267 | + <div style={{ display: 'flex', flexDirection: 'row' }}> | ||
| 268 | + <span className='parameter-setting-table-title'>默认值</span> | ||
| 269 | + </div> | ||
| 270 | + ), | ||
| 260 | dataIndex: 'valueMapping', | 271 | dataIndex: 'valueMapping', |
| 272 | + className: 'ps-table-cell', | ||
| 261 | width: '116px', | 273 | width: '116px', |
| 262 | key: 'valueMapping', | 274 | key: 'valueMapping', |
| 263 | render: (text, record) => | 275 | render: (text, record) => |
| @@ -282,8 +294,14 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -282,8 +294,14 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 282 | </div> | 294 | </div> |
| 283 | }, | 295 | }, |
| 284 | { | 296 | { |
| 285 | - title: '参数说明', | 297 | + title: |
| 298 | + ( | ||
| 299 | + <div style={{ display: 'flex', flexDirection: 'row' }}> | ||
| 300 | + <span className='parameter-setting-table-title'>参数说明</span> | ||
| 301 | + </div> | ||
| 302 | + ), | ||
| 286 | dataIndex: 'description', | 303 | dataIndex: 'description', |
| 304 | + className: 'ps-table-cell', | ||
| 287 | key: 'description', | 305 | key: 'description', |
| 288 | width: '102px', | 306 | width: '102px', |
| 289 | render: (text, record) => ( | 307 | render: (text, record) => ( |
| @@ -306,8 +324,14 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -306,8 +324,14 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 306 | ), | 324 | ), |
| 307 | }, | 325 | }, |
| 308 | { | 326 | { |
| 309 | - title: '操作', | 327 | + title: |
| 328 | + ( | ||
| 329 | + <div style={{ display: 'flex', flexDirection: 'row' }}> | ||
| 330 | + <span className='parameter-setting-table-title'>操作</span> | ||
| 331 | + </div> | ||
| 332 | + ), | ||
| 310 | key: 'action', | 333 | key: 'action', |
| 334 | + className: 'ps-table-cell', | ||
| 311 | width: '96px', | 335 | width: '96px', |
| 312 | render: (text, record) => { | 336 | render: (text, record) => { |
| 313 | const isShowAdd = (record && checkShowAdd(record)); | 337 | const isShowAdd = (record && checkShowAdd(record)); |
| @@ -348,9 +372,14 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -348,9 +372,14 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 348 | ]; | 372 | ]; |
| 349 | 373 | ||
| 350 | const range = { | 374 | const range = { |
| 351 | - title: '取值范围', | 375 | + title: |
| 376 | + ( | ||
| 377 | + <div style={{ display: 'flex', flexDirection: 'row' }}> | ||
| 378 | + <span className='parameter-setting-table-title'>取值范围</span> | ||
| 379 | + </div> | ||
| 380 | + ), | ||
| 352 | dataIndex: 'qxProps', | 381 | dataIndex: 'qxProps', |
| 353 | - editable: true, | 382 | + className: 'ps-table-cell', |
| 354 | width: '314px', | 383 | width: '314px', |
| 355 | key: 'qxProps', | 384 | key: 'qxProps', |
| 356 | render: (qxProps: any, record: any) => { | 385 | render: (qxProps: any, record: any) => { |
| @@ -548,11 +577,16 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -548,11 +577,16 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 548 | }; | 577 | }; |
| 549 | 578 | ||
| 550 | const require = { | 579 | const require = { |
| 551 | - title: '必填', | 580 | + title: |
| 581 | + ( | ||
| 582 | + <div style={{ display: 'flex', flexDirection: 'row' }}> | ||
| 583 | + <span className='parameter-setting-table-title'>必填</span> | ||
| 584 | + </div> | ||
| 585 | + ), | ||
| 552 | dataIndex: 'required', | 586 | dataIndex: 'required', |
| 553 | - editable: true, | 587 | + className: 'ps-table-cell', |
| 554 | key: 'required', | 588 | key: 'required', |
| 555 | - width: '76px', | 589 | + width: '86px', |
| 556 | render: (text, record) => ( | 590 | render: (text, record) => ( |
| 557 | <Form.Item | 591 | <Form.Item |
| 558 | name={'required' + record.id} | 592 | name={'required' + record.id} |
| @@ -610,10 +644,11 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -610,10 +644,11 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 610 | 644 | ||
| 611 | //每行拖拽渲染 | 645 | //每行拖拽渲染 |
| 612 | const onRow = () => ({ | 646 | const onRow = () => ({ |
| 613 | - draggable: !type, | ||
| 614 | - style: !type && { cursor: 'move' }, | 647 | + draggable: true, |
| 648 | + style: { cursor: 'move' }, | ||
| 615 | onDragStart: (ev: any) => { | 649 | onDragStart: (ev: any) => { |
| 616 | ev.persist(); | 650 | ev.persist(); |
| 651 | + console.log('onDragStart', ev.target) | ||
| 617 | ev.dataTransfer.effectAllowed = 'move'; | 652 | ev.dataTransfer.effectAllowed = 'move'; |
| 618 | ev.dataTransfer.setData('text', ev.target.getAttribute('data-row-key')); | 653 | ev.dataTransfer.setData('text', ev.target.getAttribute('data-row-key')); |
| 619 | }, | 654 | }, |
| @@ -676,6 +711,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -676,6 +711,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 676 | const dropIndex = _newTreeData.findIndex( | 711 | const dropIndex = _newTreeData.findIndex( |
| 677 | (item: any) => item.id === dropId, | 712 | (item: any) => item.id === dropId, |
| 678 | ); // 要drop到目标的index | 713 | ); // 要drop到目标的index |
| 714 | + // console.log('dropId', dropId) | ||
| 715 | + // console.log('dropCol', dropCol) | ||
| 679 | if (dragIndex == dropIndex || !dragId || !dropId) { | 716 | if (dragIndex == dropIndex || !dragId || !dropId) { |
| 680 | dropCol.childNodes.forEach((item: any) => (item.style.borderTop = '')); | 717 | dropCol.childNodes.forEach((item: any) => (item.style.borderTop = '')); |
| 681 | dropCol.parentNode.childNodes.forEach( | 718 | dropCol.parentNode.childNodes.forEach( |
| @@ -751,7 +788,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -751,7 +788,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 751 | footer={null} | 788 | footer={null} |
| 752 | // onOk={handleCancel} | 789 | // onOk={handleCancel} |
| 753 | onCancel={onCancel} | 790 | onCancel={onCancel} |
| 754 | - width={960} | 791 | + width={1200} |
| 755 | wrapClassName={'qx-common__modal'} | 792 | wrapClassName={'qx-common__modal'} |
| 756 | closeIcon={ | 793 | closeIcon={ |
| 757 | <QxBaseIcon | 794 | <QxBaseIcon |
| @@ -839,9 +876,29 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | @@ -839,9 +876,29 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { | ||
| 839 | expandable={{ | 876 | expandable={{ |
| 840 | defaultExpandAllRows: true, | 877 | defaultExpandAllRows: true, |
| 841 | childrenColumnName: 'child', | 878 | childrenColumnName: 'child', |
| 879 | + expandIcon: ({ expanded, onExpand, record }) => | ||
| 880 | + record.child && record.child.length > 0 && expanded ? ( | ||
| 881 | + <> | ||
| 882 | + <Icon component={SubDropIcon} | ||
| 883 | + className='drop-icon' /> | ||
| 884 | + <QxBaseIcon className={'table-expanded'} type={'qx-caret-down'} onClick={e => onExpand(record, e)} /> | ||
| 885 | + </> | ||
| 886 | + | ||
| 887 | + ) : record.child && record.child.length > 0 && !expanded ? | ||
| 888 | + ( | ||
| 889 | + <> | ||
| 890 | + <Icon component={SubDropIcon} | ||
| 891 | + className='drop-icon' /> | ||
| 892 | + <QxBaseIcon className={'table-expanded-change'} type={'qx-caret-down'} onClick={e => onExpand(record, e)} /> | ||
| 893 | + </> | ||
| 894 | + ) | ||
| 895 | + : | ||
| 896 | + <Icon component={SubDropIcon} | ||
| 897 | + className='drop-icon' /> | ||
| 842 | }} | 898 | }} |
| 899 | + className='parameter-setting-table' | ||
| 843 | onRow={() => onRow()} | 900 | onRow={() => onRow()} |
| 844 | - scroll={{ x: 960, y: 432 }} | 901 | + scroll={{ x: 1000, y: 432 }} |
| 845 | bordered | 902 | bordered |
| 846 | pagination={false} | 903 | pagination={false} |
| 847 | size={'small'} | 904 | size={'small'} |
| @@ -128,7 +128,7 @@ export default () => { | @@ -128,7 +128,7 @@ export default () => { | ||
| 128 | isHideSearch={isHide} | 128 | isHideSearch={isHide} |
| 129 | isShowField={true} | 129 | isShowField={true} |
| 130 | title={titleDom} | 130 | title={titleDom} |
| 131 | - type={'preview'} | 131 | + // type={'preview'} |
| 132 | // component={QxTagsInput} | 132 | // component={QxTagsInput} |
| 133 | request={request} | 133 | request={request} |
| 134 | appId={'5ak3C213YQWEO6IYnIs'} | 134 | appId={'5ak3C213YQWEO6IYnIs'} |
| @@ -37,6 +37,7 @@ type ValueOptionProps = { | @@ -37,6 +37,7 @@ type ValueOptionProps = { | ||
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | import { SubNodeIcon } from './sub-node-icon'; | 39 | import { SubNodeIcon } from './sub-node-icon'; |
| 40 | +import { SubDropIcon } from './sub-node-icon'; | ||
| 40 | 41 | ||
| 41 | const valueOptions = [ | 42 | const valueOptions = [ |
| 42 | { key: 'STRING', label: '文本' }, | 43 | { key: 'STRING', label: '文本' }, |
| @@ -630,95 +631,98 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { | @@ -630,95 +631,98 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { | ||
| 630 | const isShowTree = checkShowTree(nodeData); | 631 | const isShowTree = checkShowTree(nodeData); |
| 631 | const disabled = !!props.type ? true : nodeData.disabled; | 632 | const disabled = !!props.type ? true : nodeData.disabled; |
| 632 | return ( | 633 | return ( |
| 633 | - <div | ||
| 634 | - onBlur={(e) => onBlur(e)} tabIndex={0} onFocus={(e) => onFocus(e)}> | 634 | + <div> |
| 635 | + <Icon component={SubDropIcon} | ||
| 636 | + className='drop-icon'/> | ||
| 635 | <div | 637 | <div |
| 636 | - style={{ | ||
| 637 | - // padding: '2px', | ||
| 638 | - justifyContent: 'flex-end', | ||
| 639 | - display: 'flex', | ||
| 640 | - width: '100%', | ||
| 641 | - flexDirection: 'row-reverse', | ||
| 642 | - }} | ||
| 643 | - > | ||
| 644 | - <div className={'opt-btn'}> | ||
| 645 | - <Select | ||
| 646 | - value={nodeData.type} | ||
| 647 | - disabled={disabled} | ||
| 648 | - className={'select-tree'} | ||
| 649 | - bordered={false} | ||
| 650 | - getPopupContainer={(triggerNode) => triggerNode} | ||
| 651 | - onChange={(e: any) => { | ||
| 652 | - handleChange(e, nodeData, 'type'); | ||
| 653 | - }} | ||
| 654 | - > | ||
| 655 | - {valueOptions.map((item) => { | ||
| 656 | - return ( | ||
| 657 | - <Select.Option key={item.key} value={item.key}> | ||
| 658 | - {item.label} | ||
| 659 | - </Select.Option> | ||
| 660 | - ); | ||
| 661 | - })} | ||
| 662 | - </Select> | ||
| 663 | - {(nodeData.type === 'OBJECT' || nodeData.type === 'ARRAY') && | ||
| 664 | - isShowTree && ( | ||
| 665 | - <Button | ||
| 666 | - icon={<Icon component={SubNodeIcon} />} | ||
| 667 | - disabled={disabled} | ||
| 668 | - type="link" | ||
| 669 | - className="title-btn" | ||
| 670 | - onClick={() => onAddTree(nodeData.id)} | ||
| 671 | - /> | ||
| 672 | - )} | ||
| 673 | - <Button | ||
| 674 | - className="title-btn-del" | ||
| 675 | - icon={<QxBaseIcon className={'title-btn-del-btn'} type={'qx-icon-delete'} />} | ||
| 676 | - disabled={disabled} | ||
| 677 | - type="link" | ||
| 678 | - onClick={() => deleteParameter(nodeData)} | ||
| 679 | - /> | ||
| 680 | - </div> | ||
| 681 | - <div className="opt-left"> | ||
| 682 | - <Input | ||
| 683 | - className={index > -1 && searchValue ? 'search-selected' : ''} | ||
| 684 | - draggable={true} | ||
| 685 | - onDragStart={(event) => { | ||
| 686 | - event.stopPropagation(); | ||
| 687 | - event.preventDefault(); | ||
| 688 | - }} | ||
| 689 | - key={inputKey} | ||
| 690 | - style={{ width: '100%' }} | ||
| 691 | - maxLength={50} | ||
| 692 | - allowClear | ||
| 693 | - disabled={disabled} | ||
| 694 | - bordered={true} | ||
| 695 | - defaultValue={nodeData.title} | ||
| 696 | - onBlur={(e) => { | ||
| 697 | - handleChange(e, nodeData, 'title'); | ||
| 698 | - }} | ||
| 699 | - /> | 638 | + onBlur={(e) => onBlur(e)} tabIndex={0} onFocus={(e) => onFocus(e)}> |
| 639 | + <div | ||
| 640 | + style={{ | ||
| 641 | + // padding: '2px', | ||
| 642 | + justifyContent: 'flex-end', | ||
| 643 | + display: 'flex', | ||
| 644 | + width: '100%', | ||
| 645 | + flexDirection: 'row-reverse', | ||
| 646 | + }} | ||
| 647 | + > | ||
| 648 | + <div className={'opt-btn'}> | ||
| 649 | + <Select | ||
| 650 | + value={nodeData.type} | ||
| 651 | + disabled={disabled} | ||
| 652 | + className={'select-tree'} | ||
| 653 | + bordered={false} | ||
| 654 | + getPopupContainer={(triggerNode) => triggerNode} | ||
| 655 | + onChange={(e: any) => { | ||
| 656 | + handleChange(e, nodeData, 'type'); | ||
| 657 | + }} | ||
| 658 | + > | ||
| 659 | + {valueOptions.map((item) => { | ||
| 660 | + return ( | ||
| 661 | + <Select.Option key={item.key} value={item.key}> | ||
| 662 | + {item.label} | ||
| 663 | + </Select.Option> | ||
| 664 | + ); | ||
| 665 | + })} | ||
| 666 | + </Select> | ||
| 667 | + {(nodeData.type === 'OBJECT' || nodeData.type === 'ARRAY') && | ||
| 668 | + isShowTree && ( | ||
| 669 | + <Button | ||
| 670 | + icon={<Icon component={SubNodeIcon} />} | ||
| 671 | + disabled={disabled} | ||
| 672 | + type="link" | ||
| 673 | + className="title-btn" | ||
| 674 | + onClick={() => onAddTree(nodeData.id)} | ||
| 675 | + /> | ||
| 676 | + )} | ||
| 677 | + <Button | ||
| 678 | + className="title-btn-del" | ||
| 679 | + icon={<QxBaseIcon className={'title-btn-del-btn'} type={'qx-icon-delete'} />} | ||
| 680 | + disabled={disabled} | ||
| 681 | + type="link" | ||
| 682 | + onClick={() => deleteParameter(nodeData)} | ||
| 683 | + /> | ||
| 684 | + </div> | ||
| 685 | + <div className="opt-left"> | ||
| 686 | + <Input | ||
| 687 | + className={index > -1 && searchValue ? 'search-selected' : ''} | ||
| 688 | + draggable={true} | ||
| 689 | + onDragStart={(event) => { | ||
| 690 | + event.stopPropagation(); | ||
| 691 | + event.preventDefault(); | ||
| 692 | + }} | ||
| 693 | + key={inputKey} | ||
| 694 | + style={{ width: '100%' }} | ||
| 695 | + maxLength={50} | ||
| 696 | + disabled={disabled} | ||
| 697 | + bordered={true} | ||
| 698 | + defaultValue={nodeData.title} | ||
| 699 | + onBlur={(e) => { | ||
| 700 | + handleChange(e, nodeData, 'title'); | ||
| 701 | + }} | ||
| 702 | + /> | ||
| 703 | + </div> | ||
| 700 | </div> | 704 | </div> |
| 705 | + {props?.isShowField && ( | ||
| 706 | + <div className="opt-left-down"> | ||
| 707 | + <QxFieldSetter | ||
| 708 | + disabled={disabled} | ||
| 709 | + value={nodeData.valuesObj || []} | ||
| 710 | + params={{ appCode: 'appCode', useId: true }} | ||
| 711 | + valueOptions={getValueOptions(nodeData)} | ||
| 712 | + field={nodeData.code} | ||
| 713 | + widget={typeTranslateWidget(nodeData.type)} | ||
| 714 | + fieldType={typeTranslateFieIdtype(nodeData.type)} | ||
| 715 | + fieldGroupType={typeTranslateGrouptype(nodeData.type)} | ||
| 716 | + isMixValue={typeTranslateFieIdtype(nodeData.type) == 'STRING' ? true : false} | ||
| 717 | + colsTree={props.nodeItem} | ||
| 718 | + isMultiple={false} | ||
| 719 | + onChange={(val) => changeField(val, nodeData)} | ||
| 720 | + popupOnBody={true} | ||
| 721 | + inputDis={true} | ||
| 722 | + /> | ||
| 723 | + </div> | ||
| 724 | + )} | ||
| 701 | </div> | 725 | </div> |
| 702 | - {props?.isShowField && ( | ||
| 703 | - <div className="opt-left-down"> | ||
| 704 | - <QxFieldSetter | ||
| 705 | - disabled={disabled} | ||
| 706 | - value={nodeData.valuesObj || []} | ||
| 707 | - params={{ appCode: 'appCode', useId: true }} | ||
| 708 | - valueOptions={getValueOptions(nodeData)} | ||
| 709 | - field={nodeData.code} | ||
| 710 | - widget={typeTranslateWidget(nodeData.type)} | ||
| 711 | - fieldType={typeTranslateFieIdtype(nodeData.type)} | ||
| 712 | - fieldGroupType={typeTranslateGrouptype(nodeData.type)} | ||
| 713 | - isMixValue={typeTranslateFieIdtype(nodeData.type) == 'STRING' ? true : false} | ||
| 714 | - colsTree={props.nodeItem} | ||
| 715 | - isMultiple={false} | ||
| 716 | - onChange={(val) => changeField(val, nodeData)} | ||
| 717 | - popupOnBody={true} | ||
| 718 | - inputDis={true} | ||
| 719 | - /> | ||
| 720 | - </div> | ||
| 721 | - )} | ||
| 722 | </div> | 726 | </div> |
| 723 | ); | 727 | ); |
| 724 | }; | 728 | }; |
| @@ -799,7 +803,8 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { | @@ -799,7 +803,8 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { | ||
| 799 | titleRender={(nodeData) => renderTitle(nodeData)} | 803 | titleRender={(nodeData) => renderTitle(nodeData)} |
| 800 | style={{ height: '100%' }} | 804 | style={{ height: '100%' }} |
| 801 | onDrop={onDrop} | 805 | onDrop={onDrop} |
| 802 | - draggable={!props.type} | 806 | + draggable={{ icon: false }} |
| 807 | + // draggable={!props.type} | ||
| 803 | blockNode | 808 | blockNode |
| 804 | expandedKeys={expandedKeys ? expandedKeys : defaultExpandedKeys} | 809 | expandedKeys={expandedKeys ? expandedKeys : defaultExpandedKeys} |
| 805 | autoExpandParent={autoExpandParent} | 810 | autoExpandParent={autoExpandParent} |
| 1 | +/* stylelint-disable selector-class-pattern */ | ||
| 1 | @import '~@qx/ui/src/style/variable.less'; | 2 | @import '~@qx/ui/src/style/variable.less'; |
| 2 | 3 | ||
| 3 | /* stylelint-disable declaration-block-no-redundant-longhand-properties */ | 4 | /* stylelint-disable declaration-block-no-redundant-longhand-properties */ |
| @@ -29,6 +30,15 @@ | @@ -29,6 +30,15 @@ | ||
| 29 | 30 | ||
| 30 | .tree-wrapper { | 31 | .tree-wrapper { |
| 31 | margin-top: 20px; | 32 | margin-top: 20px; |
| 33 | + | ||
| 34 | + .ant-tree .ant-tree-switcher { | ||
| 35 | + // margin-top: 6.5px; | ||
| 36 | + width:44px; | ||
| 37 | + margin-top: 11.5px; | ||
| 38 | + margin-right: 7px; | ||
| 39 | + display: flex; | ||
| 40 | + justify-content: flex-end; | ||
| 41 | + } | ||
| 32 | } | 42 | } |
| 33 | 43 | ||
| 34 | .border-none | 44 | .border-none |
| @@ -258,6 +268,14 @@ | @@ -258,6 +268,14 @@ | ||
| 258 | background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), | 268 | background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), |
| 259 | padding 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); | 269 | padding 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); |
| 260 | 270 | ||
| 271 | + .drop-icon{ | ||
| 272 | + // opacity: 0.1; | ||
| 273 | + display: none; | ||
| 274 | + // position: absolute; | ||
| 275 | + // top: 10px; | ||
| 276 | + // left: -49px; | ||
| 277 | + } | ||
| 278 | + | ||
| 261 | &:hover { | 279 | &:hover { |
| 262 | background-color: @N3 !important; | 280 | background-color: @N3 !important; |
| 263 | 281 | ||
| @@ -266,6 +284,14 @@ | @@ -266,6 +284,14 @@ | ||
| 266 | display: block; | 284 | display: block; |
| 267 | } | 285 | } |
| 268 | 286 | ||
| 287 | + .drop-icon{ | ||
| 288 | + position: absolute; | ||
| 289 | + top: 10px; | ||
| 290 | + left: -39px; | ||
| 291 | + opacity: 1; | ||
| 292 | + display: block; | ||
| 293 | + } | ||
| 294 | + | ||
| 269 | .opt-left { | 295 | .opt-left { |
| 270 | width: 65%; | 296 | width: 65%; |
| 271 | } | 297 | } |
| @@ -285,3 +311,47 @@ | @@ -285,3 +311,47 @@ | ||
| 285 | background-color: transparent; | 311 | background-color: transparent; |
| 286 | } | 312 | } |
| 287 | } | 313 | } |
| 314 | + | ||
| 315 | + .parameter-setting-table-title{ | ||
| 316 | + font-weight: 500; | ||
| 317 | + font-size: 14px; | ||
| 318 | + line-height: 22px; | ||
| 319 | + color: #7C7E86; | ||
| 320 | + padding-left: 10px; | ||
| 321 | + } | ||
| 322 | + | ||
| 323 | + .parameter-setting-table{ | ||
| 324 | + .code-header{ | ||
| 325 | + display: flex; | ||
| 326 | + } | ||
| 327 | + | ||
| 328 | + .ant-table-tbody .ant-table-row{ | ||
| 329 | + .drop-icon{ | ||
| 330 | + opacity: 0.01; | ||
| 331 | + } | ||
| 332 | + | ||
| 333 | + &:hover { | ||
| 334 | + .drop-icon{ | ||
| 335 | + opacity: 1; | ||
| 336 | + } | ||
| 337 | + } | ||
| 338 | + } | ||
| 339 | + | ||
| 340 | + .table-expanded{ | ||
| 341 | + color: #7C7E86; | ||
| 342 | + margin-left: 8px; | ||
| 343 | + transition: transform 0.3s; | ||
| 344 | + } | ||
| 345 | + | ||
| 346 | + .table-expanded-change{ | ||
| 347 | + transform: rotate(-90deg); | ||
| 348 | + color: #7C7E86; | ||
| 349 | + margin-left: 8px; | ||
| 350 | + transition: transform 0.3s; | ||
| 351 | + } | ||
| 352 | + } | ||
| 353 | + | ||
| 354 | + .parameter-setting-table .ant-table-cell{ | ||
| 355 | + height: 40px; | ||
| 356 | + padding: 4px 16px 0 4px !important; | ||
| 357 | + } |
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | export const SubNodeIcon = () => ( | 2 | export const SubNodeIcon = () => ( |
| 3 | - <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M6.333 5.333a1 1 0 0 0-1 1v3h-.667V2.667h10V1.333H1.333v1.334h2v6.666c0 .737.597 1.334 1.333 1.334h.667v3a1 1 0 0 0 1 1h7.333a1 1 0 0 0 1-1V6.333a1 1 0 0 0-1-1H6.333Zm.333 8V6.667h6.667v6.666H6.666Zm2.667-2.666h-2V9.333h2v-2h1.333v2h2v1.334h-2v2H9.333v-2Z" clip-rule="evenodd"/></svg> | 3 | + <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M6.333 5.333a1 1 0 0 0-1 1v3h-.667V2.667h10V1.333H1.333v1.334h2v6.666c0 .737.597 1.334 1.333 1.334h.667v3a1 1 0 0 0 1 1h7.333a1 1 0 0 0 1-1V6.333a1 1 0 0 0-1-1H6.333Zm.333 8V6.667h6.667v6.666H6.666Zm2.667-2.666h-2V9.333h2v-2h1.333v2h2v1.334h-2v2H9.333v-2Z" clip-rule="evenodd" /></svg> |
| 4 | +); | ||
| 5 | + | ||
| 6 | +export const SubDropIcon = () => ( | ||
| 7 | + <svg width="1em" height="1em" viewBox="0 0 6 12" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
| 8 | + <path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H2V2H0V0ZM4 0H6V2H4V0ZM0 5H2V7H0V5ZM4 5H6V7H4V5ZM0 10H2V12H0V10ZM4 10H6V12H4V10Z" fill="#7C7E86" /> | ||
| 9 | + </svg> | ||
| 4 | ); | 10 | ); |