diff --git a/web/client/src/sections/fillion/components/bridgeTable.js b/web/client/src/sections/fillion/components/bridgeTable.js index 2f46b175..c6761572 100644 --- a/web/client/src/sections/fillion/components/bridgeTable.js +++ b/web/client/src/sections/fillion/components/bridgeTable.js @@ -24,6 +24,7 @@ const BrideTable = (props) => { const [recortd, setRecortd] = useState() const [whichofits, setWhichofits] = useState('qiaoliang') const [delet, setDelet] = useState() + const [differentiate, setDifferentiate] = useState('bridge') const ref = useRef() useEffect(() => { ref.current.reload() }, [whichofits, delet]) @@ -1506,7 +1507,7 @@ const BrideTable = (props) => { return
@@ -1690,7 +1691,7 @@ const BrideTable = (props) => { return
{ deldatas(record.id) }}> @@ -1750,22 +1751,6 @@ const BrideTable = (props) => { setModalRecord(null); } } - //批量导出 - const exports = (ids, counts) => { - // console.log(user); - let reportIds = []; - if (ids.length) - reportIds = ids - else - reportIds = (counts || {}).ids || []; - superagent.post('/_report/http') - .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => { - const resTextIs = res.text.split('/').pop() - window.open( - '/_api/' + - `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) - }) - } return (
@@ -1782,12 +1767,14 @@ const BrideTable = (props) => { key: 'tab1', label: { setWhichofits('qiaoliang') + setDifferentiate('bridge') }}>桥梁{activeKey === 'tab1'}, }, { key: 'tab2', label: { setWhichofits('gongcheng') + setDifferentiate('project') }}>工程一览{activeKey === 'tab2'}, }, @@ -1844,7 +1831,7 @@ const BrideTable = (props) => { defaultCollapsed: false, optionRender: (searchConfig, formProps, dom) => [ ...dom.reverse(), - { props.exports(rowSelected, counts) }}> + { props.exports(rowSelected,differentiate) }}>
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' ? { } else { setModalRecord(null); } -} - //批量导出 -const exports = (ids, counts) => { - // console.log(user); - let reportIds = []; - if (ids.length) - reportIds = ids - else - reportIds = (counts || {}).ids || []; - superagent.post('/_report/http') - .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => { - const resTextIs = res.text.split('/').pop() - window.open( - '/_api/' + - `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) - }) -} +} const columns = [ { @@ -91,7 +75,7 @@ const exports = (ids, counts) => { return
diff --git a/web/client/src/sections/fillion/components/infor/details.js b/web/client/src/sections/fillion/components/infor/details.js index a8a125a7..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,9 +169,9 @@ const UserModal = (props) => { } if (rewkeys === 'bridge') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) - const query = { ...values, roadId: records?.[0]?.value || '' } + 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' ? { setModalRecord(null); } } - //批量导出 - const exports = (ids, counts) => { - // console.log(user); - let reportIds = []; - if (ids.length) - reportIds = ids - else - reportIds = (counts || {}).ids || []; - superagent.post('/_report/http') - .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => { - const resTextIs = res.text.split('/').pop() - window.open( - '/_api/' + - `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) - }) - } const deldata = (id) => { // 治超删除 const query = { overspeedId: id @@ -369,7 +353,7 @@ const InForTable = (props) => { return
@@ -463,7 +447,10 @@ const InForTable = (props) => { defaultCollapsed: false, optionRender: (searchConfig, formProps, dom) => [ ...dom.reverse(), - { props.exports(rowSelected, counts) }}> + { + console.log(rowSelected) + + props.exports(rowSelected, counts) }}>
@@ -711,7 +697,7 @@ const OperaTionalTable = (props) => { return
{ deldata(record.id) }}> @@ -1344,7 +1330,7 @@ const OperaTionalTable = (props) => { return
{ deldata(record.id) }}> @@ -1814,7 +1800,7 @@ const OperaTionalTable = (props) => { return
{ deldatas(record.id) }}> @@ -1881,6 +1867,8 @@ const OperaTionalTable = (props) => { label: { { setRewkeys('chuzu') + setDifferentiate('vehicle') + setGenre('出租车') } }}>出租车{activeKey === 'tab2'}, @@ -1890,13 +1878,17 @@ const OperaTionalTable = (props) => { label: { { setRewkeys('weihuo') + setDifferentiate('vehicle') + setGenre('危货') + } }}>危险货运{activeKey === 'tab3'}, }, { key: 'tab4', label: { - setRewkeys('yehu') + setDifferentiate('business') + setRewkeys('yehu') }}>业户{activeKey === 'tab4'}, }, @@ -1974,7 +1966,7 @@ const OperaTionalTable = (props) => { defaultCollapsed: false, optionRender: (searchConfig, formProps, dom) => [ ...dom.reverse(), - ['tab2', 'tab3', 'tab4'].includes(activeKey) ? { props.exports(rowSelected, counts) }}> + ['tab2', 'tab3', 'tab4'].includes(activeKey) ? { props.exports(rowSelected,differentiate,genre) }}> { deldata(record.id) }}> @@ -1119,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 9bd358e5..53cba191 100644 --- a/web/client/src/sections/fillion/components/transportationTable.js +++ b/web/client/src/sections/fillion/components/transportationTable.js @@ -21,6 +21,8 @@ const TransporTationTable = (props) => { const [recortd, setRecortd] = useState() const [whichofits, setWhichofits] = useState('县') const [delet, setDelet] = useState() + const [differentiate, setDifferentiate] = useState('road') + const [grade, setGrade] = useState('县') const ref = useRef() useEffect(() => { ref.current.reload() }, [whichofits, delet]) //打开弹窗 @@ -60,22 +62,6 @@ const TransporTationTable = (props) => { setDelet(res) }) } - //批量导出 - const exports = (ids, counts) => { - // console.log(user); - let reportIds = []; - if (ids.length) - reportIds = ids - else - reportIds = (counts || {}).ids || []; - superagent.post('/_report/http') - .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => { - const resTextIs = res.text.split('/').pop() - window.open( - '/_api/' + - `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) - }) - } const columns = { tab1: [ { @@ -1192,7 +1178,7 @@ const TransporTationTable = (props) => { onClick={() => { setRecortd(record) openModal('edit', record) - setTypecard('111') + setTypecard('compile') }} >编辑 { deldata(record.id) }}> @@ -3750,23 +3736,33 @@ const TransporTationTable = (props) => { key: 'tab1', label: { setWhichofits('县') + setDifferentiate('road') + setGrade('县') }}>县道{activeKey === 'tab1'}, }, { key: 'tab2', label: { setWhichofits('乡') + setGrade('乡') + setDifferentiate('road') + }}>乡道{activeKey === 'tab2'}, }, { key: 'tab3', label: { setWhichofits('村') + setDifferentiate('road') + setGrade('村') + }}>村道{activeKey === 'tab3'}, }, { key: 'tab4', label: { setWhichofits('gongcheng') + setDifferentiate('project') + }}>工程一览{activeKey === 'tab4'}, }, ], @@ -3836,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 @@ -3847,7 +3842,7 @@ const TransporTationTable = (props) => { defaultCollapsed: false, optionRender: (searchConfig, formProps, dom) => [ ...dom.reverse(), - { props.exports(rowSelected, counts) }}> + { props.exports(rowSelected,grade,differentiate) }}>