|
@ -15,7 +15,7 @@ const DetailForm = (props) => { |
|
|
const { visible, data, handleClose, loading } = props; |
|
|
const { visible, data, handleClose, loading } = props; |
|
|
const [qndmn] = useState(localStorage.getItem('qndmn')); |
|
|
const [qndmn] = useState(localStorage.getItem('qndmn')); |
|
|
const keyList = [ |
|
|
const keyList = [ |
|
|
{ key: '编号', name: 'id' }, |
|
|
// { key: '编号', name: 'id' },
|
|
|
{ key: '工程类型', name: 'projectType' }, |
|
|
{ key: '工程类型', name: 'projectType' }, |
|
|
{ key: '所在路段', name: 'road' }, |
|
|
{ key: '所在路段', name: 'road' }, |
|
|
{ key: '具体位置', name: 'address' }, |
|
|
{ key: '具体位置', name: 'address' }, |
|
@ -91,7 +91,9 @@ const DetailList = (props) => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
let daySet = {}; |
|
|
let basicDate = null; |
|
|
|
|
|
let counter = 0; |
|
|
|
|
|
|
|
|
const columns = [ |
|
|
const columns = [ |
|
|
{ |
|
|
{ |
|
|
title: '编号', |
|
|
title: '编号', |
|
@ -100,14 +102,16 @@ const DetailList = (props) => { |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
render: (text, record) => { |
|
|
render: (text, record) => { |
|
|
let day = moment(record.time).format("YYYYMMDD") |
|
|
let day = moment(record.time).format("YYYYMMDD") |
|
|
if (daySet[day]) { |
|
|
if(!basicDate){ |
|
|
daySet[day].add(Symbol()) |
|
|
basicDate = day; |
|
|
} else { |
|
|
counter +=1; |
|
|
daySet[day] = new Set() |
|
|
} else if(basicDate == day){ |
|
|
daySet[day].add(Symbol()) |
|
|
counter += 1; |
|
|
|
|
|
} else if(basicDate != day){ |
|
|
|
|
|
basicDate = day; |
|
|
|
|
|
counter = 1; |
|
|
} |
|
|
} |
|
|
return day * 10000 + daySet[day].size |
|
|
return moment(record.time).format("YYYYMMDD") * 10000 + counter; |
|
|
return moment(record.time).format("YYYYMMDD") * 10000 + record.id; |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -316,7 +320,7 @@ const PatrolTable = (props) => { |
|
|
}, [record, dateRange]) |
|
|
}, [record, dateRange]) |
|
|
|
|
|
|
|
|
const queryData = () => { |
|
|
const queryData = () => { |
|
|
let query = { userId: record.id, reportType: 'patrol' } |
|
|
let query = { userId: record.id, reportType: 'patrol', asc: true } |
|
|
if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) { |
|
|
if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) { |
|
|
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
|
query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss') |
|
@ -333,7 +337,7 @@ const PatrolTable = (props) => { |
|
|
}, [activeTabKey1]) |
|
|
}, [activeTabKey1]) |
|
|
|
|
|
|
|
|
const handelRefresh = () => { |
|
|
const handelRefresh = () => { |
|
|
let query = { userId: record.id, reportType: 'patrol' } |
|
|
let query = { userId: record.id, reportType: 'patrol', asc: true } |
|
|
dispatch(getReportList(query)); |
|
|
dispatch(getReportList(query)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|