fix ผู้ถูกร้องเรียนในเรื่องร้องเรียน

This commit is contained in:
Warunee Tamkoo 2023-12-01 13:49:34 +07:00
parent 62ad5673c6
commit 07fd525952
4 changed files with 15 additions and 18 deletions

View file

@ -21,7 +21,7 @@ interface typeOp {
}
interface tableType {
id: string;
personId: string;
idcard: string;
prefix: string;
firstName: string;
@ -46,10 +46,6 @@ const typeOps = ref<typeOp[]>([
/** รับค่ามาจาก หน้าหลัก */
const props = defineProps({
mainData: {
type: Array,
default: [],
},
modal: {
type: Boolean,
default: false,
@ -67,6 +63,10 @@ const props = defineProps({
type: String,
default: "",
},
selectedData: {
type: Array,
default: [],
},
close: {
type: Function,
default: () => console.log("not function"),
@ -118,9 +118,8 @@ async function searchInput() {
.post(config.API.searchPersonal(), body)
.then((res) => {
const data = res.data.result;
console.log(data)
const list = data.map((e: ResponsePreson) => ({
id: e.personId,
personId: e.personId,
idcard: e.idcard,
prefix: e.prefix,
firstName: e.firstName,
@ -151,10 +150,9 @@ async function searchInput() {
function updateSelect() {
search.value = "";
}
watch(()=>props.mainData,()=>{
if(props.mainData){
console.log('mainData',props.mainData)
selected.value = props.mainData
watch(()=>props.selectedData,()=>{
if(props.selectedData){
selected.value = props.selectedData
}
})
</script>