Merge branch 'NiceDev' into develop
This commit is contained in:
commit
ff6101067e
1 changed files with 21 additions and 2 deletions
|
|
@ -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<string>(""); //id state ปัจุบัน
|
|||
const state = ref<number>(1); //state ปัจุบัน
|
||||
const isPermission = ref<boolean>(true); //การเข้าถึง Workflow
|
||||
const KeycloakId = ref<string>("");
|
||||
const isLoading = ref<boolean>(false); //สถานะการโหลดข้อมูล
|
||||
|
||||
const permission = ref<Permission>({
|
||||
isChangeState: false, //ส่งไปยังผู้บังคับบัญชา/ผู้มีอำนาจ
|
||||
|
|
@ -48,6 +48,7 @@ const itemState = ref<DataListState[]>([]);
|
|||
|
||||
/** ฟังก์ชันเรียกข้อมูล 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({
|
|||
<div class="q-pl-sm text-weight-bold text-dark">สถานะการดำเนินเรื่อง</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-card-section>
|
||||
<q-card-section class="col-12 q-px-lg q-py-md" v-if="isLoading">
|
||||
<q-timeline color="primary">
|
||||
<q-timeline-entry
|
||||
v-for="(step, index) in 4"
|
||||
:key="index"
|
||||
:icon="`mdi-numeric-${index + 1}`"
|
||||
color="grey-4"
|
||||
>
|
||||
<template #title>
|
||||
<q-skeleton type="rect" width="150px" height="20px" />
|
||||
</template>
|
||||
</q-timeline-entry>
|
||||
</q-timeline>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section v-else>
|
||||
<div class="q-px-lg q-py-md">
|
||||
<q-timeline color="primary">
|
||||
<q-timeline-entry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue