checkload
This commit is contained in:
parent
13317f94f2
commit
5ffc84daf3
6 changed files with 33 additions and 24 deletions
|
|
@ -1,5 +1,8 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { FormPlacementMainData } from "@/modules/05_placement/interface/request/Main";
|
||||
import type { FormOrderPlacementMainData } from "@/modules/05_placement/interface/request/Main";
|
||||
|
||||
|
|
@ -81,6 +84,8 @@ export const useProfileDataStore = defineStore("profilePlacenent", () => {
|
|||
};
|
||||
});
|
||||
export const usePlacementDataStore = defineStore("placement", () => {
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { hideLoader } = mixin;
|
||||
interface placement {
|
||||
mappingPosition: { columns: String[] };
|
||||
}
|
||||
|
|
@ -180,6 +185,15 @@ export const usePlacementDataStore = defineStore("placement", () => {
|
|||
}
|
||||
};
|
||||
|
||||
let count = 0; // ตัวแปรนับจำนวนค่าที่รับ
|
||||
function checkLoad(val: number) {
|
||||
count += val;
|
||||
if (count >= 3) {
|
||||
hideLoader();
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
placementData,
|
||||
changePlacementColumns,
|
||||
|
|
@ -189,6 +203,7 @@ export const usePlacementDataStore = defineStore("placement", () => {
|
|||
DataMainYearSet,
|
||||
DataMain,
|
||||
DataUpdateMain,
|
||||
checkLoad,
|
||||
};
|
||||
});
|
||||
export const useOrderPlacementDataStore = defineStore("placementOrder", () => {
|
||||
|
|
@ -330,6 +345,7 @@ export const useTransferDataStore = defineStore("transferDataStore", () => {
|
|||
return " ";
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
statusText,
|
||||
statusProbationMain,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue