เลือกวุฒิการศึกษา
This commit is contained in:
parent
07dad32620
commit
96f92a5b69
6 changed files with 55 additions and 17 deletions
|
|
@ -27,9 +27,10 @@
|
|||
v-model="defaultEducation.educationLevelExamId"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือก วุฒิที่ใช้สมัครสอบ'}`]"
|
||||
:label="`${'วุฒิที่ใช้สมัครสอบ'}`"
|
||||
@update:model-value="(value) => checkInputName()"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3">
|
||||
<div class="col-xs-12 col-sm-3" v-if="showEducationName">
|
||||
<q-input
|
||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||
|
|
@ -114,7 +115,11 @@
|
|||
lazy-rules
|
||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||
:model-value="date2Thai(defaultEducation.educationEndDate)"
|
||||
:model-value="
|
||||
defaultEducation.educationEndDate == null
|
||||
? null
|
||||
: date2Thai(defaultEducation.educationEndDate)
|
||||
"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวันที่สำเร็จการศึกษา'}`]"
|
||||
:label="`${'วันที่สำเร็จการศึกษา'}`"
|
||||
>
|
||||
|
|
@ -200,6 +205,7 @@ const props = defineProps({
|
|||
|
||||
const $q = useQuasar()
|
||||
const edit = ref<boolean>(true)
|
||||
const showEducationName = ref<boolean>(true)
|
||||
const myform = ref<any>({})
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
|
|
@ -245,9 +251,11 @@ const fetchData = async () => {
|
|||
defaultEducation.value.educationMajor = data.educationMajor
|
||||
defaultEducation.value.educationLocation = data.educationLocation
|
||||
defaultEducation.value.educationType = data.educationType
|
||||
defaultEducation.value.educationEndDate = new Date(data.educationEndDate)
|
||||
defaultEducation.value.educationEndDate =
|
||||
data.educationEndDate == null ? null : new Date(data.educationEndDate)
|
||||
defaultEducation.value.educationScores = data.educationScores
|
||||
defaultEducation.value.educationLevelHighId = data.educationLevelHighId
|
||||
checkInputName()
|
||||
})
|
||||
.catch((e) => {
|
||||
// messageError($q, e)
|
||||
|
|
@ -257,6 +265,17 @@ const fetchData = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const checkInputName = () => {
|
||||
showEducationName.value =
|
||||
props.educationLevelOptions.filter(
|
||||
(x) =>
|
||||
x.id == defaultEducation.value.educationLevelExamId &&
|
||||
(x.name == 'ปริญญาตรี' || x.name == 'ปริญญาโท' || x.name == 'ปริญญาเอก')
|
||||
).length == 0
|
||||
? false
|
||||
: true
|
||||
}
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
'full-width inputgreen cursor-pointer': val,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue