From e6214053825de88a9d76682c3e2071c569181403 Mon Sep 17 00:00:00 2001 From: xingyongchun Date: Thu, 28 Jul 2022 21:59:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E6=98=AF=E5=90=A6=E5=B7=B2?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fillion/components/bridgeTable.js | 4 +- .../fillion/components/enforceTable.js | 2 +- .../components/highways/highwaysdata.js | 2 +- .../fillion/components/highwaysTable.js | 2 +- .../fillion/components/infor/details.js | 22 ++--- .../sections/fillion/components/inforTable.js | 2 +- .../fillion/components/operationalTable.js | 8 +- .../fillion/components/project/project.js | 90 +++++++++---------- .../fillion/components/publicTable.js | 4 +- .../fillion/components/transportationTable.js | 9 +- 10 files changed, 72 insertions(+), 73 deletions(-) diff --git a/web/client/src/sections/fillion/components/bridgeTable.js b/web/client/src/sections/fillion/components/bridgeTable.js index cf2e53a8..c6761572 100644 --- a/web/client/src/sections/fillion/components/bridgeTable.js +++ b/web/client/src/sections/fillion/components/bridgeTable.js @@ -1507,7 +1507,7 @@ const BrideTable = (props) => { return
@@ -1691,7 +1691,7 @@ const BrideTable = (props) => { return
{ deldatas(record.id) }}> diff --git a/web/client/src/sections/fillion/components/enforceTable.js b/web/client/src/sections/fillion/components/enforceTable.js index 1f239e22..cbeca915 100644 --- a/web/client/src/sections/fillion/components/enforceTable.js +++ b/web/client/src/sections/fillion/components/enforceTable.js @@ -1508,7 +1508,7 @@ const openModal = (type, record) => { return
diff --git a/web/client/src/sections/fillion/components/highways/highwaysdata.js b/web/client/src/sections/fillion/components/highways/highwaysdata.js index 854781da..c5bc3851 100644 --- a/web/client/src/sections/fillion/components/highways/highwaysdata.js +++ b/web/client/src/sections/fillion/components/highways/highwaysdata.js @@ -47,7 +47,7 @@ const HightModal = (props) => { }} initialValues={recortd} > - {typecard == '111' ? + {typecard == 'compile' ? { return
diff --git a/web/client/src/sections/fillion/components/infor/details.js b/web/client/src/sections/fillion/components/infor/details.js index 303e1dd2..4df3a38c 100644 --- a/web/client/src/sections/fillion/components/infor/details.js +++ b/web/client/src/sections/fillion/components/infor/details.js @@ -152,12 +152,12 @@ const UserModal = (props) => { if (Object.values(values).length > 0) { if (rewkeys === 'transportation') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' } dispatch(putRoadway(query)).then((res) => { - return true - }) + }) + return true } else { setDelet(values) const query = { ...values, level: whichofits } @@ -169,7 +169,7 @@ const UserModal = (props) => { } if (rewkeys === 'bridge') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, bridgeId: records?.[0]?.value || '' } dispatch(putBridge(query)).then((res) => { @@ -186,7 +186,7 @@ const UserModal = (props) => { } } if (rewkeys === 'weihuo') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, vehicleId: records?.[0]?.value || '', type: '危货' } @@ -205,7 +205,7 @@ const UserModal = (props) => { } } if (rewkeys === 'chuzu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, vehicleId: records?.[0]?.value || '', type: '出租车' } @@ -224,7 +224,7 @@ const UserModal = (props) => { } } if (rewkeys === 'yehu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, businessId: records?.[0]?.value, type: values.type } dispatch(putHouseholds(query)).then((res) => { @@ -240,7 +240,7 @@ const UserModal = (props) => { return true } } if (rewkeys === 'xianlu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, lineId: records?.[0]?.value || '' } dispatch(putCircuit(query)).then((res) => { @@ -257,7 +257,7 @@ const UserModal = (props) => { } } if (rewkeys === 'cheliang') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, carId: records?.[0]?.value || '' } dispatch(putVehicle(query)).then((res) => { @@ -274,7 +274,7 @@ const UserModal = (props) => { } } if (rewkeys === 'zhichao') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, overspeedId: records?.[0]?.value || '' } dispatch(putPurchase(query)).then((res) => { @@ -297,7 +297,7 @@ const UserModal = (props) => { }} initialValues={recortd} > - {typecard == '111' ? + {typecard == 'compile' ? { return
diff --git a/web/client/src/sections/fillion/components/operationalTable.js b/web/client/src/sections/fillion/components/operationalTable.js index 5e88d600..05ec484b 100644 --- a/web/client/src/sections/fillion/components/operationalTable.js +++ b/web/client/src/sections/fillion/components/operationalTable.js @@ -110,7 +110,7 @@ const OperaTionalTable = (props) => { return
@@ -697,7 +697,7 @@ const OperaTionalTable = (props) => { return
{ deldata(record.id) }}> @@ -1330,7 +1330,7 @@ const OperaTionalTable = (props) => { return
{ deldata(record.id) }}> @@ -1800,7 +1800,7 @@ const OperaTionalTable = (props) => { return
{ deldatas(record.id) }}> diff --git a/web/client/src/sections/fillion/components/project/project.js b/web/client/src/sections/fillion/components/project/project.js index fc292af8..9e6f852a 100644 --- a/web/client/src/sections/fillion/components/project/project.js +++ b/web/client/src/sections/fillion/components/project/project.js @@ -1,9 +1,9 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { Form, Spin, Table } from 'antd'; -import { DrawerForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form'; +import { DrawerForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form'; import { putProject } from "../../actions/infor" -import _ from 'lodash' +import _ from 'lodash' const data = { "entryName": "项目名称", @@ -32,7 +32,7 @@ const ProjectModal = (props) => { setNewlys(array?.splice(0, 2)) setNewlysay(array) // console.log() - + } if (rewkeys === 'bridge') { _.forIn(data, function (value, key) { @@ -41,7 +41,7 @@ const ProjectModal = (props) => { setNewlys(array?.splice(0, 2)) setNewlysay(array) // console.log() - + } }, []) useEffect(() => { @@ -51,7 +51,7 @@ const ProjectModal = (props) => { arr.push({ value: value, type: key }) }); setRecordsay(arr.splice(1, 2)) - + setRecords(arr) } if (rewkeys === 'bridge') { @@ -79,68 +79,68 @@ const ProjectModal = (props) => { onFinish={(values) => { console.log(values) if (rewkeys === 'road') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) - const query = { ...values, type:rewkeys,projectId:records?.[0]?.value || '' } + const query = { ...values, type: rewkeys, projectId: records?.[0]?.value || '', done: values.done === 'true' ? true : false } dispatch(putProject(query)).then((res) => { - + }) return true } else { setDelet(values) - const query = { ...values, type:rewkeys } + const query = { ...values, type: rewkeys,done: values.done === 'true' ? true : false } dispatch(putProject(query)).then((res) => { - + }) return true } } if (rewkeys === 'bridge') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) - const query = { ...values, type:rewkeys,projectId:records?.[0]?.value || '' } + const query = { ...values, type: rewkeys, projectId: records?.[0]?.value || '',done: values.done === 'true' ? true : false } dispatch(putProject(query)).then((res) => { - + }) return true } else { setDelet(values) - const query = { ...values, type:rewkeys } + const query = { ...values, type: rewkeys,done: values.done === 'true' ? true : false } dispatch(putProject(query)).then((res) => { - + }) return true } } }} - initialValues={recortd} + initialValues={{ ...recortd, done: recortd.done ? 'true' : 'false' }} > - {typecard == '111' ? + {typecard == 'compile' ? { name={newlys?.[0]?.type} width="md" label={newlys?.[0]?.name} - + placeholder="请输入名称" - // value={recordssy?.[0]?.value} - // rules={[{ required: true, message: "必填" }]} + // value={recordssy?.[0]?.value} + // rules={[{ required: true, message: "必填" }]} /> - [ + { + value: 'true', + label: '是', + }, { + value: 'false', + label: '否', + }, + ]} + + name='done' + label='是否已完成' + rules={[{ required: true, message: "必填" }]} /> {newlysay?.map((item, index) => { return })} diff --git a/web/client/src/sections/fillion/components/publicTable.js b/web/client/src/sections/fillion/components/publicTable.js index 23d5b009..66510447 100644 --- a/web/client/src/sections/fillion/components/publicTable.js +++ b/web/client/src/sections/fillion/components/publicTable.js @@ -408,7 +408,7 @@ const PublicTable = (props) => { return
{ deldata(record.id) }}> @@ -1103,7 +1103,7 @@ const PublicTable = (props) => { return
{ deldatas(record.id) }}> diff --git a/web/client/src/sections/fillion/components/transportationTable.js b/web/client/src/sections/fillion/components/transportationTable.js index daca6ac0..53cba191 100644 --- a/web/client/src/sections/fillion/components/transportationTable.js +++ b/web/client/src/sections/fillion/components/transportationTable.js @@ -1178,7 +1178,7 @@ const TransporTationTable = (props) => { onClick={() => { setRecortd(record) openModal('edit', record) - setTypecard('111') + setTypecard('compile') }} >编辑 { deldata(record.id) }}> @@ -3832,7 +3832,6 @@ const TransporTationTable = (props) => { setRowSelected([]); const res = await dispatch(getProject(query)); setCounts(res.payload.data) - console.log(res) return { ...res, total: res.payload.data ? res.payload.data.count : 0