fix: ปรับ api ค้นหาคนครองในโครงสร้างปัจจุบัน แก้ tag ผิด

This commit is contained in:
Warunee Tamkoo 2025-08-21 16:01:41 +07:00
parent 762acf46bd
commit 2135c01c16
4 changed files with 13 additions and 6 deletions

View file

@ -330,7 +330,12 @@ function searchData() {
keyword: formData.personal, //
};
http
.post(config.API.orgSearchProfile, reqBody)
.post(
store.typeOrganizational === "draft"
? config.API.orgSearchProfile
: config.API.orgSearchCurrentProfile,
reqBody
)
.then((res) => {
totalPage.value = Math.ceil(res.data.result.total / pageSize.value);
const list = res.data.result.data.map((e: SelectPerson) => ({
@ -450,7 +455,7 @@ watch(
<template>
<q-dialog v-model="modal" persistent>
<q-card style="min-width: 80vw">
<form @submit.prevent="validateForm">
<q-form greedy @submit.prevent @validation-success="validateForm">
<DialogHeader :tittle="`เลือกคนครอง`" :close="close" />
<q-separator />
@ -564,6 +569,7 @@ watch(
label="ค้นหาจากชื่อ-นามสกุล หรือเลขประจำตัวประชาชน"
lazy-rules
hide-bottom-space
@keydown.enter.prevent="searchData"
/>
</div>
<div class="col-2">
@ -577,6 +583,7 @@ watch(
label="ตำแหน่งในสายงาน"
lazy-rules
hide-bottom-space
@keydown.enter.prevent="searchData"
/>
</div>
<div class="col-2">
@ -650,7 +657,6 @@ watch(
map-options
:options="columnsResult"
option-value="name"
style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2"
/>
@ -746,7 +752,7 @@ watch(
<q-card-actions align="right" class="bg-white text-teal">
<q-btn type="submit" :label="`ยืนยัน`" color="public" />
</q-card-actions>
</form>
</q-form>
</q-card>
</q-dialog>
</template>

View file

@ -462,7 +462,7 @@ onMounted(async () => {
<q-tr
:props="props"
class="cursor-pointer"
@click.stop,pervent="
@click.stop.prevent="
onRedirectToPosition(props.row.id, props.row.type)
"
>