fix: dataStore.typeLeave
This commit is contained in:
parent
01dc0ad348
commit
7101a189e9
4 changed files with 5 additions and 1 deletions
|
|
@ -141,7 +141,6 @@ watch(
|
|||
|
||||
/**Hook */
|
||||
onMounted(() => {
|
||||
dataStore.typeLeave = "";
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -316,6 +316,7 @@ export const useLeaveStore = defineStore("Leave", () => {
|
|||
const data = res.data.result;
|
||||
dateSendLeave.value = data.dateSendLeave;
|
||||
leaveTypeName.value = data.leaveTypeName;
|
||||
typeLeave.value = data.leaveTypeName;
|
||||
fullName.value = data.fullName;
|
||||
positionName.value = data.positionName;
|
||||
positionLevelName.value = data.positionLevelName;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,8 @@ function filterOptionFn(val: string, update: Function) {
|
|||
}
|
||||
|
||||
onMounted(async () => {
|
||||
dataStore.typeLeave = "";
|
||||
|
||||
if (dataStore.options.length == 0) {
|
||||
await fectOptionType();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,6 +320,8 @@ async function fectOptionType() {
|
|||
* เรียกใช้งาน fetchData เพื่อดึงข้อมูล
|
||||
*/
|
||||
onMounted(async () => {
|
||||
dataStore.typeLeave = "";
|
||||
|
||||
if (dataStore.options.length == 0) {
|
||||
fectOptionType();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue