2023-03-19 00:43:28 +07:00
|
|
|
<!-- tab ข้อมูลส่วนบุคคล -->
|
|
|
|
|
<template>
|
|
|
|
|
<Information
|
|
|
|
|
:prefixOptions="prefixOptions"
|
|
|
|
|
:genderOptions="genderOptions"
|
|
|
|
|
:bloodOptions="bloodOptions"
|
|
|
|
|
:statusOptions="statusOptions"
|
|
|
|
|
:religionOptions="religionOptions"
|
|
|
|
|
:provinceOptions="provinceOptions"
|
|
|
|
|
v-model:statusEdit="statusEdit"
|
|
|
|
|
:notiNoEdit="notiNoEdit"
|
|
|
|
|
:step="step"
|
|
|
|
|
/>
|
|
|
|
|
<Address v-model:statusEdit="statusEdit" :notiNoEdit="notiNoEdit" :step="step" />
|
|
|
|
|
<Family
|
|
|
|
|
:prefixOptions="prefixOptions"
|
|
|
|
|
v-model:statusEdit="statusEdit"
|
|
|
|
|
:notiNoEdit="notiNoEdit"
|
|
|
|
|
:step="step"
|
|
|
|
|
/>
|
|
|
|
|
<Occupation v-model:statusEdit="statusEdit" :notiNoEdit="notiNoEdit" :step="step" />
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ref, onMounted, watch } from 'vue'
|
|
|
|
|
import type { DataOption } from '@/modules/01_exam/interface/index/Main'
|
|
|
|
|
import Information from '@/modules/01_exam/components/Form/Profile/Information.vue'
|
|
|
|
|
import Address from '@/modules/01_exam/components/Form/Profile/Address.vue'
|
|
|
|
|
import Family from '@/modules/01_exam/components/Form/Profile/Family.vue'
|
|
|
|
|
import Occupation from '@/modules/01_exam/components/Form/Profile/Occupation.vue'
|
|
|
|
|
import http from '@/plugins/http'
|
|
|
|
|
import config from '@/app.config'
|
2023-03-21 16:30:02 +07:00
|
|
|
import { useQuasar } from 'quasar'
|
|
|
|
|
import { useCounterMixin } from '@/stores/mixin'
|
2023-03-19 00:43:28 +07:00
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
loader: {
|
|
|
|
|
//หน้า main มีการอัพเดทค่าให้ refresh data
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
statusEdit: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: true
|
|
|
|
|
},
|
|
|
|
|
step: {
|
|
|
|
|
type: Number,
|
|
|
|
|
required: true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
2023-03-22 00:25:55 +07:00
|
|
|
const $q = useQuasar()
|
2023-03-21 16:30:02 +07:00
|
|
|
const mixin = useCounterMixin() //เรียกฟังก์ชันกลาง
|
2023-03-22 00:25:55 +07:00
|
|
|
const { modalError } = mixin
|
2023-03-19 00:43:28 +07:00
|
|
|
const loader = ref<boolean>(true)
|
|
|
|
|
const statusEdit = ref<boolean>(false)
|
|
|
|
|
const prefixOptions = ref<DataOption[]>([])
|
|
|
|
|
const bloodOptions = ref<DataOption[]>([])
|
|
|
|
|
const genderOptions = ref<DataOption[]>([])
|
|
|
|
|
const statusOptions = ref<DataOption[]>([])
|
|
|
|
|
const religionOptions = ref<DataOption[]>([])
|
|
|
|
|
const provinceOptions = ref<DataOption[]>([])
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['update:loader', 'update:statusEdit'])
|
|
|
|
|
|
|
|
|
|
watch(statusEdit, (count: boolean, prevCount: boolean) => {
|
|
|
|
|
emit('update:statusEdit', count)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const notiNoEdit = () => {
|
2023-03-22 00:25:55 +07:00
|
|
|
modalError($q, 'ไม่สามารถไม่สามารถแก้ไขข้อมูลได้', 'มีข้อมูลที่ยังไม่ถูกบันทึกข้อมูล')
|
2023-03-19 00:43:28 +07:00
|
|
|
}
|
|
|
|
|
</script>
|