Merge branch 'develop' into working
# Conflicts: # src/modules/01_exam/components/Form/Profile/Family.vue
This commit is contained in:
commit
1316aaef71
5 changed files with 168 additions and 23 deletions
|
|
@ -67,14 +67,14 @@
|
|||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="qualificationId"
|
||||
v-model="educationLevel"
|
||||
:rules="[(val) => !!val || `${'กรุณาเลือกวุฒิที่ได้รับ'}`]"
|
||||
:label="`${'วุฒิที่ได้รับ'}`"
|
||||
@update:modelValue="clickEditRow"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="qualificationOptions"
|
||||
:options="educationLevelOptions"
|
||||
option-value="id"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -226,9 +226,10 @@ const store = useExamDataStore()
|
|||
const { examData, changeExamColumns } = store
|
||||
const loader = ref<boolean>(false)
|
||||
const id = ref<string>()
|
||||
const educationLevel = ref<string>()
|
||||
const qualification = ref<string>()
|
||||
const qualificationId = ref<string>()
|
||||
const qualificationOptions = ref<DataOption[]>([])
|
||||
const educationLevelOptions = ref<DataOption[]>([])
|
||||
const major = ref<string>()
|
||||
const scores = ref<number | null>()
|
||||
const name = ref<string>()
|
||||
|
|
@ -338,9 +339,31 @@ watch(edit, (count: boolean, prevCount: boolean) => {
|
|||
})
|
||||
|
||||
onMounted(async () => {
|
||||
// await fetchData()
|
||||
await fetchData()
|
||||
// await fetchQualification()
|
||||
await fetcheducationLevel()
|
||||
})
|
||||
const fetchData = () => {
|
||||
educationLevel.value = 'e4e6a4f8-39c6-467f-bd84-7650d105fc4c'
|
||||
}
|
||||
|
||||
const fetcheducationLevel = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.educationLevel)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
data.map((r: DataOption) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
educationLevelOptions.value = option
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const fetchQualification = async () => {
|
||||
// loader.value = true;
|
||||
|
|
@ -360,9 +383,9 @@ const fetchQualification = async () => {
|
|||
// })
|
||||
}
|
||||
|
||||
const fetchData = async () => {
|
||||
editRow.value = false
|
||||
}
|
||||
// const fetchData = async () => {
|
||||
// editRow.value = false
|
||||
// }
|
||||
|
||||
/**
|
||||
* กดดูข้อมูลก่อนหน้า
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@
|
|||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="familyData.prefixIdC"
|
||||
v-model="prefixRelation"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="prefixOptions"
|
||||
:options="prefixRelationOptions"
|
||||
option-value="id"
|
||||
:label="`${'คำนำหน้า'}`"
|
||||
/>
|
||||
|
|
@ -126,11 +126,11 @@
|
|||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="familyData.prefixIdM"
|
||||
v-model="prefixDad"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="prefixOptions"
|
||||
:options="prefixDadOptions"
|
||||
option-value="id"
|
||||
:label="`${'คำนำหน้า'}`"
|
||||
/>
|
||||
|
|
@ -204,11 +204,11 @@
|
|||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="familyData.prefixIdF"
|
||||
v-model="prefixMom"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="prefixOptions"
|
||||
:options="prefixMomOptions"
|
||||
option-value="id"
|
||||
:label="`${'คำนำหน้า'}`"
|
||||
/>
|
||||
|
|
@ -287,11 +287,18 @@ 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 { useExamDataStore } from '@/modules/01_exam/store'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { date2Thai, calAge } = mixin
|
||||
|
||||
const prefixRelation = ref<string>()
|
||||
const prefixMom = ref<string>()
|
||||
const prefixDad = ref<string>()
|
||||
const prefixDadOptions = ref<DataOption[]>([])
|
||||
const prefixMomOptions = ref<DataOption[]>([])
|
||||
const prefixRelationOptions = ref<DataOption[]>([])
|
||||
const edit = ref<boolean>(false)
|
||||
const myform = ref<any>()
|
||||
const familyData = ref<Family>(defaultFamily)
|
||||
|
|
@ -325,7 +332,71 @@ const props = defineProps({
|
|||
|
||||
const emit = defineEmits(['update:statusEdit'])
|
||||
|
||||
onMounted(() => {})
|
||||
onMounted(async () => {
|
||||
await fetchData()
|
||||
await fetchprefixMom()
|
||||
await fetchprefixDad()
|
||||
await fetchprefixRelation()
|
||||
})
|
||||
const fetchData = () => {
|
||||
prefixRelation.value = 'e4e6a4f8-39c6-467f-bd84-7650d105fc4c'
|
||||
prefixDad.value = '02fbc0e3-1da0-45b5-90da-783d344b5896'
|
||||
prefixMom.value = '362405f7-9ca2-4f3a-b5ac-08b56c24555d'
|
||||
}
|
||||
|
||||
const fetchprefixMom = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.prefix)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
data.map((r: DataOption) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
prefixMomOptions.value = option
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const fetchprefixDad = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.prefix)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
data.map((r: DataOption) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
prefixDadOptions.value = option
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const fetchprefixRelation = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.prefix)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
data.map((r: DataOption) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
prefixRelationOptions.value = option
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
if (store.consend == true) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="informaData.prefixId"
|
||||
v-model="prefix"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
|
|
@ -136,11 +136,11 @@
|
|||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="informaData.statusId"
|
||||
v-model="relationship"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="statusOptions"
|
||||
:options="relationshipOptions"
|
||||
option-value="id"
|
||||
:label="`${'สถานภาพ'}`"
|
||||
/>
|
||||
|
|
@ -349,6 +349,11 @@ import { useExamDataStore } from '@/modules/01_exam/store'
|
|||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { date2Thai, calAge } = mixin
|
||||
const prefix = ref<string>()
|
||||
const relationship = ref<string>()
|
||||
|
||||
const prefixOptions = ref<DataOption[]>([])
|
||||
const relationshipOptions = ref<DataOption[]>([])
|
||||
|
||||
const edit = ref<boolean>(false)
|
||||
const informaData = ref<Information>(defaultInformation)
|
||||
|
|
@ -401,6 +406,8 @@ const emit = defineEmits(['update:statusEdit'])
|
|||
|
||||
onMounted(() => {
|
||||
// fetchProvince()
|
||||
fetchprefix()
|
||||
fetchrelationship()
|
||||
})
|
||||
|
||||
const saveData = async () => {
|
||||
|
|
@ -448,7 +455,41 @@ const fetchProvince = async () => {
|
|||
// // loader.value = false;
|
||||
// })
|
||||
}
|
||||
const fetchprefix = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.prefix)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
data.map((r: DataOption) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
prefixOptions.value = option
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
const fetchrelationship = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.relationship)
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
let option: DataOption[] = []
|
||||
data.map((r: DataOption) => {
|
||||
option.push({ id: r.id.toString(), name: r.name.toString() })
|
||||
})
|
||||
relationshipOptions.value = option
|
||||
})
|
||||
.catch((e) => {})
|
||||
.finally(() => {
|
||||
// loader.value = false;
|
||||
})
|
||||
}
|
||||
const savePic = () => {
|
||||
disabledPic.value = false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue