ดิง id สมัครสอบจาก path
This commit is contained in:
parent
d8e47aad92
commit
b5c6c83d62
11 changed files with 75 additions and 31 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue