Commit b17e05d7344167ad064ee88b12ee40cf93462026

Authored by qiang.tian
2 parents ab235053 9a6887df

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

… into feature/dataflow
@@ -5,3 +5,4 @@ node_modules @@ -5,3 +5,4 @@ node_modules
5 .dumi/tmp-production 5 .dumi/tmp-production
6 .DS_Store 6 .DS_Store
7 .idea 7 .idea
  8 +/package-lock.json
1 { 1 {
2 "name": "@qx/common", 2 "name": "@qx/common",
3 - "version": "3.0.0-alpha.10", 3 + "version": "3.0.0-alpha.14",
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",
@@ -10,9 +10,12 @@ @@ -10,9 +10,12 @@
10 justify-content: space-between; 10 justify-content: space-between;
11 font-size: 14px; 11 font-size: 14px;
12 color: @N9; 12 color: @N9;
  13 +<<<<<<< HEAD
13 height: 22px; 14 height: 22px;
14 margin-bottom: 4px; 15 margin-bottom: 4px;
15 overflow: hidden; 16 overflow: hidden;
  17 +=======
  18 +>>>>>>> 9a6887dfe15d01f555b9adbae7bca829b7d2e99d
16 } 19 }
17 20
18 &__header-icon { 21 &__header-icon {
@@ -23,7 +26,7 @@ @@ -23,7 +26,7 @@
23 26
24 &__header-filter { 27 &__header-filter {
25 display: inline-block; 28 display: inline-block;
26 - min-width: 80px; 29 + width: 100px;
27 30
28 &__select { 31 &__select {
29 width: 100%; 32 width: 100%;
1 ### 选择表单 1 ### 选择表单
2 2
  3 +### 外部传入options
3 ```tsx 4 ```tsx
4 import { request, QxFormSelect } from '@qx/common'; 5 import { request, QxFormSelect } from '@qx/common';
5 import React, { useState } from 'react'; 6 import React, { useState } from 'react';
@@ -243,4 +244,26 @@ export default () => { @@ -243,4 +244,26 @@ export default () => {
243 }; 244 };
244 ``` 245 ```
245 246
  247 +### 使用外部appId获取options
  248 +
  249 +```tsx
  250 +import { request, QxFormSelect } from '@qx/common';
  251 +import React, { useState } from 'react';
  252 +
  253 +export default () => {
  254 + const [value, setValue] = useState({});
  255 + return (
  256 + <QxFormSelect
  257 + optionId={'0lZK2gxUlpFD002WWKJ'}
  258 + value={value}
  259 + onChange={(datasource) => {
  260 + console.log(datasource, 'lllllll');
  261 + setValue(datasource);
  262 + }}
  263 + request={request}
  264 + />
  265 + );
  266 +};
  267 +```
  268 +
246 <API></API> 269 <API></API>
@@ -2,19 +2,17 @@ import { BlockOutlined } from '@ant-design/icons'; @@ -2,19 +2,17 @@ import { BlockOutlined } from '@ant-design/icons';
2 import { useSetState } from 'ahooks'; 2 import { useSetState } from 'ahooks';
3 import { Button } from 'antd'; 3 import { Button } from 'antd';
4 import cls from 'classnames'; 4 import cls from 'classnames';
5 -import React, { useCallback, useRef } from 'react'; 5 +import React, {useCallback, useEffect, useRef, useState} from 'react';
6 import { QxAppSelector } from '../qx-app-selector'; 6 import { QxAppSelector } from '../qx-app-selector';
7 import type { InputSelectProps } from '../qx-input-select'; 7 import type { InputSelectProps } from '../qx-input-select';
8 import { QxInputSelect } from '../qx-input-select'; 8 import { QxInputSelect } from '../qx-input-select';
9 9
10 import './styles.less'; 10 import './styles.less';
  11 +import {getAppFromList} from "./service";
11 12
12 const prefix = 'qx-form-select'; 13 const prefix = 'qx-form-select';
13 14
14 -/**  
15 - * 选择数据源  
16 - */  
17 -export const QxFormSelect: React.FC<FormSelectProps> = (props) => { 15 +const FormSelectMain: React.FC<FormSelectProps>= (props)=> {
18 const { 16 const {
19 className, 17 className,
20 options = [], 18 options = [],
@@ -106,6 +104,33 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => { @@ -106,6 +104,33 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => {
106 ) : null} 104 ) : null}
107 </div> 105 </div>
108 ); 106 );
  107 +}
  108 +
  109 +/**
  110 + * 选择数据源
  111 + */
  112 +export const QxFormSelect: React.FC<FormSelectProps> = (props) => {
  113 + const { options= [] as any , optionId } = props;
  114 + const [selectOptions, setSelectOptions] = useState([])
  115 +
  116 + useEffect(() => {
  117 + console.log(optionId,'llllloptions')
  118 + if(optionId && !options?.length) {
  119 + getAppFromList(optionId).then((res: any)=> {
  120 + if(res?.length){
  121 + setSelectOptions(res)
  122 + } else {
  123 + setSelectOptions([])
  124 + }
  125 + }).catch(()=> {
  126 + setSelectOptions([])
  127 + })
  128 + } else {
  129 + setSelectOptions(options)
  130 + }
  131 + }, []);
  132 +
  133 + return <FormSelectMain {...props} options={selectOptions}/>
109 }; 134 };
110 135
111 interface FormSelectProps extends InputSelectProps { 136 interface FormSelectProps extends InputSelectProps {
@@ -115,6 +140,7 @@ interface FormSelectProps extends InputSelectProps { @@ -115,6 +140,7 @@ interface FormSelectProps extends InputSelectProps {
115 request?: any; 140 request?: any;
116 disabled?: boolean; 141 disabled?: boolean;
117 popupOnBody?: boolean; 142 popupOnBody?: boolean;
  143 + optionId?: string; // 获取options传入表单的appId
118 } 144 }
119 interface FormSelectState { 145 interface FormSelectState {
120 visible: boolean; 146 visible: boolean;
  1 +import { request } from '@qx/common';
  2 +
  3 +/**
  4 + * 获取所选项集数据常量
  5 + */
  6 +export function getAppFromList(appId: string) {
  7 + return request.get(`/qx-apaas-lowcode/app/${appId}/option`);
  8 +}
@@ -52,6 +52,7 @@ const DropdownContent = React.forwardRef<any, DropdownContentProps>( @@ -52,6 +52,7 @@ const DropdownContent = React.forwardRef<any, DropdownContentProps>(
52 options?.map((opt) => ({ 52 options?.map((opt) => ({
53 label: opt[fieldLabel], 53 label: opt[fieldLabel],
54 key: opt[fieldValue], 54 key: opt[fieldValue],
  55 + ...(opt['extract']? {extract: opt['extract']}: {})
55 })), 56 })),
56 [options], 57 [options],
57 ); 58 );
@@ -27,7 +27,7 @@ import React, { @@ -27,7 +27,7 @@ import React, {
27 } from 'react'; 27 } from 'react';
28 import JSONEditor from './codeMirror'; 28 import JSONEditor from './codeMirror';
29 import './style.less'; 29 import './style.less';
30 -import { QxFieldSetter, QxFormSelect, ValueOptionProps } from '@qx/common'; 30 +import { QxFieldSetter, QxFormSelect } from '@qx/common';
31 import { formatEnum } from './constant'; 31 import { formatEnum } from './constant';
32 import { 32 import {
33 typeTranslateFieIdtype, 33 typeTranslateFieIdtype,
@@ -40,7 +40,12 @@ import { cloneDeep, debounce, isEmpty } from 'lodash-es'; @@ -40,7 +40,12 @@ import { cloneDeep, debounce, isEmpty } from 'lodash-es';
40 import moment from 'dayjs'; 40 import moment from 'dayjs';
41 import { QxBaseIcon } from '@qx/common'; 41 import { QxBaseIcon } from '@qx/common';
42 import Icon from '@ant-design/icons'; 42 import Icon from '@ant-design/icons';
43 -import {SubNodeIcon} from './sub-node-icon'; 43 +import { SubNodeIcon } from './sub-node-icon';
  44 +
  45 +type ValueOptionProps = {
  46 + key: number | string;
  47 + value: string;
  48 +};
44 49
45 const valueOptions = [ 50 const valueOptions = [
46 { key: 'STRING', title: '文本' }, 51 { key: 'STRING', title: '文本' },
@@ -49,20 +54,20 @@ const valueOptions = [ @@ -49,20 +54,20 @@ const valueOptions = [
49 { key: 'BOOL', title: '布尔' }, 54 { key: 'BOOL', title: '布尔' },
50 { key: 'OBJECT', title: '对象' }, 55 { key: 'OBJECT', title: '对象' },
51 { key: 'ARRAY', title: '数组' }, 56 { key: 'ARRAY', title: '数组' },
52 - { key: 'ANNEX', title: '附件' },  
53 - { key: 'PIC', title: '图片' }, 57 + /*{ key: 'ANNEX', title: '附件' },
  58 + { key: 'PIC', title: '图片' },*/
54 { key: 'FORM', title: '表单' }, 59 { key: 'FORM', title: '表单' },
55 { key: 'USER', title: '人员' }, 60 { key: 'USER', title: '人员' },
56 { key: 'ORG', title: '部门' }, 61 { key: 'ORG', title: '部门' },
57 ]; 62 ];
58 63
59 const timeFormat = [ 64 const timeFormat = [
60 - { lable: '年', value: 'YEAR' },  
61 - { lable: '年-月', value: 'YEAR_MONTH' },  
62 - { lable: '年-月-日', value: 'YEAR_DATE' },  
63 - { lable: '年-月-日 时', value: 'YEAR_HOUR' },  
64 - { lable: '年-月-日 时:分', value: 'YEAR_MIN' },  
65 - { lable: '年-月-日 时:分:秒', value: 'YEAR_SEC' }, 65 + { label: '年', value: 'YEAR' },
  66 + { label: '年-月', value: 'YEAR_MONTH' },
  67 + { label: '年-月-日', value: 'YEAR_DATE' },
  68 + { label: '年-月-日 时', value: 'YEAR_HOUR' },
  69 + { label: '年-月-日 时:分', value: 'YEAR_MIN' },
  70 + { label: '年-月-日 时:分:秒', value: 'YEAR_SEC' },
66 ]; 71 ];
67 72
68 interface ParameterSettingProps { 73 interface ParameterSettingProps {
@@ -79,7 +84,8 @@ interface ParameterSettingProps { @@ -79,7 +84,8 @@ interface ParameterSettingProps {
79 handleAdd: (val: any) => void; 84 handleAdd: (val: any) => void;
80 handleDelete: (val: any) => void; 85 handleDelete: (val: any) => void;
81 appFormList?: any[]; // 当前应用表单list 86 appFormList?: any[]; // 当前应用表单list
82 - request?: any, 87 + request?: any;
  88 + nodeType?: string | 'START' | 'END';
83 } 89 }
84 const EditableContext = React.createContext<FormInstance<any> | null>(null); 90 const EditableContext = React.createContext<FormInstance<any> | null>(null);
85 91
@@ -120,10 +126,9 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -120,10 +126,9 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
120 handleChange, 126 handleChange,
121 handleChangeField, 127 handleChangeField,
122 inputKey, 128 inputKey,
  129 + nodeType,
123 } = props; 130 } = props;
124 - console.log('data', data);  
125 // const [form] = Form.useForm() 131 // const [form] = Form.useForm()
126 -  
127 //判断数组是否只有一个子节点 132 //判断数组是否只有一个子节点
128 const checkShowAdd = (_data: any) => { 133 const checkShowAdd = (_data: any) => {
129 const _newTreeData = cloneDeep(treeData); 134 const _newTreeData = cloneDeep(treeData);
@@ -139,7 +144,6 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -139,7 +144,6 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
139 }; 144 };
140 145
141 const checkShowTree = (_data: any) => { 146 const checkShowTree = (_data: any) => {
142 - // console.log('_data', _data)  
143 if (_data.type == 'ARRAY') { 147 if (_data.type == 'ARRAY') {
144 if (_data.child && _data.child.length > 0) { 148 if (_data.child && _data.child.length > 0) {
145 return false; 149 return false;
@@ -157,7 +161,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -157,7 +161,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
157 </div> 161 </div>
158 ), 162 ),
159 dataIndex: 'code', 163 dataIndex: 'code',
160 - width: '15%', 164 + width: '12%',
161 editable: true, 165 editable: true,
162 key: 'code', 166 key: 'code',
163 // render: (text, record) => ( 167 // render: (text, record) => (
@@ -185,7 +189,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -185,7 +189,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
185 </div> 189 </div>
186 ), 190 ),
187 dataIndex: 'title', 191 dataIndex: 'title',
188 - width: '15%', 192 + width: '12%',
189 editable: true, 193 editable: true,
190 key: 'title', 194 key: 'title',
191 // render: (text, record) => ( 195 // render: (text, record) => (
@@ -239,83 +243,44 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -239,83 +243,44 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
239 // </Form.Item> 243 // </Form.Item>
240 }, 244 },
241 { 245 {
242 - title: '取值范围',  
243 - dataIndex: 'qxProps',  
244 - editable: true,  
245 - key: 'qxProps',  
246 - render: (text: any, record: any) => {  
247 - console.log('record ====', record);  
248 - console.log('text ====', text);  
249 - return (  
250 - <>  
251 - {record.type === 'FORM' ? <>  
252 - <div key={record.id}>  
253 - <span>  
254 - {text?.name}  
255 - </span>  
256 - </div>  
257 - </> : <>  
258 - <div key={record.id}>  
259 - <span>{record.type == 'TIME' ? moment(text?.min).format(  
260 - formatEnum[text?.format] || 'YYYY-MM-DD') : text?.min}  
261 - </span>  
262 - {text?.min && (  
263 - <Space style={{ marginLeft: 5, marginRight: 5 }}>-</Space>  
264 - )}  
265 - <span>{record.type == 'TIME' ? moment(text?.max).format(  
266 - formatEnum[text?.format] || 'YYYY-MM-DD') : text?.max}  
267 - </span>  
268 - </div>  
269 - </>}  
270 - </>  
271 - )  
272 - },  
273 - },  
274 - {  
275 - title: '必填',  
276 - dataIndex: 'required',  
277 - editable: true,  
278 - key: 'required',  
279 - width: '5%',  
280 - render: (text, record) => (  
281 - <span key={record.id}>{text ? '是' : '否'}</span>  
282 - // <Form.Item  
283 - // name={'required' + record.id}  
284 - // initialValue={record.required}  
285 - // >  
286 - // <Select  
287 - // disabled={record.disabled}  
288 - // onSelect={(e) => props.handleChange(e, record, 'required')}  
289 - // >  
290 - // <Select.Option value={true}>是</Select.Option>  
291 - // <Select.Option value={false}>否</Select.Option>  
292 - // </Select>  
293 - // </Form.Item>  
294 - ),  
295 - },  
296 - {  
297 title: '默认值', 246 title: '默认值',
298 - dataIndex: 'qxProps',  
299 - width: '10%', 247 + dataIndex: 'mappingValues',
  248 + width: '15%',
300 editable: true, 249 editable: true,
301 - key: 'qxProps',  
302 - render: (text, record) => (  
303 - // console.log('text', text)  
304 - <span key={record.id}>{text?.default}</span> 250 + key: 'mappingValues',
  251 + render: (text) =>
  252 + text || [].map((item) => {
  253 + // if (item.indexOf('-') > -1) {
  254 + // if (text == item.key) {
  255 + return <span key={item}>{item.indexOf('-') > -1 ? item : ''}</span>;
  256 + // }
  257 + }),
  258 + // }
305 259
306 - // <Form.Item  
307 - // name={'default' + record.id}  
308 - // initialValue={text?.default}  
309 - // >  
310 - // <Input disabled={record.disabled} onBlur={(e) => props.handleChange(e, record, 'qxProps-default')} />  
311 - // </Form.Item>  
312 - ), 260 + // }
  261 + // )
  262 + // text || [].map((item ) => {
  263 + // return console.log('123', item.indexOf('-'))
  264 + // if (item.indexOf('-') > -1) {
  265 +
  266 + // <span key={item.type + record.id}>{item.value}</span>;
  267 + // }
  268 + // }),
  269 + // console.log('text', text)
  270 + // <span key={record.id}>{text?.default}</span>
  271 +
  272 + // <Form.Item
  273 + // name={'default' + record.id}
  274 + // initialValue={text?.default}
  275 + // >
  276 + // <Input disabled={record.disabled} onBlur={(e) => props.handleChange(e, record, 'qxProps-default')} />
  277 + // </Form.Item>
  278 + // ),
313 }, 279 },
314 { 280 {
315 title: '参数说明', 281 title: '参数说明',
316 dataIndex: 'description', 282 dataIndex: 'description',
317 editable: true, 283 editable: true,
318 - width: '10%',  
319 key: 'description', 284 key: 'description',
320 render: (text, record) => ( 285 render: (text, record) => (
321 <span key={record.id}>{text}</span> 286 <span key={record.id}>{text}</span>
@@ -371,6 +336,65 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -371,6 +336,65 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
371 }, 336 },
372 ]; 337 ];
373 338
  339 + const range = {
  340 + title: '取值范围',
  341 + dataIndex: 'qxProps',
  342 + editable: true,
  343 + key: 'qxProps',
  344 + render: (text: any, record: any) => {
  345 + return (
  346 + <>
  347 + {record.type === 'FORM' ? <>
  348 + <div key={record.id}>
  349 + <span>
  350 + {text?.name}
  351 + </span>
  352 + </div>
  353 + </> : <>
  354 + <div key={record.id}>
  355 + <span>{record.type == 'TIME' ? text?.min ? moment(text.min).format(
  356 + formatEnum[text?.format] || 'YYYY-MM-DD') : undefined : text?.min}
  357 + </span>
  358 + {!!text?.min || text?.min >= 0 && (
  359 + <Space style={{ marginLeft: 5, marginRight: 5 }}>-</Space>
  360 + )}
  361 + <span>{record.type == 'TIME' ? text?.max ? moment(text.max).format(
  362 + formatEnum[text?.format] || 'YYYY-MM-DD') : undefined : text?.max}
  363 + </span>
  364 + </div>
  365 + </>}
  366 + </>
  367 + )
  368 + },
  369 + };
  370 +
  371 + const require = {
  372 + title: '必填',
  373 + dataIndex: 'required',
  374 + editable: true,
  375 + key: 'required',
  376 + width: '5%',
  377 + render: (text, record) => (
  378 + <span key={record.id}>{text ? '是' : '否'}</span>
  379 + // <Form.Item
  380 + // name={'required' + record.id}
  381 + // initialValue={record.required}
  382 + // >
  383 + // <Select
  384 + // disabled={record.disabled}
  385 + // onSelect={(e) => props.handleChange(e, record, 'required')}
  386 + // >
  387 + // <Select.Option value={true}>是</Select.Option>
  388 + // <Select.Option value={false}>否</Select.Option>
  389 + // </Select>
  390 + // </Form.Item>
  391 + ),
  392 + };
  393 +
  394 + if (nodeType !== 'END') {
  395 + columns.splice(3, 0, range, require)
  396 + }
  397 +
374 interface EditableRowProps { 398 interface EditableRowProps {
375 index: number; 399 index: number;
376 } 400 }
@@ -392,6 +416,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -392,6 +416,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
392 children: React.ReactNode; 416 children: React.ReactNode;
393 dataIndex: keyof any; 417 dataIndex: keyof any;
394 record: any; 418 record: any;
  419 + index: number;
395 // handleSave: (record: Item) => void; 420 // handleSave: (record: Item) => void;
396 } 421 }
397 422
@@ -409,12 +434,10 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -409,12 +434,10 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
409 const form = useContext(EditableContext)!; 434 const form = useContext(EditableContext)!;
410 const qxProps = record?.qxProps || {}; 435 const qxProps = record?.qxProps || {};
411 const [currentNode, setCurrentNode] = useState<any>(''); 436 const [currentNode, setCurrentNode] = useState<any>('');
412 - // console.log('dataIndex', dataIndex)  
413 437
414 useEffect(() => { 438 useEffect(() => {
415 if (editing) { 439 if (editing) {
416 if (inputRef.current) { 440 if (inputRef.current) {
417 - // console.log('setEditing', inputRef)  
418 inputRef.current!.focus(); 441 inputRef.current!.focus();
419 } 442 }
420 } 443 }
@@ -434,7 +457,6 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -434,7 +457,6 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
434 const toggleEdit1 = (e) => { 457 const toggleEdit1 = (e) => {
435 const values = form.getFieldsValue(); 458 const values = form.getFieldsValue();
436 e.persist(); 459 e.persist();
437 - // console.log('vae.target.tagNamelues', e.target.tagName)  
438 if (e.target.tagName == 'DIV') { 460 if (e.target.tagName == 'DIV') {
439 setCurrentNode(e.target) 461 setCurrentNode(e.target)
440 // console.log('values', values) 462 // console.log('values', values)
@@ -443,31 +465,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -443,31 +465,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
443 props.handleChange(values?.newQxProps, record, 'qxProps') 465 props.handleChange(values?.newQxProps, record, 'qxProps')
444 } 466 }
445 } 467 }
446 -  
447 - // setCurrentNode(e.currentTarget)  
448 - // console.log('e-onburl', e.currentTarget.key)  
449 - //  
450 - // if (e.currentTarget == e.target) {  
451 - // // setEditing(!editing);  
452 - // }  
453 - // form.setFieldsValue({ [dataIndex]: record[dataIndex] });  
454 }; 468 };
455 469
456 - // const test = (value) => {  
457 - // console.log('value', value)  
458 - // // form.setFieldsValue({  
459 - // // ['qxProps']: { value: value }  
460 - // // })  
461 - // }  
462 - // const toggleEdit2 = (e) => {  
463 - // e.persist();  
464 - // // console.log('e-onforce', e.currentTarget)  
465 -  
466 - // // e.dataTransfer.setData('text', e.target.getAttribute('data-row-key'));  
467 - // // console.log('currentTarget-fource', currentNode)  
468 - // // form.setFieldsValue({ [dataIndex]: record[dataIndex] });  
469 - // };  
470 -  
471 const save = async (code: string) => { 470 const save = async (code: string) => {
472 const isProps = code.indexOf('qxProps'); 471 const isProps = code.indexOf('qxProps');
473 const _newCode = isProps > -1 ? code.slice(8) : ''; 472 const _newCode = isProps > -1 ? code.slice(8) : '';
@@ -480,7 +479,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -480,7 +479,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
480 props.handleChange(newValue, record, code); 479 props.handleChange(newValue, record, code);
481 // toggleEdit(); 480 // toggleEdit();
482 } catch (errInfo) { 481 } catch (errInfo) {
483 - console.log('Save failed:', errInfo); 482 + console.warn('Save failed:', errInfo);
484 } 483 }
485 }; 484 };
486 485
@@ -510,6 +509,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -510,6 +509,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
510 initialValue={qxProps.min} 509 initialValue={qxProps.min}
511 > 510 >
512 <InputNumber 511 <InputNumber
  512 + min={0}
  513 + precision={0}
513 // defaultValue={qxProps.min} 514 // defaultValue={qxProps.min}
514 // onChange={onQxpropsChangen} 515 // onChange={onQxpropsChangen}
515 // onBlur={() => save('qxProps-min')} 516 // onBlur={() => save('qxProps-min')}
@@ -523,6 +524,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -523,6 +524,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
523 initialValue={qxProps.max} 524 initialValue={qxProps.max}
524 > 525 >
525 <InputNumber 526 <InputNumber
  527 + min={0}
  528 + precision={0}
526 // dataIndex={["qxProps", "max"]} 529 // dataIndex={["qxProps", "max"]}
527 // defaultValue={qxProps.max} 530 // defaultValue={qxProps.max}
528 // onBlur={() => save('qxProps-max')} 531 // onBlur={() => save('qxProps-max')}
@@ -548,6 +551,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -548,6 +551,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
548 style={{ margin: 0 }} 551 style={{ margin: 0 }}
549 > 552 >
550 <InputNumber 553 <InputNumber
  554 + precision={qxProps.precision || 0}
  555 + size='small'
551 // defaultValue={qxProps.min} 556 // defaultValue={qxProps.min}
552 // onBlur={() => save('qxProps-min')} 557 // onBlur={() => save('qxProps-min')}
553 style={{ width: '110px' }} 558 style={{ width: '110px' }}
@@ -562,6 +567,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -562,6 +567,8 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
562 name={['newQxProps', 'max']} 567 name={['newQxProps', 'max']}
563 > 568 >
564 <InputNumber 569 <InputNumber
  570 + size='small'
  571 + precision={qxProps.precision || 0}
565 // defaultValue={qxProps.max} 572 // defaultValue={qxProps.max}
566 // onBlur={() => save('qxProps-max')} 573 // onBlur={() => save('qxProps-max')}
567 style={{ width: '110px' }} 574 style={{ width: '110px' }}
@@ -576,6 +583,11 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -576,6 +583,11 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
576 name={['newQxProps', 'precision']} 583 name={['newQxProps', 'precision']}
577 > 584 >
578 <InputNumber 585 <InputNumber
  586 + size='small'
  587 + // formatter={decimalCheck}
  588 + precision={0}
  589 + min={0}
  590 + max={8}
579 // defaultValue={qxProps.precision} 591 // defaultValue={qxProps.precision}
580 // onBlur={() => save('qxProps-precision')} 592 // onBlur={() => save('qxProps-precision')}
581 placeholder="小数位数" 593 placeholder="小数位数"
@@ -595,6 +607,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -595,6 +607,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
595 > 607 >
596 <div> 608 <div>
597 <DatePicker 609 <DatePicker
  610 + size='small'
598 defaultValue={ 611 defaultValue={
599 qxProps?.min 612 qxProps?.min
600 ? moment(qxProps.min) 613 ? moment(qxProps.min)
@@ -602,7 +615,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -602,7 +615,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
602 } 615 }
603 format={formatEnum[qxProps?.format]} 616 format={formatEnum[qxProps?.format]}
604 // onChange={dateChange} 617 // onChange={dateChange}
605 - style={{ width: '130px' }} 618 + style={{ width: '110px' }}
606 // onBlur={() => save('qxProps-min')} 619 // onBlur={() => save('qxProps-min')}
607 showTime 620 showTime
608 onSelect={(e) => props.handleChange(e, record, 'qxProps-min')} 621 onSelect={(e) => props.handleChange(e, record, 'qxProps-min')}
@@ -611,13 +624,14 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -611,13 +624,14 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
611 {/* <DatePicker defaultValue={moment(qxProps.min)} onBlur={() => save('qxProps-min')} placeholder='开始日期' /> */} 624 {/* <DatePicker defaultValue={moment(qxProps.min)} onBlur={() => save('qxProps-min')} placeholder='开始日期' /> */}
612 &nbsp; ~ &nbsp; 625 &nbsp; ~ &nbsp;
613 <DatePicker 626 <DatePicker
  627 + size='small'
614 defaultValue={ 628 defaultValue={
615 qxProps?.min 629 qxProps?.min
616 ? moment(qxProps.max) 630 ? moment(qxProps.max)
617 : undefined 631 : undefined
618 } 632 }
619 format={formatEnum[qxProps?.format]} 633 format={formatEnum[qxProps?.format]}
620 - style={{ width: '130px' }} 634 + style={{ width: '110px' }}
621 // onChange={dateChange} 635 // onChange={dateChange}
622 showTime 636 showTime
623 // onBlur={toggleEdit} 637 // onBlur={toggleEdit}
@@ -627,6 +641,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -627,6 +641,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
627 {/* <DatePicker defaultValue={moment(qxProps.max)} onBlur={() => save('qxProps-max')} placeholder='结束日期' /> */} 641 {/* <DatePicker defaultValue={moment(qxProps.max)} onBlur={() => save('qxProps-max')} placeholder='结束日期' /> */}
628 </div> 642 </div>
629 <Select 643 <Select
  644 + size='small'
630 style={{ width: '90px' }} 645 style={{ width: '90px' }}
631 placeholder="格式" 646 placeholder="格式"
632 popupMatchSelectWidth={false} 647 popupMatchSelectWidth={false}
@@ -642,7 +657,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -642,7 +657,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
642 key={item.value} 657 key={item.value}
643 value={item.value} 658 value={item.value}
644 > 659 >
645 - {item.lable} 660 + {item.label}
646 </Select.Option> 661 </Select.Option>
647 ); 662 );
648 })} 663 })}
@@ -650,6 +665,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -650,6 +665,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
650 </div> 665 </div>
651 ); 666 );
652 case 'FORM': 667 case 'FORM':
  668 + console.log('FORM ====', '数据变化');
653 return ( 669 return (
654 <div 670 <div
655 key={record.id} 671 key={record.id}
@@ -715,32 +731,25 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -715,32 +731,25 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
715 } 731 }
716 732
717 const qxPropsDefault = () => { 733 const qxPropsDefault = () => {
718 - const valuesObj = [{  
719 - type: typeTranslateItemtype(record.type),  
720 - value: record?.qxProps?.default || '',  
721 - }]  
722 - record.valuesObj = valuesObj 734 + // const valuesObj = [{
  735 + // type: typeTranslateItemtype(record.type),
  736 + // value: record.mappingValues || [],
  737 + // }]
  738 + // record.valuesObj = !record.valuesObj ? valuesObj : record.valuesObj
723 return ( 739 return (
724 <div> 740 <div>
725 - {/* <Input  
726 - defaultValue={record?.qxProps?.default}  
727 - ref={inputRef}  
728 - onBlur={() => save('qxProps-default')}  
729 - /> */}  
730 <QxFieldSetter 741 <QxFieldSetter
731 value={record.valuesObj || []} 742 value={record.valuesObj || []}
732 - // value={[{  
733 - // type: typeTranslateItemtype(record.type) || '',  
734 - // value: record?.qxProps?.default  
735 - // }]}  
736 params={{ appCode: 'appCode', useId: true }} 743 params={{ appCode: 'appCode', useId: true }}
737 valueOptions={getValueOptions(record)} 744 valueOptions={getValueOptions(record)}
738 field={record.type} 745 field={record.type}
739 widget={typeTranslateWidget(record.type)} 746 widget={typeTranslateWidget(record.type)}
740 fieldType={typeTranslateFieIdtype(record.type)} 747 fieldType={typeTranslateFieIdtype(record.type)}
741 fieldGroupType={typeTranslateGrouptype(record.type)} 748 fieldGroupType={typeTranslateGrouptype(record.type)}
742 - isMixValue={typeTranslateFieIdtype(record.type) == 'STRING' ? true : false} 749 + isMixValue={typeTranslateFieIdtype(record.type) === 'STRING'}
743 isMultiple={false} 750 isMultiple={false}
  751 + colsTree={props.nodeItem}
  752 + showFieldOpt={!(nodeType === 'START')}
744 onChange={debounce((val) => handleField(val), 700)} 753 onChange={debounce((val) => handleField(val), 700)}
745 /> 754 />
746 </div> 755 </div>
@@ -791,19 +800,19 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -791,19 +800,19 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
791 ) : dataIndex == 'qxProps' ? ( 800 ) : dataIndex == 'qxProps' ? (
792 title == '取值范围' ? ( 801 title == '取值范围' ? (
793 qxPropsRange() 802 qxPropsRange()
794 - ) : title == '默认值' ? (  
795 - qxPropsDefault()  
796 ) : ( 803 ) : (
797 qxPropsRemark() 804 qxPropsRemark()
798 ) 805 )
799 - ) : (  
800 - // @ts-ignore  
801 - <Input  
802 - ref={inputRef}  
803 - onPressEnter={save}  
804 - onBlur={() => save(dataIndex)}  
805 - />  
806 - )} 806 + ) : dataIndex == 'mappingValues' ?
  807 + qxPropsDefault() :
  808 + (
  809 + // @ts-ignore
  810 + <Input
  811 + ref={inputRef}
  812 + onPressEnter={save}
  813 + onBlur={() => save(dataIndex)}
  814 + />
  815 + )}
807 </Form.Item> 816 </Form.Item>
808 ) : ( 817 ) : (
809 <div 818 <div
@@ -859,7 +868,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -859,7 +868,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
859 onCell: (record: any, index: any) => ({ 868 onCell: (record: any, index: any) => ({
860 index, 869 index,
861 record, 870 record,
862 - editable: record.disabled ? false : true, 871 + editable: !record.disabled,
863 dataIndex: col.dataIndex, 872 dataIndex: col.dataIndex,
864 title: col.title, 873 title: col.title,
865 // handleSave, 874 // handleSave,
@@ -1120,7 +1129,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => { @@ -1120,7 +1129,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
1120 childrenColumnName: 'child' 1129 childrenColumnName: 'child'
1121 }} 1130 }}
1122 onRow={() => onRow()} 1131 onRow={() => onRow()}
1123 - scroll={{ x: 1600 }} 1132 + scroll={{ x: 960 }}
1124 rowClassName={() => 'editable-row'} 1133 rowClassName={() => 'editable-row'}
1125 bordered 1134 bordered
1126 pagination={false} 1135 pagination={false}
@@ -120,6 +120,7 @@ export default () => { @@ -120,6 +120,7 @@ export default () => {
120 // component={QxTagsInput} 120 // component={QxTagsInput}
121 request={request} 121 request={request}
122 appFormList={appFormList} 122 appFormList={appFormList}
  123 + nodeType={'END'}
123 /> 124 />
124 </div> 125 </div>
125 ); 126 );
@@ -23,7 +23,7 @@ import { @@ -23,7 +23,7 @@ import {
23 typeTranslateItemtype, 23 typeTranslateItemtype,
24 } from './constant'; 24 } from './constant';
25 25
26 -import { cloneDeep } from 'lodash-es'; 26 +import { cloneDeep, isEmpty } from 'lodash-es';
27 import moment from 'dayjs'; 27 import moment from 'dayjs';
28 import type { ParamDesignModel } from './constant'; 28 import type { ParamDesignModel } from './constant';
29 import { uidGen } from './stringUtil'; 29 import { uidGen } from './stringUtil';
@@ -31,7 +31,12 @@ import { QxFieldSetter, QxBaseIcon } from '@qx/common'; @@ -31,7 +31,12 @@ import { QxFieldSetter, QxBaseIcon } from '@qx/common';
31 31
32 import './style.less'; 32 import './style.less';
33 33
34 -import {SubNodeIcon} from './sub-node-icon'; 34 +type ValueOptionProps = {
  35 + key: number | string;
  36 + value: string;
  37 +};
  38 +
  39 +import { SubNodeIcon } from './sub-node-icon';
35 40
36 const valueOptions = [ 41 const valueOptions = [
37 { key: 'STRING', label: '文本' }, 42 { key: 'STRING', label: '文本' },
@@ -40,8 +45,8 @@ const valueOptions = [ @@ -40,8 +45,8 @@ const valueOptions = [
40 { key: 'BOOL', label: '布尔' }, 45 { key: 'BOOL', label: '布尔' },
41 { key: 'OBJECT', label: '对象' }, 46 { key: 'OBJECT', label: '对象' },
42 { key: 'ARRAY', label: '数组' }, 47 { key: 'ARRAY', label: '数组' },
43 - { key: 'ANNEX', label: '附件' },  
44 - { key: 'PIC', label: '图片' }, 48 +/* { key: 'ANNEX', label: '附件' },
  49 + { key: 'PIC', label: '图片' },*/
45 { key: 'FORM', label: '表单' }, 50 { key: 'FORM', label: '表单' },
46 { key: 'USER', label: '人员' }, 51 { key: 'USER', label: '人员' },
47 { key: 'ORG', label: '部门' }, 52 { key: 'ORG', label: '部门' },
@@ -74,6 +79,7 @@ interface ParameterSettingProps { @@ -74,6 +79,7 @@ interface ParameterSettingProps {
74 // comHandleChange?: (val: any) => void; 79 // comHandleChange?: (val: any) => void;
75 appFormList?: any[]; // 当前应用表单list 80 appFormList?: any[]; // 当前应用表单list
76 request?: any, 81 request?: any,
  82 + nodeType?: string | 'START' | 'END';
77 } 83 }
78 84
79 export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { 85 export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
@@ -237,7 +243,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -237,7 +243,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
237 if (treeList[i].id == data.id) { 243 if (treeList[i].id == data.id) {
238 if (isProps > -1) { 244 if (isProps > -1) {
239 if (code == 'qxProps') { 245 if (code == 'qxProps') {
240 - _qxProps = { ...data.qxProps, ...value } 246 + _qxProps = value
241 } else { 247 } else {
242 _qxProps = { ...data.qxProps }; 248 _qxProps = { ...data.qxProps };
243 _qxProps[_newCode] = value; 249 _qxProps[_newCode] = value;
@@ -499,13 +505,13 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -499,13 +505,13 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
499 const onBlur = (e) => { 505 const onBlur = (e) => {
500 e.persist(); 506 e.persist();
501 const parentNode = e.currentTarget.parentNode.parentNode.parentNode; 507 const parentNode = e.currentTarget.parentNode.parentNode.parentNode;
502 - const currentNode = e.target.parentNode; 508 + // const currentNode = e.target.parentNode;
503 if (!!parentNode) { 509 if (!!parentNode) {
504 parentNode.style.backgroundColor = ''; 510 parentNode.style.backgroundColor = '';
505 } 511 }
506 - if (!!currentNode) {  
507 - currentNode.style.width = '';  
508 - } 512 + // if (!!currentNode) {
  513 + // currentNode.style.width = '';
  514 + // }
509 }; 515 };
510 516
511 const getValueOptions = (item: any): ValueOptionProps[] | undefined => { 517 const getValueOptions = (item: any): ValueOptionProps[] | undefined => {
@@ -525,11 +531,12 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -525,11 +531,12 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
525 }; 531 };
526 532
527 const changeField = (val: any, data: any) => { 533 const changeField = (val: any, data: any) => {
528 - if (!val || _.isEmpty(val)) { 534 + console.log('changeField', val)
  535 + if (!val || isEmpty(val)) {
529 return; 536 return;
530 } 537 }
531 const _newData = cloneDeep(treeData); 538 const _newData = cloneDeep(treeData);
532 - const _qxProps = {}; 539 + // const _qxProps = {};
533 540
534 const loopChangeTree = (treeList: ParamDesignModel[]) => { 541 const loopChangeTree = (treeList: ParamDesignModel[]) => {
535 for (let i = 0; i < treeList.length; i++) { 542 for (let i = 0; i < treeList.length; i++) {
@@ -539,14 +546,14 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -539,14 +546,14 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
539 item?.extVal ? item?.extVal : item?.value, 546 item?.extVal ? item?.extVal : item?.value,
540 ); 547 );
541 treeList[i].valuesObj = val; 548 treeList[i].valuesObj = val;
542 - if (!treeList[i].qxProps) {  
543 - treeList[i].qxProps = _qxProps;  
544 - }  
545 - if (data.type == 'TIME') {  
546 - treeList[i].qxProps.default = val[0]?.extVal || undefined;  
547 - } else {  
548 - treeList[i].qxProps.default = val[0].value || undefined;  
549 - } 549 + // if (!treeList[i].qxProps) {
  550 + // treeList[i].qxProps = _qxProps;
  551 + // }
  552 + // if (data.type == 'TIME') {
  553 + // treeList[i].qxProps.default = val[0]?.extVal || undefined;
  554 + // } else {
  555 + // treeList[i].qxProps.default = val[0].value || undefined;
  556 + // }
550 return; 557 return;
551 } else if (!!treeList[i]?.child?.length) { 558 } else if (!!treeList[i]?.child?.length) {
552 loopChangeTree(treeList[i].child || []); 559 loopChangeTree(treeList[i].child || []);
@@ -580,11 +587,11 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -580,11 +587,11 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
580 const renderTitle = (nodeData: any) => { 587 const renderTitle = (nodeData: any) => {
581 // const strTitle = (nodeData.title as string) || ''; 588 // const strTitle = (nodeData.title as string) || '';
582 // const strCode = nodeData.code as string; 589 // const strCode = nodeData.code as string;
583 - const valuesObj = [{  
584 - type: typeTranslateItemtype(nodeData.type),  
585 - value: nodeData?.qxProps?.default || '',  
586 - }]  
587 - nodeData.valuesObj = valuesObj 590 + // const valuesObj = [{
  591 + // type: typeTranslateItemtype(nodeData.type),
  592 + // value: nodeData.mappingValues || [],
  593 + // }]
  594 + // nodeData.valuesObj = !nodeData.valuesObj ? valuesObj : nodeData.valuesObj
588 // const index = strTitle.indexOf(searchValue); 595 // const index = strTitle.indexOf(searchValue);
589 const isShowTree = checkShowTree(nodeData); 596 const isShowTree = checkShowTree(nodeData);
590 const disabled = nodeData.disabled; 597 const disabled = nodeData.disabled;
@@ -638,6 +645,11 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -638,6 +645,11 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
638 </div> 645 </div>
639 <div className="opt-left"> 646 <div className="opt-left">
640 <Input 647 <Input
  648 + draggable={true}
  649 + onDragStart={(event) => {
  650 + event.stopPropagation();
  651 + event.preventDefault();
  652 + }}
641 // ref={inputRef} 653 // ref={inputRef}
642 key={inputKey} 654 key={inputKey}
643 style={{ width: '100%' }} 655 style={{ width: '100%' }}
@@ -657,12 +669,6 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -657,12 +669,6 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
657 <QxFieldSetter 669 <QxFieldSetter
658 disabled={disabled} 670 disabled={disabled}
659 value={nodeData.valuesObj || []} 671 value={nodeData.valuesObj || []}
660 - // value={[  
661 - // {  
662 - // type: typeTranslateItemtype(nodeData.type),  
663 - // value: nodeData?.qxProps?.default || '',  
664 - // },  
665 - // ]}  
666 params={{ appCode: 'appCode', useId: true }} 672 params={{ appCode: 'appCode', useId: true }}
667 valueOptions={getValueOptions(nodeData)} 673 valueOptions={getValueOptions(nodeData)}
668 field={nodeData.code} 674 field={nodeData.code}
@@ -674,6 +680,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -674,6 +680,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
674 isMultiple={false} 680 isMultiple={false}
675 onChange={(val) => changeField(val, nodeData)} 681 onChange={(val) => changeField(val, nodeData)}
676 popupOnBody={true} 682 popupOnBody={true}
  683 + inputDis={true}
677 /> 684 />
678 </div> 685 </div>
679 )} 686 )}
@@ -707,7 +714,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -707,7 +714,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
707 padding: '0 0 0 8px', 714 padding: '0 0 0 8px',
708 }} 715 }}
709 > 716 >
710 - <QxBaseIcon style={{fontSize: '16px'}} type={'qx-icon-plus'} /> 717 + <QxBaseIcon style={{ fontSize: '16px' }} type={'qx-icon-plus'} />
711 添加参数 718 添加参数
712 </Button> 719 </Button>
713 </Dropdown> 720 </Dropdown>
@@ -721,7 +728,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -721,7 +728,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
721 openModal(); 728 openModal();
722 }} 729 }}
723 > 730 >
724 - <QxBaseIcon style={{fontSize: '16px'}} type={'icon-app-terminal-box-line'} /> 731 + <QxBaseIcon style={{ fontSize: '16px' }} type={'icon-app-terminal-box-line'} />
725 高级设置 732 高级设置
726 </Button> 733 </Button>
727 </div> 734 </div>
@@ -779,6 +786,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -779,6 +786,7 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
779 visible={visible} 786 visible={visible}
780 request={props?.request} 787 request={props?.request}
781 appFormList={props?.appFormList} 788 appFormList={props?.appFormList}
  789 + nodeType={props?.nodeType}
782 /> 790 />
783 </div> 791 </div>
784 ); 792 );
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 flex-direction: row-reverse; 12 flex-direction: row-reverse;
13 flex-wrap: nowrap; 13 flex-wrap: nowrap;
14 justify-content: space-between; 14 justify-content: space-between;
15 - align-items: flex-end; 15 + align-items: center;
16 16
17 .header-title { 17 .header-title {
18 overflow:hidden; 18 overflow:hidden;
@@ -22,6 +22,18 @@ @@ -22,6 +22,18 @@
22 } 22 }
23 } 23 }
24 24
  25 +// .tree-list {
  26 +// // padding-top: 6px;
  27 +// // display: inline-block;
  28 +// opacity: 0.5 ;
  29 +// }
  30 +
  31 +.ant-tree-treenode-draggable .ant-tree-draggable-icon {
  32 + padding-top: 6px;
  33 + // display: none;
  34 + opacity: 1 !important;
  35 +}
  36 +
25 .tree-wrapper { 37 .tree-wrapper {
26 margin-top: 20px; 38 margin-top: 20px;
27 39
@@ -31,6 +43,12 @@ @@ -31,6 +43,12 @@
31 43
32 &:hover { 44 &:hover {
33 background-color: @N3; 45 background-color: @N3;
  46 +
  47 + .ant-tree-treenode-draggable .ant-tree-draggable-icon {
  48 + padding-top: 6px;
  49 + // display: none;
  50 + opacity: 1 !important;
  51 + }
34 } 52 }
35 } 53 }
36 54
@@ -183,62 +201,62 @@ @@ -183,62 +201,62 @@
183 // width: 85%; 201 // width: 85%;
184 // } 202 // }
185 203
186 -@keyframes title-btn-del {  
187 - 0% {  
188 - opacity: 0;  
189 - } 204 +// @keyframes title-btn-del {
  205 +// 0% {
  206 +// opacity: 0;
  207 +// }
190 208
191 - 20% {  
192 - opacity: 0.3;  
193 - } 209 +// 20% {
  210 +// opacity: 0.3;
  211 +// }
194 212
195 - 50% {  
196 - opacity: 0.4;  
197 - } 213 +// 50% {
  214 +// opacity: 0.4;
  215 +// }
198 216
199 - 70% {  
200 - opacity: 0.6;  
201 - } 217 +// 70% {
  218 +// opacity: 0.6;
  219 +// }
202 220
203 - 100% {  
204 - opacity: 0.8;  
205 - }  
206 -} 221 +// 100% {
  222 +// opacity: 0.8;
  223 +// }
  224 +// }
207 225
208 -@keyframes title-btn {  
209 - 0% {  
210 - opacity: 0;  
211 - } 226 +// @keyframes title-btn {
  227 +// 0% {
  228 +// opacity: 0;
  229 +// }
212 230
213 - 20% {  
214 - opacity: 0.3;  
215 - } 231 +// 20% {
  232 +// opacity: 0.3;
  233 +// }
216 234
217 - 50% {  
218 - opacity: 0.4;  
219 - } 235 +// 50% {
  236 +// opacity: 0.4;
  237 +// }
220 238
221 - 70% {  
222 - opacity: 0.6;  
223 - } 239 +// 70% {
  240 +// opacity: 0.6;
  241 +// }
224 242
225 - 100% {  
226 - opacity: 0.8;  
227 - }  
228 -} 243 +// 100% {
  244 +// opacity: 0.8;
  245 +// }
  246 +// }
229 247
230 .ant-tree-node-content-wrapper :hover .title-btn-del { 248 .ant-tree-node-content-wrapper :hover .title-btn-del {
231 display: block; 249 display: block;
232 - animation-name: title-btn-del;  
233 - animation-duration: 2s;  
234 - animation-iteration-count: 1; 250 + // animation-name: title-btn-del;
  251 + // animation-duration: 2s;
  252 + // animation-iteration-count: 1;
235 } 253 }
236 254
237 .ant-tree-node-content-wrapper :hover .title-btn { 255 .ant-tree-node-content-wrapper :hover .title-btn {
238 display: block; 256 display: block;
239 - animation-name: title-btn-del;  
240 - animation-duration: 2s;  
241 - animation-iteration-count: 1; 257 + // animation-name: title-btn-del;
  258 + // animation-duration: 2s;
  259 + // animation-iteration-count: 1;
242 } 260 }
243 261
244 .btn-high-del { 262 .btn-high-del {