set file build image

This commit is contained in:
Kittapath 2023-11-07 19:23:16 +07:00
parent a079fcd0ae
commit 970c582e34
7 changed files with 1793 additions and 2223 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
<script setup lang="ts">
import { ref } from "vue";
const rightDrawerOpen = ref(false);
const text = ref("");
import { ref } from "vue"
const rightDrawerOpen = ref(false)
const text = ref("")
</script>
<template>
<!-- <div class="row col-12">
<!-- <div class="row col-12">
<div class="col-9">
<div class="toptitle text-dark col-12 row items-center">
อการใชงานระบบบรหารทรพยากรบคคลของกรงเทพมหานคร
@ -26,422 +26,170 @@ const text = ref("");
</div>
</q-card> -->
<q-card
flat
bordered
class="col-12 q-pa-md"
style="border-radius: 0px 0px 8px 8px"
>
<div style="font-weight: bold; font-size: 15px; color: #00aa86">
2.3 อมลตำแหนงของขาราชการ
</div>
<q-card flat bordered class="col-12 q-pa-md" style="border-radius: 0px 0px 8px 8px">
<div style="font-weight: bold; font-size: 15px; color: #00aa86">2.3 อมลตำแหนงของขาราชการ</div>
<div class="col-12" style="margin-top: 20px; margin-left: 10px">
- เมอกดเลอกเมน อมลตำแหนงของขาราชการ จะปรากฏรายละเอยดดงรปภาพ
</div>
<div class="col-12" style="margin-top: 20px; margin-left: 10px">- เมอกดเลอกเมน อมลตำแหนงของขาราชการ จะปรากฏรายละเอยดดงรปภาพ</div>
<div class="col-12">
<q-img
src="@/assets/manual/02_data/4_Officer/2-41.png"
style="
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 41 รายละเอยดขอมลตำแหนงของขาราชการ
</div>
</div>
<div class="col-12">
<q-img src="@/assets/manual/02_data/4_officer/2-41.png" style="display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px" />
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 41 รายละเอยดขอมลตำแหนงของขาราชการ</div>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- เลอกกดแถบเมนอย ตำแหนงประเภท, อสายงาน, อตำแหนงสายงาน,
าน/สาขาของสายงาน, ระดบตำแหน, อตำแหนงทางการบรหาร,
านทางการบรหารหร สถานะของตำแหน ระบบแสดงขอมลโดยสามารถเพ
ลบหรอแกไขขอมลไดงรปภาพ
งเมนอยอนๆสามารถทำตามขนตอนดงตอไปนไดเนองจากมการทำและการแสดง
หนาจอเหมอนกนและในกรอบสแดงทองคนหาสามารถสบคนขอมลและชองคอลมนสามารถเลอกรายการเพอซอน
</p>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- เลอกกดแถบเมนอย ตำแหนงประเภท, อสายงาน, อตำแหนงสายงาน, าน/สาขาของสายงาน, ระดบตำแหน, อตำแหนงทางการบรหาร, านทางการบรหารหร สถานะของตำแหน
ระบบแสดงขอมลโดยสามารถเพ ลบหรอแกไขขอมลไดงรปภาพ งเมนอยอนๆสามารถทำตามขนตอนดงตอไปนไดเนองจากมการทำและการแสดง
หนาจอเหมอนกนและในกรอบสแดงทองคนหาสามารถสบคนขอมลและชองคอลมนสามารถเลอกรายการเพอซอน
</p>
</div>
<div class="col-12">
<q-img
src="@/assets/manual/02_data/4_Officer/2-42.png"
style="
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
"
/>
<div class="col-12">
<q-img src="@/assets/manual/02_data/4_officer/2-42.png" style="display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px" />
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 42 แถบเมนอมลตำแหนงของขาราชการ
</div>
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 42 แถบเมนอมลตำแหนงของขาราชการ</div>
<div
class="col-12"
style="
margin-top: -;
padding: 10px;
background-color: rgb(243, 243, 243);
font-size: 14px;
margin-top: 20px;
border-radius: 5px;
"
>
หมายเลข 1
คอลมนแสดงชอคอลมนแสดงขอมลยอยของขอมลตำแหนงของขาราชการ <br />
หมายเลข 2
องสำหรบกรอกคนหาและเลอกคอลมนแสดงขอมลตามทไดไดการคนหา
</div>
</div>
<div class="col-12" style="margin-top: -; padding: 10px; background-color: rgb(243, 243, 243); font-size: 14px; margin-top: 20px; border-radius: 5px">
หมายเลข 1 คอลมนแสดงชอคอลมนแสดงขอมลยอยของขอมลตำแหนงของขาราชการ <br />
หมายเลข 2 องสำหรบกรอกคนหาและเลอกคอลมนแสดงขอมลตามทไดไดการคนหา
</div>
</div>
<div class="col-12">
<p style="margin-top: 50px; margin-left: 10px">
- กดไอคอน
<q-icon
name="mdi-pencil-outline"
style="margin: 0 5px; color: #02a998"
size="xs"
/>
เพอเพ ลบหรอแกไขขอม ระบบแสดงดงรปภาพ
โดยสามารถแกไขรายการทอยไดเลย
</p>
</div>
<div class="col-12">
<p style="margin-top: 50px; margin-left: 10px">
- กดไอคอน
<q-icon name="mdi-pencil-outline" style="margin: 0 5px; color: #02a998" size="xs" />
เพอเพ ลบหรอแกไขขอม ระบบแสดงดงรปภาพ โดยสามารถแกไขรายการทอยไดเลย
</p>
</div>
<div class="col-12">
<q-img
src="@/assets/manual/02_data/4_Officer/2-43.png"
style="
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
"
/>
<div class="col-12">
<q-img src="@/assets/manual/02_data/4_officer/2-43.png" style="display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px" />
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 43 แกไขหรอลบขอม
</div>
</div>
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 43 แกไขหรอลบขอม</div>
</div>
<div class="col-12">
<p style="margin-top: 50px; margin-left: 10px">
- กดไอคอน
<q-icon
name="mdi-plus"
style="margin: 0 5px; color: #00aa86"
size="xs"
/>
เพอเพมขอมลระบบจะปรากฏชองเพอใหเพมขอมลดงรปภาพและเมอกรอกเพอเพมขอมลเรยบรอยแลวใหกดไอคอน
<q-icon
name="mdi-content-save-outline"
style="margin: 0 5px; color: #01435f"
size="xs"
/>
เพอบนทกราง (อมลยงไมการ-เผยแพร)
โดยการบนทกเฉพาะขอมลรางนนจะมเพยงผแลระบบเทานนทเหนได
สามารถกดไอคอน
<q-icon
name="mdi-file-remove-outline"
style="margin: 0 5px; color: hsl(0, 100%, 50%)"
size="xs"
/>
เพอลบบนทกรางและสามารถกดไอคอน
<q-icon
name="mdi-cloud-upload-outline"
style="margin: 0 5px; color: #01435f"
size="xs"
/>
เพอเผยแพรอม
โดยในสวนการเผยแพรอมลนนผแลระบบมการตรวจสอบความถกตองเรยบรอยแล
และไดทำการเผยแพรใหเจาหนาทกคนเหนขอม
</p>
<div class="col-12">
<p style="margin-top: 50px; margin-left: 10px">
- กดไอคอน
<q-icon name="mdi-plus" style="margin: 0 5px; color: #00aa86" size="xs" />
เพอเพมขอมลระบบจะปรากฏชองเพอใหเพมขอมลดงรปภาพและเมอกรอกเพอเพมขอมลเรยบรอยแลวใหกดไอคอน
<q-icon name="mdi-content-save-outline" style="margin: 0 5px; color: #01435f" size="xs" />
เพอบนทกราง (อมลยงไมการ-เผยแพร) โดยการบนทกเฉพาะขอมลรางนนจะมเพยงผแลระบบเทานนทเหนได สามารถกดไอคอน
<q-icon name="mdi-file-remove-outline" style="margin: 0 5px; color: hsl(0, 100%, 50%)" size="xs" />
เพอลบบนทกรางและสามารถกดไอคอน
<q-icon name="mdi-cloud-upload-outline" style="margin: 0 5px; color: #01435f" size="xs" />
เพอเผยแพรอม โดยในสวนการเผยแพรอมลนนผแลระบบมการตรวจสอบความถกตองเรยบรอยแล และไดทำการเผยแพรใหเจาหนาทกคนเหนขอม
</p>
<q-img
src="@/assets/manual/02_data/4_Officer/2-44.png"
style="
max-width: 100%;
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
border: 1px solid #97b2de;
"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 44 เพมขอมลในชองทปรากฏ
</div>
<q-img src="@/assets/manual/02_data/4_officer/2-44.png" style="max-width: 100%; display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px; border: 1px solid #97b2de" />
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 44 เพมขอมลในชองทปรากฏ</div>
<div
style="
margin-top: 20px;
padding: 10px;
background-color: #f3f3f3;
font-size: 14px;
color: #000000;
border-radius: 5px;
"
>
หมายเลข 1
องสำหรบกรอกเพมขอมลชอหนวยงาน/หนวยงานตนสงก/วนรายการตนสงก
<div style="margin-left: 50px">
- เมอไมองการเพมขอมลแลวใหกดไอคอน
<q-icon
name="mdi-trash-can-outline"
style="margin: 0 5px; color: hsl(0, 100%, 50%)"
size="xs"
/>
เพอลบชองเพมขอม <br />
- เมอตองการปดสถานะใหกดตรงไอคอน
<div
class="q-toggle__inner relative-position non-selectable q-toggle__inner--truthy text-positive"
aria-hidden="true"
style="
font-size: 24px;
display: inline-block;
padding: 0 0.3em !important ;
height: 0.35em;
"
>
<div
class="q-toggle__thumb absolute flex flex-center no-wrap"
style="top: -0.08em"
></div>
<div class="q-toggle__track"></div>
</div>
เพอทจะไมแสดงขอมลนนในหนาอนจากนนใหกดไอคอน
<q-icon
name="mdi-content-save-outline"
style="margin: 0 5px; color: #01435f"
size="xs"
/>
เพอบนทกราง และกดไอคอน
<q-icon
name="mdi-cloud-upload-outline"
style="margin: 0 5px; color: #01435f"
size="xs"
/>
เพอเผยแพรอม
</div>
</div>
</div>
<div style="margin-top: 20px; padding: 10px; background-color: #f3f3f3; font-size: 14px; color: #000000; border-radius: 5px">
หมายเลข 1 องสำหรบกรอกเพมขอมลชอหนวยงาน/หนวยงานตนสงก/วนรายการตนสงก
<div style="margin-left: 50px">
- เมอไมองการเพมขอมลแลวใหกดไอคอน
<q-icon name="mdi-trash-can-outline" style="margin: 0 5px; color: hsl(0, 100%, 50%)" size="xs" />
เพอลบชองเพมขอม <br />
- เมอตองการปดสถานะใหกดตรงไอคอน
<div
class="q-toggle__inner relative-position non-selectable q-toggle__inner--truthy text-positive"
aria-hidden="true"
style="font-size: 24px; display: inline-block; padding: 0 0.3em !important ; height: 0.35em"
>
<div class="q-toggle__thumb absolute flex flex-center no-wrap" style="top: -0.08em"></div>
<div class="q-toggle__track"></div>
</div>
เพอทจะไมแสดงขอมลนนในหนาอนจากนนใหกดไอคอน
<q-icon name="mdi-content-save-outline" style="margin: 0 5px; color: #01435f" size="xs" />
เพอบนทกราง และกดไอคอน
<q-icon name="mdi-cloud-upload-outline" style="margin: 0 5px; color: #01435f" size="xs" />
เพอเผยแพรอม
</div>
</div>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- เมอกดไอคอน
<q-icon
name="mdi-content-save-outline"
style="margin: 0 5px; color: #01435f"
size="xs"
/>
เพอบนทกราง (อมลยงไมการเผยแพร) ระบบปรากฏปาย
นทกขอมลรางสำเร งรปภาพ
</p>
</div>
<div class="col-12">
<q-img
src="@/assets/manual/02_data/4_Officer/2-45.png"
style="
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 45 าย นทกขอมลรางสำเร
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- เมอกดไอคอน
<q-icon name="mdi-content-save-outline" style="margin: 0 5px; color: #01435f" size="xs" />
เพอบนทกราง (อมลยงไมการเผยแพร) ระบบปรากฏปาย นทกขอมลรางสำเร งรปภาพ
</p>
</div>
<div class="col-12">
<q-img src="@/assets/manual/02_data/4_officer/2-45.png" style="display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px" />
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 45 าย นทกขอมลรางสำเร</div>
<div
class="col-12"
style="
margin-top: -;
padding: 10px;
background-color: rgb(243, 243, 243);
font-size: 14px;
margin-top: 20px;
border-radius: 5px;
"
>
หมายเลข 1 ระบบแสดงสถานะ นทกขอมลรางสำเร
หลงจากกดบนทกเพมขอมลตำแหนงของขาราชการ
</div>
</div>
<div class="col-12" style="margin-top: -; padding: 10px; background-color: rgb(243, 243, 243); font-size: 14px; margin-top: 20px; border-radius: 5px">
หมายเลข 1 ระบบแสดงสถานะ นทกขอมลรางสำเร หลงจากกดบนทกเพมขอมลตำแหนงของขาราชการ
</div>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
- กดไอคอน
<q-icon
name="mdi-file-remove-outline"
style="margin: 0 5px; color: hsl(0, 100%, 50%)"
size="xs"
/>
เพอลบบนทกราง ระบบจะขนปาย องการลบขอมลบนทกรางนหรอไม?
งรปภาพ
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
- กดไอคอน
<q-icon name="mdi-file-remove-outline" style="margin: 0 5px; color: hsl(0, 100%, 50%)" size="xs" />
เพอลบบนทกราง ระบบจะขนปาย องการลบขอมลบนทกรางนหรอไม? งรปภาพ
<q-img
class="col-12"
src="@/assets/manual/02_data/4_Officer/2-46.png"
style="
max-width: 70%;
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
border: 1px solid #97b2de;
"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 46 าย องการลบขอมลบนทกรางนหรอไม?
</div>
</div>
<q-img
class="col-12"
src="@/assets/manual/02_data/4_officer/2-46.png"
style="max-width: 70%; display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px; border: 1px solid #97b2de"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 46 าย องการลบขอมลบนทกรางนหรอไม?</div>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- เมอกดป ลบบนท ระบบปรากฏปาย ลบขอมลรางสำเร งรปภาพ
และเมอกดป ยกเล ระบบจะไมทำการลบขอมลราง
</p>
</div>
<div class="col-12">
<q-img
src="@/assets/manual/02_data/4_Officer/2-47.png"
style="
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 47 าย ลบขอมลรางสำเร
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>- เมอกดป ลบบนท ระบบปรากฏปาย ลบขอมลรางสำเร งรปภาพ และเมอกดป ยกเล ระบบจะไมทำการลบขอมลราง</p>
</div>
<div class="col-12">
<q-img src="@/assets/manual/02_data/4_officer/2-47.png" style="display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px" />
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 47 าย ลบขอมลรางสำเร</div>
<div
class="col-12"
style="
margin-top: -;
padding: 10px;
background-color: rgb(243, 243, 243);
font-size: 14px;
margin-top: 20px;
border-radius: 5px;
"
>
หมายเลข 1 ระบบแสดงสถานะ ลบขอมลสำเร
หลงจากคลกยนยนการลบขอมลตำแหนงของขาราชการ
</div>
</div>
<div class="col-12" style="margin-top: -; padding: 10px; background-color: rgb(243, 243, 243); font-size: 14px; margin-top: 20px; border-radius: 5px">
หมายเลข 1 ระบบแสดงสถานะ ลบขอมลสำเร หลงจากคลกยนยนการลบขอมลตำแหนงของขาราชการ
</div>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- กดไอคอน
<q-icon
name="mdi-cloud-upload-outline"
style="margin: 0 5px; color: #01435f"
size="xs"
/>
เพอเผยแพรอมลระบบปรากฏปาย องการเผยแพรอมลนหรอไม?
งรปภาพ
</p>
</div>
<div class="col-12">
<q-img
src="@/assets/manual/02_data/4_Officer/2-48.png"
style="
max-width: 70%;
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
border: 1px solid #97b2de;
"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 48 าย องการเผยแพรอมลนหรอไม?
</div>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- กดไอคอน
<q-icon name="mdi-cloud-upload-outline" style="margin: 0 5px; color: #01435f" size="xs" />
เพอเผยแพรอมลระบบปรากฏปาย องการเผยแพรอมลนหรอไม? งรปภาพ
</p>
</div>
<div class="col-12">
<q-img src="@/assets/manual/02_data/4_officer/2-48.png" style="max-width: 70%; display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px; border: 1px solid #97b2de" />
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 48 าย องการเผยแพรอมลนหรอไม?</div>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- เมอกดป เผยแพร ระบบปรากฏปาย เผยแพรอมลสำเร งรปภาพ
และเมอกดปยกเล ระบบจะไมทำการเผยแพรอม
</p>
</div>
<div class="col-12">
<q-img
src="@/assets/manual/02_data/4_Officer/2-49.png"
style="
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 49 าย เผยแพรอมลสำเร
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>- เมอกดป เผยแพร ระบบปรากฏปาย เผยแพรอมลสำเร งรปภาพ และเมอกดปยกเล ระบบจะไมทำการเผยแพรอม</p>
</div>
<div class="col-12">
<q-img src="@/assets/manual/02_data/4_officer/2-49.png" style="display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px" />
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 49 าย เผยแพรอมลสำเร</div>
<div
class="col-12"
style="
margin-top: -;
padding: 10px;
background-color: rgb(243, 243, 243);
font-size: 14px;
margin-top: 20px;
border-radius: 5px;
"
>
หมายเลข 1 ระบบแสดงสถานะ เผยแพรอมลสำเร
หลงจากคลกเผยแพรอมลตำแหน
</div>
</div>
<div class="col-12" style="margin-top: -; padding: 10px; background-color: rgb(243, 243, 243); font-size: 14px; margin-top: 20px; border-radius: 5px">
หมายเลข 1 ระบบแสดงสถานะ เผยแพรอมลสำเร หลงจากคลกเผยแพรอมลตำแหน
</div>
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- กดไอคอน
<q-icon
name="mdi-history"
style="margin: 0 5px; color: #31ccec"
size="xs"
/>
เพอดประวอมลแกไข งรปภาพ
ในกรอบสแดงสามารถกรอกทองคนหาเพอสบคนขอมลหรอทองคอลมนสามารถเลอกรายการเพอซอน
</p>
</div>
<div class="col-12">
<q-img
src="@/assets/manual/02_data/4_Officer/2-50.png"
style="
display: block;
margin: 0 auto;
border-radius: 20px;
margin-top: 20px;
"
/>
<div class="text-center text-grey-6" style="margin-top: 20px">
ปภาพท 2 - 50 หนาประวแกไขขอม
</div>
<div class="col-12" style="margin-top: 50px; margin-left: 10px">
<p>
- กดไอคอน
<q-icon name="mdi-history" style="margin: 0 5px; color: #31ccec" size="xs" />
เพอดประวอมลแกไข งรปภาพ ในกรอบสแดงสามารถกรอกทองคนหาเพอสบคนขอมลหรอทองคอลมนสามารถเลอกรายการเพอซอน
</p>
</div>
<div class="col-12">
<q-img src="@/assets/manual/02_data/4_officer/2-50.png" style="display: block; margin: 0 auto; border-radius: 20px; margin-top: 20px" />
<div class="text-center text-grey-6" style="margin-top: 20px">ปภาพท 2 - 50 หนาประวแกไขขอม</div>
<div
class="col-12"
style="
margin-top: -;
padding: 10px;
background-color: rgb(243, 243, 243);
font-size: 14px;
margin-top: 20px;
border-radius: 5px;
"
>
หมายเลข 1
องสำหรบกรอกขอมลเพอคนหาและเลอกคอลมนแสดงขอมลประวแกไขชอตำแหนงของขาราชการททำการกรอกคนหา
</div>
</div>
</q-card>
<!-- </div>
<div class="col-12" style="margin-top: -; padding: 10px; background-color: rgb(243, 243, 243); font-size: 14px; margin-top: 20px; border-radius: 5px">
หมายเลข 1 องสำหรบกรอกขอมลเพอคนหาและเลอกคอลมนแสดงขอมลประวแกไขชอตำแหนงของขาราชการททำการกรอกคนหา
</div>
</div>
</q-card>
<!-- </div>
</div> -->
</template>

View file

@ -1,79 +1,79 @@
import { createRouter, createWebHistory } from "vue-router";
import { createRouter, createWebHistory } from "vue-router"
const MainLayout = () => import("@/views/MainLayout.vue");
const Dashboard = () => import("@/views/Dashboard.vue");
const Error404NotFound = () => import("@/views/Error404NotFound.vue");
const MainLayout = () => import("@/views/MainLayout.vue")
const Dashboard = () => import("@/views/Dashboard.vue")
const Error404NotFound = () => import("@/views/Error404NotFound.vue")
import ModuleManual from "@/modules/01_manual/router";
import ModuleManual from "@/modules/01_manual/router"
// TODO: ใช้หรือไม่?
import keycloak from "@/plugins/keycloak";
import keycloak from "@/plugins/keycloak"
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: "/",
name: "home",
component: MainLayout,
children: [
{
path: "/",
name: "dashboard",
component: Dashboard,
meta: {
Auth: true,
Key: [7],
Role: "dashboard",
},
},
...ModuleManual,
],
},
/**
* 404 Not Found
* ref: https://router.vuejs.org/guide/essentials/dynamic-matching.html#catch-all-404-not-found-route
*/
{
// path: "/:catchAll(.*)*", // TODO: ใช้ pathMatch แทนตามในเอกสารแนะนำ คงไว้เผื่อจำเป็น
path: "/:pathMatch(.*)*",
component: Error404NotFound,
},
],
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: "/",
name: "home",
component: MainLayout,
children: [
// {
// path: "/",
// name: "dashboard",
// component: Dashboard,
// meta: {
// Auth: true,
// Key: [7],
// Role: "dashboard",
// },
// },
...ModuleManual,
],
},
/**
* 404 Not Found
* ref: https://router.vuejs.org/guide/essentials/dynamic-matching.html#catch-all-404-not-found-route
*/
{
// path: "/:catchAll(.*)*", // TODO: ใช้ pathMatch แทนตามในเอกสารแนะนำ คงไว้เผื่อจำเป็น
path: "/:pathMatch(.*)*",
component: Error404NotFound,
},
],
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition;
} else if (to.hash) {
return {
el: to.hash,
behavior: "smooth",
};
}
},
});
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition
} else if (to.hash) {
return {
el: to.hash,
behavior: "smooth",
}
}
},
})
router.beforeEach((to, from, next) => {
if (to.meta.Auth) {
if (!keycloak.authenticated) {
keycloak.login({
redirectUri: `${window.location.protocol}//${window.location.host}${to.path}`,
locale: "th",
});
} else {
// keycloak.updateToken(60);
const role = keycloak.tokenParsed?.role;
if (role.includes(to.meta.Role)) {
next();
} else {
next({ path: "" });
// next();
}
}
} else {
next();
}
// next();
});
// if (to.meta.Auth) {
// if (!keycloak.authenticated) {
// keycloak.login({
// redirectUri: `${window.location.protocol}//${window.location.host}${to.path}`,
// locale: "th",
// })
// } else {
// // keycloak.updateToken(60);
// const role = keycloak.tokenParsed?.role
// if (role.includes(to.meta.Role)) {
// next()
// } else {
// next({ path: "" })
// // next();
// }
// }
// } else {
// next()
// }
next()
})
export default router;
export default router

File diff suppressed because it is too large Load diff