fix: ระบบพัฒนา เพิ่มปุ่มลบ/ระบบวินัย เพิ่ม ค้นหาขั้นสูง
This commit is contained in:
parent
9c5e958715
commit
852be66d2e
12 changed files with 1182 additions and 75 deletions
|
|
@ -14,7 +14,7 @@ import type {
|
|||
FormRef,
|
||||
DataOption,
|
||||
FaultTypeOption,
|
||||
} from "@/modules/11_discipline/interface/request/Result";
|
||||
} from "@/modules/11_discipline/interface/request/result";
|
||||
|
||||
import DialogHistory from "@/modules/11_discipline/components/4_Result/DialogHistory.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
|
|
|||
|
|
@ -31,13 +31,42 @@ const pagination = ref({
|
|||
});
|
||||
|
||||
/** function เรียกรายการสรุปผลการพิจารณาทางวินัย*/
|
||||
async function fetchListResult() {
|
||||
async function fetchListResult(data?: any) {
|
||||
const body = {
|
||||
page: pagination.value.page,
|
||||
pageSize: pagination.value.rowsPerPage,
|
||||
keyword: filter.value.trim(),
|
||||
status: status.value,
|
||||
...(data && data.respondentType
|
||||
? { respondentType: data.respondentType }
|
||||
: {}),
|
||||
...(data && data.offenseDetails
|
||||
? { offenseDetails: data.offenseDetails }
|
||||
: {}),
|
||||
...(data && data.disciplinaryFaultLevel
|
||||
? { disciplinaryFaultLevel: data.disciplinaryFaultLevel }
|
||||
: {}),
|
||||
...(data && data.disciplinaryCaseFault
|
||||
? { disciplinaryCaseFault: data.disciplinaryCaseFault }
|
||||
: {}),
|
||||
...(data && data.disciplinaryDateStart
|
||||
? { disciplinaryDateStart: data.disciplinaryDateStart }
|
||||
: {}),
|
||||
...(data && data.disciplinaryDateEnd
|
||||
? { disciplinaryDateEnd: data.disciplinaryDateEnd }
|
||||
: {}),
|
||||
...(data && data.resultDisciplineType
|
||||
? { resultDisciplineType: data.resultDisciplineType }
|
||||
: {}),
|
||||
...(data && data.resultTitleType
|
||||
? { resultTitleType: data.resultTitleType }
|
||||
: {}),
|
||||
...(data && data.resultOc ? { resultOc: data.resultOc } : {}),
|
||||
...(data && data.resultYear ? { resultYear: data.resultYear } : {}),
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
config.API.listResult() +
|
||||
`?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filter.value.trim()}&status=${status.value}`
|
||||
)
|
||||
.post(config.API.listResult(), body)
|
||||
.then(async (res) => {
|
||||
const data = res.data.result.data;
|
||||
totalList.value = Math.ceil(
|
||||
|
|
@ -74,9 +103,9 @@ function filterStatus(statusReturn: string) {
|
|||
getSearch();
|
||||
}
|
||||
|
||||
function getSearch() {
|
||||
function getSearch(data?: any) {
|
||||
pagination.value.page = 1;
|
||||
fetchListResult();
|
||||
fetchListResult(data);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import { ref, useAttrs, watch } from "vue";
|
|||
import { useDisciplineResultStore } from "@/modules/11_discipline/store/ResultStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
import DialogSearchAdvanced from "@/modules/11_discipline/components/DialogSearchAdvanced.vue";
|
||||
|
||||
const total = defineModel<number>("total", { required: true });
|
||||
const totalList = defineModel<number>("totalList", { required: true });
|
||||
const pagination = defineModel<any>("pagination", { required: true });
|
||||
|
|
@ -111,7 +113,7 @@ function updatePagination(newPagination: any) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pb-sm row q-col-gutter-sm">
|
||||
<div class="q-pb-sm row q-col-gutter-sm items-center">
|
||||
<div class="q-gutter-sm" v-if="nornmalData == true"></div>
|
||||
|
||||
<q-select
|
||||
|
|
@ -147,6 +149,7 @@ function updatePagination(newPagination: any) {
|
|||
</q-select>
|
||||
|
||||
<q-space />
|
||||
<DialogSearchAdvanced :get-data="(value:any)=> props.getSearch?.(value)" />
|
||||
<q-input
|
||||
standout
|
||||
dense
|
||||
|
|
@ -155,18 +158,20 @@ function updatePagination(newPagination: any) {
|
|||
@keydown.enter.prevent="filterFn"
|
||||
@update:model-value="updateInput"
|
||||
outlined
|
||||
placeholder="ค้นหาเรื่องร้องเรียน"
|
||||
placeholder="ค้นหา"
|
||||
style="max-width: 200px"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
<q-tooltip
|
||||
anchor="bottom left"
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
class="text-body2"
|
||||
>หมายเหตุ: ค้นหาเรื่องร้องเรียน, ประเภทของเรื่อง,
|
||||
หน่วยงานหรือปีงบประมาณ</q-tooltip
|
||||
>
|
||||
หมายเหตุ: ค้นหาจากเรื่องร้องเรียน ประเภทวินัย ประเภทของเรื่อง
|
||||
หน่วนงาน/ส่วนราชการ หรือปีงบประมาณ</q-tooltip
|
||||
>
|
||||
</q-input>
|
||||
<q-select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue