diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 08fbe66c..8c6736e5 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -55,8 +55,36 @@ const menuList = readonly([ icon: "mdi-file-outline", activeIcon: "document", label: "คู่มือการใช้งาน", - path: "manual", + path: "", role: "metadata", + children: [ + { + key: 2.1, + label: "การเข้าสู่ระบบ", + path: "/manual", + + }, + { + key: 2.2, + label: "ระบบข้อมูลหลัก", + path: "/datamain", + }, + { + key: 2.3, + label: "ระบบโครงสร้างอัตรากำลัง", + path: "/structuremain", + }, + { + key: 2.4, + label: "ระบบทะเบียนประวัติ", + path: "/registrationmain", + }, + { + key: 2.5, + label: "หน้าจัดการระบบสรรหา", + path: "/recruitmain", + } + ] }, // { // key: 3, @@ -467,6 +495,117 @@ const menuList = readonly([ // ], // }, ]); +const tabListLogin = readonly([ + { + no: 1, + label: "การเข้าสู่หน้าระบบ", + tag: "Mainlogin", + }, + { + no: 2, + label: "การเข้าสู่ระบบโดยใช้ User name และ Password", + tag: "login", + }, + { + no: 3, + label: "การเปลี่ยนรหัสผ่านผู้ใช้งาน", + tag: "Password", + }, + { + no: 4, + label: "การลงทะเบียนผู้ใช้งานใหม่", + tag: "newuser", + }, + { + no: 5, + label: "การออกจากระบบ", + tag: "logout", + }, + { + no: 6, + label: "การแสดงแจ้งเตือน", + tag: "noti", + } +]); +const tabListDatamain = readonly([ + { + no: 1, + label: "การเข้าสู่ระบบข้อมูลหลัก", + tag: "MainData", + }, + { + no: 2, + label: "ข้อมูลเกี่ยวกับบุคคล", + tag: "About", + }, + { + no: 3, + label: "ข้อมูลโครงสร้างหน่วยงาน", + tag: "gov", + }, + { + no: 4, + label: "ข้อมูลตำแหน่งของข้าราชการ", + tag: "officer", + }, + { + no: 5, + label: "ข้อมูลตำแหน่งของลูกจ้าง", + tag: "employee", + }, + { + no: 6, + label: "ข้อมูลปฏิทินวันหยุด", + tag: "calender", + }, + { + no: 7, + label: "ข้อมูลเครื่องราชอิสริยาภรณ์", + tag: "insignia", + } +]); +const tabStructuremain = readonly([ + { + no: 1, + label: "การเข้าสู่ระบบโครงสร้างอัตรากำลัง", + tag: "structuremain", + }, + { + no: 2, + label: "จัดการตำแหน่ง", + tag: "position", + }, + { + no: 3, + label: "แผนภูมิโครงสร้าง", + tag: "structure", + }, + { + no: 4, + label: "แผนภูมิองค์กร", + tag: "organchart", + }, + { + no: 5, + label: "ผังโครงสร้าง", + tag: "chartstru", + }, + { + no: 6, + label: "จัดการบัญชี 2", + tag: "account2", + }, + { + no: 7, + label: "รายงานบัญชี", + tag: "report", + }, + { + no: 8, + label: "ผังโครงสร้างลูกจ้าง", + tag: "chartemploy", + } +]) const tabList = readonly([ { @@ -700,5 +839,5 @@ const tabList = readonly([ ]); -export { menuList, tabList }; +export { menuList, tabList, tabListLogin, tabListDatamain, tabStructuremain }; export type { ScrollType, tabType, menuType, notiType, optionType }; diff --git a/src/modules/01_manual/components/1_login/01_Main.vue b/src/modules/01_manual/components/1_login/01_Main.vue index 90c789d3..545beef8 100644 --- a/src/modules/01_manual/components/1_login/01_Main.vue +++ b/src/modules/01_manual/components/1_login/01_Main.vue @@ -7,9 +7,9 @@ const text = ref(""); \ No newline at end of file + diff --git a/src/modules/01_manual/components/1_login/03_Password.vue b/src/modules/01_manual/components/1_login/03_Password.vue index 670ed66a..731a1037 100644 --- a/src/modules/01_manual/components/1_login/03_Password.vue +++ b/src/modules/01_manual/components/1_login/03_Password.vue @@ -5,13 +5,13 @@ const text = ref(""); diff --git a/src/modules/01_manual/components/2_data/21_Main.vue b/src/modules/01_manual/components/2_data/21_Main.vue index 2c63a7d2..8afa851c 100644 --- a/src/modules/01_manual/components/2_data/21_Main.vue +++ b/src/modules/01_manual/components/2_data/21_Main.vue @@ -5,11 +5,11 @@ const text = ref(""); diff --git a/src/modules/01_manual/components/2_data/22_About.vue b/src/modules/01_manual/components/2_data/22_About.vue index 3797ffa1..2fd1dd7d 100644 --- a/src/modules/01_manual/components/2_data/22_About.vue +++ b/src/modules/01_manual/components/2_data/22_About.vue @@ -5,7 +5,7 @@ const text = ref(""); diff --git a/src/modules/01_manual/components/2_data/23_Gov.vue b/src/modules/01_manual/components/2_data/23_Gov.vue index 6a6ddbde..94abe784 100644 --- a/src/modules/01_manual/components/2_data/23_Gov.vue +++ b/src/modules/01_manual/components/2_data/23_Gov.vue @@ -5,7 +5,7 @@ const text = ref(""); diff --git a/src/modules/01_manual/components/2_data/24_Officer.vue b/src/modules/01_manual/components/2_data/24_Officer.vue index 87c4de12..5b5a9689 100644 --- a/src/modules/01_manual/components/2_data/24_Officer.vue +++ b/src/modules/01_manual/components/2_data/24_Officer.vue @@ -5,7 +5,7 @@ const text = ref(""); +
+ - เมื่อกดเลือกเมนู “ข้อมูลตำแหน่งของข้าราชการ” จะปรากฏรายละเอียดดังรูปภาพ +
+ +
+ +
+ รูปภาพที่ 2 - 41 รายละเอียดข้อมูลตำแหน่งของข้าราชการ +
+
+ +
+

+ - เลือกกดแถบเมนูย่อย “ตำแหน่งประเภท, ชื่อสายงาน, ชื่อตำแหน่งสายงาน, + ด้าน/สาขาของสายงาน, ระดับตำแหน่ง, ชื่อตำแหน่งทางการบริหาร, + ด้านทางการบริหารหรือ สถานะของตำแหน่ง” ระบบแสดงข้อมูลโดยสามารถเพิ่ม + ลบหรือแก้ไขข้อมูลได้ดังรูปภาพ + ซึ่งเมนูย่อยอื่นๆสามารถทำตามขั้นตอนดังต่อไปนี้ได้เนื่องจากมีวิธีการทำและการแสดง + หน้าจอเหมือนกันและในกรอบสีแดงที่ช่องค้นหาสามารถสืบค้นข้อมูลและช่องคอลัมน์สามารถเลือกรายการเพื่อซ่อน +

+
+ +
+ + +
+ รูปภาพที่ 2 - 42 แถบเมนูข้อมูลตำแหน่งของข้าราชการ +
+ +
+ หมายเลข 1 + คอลัมน์แสดงชื่อคอลัมน์แสดงข้อมูลย่อยของข้อมูลตำแหน่งของข้าราชการ
+ หมายเลข 2 + ช่องสำหรับกรอกค้นหาและเลือกคอลัมน์แสดงข้อมูลตามที่ได้ได้การค้นหา +
+
+ +
+

+ - กดไอคอน + + เพื่อเพิ่ม ลบหรือแก้ไขข้อมูล ระบบแสดงดังรูปภาพ + โดยสามารถแก้ไขรายการที่มีอยู่ได้เลย +

+
+ +
+ + +
+ รูปภาพที่ 2 - 43 แก้ไขหรือลบข้อมูล +
+
+ +
+

+ - กดไอคอน + + เพื่อเพิ่มข้อมูลระบบจะปรากฏช่องเพื่อให้เพิ่มข้อมูลดังรูปภาพและเมื่อกรอกเพื่อเพิ่มข้อมูลเรียบร้อยแล้วให้กดไอคอน + + เพื่อบันทึกร่าง (ข้อมูลยังไม่มีการ-เผยแพร่) + โดยการบันทึกเฉพาะข้อมูลร่างนั้นจะมีเพียงผู้ดูแลระบบเท่านั้นที่เห็นได้ + สามารถกดไอคอน + + เพื่อลบบันทึกร่างและสามารถกดไอคอน + + เพื่อเผยแพร่ข้อมูล + โดยในส่วนการเผยแพร่ข้อมูลนั้นผู้ดูแลระบบมีการตรวจสอบความถูกต้องเรียบร้อยแล้ว + และได้ทำการเผยแพร่ให้เจ้าหน้าที่ทุกคนเห็นข้อมูล +

+ + +
+ รูปภาพที่ 2 - 44 เพิ่มข้อมูลในช่องที่ปรากฏ +
+ +
+ หมายเลข 1 + ช่องสำหรับกรอกเพิ่มข้อมูลชื่อหน่วยงาน/หน่วยงานต้นสังกัด/ส่วนรายการต้นสังกัด +
+ - เมื่อไม่ต้องการเพิ่มข้อมูลแล้วให้กดไอคอน + + เพื่อลบช่องเพิ่มข้อมูล
+ - เมื่อต้องการปิดสถานะให้กดตรงไอคอน + + เพื่อที่จะไม่แสดงข้อมูลนั้นในหน้าอื่นจากนั้นให้กดไอคอน + + เพื่อบันทึกร่าง และกดไอคอน + + เพื่อเผยแพร่ข้อมูล +
+
+
+ +
+

+ - เมื่อกดไอคอน + + เพื่อบันทึกร่าง (ข้อมูลยังไม่มีการเผยแพร่) ระบบปรากฏป้าย + “บันทึกข้อมูลร่างสำเร็จ” ดังรูปภาพ +

+
+
+ +
+ รูปภาพที่ 2 - 45 ป้าย “บันทึกข้อมูลร่างสำเร็จ” +
+ +
+ หมายเลข 1 ระบบแสดงสถานะ “บันทึกข้อมูลร่างสำเร็จ” + หลังจากกดบันทึกเพิ่มข้อมูลตำแหน่งของข้าราชการ +
+
+ +
+ - กดไอคอน + + เพื่อลบบันทึกร่าง ระบบจะขึ้นป้าย “ต้องการลบข้อมูลบันทึกร่างนี้หรือไม่?” + ดังรูปภาพ + + +
+ รูปภาพที่ 2 - 46 ป้าย “ต้องการลบข้อมูลบันทึกร่างนี้หรือไม่?” +
+
+ +
+

+ - เมื่อกดปุ่ม “ลบบันทึก” ระบบปรากฏป้าย “ลบข้อมูลร่างสำเร็จ” ดังรูปภาพ + และเมื่อกดปุ่ม “ยกเลิก” ระบบจะไม่ทำการลบข้อมูลร่าง +

+
+
+ +
+ รูปภาพที่ 2 - 47 ป้าย “ลบข้อมูลร่างสำเร็จ” +
+ +
+ หมายเลข 1 ระบบแสดงสถานะ “ลบข้อมูลสำเร็จ” + หลังจากคลิกยืนยันการลบข้อมูลตำแหน่งของข้าราชการ +
+
+ +
+

+ - กดไอคอน + + เพื่อเผยแพร่ข้อมูลระบบปรากฏป้าย “ต้องการเผยแพร่ข้อมูลนี้หรือไม่?” + ดังรูปภาพ +

+
+
+ +
+ รูปภาพที่ 2 - 48 ป้าย “ต้องการเผยแพร่ข้อมูลนี้หรือไม่?” +
+
+ +
+

+ - เมื่อกดปุ่ม “เผยแพร่” ระบบปรากฏป้าย “เผยแพร่ข้อมูลสำเร็จ” ดังรูปภาพ + และเมื่อกดปุ่ม“ยกเลิก” ระบบจะไม่ทำการเผยแพร่ข้อมูล +

+
+
+ +
+ รูปภาพที่ 2 - 49 ป้าย “เผยแพร่ข้อมูลสำเร็จ” +
+ +
+ หมายเลข 1 ระบบแสดงสถานะ “เผยแพร่ข้อมูลสำเร็จ” + หลังจากคลิกเผยแพร่ข้อมูลตำแหน่ง +
+
+ +
+

+ - กดไอคอน + + เพื่อดูประวัติข้อมูลแก้ไข ดังรูปภาพ + ในกรอบสีแดงสามารถกรอกที่ช่องค้นหาเพื่อสืบค้นข้อมูลหรือที่ช่องคอลัมน์สามารถเลือกรายการเพื่อซ่อน +

+
+
+ +
+ รูปภาพที่ 2 - 50 หน้าประวัติแก้ไขข้อมูล +
+ +
+ หมายเลข 1 + ช่องสำหรับกรอกข้อมูลเพื่อค้นหาและเลือกคอลัมน์แสดงข้อมูลประวัติแก้ไขชื่อตำแหน่งของข้าราชการที่ทำการกรอกค้นหา +
+
+ + + diff --git a/src/modules/01_manual/components/2_data/25_Employee.vue b/src/modules/01_manual/components/2_data/25_Employee.vue index de136838..0b947f44 100644 --- a/src/modules/01_manual/components/2_data/25_Employee.vue +++ b/src/modules/01_manual/components/2_data/25_Employee.vue @@ -5,7 +5,7 @@ const text = ref(""); diff --git a/src/modules/01_manual/components/2_data/26_Calendar.vue b/src/modules/01_manual/components/2_data/26_Calendar.vue index 71d9c309..258d9eff 100644 --- a/src/modules/01_manual/components/2_data/26_Calendar.vue +++ b/src/modules/01_manual/components/2_data/26_Calendar.vue @@ -5,7 +5,7 @@ const text = ref(""); diff --git a/src/modules/01_manual/components/2_data/27_Insignia.vue b/src/modules/01_manual/components/2_data/27_Insignia.vue index aeac4eb8..b803d1f4 100644 --- a/src/modules/01_manual/components/2_data/27_Insignia.vue +++ b/src/modules/01_manual/components/2_data/27_Insignia.vue @@ -5,7 +5,7 @@ const text = ref(""); +
+ - เมื่อกดเลือกเมนู “ข้อมูลเครื่องราชอิสริยาภรณ์” + จะปรากฏรายละเอียดดังรูปภาพ +
+ +
+ +
+ รูปภาพที่ 2 - 76 รายละเอียดข้อมูลเครื่องราชอิสริยาภรณ์ +
+
+ +
+

+ - เลือกกดแถบเมนูย่อย “ลำดับชั้นเครื่องราชฯหรือชื่อเครื่องราชฯ” + ระบบจะแสดงข้อมูล ซึ่งจะสามารถเพิ่ม + ลบหรือแก้ไขข้อมูลได้ดังรูปภาพซึ่งเมนูย่อย อื่นๆสามารถทำตามขั้นตอน + ดังต่อไปนี้ได้เนื่องจากมีวิธีการทำและการแสดงหน้าจอเหมือนกันและในกรอบสีแดงที่ช่องค้นหาสามารถสืบค้นข้อมูลและช่องคอลัมน์สามารถเลือกรายการเพื่อซ่อน +

+
+ +
+ + +
+ รูปภาพที่ 2 - 77 รายละเอียดข้อมูลเครื่องราชอิสริยาภรณ์ +
+ +
+ หมายเลข 1 คอลัมน์สำหรับคลิกเลือกเพื่อแสดงข้อมูลตามรายชื่อที่ทำการคลิก +
+ หมายเลข 2 + ช่องสำหรับกรอกข้อมูลเพื่อค้นหาและช่องคอลัมน์สำหรับเลือกเพื่อแสดงข้อมูลตามที่ทำการค้นหา +
+
+ +
+

+ - กดไอคอน + + เพื่อเพิ่ม ลบหรือแก้ไขข้อมูล ระบบแสดงดังรูปภาพ + โดยสามารถเลือกแก้ไขรายการที่มีอยู่ได้เลย +

+
+ +
+ + +
+ รูปภาพที่ 2 - 78 แก้ไขข้อมูลเครื่องราชอิสริยาภรณ์ +
+
+ +
+

+ - กดไอคอน + + เพื่อเพิ่มข้อมูลระบบจะปรากฏช่องเพื่อให้เพิ่มข้อมูลดังรูปภาพและเมื่อกรอกเพื่อเพิ่มข้อมูลเรียบร้อยแล้วให้กดไอคอน + + เพื่อบันทึกร่าง (ข้อมูลยังไม่มีการ-เผยแพร่) + โดยการบันทึกเฉพาะข้อมูลร่างนั้นจะมีเพียงผู้ดูแลระบบเท่านั้นที่เห็นได้ + สามารถกดไอคอน + + เพื่อลบบันทึกร่างและสามารถกดไอคอน + + เพื่อเผยแพร่ข้อมูล เพื่อเผยแพร่ข้อมูล + โดยในส่วนการเผยแพร่ข้อมูลนั้นผู้ดูแลระบบมีการตรวจสอบความถูกต้องเรียบร้อยแล้ว + และได้ทำการเผยแพร่ให้เจ้าหน้าที่ทุกคนเห็นข้อมูล + และได้ทำการเผยแพร่ให้เจ้าหน้าที่ทุกคนเห็นข้อมูล +

+ + +
+ รูปภาพที่ 2 - 79 เพิ่มข้อมูลในช่องที่ปรากฏ +
+
+ หมายเลข 1 + ช่องสำหรับกรอกเพิ่มข้อมูลชื่อหน่วยงาน/หน่วยงานต้นสังกัด/ส่วนรายการต้นสังกัด +
+ - เมื่อไม่ต้องการเพิ่มข้อมูลแล้วให้กดไอคอน + + เพื่อลบช่องเพิ่มข้อมูล
+ - เมื่อต้องการปิดสถานะให้กดตรงไอคอน + + เพื่อที่จะไม่แสดงข้อมูลนั้นในหน้าอื่นจากนั้นให้กดไอคอน + + เพื่อบันทึกร่าง และกดไอคอน + + เพื่อเผยแพร่ข้อมูล +
+
+
+ +
+

+ - เมื่อกดไอคอน + + เพื่อบันทึกร่าง (ข้อมูลยังไม่มีการเผยแพร่) ระบบปรากฏป้าย + “บันทึกข้อมูลร่างสำเร็จ” ดังรูปภาพ +

+
+ +
+ + +
+ รูปภาพที่ 2 - 80 ป้าย “บันทึกข้อมูลร่างสำเร็จ” +
+ +
+ หมายเลข 1 ระบบแสดงสถานะ “บันทึกข้อมูลร่างสำเร็จ” + หลังจากคลิกบันทึกการเพิ่มข้อมูลเครื่องราชอิสริยาภรณ์ +
+
+ +
+ - กดไอคอน + + เพื่อลบบันทึกร่าง ระบบจะขึ้นป้าย “ต้องการลบข้อมูลบันทึกร่างนี้หรือไม่?” + ดังรูปภาพ + + +
+ รูปภาพที่ 2 - 81 ป้าย “ต้องการลบข้อมูลบันทึกร่างนี้หรือไม่?” +
+
+ +
+

+ - เมื่อกดปุ่ม “ลบบันทึก” ระบบปรากฏป้าย “ลบข้อมูลร่างสำเร็จ” ดังรูปภาพ + และเมื่อกดปุ่ม “ยกเลิก” ระบบจะไม่ทำการลบข้อมูลร่าง +

+
+
+ +
+ รูปภาพที่ 2 - 82 ป้าย “ลบข้อมูลร่างสำเร็จ” +
+ +
+ หมายเลข 1 ระบบแสดงสถานะ “ลบข้อมูลร่างสำเร็จ” + หลังจากที่ทำการคลิกยืนยันการลบข้อมูลร่างของข้อมูลเครื่องราชอิสริยาภรณ์ +
+
+ +
+

+ - กดไอคอน + + เพื่อเผยแพร่ข้อมูลระบบปรากฏป้าย “ต้องการเผยแพร่ข้อมูลนี้หรือไม่?” + ดังรูปภาพ +

+
+
+ +
+ รูปภาพที่ 2 - 83 ป้าย “ต้องการเผยแพร่ข้อมูลนี้หรือไม่?” +
+
+ +
+

+ - เมื่อกดปุ่ม “เผยแพร่” ระบบปรากฏป้าย “เผยแพร่ข้อมูลสำเร็จ” ดังรูปภาพ + และเมื่อกดปุ่ม“ยกเลิก” ระบบจะไม่ทำการเผยแพร่ข้อมูล +

+
+
+ +
+ รูปภาพที่ 2 - 84 ป้าย “เผยแพร่ข้อมูลสำเร็จ” +
+ +
+ หมายเลข 1 ระบบแสดงสถานะ “เผยแพร่ข้อมูลสำเร็จ” + หลังจากที่ทำการคลิกยืนยันการเผยแพร่ข้อมูลเครื่องราชอิสริยาภรณ์ +
+
+ +
+

+ - กดไอคอน + + เพื่อดูประวัติข้อมูลแก้ไข ดังรูปภาพ + ในกรอบสีแดงสามารถกรอกที่ช่องค้นหาเพื่อสืบค้นข้อมูลหรือที่ช่องคอลัมน์สามารถเลือกรายการเพื่อซ่อน +

+
+
+ +
+ รูปภาพที่ 2 - 85 หน้าประวัติแก้ไขข้อมูล +
+ +
+ หมายเลข 1 + ช่องสำหรับกรอกข้อมูลเพื่อค้นหาและช่องสำหรับคลิกเลือกคอลัมน์แสดงข้อมูล +
+
+ + + diff --git a/src/modules/01_manual/components/2_data/view.vue b/src/modules/01_manual/components/2_data/view.vue new file mode 100644 index 00000000..a510db6d --- /dev/null +++ b/src/modules/01_manual/components/2_data/view.vue @@ -0,0 +1,79 @@ + + + + diff --git a/src/modules/01_manual/router.ts b/src/modules/01_manual/router.ts index 4dc600a8..d9ed3581 100644 --- a/src/modules/01_manual/router.ts +++ b/src/modules/01_manual/router.ts @@ -1,3 +1,4 @@ +const viewLogin = () => import("@/modules/01_manual/components/1_login/view.vue") const Mainlogin = () => import("@/modules/01_manual/components/1_login/01_Main.vue"); const MainLog = () => import("@/modules/01_manual/components/1_login/02_login.vue"); const Mainpass = () => import("@/modules/01_manual/components/1_login/03_Password.vue"); @@ -6,6 +7,7 @@ const Mainlogout = () => import("@/modules/01_manual/components/1_login/05_logou const Mainnoti = () => import("@/modules/01_manual/components/1_login/06_noti.vue"); +const viewDatamain = () => import("@/modules/01_manual/components/2_data/view.vue") const Datamain = () => import("@/modules/01_manual/components/2_data/21_Main.vue"); const Dataabout = () => import("@/modules/01_manual/components/2_data/22_About.vue"); const Datagov = () => import("@/modules/01_manual/components/2_data/23_Gov.vue"); @@ -53,13 +55,23 @@ export default [ { path: "/manual", name: "manual", - component: Mainlogin, + component: viewLogin, meta: { Auth: true, Key: [10], Role: "order", }, }, + // { + // path: "/manual", + // name: "manual", + // component: Mainlogin, + // meta: { + // Auth: true, + // Key: [10], + // Role: "order", + // }, + // }, { path: "/login/log", @@ -71,7 +83,7 @@ export default [ Role: "order", }, }, - + { path: "/login/password", name: "mainpassword", @@ -122,9 +134,9 @@ export default [ { - path: "/Datamain", - name: "Datamain", - component: Datamain, + path: "/datamain", + name: "datamain", + component: viewDatamain, meta: { Auth: true, Key: [10], @@ -200,12 +212,12 @@ export default [ }, }, -/****** 3 ********/ + /****** 3 ********/ { - path: "/Structuremain", - name: "Structuremain", + path: "/structuremain", + name: "structuremain", component: Structuremain, meta: { Auth: true, @@ -293,10 +305,10 @@ export default [ -/****** 4 ********/ + /****** 4 ********/ { - path: "/Registrationmain", + path: "/registrationmain", name: "registmain", component: registmain, meta: { @@ -365,10 +377,10 @@ export default [ -/****** 5 ********/ + /****** 5 ********/ { - path: "/Recruitmain", + path: "/recruitmain", name: "recruitmain", component: recruitmain, meta: { diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index c20d160d..19adfe7b 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -17,6 +17,9 @@ import type { } from "../interface/request/main/main"; import { menuList, + tabListLogin, + tabListDatamain, + tabStructuremain, tabList, // tabListPlacement, } from "../interface/request/main/main"; @@ -50,6 +53,8 @@ const role = ref([]); const notiTrigger = ref(false); const text = ref(""); +const listTab = ref([]); + const notiList = ref([ { id: "1", @@ -85,20 +90,13 @@ const options = ref([ const tabScroll = () => { return route.name == "registryDetail"; }; +const tabLogin = async () => { + await setListTab(); -const tabScroll2 = () => { - let pathName = ""; - // let childernName: any = []; - // tabList.forEach((e: any) => { - // childernName = e.childern; - // }); - // console.log(childernName); - - pathName = tabList.find((e: any) => e.path === route.path); - if (pathName) { + let namePath = menuList[1].children.find((e: any) => e.path === route.path); + if (namePath) { return true; } - // return route.name == "manual"; }; /** @@ -137,6 +135,8 @@ const onScroll = (scroll: ScrollType) => { * updateScroll เป็น function active แทปด้านขวา */ const updateScroll = (position: number) => { + console.log(position); + // เมื่อ position เป็น undifind ให้ position เป็น ตำแหน่ง top ที่ scroll if (position === void 0) { position = document.documentElement.scrollTop || document.body.scrollTop; @@ -146,8 +146,8 @@ const updateScroll = (position: number) => { /** * วนหา id ของ div นั้น */ - for (const i in tabList) { - const section = tabList[i]; + for (const i in listTab.value) { + const section = listTab.value[i]; const item = document.getElementById(section.tag); /** * วนหา id ของ div หน้านั้น @@ -187,9 +187,8 @@ const updateScroll = (position: number) => { * ให้แสดง แทปด้านขวา เมื่อเข้าหน้า รายละเอียดทะเบียนประวัติ และ rightActive เท่ากับ true */ const activeBtn = () => { - return route.name == "registryDetail" && rightActive.value; + return route.name == "manual" && rightActive.value; }; - /** * เมื่อเริ่มต้นโปรแกรมให้ฟัง event resize และ function myEventHandler * set function myEventHandler เพราะ state ยังไม่เซ็ท , state เซ็ทเมื่อ หน้าจอเริ่ม ขยับหน้าจอ @@ -197,14 +196,23 @@ const activeBtn = () => { * ยังจับ boolean ผิด จึงต้อง set */ onMounted(async () => { - console.log(tabList); - myEventHandler(null, false); window.addEventListener("resize", (e: any) => { myEventHandler(e, true); }); + await setListTab(); }); +const setListTab = () => { + if (route.name == "manual") { + listTab.value = tabListLogin; + } else if (route.name == "datamain") { + listTab.value = tabListDatamain; + } else if (route.name == "structuremain") { + listTab.value = tabStructuremain; + } +}; + /** * เมื่อออกจากโปรแกรม ให้ ยกเลิกการฟัง event resize */ @@ -271,9 +279,6 @@ const activeMenu = (path: string) => { const activeTab = (tag: string) => { return tabData.value == tag; }; -const activeTab2 = (tag: string) => { - return tabData.value == tag; -}; /** * คลิกเพื่อให้ router หรือ scroll ไปยังตำแหน่งนั้นๆ @@ -343,27 +348,27 @@ const activeBtnPlacement = () => { return route.name == "PlacementPersonalDetail" && rightActive.value; }; -const activeTabPlacement = (tag: string) => { - return tabData.value == tag; -}; +// const activeTabPlacement = (tag: string) => { +// return tabData.value == tag; +// }; -const tagClickPlacement = (tag: string) => { - const hash = `#${tag}`; - const items = document.getElementById(tag); - const offset = Math.max(0, items == null ? 0 : items.offsetTop + 50); - // router.replace({ hash }); - if (route.hash !== hash) { - const checkPlacement = activeBtnPlacement(); - if (checkPlacement) { - drawerR.value = !drawerR.value; - setVerticalScrollPosition(window, offset, 300); - } else { - setVerticalScrollPosition(window, offset, 300); - } - } else { - setVerticalScrollPosition(window, offset, 300); - } -}; +// const tagClickPlacement = (tag: string) => { +// const hash = `#${tag}`; +// const items = document.getElementById(tag); +// const offset = Math.max(0, items == null ? 0 : items.offsetTop + 50); +// // router.replace({ hash }); +// if (route.hash !== hash) { +// const checkPlacement = activeBtnPlacement(); +// if (checkPlacement) { +// drawerR.value = !drawerR.value; +// setVerticalScrollPosition(window, offset, 300); +// } else { +// setVerticalScrollPosition(window, offset, 300); +// } +// } else { +// setVerticalScrollPosition(window, offset, 300); +// } +// }; //**** End Tab Right หน้าจอแก้ไขข้อมูลส่วนตัวของผู้สอบผ่าน ****\\ /** @@ -704,13 +709,7 @@ const clickTag = (val: string) => { class="menuSub" expand-icon="mdi-chevron-down" expanded-icon="mdi-chevron-up" - v-if=" - menuItem.key == 3 || - menuItem.key == 5 || - menuItem.key == 6 || - menuItem.key == 7 || - menuItem.key == 8 - " + v-if="menuItem.key == 2" >