From 6329bdc20dae22398bd29bf7873d29156835e4e0 Mon Sep 17 00:00:00 2001 From: ww664853070 Date: Fri, 4 Aug 2023 14:11:29 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E7=9F=AD=E4=BF=A1=E6=8F=90=E9=86=92?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/anspectionNotificationPhone.js | 2 +- .../src/sections/fillion/components/patrolTable.js | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/api/app/lib/controllers/data/anspectionNotificationPhone.js b/api/app/lib/controllers/data/anspectionNotificationPhone.js index 2b965152..079f37bc 100644 --- a/api/app/lib/controllers/data/anspectionNotificationPhone.js +++ b/api/app/lib/controllers/data/anspectionNotificationPhone.js @@ -36,7 +36,7 @@ async function addAnspectionNotificationPhone(ctx) { }) }) await models.AnspectionNotificationPhone.bulkCreate(dataList); - await transaction.commit(); + // await transaction.commit(); ctx.status = 204 } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js index 69cd3670..be4f401b 100644 --- a/web/client/src/sections/fillion/components/patrolTable.js +++ b/web/client/src/sections/fillion/components/patrolTable.js @@ -713,6 +713,7 @@ const PatrolTable = (props) => { const isPatrol = !isRoad && !isAnomaly const reportType = isRoad ? 'road' : isAnomaly ? 'anomaly' : 'patrol'; const [isModalOpen, setIsModalOpen] = useState(false); + const [phoneList, setPhoneList] = useState([]); const [form] = Form.useForm(); useEffect(() => { queryData(); @@ -823,6 +824,7 @@ const PatrolTable = (props) => { }) } console.log(phoneList, '789789789789'); + setPhoneList(phoneList) }, [anspectionNotificationPhoneList]) const showModal = () => { @@ -924,17 +926,9 @@ const PatrolTable = (props) => {
- { - // if (!names || names.length < 1) { - // return Promise.reject(new Error('At least 2 passengers')); - // } - // }, - // }, - // ]} + initialValue={phoneList} > {(fields, { add, remove }, { errors }) => ( <>