Browse Source

公交导出失败

dev
xingyongchun 2 years ago
parent
commit
f9b6cb5471
  1. 2
      web/client/src/sections/fillion/components/publicTable.js
  2. 20
      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,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}>
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected,rewkeys ) }}>
<Button
>
导出

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

@ -12,14 +12,18 @@ const Public = (props) => {
setData(props)
}, []);
//批量导出
const exports = (ids,counts) => {
console.log(counts);
let idas=ids.toString()
window.open(
'/_api/'+`data/export/?ids=${idas||''}&exp=${'overspeed'}&token=${user.token}`)
}
//批量导出
const exports = (ids, rewkeys) => {
let idas = ids.toString()
if (rewkeys === 'xianlu') {
window.open(
'/_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 (
<> <PublicTable data={data} exports={exports} />
</>

Loading…
Cancel
Save