แยกปุ่มอัพโหลด

This commit is contained in:
Kittapath 2023-03-30 13:42:08 +07:00
parent ccc5efa421
commit abe8e9186c
11 changed files with 809 additions and 585 deletions

View file

@ -1,3 +1,4 @@
import { ref } from 'vue'
interface Pagination {
rowsPerPage: number
}
@ -201,7 +202,7 @@ const defaultCard: ExamCard[] = [
}
]
const defaultAddress: Address = {
const defaultAddress = ref<Address>({
address: null,
provinceId: null,
districtId: null,
@ -213,9 +214,9 @@ const defaultAddress: Address = {
subdistrictIdC: null,
// codeC: ,
same: '1'
}
})
const defaultInformation: Information = {
const defaultInformation = ref<Information>({
cardid: null,
prefix: null,
prefixId: null,
@ -237,9 +238,9 @@ const defaultInformation: Information = {
districtId: null,
provinceId: null,
statusId: null
}
})
const defaultFamily: Family = {
const defaultFamily = ref<Family>({
prefixC: null,
prefixIdC: null,
firstnameC: null,
@ -259,9 +260,9 @@ const defaultFamily: Family = {
occupationF: null,
nationalityF: null,
same: '0'
}
})
const defaultOccupation: Occupation = {
const defaultOccupation = ref<Occupation>({
status: null,
company: null,
department: null,
@ -272,9 +273,23 @@ const defaultOccupation: Occupation = {
officialsOther: null,
employee: null,
other: null
})
const changeData = (system: String, val: any) => {
if (system == 'information') defaultInformation.value = val
if (system == 'address') defaultAddress.value = val
if (system == 'famliy') defaultFamily.value = val
if (system == 'occupation') defaultOccupation.value = val
}
export { defaultInformation, defaultFamily, defaultAddress, defaultOccupation, defaultCard }
export {
defaultInformation,
defaultFamily,
defaultAddress,
defaultOccupation,
defaultCard,
changeData
}
export type {
Pagination,
DataOption,