Merge branch 'develop' into develop-tee

This commit is contained in:
setthawutttty 2023-07-05 10:01:05 +07:00
commit 27b966291c
8 changed files with 826 additions and 80 deletions

View file

@ -527,8 +527,8 @@ const OriginalDataFetch = async () => {
//
const redirectToPage = (id?: number) => {
// router.push({ name: 'placementDetail'});
// router.push(`/placement/order/detail`);
router.push({ name: "placementDetail" });
router.push(`/placement/order/detail`);
};
const clickDelete = (id: string) => {

View file

@ -370,7 +370,7 @@
</div>
<q-separator />
<div class="flex justify-end q-pa-sm q-gutter-sm">
<q-btn unelevated label="บันทึก" color="public" @click="next"
<q-btn unelevated label="บันทึก" color="public" @click="submit"
><!-- icon="mdi-content-save-outline"
<q-tooltip>นท</q-tooltip> -->
</q-btn>
@ -497,10 +497,12 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
};
const submit = async () => {
await myForm.value!.validate().then((result: boolean) => {
if (result == false) {
}
});
next();
// await myForm.value!.validate().then((result: boolean) => {
// if (result) {
// next();
// }
// });
};
/**

View file

@ -92,7 +92,7 @@
:outlined="true"
dense
lazy-rules
v-model="filter"
v-model="props.row.mutiselect"
:rules="[(val:any) => !!val || `${'กรุณาเลือกช่องทางการส่งสำเนา'}`,(val:any) => val.length > 0 || `${'กรุณาเลือกช่องทางการส่งสำเนา'}`]"
:label="`${'เลือกช่องทางการส่งสำเนา'}`"
emit-value
@ -359,6 +359,7 @@ const { dialogMessage, messageError, showLoader, hideLoader } = mixin;
const myForm = ref<QForm>();
const filterRef = ref<QInput>();
const filter = ref<string>("");
const mutiselect = ref([]);
const modal = ref<boolean>(false);
const search = ref<string>("");
const expanded = ref<string[]>([]);
@ -366,6 +367,7 @@ const selected = ref<string>("");
const nodesTree = ref<treeTab[]>([]);
const send = ref<String[]>([]);
const selectedModal = ref([]);
const test = ref([]);
const filterModal = ref<string>("");
const visibleColumnsModal = ref<String[]>(["no", "idcard", "name"]);
const columnsModal = [
@ -519,7 +521,7 @@ const columns = [
},
];
const rows = [
const rows = ref([
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
@ -527,6 +529,7 @@ const rows = [
send: "",
position: "ผู้อำนวยการ",
agency: "กลุ่มงานช่วยบริหาร",
mutiselect: [],
},
{
no: "0de607a0-b094-4a6d-9e30-979343ab5e53",
@ -535,6 +538,7 @@ const rows = [
send: "",
position: "นักจัดการทั่วไป",
agency: "กลุ่มงานช่วยบริหาร",
mutiselect: [],
},
{
no: "93ca7366-2a35-4f94-a331-9c23c9ea78d3",
@ -543,6 +547,7 @@ const rows = [
send: "",
position: "นักจัดการทั่วไป",
agency: "กลุ่มงานช่วยบริหาร",
mutiselect: [],
},
{
no: "d3777c19-2bd0-42df-90ce-c3eeeee55ac6",
@ -551,6 +556,7 @@ const rows = [
send: "",
position: "นักจัดการทั่วไป",
agency: "กลุ่มงานช่วยบริหาร",
mutiselect: [],
},
{
no: "1ccead6f-a851-4291-b3ab-a20757ecddbd",
@ -559,6 +565,7 @@ const rows = [
send: "",
position: "นักจัดการทั่วไป",
agency: "กลุ่มงานช่วยบริหาร",
mutiselect: [],
},
{
no: "1ccead6f-a851-4291-b3ab-a20757ecddbd",
@ -567,6 +574,7 @@ const rows = [
send: "",
position: "นิติกร",
agency: "กลุ่มงานนิติกร",
mutiselect: [],
},
{
no: "1ccead6f-a851-4291-b3ab-a20757ecddbd",
@ -575,6 +583,7 @@ const rows = [
send: "",
position: "นิติกร",
agency: "กลุ่มงานนิติกร",
mutiselect: [],
},
{
no: "1ccead6f-a851-4291-b3ab-a20757ecddbd",
@ -583,6 +592,7 @@ const rows = [
send: "",
position: "นิติกร",
agency: "กลุ่มงานนิติกร",
mutiselect: [],
},
{
no: "1ccead6f-a851-4291-b3ab-a20757ecddbd",
@ -591,6 +601,7 @@ const rows = [
send: "",
position: "นิติกร",
agency: "กลุ่มงานนิติกร",
mutiselect: [],
},
{
no: "1ccead6f-a851-4291-b3ab-a20757ecddbd",
@ -599,6 +610,7 @@ const rows = [
send: "",
position: "นิติกร",
agency: "กลุ่มงานนิติกร",
mutiselect: [],
},
{
no: "1ccead6f-a851-4291-b3ab-a20757ecddbd",
@ -607,8 +619,9 @@ const rows = [
send: "",
position: "นิติกร",
agency: "กลุ่มงานนิติกร",
mutiselect: [],
},
];
]);
onMounted(async () => {
await nodeTree();

View file

@ -132,40 +132,146 @@
</template>
<template v-slot:after>
<div class="q-pa-md">
<fieldset class="border q-pa-lg">
<legend class="text-header">ปโหลดไฟล</legend>
<q-form ref="myForm">
<div>
<label class="text-file">คำส</label>
<q-file
outlined
v-model="fileOrder"
label="เลือกไฟล์คำสั่ง"
lazy-rules
:rules="[(val) => val || 'กรุณาเลือกไฟล์เอกสารแนบท้าย']"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
<div class="q-py-lg" />
<label class="text-file">เอกสารแนบทาย</label>
<q-file
outlined
v-model="fileTailer"
label="เลือกไฟล์เอกสารแนบท้าย"
lazy-rules
:rules="[(val) => val || 'กรุณาเลือกไฟล์เอกสารแนบท้าย']"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
<q-form ref="myForm">
<div class="q-pa-md q-gutter-y-md">
<fieldset class="border q-pa-lg">
<legend class="text-header">ปโหลดไฟล</legend>
<div class="q-gutter-y-lg">
<div>
<label class="text-file">คำส</label>
<q-file
outlined
dense
v-model="fileOrder"
label="เลือกไฟล์คำสั่ง"
lazy-rules
:rules="[(val) => val || 'กรุณาเลือกไฟล์เอกสารแนบท้าย']"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
<!-- <div class="q-py-lg" /> -->
<div>
<label class="text-file">เอกสารแนบทาย</label>
<q-file
outlined
dense
v-model="fileTailer"
label="เลือกไฟล์เอกสารแนบท้าย"
lazy-rules
:rules="[(val) => val || 'กรุณาเลือกไฟล์เอกสารแนบท้าย']"
>
<template v-slot:prepend>
<q-icon name="attach_file" />
</template>
</q-file>
</div>
</div>
</q-form>
</fieldset>
</div>
</fieldset>
<fieldset class="border q-pa-lg">
<legend class="text-header">รายละเอยด</legend>
<div class="q-gutter-y-md">
<div>
<label class="text-file">เลขทคำส</label>
<q-input
:outlined="true"
dense
lazy-rules
:readonly="!true"
:borderless="!true"
v-model="order"
:rules="[(val) => !!val || `${'กรุณากรอกเลขที่คำสั่ง'}`]"
hide-bottom-space
:label="`${'เลขที่คำสั่ง'}`"
/>
</div>
<div>
<label class="text-file">ออกคำส</label>
<datepicker
menu-class-name="modalfix"
v-model="years"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
outlined
dense
lazy-rules
:model-value="years + 543"
:rules="[
(val) => !!val || `${'กรุณาเลือกปีที่ออกคำสั่ง'}`,
]"
hide-bottom-space
:label="`${'ปีที่ออกคำสั่ง'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-grey)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
<div>
<label class="text-file">นทลงนาม</label>
<datepicker
menu-class-name="modalfix"
v-model="date"
:locale="'th'"
autoApply
borderless
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">
{{ year + 543 }}
</template>
<template #year-overlay-value="{ value }">
{{ parseInt(value + 543) }}
</template>
<template #trigger>
<q-input
outlined
dense
class="full-width datepicker"
:model-value="date != null ? date2Thai(date) : null"
:label="`${'วันที่มีผลออกคำสั่ง'}`"
:rules="[
(val) =>
!!val || `${'กรุณาเลือกวันที่มีผลออกคำสั่ง'}`,
]"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-grey)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
</fieldset>
</div>
</q-form>
</template>
</q-splitter>
</div>
@ -181,9 +287,13 @@
label="เลือกรายชื่อส่งสำเนา"
>
</q-btn>
<q-btn unelevated label="บันทึก" color="public" @click="save">
<!-- icon="mdi-content-save-outline"
<q-tooltip>นท</q-tooltip> -->
<q-btn
unelevated
label="บันทึก"
:color="validateForm() ? 'public' : 'grey'"
:disable="!validateForm()"
@click="save"
>
</q-btn>
<!-- <q-btn flat round color="primary" icon="chevron_right" @click="next">
@ -193,37 +303,42 @@
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted } from "vue";
import { ref, onMounted, onUnmounted, computed } from "vue";
import { VuePDF, usePDF } from "@tato30/vue-pdf";
import type { PDFDocumentLoadingTask } from "pdfjs-dist/types/src/display/api";
import type { QForm } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
onUnmounted(() => {
window.removeEventListener("resize", (e: any) => {
myEventHandler(e);
});
});
const mixin = useCounterMixin();
const { date2Thai } = mixin;
// onUnmounted(() => {
// window.removeEventListener("resize", (e: any) => {
// myEventHandler(e);
// });
// });
onMounted(async () => {
window.addEventListener("resize", (e: any) => {
myEventHandler(e);
});
// window.addEventListener("resize", (e: any) => {
// myEventHandler(e);
// });
const pdfData = usePDF(
"https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf"
);
console.log("pdfData.pages.value", pdfData);
console.log("pdfData.pages.value", pdfData.pages);
console.log("pdfData.pages.value", pdfData.pages.value);
setTimeout(() => {
pdfSrc.value = pdfData.pdf.value;
numOfPages.value = pdfData.pages.value;
}, 1000);
});
const myEventHandler = (e: any) => {
console.log("e", e.target.innerWidth);
// if (vuePDFRef !== null) {
// vuePDFRef.value.reload();
// }
};
// const myEventHandler = (e: any) => {
// console.log("e", e.target.innerWidth);
// if (vuePDFRef !== null) {
// vuePDFRef.value.reload();
// }
// };
const pdfSrc = ref<PDFDocumentLoadingTask | undefined>();
const numOfPages = ref<number>(0);
@ -251,6 +366,10 @@ const tab = ref<string>("main");
const fileOrder = ref<any>(null);
const fileTailer = ref<any>(null);
const order = ref<string>("");
const years = ref<number>(new Date().getFullYear());
const date = ref<Date>(new Date());
const onchangePage = (val: any) => {
// console.log(val);
if (vuePDFRef !== null) {
@ -259,7 +378,7 @@ const onchangePage = (val: any) => {
};
const save = () => {
if (myForm !== null) {
if (myForm.value !== null) {
myForm.value!.validate().then((success: Boolean) => {
if (success) {
// yay, models are correct
@ -268,6 +387,14 @@ const save = () => {
}
};
const validateForm = () => {
return (
fileOrder.value !== null &&
fileOrder.value !== null &&
order.value.trim() !== ""
);
};
const getClass = (val: boolean) => {
return {
"card-header-active q-px-lg q-py-md cursor-pointer": val,

View file

@ -1,10 +1,10 @@
/**
* Router }6d0hk' (Registry)
* Router (registryEmployee)
*/
const Main = () => import("@/modules/08_registryEmployee/views/Main.vue");
const Detail = () =>
import("@/modules/08_registryEmployee/components/Profile.vue");
// const Detail = () =>
// import("@/modules/08_registryEmployee/components/Profile.vue");
export default [
{
@ -17,14 +17,14 @@ export default [
Role: "registryEmployee",
},
},
{
path: "/registryEmployee/:id",
name: "registryEmployeeDetail",
component: Detail,
meta: {
Auth: true,
Key: [9],
Role: "registryEmployee",
},
},
// {
// path: "/registryEmployee/:id",
// name: "registryEmployeeDetail",
// component: Detail,
// meta: {
// Auth: true,
// Key: [9],
// Role: "registryEmployeeDetails",
// },
// },
];

View file

@ -0,0 +1,602 @@
<template>
<div class="toptitle text-dark col-12 row items-center">
รายชอลกจางชวคราว
</div>
<div>
<div class="q-pa-md" style="min-height: 70vh; overflow-y: scroll">
<div class="col-12 row q-py-sm items-center">
<q-btn flat round color="primary" @click="clickAdd" icon="mdi-plus">
<q-tooltip>เพมขอม</q-tooltip>
</q-btn>
<q-space />
<div class="items-center" style="display: flex">
<!-- นหาขอความใน table -->
<q-input
standout
dense
v-model="filter"
ref="filterRef"
outlined
debounce="300"
placeholder="ค้นหา"
style="max-width: 200px"
class="q-ml-sm"
>
<template v-slot:append>
<q-icon v-if="filter == ''" name="search" />
<q-icon
v-if="filter !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>
<!-- แสดงคอลมนใน table -->
<q-select
v-model="visibleColumns"
:display-value="$q.lang.table.columns"
multiple
outlined
dense
:options="columns"
options-dense
option-value="name"
map-options
emit-value
style="min-width: 150px"
class="gt-xs q-ml-sm"
/>
</div>
</div>
<q-table
flat
bordered
dense
:rows="rows"
:columns="columns"
:visible-columns="visibleColumns"
:filter="filter"
row-key="name"
class="custom-header-table"
: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 key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="positionNum" :props="props">
{{ props.row.positionNum }}
</q-td>
<q-td key="name" :props="props">
{{ props.row.name }}
</q-td>
<q-td key="position" :props="props">
{{ props.row.position }}
</q-td>
<q-td key="path" :props="props">
{{ props.row.path }}
</q-td>
<q-td key="type" :props="props">
{{ props.row.type }}
</q-td>
<q-td key="level" :props="props">
{{ props.row.level }}
</q-td>
<q-td key="affiliation" :props="props">
{{ props.row.affiliation }}
</q-td>
<q-td key="yearly" :props="props">
{{ props.row.yearly }}
</q-td>
<q-td key="pay" :props="props">
{{ props.row.pay }}
</q-td>
<q-td auto-width>
<q-btn
icon="mdi-dots-vertical"
size="12px"
color="grey-7"
flat
round
dense
>
<q-menu transition-show="jump-down" transition-hide="jump-up">
<q-list dense style="min-width: 100px">
<q-item
clickable
v-close-popup
@click="editDetail(props.row, 'wait')"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
</q-item-section>
<q-item-section>กำหนดตำแหน</q-item-section>
</q-item>
<q-separator />
<q-item
clickable
v-close-popup
@click="editDetail(props.row, 'wait')"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
</q-item-section>
<q-item-section>ลบ</q-item-section>
</q-item>
<q-separator />
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">
<q-pagination
v-model="pagination.page"
color="primary"
:max="scope.pagesNumber"
:max-pages="5"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
</q-table>
</div>
<q-separator />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import type { QInput, QForm } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
const props = defineProps({
next: {
type: Function,
default: () => console.log("not function"),
},
previous: {
type: Function,
default: () => console.log("not function"),
},
});
const $q = useQuasar();
const mixin = useCounterMixin(); //
const { dialogMessage, messageError, showLoader, hideLoader } = mixin;
const myForm = ref<QForm>();
const filterRef = ref<QInput>();
const filter = ref<string>("");
const mutiselect = ref([]);
const modal = ref<boolean>(false);
const search = ref<string>("");
const expanded = ref<string[]>([]);
const nodesTree = ref<treeTab[]>([]);
const send = ref<String[]>([]);
const selectedModal = ref([]);
const filterModal = ref<string>("");
const visibleColumnsModal = ref<String[]>(["no", "positionNum", "name"]);
const columnsModal = [
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
{
name: "positionNum",
align: "left",
label: "เลขประจำตัวประชาชน",
field: "positionNum",
sortable: true,
},
{
name: "name",
align: "left",
label: "ชื่อ-สกุล",
field: "name",
sortable: true,
},
];
const rowsModal = [
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
];
const paginationModal = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const visibleColumns = ref<String[]>([
"no",
"positionNum",
"name",
"position",
"path",
"type",
"level",
"affiliation",
"yearly",
"pay",
]);
const columns = [
{ name: "no", align: "left", label: "ลำดับ", field: "no", sortable: true },
{
name: "name",
align: "left",
label: "ชื่อ-สกุล",
field: "name",
sortable: true,
},
{
name: "positionNum",
align: "left",
label: "ตำแหน่งเลขที่",
field: "positionNum",
sortable: true,
},
{
name: "position",
align: "left",
label: "ตำแหน่ง",
field: "position",
sortable: true,
},
{
name: "path",
align: "left",
label: "สายงาน",
field: "path",
sortable: true,
},
{
name: "type",
align: "left",
label: "ประเภท",
field: "type",
sortable: true,
},
{
name: "level",
align: "left",
label: "ระดับชั้นงาน",
field: "level",
sortable: true,
},
{
name: "affiliation",
align: "left",
label: "สังกัด",
field: "affiliation",
sortable: true,
},
{
name: "yearly",
align: "left",
label: "ปีงบประมาณ",
field: "yearly",
sortable: true,
},
{
name: "pay",
align: "left",
label: "ค่าจ้าง",
field: "pay",
sortable: true,
},
];
const rows = [
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
];
onMounted(async () => {
await nodeTree();
});
const paginationLabel = (start: number, end: number, total: number) => {
// if (props.paging == true)
// return " " + start + " " + end + " " + total + " ";
// else
return start + "-" + end + " ใน " + total;
};
const resetFilter = () => {
// reset X
filter.value = "";
filterRef.value!.focus();
};
const getClass = (val: boolean) => {
return {
"full-width inputgreen cursor-pointer": val,
"full-width cursor-pointer": !val,
};
};
const clickClose = async () => {
// if (editRow.value == true) {
// dialogMessage(
// $q,
// "",
// "?",
// "mdi-help-circle-outline",
// "",
// "orange",
// () => (modal.value = false),
// undefined
// );
// } else {
modal.value = false;
// next.value = false;
// previous.value = false;
// }
};
const clickAdd = () => {
modal.value = true;
};
const clickDelete = (id: string) => {
dialogMessage(
$q,
"ยืนยันการลบข้อมูล",
"ต้องการลบข้อมูลนี้ใช่หรือไม่?",
"mdi-help-circle-outline",
"ตกลง",
"red",
() => deleteData(id),
undefined
);
};
const nodeTree = async () => {
showLoader();
await http
.get(config.API.profileOrganizRoot)
.then((res: any) => {
const data = res.data.result;
nodesTree.value = data;
if (data.length > 0) {
expanded.value = [data[0].id];
}
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
};
const onSelected = async (id: string) => {
// await fetchPositionNumber(id);
};
const deleteData = async (id: string) => {};
</script>
<style lang="scss">
.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;
}
}
</style>