พัฒนาบุคลากร

This commit is contained in:
STW_TTTY\stwtt 2024-08-05 16:33:05 +07:00
parent 7aa9782b7a
commit 1d1490a49b
12 changed files with 480 additions and 141 deletions

View file

@ -4,7 +4,7 @@ import { useQuasar, type QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import genReportXLSX from "@/plugins/genreportxlsx";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
import type {
NewPagination,
@ -14,9 +14,10 @@ import type {
/** importStore*/
import { useDevelopmentDataStore } from "@/modules/15_development/store/developmentStore";
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
/** use*/
const router = useRouter();
const route = useRoute();
const store = useDevelopmentDataStore();
const $q = useQuasar();
const { showLoader, hideLoader, messageError } = useCounterMixin();
@ -183,8 +184,10 @@ function onDownload(type: string) {
* @param id id ของ row
*/
function onEdit(id: string) {
store.statusEdit = true;
router.push(`/development/employee-history/${id}`);
if (checkPermission(route)?.attrIsUpdate !== false) {
store.statusEdit = true;
router.push(`/development/employee-history/${id}`);
}
}
/** ดึงข้อมูล */
@ -322,7 +325,10 @@ onMounted(() => {
<q-toolbar class="col-4 text-white q-pa-none q-gutter-x-sm">
<q-space />
<q-btn
v-if="formFilter.root !== null"
v-if="
formFilter.root !== null &&
checkPermission($route)?.attrIsGet !== false
"
flat
round
dense
@ -422,19 +428,27 @@ onMounted(() => {
</template>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="onEdit(props.row.id)"
>
<q-tr :props="props">
<q-td auto-width>
<q-btn
flat
round
dense
icon="mdi-eye"
color="info"
@click="onEdit(props.row.id)"
>
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>