mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Workflow application node parameter saving cannot be reflected back (#3019)
This commit is contained in:
parent
59ee0c1270
commit
704077d066
|
|
@ -238,49 +238,42 @@ const update_field = () => {
|
|||
const new_user_input_field_list = cloneDeep(
|
||||
ok.data.work_flow.nodes[0].properties.user_input_field_list
|
||||
)
|
||||
const merge_api_input_field_list =
|
||||
new_api_input_field_list ||
|
||||
[].map((item: any) => {
|
||||
const find_field = old_api_input_field_list.find(
|
||||
(old_item: any) => old_item.variable == item.variable
|
||||
)
|
||||
if (find_field) {
|
||||
return {
|
||||
...item,
|
||||
value: find_field.value,
|
||||
label:
|
||||
typeof item.label === 'object' && item.label != null
|
||||
? item.label.label
|
||||
: item.label
|
||||
}
|
||||
} else {
|
||||
return item
|
||||
|
||||
const merge_api_input_field_list = (new_api_input_field_list || []).map((item: any) => {
|
||||
const find_field = old_api_input_field_list.find(
|
||||
(old_item: any) => old_item.variable == item.variable
|
||||
)
|
||||
if (find_field) {
|
||||
return {
|
||||
...item,
|
||||
value: find_field.value,
|
||||
label:
|
||||
typeof item.label === 'object' && item.label != null ? item.label.label : item.label
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
set(
|
||||
props.nodeModel.properties.node_data,
|
||||
'api_input_field_list',
|
||||
merge_api_input_field_list
|
||||
)
|
||||
const merge_user_input_field_list =
|
||||
new_user_input_field_list ||
|
||||
[].map((item: any) => {
|
||||
const find_field = old_user_input_field_list.find(
|
||||
(old_item: any) => old_item.field == item.field
|
||||
)
|
||||
if (find_field) {
|
||||
return {
|
||||
...item,
|
||||
value: find_field.value,
|
||||
label:
|
||||
typeof item.label === 'object' && item.label != null
|
||||
? item.label.label
|
||||
: item.label
|
||||
}
|
||||
} else {
|
||||
return item
|
||||
const merge_user_input_field_list = (new_user_input_field_list || []).map((item: any) => {
|
||||
const find_field = old_user_input_field_list.find(
|
||||
(old_item: any) => old_item.field == item.field
|
||||
)
|
||||
if (find_field) {
|
||||
return {
|
||||
...item,
|
||||
value: find_field.value,
|
||||
label:
|
||||
typeof item.label === 'object' && item.label != null ? item.label.label : item.label
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
set(
|
||||
props.nodeModel.properties.node_data,
|
||||
'user_input_field_list',
|
||||
|
|
|
|||
Loading…
Reference in New Issue