set permission menu master data of evaluation

This commit is contained in:
Warunee Tamkoo 2024-08-05 10:20:48 +07:00
parent a0ebb23f1f
commit d1be4b077b
17 changed files with 322 additions and 508 deletions

View file

@ -14,36 +14,38 @@ import http from "@/plugins/http";
import config from "@/app.config";
import { checkPermission } from "@/utils/permissions";
import { useRoute } from "vue-router";
const total = ref<number>();
const modal = ref<boolean>(false);
const rows = ref<any[]>([]);
const groupName = ref<string>("");
const route = useRoute();
const editStatus = ref<boolean>(false);
const editId = ref<string>("");
const competencyTypeOp = ref<DataOption[]>([
{
id: "ID1",
name: "สมรรถนะหลัก",
},
{
id: "ID2",
name: "สมรรถนะประจำกลุ่มงาน",
},
{
id: "ID3",
name: "สมรรถนะประจำผู้บริหารกรุงเทพมหานคร",
},
{
id: "ID4",
name: "สมรรถนะเฉพาะสำหรับตำแหน่ง ผอ.เขต ผช.ผอ.เขต และหัวหน้าฝ่ายในสังกัด สนง.เขต",
},
{
id: "ID5",
name: "สมรรถนะเฉพาะสำหรับตำแหน่งผู้ตรวจราชการ กทม. และผู้ตรวจราชการ",
},
]);
// const competencyTypeOp = ref<DataOption[]>([
// {
// id: "ID1",
// name: "",
// },
// {
// id: "ID2",
// name: "",
// },
// {
// id: "ID3",
// name: "",
// },
// {
// id: "ID4",
// name: " . .. .",
// },
// {
// id: "ID5",
// name: " . ",
// },
// ]);
const columns = ref<QTableProps["columns"]>([
{
name: "nameGroupKPI",
@ -200,7 +202,7 @@ watch(
);
onMounted(async () => {
fetchData();
if (checkPermission(route)?.attrIsList) fetchData();
});
</script>
@ -274,16 +276,18 @@ onMounted(async () => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td auto-width>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate"
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
color="edit"
flat
dense
round
class="q-mr-xs"
size="12px"
icon="edit"
clickable
@click="onEdit(props.row)"
@ -296,7 +300,6 @@ onMounted(async () => {
flat
dense
round
size="12px"
icon="mdi-delete"
clickable
@click.stop="
@ -355,7 +358,9 @@ onMounted(async () => {
class="q-px-md items-center"
color="public"
label="บันทึก"
/>
>
<q-tooltip>นทกขอม</q-tooltip>
</q-btn>
</q-card-actions>
</q-form>
</q-card>