From a6f7b4e5871c2dbb7cbefb42a9f28467dc269e56 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 30 Jul 2025 15:13:06 +0700 Subject: [PATCH] fix request api search person add body system --- src/api/registry/api.profile.ts | 4 ++-- src/components/Dialogs/AddPersonal.vue | 5 +++++ src/modules/11_discipline/components/1_Complaint/Form.vue | 1 + .../11_discipline/components/2_InvestigateFacts/Form.vue | 6 +++++- .../components/3_InvestigateDisciplinary/Form.vue | 1 + .../components/6_BasicInformation/Director/Form.vue | 3 +++ .../11_discipline/components/8_AppealComplain/Form.vue | 3 ++- .../12_evaluatePersonal/components/Director/Form.vue | 3 +++ src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue | 3 +++ 9 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/api/registry/api.profile.ts b/src/api/registry/api.profile.ts index f4bc2fb58..a1b76791e 100644 --- a/src/api/registry/api.profile.ts +++ b/src/api/registry/api.profile.ts @@ -46,7 +46,7 @@ export default { `${profile}search/new-employee/oc/${id}`, profileSearchNewEmOcLeaveId: (id: string) => `${profile}search/new-employee/oc/leave/${id}`, - profileSearchPersonal: () => `${profile}search-personal`, + // profileSearchPersonal: () => `${profile}search-personal`, // ไม่ได้เรียกใช้แล้ว profileEmployeeTempId: (id: string) => `${profile}employee/temp/${id}`, profileCoupleId: (profileId: string) => `${profile}couple/${profileId}`, @@ -197,7 +197,7 @@ export default { employmentHistoryId: (employmentId: string) => `${profile}employment/history/${employmentId}`, - searchPersonal: () => `${profile}search-personal`, + // searchPersonal: () => `${profile}search-personal`, // ไม่ได้เรียกใช้แล้ว //สร้างข้อมูลราชการ createProfileOfficer: () => `${profile}information/officer`, diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 9f231c354..264c245d2 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -92,6 +92,10 @@ const props = defineProps({ type: String, default: "multiple", }, + system: { + type: String || undefined, + default: "", + }, }); /**ส่งค่ากลับหน้าหลัก */ @@ -135,6 +139,7 @@ async function getSearch() { const body = { fieldName: type.value, keyword: search.value ? search.value.trim() : "", + system: props.system ?? undefined, }; await http .post( diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index a51ce72f3..9c085af6b 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -1108,6 +1108,7 @@ onMounted(async () => { btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน" :save="addPerson" :selected-data="mainStore.rowsAdd" + :system="(route.meta?.Key as string) || undefined" /> { class="text-center" > { btn-title="เพิ่มรายชื่อผู้ถูกร้องเรียน" :selected-data="mainStore.rowsAdd" :save="addPerson" + :system="(route.meta?.Key as string) || undefined" /> { btn-title="เพิ่มรายชื่อผู้ถูกสอบสวน" :save="addPerson" :selected-data="mainStore.rowsAdd" + :system="(route.meta?.Key as string) || undefined" /> (false); const personId = ref(""); const searchRef = ref(null); @@ -193,6 +195,7 @@ async function getSearch() { const body = { fieldName: type.value, keyword: search.value, + system: (route.meta?.Key as string) || undefined, }; await http .post( diff --git a/src/modules/11_discipline/components/8_AppealComplain/Form.vue b/src/modules/11_discipline/components/8_AppealComplain/Form.vue index fc8570eb3..122d1add7 100644 --- a/src/modules/11_discipline/components/8_AppealComplain/Form.vue +++ b/src/modules/11_discipline/components/8_AppealComplain/Form.vue @@ -540,7 +540,7 @@ onMounted(() => { }}
- {{ col.value?col.value:'-' }} + {{ col.value ? col.value : "-" }}
@@ -766,6 +766,7 @@ onMounted(() => { :save="addPerson" :selected-data="mainStore.rowsAdd" selecetSwitch="single" + :system="(route.meta?.Key as string) || undefined" /> (actionType.value === "VIEW" ? true : false)); //อ่านอย่างเดียว const modalPersonal = ref(false); const personId = ref(""); @@ -173,6 +175,7 @@ function searchInput() { const body = { fieldName: type.value, keyword: search.value ? search.value.trim() : "", + system: (route.meta?.Key as string) || undefined, }; http .post( diff --git a/src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue b/src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue index 479e35b97..93fce96a5 100644 --- a/src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue +++ b/src/modules/14_KPI/components/Tab/Dialog/DialogEvalute.vue @@ -7,6 +7,7 @@ import config from "@/app.config"; import http from "@/plugins/http"; import { useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; +import { useRoute } from "vue-router"; import type { DataOption, @@ -20,6 +21,7 @@ import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; const $q = useQuasar(); const router = useRouter(); +const route = useRoute(); const mixin = useCounterMixin(); const { showLoader, @@ -237,6 +239,7 @@ async function searchInput(check: boolean) { const body = { fieldName: type.value, keyword: search.value.trim(), + system: (route.meta?.Key as string) || undefined, }; await http .post(