From c72abd29ecacdecf23820f8942424ffc1a7ef563 Mon Sep 17 00:00:00 2001 From: whyour Date: Wed, 9 Nov 2022 20:43:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=A7=86=E5=9B=BE=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E6=9D=A1=E4=BB=B6=E5=A2=9E=E5=8A=A0=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/crontab/index.less | 6 ++ src/pages/crontab/viewCreateModal.tsx | 130 ++++++++++++++++---------- 2 files changed, 88 insertions(+), 48 deletions(-) diff --git a/src/pages/crontab/index.less b/src/pages/crontab/index.less index 77a979ca..37d84d8b 100644 --- a/src/pages/crontab/index.less +++ b/src/pages/crontab/index.less @@ -176,3 +176,9 @@ tr.drop-over-upward td { padding-top: 10px; } } + +.view-filters-container.active { + .filter-item > div > .ant-form-item-control { + padding-left: 40px; + } +} diff --git a/src/pages/crontab/viewCreateModal.tsx b/src/pages/crontab/viewCreateModal.tsx index 38a2fa4e..f75ec394 100644 --- a/src/pages/crontab/viewCreateModal.tsx +++ b/src/pages/crontab/viewCreateModal.tsx @@ -164,57 +164,91 @@ const ViewCreateModal = ({ {(fields, { add, remove }) => ( - <> - {fields.map(({ key, name, ...restField }, index) => ( - - - 1 ? 'active' : ''}`}> + { + fields.length > 1 && ( +
+ +
+ ) + } +
+ {fields.map(({ key, name, ...restField }, index) => ( + + + + {propertyElement(PROPERTIES, { width: 120 })} + + + {operationElement} + + + {['In', 'Nin'].includes( + form.getFieldValue(['filters', index, 'operation']), + ) ? ( + statusElement + ) : ( + + )} + + {index !== 0 && ( + remove(name)} /> )} - - {index !== 0 && ( - remove(name)} /> - )} - + + + ))} + + add({ property: 'command', operation: 'Reg' })} + > + + 新增筛选条件 + - ))} - - add({ property: 'command', operation: 'Reg' })} - > - - 新增筛选条件 - - - +
+ )}