ผู้ถูกร้องเรียน
This commit is contained in:
parent
97fde66a79
commit
62ad5673c6
5 changed files with 31 additions and 8 deletions
|
|
@ -46,7 +46,7 @@ const typeOps = ref<typeOp[]>([
|
|||
|
||||
/** รับค่ามาจาก หน้าหลัก */
|
||||
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
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -214,7 +222,7 @@ function updateSelect() {
|
|||
ref="table"
|
||||
:columns="mainStore.columnsRespondent"
|
||||
:rows="rows"
|
||||
row-key="personId"
|
||||
row-key="idcard"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue