ปรับ interfeac
This commit is contained in:
parent
09b1b9f492
commit
cfc073e30c
16 changed files with 462 additions and 277 deletions
|
|
@ -16,7 +16,7 @@ export const useLeavelistDataStore = defineStore("leave", () => {
|
|||
const mainData = ref<any>([])
|
||||
const rows = ref<any>([])
|
||||
const loadTable = ref<boolean>(false)
|
||||
async function fecthList(data: any) {
|
||||
async function fetchList(data: any) {
|
||||
let datalist = data.map((e: any) => ({
|
||||
leaveType: e.leaveType,
|
||||
name: e.name,
|
||||
|
|
@ -161,7 +161,7 @@ export const useLeavelistDataStore = defineStore("leave", () => {
|
|||
amounttab2,
|
||||
//ข้อมูลในตาราง
|
||||
rows,
|
||||
fecthList,
|
||||
fetchList,
|
||||
loadTable,
|
||||
//filter table
|
||||
filterTable,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export const useWorklistDataStore = defineStore("work", () => {
|
|||
// ข้อมูลในตาราง
|
||||
const rows = ref<any>([])
|
||||
const dataMain = ref<any>([])
|
||||
function fecthList(data: any) {
|
||||
function fetchList(data: any) {
|
||||
let datalist = data.map((e: any) => ({
|
||||
fullName: e.fullName,
|
||||
timeIn: e.timeIn,
|
||||
|
|
@ -86,7 +86,7 @@ export const useWorklistDataStore = defineStore("work", () => {
|
|||
return {
|
||||
//ข้อมูลในตาราง
|
||||
rows,
|
||||
fecthList,
|
||||
fetchList,
|
||||
//ค้นหาข้อมูล
|
||||
filterTable,
|
||||
selectDate,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useLeavelistDataStore } from "../stores/LeaveStore";
|
|||
import TableList from "../components/2_Leave/TableList.vue";
|
||||
|
||||
const leaveStore = useLeavelistDataStore();
|
||||
const { fecthList, clearFilter } = leaveStore;
|
||||
const { fetchList, clearFilter } = leaveStore;
|
||||
|
||||
onMounted(() => {
|
||||
fecthLeaveList();
|
||||
|
|
@ -39,7 +39,7 @@ function fecthLeaveList() {
|
|||
status: "2",
|
||||
},
|
||||
];
|
||||
fecthList(data); // ส่งข้อมูลไป stores
|
||||
fetchList(data); // ส่งข้อมูลไป stores
|
||||
}
|
||||
//เปลี่ยน Tab
|
||||
function changTab() {
|
||||
|
|
@ -51,7 +51,7 @@ function changTab() {
|
|||
<div class="toptitle text-dark col-12 row items-center">รายการลา</div>
|
||||
<div>
|
||||
<!-- <q-card flat bordered class="col-12 q-mt-sm"> -->
|
||||
<q-card bordered flat >
|
||||
<q-card bordered flat>
|
||||
<q-tabs
|
||||
v-model="leaveStore.tab"
|
||||
dense
|
||||
|
|
@ -66,7 +66,6 @@ function changTab() {
|
|||
@click="changTab"
|
||||
name="1"
|
||||
label="รายการลาที่อยู่ระหว่างดำเนิดการ"
|
||||
|
||||
>
|
||||
<q-badge
|
||||
color="grey-4"
|
||||
|
|
@ -79,12 +78,7 @@ function changTab() {
|
|||
rounded
|
||||
/>
|
||||
</q-tab>
|
||||
<q-tab
|
||||
@click="changTab"
|
||||
name="2"
|
||||
label="รายการลาทั้งหมด"
|
||||
|
||||
>
|
||||
<q-tab @click="changTab" name="2" label="รายการลาทั้งหมด">
|
||||
<q-badge
|
||||
color="grey-4"
|
||||
:class="
|
||||
|
|
@ -110,7 +104,7 @@ function changTab() {
|
|||
<TableList />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<!-- </q-card> -->
|
||||
<!-- </q-card> -->
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import TableList from "../components/1_Work/TableList.vue";
|
|||
const mixin = useCounterMixin();
|
||||
const workStore = useWorklistDataStore();
|
||||
const { date2Thai } = mixin;
|
||||
const { fecthList } = workStore;
|
||||
const { fetchList } = workStore;
|
||||
|
||||
onMounted(() => {
|
||||
fecthWorkList();
|
||||
|
|
@ -66,7 +66,7 @@ function fecthWorkList() {
|
|||
status: "1",
|
||||
},
|
||||
];
|
||||
fecthList(listData); // ส่งข้อมูลไปยัง stores
|
||||
fetchList(listData); // ส่งข้อมูลไปยัง stores
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue