|
|
@ -22,7 +22,9 @@ const OperaTionalTable = (props) => { |
|
|
|
const [recortd, setRecortd] = useState() |
|
|
|
const [rewkeys, setRewkeys] = useState('keyun') |
|
|
|
const [delet, setDelet] = useState() |
|
|
|
// const [, setDelet] = useState()
|
|
|
|
const [differentiate, setDifferentiate] = useState() |
|
|
|
const [genre, setGenre] = useState() |
|
|
|
|
|
|
|
|
|
|
|
const ref = useRef() |
|
|
|
useEffect(() => { ref.current.reload() }, [rewkeys, activeKey, delet]) |
|
|
@ -63,22 +65,6 @@ const OperaTionalTable = (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}`) |
|
|
|
}) |
|
|
|
} |
|
|
|
const columns = { |
|
|
|
tab1: [ |
|
|
|
{ |
|
|
@ -1881,6 +1867,8 @@ const OperaTionalTable = (props) => { |
|
|
|
label: <span onClick={() => { |
|
|
|
{ |
|
|
|
setRewkeys('chuzu') |
|
|
|
setDifferentiate('vehicle') |
|
|
|
setGenre('出租车') |
|
|
|
} |
|
|
|
}}>出租车{activeKey === 'tab2'}</span>, |
|
|
|
|
|
|
@ -1890,13 +1878,17 @@ const OperaTionalTable = (props) => { |
|
|
|
label: <span onClick={() => { |
|
|
|
{ |
|
|
|
setRewkeys('weihuo') |
|
|
|
setDifferentiate('vehicle') |
|
|
|
setGenre('危货') |
|
|
|
|
|
|
|
} |
|
|
|
}}>危险货运{activeKey === 'tab3'}</span>, |
|
|
|
|
|
|
|
}, { |
|
|
|
key: 'tab4', |
|
|
|
label: <span onClick={() => { |
|
|
|
setRewkeys('yehu') |
|
|
|
setDifferentiate('business') |
|
|
|
setRewkeys('yehu') |
|
|
|
}}>业户{activeKey === 'tab4'}</span>, |
|
|
|
|
|
|
|
}, |
|
|
@ -1974,7 +1966,7 @@ const OperaTionalTable = (props) => { |
|
|
|
defaultCollapsed: false, |
|
|
|
optionRender: (searchConfig, formProps, dom) => [ |
|
|
|
...dom.reverse(), |
|
|
|
['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}> |
|
|
|
['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,differentiate,genre) }}> |
|
|
|
<Button |
|
|
|
> |
|
|
|
导出 |
|
|
|