巴林闲侠
3 years ago
14 changed files with 14857 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||
{ |
|||
"git.ignoreLimitWarning": true |
|||
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,9 @@ |
|||
.protable-transpor{ |
|||
.ant-table-cell-fix-left{ |
|||
background-color: #ffffff !important; |
|||
} |
|||
.ant-table-cell-fix-right{ |
|||
background-color: #ffffff !important; |
|||
} |
|||
|
|||
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,42 @@ |
|||
import React, { useEffect, useState } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import '../style.less'; |
|||
import { getDepMessage, getReportStatistic } from "../actions/infor" |
|||
import BridgeTable from '../components/bridgeTable'; |
|||
const superagent = require('superagent'); |
|||
const infor = (props) => { |
|||
const { dispatch, user } = props |
|||
const [data, setData] = useState() |
|||
useEffect(() => { |
|||
// dispatch(getDepMessage())
|
|||
dispatch(getReportStatistic()) |
|||
setData(props) |
|||
}, []); |
|||
//批量导出
|
|||
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 ( |
|||
<> <BridgeTable data={data} exports={exports} /> |
|||
</> |
|||
) |
|||
} |
|||
function mapStateToProps(state) { |
|||
const { auth } = state |
|||
return { |
|||
user: auth.user, |
|||
} |
|||
} |
|||
export default connect(mapStateToProps)(infor); |
@ -0,0 +1,42 @@ |
|||
import React, { useEffect, useState } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import '../style.less'; |
|||
import { getDepMessage, getReportStatistic } from "../actions/infor" |
|||
import EnforceTable from '../components/enforceTable'; |
|||
const superagent = require('superagent'); |
|||
const enforce = (props) => { |
|||
const { dispatch, user } = props |
|||
const [data, setData] = useState() |
|||
useEffect(() => { |
|||
// dispatch(getDepMessage())
|
|||
dispatch(getReportStatistic()) |
|||
setData(props) |
|||
}, []); |
|||
//批量导出
|
|||
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 ( |
|||
<> <EnforceTable data={data} exports={exports} /> |
|||
</> |
|||
) |
|||
} |
|||
function mapStateToProps(state) { |
|||
const { auth } = state |
|||
return { |
|||
user: auth.user, |
|||
} |
|||
} |
|||
export default connect(mapStateToProps)(enforce); |
@ -0,0 +1,42 @@ |
|||
import React, { useEffect, useState } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import '../style.less'; |
|||
import { getDepMessage, getReportStatistic } from "../actions/infor" |
|||
import HighwaysTable from '../components/highwaysTable'; |
|||
const superagent = require('superagent'); |
|||
const highways = (props) => { |
|||
const { dispatch, user } = props |
|||
const [data, setData] = useState() |
|||
useEffect(() => { |
|||
// dispatch(getDepMessage())
|
|||
dispatch(getReportStatistic()) |
|||
setData(props) |
|||
}, []); |
|||
//批量导出
|
|||
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 ( |
|||
<> <HighwaysTable data={data} exports={exports} /> |
|||
</> |
|||
) |
|||
} |
|||
function mapStateToProps(state) { |
|||
const { auth } = state |
|||
return { |
|||
user: auth.user, |
|||
} |
|||
} |
|||
export default connect(mapStateToProps)(highways); |
@ -0,0 +1,42 @@ |
|||
import React, { useEffect, useState } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import '../style.less'; |
|||
import { getDepMessage, getReportStatistic } from "../actions/infor" |
|||
import OperaTionalTable from '../components/operationalTable'; |
|||
const superagent = require('superagent'); |
|||
const operational = (props) => { |
|||
const { dispatch, user } = props |
|||
const [data, setData] = useState() |
|||
useEffect(() => { |
|||
// dispatch(getDepMessage())
|
|||
dispatch(getReportStatistic()) |
|||
setData(props) |
|||
}, []); |
|||
//批量导出
|
|||
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 ( |
|||
<> <OperaTionalTable data={data} exports={exports} /> |
|||
</> |
|||
) |
|||
} |
|||
function mapStateToProps(state) { |
|||
const { auth } = state |
|||
return { |
|||
user: auth.user, |
|||
} |
|||
} |
|||
export default connect(mapStateToProps)(operational); |
@ -0,0 +1,42 @@ |
|||
import React, { useEffect, useState } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import '../style.less'; |
|||
import { getDepMessage, getReportStatistic } from "../actions/infor" |
|||
import PublicTable from '../components/publicTable'; |
|||
const superagent = require('superagent'); |
|||
const Public = (props) => { |
|||
const { dispatch, user } = props |
|||
const [data, setData] = useState() |
|||
useEffect(() => { |
|||
// dispatch(getDepMessage())
|
|||
dispatch(getReportStatistic()) |
|||
setData(props) |
|||
}, []); |
|||
//批量导出
|
|||
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 ( |
|||
<> <PublicTable data={data} exports={exports} /> |
|||
</> |
|||
) |
|||
} |
|||
function mapStateToProps(state) { |
|||
const { auth } = state |
|||
return { |
|||
user: auth.user, |
|||
} |
|||
} |
|||
export default connect(mapStateToProps)(Public); |
@ -0,0 +1,42 @@ |
|||
import React, { useEffect, useState } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import '../style.less'; |
|||
import { getDepMessage, getReportStatistic } from "../actions/infor" |
|||
import TransporTationTable from '../components/transportationTable'; |
|||
const superagent = require('superagent'); |
|||
const transportation = (props) => { |
|||
const { dispatch, user } = props |
|||
const [data, setData] = useState() |
|||
useEffect(() => { |
|||
// dispatch(getDepMessage())
|
|||
dispatch(getReportStatistic()) |
|||
setData(props) |
|||
}, []); |
|||
//批量导出
|
|||
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 ( |
|||
<> <TransporTationTable data={data} exports={exports} /> |
|||
</> |
|||
) |
|||
} |
|||
function mapStateToProps(state) { |
|||
const { auth } = state |
|||
return { |
|||
user: auth.user, |
|||
} |
|||
} |
|||
export default connect(mapStateToProps)(transportation); |
Loading…
Reference in new issue