From ce78192016578ad4b41ccfc2d0ddf112110cb416 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Tue, 10 Dec 2024 11:01:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=94=E7=94=A8=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E4=BB=8E20=E6=94=B9=E4=B8=BA30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/application/index.vue | 32 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/ui/src/views/application/index.vue b/ui/src/views/application/index.vue index 3b2df8f21..777d198e2 100644 --- a/ui/src/views/application/index.vue +++ b/ui/src/views/application/index.vue @@ -171,7 +171,7 @@ const applicationList = ref([]) const paginationConfig = reactive({ current_page: 1, - page_size: 20, + page_size: 30, total: 0 }) interface UserOption { @@ -248,18 +248,18 @@ function mapToUrlParams(map: any[]) { } function getAccessToken(id: string) { - applicationList.value.filter((app)=>app.id === id)[0]?.work_flow?.nodes - ?.filter((v: any) => v.id === 'base-node') - .map((v: any) => { - apiInputParams.value = v.properties.api_input_field_list - ? v.properties.api_input_field_list - .map((v: any) => { - return { - name: v.variable, - value: v.default_value - } - }) - : v.properties.input_field_list + applicationList.value + .filter((app) => app.id === id)[0] + ?.work_flow?.nodes?.filter((v: any) => v.id === 'base-node') + .map((v: any) => { + apiInputParams.value = v.properties.api_input_field_list + ? v.properties.api_input_field_list.map((v: any) => { + return { + name: v.variable, + value: v.default_value + } + }) + : v.properties.input_field_list ? v.properties.input_field_list .filter((v: any) => v.assignment_method === 'api_input') .map((v: any) => { @@ -269,9 +269,11 @@ function getAccessToken(id: string) { } }) : [] - }) + }) - const apiParams = mapToUrlParams(apiInputParams.value) ? '?' + mapToUrlParams(apiInputParams.value) : '' + const apiParams = mapToUrlParams(apiInputParams.value) + ? '?' + mapToUrlParams(apiInputParams.value) + : '' application.asyncGetAccessToken(id, loading).then((res: any) => { window.open(application.location + res?.data?.access_token + apiParams) })