ต่อ api(รอต่อ บางส่วน)
This commit is contained in:
parent
18e1e0d2bd
commit
7399f967d0
15 changed files with 506 additions and 155 deletions
|
|
@ -10,7 +10,7 @@ export const useDisciplineChannelDataStore = defineStore(
|
|||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"subject",
|
||||
"name",
|
||||
"interrogated",
|
||||
"fault",
|
||||
"status",
|
||||
|
|
@ -28,11 +28,11 @@ export const useDisciplineChannelDataStore = defineStore(
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "subject",
|
||||
name: "name",
|
||||
align: "left",
|
||||
label: "ชื่อประเภท",
|
||||
sortable: true,
|
||||
field: "subject",
|
||||
field: "name",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import type { DirectorRows } from "@/modules/11_discipline/interface/response/director";
|
||||
import type { DirectorRows,DirectorRowsResponse } from "@/modules/11_discipline/interface/response/director";
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
// store ระบบวินัย >> ข้อมูลพื้นฐาน >> กรรมการ
|
||||
|
|
@ -10,7 +10,7 @@ export const useDisciplineDirectorDataStore = defineStore(
|
|||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||
const visibleColumns = ref<string[]>([
|
||||
"no",
|
||||
"name",
|
||||
"fullName",
|
||||
"position",
|
||||
"email",
|
||||
"phone",
|
||||
|
|
@ -28,11 +28,11 @@ export const useDisciplineDirectorDataStore = defineStore(
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
{
|
||||
name: "name",
|
||||
name: "fullName",
|
||||
align: "left",
|
||||
label: "ชื่อ-นามสกุล",
|
||||
sortable: true,
|
||||
field: "name",
|
||||
field: "fullName",
|
||||
headerStyle: "font-size: 14px",
|
||||
style: "font-size: 14px",
|
||||
},
|
||||
|
|
@ -66,9 +66,16 @@ export const useDisciplineDirectorDataStore = defineStore(
|
|||
]);
|
||||
|
||||
// ข้อมูลในตาราง
|
||||
const rows = ref<DirectorRows[]>([]);
|
||||
const rows = ref<DirectorRowsResponse[]>([]);
|
||||
function fetchData(data: DirectorRows[]) {
|
||||
rows.value = data
|
||||
const dataList:DirectorRowsResponse[] = data.map((item:DirectorRows)=>({
|
||||
id:item.id,
|
||||
fullName:`${item.prefix}${item.firstName} ${item.lastName}`,
|
||||
position:item.position,
|
||||
email:item.email,
|
||||
phone:item.phone
|
||||
}))
|
||||
rows.value = dataList
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue