2024-03-08 16:08:46 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref } from "vue";
|
2024-06-10 18:00:12 +07:00
|
|
|
import { useRoute } from "vue-router";
|
2024-03-08 16:08:46 +07:00
|
|
|
|
2024-08-01 12:12:28 +07:00
|
|
|
import { useRegistryDetailNewDataStore } from "@/modules/04_registryPerson/stores/DetailMain";
|
2024-03-08 16:08:46 +07:00
|
|
|
|
2024-08-01 12:12:28 +07:00
|
|
|
import PersonalInformationMain from "@/modules/04_registryPerson/components/detail/PersonalInformation/Main.vue";
|
|
|
|
|
import GovernmentInformationMain from "@/modules/04_registryPerson/components/detail/GovernmentInformation/Main.vue";
|
|
|
|
|
import salaryMain from "@/modules/04_registryPerson/components/detail/Salary/Main.vue";
|
|
|
|
|
import AchievementMain from "@/modules/04_registryPerson/components/detail/Achievement/Main.vue";
|
|
|
|
|
import OtherMaim from "@/modules/04_registryPerson/components/detail/Other/Main.vue";
|
|
|
|
|
import EmployeeMain from "@/modules/04_registryPerson/components/detail/Employee/Main.vue";
|
2024-06-10 18:00:12 +07:00
|
|
|
|
|
|
|
|
const route = useRoute();
|
2024-03-08 16:08:46 +07:00
|
|
|
|
|
|
|
|
const store = useRegistryDetailNewDataStore();
|
2024-05-16 09:41:57 +07:00
|
|
|
const props = defineProps({
|
|
|
|
|
fetchDataPersonal: { type: Function, require: true },
|
|
|
|
|
});
|
2024-03-08 16:08:46 +07:00
|
|
|
|
|
|
|
|
const itemsTab = ref<any>([
|
|
|
|
|
{
|
|
|
|
|
name: "1",
|
|
|
|
|
icon: "mdi-account",
|
|
|
|
|
label: "ข้อมูลส่วนตัว",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "2",
|
|
|
|
|
icon: "mdi-account-tie",
|
2024-06-10 18:00:12 +07:00
|
|
|
label:
|
2024-08-28 16:24:33 +07:00
|
|
|
route.name === "registry-employeeId"
|
2024-06-10 18:00:12 +07:00
|
|
|
? "ข้อมูลลูกจ้างชั่วคราว"
|
|
|
|
|
: "ข้อมูลราชการ",
|
2024-03-08 16:08:46 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "3",
|
2024-03-11 10:11:32 +07:00
|
|
|
icon: "mdi-cash",
|
2024-03-11 17:59:36 +07:00
|
|
|
label: "เงินเดือน/ค่าจ้าง",
|
2024-03-08 16:08:46 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "4",
|
2024-03-11 10:11:32 +07:00
|
|
|
icon: "mdi-medal",
|
2024-03-11 17:59:36 +07:00
|
|
|
label: "ข้อมูลผลงาน",
|
2024-03-08 16:08:46 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "5",
|
|
|
|
|
icon: "mdi-bookmark",
|
2024-03-11 17:59:36 +07:00
|
|
|
label: "ข้อมูลอื่นๆ",
|
2024-03-08 16:08:46 +07:00
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const splitterModel = ref<number>(12);
|
|
|
|
|
</script>
|
2024-03-12 15:51:47 +07:00
|
|
|
|
2024-03-08 16:08:46 +07:00
|
|
|
<template>
|
2024-04-29 17:31:02 +07:00
|
|
|
<q-splitter v-model="splitterModel" disable class="split">
|
|
|
|
|
<template v-slot:before>
|
|
|
|
|
<div class="">
|
|
|
|
|
<!-- bg-tab-regi -->
|
|
|
|
|
<q-tabs
|
2024-04-22 17:08:23 +07:00
|
|
|
v-model="store.tabMain"
|
|
|
|
|
vertical
|
2024-04-29 17:31:02 +07:00
|
|
|
class="text-grey-6 text-weight-light"
|
|
|
|
|
active-class="bg-white text-blue-8 text-weight-bold bg-blue-1"
|
|
|
|
|
><!-- indicator-color="transparent" -->
|
|
|
|
|
<q-tab
|
|
|
|
|
class="q-py-sm"
|
2024-04-22 17:08:23 +07:00
|
|
|
v-for="(tab, index) in itemsTab"
|
|
|
|
|
:key="index"
|
|
|
|
|
:name="tab.name"
|
2024-04-29 17:31:02 +07:00
|
|
|
:icon="tab.icon"
|
|
|
|
|
:label="tab.label"
|
|
|
|
|
/><!-- hover-tab -->
|
|
|
|
|
</q-tabs>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:after>
|
|
|
|
|
<q-tab-panels
|
|
|
|
|
v-model="store.tabMain"
|
|
|
|
|
animated
|
|
|
|
|
swipeable
|
|
|
|
|
vertical
|
|
|
|
|
transition-prev="jump-up"
|
|
|
|
|
transition-next="jump-up"
|
|
|
|
|
class="q-pa-none"
|
|
|
|
|
><!-- split -->
|
|
|
|
|
<q-tab-panel
|
|
|
|
|
v-for="(tab, index) in itemsTab"
|
|
|
|
|
:key="index"
|
|
|
|
|
:name="tab.name"
|
|
|
|
|
class="q-pa-none"
|
|
|
|
|
>
|
2024-05-16 09:41:57 +07:00
|
|
|
<PersonalInformationMain
|
|
|
|
|
v-if="store.tabMain === '1'"
|
|
|
|
|
:fetchDataPersonal="props.fetchDataPersonal"
|
|
|
|
|
/>
|
2024-06-10 18:00:12 +07:00
|
|
|
<EmployeeMain
|
2024-08-28 16:24:33 +07:00
|
|
|
v-if="store.tabMain === '2' && route.name === 'registry-employeeId'"
|
2024-06-10 18:00:12 +07:00
|
|
|
/>
|
|
|
|
|
<GovernmentInformationMain v-else-if="store.tabMain === '2'" />
|
|
|
|
|
|
2024-04-29 17:31:02 +07:00
|
|
|
<salaryMain v-if="store.tabMain === '3'" />
|
|
|
|
|
<AchievementMain v-if="store.tabMain === '4'" />
|
|
|
|
|
<OtherMaim v-if="store.tabMain === '5'" />
|
|
|
|
|
</q-tab-panel>
|
|
|
|
|
</q-tab-panels>
|
|
|
|
|
</template>
|
|
|
|
|
</q-splitter>
|
2024-03-08 16:08:46 +07:00
|
|
|
</template>
|
|
|
|
|
|
2024-03-11 11:25:42 +07:00
|
|
|
<style scoped>
|
|
|
|
|
.hover-tab:hover {
|
|
|
|
|
background-color: #0793f1;
|
|
|
|
|
color: white !important;
|
2024-03-11 13:12:38 +07:00
|
|
|
opacity: 1 !important;
|
2024-03-11 11:25:42 +07:00
|
|
|
}
|
2024-04-29 17:31:02 +07:00
|
|
|
.bg-tab-regi {
|
2024-04-22 17:08:23 +07:00
|
|
|
background-color: #273238;
|
2024-04-29 17:31:02 +07:00
|
|
|
}
|
|
|
|
|
.split {
|
2024-04-22 17:08:23 +07:00
|
|
|
border-radius: 10px !important;
|
|
|
|
|
}
|
2024-03-11 11:25:42 +07:00
|
|
|
</style>
|