2024-04-09 15:22:23 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref } from "vue";
|
2024-04-23 11:18:33 +07:00
|
|
|
import { useKpiDataStore } from "@/modules/08_KPI/store";
|
2024-04-26 09:34:17 +07:00
|
|
|
import { useRoute } from "vue-router";
|
2024-04-09 15:22:23 +07:00
|
|
|
|
2024-04-23 11:18:33 +07:00
|
|
|
import Assessment from "@/modules/08_KPI/components/Tab/01_Assessment.vue";
|
2024-06-18 17:48:47 +07:00
|
|
|
import Result from "@/modules/08_KPI/components/Tab/04_Result.vue";
|
2024-04-26 16:42:14 +07:00
|
|
|
import CommanderAbove from "@/modules/08_KPI/components/Tab/03_CommanderAbove.vue";
|
|
|
|
|
import CommanderAboveOneStep from "@/modules/08_KPI/components/Tab/04_CommanderAboveOneStep.vue";
|
|
|
|
|
import File from "@/modules/08_KPI/components/Tab/05_File.vue";
|
2024-04-09 15:22:23 +07:00
|
|
|
|
2024-04-23 11:18:33 +07:00
|
|
|
const store = useKpiDataStore();
|
2024-04-26 09:34:17 +07:00
|
|
|
const route = useRoute();
|
2024-05-09 17:14:21 +07:00
|
|
|
|
2024-04-09 15:22:23 +07:00
|
|
|
const itemsTab = ref<any>([
|
|
|
|
|
{
|
|
|
|
|
name: "1",
|
2024-05-08 08:06:53 +07:00
|
|
|
label: "จัดทำแบบฟอร์มการประเมิน",
|
2024-04-09 15:22:23 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "2",
|
2024-05-08 08:06:53 +07:00
|
|
|
label: "รายงานความก้าวหน้า",
|
2024-04-09 15:22:23 +07:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "3",
|
2024-05-08 08:06:53 +07:00
|
|
|
label: "รายงานผลสำเร็จของงาน",
|
2024-04-26 16:42:14 +07:00
|
|
|
},
|
2024-06-18 17:48:47 +07:00
|
|
|
{
|
|
|
|
|
name: "4",
|
|
|
|
|
label: "สรุปผลการประเมิน",
|
|
|
|
|
},
|
2024-04-26 16:42:14 +07:00
|
|
|
{
|
|
|
|
|
name: "5",
|
2024-04-09 15:22:23 +07:00
|
|
|
label: "ไฟล์เอกสาร",
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
2024-04-19 15:30:39 +07:00
|
|
|
const splitterModel = ref<number>(12);
|
2024-04-09 15:22:23 +07:00
|
|
|
</script>
|
2024-04-29 17:56:09 +07:00
|
|
|
|
2024-04-09 15:22:23 +07:00
|
|
|
<template>
|
2024-05-24 16:57:35 +07:00
|
|
|
<q-splitter
|
2024-05-27 15:29:13 +07:00
|
|
|
v-if="$q.screen.gt.xs"
|
2024-05-24 16:57:35 +07:00
|
|
|
v-model="splitterModel"
|
|
|
|
|
:horizontal="!$q.screen.gt.xs"
|
|
|
|
|
disable
|
|
|
|
|
>
|
2024-04-09 15:22:23 +07:00
|
|
|
<template v-slot:before>
|
2024-04-23 11:18:33 +07:00
|
|
|
<q-tabs
|
|
|
|
|
v-model="store.tabMain"
|
2024-05-23 18:05:18 +07:00
|
|
|
:vertical="$q.screen.gt.xs"
|
2024-04-23 11:18:33 +07:00
|
|
|
class="text-grey-7 text-weight-light"
|
|
|
|
|
active-class="bg-blue-1 text-blue-8 text-weight-bold"
|
|
|
|
|
>
|
2024-05-08 08:06:53 +07:00
|
|
|
<q-tab name="1" label="จัดทำข้อตกลง" />
|
2024-05-09 12:12:58 +07:00
|
|
|
<q-tab
|
|
|
|
|
name="2"
|
|
|
|
|
label="รายงานความก้าวหน้า"
|
|
|
|
|
:disable="store.tabOpen < 2"
|
|
|
|
|
/>
|
|
|
|
|
<q-tab
|
|
|
|
|
name="3"
|
|
|
|
|
label="รายงานผลสำเร็จของงาน"
|
|
|
|
|
:disable="store.tabOpen < 3"
|
|
|
|
|
/>
|
2024-06-26 12:10:54 +07:00
|
|
|
<q-tab name="4" label="สรุปผลการประเมิน" :disable="store.tabOpen < 4" />
|
2024-04-26 16:42:14 +07:00
|
|
|
<q-tab name="5" label="ไฟล์เอกสาร" />
|
2024-04-09 15:22:23 +07:00
|
|
|
</q-tabs>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:after>
|
|
|
|
|
<q-tab-panels
|
|
|
|
|
v-model="store.tabMain"
|
|
|
|
|
animated
|
|
|
|
|
swipeable
|
|
|
|
|
vertical
|
|
|
|
|
transition-prev="jump-up"
|
|
|
|
|
transition-next="jump-up"
|
|
|
|
|
>
|
|
|
|
|
<q-tab-panel
|
|
|
|
|
v-for="(tab, index) in itemsTab"
|
|
|
|
|
:key="index"
|
|
|
|
|
:name="tab.name"
|
2024-04-19 15:30:39 +07:00
|
|
|
class="q-pa-none"
|
2024-04-09 15:22:23 +07:00
|
|
|
>
|
2024-05-14 23:48:29 +07:00
|
|
|
<Assessment v-if="store.tabMain === '1'" />
|
2024-05-09 12:12:58 +07:00
|
|
|
<Assessment v-if="store.tabMain === '2'" :type="'evaluator'" />
|
|
|
|
|
<Assessment v-if="store.tabMain === '3'" :type="'commander'" />
|
2024-06-18 17:48:47 +07:00
|
|
|
<Result v-if="store.tabMain === '4'" :type="'result'" />
|
2024-04-26 16:42:14 +07:00
|
|
|
<File v-if="store.tabMain === '5'" />
|
2024-04-09 15:22:23 +07:00
|
|
|
</q-tab-panel>
|
|
|
|
|
</q-tab-panels>
|
|
|
|
|
</template>
|
|
|
|
|
</q-splitter>
|
2024-05-24 16:57:35 +07:00
|
|
|
|
|
|
|
|
<q-list bordered class="rounded-borders" v-else>
|
2024-05-27 15:29:13 +07:00
|
|
|
<q-expansion-item
|
|
|
|
|
expand-separator
|
|
|
|
|
label="จัดทำข้อตกลง"
|
|
|
|
|
@click="store.tabMain = '1'"
|
|
|
|
|
>
|
|
|
|
|
<Assessment v-if="store.tabMain === '1'" />
|
2024-05-24 16:57:35 +07:00
|
|
|
</q-expansion-item>
|
|
|
|
|
|
2024-05-27 15:29:13 +07:00
|
|
|
<q-expansion-item
|
|
|
|
|
expand-separator
|
|
|
|
|
label="รายงานความก้าวหน้า"
|
|
|
|
|
@click="store.tabMain = '2'"
|
|
|
|
|
:disable="store.tabOpen < 2"
|
|
|
|
|
>
|
|
|
|
|
<Assessment v-if="store.tabMain === '2'" :type="'evaluator'" />
|
2024-05-24 16:57:35 +07:00
|
|
|
</q-expansion-item>
|
|
|
|
|
|
2024-05-27 15:29:13 +07:00
|
|
|
<q-expansion-item
|
|
|
|
|
expand-separator
|
|
|
|
|
label="รายงานผลสำเร็จของงาน"
|
|
|
|
|
@click="store.tabMain = '3'"
|
|
|
|
|
:disable="store.tabOpen < 3"
|
|
|
|
|
>
|
|
|
|
|
<Assessment v-if="store.tabMain === '3'" :type="'commander'" />
|
2024-05-24 16:57:35 +07:00
|
|
|
</q-expansion-item>
|
|
|
|
|
|
2024-05-27 15:29:13 +07:00
|
|
|
<q-expansion-item
|
|
|
|
|
expand-separator
|
|
|
|
|
label="ไฟล์เอกสาร"
|
|
|
|
|
@click="store.tabMain = '5'"
|
|
|
|
|
>
|
|
|
|
|
<File v-if="store.tabMain === '5'" />
|
2024-05-24 16:57:35 +07:00
|
|
|
</q-expansion-item>
|
|
|
|
|
</q-list>
|
2024-04-09 15:22:23 +07:00
|
|
|
</template>
|
2024-04-23 11:18:33 +07:00
|
|
|
|
2024-04-09 15:22:23 +07:00
|
|
|
<style scoped>
|
|
|
|
|
.hover-tab:hover {
|
|
|
|
|
background-color: #0793f1;
|
|
|
|
|
color: white !important;
|
|
|
|
|
opacity: 1 !important;
|
|
|
|
|
}
|
2024-04-23 11:18:33 +07:00
|
|
|
</style>
|