API รายการการประเมินผลการปฏิบัติราชการระดับบุคคล

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-26 09:34:17 +07:00
parent 266ad5ef7c
commit bdbf4582ee
7 changed files with 254 additions and 107 deletions

View file

@ -26,6 +26,7 @@ const {
success,
} = useCounterMixin();
const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
const title = defineModel<string>("title", { required: true });
const rows = defineModel<any>("data", { required: true });
const numpage = defineModel<number>("page", { required: true });
@ -190,6 +191,7 @@ watch(
<div class="col">
<span class="text-weight-medium">{{ title }}</span>
<q-btn
v-if="!isReadonly"
class="q-ml-xs"
flat
round
@ -204,6 +206,7 @@ watch(
</div>
<div class="col-auto">
<q-btn
v-if="!isReadonly"
flat
round
icon="mdi-clipboard-check-outline"
@ -239,7 +242,7 @@ watch(
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width v-if="!isReadonly" />
</q-tr>
</template>
<template v-slot:body="props">
@ -286,7 +289,7 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<td>
<td v-if="!isReadonly">
<q-btn
flat
round

View file

@ -15,7 +15,9 @@ import type {
ListCriteria,
} from "@/modules/08_KPI/interface/request/index";
const dataListCriteria = defineModel<ListCriteria[]>("dataListCriteria", { required: true, });
const dataListCriteria = defineModel<ListCriteria[]>("dataListCriteria", {
required: true,
});
const sortedDataListCriteria = computed(() => {
return dataListCriteria.value.sort((a, b) => a.level - b.level);
@ -26,6 +28,8 @@ const store = useKpiDataStore();
const route = useRoute();
const id = ref<string>(route.params.id as string);
const isReadonly = <boolean>(route.name === "KPIEditEvaluator" ? true : false);
const idCapacity = ref<string | null>(null);
const $q = useQuasar();
@ -203,6 +207,7 @@ onMounted(() => {
<div class="col">
<span class="text-weight-medium">{{ item.name }}</span>
<q-btn
v-if="!isReadonly"
class="q-ml-xs"
flat
round
@ -218,6 +223,7 @@ onMounted(() => {
<q-space />
<q-btn
v-if="!isReadonly"
flat
round
icon="mdi-clipboard-check-outline"
@ -249,7 +255,7 @@ onMounted(() => {
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width v-if="!isReadonly" />
</q-tr>
</template>
<template v-slot:body="props">
@ -295,7 +301,7 @@ onMounted(() => {
{{ col.value }}
</div>
</q-td>
<q-td auto-width>
<q-td v-if="!isReadonly">
<q-btn
flat
round
@ -335,7 +341,6 @@ onMounted(() => {
v-model:type="typeCompetency"
v-model:dataListCriteria="dataListCriteria"
:get-data="getData"
/>
<div class="row text-body2 text-weight-bold justify-center">