hrms-mgt/src/modules/09_leave/views/WorkingMain.vue

94 lines
2.7 KiB
Vue
Raw Normal View History

2023-10-06 13:32:54 +07:00
<script setup lang="ts">
import { ref, onMounted } from "vue";
//import Stores
import { useCounterMixin } from "@/stores/mixin";
2023-10-20 10:31:07 +07:00
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
2023-10-06 13:32:54 +07:00
//import Components
2023-10-20 10:31:07 +07:00
import TableList from "@/modules/09_leave/components/1_Work/TableList.vue";
2023-10-20 16:57:32 +07:00
import ToolBar from "@/modules/09_leave/components/1_Work/ToolBar.vue";
// import Type
import type {
TableRows,
DataRes,
} from "@/modules/09_leave/interface/response/work";
2023-10-06 13:32:54 +07:00
// use Store
const mixin = useCounterMixin();
const workStore = useWorklistDataStore();
const { date2Thai } = mixin;
2023-10-19 15:39:18 +07:00
const { fetchList } = workStore;
2023-10-06 13:32:54 +07:00
onMounted(() => {
fecthWorkList();
});
//เรียกข้อมูลรายการลงเวลาปฏิบัติงาน
function fecthWorkList() {
const listData: DataRes[] = [
2023-10-06 13:32:54 +07:00
{
fullName: "นายกัณฐิมา กาฬสินธ์ุ",
timeIn: "8:04",
coordinatesIn: "สำนักงาน",
latIn: "18.7903",
longIn: "99.0029",
timeOut: "18:04",
coordinatesOut: "สำนักงาน",
latOut: "18.7903",
longOut: "99.0029",
status: "1",
date: new Date("2023-10-27"),
2023-10-06 13:32:54 +07:00
},
{
fullName: "นายนครชัย วันดี",
timeIn: "8:04",
coordinatesIn: "สำนักงาน",
latIn: "18.7903",
longIn: "99.0029",
timeOut: "18:04",
coordinatesOut: "สำนักงาน",
latOut: "18.7903",
longOut: "99.0029",
status: "2",
date: new Date("2023-10-28"),
2023-10-06 13:32:54 +07:00
},
{
fullName: "นายปิยรมย์ ศิริธาราฟ",
timeIn: "8:04",
coordinatesIn: "สำนักงาน",
latIn: "18.7903",
longIn: "99.0029",
timeOut: "18:04",
coordinatesOut: "สำนักงาน",
latOut: "18.7903",
longOut: "99.0029",
status: "3",
date: new Date("2023-10-27"),
2023-10-06 13:32:54 +07:00
},
{
fullName: "นางสาวปลาทอง ใจกล้า",
timeIn: "8:04",
coordinatesIn: "สำนักงาน",
latIn: "18.7903",
longIn: "99.0029",
timeOut: "18:04",
coordinatesOut: "สำนักงาน",
latOut: "18.7903",
longOut: "99.0029",
status: "1",
date: new Date("2023-10-27"),
2023-10-06 13:32:54 +07:00
},
];
2023-10-19 15:39:18 +07:00
fetchList(listData); // ส่งข้อมูลไปยัง stores
2023-10-06 13:32:54 +07:00
}
</script>
<template>
<div class="toptitle text-dark col-12 row items-center">
รายการลงเวลาปฏงาน
</div>
<div>
<q-card flat bordered class="col-12 q-mt-sm">
2023-10-20 16:57:32 +07:00
<div class="q-pa-md"><ToolBar /> <TableList /></div
2023-10-06 13:32:54 +07:00
></q-card>
</div>
</template>
<style scoped></style>