2023-07-07 17:26:40 +07:00
|
|
|
<template>
|
2023-08-03 10:12:01 +07:00
|
|
|
<div class="toptitle text-dark col-12 row items-center">
|
|
|
|
|
รายการผู้ทดลองปฏิบัติหน้าที่ราชการ
|
|
|
|
|
</div>
|
|
|
|
|
<q-card flat bordered class="col-12 q-mt-sm q-pa-md">
|
|
|
|
|
<div class="row q-col-gutter-sm">
|
|
|
|
|
<div class="row col-12 q-col-gutter-sm">
|
|
|
|
|
<div>
|
|
|
|
|
<q-btn
|
|
|
|
|
@click="modal = true"
|
|
|
|
|
size="12px"
|
|
|
|
|
flat
|
|
|
|
|
round
|
|
|
|
|
color="add"
|
|
|
|
|
icon="mdi-plus"
|
|
|
|
|
>
|
|
|
|
|
<q-tooltip>เพิ่มผู้ทดลองปฏิบัติหน้าที่ราชการ</q-tooltip>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
|
|
|
|
<q-space />
|
|
|
|
|
|
|
|
|
|
<q-input
|
|
|
|
|
class="col-xs-12 col-sm-3 col-md-2"
|
|
|
|
|
standout
|
|
|
|
|
dense
|
|
|
|
|
v-model="filterKeyword"
|
|
|
|
|
ref="filterRef"
|
|
|
|
|
outlined
|
|
|
|
|
debounce="300"
|
|
|
|
|
placeholder="ค้นหา"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:append>
|
|
|
|
|
<q-icon v-if="filterKeyword == ''" name="search" />
|
|
|
|
|
<q-icon
|
|
|
|
|
v-if="filterKeyword !== ''"
|
|
|
|
|
name="clear"
|
|
|
|
|
class="cursor-pointer"
|
|
|
|
|
@click="resetFilter"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
|
|
|
|
|
<q-select
|
|
|
|
|
v-model="visibleColumns"
|
|
|
|
|
multiple
|
|
|
|
|
outlined
|
|
|
|
|
dense
|
|
|
|
|
options-dense
|
|
|
|
|
:display-value="$q.lang.table.columns"
|
|
|
|
|
emit-value
|
|
|
|
|
map-options
|
|
|
|
|
:options="columns"
|
|
|
|
|
option-value="name"
|
|
|
|
|
options-cover
|
|
|
|
|
style="min-width: 150px"
|
|
|
|
|
class="col-xs-12 col-sm-3 col-md-2"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-table
|
|
|
|
|
ref="table"
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:rows="rows"
|
|
|
|
|
:filter="filterKeyword"
|
|
|
|
|
row-key="Order"
|
|
|
|
|
flat
|
|
|
|
|
bordered
|
|
|
|
|
:paging="true"
|
|
|
|
|
dense
|
|
|
|
|
class="custom-header-table"
|
|
|
|
|
v-bind="attrs"
|
|
|
|
|
:visible-columns="visibleColumns"
|
|
|
|
|
:pagination-label="paginationLabel"
|
|
|
|
|
v-model:pagination="pagination"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:header="props">
|
|
|
|
|
<q-tr :props="props">
|
|
|
|
|
<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"
|
2023-08-09 12:09:46 +07:00
|
|
|
@click="router.push(`/probation/detail/${props.row.personal_id}`)"
|
2023-08-03 10:12:01 +07:00
|
|
|
>
|
|
|
|
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
|
|
|
|
<div v-if="col.name == 'no'">
|
|
|
|
|
{{ props.rowIndex + 1 }}
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div v-else-if="col.name == 'status'">
|
2023-07-07 17:26:40 +07:00
|
|
|
<q-icon size="20px" v-if="props.row.status == 'อยู่ระหว่างการทดลองงาน'" name="mdi-timer-sand" color="deep-orange">
|
|
|
|
|
<q-tooltip>อยู่ระหว่างการทดลองงาน</q-tooltip>
|
|
|
|
|
</q-icon>
|
|
|
|
|
<q-icon size="20px" v-else-if="props.row.status == 'ไม่ผ่านการทดลอง'" name="mdi-close" color="red">
|
|
|
|
|
<q-tooltip>ไม่ผ่านการทดลอง</q-tooltip>
|
|
|
|
|
</q-icon>
|
|
|
|
|
<q-icon size="20px" v-else name="mdi-check" color="teal">
|
|
|
|
|
<q-tooltip>ผ่านการทดลองงาน</q-tooltip>
|
|
|
|
|
</q-icon>
|
2023-07-10 17:44:24 +07:00
|
|
|
</div> -->
|
2023-08-03 10:12:01 +07:00
|
|
|
<div v-else>
|
|
|
|
|
{{ col.value }}
|
|
|
|
|
</div>
|
|
|
|
|
</q-td>
|
|
|
|
|
</q-tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:pagination="scope">
|
|
|
|
|
<q-pagination
|
|
|
|
|
v-model="pagination.page"
|
|
|
|
|
active-color="primary"
|
|
|
|
|
color="dark"
|
|
|
|
|
:max="scope.pagesNumber"
|
|
|
|
|
:max-pages="5"
|
|
|
|
|
size="sm"
|
|
|
|
|
boundary-links
|
|
|
|
|
direction-links
|
|
|
|
|
></q-pagination>
|
|
|
|
|
</template>
|
|
|
|
|
</q-table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card>
|
2023-07-07 17:26:40 +07:00
|
|
|
|
2023-08-03 10:12:01 +07:00
|
|
|
<q-dialog v-model="modal" persistent>
|
|
|
|
|
<q-card style="width: 900px; max-width: 80vw">
|
|
|
|
|
<q-form ref="myForm">
|
|
|
|
|
<DialogHeader
|
|
|
|
|
tittle="เพิ่มผู้ทดลองปฏิบัติหน้าที่ราชการ "
|
|
|
|
|
:close="clickClose"
|
|
|
|
|
/>
|
|
|
|
|
<q-separator />
|
|
|
|
|
<q-card-section class="q-pa-md q-col-gutter-sm">
|
|
|
|
|
<q-input
|
|
|
|
|
class="col-12"
|
|
|
|
|
standout
|
|
|
|
|
dense
|
|
|
|
|
v-model="filterKeyword2"
|
|
|
|
|
ref="filterRef2"
|
|
|
|
|
outlined
|
|
|
|
|
debounce="300"
|
|
|
|
|
placeholder="ค้นหา"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:append>
|
|
|
|
|
<q-icon v-if="filterKeyword2 == ''" name="search" />
|
|
|
|
|
<q-icon
|
|
|
|
|
v-if="filterKeyword2 !== ''"
|
|
|
|
|
name="clear"
|
|
|
|
|
class="cursor-pointer"
|
|
|
|
|
@click="resetFilter2"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</q-input>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<q-table
|
|
|
|
|
ref="table2"
|
|
|
|
|
:columns="columns2"
|
|
|
|
|
:rows="rows2"
|
|
|
|
|
:filter="filterKeyword2"
|
|
|
|
|
row-key="Order"
|
|
|
|
|
flat
|
|
|
|
|
bordered
|
|
|
|
|
:paging="true"
|
|
|
|
|
dense
|
|
|
|
|
class="custom-header-table"
|
|
|
|
|
v-bind="attrs"
|
|
|
|
|
:pagination-label="paginationLabel"
|
|
|
|
|
v-model:pagination="pagination"
|
|
|
|
|
>
|
|
|
|
|
<template v-slot:header="props">
|
|
|
|
|
<q-tr :props="props">
|
|
|
|
|
<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-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"
|
|
|
|
|
>
|
|
|
|
|
<div v-if="col.name == 'no'">
|
|
|
|
|
{{ props.rowIndex + 1 }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
{{ col.value }}
|
|
|
|
|
</div>
|
|
|
|
|
</q-td>
|
|
|
|
|
<q-td auto-width>
|
|
|
|
|
<q-btn
|
|
|
|
|
dense
|
|
|
|
|
class="q-px-md"
|
|
|
|
|
outline
|
|
|
|
|
color="primary"
|
|
|
|
|
label="เพิ่ม"
|
|
|
|
|
@click="clickAdd(props.row.id)"
|
|
|
|
|
>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</q-td>
|
|
|
|
|
</q-tr>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:pagination="scope">
|
|
|
|
|
<q-pagination
|
|
|
|
|
v-model="pagination.page"
|
|
|
|
|
active-color="primary"
|
|
|
|
|
color="dark"
|
|
|
|
|
:max="scope.pagesNumber"
|
|
|
|
|
:max-pages="5"
|
|
|
|
|
size="sm"
|
|
|
|
|
boundary-links
|
|
|
|
|
direction-links
|
|
|
|
|
></q-pagination>
|
|
|
|
|
</template>
|
|
|
|
|
</q-table>
|
|
|
|
|
</div>
|
|
|
|
|
</q-card-section>
|
|
|
|
|
</q-form>
|
|
|
|
|
</q-card>
|
|
|
|
|
</q-dialog>
|
2023-07-07 17:26:40 +07:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2023-08-03 10:12:01 +07:00
|
|
|
import { ref, useAttrs, onMounted, watch } from "vue";
|
2023-07-07 17:26:40 +07:00
|
|
|
import type { QTableProps } from "quasar";
|
2023-08-03 10:12:01 +07:00
|
|
|
import type {
|
|
|
|
|
FormMainProbation,
|
|
|
|
|
FormMainProbation2,
|
|
|
|
|
} from "@/modules/05_placement/interface/request/Main";
|
2023-07-07 17:26:40 +07:00
|
|
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
2023-08-03 10:12:01 +07:00
|
|
|
import http from "@/plugins/http";
|
|
|
|
|
import config from "@/app.config";
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
2023-07-07 17:26:40 +07:00
|
|
|
import router from "@/router";
|
|
|
|
|
import { useQuasar } from "quasar";
|
|
|
|
|
|
|
|
|
|
const $q = useQuasar(); //ใช้ noti quasar
|
2023-08-03 10:12:01 +07:00
|
|
|
const mixin = useCounterMixin();
|
|
|
|
|
const { messageError, success, showLoader, hideLoader } = mixin;
|
|
|
|
|
|
2023-07-07 17:26:40 +07:00
|
|
|
const modal = ref<boolean>(false);
|
|
|
|
|
const pagination = ref({
|
|
|
|
|
sortBy: "desc",
|
|
|
|
|
descending: false,
|
|
|
|
|
page: 1,
|
|
|
|
|
rowsPerPage: 10,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const visibleColumns = ref<string[]>([
|
|
|
|
|
"no",
|
|
|
|
|
"name",
|
2023-08-09 12:09:46 +07:00
|
|
|
"position_line",
|
|
|
|
|
"position_level",
|
|
|
|
|
"organization",
|
|
|
|
|
"probation_no",
|
|
|
|
|
"order_number",
|
|
|
|
|
"probation_status",
|
2023-07-07 17:26:40 +07:00
|
|
|
]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง
|
|
|
|
|
|
|
|
|
|
// หัวตาราง
|
|
|
|
|
const columns = ref<QTableProps["columns"]>([
|
|
|
|
|
{
|
|
|
|
|
name: "no",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ลำดับ",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "no",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "name",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ชื่อ-สกุล",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "name",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
2023-08-03 10:12:01 +07:00
|
|
|
{
|
2023-08-09 12:09:46 +07:00
|
|
|
name: "position_line",
|
2023-07-07 17:26:40 +07:00
|
|
|
align: "left",
|
|
|
|
|
label: "ตำแหน่งในสายงาน",
|
|
|
|
|
sortable: true,
|
2023-08-09 12:09:46 +07:00
|
|
|
field: "position_line",
|
2023-07-07 17:26:40 +07:00
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
2023-08-03 10:12:01 +07:00
|
|
|
{
|
2023-08-09 12:09:46 +07:00
|
|
|
name: "position_level",
|
2023-07-07 17:26:40 +07:00
|
|
|
align: "left",
|
|
|
|
|
label: "ระดับ",
|
|
|
|
|
sortable: true,
|
2023-08-09 12:09:46 +07:00
|
|
|
field: "position_level",
|
2023-07-07 17:26:40 +07:00
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
2023-08-03 10:12:01 +07:00
|
|
|
{
|
2023-08-09 12:09:46 +07:00
|
|
|
name: "organization",
|
2023-07-07 17:26:40 +07:00
|
|
|
align: "left",
|
|
|
|
|
label: "สังกัด",
|
|
|
|
|
sortable: true,
|
2023-08-09 12:09:46 +07:00
|
|
|
field: "organization",
|
2023-07-07 17:26:40 +07:00
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
2023-08-03 10:12:01 +07:00
|
|
|
{
|
2023-08-09 12:09:46 +07:00
|
|
|
name: "probation_no",
|
2023-07-07 17:26:40 +07:00
|
|
|
align: "center",
|
|
|
|
|
label: "ครั้งที่ทดลองงาน",
|
|
|
|
|
sortable: true,
|
2023-08-09 12:09:46 +07:00
|
|
|
field: "probation_no",
|
2023-07-07 17:26:40 +07:00
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
2023-08-03 10:12:01 +07:00
|
|
|
{
|
2023-08-09 12:09:46 +07:00
|
|
|
name: "order_number",
|
2023-07-07 17:26:40 +07:00
|
|
|
align: "center",
|
|
|
|
|
label: "เลขที่คําสั่งบรรจุแต่งตั้ง",
|
|
|
|
|
sortable: true,
|
2023-08-09 12:09:46 +07:00
|
|
|
field: "order_number",
|
2023-07-07 17:26:40 +07:00
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-08-09 12:09:46 +07:00
|
|
|
name: "probation_status",
|
2023-07-10 17:44:24 +07:00
|
|
|
align: "left",
|
2023-07-07 17:26:40 +07:00
|
|
|
label: "สถานะทดลองงาน",
|
|
|
|
|
sortable: true,
|
2023-08-09 12:09:46 +07:00
|
|
|
field: "probation_status",
|
2023-07-07 17:26:40 +07:00
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
2023-08-03 10:12:01 +07:00
|
|
|
},
|
2023-07-07 17:26:40 +07:00
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
// ข้อมูลตาราง (จำลอง)
|
2023-08-09 12:09:46 +07:00
|
|
|
const rows = ref<FormMainProbation[]>([]);
|
2023-07-07 17:26:40 +07:00
|
|
|
|
|
|
|
|
// หัวตาราง2
|
|
|
|
|
const columns2 = ref<QTableProps["columns"]>([
|
|
|
|
|
{
|
|
|
|
|
name: "no",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ลำดับ",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "no",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
2023-08-03 10:12:01 +07:00
|
|
|
style: "font-size: 14px",
|
2023-07-07 17:26:40 +07:00
|
|
|
},
|
|
|
|
|
{
|
2023-08-03 10:12:01 +07:00
|
|
|
name: "fullname",
|
2023-07-07 17:26:40 +07:00
|
|
|
align: "left",
|
|
|
|
|
label: "ชื่อ-สกุล",
|
|
|
|
|
sortable: true,
|
2023-08-03 10:12:01 +07:00
|
|
|
field: "fullname",
|
2023-07-07 17:26:40 +07:00
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
2023-08-03 10:12:01 +07:00
|
|
|
{
|
2023-07-07 17:26:40 +07:00
|
|
|
name: "position",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ตำแหน่งในสายงาน",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "position",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
2023-08-03 10:12:01 +07:00
|
|
|
{
|
2023-07-07 17:26:40 +07:00
|
|
|
name: "level",
|
|
|
|
|
align: "left",
|
|
|
|
|
label: "ระดับ",
|
|
|
|
|
sortable: true,
|
|
|
|
|
field: "level",
|
|
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
|
|
|
|
},
|
2023-08-03 10:12:01 +07:00
|
|
|
{
|
|
|
|
|
name: "organizationOrganization",
|
2023-07-07 17:26:40 +07:00
|
|
|
align: "left",
|
|
|
|
|
label: "สังกัด",
|
|
|
|
|
sortable: true,
|
2023-08-03 10:12:01 +07:00
|
|
|
field: "organizationOrganization",
|
2023-07-07 17:26:40 +07:00
|
|
|
headerStyle: "font-size: 14px",
|
|
|
|
|
style: "font-size: 14px",
|
2023-08-03 10:12:01 +07:00
|
|
|
},
|
2023-07-07 17:26:40 +07:00
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
// ข้อมูลตาราง (จำลอง)
|
|
|
|
|
const rows2 = ref<FormMainProbation2[]>([
|
2023-08-03 10:12:01 +07:00
|
|
|
// {
|
|
|
|
|
// no: "1",
|
|
|
|
|
// name: "นายใจดี ยอดใจ ",
|
|
|
|
|
// position: "นักวิชาการพัสดุ",
|
|
|
|
|
// level: "ปฏิบัติการ",
|
|
|
|
|
// institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// no: "2",
|
|
|
|
|
// name: "นายจักกริน บัณฑิต",
|
|
|
|
|
// position: "นักวิชาการพัสดุ",
|
|
|
|
|
// level: "ปฏิบัติการ",
|
|
|
|
|
// institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// no: "3",
|
|
|
|
|
// name: "นางสาวกัณฐิมา กาฬสินธุ์",
|
|
|
|
|
// position: "นักจัดการงานทั่วไป",
|
|
|
|
|
// level: "ปฏิบัติการ",
|
|
|
|
|
// institution: "กลุ่มงานช่วยนักบริหาร",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// no: "4",
|
|
|
|
|
// name: "นางสาวเมขลา กระจ่างมนตรี",
|
|
|
|
|
// position: "นักจัดการงานทั่วไป",
|
|
|
|
|
// level: "ปฏิบัติการ",
|
|
|
|
|
// institution: "กลุ่มงานช่วยนักบริหาร",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// no: "5",
|
|
|
|
|
// name: "นางสาวฐิติรัตน์ พงษ์ศิริ",
|
|
|
|
|
// position: "นักจัดการงานทั่วไป",
|
|
|
|
|
// level: "ปฏิบัติการ",
|
|
|
|
|
// institution: "กลุ่มงานช่วยนักบริหาร",
|
|
|
|
|
// },
|
2023-07-07 17:26:40 +07:00
|
|
|
]);
|
|
|
|
|
|
2023-08-09 12:09:46 +07:00
|
|
|
onMounted(async () => {
|
|
|
|
|
getpersonalList();
|
2023-08-03 10:12:01 +07:00
|
|
|
});
|
|
|
|
|
|
2023-08-09 12:09:46 +07:00
|
|
|
// watch(modal, () => {
|
|
|
|
|
// if (modal.value === true) {
|
|
|
|
|
// getpersonalList();
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
const getpersonalList = async () => {
|
2023-08-03 10:12:01 +07:00
|
|
|
showLoader();
|
|
|
|
|
await http
|
2023-08-09 12:09:46 +07:00
|
|
|
.get(config.API.personalList())
|
2023-08-03 10:12:01 +07:00
|
|
|
.then((res) => {
|
2023-08-09 12:09:46 +07:00
|
|
|
const data = res.data.data;
|
|
|
|
|
rows.value = data.map((item: FormMainProbation) => ({
|
|
|
|
|
personal_id: item.personal_id,
|
|
|
|
|
name: item.name,
|
|
|
|
|
position_line: item.position_line,
|
|
|
|
|
position_line_id: item.position_line_id,
|
|
|
|
|
position_level: item.position_level,
|
|
|
|
|
position_level_id: item.position_level_id,
|
|
|
|
|
organization: item.organization,
|
|
|
|
|
probation_no: item.probation_no,
|
|
|
|
|
order_number: item.order_number,
|
|
|
|
|
probation_status: item.probation_status,
|
|
|
|
|
}));
|
|
|
|
|
console.log("(data)", data);
|
2023-08-03 10:12:01 +07:00
|
|
|
})
|
2023-08-09 12:09:46 +07:00
|
|
|
.catch(() => {})
|
2023-08-03 10:12:01 +07:00
|
|
|
.finally(() => {
|
|
|
|
|
hideLoader();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const findlist = async (id: string) => {
|
|
|
|
|
let data = [
|
|
|
|
|
{ criteriaType: "is_retire", criteriaValue: "false" },
|
2023-08-04 10:40:04 +07:00
|
|
|
{ criteriaType: "is_probation", criteriaValue: "false" },
|
2023-08-03 10:12:01 +07:00
|
|
|
];
|
|
|
|
|
await http
|
2023-08-04 10:40:04 +07:00
|
|
|
.post(config.API.profileSearchNewOcIdType(id, "officer"), {
|
2023-08-03 10:12:01 +07:00
|
|
|
criterias: data,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log("res:", res);
|
|
|
|
|
rows2.value = res.data.result.map((e: any) => ({
|
|
|
|
|
id: e.id,
|
|
|
|
|
fullname: e.fullname,
|
|
|
|
|
position: e.position,
|
|
|
|
|
level: e.positionEmployeeLevel,
|
|
|
|
|
organizationOrganization: e.oc,
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2023-07-07 17:26:40 +07:00
|
|
|
const clickDelete = (id: string) => {
|
|
|
|
|
$q.dialog({
|
|
|
|
|
title: "ยืนยันการลบข้อมูล",
|
|
|
|
|
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
|
|
|
|
|
cancel: {
|
|
|
|
|
flat: true,
|
|
|
|
|
color: "negative",
|
|
|
|
|
},
|
|
|
|
|
persistent: true,
|
2023-08-03 10:12:01 +07:00
|
|
|
})
|
|
|
|
|
.onOk(async () => {})
|
|
|
|
|
.onCancel(() => {})
|
|
|
|
|
.onDismiss(() => {});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const clickAdd = (id: string) => {
|
|
|
|
|
$q.dialog({
|
|
|
|
|
title: "ยืนยันการเพิ่มข้อมูล",
|
|
|
|
|
message: "ต้องการเพิ่มข้อมูลนี้ใช่หรือไม่?",
|
|
|
|
|
cancel: {
|
|
|
|
|
flat: true,
|
|
|
|
|
color: "negative",
|
|
|
|
|
},
|
|
|
|
|
persistent: true,
|
2023-07-07 17:26:40 +07:00
|
|
|
})
|
|
|
|
|
.onOk(async () => {
|
2023-08-04 10:40:04 +07:00
|
|
|
const postData = {
|
|
|
|
|
personal_id: id,
|
2023-08-09 12:09:46 +07:00
|
|
|
};
|
2023-08-04 10:40:04 +07:00
|
|
|
console.log("postData:", postData);
|
2023-08-09 12:09:46 +07:00
|
|
|
await http.post(config.API.personalAdd(), postData).then((res) => {
|
|
|
|
|
console.log("res:", res);
|
|
|
|
|
});
|
2023-07-07 17:26:40 +07:00
|
|
|
})
|
|
|
|
|
.onCancel(() => {})
|
|
|
|
|
.onDismiss(() => {});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const clickClose = async () => {
|
|
|
|
|
modal.value = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ค้นหาในตาราง
|
|
|
|
|
const filterKeyword = ref<string>("");
|
|
|
|
|
const filterRef = ref<any>(null);
|
|
|
|
|
const resetFilter = () => {
|
|
|
|
|
filterKeyword.value = "";
|
|
|
|
|
filterRef.value.focus();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const filterKeyword2 = ref<string>("");
|
|
|
|
|
const filterRef2 = ref<any>(null);
|
|
|
|
|
const resetFilter2 = () => {
|
|
|
|
|
filterKeyword2.value = "";
|
|
|
|
|
filterRef2.value.focus();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const attrs = ref<any>(useAttrs());
|
|
|
|
|
|
|
|
|
|
const paging = ref<boolean>(true);
|
|
|
|
|
const paginationLabel = (start: string, end: string, total: string) => {
|
|
|
|
|
if (paging.value == true) return " " + start + "-" + end + " ใน " + total;
|
|
|
|
|
else return start + "-" + end + " ใน " + total;
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scope>
|
|
|
|
|
.filter-card {
|
|
|
|
|
background-color: #f1f1f1b0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.toggle-expired-account {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
line-height: 150%;
|
|
|
|
|
color: #35373c;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.icon-color {
|
|
|
|
|
color: #4154b3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.custom-header-table {
|
|
|
|
|
max-height: 64vh;
|
|
|
|
|
|
|
|
|
|
.q-table tr:nth-child(odd) td {
|
|
|
|
|
background: white;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.q-table tr:nth-child(even) td {
|
|
|
|
|
background: #f8f8f8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.q-table thead tr {
|
|
|
|
|
background: #ecebeb;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.q-table thead tr th {
|
|
|
|
|
position: sticky;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* this will be the loading indicator */
|
|
|
|
|
.q-table thead tr:last-child th {
|
|
|
|
|
/* height of all previous header rows */
|
|
|
|
|
top: 48px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.q-table thead tr:first-child th {
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-03 10:12:01 +07:00
|
|
|
</style>
|