From 62ad5673c623670a0bf1b9c7cc64dbf2dabe4a70 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 1 Dec 2023 11:44:11 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9C=E0=B8=B9=E0=B9=89=E0=B8=96=E0=B8=B9?= =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B9=89=E0=B8=AD=E0=B8=87=E0=B9=80=E0=B8=A3?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/AddPersonal.vue | 14 +++++++++++--- .../components/1_Complaint/Form.vue | 2 +- .../components/2_InvestigateFacts/Form.vue | 2 +- .../interface/response/investigate.ts | 17 ++++++++++++++++- src/modules/11_discipline/store.ts | 4 ++-- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 412b7a5b5..598b82936 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -46,7 +46,7 @@ const typeOps = ref([ /** รับค่ามาจาก หน้าหลัก */ const props = defineProps({ - checkId: { + mainData: { type: Array, default: [], }, @@ -118,8 +118,9 @@ async function searchInput() { .post(config.API.searchPersonal(), body) .then((res) => { const data = res.data.result; + console.log(data) const list = data.map((e: ResponsePreson) => ({ - personId: e.personId, + id: e.personId, idcard: e.idcard, prefix: e.prefix, firstName: e.firstName, @@ -145,10 +146,17 @@ async function searchInput() { } } + /** update เมื่อเปลี่ยน option */ function updateSelect() { search.value = ""; } +watch(()=>props.mainData,()=>{ + if(props.mainData){ + console.log('mainData',props.mainData) + selected.value = props.mainData + } +})