From 48ff50810502dd5104ef646e7108fcb52213461d Mon Sep 17 00:00:00 2001 From: xingyongchun Date: Thu, 28 Jul 2022 12:40:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fillion/components/bridgeTable.js | 4 +- .../components/highways/highwaysdata.js | 13 ++- .../fillion/components/highwaysTable.js | 18 ++-- .../fillion/components/infor/details.js | 42 +++++---- .../sections/fillion/components/inforTable.js | 8 +- .../fillion/components/operationalTable.js | 85 ++++++++++--------- .../fillion/components/project/project.js | 20 +++-- .../fillion/components/publicTable.js | 3 +- .../fillion/components/transportationTable.js | 15 ++-- 9 files changed, 116 insertions(+), 92 deletions(-) diff --git a/web/client/src/sections/fillion/components/bridgeTable.js b/web/client/src/sections/fillion/components/bridgeTable.js index a1c3eded..d8101bda 100644 --- a/web/client/src/sections/fillion/components/bridgeTable.js +++ b/web/client/src/sections/fillion/components/bridgeTable.js @@ -26,7 +26,7 @@ const BrideTable = (props) => { const [delet, setDelet] = useState() const ref = useRef() - useEffect(() => { ref.current.reload() }, [modalVisible, modalVisibleyilan,whichofits,delet]) + useEffect(() => { ref.current.reload() }, [whichofits,delet]) const columns = { tab1: [ { @@ -1861,6 +1861,7 @@ const BrideTable = (props) => { rewkeys={'bridge'} data={date} recortd={recortd} + setDelet={setDelet} // sitename={sitename} setRecortd={setRecortd} /> : ''} @@ -1870,6 +1871,7 @@ const BrideTable = (props) => { modalRecord={modalRecord} typecard={typecard} rewkeys={'bridge'} + setDelet={setDelet} recortd={recortd} setRecortd={setRecortd} /> : ''} diff --git a/web/client/src/sections/fillion/components/highways/highwaysdata.js b/web/client/src/sections/fillion/components/highways/highwaysdata.js index ad27ef14..0ced59c2 100644 --- a/web/client/src/sections/fillion/components/highways/highwaysdata.js +++ b/web/client/src/sections/fillion/components/highways/highwaysdata.js @@ -6,7 +6,7 @@ import { putOperaTional,putHighways } from "../../actions/infor" import { _ } from 'lodash' const HightModal = (props) => { - const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd } = props + const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd,setDelet } = props const [success,setSuccess]=useState() useEffect(() => { @@ -25,8 +25,7 @@ const HightModal = (props) => { onVisibleChange={onVisibleChange} onFinish={(values) => { if (rewkeys === 'passenger') { - - console.log(values) + setDelet(values) const query = { ...values, id:recortd?.id } dispatch(putOperaTional(query)).then((res) => { setSuccess(res.success) @@ -35,8 +34,8 @@ const HightModal = (props) => { } if (rewkeys === 'highways') { + setDelet(values) - console.log(values) const query = { ...values, id:recortd?.id } dispatch(putHighways(query)).then((res) => { setSuccess(res.success) @@ -55,7 +54,7 @@ const HightModal = (props) => { name='name' width="md" label='类型' - tooltip="最长为 24 位" + placeholder="请输入名称" // value={recortd?.[0]?.value} disabled @@ -65,7 +64,7 @@ const HightModal = (props) => { name='count' width="md" label='数量' - tooltip="最长为 24 位" + placeholder="请输入数量" rules={[ {required: true, @@ -86,7 +85,7 @@ const HightModal = (props) => { name={newlys?.[0]?.type} width="md" label={newlys?.[0]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" /> */} } diff --git a/web/client/src/sections/fillion/components/highwaysTable.js b/web/client/src/sections/fillion/components/highwaysTable.js index ce783267..f27d6124 100644 --- a/web/client/src/sections/fillion/components/highwaysTable.js +++ b/web/client/src/sections/fillion/components/highwaysTable.js @@ -16,9 +16,10 @@ const HigwaysTable = (props) => { const [typecard, setTypecard] = useState(); const [recortd, setRecortd] = useState() const [sitename, setSitename] = useState()//桥梁名称 + const [delet, setDelet] = useState() const ref = useRef() - useEffect(() => { ref.current.reload() }, [ modalVisibleyilan]) + useEffect(() => { ref.current.reload() }, [ delet]) //打开弹窗 const hightModal = (type, record) => { setModalVisibleyilan(true); @@ -106,18 +107,18 @@ const exports = (ids, counts) => { actionRef={ref} scroll={{ x: 800 }} options={false} - ref={c => { finishedProductTable = c; }} + // ref={c => { finishedProductTable = c; }} style={{ width: "100% ", overflow: "auto", height: '760px' }} rowKey='id' onReset={(v) => { setSitename('') }} - rowSelection={{ - selectedRowKeys: rowSelected, - onChange: (selectedRowKeys) => { - setRowSelected(selectedRowKeys); - }, - }} + // rowSelection={{ + // selectedRowKeys: rowSelected, + // onChange: (selectedRowKeys) => { + // setRowSelected(selectedRowKeys); + // }, + // }} columns={columns} dataSource={counts || []} @@ -143,6 +144,7 @@ const exports = (ids, counts) => { rewkeys={'highways'} recortd={recortd} setRecortd={setRecortd} + setDelet={setDelet} /> : ''} ) diff --git a/web/client/src/sections/fillion/components/infor/details.js b/web/client/src/sections/fillion/components/infor/details.js index 71b000ec..26e32560 100644 --- a/web/client/src/sections/fillion/components/infor/details.js +++ b/web/client/src/sections/fillion/components/infor/details.js @@ -6,7 +6,7 @@ import { putRoadway, putSpecificVehicle, putHouseholds, putCircuit, putVehicle, import { putBridge } from "../../actions/infor" import _ from 'lodash' const UserModal = (props) => { - const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor } = props + const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor,setDelet,whichofits } = props const [newlys, setNewlys] = useState() //必填数据 const [newlysay, setNewlysay] = useState() //处理hou const [records, setRecords] = useState()//处理 @@ -148,32 +148,37 @@ const UserModal = (props) => { visible={visible} onVisibleChange={onVisibleChange} onFinish={(values) => { - console.log(values) if (Object.values(values).length > 0) { if (rewkeys === 'transportation') { - if (typecard == '111') { - const query = { ...values, level: sitename, roadId: records?.[0]?.value || '' } + + if (typecard == '111') { + setDelet(values) + const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' } dispatch(putRoadway(query)).then((res) => { setSuccess(res.success) + }) return true } else { - const query = { ...values, level: sitename } + setDelet(values) + const query = { ...values, level: whichofits } dispatch(putRoadway(query)).then((res) => { setSuccess(res.success) + }) return true } } if (rewkeys === 'bridge') { if (typecard == '111') { - console.log(values) + setDelet(values) const query = { ...values, roadId: records?.[0]?.value || '' } dispatch(putBridge(query)).then((res) => { setSuccess(res.success) }) return true } else { + setDelet(values) const query = { ...values } dispatch(putBridge(query)).then((res) => { setSuccess(res.success) @@ -183,13 +188,14 @@ const UserModal = (props) => { } if (rewkeys === 'weihuo' || rewkeys === 'chuzu') { if (typecard == '111') { - console.log(values) + setDelet(values) const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys === 'chuzu' ? '出租车' : '危货' } dispatch(putSpecificVehicle(query)).then((res) => { setSuccess(res.success) }) return true } else { + setDelet(values) const query = { ...values, type: rewkeys } dispatch(putSpecificVehicle(query)).then((res) => { setSuccess(res.success) @@ -199,13 +205,14 @@ const UserModal = (props) => { } if (rewkeys === 'yehu') { if (typecard == '111') { - console.log(values) + setDelet(values) const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' } dispatch(putHouseholds(query)).then((res) => { setSuccess(res.success) }) return true } else { + setDelet(values) const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' } dispatch(putHouseholds(query)).then((res) => { setSuccess(res.success) @@ -214,13 +221,14 @@ const UserModal = (props) => { } } if (rewkeys === 'xianlu') { if (typecard == '111') { - console.log(values) + setDelet(values) const query = { ...values, lineId: records?.[0]?.value || '' } dispatch(putCircuit(query)).then((res) => { setSuccess(res.success) }) return true } else { + setDelet(values) const query = { ...values } dispatch(putCircuit(query)).then((res) => { setSuccess(res.success) @@ -230,13 +238,14 @@ const UserModal = (props) => { } if (rewkeys === 'cheliang') { if (typecard == '111') { - console.log(values) + setDelet(values) const query = { ...values, carId: records?.[0]?.value || '' } dispatch(putVehicle(query)).then((res) => { setSuccess(res.success) }) return true } else { + setDelet(values) const query = { ...values } dispatch(putVehicle(query)).then((res) => { setSuccess(res.success) @@ -246,7 +255,7 @@ const UserModal = (props) => { } if (rewkeys === 'zhichao') { if (typecard == '111') { - console.log(values) + setDelet(values) const query = { ...values, overspeedId: records?.[0]?.value || '' } dispatch(putPurchase(query)).then((res) => { setSuccess(res.success) @@ -254,6 +263,7 @@ const UserModal = (props) => { }) return true } else { + setDelet(values) const query = { ...values } dispatch(putPurchase(query)).then((res) => { setSuccess(res.success) @@ -274,7 +284,7 @@ const UserModal = (props) => { name={newlys?.[0]?.type} width="md" label={newlys?.[0]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" value={recordsay?.[0]?.value} // rules={[{ required: true, message: "必填" }]} @@ -282,7 +292,7 @@ const UserModal = (props) => { name={newlys?.[1]?.type} width="md" label={newlys?.[1]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" value={recordsay?.[1]?.value} // rules={[{ required: true, message: "必填" }]} @@ -316,7 +326,7 @@ const UserModal = (props) => { name={newlys?.[0]?.type} width="md" label={newlys?.[0]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" // value={recordssy?.[0]?.value} // rules={[{ required: true, message: "必填" }]} @@ -324,7 +334,7 @@ const UserModal = (props) => { name={newlys?.[1]?.type} width="md" label={newlys?.[1]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" // value={recordssy?.[1]?.value} // rules={[{ required: true, message: "必填" }]} @@ -348,7 +358,7 @@ const UserModal = (props) => { {newlysay?.map((item, index) => { return })} diff --git a/web/client/src/sections/fillion/components/inforTable.js b/web/client/src/sections/fillion/components/inforTable.js index 84e552f9..00ceafb7 100644 --- a/web/client/src/sections/fillion/components/inforTable.js +++ b/web/client/src/sections/fillion/components/inforTable.js @@ -24,7 +24,7 @@ const InForTable = (props) => { const [overrunRateFloor, setOverrunRateFloor] = useState()//超限率下限 const [testTime, setTestTime] = useState()//超限率下限 const ref = useRef() - useEffect(() => { ref.current.reload() }, [monitor, delet, modalVisible]) + useEffect(() => { ref.current.reload() }, [monitor, delet]) //打开弹窗 const openModal = (type, record) => { setModalVisible(true); @@ -436,6 +436,7 @@ const InForTable = (props) => { setTestTime('') }} request={async (params) => { + console.log(params) const query = { limit:params.pageSize, page:params.current-1, @@ -449,10 +450,10 @@ const InForTable = (props) => { setRowSelected([]); const res = await dispatch(getPurchase(query)); console.log(res) - setCounts(res.payload.data) + setCounts(res.payload.data.rows) return { ...res, - total: res.payload.data ? res.payload.data : 0 + total: res.payload.data ? res.payload.data.count : 0 } }} search={{ @@ -478,6 +479,7 @@ const InForTable = (props) => { rewkeys={'zhichao'} data={data} recortd={recortd} + setDelet={setDelet} setMonitor={setMonitor} // sitename={sitename} setRecortd={setRecortd} diff --git a/web/client/src/sections/fillion/components/operationalTable.js b/web/client/src/sections/fillion/components/operationalTable.js index cc827d2a..41c1e4a7 100644 --- a/web/client/src/sections/fillion/components/operationalTable.js +++ b/web/client/src/sections/fillion/components/operationalTable.js @@ -11,6 +11,7 @@ import HightModal from './highways/highwaysdata'; const OperaTionalTable = (props) => { const { dispatch, user, depData, depMessage, depLoading } = props const [rowSelected, setRowSelected] = useState([]) + const [sitename, setSitename] = useState()//场所名称 const [counts, setCounts] = useState()//shuju const [modalVisible, setModalVisible] = useState(false); @@ -23,7 +24,7 @@ const OperaTionalTable = (props) => { const [delet, setDelet] = useState() const ref = useRef() - useEffect(() => { ref.current.reload() }, [modalVisible, modalVisibleyilan,rewkeys,activeKey,delet]) + useEffect(() => { ref.current.reload() }, [rewkeys,activeKey,delet]) //打开弹窗 const openModal = (type, record) => { setModalVisible(true); @@ -150,7 +151,7 @@ const OperaTionalTable = (props) => { title: '车牌号', search: false, dataIndex: 'time2', - valueType: 'dateRange', + valueType: 'dateRange1', // align: 'right', width: 120, render: (dom, record) => { @@ -164,7 +165,7 @@ const OperaTionalTable = (props) => { title: '燃料类型', search: false, dataIndex: 'time3', - valueType: 'dateRange', + valueType: 'dateRange2', @@ -179,7 +180,7 @@ const OperaTionalTable = (props) => { title: '住址', search: false, dataIndex: 'time4', - valueType: 'dateRange', + valueType: 'dateRange3', width: 120, @@ -193,7 +194,7 @@ const OperaTionalTable = (props) => { title: '经济性质', search: false, dataIndex: 'time5', - valueType: 'dateRange', + valueType: 'dateRange4', width: 120, @@ -207,7 +208,7 @@ const OperaTionalTable = (props) => { title: '核定载客位数', search: false, dataIndex: 'time6', - valueType: 'dateRange', + valueType: 'dateRange5', width: 120, @@ -221,7 +222,7 @@ const OperaTionalTable = (props) => { title: '核定载质量', search: false, dataIndex: 'time7', - valueType: 'dateRange', + valueType: 'dateRange6', width: 120, @@ -235,7 +236,7 @@ const OperaTionalTable = (props) => { title: '车辆车轴数', search: false, dataIndex: 'time8', - valueType: 'dateRange', + valueType: 'dateRange7', width: 120, @@ -249,7 +250,7 @@ const OperaTionalTable = (props) => { title: '车辆厂牌', search: false, dataIndex: 'time9', - valueType: 'dateRange', + valueType: 'dateRange8', width: 140, @@ -263,8 +264,8 @@ const OperaTionalTable = (props) => { }, { title: '经营范围', search: false, - dataIndex: 'time9', - valueType: 'dateRange', + dataIndex: 'time10', + valueType: 'dateRange9', width: 140, @@ -278,8 +279,8 @@ const OperaTionalTable = (props) => { }, { title: '车辆营运状态', search: false, - dataIndex: 'time9', - valueType: 'dateRange', + dataIndex: 'time11', + valueType: 'dateRange10', width: 140, @@ -293,7 +294,7 @@ const OperaTionalTable = (props) => { }, { title: '客车类型与等级', search: false, - dataIndex: 'time9', + dataIndex: 'time12', valueType: 'dateRange', @@ -308,7 +309,7 @@ const OperaTionalTable = (props) => { }, { title: '年审结果', search: false, - dataIndex: 'time9', + dataIndex: 'time13', valueType: 'dateRange', @@ -323,7 +324,7 @@ const OperaTionalTable = (props) => { }, { title: '本次年审日期', search: false, - dataIndex: 'time9', + dataIndex: 'time14', valueType: 'dateRange', @@ -338,7 +339,7 @@ const OperaTionalTable = (props) => { }, { title: '下次年审日期', search: false, - dataIndex: 'time9', + dataIndex: 'time15', valueType: 'dateRange', @@ -353,7 +354,7 @@ const OperaTionalTable = (props) => { }, { title: '注册登记日期', search: false, - dataIndex: 'time9', + dataIndex: 'time16', valueType: 'dateRange', @@ -368,7 +369,7 @@ const OperaTionalTable = (props) => { }, { title: '运力来源', search: false, - dataIndex: 'time9', + dataIndex: 'time17', valueType: 'dateRange', @@ -383,7 +384,7 @@ const OperaTionalTable = (props) => { }, { title: '有效期起', search: false, - dataIndex: 'time9', + dataIndex: 'time18', valueType: 'dateRange', @@ -398,7 +399,7 @@ const OperaTionalTable = (props) => { }, { title: '有效期止', search: false, - dataIndex: 'time9', + dataIndex: 'time19', valueType: 'dateRange', @@ -413,7 +414,7 @@ const OperaTionalTable = (props) => { }, { title: '发动机排量', search: false, - dataIndex: 'time9', + dataIndex: 'time20', valueType: 'dateRange', @@ -428,7 +429,7 @@ const OperaTionalTable = (props) => { }, { title: '发动机号', search: false, - dataIndex: 'time9', + dataIndex: 'time21', valueType: 'dateRange', @@ -443,7 +444,7 @@ const OperaTionalTable = (props) => { }, { title: '车辆发动机功率', search: false, - dataIndex: 'time9', + dataIndex: 'time22', valueType: 'dateRange', @@ -458,7 +459,7 @@ const OperaTionalTable = (props) => { }, { title: '经营许可证号', search: false, - dataIndex: 'time9', + dataIndex: 'time23', valueType: 'dateRange', @@ -473,7 +474,7 @@ const OperaTionalTable = (props) => { }, { title: '车牌颜色', search: false, - dataIndex: 'time9', + dataIndex: 'time24', valueType: 'dateRange', @@ -488,7 +489,7 @@ const OperaTionalTable = (props) => { }, { title: '车辆总质量', search: false, - dataIndex: 'time9', + dataIndex: 'time25', valueType: 'dateRange', @@ -503,7 +504,7 @@ const OperaTionalTable = (props) => { }, { title: '车辆准牵引总质量', search: false, - dataIndex: 'time9', + dataIndex: 'time26', valueType: 'dateRange', @@ -518,7 +519,7 @@ const OperaTionalTable = (props) => { }, { title: '道路运输证号', search: false, - dataIndex: 'time9', + dataIndex: 'time27', valueType: 'dateRange', @@ -533,7 +534,7 @@ const OperaTionalTable = (props) => { }, { title: '车辆车高', search: false, - dataIndex: 'time9', + dataIndex: 'time28', valueType: 'dateRange', @@ -548,7 +549,7 @@ const OperaTionalTable = (props) => { }, { title: '车辆车长', search: false, - dataIndex: 'time9', + dataIndex: 'time29', valueType: 'dateRange', @@ -563,7 +564,7 @@ const OperaTionalTable = (props) => { }, { title: '车辆车宽', search: false, - dataIndex: 'time9', + dataIndex: 'time30', valueType: 'dateRange', @@ -578,7 +579,7 @@ const OperaTionalTable = (props) => { }, { title: '车辆类型', search: false, - dataIndex: 'time9', + dataIndex: 'time31', valueType: 'dateRange', @@ -593,7 +594,7 @@ const OperaTionalTable = (props) => { }, { title: '行驶证车辆类型', search: false, - dataIndex: 'time9', + dataIndex: 'time30', valueType: 'dateRange', @@ -608,7 +609,7 @@ const OperaTionalTable = (props) => { }, { title: '车辆轴距', search: false, - dataIndex: 'time9', + dataIndex: 'time31', valueType: 'dateRange', @@ -623,7 +624,7 @@ const OperaTionalTable = (props) => { }, { title: '等级评定日期', search: false, - dataIndex: 'time9', + dataIndex: 'time32', valueType: 'dateRange', @@ -638,7 +639,7 @@ const OperaTionalTable = (props) => { }, { title: '技术评定等级', search: false, - dataIndex: 'time9', + dataIndex: 'time33', valueType: 'dateRange', @@ -653,7 +654,7 @@ const OperaTionalTable = (props) => { }, { title: '下次等级评定日期', search: false, - dataIndex: 'time9', + dataIndex: 'time34', valueType: 'dateRange', @@ -668,7 +669,7 @@ const OperaTionalTable = (props) => { }, { title: '创建日期', search: false, - dataIndex: 'time9', + dataIndex: 'time35', valueType: 'dateRange', @@ -683,7 +684,7 @@ const OperaTionalTable = (props) => { }, { title: '操作', - dataIndex: 'creatTime', + dataIndex: 'creatTime55', valueType: 'dateTimeRange', hideInSearch: true, width: 120, @@ -1903,7 +1904,7 @@ const OperaTionalTable = (props) => { options={false} ref={c => { finishedProductTable = c; }} style={{ width: "100% ", overflow: "auto", height: '760px' }} - rowKey='key' + rowKey='id' rowSelection={{ selectedRowKeys: rowSelected, onChange: (selectedRowKeys) => { @@ -1987,6 +1988,7 @@ const OperaTionalTable = (props) => { data={rewkeys==='yehu'?data:date} recortd={recortd} // sitename={sitename} + setDelet={setDelet} setRecortd={setRecortd} /> : ''} {modalVisibleyilan ? { typecard={typecard} rewkeys={'passenger'} recortd={recortd} + setDelet={setDelet} setRecortd={setRecortd} /> : ''} diff --git a/web/client/src/sections/fillion/components/project/project.js b/web/client/src/sections/fillion/components/project/project.js index f2426b54..3baf1630 100644 --- a/web/client/src/sections/fillion/components/project/project.js +++ b/web/client/src/sections/fillion/components/project/project.js @@ -17,7 +17,7 @@ const data = { "projectProgress": "项目进展情况" } const ProjectModal = (props) => { - const { visible, onVisibleChange, typecard, rewkeys, recortd, sitename, dispatch, setRecortd, engineering } = props + const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet } = props const [newlys, setNewlys] = useState() //必填数据 const [newlysay, setNewlysay] = useState() //处理hou const [records, setRecords] = useState()//处理 @@ -80,13 +80,16 @@ const ProjectModal = (props) => { onFinish={(values) => { if (rewkeys === 'road') { if (typecard == '111') { - console.log(values) + setDelet(values) + setDelet(values) + const query = { ...values, type:rewkeys } dispatch(putProject(query)).then((res) => { setSuccess(res.success) }) return success } else { + setDelet(values) const query = { ...values, type:rewkeys } dispatch(putProject(query)).then((res) => { setSuccess(res.success) @@ -96,13 +99,14 @@ const ProjectModal = (props) => { } if (rewkeys === 'bridge') { if (typecard == '111') { - console.log(values) + setDelet(values) const query = { ...values, type:rewkeys } dispatch(putProject(query)).then((res) => { setSuccess(res.success) }) return success } else { + setDelet(values) const query = { ...values, type:rewkeys } dispatch(putProject(query)).then((res) => { setSuccess(res.success) @@ -120,7 +124,7 @@ const ProjectModal = (props) => { name={newlys?.[0]?.type} width="md" label={newlys?.[0]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" // value={recordsay?.[0]?.value} rules={[{ required: true, message: "必填" }]} @@ -128,7 +132,7 @@ const ProjectModal = (props) => { name={newlys?.[1]?.type} width="md" label={newlys?.[1]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" // value={recordsay?.[1]?.value} rules={[{ required: true, message: "必填" }]} @@ -160,7 +164,7 @@ const ProjectModal = (props) => { name={newlys?.[0]?.type} width="md" label={newlys?.[0]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" // value={recordssy?.[0]?.value} rules={[{ required: true, message: "必填" }]} @@ -168,7 +172,7 @@ const ProjectModal = (props) => { name={newlys?.[1]?.type} width="md" label={newlys?.[1]?.name} - tooltip="最长为 24 位" + placeholder="请输入名称" // value={recordssy?.[1]?.value} rules={[{ required: true, message: "必填" }]} @@ -190,7 +194,7 @@ const ProjectModal = (props) => { {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 b82b390a..6457c165 100644 --- a/web/client/src/sections/fillion/components/publicTable.js +++ b/web/client/src/sections/fillion/components/publicTable.js @@ -24,7 +24,7 @@ const PublicTable = (props) => { const [delet, setDelet] = useState() const ref = useRef() - useEffect(() => { ref.current.reload() }, [modalVisible,delet,rewkeys]) + useEffect(() => { ref.current.reload() }, [delet,rewkeys]) //xianlu请求 const requestxianlu = (name) => { const query = name @@ -1261,6 +1261,7 @@ const requestcheliang = (name) => { data={rewkeys==='xianlu'?data:date} recortd={recortd} // sitename={sitename} + setDelet={setDelet} setRecortd={setRecortd} /> : ''} diff --git a/web/client/src/sections/fillion/components/transportationTable.js b/web/client/src/sections/fillion/components/transportationTable.js index 9cec7f80..bc9dff88 100644 --- a/web/client/src/sections/fillion/components/transportationTable.js +++ b/web/client/src/sections/fillion/components/transportationTable.js @@ -11,7 +11,7 @@ import ProjectModal from './project/project'; const TransporTationTable = (props) => { const { dispatch, user, depData, depMessage, depLoading } = props const [rowSelected, setRowSelected] = useState([]) - const [sitename, setSitename] = useState()//桥梁名称 + const [sitename, setSitename] = useState()//名称 const [counts, setCounts] = useState()//shuju const [modalVisible, setModalVisible] = useState(false); const [modalVisibleyilan, setModalVisibleyilan] = useState(false); @@ -19,10 +19,10 @@ const TransporTationTable = (props) => { const [typecard, setTypecard] = useState(); const [activeKey, setActiveKey] = useState('tab1'); const [recortd, setRecortd] = useState() - const [whichofits, setWhichofits] = useState('xian') + const [whichofits, setWhichofits] = useState('县') const [delet, setDelet] = useState() const ref = useRef() - useEffect(() => { ref.current.reload() }, [modalVisible, modalVisibleyilan, whichofits, delet]) + useEffect(() => { ref.current.reload() }, [ whichofits, delet]) //打开弹窗 const openModal = (type, record) => { setModalVisible(true); @@ -3787,7 +3787,7 @@ const TransporTationTable = (props) => { columns={columns[activeKey]} dataSource={counts || []} request={async (params) => { - if (whichofits == 'xian') { + if (whichofits == '县') { const query = { level: '县', road: sitename @@ -3801,7 +3801,7 @@ const TransporTationTable = (props) => { ...res, total: res.payload.data ? res.payload.data.count : 0 } - } if (whichofits == 'xiang') { + } if (whichofits == '乡') { const query = { level: '乡', road: sitename @@ -3813,7 +3813,7 @@ const TransporTationTable = (props) => { ...res, total: res.payload.data ? res.payload.data.count : 0 } - } if (whichofits == 'cun') { + } if (whichofits == '村') { const query = { level: '村', road: sitename @@ -3863,8 +3863,9 @@ const TransporTationTable = (props) => { rewkeys={'transportation'} data={data} recortd={recortd} - sitename={sitename} + whichofits={whichofits} setRecortd={setRecortd} + setDelet={setDelet} /> : ''} {modalVisibleyilan ?