Browse Source

公交导出失败

dev
xingyongchun 2 years ago
parent
commit
f9b6cb5471
  1. 2
      web/client/src/sections/fillion/components/publicTable.js
  2. 22
      web/client/src/sections/fillion/containers/public.js

2
web/client/src/sections/fillion/components/publicTable.js

@ -1231,7 +1231,7 @@ const PublicTable = (props) => {
defaultCollapsed: false, defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [ optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(), ...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}> <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,rewkeys ) }}>
<Button <Button
> >
导出 导出

22
web/client/src/sections/fillion/containers/public.js

@ -9,17 +9,21 @@ const Public = (props) => {
const [data, setData] = useState() const [data, setData] = useState()
useEffect(() => { useEffect(() => {
// dispatch(getDepMessage()) // dispatch(getDepMessage())
setData(props) setData(props)
}, []); }, []);
//批量导出 //批量导出
const exports = (ids,counts) => { const exports = (ids, rewkeys) => {
console.log(counts); let idas = ids.toString()
let idas=ids.toString() if (rewkeys === 'xianlu') {
window.open( window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`) '/_api/' + `data/export/?ids=${idas || ''}&exp=${'busLine'}&token=${user.token}`)
}
} if (rewkeys === 'cheliang') {
window.open(
'/_api/' + `data/export/?ids=${idas || ''}&exp=${'busCar'}&token=${user.token}`)
}
}
return ( return (
<> <PublicTable data={data} exports={exports} /> <> <PublicTable data={data} exports={exports} />
</> </>

Loading…
Cancel
Save