|
|
|
|
@ -212,6 +212,8 @@ export default class Index extends Component<any, any> {
|
|
|
|
|
if (res.data.code === 200) {
|
|
|
|
|
|
|
|
|
|
this.state.clockStatistics.map((item) => {
|
|
|
|
|
console.log(item,'iiiiiiii',id);
|
|
|
|
|
|
|
|
|
|
if (item.id === id) {
|
|
|
|
|
item.detail = res.data.data;
|
|
|
|
|
item.detail.map((obj) => {
|
|
|
|
|
@ -257,13 +259,27 @@ export default class Index extends Component<any, any> {
|
|
|
|
|
punchInInfo.clockImageList.splice(i, 1);
|
|
|
|
|
this.setState({ punchInInfo });
|
|
|
|
|
}
|
|
|
|
|
getRouteId() {
|
|
|
|
|
async getRouteId() {
|
|
|
|
|
let clockStatistics =this.state.clockStatistics
|
|
|
|
|
const searchParams = new URLSearchParams(window.location.search);
|
|
|
|
|
const id = searchParams.get("id");
|
|
|
|
|
const recordId = searchParams.get("recordId");
|
|
|
|
|
this.getStatistics(id);
|
|
|
|
|
// this.getRecord(id, recordId);
|
|
|
|
|
// console.log(recordId);
|
|
|
|
|
let res1 = await InstrumentInfo.apiClock.getLatestClockRecord();
|
|
|
|
|
|
|
|
|
|
let obj:any ={}
|
|
|
|
|
obj.detail = res1.data.data;
|
|
|
|
|
obj.updateTime = getdates(res1.data.data.updateTime).replace(/-/g, ".");
|
|
|
|
|
let arr:any =[]
|
|
|
|
|
arr.push(obj)
|
|
|
|
|
|
|
|
|
|
this.setState({ clockStatistics:arr });
|
|
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
|
|
|
|
|
}, )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
getTime(time) {
|
|
|
|
|
const hour = time.slice(0, 2);
|
|
|
|
|
|