ปรับการแสดงผลประเมิน
This commit is contained in:
parent
da586e568f
commit
58c2bfc467
2 changed files with 94 additions and 91 deletions
|
|
@ -283,8 +283,8 @@ onMounted(() => {
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'วันเวลาที่เริ่มต้นการประชุม'}`"
|
:label="`${'วันเวลาเริ่มต้นการประชุม'}`"
|
||||||
:rules="[(val: string) => !!val || `${'กรุณาเลือกวันเวลาที่เริ่มต้นการประชุม'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณาเลือกวันเวลาเริ่มต้นการประชุม'}`]"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<q-icon name="event" class="cursor-pointer text-primary">
|
<q-icon name="event" class="cursor-pointer text-primary">
|
||||||
|
|
|
||||||
|
|
@ -1,101 +1,104 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { DataResponseList, MainList } from "@/modules/12_evaluatePersonal/interface/index/director";
|
import type {
|
||||||
|
DataResponseList,
|
||||||
|
MainList,
|
||||||
|
} from "@/modules/12_evaluatePersonal/interface/index/director";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
// store ระบบวินัย >> ข้อมูลพื้นฐาน >> กรรมการ
|
// store ระบบวินัย >> ข้อมูลพื้นฐาน >> กรรมการ
|
||||||
export const useEvaluateDirectorDataStore = defineStore(
|
export const useEvaluateDirectorDataStore = defineStore(
|
||||||
"evaluateDirector",
|
"evaluateDirector",
|
||||||
() => {
|
() => {
|
||||||
const mixin = useCounterMixin()
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai } = mixin
|
const { date2Thai } = mixin;
|
||||||
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
//ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
||||||
const visibleColumns = ref<string[]>([
|
const visibleColumns = ref<string[]>([
|
||||||
"no",
|
"no",
|
||||||
"name",
|
"name",
|
||||||
"position",
|
"position",
|
||||||
"email",
|
"email",
|
||||||
"phone",
|
"phone",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// หัวตาราง
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: false,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
align: "left",
|
|
||||||
label: "ชื่อ-นามสกุล",
|
|
||||||
sortable: true,
|
|
||||||
field: "name",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "position",
|
|
||||||
align: "left",
|
|
||||||
label: "ตำแหน่ง",
|
|
||||||
sortable: true,
|
|
||||||
field: "position",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "email",
|
|
||||||
align: "left",
|
|
||||||
label: "อีเมล",
|
|
||||||
sortable: true,
|
|
||||||
field: "email",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "phone",
|
|
||||||
align: "left",
|
|
||||||
label: "เบอร์โทรศัพท์",
|
|
||||||
sortable: true,
|
|
||||||
field: "phone",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// ข้อมูลในตาราง
|
// หัวตาราง
|
||||||
const rows = ref<MainList[]>([]);
|
const columns = ref<QTableProps["columns"]>([
|
||||||
function fetchData(data: DataResponseList[]) {
|
{
|
||||||
const dataList: MainList[] = data.map((item: DataResponseList) => ({
|
name: "no",
|
||||||
id:item.id,
|
align: "left",
|
||||||
name:`${item.prefix}${item.firstName} ${item.lastName}`,
|
label: "ลำดับ",
|
||||||
prefix:item.prefix,
|
sortable: false,
|
||||||
firstName:item.firstName,
|
field: "no",
|
||||||
lastName:item.lastName,
|
headerStyle: "font-size: 14px",
|
||||||
phone:item.phone,
|
style: "font-size: 14px",
|
||||||
email:item.email,
|
},
|
||||||
position:item.position,
|
{
|
||||||
|
name: "name",
|
||||||
|
align: "left",
|
||||||
|
label: "ชื่อ-นามสกุล",
|
||||||
|
sortable: true,
|
||||||
|
field: "name",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "position",
|
||||||
|
align: "left",
|
||||||
|
label: "ตำแหน่ง",
|
||||||
|
sortable: true,
|
||||||
|
field: "position",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "email",
|
||||||
|
align: "left",
|
||||||
|
label: "อีเมล",
|
||||||
|
sortable: true,
|
||||||
|
field: "email",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "phone",
|
||||||
|
align: "left",
|
||||||
|
label: "เบอร์โทรศัพท์",
|
||||||
|
sortable: true,
|
||||||
|
field: "phone",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
createdFullName:item.createdFullName,
|
// ข้อมูลในตาราง
|
||||||
lastUpdateFullName:item.lastUpdateFullName,
|
const rows = ref<MainList[]>([]);
|
||||||
createdUserId:item.createdUserId,
|
function fetchData(data: DataResponseList[]) {
|
||||||
lastUpdateUserId:item.lastUpdateUserId,
|
const dataList: MainList[] = data.map((item: DataResponseList) => ({
|
||||||
createdAt:item.createdAt,
|
id: item.id,
|
||||||
lastUpdatedAt:item.lastUpdatedAt,
|
name: `${item.prefix}${item.firstName} ${item.lastName}`,
|
||||||
}))
|
prefix: item.prefix,
|
||||||
rows.value = dataList
|
firstName: item.firstName,
|
||||||
}
|
lastName: item.lastName,
|
||||||
|
phone: item.phone ? item.phone : "-",
|
||||||
|
email: item.email ? item.email : "-",
|
||||||
|
position: item.position ? item.position : "-",
|
||||||
|
|
||||||
return {
|
createdFullName: item.createdFullName,
|
||||||
visibleColumns,
|
lastUpdateFullName: item.lastUpdateFullName,
|
||||||
columns,
|
createdUserId: item.createdUserId,
|
||||||
rows,
|
lastUpdateUserId: item.lastUpdateUserId,
|
||||||
fetchData
|
createdAt: item.createdAt,
|
||||||
};
|
lastUpdatedAt: item.lastUpdatedAt,
|
||||||
|
}));
|
||||||
|
rows.value = dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
visibleColumns,
|
||||||
|
columns,
|
||||||
|
rows,
|
||||||
|
fetchData,
|
||||||
|
};
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue