fix: showEducationName

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-11-20 09:32:34 +07:00
parent 40f10e30cc
commit 472de80c3e

View file

@ -252,14 +252,16 @@ watch(defaultEducation, async (count: Education, prevCount: Education) => {
onMounted(async () => {
await fetchData()
await checkInputName()
})
const fetchData = async () => {
loaderPage(true)
await http
.get(config.API.candidateEducation(examId.value, positionId.value))
.then((res) => {
.then(async (res) => {
const data = res.data.result
defaultEducation.value.educationLevelExamId = data.educationLevelExamId
defaultEducation.value.educationName = data.educationName
defaultEducation.value.educationMajor = data.educationMajor
@ -269,7 +271,7 @@ const fetchData = async () => {
data.educationEndDate == null ? null : new Date(data.educationEndDate)
defaultEducation.value.educationScores = data.educationScores
defaultEducation.value.educationLevelHighId = data.educationLevelHighId
checkInputName()
await checkInputName()
})
.catch((e) => {
// messageError($q, e)
@ -279,7 +281,7 @@ const fetchData = async () => {
})
}
const checkInputName = () => {
const checkInputName = async () => {
showEducationName.value =
props.educationLevelOptions.filter(
(x) =>