กำหนดสิทธิ์จัดการโครงสร้าง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-11 13:11:42 +07:00
parent 2ccdcef509
commit 90568eac79
3 changed files with 22 additions and 12 deletions

View file

@ -63,26 +63,31 @@ const menuList = readonly<any[]>([
key: 2.0,
label: "ข้อมูลเกี่ยวกับบุคคล",
path: "masterPersonal",
role: ["SUPER_ADMIN"],
},
{
key: 2.0,
label: "ข้อมูลตำแหน่งข้าราชการ ฯ",
path: "masterPosition",
role: ["SUPER_ADMIN"],
},
{
key: 2.0,
label: "ข้อมูลตำแหน่งลูกจ้างประจำ",
path: "masterPositionEmployee",
role: ["SUPER_ADMIN"],
},
{
key: 2.0,
label: "ข้อมูลปฏิทินวันหยุด",
path: "masterCalendarWork",
role: ["SUPER_ADMIN"],
},
{
key: 2.0,
label: "ข้อมูลเครื่องราชอิสริยาภรณ์",
path: "masterInsigniaPage",
role: ["SUPER_ADMIN"],
},
],
},
@ -97,26 +102,31 @@ const menuList = readonly<any[]>([
key: 2.0,
label: "จัดการผู้ใช้งาน",
path: "manageUsers",
role: ["SUPER_ADMIN", "ADMIN"],
},
{
key: 2.0,
label: "จัดการบทบาทและสิทธิ์ (Roles)",
path: "manageRoles",
role: ["SUPER_ADMIN"],
},
{
key: 2.0,
label: "กำหนดสิทธิ์ (Permissions)",
path: "managePermission",
role: ["SUPER_ADMIN", "ADMIN"],
},
{
key: 2.0,
label: "กำหนดสิทธิ์จัดการโครงสร้าง",
path: "roleOrganization",
role: ["SUPER_ADMIN", "ADMIN"],
},
{
key: 2.0,
label: "มอบหมายหน้าที่ความรับผิดชอบ",
path: "responsibilities",
role: ["SUPER_ADMIN", "ADMIN"],
},
],
},
@ -147,11 +157,13 @@ const menuList = readonly<any[]>([
key: 2.0,
label: "รายการคำสั่ง",
path: "commandTemplate",
role: ["SUPER_ADMIN"],
},
{
key: 2.0,
label: "ต้นแบบสำหรับลงในตำแหน่ง/เงินเดือน",
path: "salaryTemplate",
role: ["SUPER_ADMIN"],
},
],
},

View file

@ -30,7 +30,6 @@ const orgId = ref<string>(""); // id หน่วยงานที่เลื
/**
* งกนดงขอมลโครงสราง
*
* เกบขอมลโครงสรางไวใน nodeTree
*/
async function fatchOrg() {
@ -40,6 +39,11 @@ async function fatchOrg() {
.then(async (res) => {
const data = await res.data.result;
nodeTree.value = data;
if (data.length === 1) {
selectedOrg(data[0].id);
} else {
await fetchListPerson(); //
}
})
.catch((err) => {
messageError($q, err);
@ -52,7 +56,6 @@ async function fatchOrg() {
/**
* งกนเลอกหนวยงาน
* @param id หนวยงานทเลอก
*
* กำหนดคาของ qureyBody ใหเปนค defult และกำหนดคาของ qureyBody.id เปนหนวยงานทเลอก
* และดงขอมลรายชอคนททธดการโครงสรางในหนวยงานทเลอก
*/
@ -157,7 +160,6 @@ async function fetchListPerson(newPage: boolean = false) {
/**
* งกนยนยนการลบรายชอคนททธดการโครงสราง
* @param id รายชอคนททธดการโครงสราง
*
* ลบเสรจจะโหลดขอมลรายชอคนททธดการโครงสราง
*/
function onDeletePerson(id: string) {
@ -197,7 +199,6 @@ function updatePagination(newPagination: Pagination) {
/**
* การเปลยนแปลงของ pageSize ใน queryBody
*
* เม pageSize การเปลยนแปลงใหโหลดขอมลหนาแรก
*/
watch(
@ -209,13 +210,9 @@ watch(
/**
* hook ทำงานเม Components กเรยกใชงาน
*
*/
onMounted(async () => {
await Promise.all([
fatchOrg(), //
fetchListPerson(), //
]);
await fatchOrg(); //
});
</script>

View file

@ -889,14 +889,15 @@ onUnmounted(() => {
:to="{ name: `${subMenu2.path}` }"
>
<q-item-section>
<q-item-label class="font-400 subLabel"
>{{ subMenu2.label }}
<q-item-label class="font-400 subLabel">
{{ subMenu2.label }}
</q-item-label>
</q-item-section>
</q-item>
</q-expansion-item>
<q-item
v-else
v-else-if="checkPermission(subMenu.role, reles)"
dense
class="menuSubHover"
active-class="text-primary active-item text-weight-bold menuSubAct"