ดิง id สมัครสอบจาก path
This commit is contained in:
parent
d8e47aad92
commit
b5c6c83d62
11 changed files with 75 additions and 31 deletions
|
|
@ -106,6 +106,7 @@ import Profile from '@/modules/01_exam/components/Form/Profile.vue'
|
|||
import Education from '@/modules/01_exam/components/Form/Education.vue'
|
||||
import Career from '@/modules/01_exam/components/Form/Career.vue'
|
||||
import Document from '@/modules/01_exam/components/Form/Document.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
fetchStep: {
|
||||
|
|
@ -126,7 +127,8 @@ const { modalConfirm, modalError, success } = mixin
|
|||
const loader = ref<boolean>(false)
|
||||
const statusEdit = ref<boolean>(false)
|
||||
const acceptTermOfUse = ref<boolean>(false)
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
|
||||
onMounted(async () => {
|
||||
if (props.status !== 'register') {
|
||||
|
|
@ -151,7 +153,7 @@ const saveForm = async () => {
|
|||
//saveform
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidateRegister(candidateId.value))
|
||||
.get(config.API.candidateRegister(examId.value))
|
||||
.then(() => {
|
||||
success($q, 'สมัครสอบสำเร็จสำเร็จ')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import { useQuasar } from 'quasar'
|
|||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
fetchStep: {
|
||||
|
|
@ -56,7 +57,8 @@ const rejectMessage = ref<string>('กรุณาจ่ายเงินให
|
|||
const img = ref<string>('https://cdn-icons-png.flaticon.com/512/2496/2496846.png')
|
||||
const fileData = ref<any>()
|
||||
const loader = ref<boolean>(false)
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
|
||||
const uploadImg = (file: any) => {
|
||||
fileData.value = null
|
||||
|
|
@ -69,7 +71,7 @@ const uploadImg = (file: any) => {
|
|||
const clickPayment = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidatePayment(candidateId.value))
|
||||
.get(config.API.candidatePayment(examId.value))
|
||||
.then(() => {
|
||||
success($q, 'ส่งหลักฐานชำระเงินสำเร็จ')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -227,6 +227,8 @@ import { useExamDataStore } from '@/modules/01_exam/store'
|
|||
import type { Address, DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||
import { defaultAddress } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
// import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -252,7 +254,8 @@ const $q = useQuasar()
|
|||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { success } = mixin
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const edit = ref<boolean>(true)
|
||||
const addressData = ref<Address>(defaultAddress)
|
||||
const myform = ref<any>()
|
||||
|
|
@ -277,7 +280,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
await http
|
||||
.get(config.API.candidateAddress(candidateId.value))
|
||||
.get(config.API.candidateAddress(examId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
addressData.value.address = data.registAddress
|
||||
|
|
@ -304,7 +307,7 @@ const saveData = async () => {
|
|||
// if (store.consend == true) {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateAddress(candidateId.value), {
|
||||
.post(config.API.candidateAddress(examId.value), {
|
||||
registAddress: addressData.value.address,
|
||||
currentAddress: addressData.value.addressC,
|
||||
registProvinceId: addressData.value.provinceId,
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ import Table from '@/components/Table.vue'
|
|||
import DialogHeader from '@/components/DialogHeader.vue'
|
||||
import DialogFooter from '@/components/DialogFooter.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
loader: {
|
||||
|
|
@ -209,6 +210,10 @@ const props = defineProps({
|
|||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -236,7 +241,8 @@ const editRow = ref<boolean>(false) //เช็คมีการแก้ไข
|
|||
const statusCode = ref<number>()
|
||||
const checkValidate = ref<boolean>(false) //validate data ผ่านหรือไม่
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const rows = ref<RequestItemsObject[]>([])
|
||||
const filter = ref<string>('') //search data table
|
||||
|
||||
|
|
@ -315,7 +321,7 @@ onMounted(async () => {
|
|||
const fetchData = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidateCareer(candidateId.value))
|
||||
.get(config.API.candidateCareer(examId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
rows.value = []
|
||||
|
|
@ -452,7 +458,7 @@ const clickSave = async () => {
|
|||
const saveData = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateCareer(candidateId.value), {
|
||||
.post(config.API.candidateCareer(examId.value), {
|
||||
name: location.value,
|
||||
position: position.value,
|
||||
salary: salary.value,
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ import Table from '@/components/Table.vue'
|
|||
import DialogHeader from '@/components/DialogHeader.vue'
|
||||
import DialogFooter from '@/components/DialogFooter.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
loader: {
|
||||
|
|
@ -211,6 +212,10 @@ const props = defineProps({
|
|||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -241,7 +246,8 @@ const statusCode = ref<number>()
|
|||
const checkValidate = ref<boolean>(false) //validate data ผ่านหรือไม่
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const rows = ref<RequestItemsObject[]>([])
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const filter = ref<string>('') //search data table
|
||||
|
||||
const emit = defineEmits(['update:loader', 'update:statusEdit'])
|
||||
|
|
@ -320,7 +326,7 @@ onMounted(async () => {
|
|||
const fetchData = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidateEducation(candidateId.value))
|
||||
.get(config.API.candidateEducation(examId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
rows.value = []
|
||||
|
|
@ -478,7 +484,7 @@ const clickSave = async () => {
|
|||
const saveData = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateEducation(candidateId.value), {
|
||||
.post(config.API.candidateEducation(examId.value), {
|
||||
educationLevelId: educationLevelId.value,
|
||||
major: major.value,
|
||||
scores: scores.value,
|
||||
|
|
|
|||
|
|
@ -275,6 +275,7 @@ import type { Family, DataOption } from '@/modules/01_exam/interface/index/Main'
|
|||
import { defaultFamily } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
prefixOptions: {
|
||||
|
|
@ -303,7 +304,8 @@ const edit = ref<boolean>(true)
|
|||
const myform = ref<any>()
|
||||
const familyData = ref<Family>(defaultFamily)
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const loader = ref<boolean>(false)
|
||||
|
||||
const emit = defineEmits(['update:statusEdit'])
|
||||
|
|
@ -315,7 +317,7 @@ onMounted(async () => {
|
|||
const fetchData = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidateFamily(candidateId.value))
|
||||
.get(config.API.candidateFamily(examId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
familyData.value.prefixIdC = data.marryPrefixId
|
||||
|
|
@ -347,7 +349,7 @@ const saveData = async () => {
|
|||
// if (store.consend == true) {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateFamily(candidateId.value), {
|
||||
.post(config.API.candidateFamily(examId.value), {
|
||||
marryPrefixId: familyData.value.prefixIdC,
|
||||
marryFirstName: familyData.value.firstnameC,
|
||||
marryLastName: familyData.value.lastnameC,
|
||||
|
|
|
|||
|
|
@ -369,6 +369,7 @@ import type { Information, DataOption } from '@/modules/01_exam/interface/index/
|
|||
import { defaultInformation } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
prefixOptions: {
|
||||
|
|
@ -402,7 +403,8 @@ const mixin = useCounterMixin()
|
|||
const store = useExamDataStore()
|
||||
const { date2Thai, calAge, success, dateToISO } = mixin
|
||||
const districtOptions = ref<DataOption[]>([])
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const edit = ref<boolean>(true)
|
||||
const informaData = ref<Information>(defaultInformation)
|
||||
const myform = ref<any>()
|
||||
|
|
@ -422,7 +424,7 @@ onMounted(async () => {
|
|||
const fetchData = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidateInformation(candidateId.value))
|
||||
.get(config.API.candidateInformation(examId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
informaData.value.prefixId = data.prefixId
|
||||
|
|
@ -458,7 +460,7 @@ const saveData = async () => {
|
|||
// if (store.consend == true) {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateInformation(candidateId.value), {
|
||||
.post(config.API.candidateInformation(examId.value), {
|
||||
prefixId: informaData.value.prefixId,
|
||||
lastName: informaData.value.lastname,
|
||||
citizenProvinceId: informaData.value.provinceId,
|
||||
|
|
|
|||
|
|
@ -262,6 +262,7 @@ import type { Occupation } from '@/modules/01_exam/interface/index/Main'
|
|||
import { defaultOccupation } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
statusEdit: {
|
||||
|
|
@ -287,7 +288,8 @@ const occupationData = ref<Occupation>(defaultOccupation)
|
|||
const myform = ref<any>()
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const loader = ref<boolean>(false)
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
|
||||
const emit = defineEmits(['update:statusEdit'])
|
||||
|
||||
|
|
@ -298,7 +300,7 @@ onMounted(async () => {
|
|||
const fetchData = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidateOccupation(candidateId.value))
|
||||
.get(config.API.candidateOccupation(examId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
occupationData.value.status = data.occupationType
|
||||
|
|
@ -335,7 +337,7 @@ const saveData = async () => {
|
|||
if (occupationData.value.status == 'other') type.value = occupationData.value.other
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateOccupation(candidateId.value), {
|
||||
.post(config.API.candidateOccupation(examId.value), {
|
||||
occupationType: occupationData.value.status,
|
||||
occupationCompany: occupationData.value.company,
|
||||
occupationDepartment: occupationData.value.department,
|
||||
|
|
|
|||
|
|
@ -81,25 +81,28 @@ import ExamForm from '@/modules/01_exam/components/ExamForm.vue'
|
|||
import ExamPayment from '@/modules/01_exam/components/ExamPayment.vue'
|
||||
import ExamFinished from '@/modules/01_exam/components/ExamFinished.vue'
|
||||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const $q = useQuasar()
|
||||
const store = useExamDataStore()
|
||||
const step = ref<number>(1)
|
||||
const stepRaw = ref<number>(1)
|
||||
const tittle = ref<string>('การสอบภาค ข. พิเศษ สำหรับผู้สอบผ่านของส่วนราชการแล้ว ทดสอบ')
|
||||
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
|
||||
const tittle = ref<string>('')
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const loader = ref<boolean>(false)
|
||||
const status = ref<string>('register')
|
||||
const modalConsend = ref<boolean>(false)
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchPeriodExam()
|
||||
await candidateCheck()
|
||||
})
|
||||
|
||||
const candidateCheck = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidateCheckCreate(candidateId.value))
|
||||
.get(config.API.candidateCheckCreate(examId.value))
|
||||
.then(async (res) => {
|
||||
const data = res.data.result
|
||||
store.consend = data
|
||||
|
|
@ -120,7 +123,7 @@ const candidateCheck = async () => {
|
|||
const fetchStep = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidateStatus(candidateId.value))
|
||||
.get(config.API.candidateStatus(examId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
status.value = data
|
||||
|
|
@ -156,6 +159,20 @@ const fetchStep = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const fetchPeriodExam = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.periodExamId(examId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
tittle.value = data.name
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
loader.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const consenClose = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue