no message
This commit is contained in:
parent
a19a0634d4
commit
9dc56a34e8
1 changed files with 25 additions and 52 deletions
|
|
@ -14,7 +14,7 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, success, showLoader, hideLoader } = mixin;
|
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
||||||
|
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
|
|
@ -164,43 +164,7 @@ const columns2 = ref<QTableProps["columns"]>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// ข้อมูลตาราง (จำลอง)
|
// ข้อมูลตาราง (จำลอง)
|
||||||
const rows2 = ref<FormMainProbation2[]>([
|
const rows2 = ref<FormMainProbation2[]>([]);
|
||||||
// {
|
|
||||||
// no: "1",
|
|
||||||
// name: "นายใจดี ยอดใจ ",
|
|
||||||
// position: "นักวิชาการพัสดุ",
|
|
||||||
// level: "ปฏิบัติการ",
|
|
||||||
// institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// no: "2",
|
|
||||||
// name: "นายจักกริน บัณฑิต",
|
|
||||||
// position: "นักวิชาการพัสดุ",
|
|
||||||
// level: "ปฏิบัติการ",
|
|
||||||
// institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// no: "3",
|
|
||||||
// name: "นางสาวกัณฐิมา กาฬสินธุ์",
|
|
||||||
// position: "นักจัดการงานทั่วไป",
|
|
||||||
// level: "ปฏิบัติการ",
|
|
||||||
// institution: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// no: "4",
|
|
||||||
// name: "นางสาวเมขลา กระจ่างมนตรี",
|
|
||||||
// position: "นักจัดการงานทั่วไป",
|
|
||||||
// level: "ปฏิบัติการ",
|
|
||||||
// institution: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// no: "5",
|
|
||||||
// name: "นางสาวฐิติรัตน์ พงษ์ศิริ",
|
|
||||||
// position: "นักจัดการงานทั่วไป",
|
|
||||||
// level: "ปฏิบัติการ",
|
|
||||||
// institution: "กลุ่มงานช่วยนักบริหาร",
|
|
||||||
// },
|
|
||||||
]);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getpersonalList();
|
getpersonalList();
|
||||||
|
|
@ -291,24 +255,18 @@ const clickDelete = (id: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickAdd = (id: string) => {
|
const clickAdd = (id: string) => {
|
||||||
$q.dialog({
|
dialogConfirm(
|
||||||
title: "ยืนยันการเพิ่มข้อมูล",
|
$q,
|
||||||
message: "ต้องการเพิ่มข้อมูลนี้ใช่หรือไม่?",
|
async () => {
|
||||||
cancel: {
|
|
||||||
flat: true,
|
|
||||||
color: "negative",
|
|
||||||
},
|
|
||||||
persistent: true,
|
|
||||||
})
|
|
||||||
.onOk(async () => {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
const postData = {
|
const postData = {
|
||||||
personal_id: id,
|
personal_id: id,
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
.post(config.API.personalAdd(), postData)
|
.post(config.API.personalAdd(), postData)
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
getpersonalList();
|
getpersonalList();
|
||||||
|
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -317,9 +275,24 @@ const clickAdd = (id: string) => {
|
||||||
clickClose();
|
clickClose();
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
})
|
},
|
||||||
.onCancel(() => {})
|
"ยันยันการเพิ่มข้อมูล",
|
||||||
.onDismiss(() => {});
|
"ต้องการเพิ่มข้อมูลนี้หรือไม่ ?"
|
||||||
|
);
|
||||||
|
// $q.dialog({
|
||||||
|
// title: "ยืนยันการเพิ่มข้อมูล",
|
||||||
|
// message: "ต้องการเพิ่มข้อมูลนี้ใช่หรือไม่?",
|
||||||
|
// cancel: {
|
||||||
|
// flat: true,
|
||||||
|
// color: "negative",
|
||||||
|
// },
|
||||||
|
// persistent: true,
|
||||||
|
// })
|
||||||
|
// .onOk(async () => {
|
||||||
|
|
||||||
|
// })
|
||||||
|
// .onCancel(() => {})
|
||||||
|
// .onDismiss(() => {});
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickClose = async () => {
|
const clickClose = async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue