fix: [Application] An application that adds interface parameters, clicks on the application list page to initiate a conversation, but does not carry interface parameters (#4122)
parent
c56742f9b3
commit
8d4bad55f2
|
|
@ -529,35 +529,39 @@ const search_type_change = () => {
|
||||||
search_form.value = { name: '', create_user: '' }
|
search_form.value = { name: '', create_user: '' }
|
||||||
}
|
}
|
||||||
|
|
||||||
const apiInputParams = ref([])
|
|
||||||
|
|
||||||
function toChat(row: any) {
|
function toChat(row: any) {
|
||||||
row?.work_flow?.nodes
|
const api =
|
||||||
?.filter((v: any) => v.id === 'base-node')
|
row.type == 'WORK_FLOW'
|
||||||
.map((v: any) => {
|
? (id: string) => ApplicationApi.getApplicationDetail(id)
|
||||||
apiInputParams.value = v.properties.api_input_field_list
|
: (id: string) => Promise.resolve({ data: row })
|
||||||
? v.properties.api_input_field_list.map((v: any) => {
|
api(row.id).then((ok) => {
|
||||||
return {
|
let aips = ok.data?.work_flow?.nodes
|
||||||
name: v.variable,
|
?.filter((v: any) => v.id === 'base-node')
|
||||||
value: v.default_value,
|
.map((v: any) => {
|
||||||
}
|
return v.properties.api_input_field_list
|
||||||
})
|
? v.properties.api_input_field_list.map((v: any) => {
|
||||||
: v.properties.input_field_list
|
return {
|
||||||
? v.properties.input_field_list
|
name: v.variable,
|
||||||
.filter((v: any) => v.assignment_method === 'api_input')
|
value: v.default_value,
|
||||||
.map((v: any) => {
|
}
|
||||||
return {
|
})
|
||||||
name: v.variable,
|
: v.properties.input_field_list
|
||||||
value: v.default_value,
|
? v.properties.input_field_list
|
||||||
}
|
.filter((v: any) => v.assignment_method === 'api_input')
|
||||||
})
|
.map((v: any) => {
|
||||||
: []
|
return {
|
||||||
|
name: v.variable,
|
||||||
|
value: v.default_value,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
: []
|
||||||
|
})
|
||||||
|
.reduce((x: Array<any>, y: Array<any>) => [...x, ...y])
|
||||||
|
aips = aips ? aips : []
|
||||||
|
const apiParams = mapToUrlParams(aips) ? '?' + mapToUrlParams(aips) : ''
|
||||||
|
ApplicationApi.getAccessToken(row.id, loading).then((res: any) => {
|
||||||
|
window.open(application.location + res?.data?.access_token + apiParams)
|
||||||
})
|
})
|
||||||
const apiParams = mapToUrlParams(apiInputParams.value)
|
|
||||||
? '?' + mapToUrlParams(apiInputParams.value)
|
|
||||||
: ''
|
|
||||||
ApplicationApi.getAccessToken(row.id, loading).then((res: any) => {
|
|
||||||
window.open(application.location + res?.data?.access_token + apiParams)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue