เพิ่ม ui ระบบลา > รอบการปฏิบัติงาน
This commit is contained in:
parent
a5faf436a4
commit
776a1b8385
5 changed files with 357 additions and 2 deletions
111
src/modules/09_leave/stores/RoundStores.ts
Normal file
111
src/modules/09_leave/stores/RoundStores.ts
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import type { RoundRows } from "@/modules/09_leave/interface/response/round.ts";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
// store ลา >> รอบการปฏิบัติงาน
|
||||
export const useRoundDataStore = defineStore(
|
||||
"disciplineDirector",
|
||||
() => {
|
||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"round",
|
||||
"am",
|
||||
"amOut",
|
||||
"pm",
|
||||
"pmOut",
|
||||
"note",
|
||||
"status"
|
||||
]);
|
||||
|
||||
// หัวตาราง
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
align: "left",
|
||||
label: "ลำดับ",
|
||||
sortable: false,
|
||||
field: "no",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "round",
|
||||
align: "left",
|
||||
label: "รอบ",
|
||||
sortable: true,
|
||||
field: "round",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "am",
|
||||
align: "left",
|
||||
label: "ช่วงเช้า",
|
||||
sortable: true,
|
||||
field: "am",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "amOut",
|
||||
align: "left",
|
||||
label: "ออก",
|
||||
sortable: true,
|
||||
field: "amOut",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "pm",
|
||||
align: "left",
|
||||
label: "ช่วงบ่าย",
|
||||
sortable: true,
|
||||
field: "pm",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "pmOut",
|
||||
align: "left",
|
||||
label: "ออก",
|
||||
sortable: true,
|
||||
field: "pmOut",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "note",
|
||||
align: "left",
|
||||
label: "คำอธิบาย",
|
||||
sortable: true,
|
||||
field: "note",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "status",
|
||||
align: "left",
|
||||
label: "สถานะการใช้งาน",
|
||||
sortable: true,
|
||||
field: "status",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
|
||||
// ข้อมูลในตาราง
|
||||
const rows = ref<RoundRows[]>([]);
|
||||
function fetchData(data: RoundRows[]) {
|
||||
rows.value = data
|
||||
}
|
||||
|
||||
return {
|
||||
visibleColumns,
|
||||
columns,
|
||||
rows,
|
||||
fetchData
|
||||
};
|
||||
}
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue