no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-07-25 14:11:16 +07:00
parent a24e2298c0
commit 00f81dba34
6 changed files with 274 additions and 206 deletions

View file

@ -9,14 +9,19 @@ const $q = useQuasar(); //ใช้ noti quasar
const mixin = useCounterMixin();
const { messageError, success } = mixin;
const props = defineProps({
retireld: String,
});
const modal = ref<boolean>(false);
const retireld = ref<any>();
const columns = ref<any["columns"]>([
{
name: "index",
name: "order",
required: true,
label: "ลำดับ",
field: "index",
field: "order",
align: "left",
},
{
@ -41,10 +46,10 @@ const columns = ref<any["columns"]>([
align: "left",
},
{
name: "affiliation",
name: "organizationOrganization",
required: true,
label: "สังกัด",
field: "affiliation",
field: "organizationOrganization",
align: "left",
},
{
@ -56,64 +61,72 @@ const columns = ref<any["columns"]>([
},
]);
const rows = ref<any>([
{
fullname: "นายใจดี ยอดใจ",
position: "นักวิชาการพัสดุ",
level: "ปฎิบัติการ",
affiliation: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
},
{
fullname: "นายจักกริน บัณฑิต",
position: "นักวิชาการพัสดุ",
level: "ปฎิบัติการ",
affiliation: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
},
{
fullname: "นายจักกริน บัณฑิต",
position: "นักวิชาการพัสดุ",
level: "ปฎิบัติการ",
affiliation: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
},
{
fullname: "นายจักกริน บัณฑิต",
position: "นักวิชาการพัสดุ",
level: "ปฎิบัติการ",
affiliation: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
},
{
fullname: "นายจักกริน บัณฑิต",
position: "นักวิชาการพัสดุ",
level: "ปฎิบัติการ",
affiliation: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
},
{
fullname: "นายจักกริน บัณฑิต",
position: "นักวิชาการพัสดุ",
level: "ปฎิบัติการ",
affiliation: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
},
{
fullname: "นายจักกริน บัณฑิต",
position: "นักวิชาการพัสดุ",
level: "ปฎิบัติการ",
affiliation: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
},
// {
// fullname: " ",
// position: "",
// level: "",
// affiliation: " ",
// },
// {
// fullname: " ",
// position: "",
// level: "",
// affiliation: " ",
// },
// {
// fullname: " ",
// position: "",
// level: "",
// affiliation: " ",
// },
// {
// fullname: " ",
// position: "",
// level: "",
// affiliation: " ",
// },
// {
// fullname: " ",
// position: "",
// level: "",
// affiliation: " ",
// },
// {
// fullname: " ",
// position: "",
// level: "",
// affiliation: " ",
// },
// {
// fullname: " ",
// position: "",
// level: "",
// affiliation: " ",
// },
]);
const filter = ref<string>("");
watch(modal, () => {
if (modal.value === true) {
fecthlistRetire();
retireld.value = props.retireld;
fecthlistRetire(retireld.value);
}
});
const fecthlistRetire= async () => {
await http
.get(config.API.listRetire("1234"))
.then((res) => {
console.log(res);
})
.catch((e) => {
messageError($q, e);
});
const fecthlistRetire = async (retireld: any) => {
// await http
// .get(config.API.listRetire(retireld))
// .then((res) => {
// console.log(res);
// rows.value = res.data.result.map((e: any) => ({
// order: e.order,
// fullname: e.fullName,
// position: e.position,
// level: e.positionEmployeeLevel,
// organizationOrganization: e.organizationOrganization,
// }));
// })
// .catch((e) => {
// messageError($q, e);
// });
};
const clickAdd = () => {
$q.dialog({
@ -223,7 +236,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>{{ props.rowIndex + 1 }}</q-td>
<!-- <q-td>{{ props.rowIndex + 1 }}</q-td> -->
<q-td key="order" :props="props">
{{ props.row.order }}
</q-td>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
@ -231,8 +247,8 @@ const paginationLabel = (start: number, end: number, total: number) => {
{{ props.row.position }}
</q-td>
<q-td key="level" :props="props">{{ props.row.level }}</q-td>
<q-td key="affiliation" :props="props">
{{ props.row.affiliation }}
<q-td key="organizationOrganization" :props="props">
{{ props.row.organizationOrganization }}
</q-td>
<q-td>