|
|
@ -9,17 +9,21 @@ const Public = (props) => { |
|
|
|
const [data, setData] = useState() |
|
|
|
useEffect(() => { |
|
|
|
// dispatch(getDepMessage())
|
|
|
|
|
|
|
|
|
|
|
|
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} /> |
|
|
|
</> |
|
|
|