From 6f72351fd0efd97f52d17d35eaeed3e5cb644729 Mon Sep 17 00:00:00 2001 From: liuxiran Date: Tue, 5 Jan 2021 10:51:17 +0800 Subject: [PATCH 1/3] fix(fe): route search with status --- web/src/pages/Route/List.tsx | 12 ++++++++++++ web/src/pages/Route/service.ts | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/web/src/pages/Route/List.tsx b/web/src/pages/Route/List.tsx index 4a6c8a63dc..8e96434cfe 100644 --- a/web/src/pages/Route/List.tsx +++ b/web/src/pages/Route/List.tsx @@ -192,6 +192,18 @@ const Page: React.FC = () => { )} ), + renderFormItem: (_, { type }) => { + if (type === 'form') { + return null; + } + + return ( + + ); + }, }, { title: formatMessage({ id: 'component.global.updateTime' }), diff --git a/web/src/pages/Route/service.ts b/web/src/pages/Route/service.ts index f67283f406..fedf42fef8 100644 --- a/web/src/pages/Route/service.ts +++ b/web/src/pages/Route/service.ts @@ -40,7 +40,8 @@ export const fetchItem = (rid: number) => request(`/routes/${rid}`).then((data) => transformRouteData(data.data)); export const fetchList = ({ current = 1, pageSize = 10, ...res }) => { - const { labels, API_VERSION } = res; + const { labels, API_VERSION, status } = res; + console.log(res); return request>>('/routes', { params: { name: res.name, @@ -48,6 +49,7 @@ export const fetchList = ({ current = 1, pageSize = 10, ...res }) => { label: (labels || []).concat(API_VERSION).join(','), page: current, page_size: pageSize, + status }, }).then(({ data }) => { return { From 0b58b546f30478d521178b76ea10b331cd200b1f Mon Sep 17 00:00:00 2001 From: liuxiran Date: Tue, 5 Jan 2021 11:18:53 +0800 Subject: [PATCH 2/3] fix: version and status select box allowclear --- web/src/pages/Route/List.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/Route/List.tsx b/web/src/pages/Route/List.tsx index 8e96434cfe..466fdd6c7c 100644 --- a/web/src/pages/Route/List.tsx +++ b/web/src/pages/Route/List.tsx @@ -161,7 +161,7 @@ const Page: React.FC = () => { } return ( - {Object.keys(labelList) .filter((item) => item === 'API_VERSION') .map((key) => { @@ -198,7 +198,7 @@ const Page: React.FC = () => { } return ( - From 8a6919eff3df97d526419859085cb36f8fd0b716 Mon Sep 17 00:00:00 2001 From: liuxiran Date: Tue, 5 Jan 2021 11:44:23 +0800 Subject: [PATCH 3/3] fix: remove console --- web/src/pages/Route/service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/web/src/pages/Route/service.ts b/web/src/pages/Route/service.ts index fedf42fef8..c23eede3c7 100644 --- a/web/src/pages/Route/service.ts +++ b/web/src/pages/Route/service.ts @@ -41,7 +41,6 @@ export const fetchItem = (rid: number) => export const fetchList = ({ current = 1, pageSize = 10, ...res }) => { const { labels, API_VERSION, status } = res; - console.log(res); return request>>('/routes', { params: { name: res.name,