รายการแต่งตั้ง-เลื่อน-ย้าย จัดโค้ด + component

This commit is contained in:
setthawutttty 2023-09-19 18:04:54 +07:00
parent 1185971f99
commit 6961e719f0
5 changed files with 401 additions and 420 deletions

View file

@ -9,7 +9,7 @@ import config from "@/app.config";
const $q = useQuasar();
const mixin = useCounterMixin(); //
const { date2Thai, hideLoader, messageError, showLoader, success } = mixin; //
const { date2Thai, hideLoader, messageError, showLoader, success,dialogConfirm } = mixin; //
const notFound = ref<string>("ไม่พบข้อมูลที่ค้นหา");
const noData = ref<string>("ไม่พบข้อมูลผังโครงสร้าง");
@ -199,19 +199,17 @@ const editDataStatus = ref<boolean>(false);
const clickEditRow = () => {
editDataStatus.value = true;
};
const closeModal = () => {
if (editDataStatus.value == true) {
$q.dialog({
title: `ข้อมูลมีการแก้ไข`,
message: `ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?`,
cancel: "ยกเลิก",
ok: "ยืนยัน",
persistent: true,
}).onOk(() => {
editDataStatus.value = false;
closeAndClear();
});
dialogConfirm(
$q,
async () => {
editDataStatus.value = false;
await closeAndClear();
},
`ข้อมูลมีการแก้ไข`,
`ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?`
);
} else {
closeAndClear();
}