From 4a8874f385ac1a8c82d002d54b8e887f91effdac Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 5 Aug 2025 13:39:36 +0700 Subject: [PATCH] Skeleton Workflow --- src/components/Workflow/Main.vue | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/components/Workflow/Main.vue b/src/components/Workflow/Main.vue index 6c5f5b4..209a9c2 100644 --- a/src/components/Workflow/Main.vue +++ b/src/components/Workflow/Main.vue @@ -10,7 +10,6 @@ import type { Permission } from "@/components/Workflow/interface/index/Main"; import type { DataListState } from "@/components/Workflow/interface/response/Main"; import DialogSelectPerson from "@/components/Workflow/DialogSelectPerson.vue"; -import Keycloak from "keycloak-js"; const $q = useQuasar(); const { dialogConfirm, showLoader, hideLoader, messageError } = @@ -31,6 +30,7 @@ const stateId = ref(""); //id state ปัจุบัน const state = ref(1); //state ปัจุบัน const isPermission = ref(true); //การเข้าถึง Workflow const KeycloakId = ref(""); +const isLoading = ref(false); //สถานะการโหลดข้อมูล const permission = ref({ isChangeState: false, //ส่งไปยังผู้บังคับบัญชา/ผู้มีอำนาจ @@ -48,6 +48,7 @@ const itemState = ref([]); /** ฟังก์ชันเรียกข้อมูล Workflow ที่อยู่ปัจุบัน*/ async function fetchCheckState() { + isLoading.value = true; await http .post(config.API.workflow + `check-user-now`, { refId: id, @@ -74,6 +75,9 @@ async function fetchCheckState() { }) .catch(() => { isPermission.value = false; + }) + .finally(() => { + isLoading.value = false; }); } @@ -129,7 +133,22 @@ defineExpose({
สถานะการดำเนินเรื่อง
- + + + + + + + + +