Update chekin.ts
This commit is contained in:
parent
89e32d5929
commit
24ed108ee8
1 changed files with 24 additions and 13 deletions
|
|
@ -1,23 +1,33 @@
|
|||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
|
||||
export const useChekIn = defineStore('checkin', () => {
|
||||
const rows = ref<any>()
|
||||
|
||||
function fetchHistoryList(data: any) {
|
||||
console.log(data)
|
||||
const datalist = data.map((e: any) => ({
|
||||
no: e.no,
|
||||
async function fetchHistoryList(data: any) {
|
||||
// console.log(data)
|
||||
rows.value = []
|
||||
const datalist = await data.map((e: any) => ({
|
||||
id: e.id,
|
||||
date: e.date,
|
||||
in: e.in,
|
||||
loIn: e.loIn,
|
||||
out: e.out,
|
||||
loOut: e.loOut,
|
||||
status: e.status,
|
||||
Morningstatus: convertStatus(e.Morningstatus),
|
||||
AfternoonStatus: convertStatus(e.AfternoonStatus),
|
||||
statusEdit: e.statusEdit,
|
||||
statusEditName: convertStatusEdit(e.statusEdit),
|
||||
// no: e.no,
|
||||
// in: e.in,
|
||||
// loIn: e.loIn,
|
||||
// out: e.out,
|
||||
// loOut: e.loOut,
|
||||
// status: e.status,
|
||||
// Morningstatus: convertStatus(e.Morningstatus),
|
||||
// AfternoonStatus: convertStatus(e.AfternoonStatus),
|
||||
// statusEdit: e.statusEdit,
|
||||
// statusEditName: convertStatusEdit(e.statusEdit),
|
||||
checkInTime: e.checkInTime,
|
||||
checkInLocation: e.checkInLocation,
|
||||
checkOutTime: e.checkOutTime,
|
||||
checkOutLocation: e.checkOutLocation,
|
||||
checkInStatus: convertStatus(e.checkInStatus),
|
||||
checkOutStatus: convertStatus(e.checkOutStatus),
|
||||
}))
|
||||
rows.value = datalist
|
||||
}
|
||||
|
|
@ -57,5 +67,6 @@ export const useChekIn = defineStore('checkin', () => {
|
|||
rows,
|
||||
fetchHistoryList,
|
||||
classColorStatus,
|
||||
// fetchlistHistory,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue