Merge branch 'develop' into devTee
This commit is contained in:
commit
8664a904eb
7 changed files with 55 additions and 28 deletions
|
|
@ -16,4 +16,9 @@ export default {
|
|||
specialTime: () => `${leave}/admin/edit`,
|
||||
specialTimeApprove: (id: string) => `${leave}/admin/edit/approve/${id}`,
|
||||
specialTimeReject: (id: string) => `${leave}/admin/edit/reject/${id}`,
|
||||
|
||||
/** รายการลา*/
|
||||
leaveType: () => `${leave}/type`,
|
||||
leaveList: () => `${leave}/admin`,
|
||||
leaveListById: (id: string) => `${leave}/admin/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,32 +1,32 @@
|
|||
import env from "../index";
|
||||
const disciplineMain = `${env.API_URI}/discipline`;
|
||||
const discipline = `${env.API_URI}/discipline/disciplinary`;
|
||||
const investigate = `${env.API_URI}/discipline/investigate`;
|
||||
const discipline2 = `${env.API_URI}/discipline`;
|
||||
|
||||
export default {
|
||||
directorList: (page: number, pageSize: number, keyword: string) =>
|
||||
`${discipline}/director?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
director: () => `${discipline}/director`,
|
||||
directorbyId: (id: string) => `${discipline}/director/${id}`,
|
||||
`${disciplineMain}/director?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
director: () => `${disciplineMain}/director`,
|
||||
directorbyId: (id: string) => `${disciplineMain}/director/${id}`,
|
||||
|
||||
/**ช่องทางการร้องเรียน */
|
||||
complaintChannel: () => `${discipline}/complaint_Channel`,
|
||||
complaintChannel: () => `${disciplineMain}/complaint_Channel`,
|
||||
|
||||
/**ลบ ช่องทางการร้องเรียน
|
||||
* @param id type
|
||||
*/
|
||||
complaintListOp: () => `${discipline}/complaint_Channel`,
|
||||
complaintChannelbyId: (id: string) => `${discipline}/complaint_Channel/${id}`,
|
||||
complaintAdd: () => `${discipline}/complaint`,
|
||||
complaintbyId: (id: string) => `${discipline}/complaint/${id}`,
|
||||
complaintReject: (id: string) => `${discipline}/complaint/reject/${id}`,
|
||||
complaintResume: (id: string) => `${discipline}/complaint/resume/${id}`,
|
||||
complaintListOp:()=>`${disciplineMain}/complaint_Channel`,
|
||||
complaintChannelbyId: (id: string) => `${disciplineMain}/complaint_Channel/${id}`,
|
||||
complaintAdd: () => `${disciplineMain}/complaint`,
|
||||
complaintbyId: (id: string) => `${disciplineMain}/complaint/${id}`,
|
||||
complaintReject: (id: string) => `${disciplineMain}/complaint/reject/${id}`,
|
||||
complaintResume: (id: string) => `${disciplineMain}/complaint/resume/${id}`,
|
||||
complaintList: (page: number, pageSize: number, keyword: string) =>
|
||||
`${discipline}/complaint?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
complaintFileUpload: (id: string) => `${discipline}/complaint/file/${id}`,
|
||||
`${disciplineMain}/complaint?page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||
complaintFileUpload: (id: string) => `${disciplineMain}/complaint/file/${id}`,
|
||||
complaintFileDelete: (id: string, docId: string) =>
|
||||
`${discipline}/complaint/file/${id}/${docId}`,
|
||||
complaintApprove: (id: string) => `${discipline}/complaint/approve/${id}`,
|
||||
`${disciplineMain}/complaint/file/${id}/${docId}`,
|
||||
complaintApprove: (id: string) => `${disciplineMain}/complaint/approve/${id}`,
|
||||
|
||||
/** API สืบสวนข้อเท็จจริง*/
|
||||
investigateMain: (page: number, pageSize: number, keyword: string) =>
|
||||
|
|
@ -63,6 +63,6 @@ export default {
|
|||
disciplinarySuspend: (id: string) => `${discipline}/suspend/${id}`,
|
||||
|
||||
/** รายการผลการพิจารณาทางวินัย*/
|
||||
listResult: () => `${discipline2}/result`,
|
||||
listResultById: (id: string) => `${discipline2}/result/${id}`,
|
||||
listResult: () => `${disciplineMain}/result`,
|
||||
listResultById: (id: string) => `${disciplineMain}/result/${id}`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const $q = useQuasar(); //ใช้ noti quasar
|
|||
/** ตัวแปร querySting*/
|
||||
const keyword = ref<string>("");
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(3);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
const filetStatus = ref<string>("ALL");
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const rows = ref<TableRows[]>([]);
|
|||
/** ตัวแปร QueryString*/
|
||||
const keyword = ref<string>("");
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(2);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
/** function เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */
|
||||
|
|
|
|||
|
|
@ -84,6 +84,11 @@ function closeDetail() {
|
|||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||
updateProp(pagination.value, currentPage.value);
|
||||
});
|
||||
|
||||
function updateRowsPerPagen(newPagination: any) {
|
||||
pagination.value.rowsPerPage = newPagination.rowsPerPage;
|
||||
currentPage.value = 1;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -98,7 +103,8 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
class="custom-header-table"
|
||||
:visible-columns="workStore.visibleColumns"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
v-model:pagination="pagination"
|
||||
:pagination="pagination"
|
||||
@update:pagination="updateRowsPerPagen"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import type { DateFilter } from "@/modules/09_leave/interface/request/leave";
|
||||
import type {
|
||||
|
|
@ -106,6 +108,14 @@ const optionStatusMain = ref<DataOption[]>(
|
|||
|
||||
async function fetchOption() {
|
||||
console.log("loadOption รอ API");
|
||||
// await http
|
||||
// .get(config.API.leaveType())
|
||||
// .then((res) => {
|
||||
// console.log(res);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log(err);
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -69,12 +69,13 @@ function resetFilter() {
|
|||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
function updateRowsPerPage(newPagination: any) {
|
||||
pagination.value = newPagination;
|
||||
currentPage.value = 1;
|
||||
}
|
||||
|
||||
function filterFn() {
|
||||
updatePaging(
|
||||
currentPage.value,
|
||||
Number(pagination.value.rowsPerPage),
|
||||
filter.value
|
||||
);
|
||||
updatePaging(1, Number(pagination.value.rowsPerPage), filter.value);
|
||||
}
|
||||
|
||||
function updatePaging(p: number, pS: number, key: string) {
|
||||
|
|
@ -82,7 +83,12 @@ function updatePaging(p: number, pS: number, key: string) {
|
|||
}
|
||||
|
||||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||
filterFn();
|
||||
emit(
|
||||
"update:queryString",
|
||||
currentPage.value,
|
||||
Number(pagination.value.rowsPerPage),
|
||||
filter.value
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -109,7 +115,6 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
ref="filterRef"
|
||||
@keydown.enter.prevent="filterFn"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
|
|
@ -148,8 +153,9 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
virtual-scroll
|
||||
:virtual-scroll-sticky-size-start="48"
|
||||
dense
|
||||
v-model:pagination="pagination"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
:pagination="pagination"
|
||||
@update:pagination="updateRowsPerPage"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue