พัฒนาบุคลากร
This commit is contained in:
parent
7aa9782b7a
commit
1d1490a49b
12 changed files with 480 additions and 141 deletions
|
|
@ -5,7 +5,7 @@ import { useRouter } from "vue-router";
|
|||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
/**importType*/
|
||||
import type {
|
||||
DataOption,
|
||||
|
|
@ -296,6 +296,14 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* function redirect หน้าบันทึกผล
|
||||
* @param id โครงการ
|
||||
*/
|
||||
function onDetail(id: string) {
|
||||
router.push(`/development-detail/${id}`);
|
||||
}
|
||||
|
||||
/** ดึงข้อมูลเมื่อโหลดหน้าเสร็จสิ้น */
|
||||
onMounted(() => {
|
||||
fetchActive();
|
||||
|
|
@ -433,14 +441,23 @@ onMounted(() => {
|
|||
@update:model-value="fetchListProjectNew"
|
||||
/>
|
||||
<q-toolbar-title>
|
||||
<q-btn flat round dense icon="add" color="primary" @click="onAdd()">
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsCreate"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="add"
|
||||
color="primary"
|
||||
@click="onAdd()"
|
||||
>
|
||||
<q-tooltip>เพิ่มข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-toolbar-title>
|
||||
|
||||
<q-space />
|
||||
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
|
|
@ -508,32 +525,57 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-if="formQuery.status === 'FINISH'" auto-width />
|
||||
<q-th auto-width />
|
||||
<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-if="formQuery.status === 'FINISH'">
|
||||
<q-tr :props="props">
|
||||
<q-td>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="info"
|
||||
icon="mdi-eye"
|
||||
@click.pervent="onDetail(props.row.id)"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
v-if="
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="edit"
|
||||
icon="edit"
|
||||
@click.pervent="onClickAddOrView(true, props.row.id)"
|
||||
>
|
||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||
>
|
||||
<q-btn
|
||||
v-if="
|
||||
formQuery.status === 'FINISH' &&
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
color="public"
|
||||
icon="mdi-content-save-edit-outline"
|
||||
size="12px"
|
||||
@click.pervent="onRedirectToRecordPage(props.row.id)"
|
||||
>
|
||||
<q-tooltip>บันทึกผล</q-tooltip></q-btn
|
||||
>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click.pervent="onClickAddOrView(true, props.row.id)"
|
||||
>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue