ลบ component สมัครที่ไม่ใช้
This commit is contained in:
parent
abe8e9186c
commit
98738aa814
14 changed files with 20 additions and 697 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import env from '../index'
|
||||
const dashbord = `${env.API_URI}/dashbord/`
|
||||
const prefix = `${env.API_URI}/prefix/`
|
||||
const religion = `${env.API_URI}/religion/`
|
||||
const relationship = `${env.API_URI}/relationship/`
|
||||
|
|
@ -9,8 +8,6 @@ const district = `${env.API_URI}/district/`
|
|||
const subDistrict = `${env.API_URI}/sub-district/`
|
||||
|
||||
export default {
|
||||
countDashbordSubHistory: (type: number) => `${dashbord}${type}`,
|
||||
countDashbordHistory: `${dashbord}`,
|
||||
prefix,
|
||||
religion,
|
||||
relationship,
|
||||
|
|
|
|||
|
|
@ -115,10 +115,6 @@ const props = defineProps({
|
|||
defualt: false,
|
||||
required: true
|
||||
},
|
||||
disable: {
|
||||
type: Boolean,
|
||||
defualt: false
|
||||
},
|
||||
add: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
|
|
|
|||
|
|
@ -4,14 +4,6 @@
|
|||
<div class="text-bold">ข้อกำหนดและเงื่อนไข</div>
|
||||
</div>
|
||||
<q-space />
|
||||
<!-- <q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="close"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/> -->
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-section style="max-height: 50vh" class="scroll">
|
||||
|
|
@ -88,14 +80,12 @@
|
|||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right" class="bg-white text-teal justify-center">
|
||||
<!-- <q-btn label="ยกเลิก" color="grey" @click="close" flat /> -->
|
||||
<!-- <q-space /> -->
|
||||
<q-btn label="ตกลง" color="primary" @click="ok" :disable="!acceptTermOfUse" />
|
||||
</q-card-actions>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
import keycloak from '@/plugins/keycloak'
|
||||
const props = defineProps({
|
||||
close: {
|
||||
|
|
@ -121,10 +111,6 @@ if (keycloak.tokenParsed != null) {
|
|||
const ok = async () => {
|
||||
props.ok()
|
||||
}
|
||||
|
||||
const close = async () => {
|
||||
props.close()
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.mycard {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<Profile
|
||||
:loader="loader"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:formInformation="formInformation"
|
||||
v-model:formAddress="formAddress"
|
||||
v-model:formFamily="formFamily"
|
||||
|
|
@ -44,7 +41,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import http from '@/plugins/http'
|
||||
|
|
@ -77,7 +74,6 @@ const statusEdit = ref<boolean>(false)
|
|||
const acceptTermOfUse = ref<boolean>(false)
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const btnSave = ref<boolean>(false)
|
||||
const formInformation = ref<any>({})
|
||||
const formAddress = ref<any>({})
|
||||
const formFamily = ref<any>({})
|
||||
|
|
@ -154,7 +150,7 @@ const saveData = async () => {
|
|||
: dateToISO(defaultInformation.value.cardIdDate),
|
||||
citizenId: defaultInformation.value.cardid,
|
||||
firstName: defaultInformation.value.firstname,
|
||||
relationshipId: defaultInformation.value.relationship,
|
||||
relationshipId: defaultInformation.value.relationshipId,
|
||||
nationality: defaultInformation.value.nationality,
|
||||
email: defaultInformation.value.email,
|
||||
mobilePhone: defaultInformation.value.phone,
|
||||
|
|
|
|||
|
|
@ -4,12 +4,9 @@
|
|||
v-model:edit="edit"
|
||||
header="ข้อมูลที่อยู่"
|
||||
icon="mdi-map-marker"
|
||||
:save="saveData"
|
||||
:addData="true"
|
||||
:editOnly="false"
|
||||
:cancel="cancelData"
|
||||
:editData="false"
|
||||
:disable="statusEdit"
|
||||
/>
|
||||
<!-- :changeBtn="changeBtn" -->
|
||||
<q-form ref="myform">
|
||||
|
|
@ -207,62 +204,35 @@
|
|||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { QForm, useQuasar } from 'quasar'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import type { PropType } from 'vue'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
import type { Address, DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||
import { defaultAddress, changeData } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
// import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
|
||||
const props = defineProps({
|
||||
provinceOptions: {
|
||||
type: Array as PropType<DataOption[]>,
|
||||
required: true
|
||||
},
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { success } = mixin
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const edit = ref<boolean>(true)
|
||||
// const defaultAddress = ref<Address>(defaultAddress)
|
||||
const myform = ref<any>({})
|
||||
const loader = ref<boolean>(false)
|
||||
const districtOptions = ref<DataOption[]>([])
|
||||
|
|
@ -270,11 +240,7 @@ const districtCOptions = ref<DataOption[]>([])
|
|||
const subdistrictOptions = ref<DataOption[]>([])
|
||||
const subdistrictCOptions = ref<DataOption[]>([])
|
||||
|
||||
const emit = defineEmits(['update:statusEdit', 'update:form'])
|
||||
|
||||
watch(props, async (count: any, prevCount: any) => {
|
||||
// if (props.btnSave == true) await saveData()
|
||||
})
|
||||
const emit = defineEmits(['update:form'])
|
||||
|
||||
watch(myform, async (count: any, prevCount: any) => {
|
||||
emit('update:form', count)
|
||||
|
|
@ -297,6 +263,7 @@ onMounted(async () => {
|
|||
})
|
||||
|
||||
const fetchData = async () => {
|
||||
// loader.value = true;
|
||||
await http
|
||||
.get(config.API.candidateAddress(examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -320,65 +287,6 @@ const fetchData = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
// if (store.consend == true) {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateAddress(examId.value), {
|
||||
registAddress: defaultAddress.value.address,
|
||||
currentAddress: defaultAddress.value.addressC,
|
||||
registProvinceId: defaultAddress.value.provinceId,
|
||||
currentProvinceId: defaultAddress.value.provinceIdC,
|
||||
registDistrictId: defaultAddress.value.districtId,
|
||||
currentDistrictId: defaultAddress.value.districtIdC,
|
||||
registSubDistrictId: defaultAddress.value.subdistrictId,
|
||||
currentSubDistrictId: defaultAddress.value.subdistrictIdC,
|
||||
registZipCode: defaultAddress.value.code,
|
||||
currentZipCode: defaultAddress.value.codeC,
|
||||
registSame:
|
||||
defaultAddress.value.same == '1'
|
||||
? true
|
||||
: defaultAddress.value.same == '0'
|
||||
? false
|
||||
: null
|
||||
})
|
||||
.then(() => {
|
||||
// success($q, 'บันทึกข้อมูลที่อยู่สำเร็จ')
|
||||
// edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
// modalErrorTittle.value = 'ไม่สามารถบันทึกข้อมูลร่างได้'
|
||||
// modalErrorDetail.value = e.response.data.message
|
||||
// statusCode.value = e.response.data.status
|
||||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
})
|
||||
// } else {
|
||||
// modalConsend.value = true
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// const changeBtn = async () => {
|
||||
// if (edit.value == true) {
|
||||
// if (props.statusEdit === true) {
|
||||
// edit.value = false
|
||||
// props.notiNoEdit()
|
||||
// } else {
|
||||
// emit('update:statusEdit', true)
|
||||
// }
|
||||
// } else {
|
||||
// emit('update:statusEdit', false)
|
||||
// }
|
||||
// }
|
||||
|
||||
const selectProvince = (e: string, name: string) => {
|
||||
if (name == '1') {
|
||||
defaultAddress.value.districtId = ''
|
||||
|
|
@ -465,18 +373,6 @@ const fetchSubDistrict = async (id: string, position: string) => {
|
|||
})
|
||||
}
|
||||
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
// const consendOk = () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// saveData()
|
||||
// }
|
||||
|
||||
const cancelData = () => {}
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
'full-width inputgreen cursor-pointer': val,
|
||||
|
|
|
|||
|
|
@ -174,11 +174,6 @@
|
|||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
|
@ -199,26 +194,9 @@ import DialogFooter from '@/components/DialogFooter.vue'
|
|||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
loader: {
|
||||
//หน้า main มีการอัพเดทค่าให้ refresh data
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -249,8 +227,6 @@ const examId = ref<string>(route.params.id.toString())
|
|||
const rows = ref<RequestItemsObject[]>([])
|
||||
const filter = ref<string>('') //search data table
|
||||
|
||||
const emit = defineEmits(['update:loader', 'update:statusEdit'])
|
||||
|
||||
const visibleColumns = ref<String[]>([])
|
||||
|
||||
examData.career.columns.length == 0
|
||||
|
|
@ -305,18 +281,10 @@ const columns = ref<Columns>([
|
|||
}
|
||||
])
|
||||
|
||||
watch(loader, (count: boolean, prevCount: boolean) => {
|
||||
emit('update:loader', count)
|
||||
})
|
||||
|
||||
watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
||||
await changeExamColumns('career', count)
|
||||
})
|
||||
|
||||
watch(edit, (count: boolean, prevCount: boolean) => {
|
||||
emit('update:statusEdit', count)
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchData()
|
||||
})
|
||||
|
|
@ -573,16 +541,6 @@ const addRow = () => {
|
|||
reason.value = ''
|
||||
}
|
||||
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
// const consendOk = () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// clickSave()
|
||||
// }
|
||||
|
||||
/**
|
||||
* ฟังก์ชันปุ่มยกเลิกการแก้ไขข้อมูล
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
icon="mdi-file-document"
|
||||
:addData="true"
|
||||
:editOnly="true"
|
||||
:cancel="cancelData"
|
||||
:editData="status == 'register' || status == 'rejectRegister'"
|
||||
/>
|
||||
|
||||
|
|
@ -64,26 +63,9 @@ import { onMounted, ref, watch } from 'vue'
|
|||
import HeaderTop from '@/components/top.vue'
|
||||
|
||||
const props = defineProps({
|
||||
loader: {
|
||||
//หน้า main มีการอัพเดทค่าให้ refresh data
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -103,15 +85,7 @@ const files = ref<any>([
|
|||
sizeLabel: '89MB'
|
||||
}
|
||||
])
|
||||
const emit = defineEmits(['update:loader', 'update:statusEdit'])
|
||||
|
||||
// watch(props, async (count: any, prevCount: any) => {
|
||||
// if (props.btnSave == true) await saveData()
|
||||
// })
|
||||
|
||||
watch(edit, (count: boolean, prevCount: boolean) => {
|
||||
emit('update:statusEdit', count)
|
||||
})
|
||||
const emit = defineEmits(['update:loader'])
|
||||
|
||||
onMounted(async () => {})
|
||||
|
||||
|
|
@ -122,6 +96,4 @@ const fileUpload = async (file: any) => {
|
|||
method: 'POST'
|
||||
}
|
||||
}
|
||||
|
||||
const cancelData = () => {}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -175,11 +175,6 @@
|
|||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
|
@ -201,26 +196,9 @@ import DialogFooter from '@/components/DialogFooter.vue'
|
|||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
loader: {
|
||||
//หน้า main มีการอัพเดทค่าให้ refresh data
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -253,8 +231,6 @@ 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'])
|
||||
|
||||
const visibleColumns = ref<String[]>([])
|
||||
|
||||
examData.education.columns.length == 0
|
||||
|
|
@ -309,22 +285,10 @@ const columns = ref<Columns>([
|
|||
}
|
||||
])
|
||||
|
||||
// watch(props, async (count: any, prevCount: any) => {
|
||||
// if (props.btnSave == true) await saveData()
|
||||
// })
|
||||
|
||||
watch(loader, (count: boolean, prevCount: boolean) => {
|
||||
emit('update:loader', count)
|
||||
})
|
||||
|
||||
watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
||||
await changeExamColumns('education', count)
|
||||
})
|
||||
|
||||
watch(edit, (count: boolean, prevCount: boolean) => {
|
||||
emit('update:statusEdit', count)
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchData()
|
||||
await fetcheducationLevel()
|
||||
|
|
@ -605,16 +569,6 @@ const addRow = () => {
|
|||
duration.value = [new Date(), new Date()]
|
||||
}
|
||||
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
// const consendOk = () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// clickSave()
|
||||
// }
|
||||
|
||||
/**
|
||||
* ฟังก์ชันปุ่มยกเลิกการแก้ไขข้อมูล
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,12 +4,9 @@
|
|||
v-model:edit="edit"
|
||||
header="ข้อมูลครอบครัว"
|
||||
icon="mdi-account-group"
|
||||
:save="saveData"
|
||||
:addData="true"
|
||||
:editOnly="false"
|
||||
:cancel="cancelData"
|
||||
:editData="false"
|
||||
:disable="statusEdit"
|
||||
/>
|
||||
<!-- :changeBtn="changeBtn" -->
|
||||
<q-form ref="myform" class="col-12">
|
||||
|
|
@ -255,20 +252,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { QForm, useQuasar } from 'quasar'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import type { PropType } from 'vue'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
import type { Family, DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||
import { defaultFamily, changeData } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
|
|
@ -279,44 +268,23 @@ const props = defineProps({
|
|||
type: Array as PropType<DataOption[]>,
|
||||
required: true
|
||||
},
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { success } = mixin
|
||||
const edit = ref<boolean>(true)
|
||||
const myform = ref<any>({})
|
||||
// const defaultFamily = ref<Family>(defaultFamily)
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const loader = ref<boolean>(false)
|
||||
|
||||
const emit = defineEmits(['update:statusEdit', 'update:form'])
|
||||
|
||||
watch(props, async (count: any, prevCount: any) => {
|
||||
// if (props.btnSave == true) await saveData()
|
||||
})
|
||||
const emit = defineEmits(['update:form'])
|
||||
|
||||
watch(myform, async (count: any, prevCount: any) => {
|
||||
emit('update:form', count)
|
||||
|
|
@ -359,66 +327,6 @@ const fetchData = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
// if (store.consend == true) {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateFamily(examId.value), {
|
||||
marryPrefixId: defaultFamily.value.prefixIdC,
|
||||
marryFirstName: defaultFamily.value.firstnameC,
|
||||
marryLastName: defaultFamily.value.lastnameC,
|
||||
marryOccupation: defaultFamily.value.occupationC,
|
||||
marryNationality: defaultFamily.value.nationalityC,
|
||||
fatherPrefixId: defaultFamily.value.prefixIdM,
|
||||
fatherFirstName: defaultFamily.value.firstnameM,
|
||||
fatherLastName: defaultFamily.value.lastnameM,
|
||||
fatherOccupation: defaultFamily.value.occupationM,
|
||||
fatherNationality: defaultFamily.value.nationalityM,
|
||||
motherPrefixId: defaultFamily.value.prefixIdF,
|
||||
motherFirstName: defaultFamily.value.firstnameF,
|
||||
motherLastName: defaultFamily.value.lastnameF,
|
||||
motherOccupation: defaultFamily.value.occupationF,
|
||||
motherNationality: defaultFamily.value.nationalityF,
|
||||
marry:
|
||||
defaultFamily.value.same == '1' ? true : defaultFamily.value.same == '0' ? false : null
|
||||
})
|
||||
.then(() => {
|
||||
// success($q, 'บันทึกข้อมูลครอบครัวสำเร็จ')
|
||||
// edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
// modalErrorTittle.value = 'ไม่สามารถบันทึกข้อมูลร่างได้'
|
||||
// modalErrorDetail.value = e.response.data.message
|
||||
// statusCode.value = e.response.data.status
|
||||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
})
|
||||
// } else {
|
||||
// modalConsend.value = true
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// const changeBtn = async () => {
|
||||
// if (edit.value == true) {
|
||||
// if (props.statusEdit === true) {
|
||||
// edit.value = false
|
||||
// props.notiNoEdit()
|
||||
// } else {
|
||||
// emit('update:statusEdit', true)
|
||||
// }
|
||||
// } else {
|
||||
// emit('update:statusEdit', false)
|
||||
// }
|
||||
// }
|
||||
|
||||
const selectRadio = (e: boolean) => {
|
||||
if (!e) {
|
||||
defaultFamily.value.prefixIdC = ''
|
||||
|
|
@ -428,18 +336,6 @@ const selectRadio = (e: boolean) => {
|
|||
}
|
||||
}
|
||||
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
// const consendOk = async () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// saveData()
|
||||
// }
|
||||
|
||||
const cancelData = () => {}
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
'full-width inputgreen cursor-pointer': val,
|
||||
|
|
|
|||
|
|
@ -4,12 +4,9 @@
|
|||
v-model:edit="edit"
|
||||
header="ข้อมูลส่วนตัว"
|
||||
icon="mdi-account"
|
||||
:save="saveData"
|
||||
:addData="true"
|
||||
:editOnly="false"
|
||||
:cancel="cancelData"
|
||||
:editData="false"
|
||||
:disable="statusEdit"
|
||||
/>
|
||||
<!-- :changeBtn="changeBtn" -->
|
||||
<q-form ref="myform" class="col-12 row q-col-gutter-x-sm">
|
||||
|
|
@ -143,7 +140,7 @@
|
|||
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||
dense
|
||||
lazy-rules
|
||||
v-model="defaultInformation.relationship"
|
||||
v-model="defaultInformation.relationshipId"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
|
|
@ -191,18 +188,6 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||
<!-- <q-input
|
||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||
|
||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||
v-model="defaultInformation.cardid"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอก ออกให้ ณ อำเภอ'}`]"
|
||||
label="ออกให้ ณ อำเภอ"
|
||||
/> -->
|
||||
<q-select
|
||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||
|
|
@ -357,19 +342,12 @@
|
|||
/>
|
||||
</div>
|
||||
</q-form>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { QForm, useQuasar } from 'quasar'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
import type { PropType } from 'vue'
|
||||
import type { Information, DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||
import { defaultInformation, changeData } from '@/modules/01_exam/interface/index/Main'
|
||||
|
|
@ -390,49 +368,28 @@ const props = defineProps({
|
|||
type: Array as PropType<DataOption[]>,
|
||||
required: true
|
||||
},
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { date2Thai, calAge, success, dateToISO } = mixin
|
||||
const { date2Thai, calAge } = mixin
|
||||
const districtOptions = ref<DataOption[]>([])
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const edit = ref<boolean>(true)
|
||||
// const defaultInformation = ref<Information>(defaultInformation)
|
||||
const myform = ref<any>({})
|
||||
const imageUrl = ref<string | null>(null)
|
||||
const disabledPic = ref<boolean>(false)
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const fileData = ref<File | null>()
|
||||
const loader = ref<boolean>(false)
|
||||
|
||||
const emit = defineEmits(['update:statusEdit', 'update:form'])
|
||||
|
||||
watch(props, async (count: any, prevCount: any) => {
|
||||
// if (props.btnSave == true) await saveData()
|
||||
})
|
||||
const emit = defineEmits(['update:form'])
|
||||
|
||||
watch(myform, async (count: any, prevCount: any) => {
|
||||
emit('update:form', count)
|
||||
|
|
@ -464,7 +421,7 @@ const fetchData = async () => {
|
|||
data.citizenDate == null ? null : new Date(data.citizenDate)
|
||||
defaultInformation.value.cardid = data.citizenId
|
||||
defaultInformation.value.firstname = data.firstName
|
||||
defaultInformation.value.relationship = data.relationshipId
|
||||
defaultInformation.value.relationshipId = data.relationshipId
|
||||
defaultInformation.value.nationality = data.nationality
|
||||
defaultInformation.value.email = data.email
|
||||
defaultInformation.value.phone = data.mobilePhone
|
||||
|
|
@ -490,69 +447,6 @@ const selectProvince = (val: string) => {
|
|||
fetchDistrict(val)
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
// if (store.consend == true) {
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateInformation(examId.value), {
|
||||
prefixId: defaultInformation.value.prefixId,
|
||||
lastName: defaultInformation.value.lastname,
|
||||
citizenProvinceId: defaultInformation.value.provinceId,
|
||||
citizenDistrictId: defaultInformation.value.districtId,
|
||||
dateOfBirth:
|
||||
defaultInformation.value.birthDate == null
|
||||
? null
|
||||
: dateToISO(defaultInformation.value.birthDate),
|
||||
citizenDate:
|
||||
defaultInformation.value.cardIdDate == null
|
||||
? null
|
||||
: dateToISO(defaultInformation.value.cardIdDate),
|
||||
citizenId: defaultInformation.value.cardid,
|
||||
firstName: defaultInformation.value.firstname,
|
||||
relationshipId: defaultInformation.value.relationship,
|
||||
nationality: defaultInformation.value.nationality,
|
||||
email: defaultInformation.value.email,
|
||||
mobilePhone: defaultInformation.value.phone,
|
||||
telephone: defaultInformation.value.tel,
|
||||
knowledge: defaultInformation.value.knowledge
|
||||
})
|
||||
.then(() => {
|
||||
// success($q, 'บันทึกข้อมูลส่วนตัวสำเร็จ')
|
||||
// edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
// modalErrorTittle.value = 'ไม่สามารถบันทึกข้อมูลร่างได้'
|
||||
// modalErrorDetail.value = e.response.data.message
|
||||
// statusCode.value = e.response.data.status
|
||||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
})
|
||||
// } else {
|
||||
// modalConsend.value = true
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// const changeBtn = async () => {
|
||||
// if (edit.value == true) {
|
||||
// if (props.statusEdit === true) {
|
||||
// edit.value = false
|
||||
// props.notiNoEdit()
|
||||
// } else {
|
||||
// emit('update:statusEdit', true)
|
||||
// }
|
||||
// } else {
|
||||
// emit('update:statusEdit', false)
|
||||
// }
|
||||
// }
|
||||
|
||||
const fetchDistrict = async (id: string) => {
|
||||
loader.value = true
|
||||
await http
|
||||
|
|
@ -575,27 +469,10 @@ const savePic = () => {
|
|||
disabledPic.value = false
|
||||
}
|
||||
|
||||
const onFilePicked = () => {}
|
||||
|
||||
const pickFile = () => {
|
||||
disabledPic.value = true
|
||||
}
|
||||
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
// const consendOk = () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// saveData()
|
||||
// }
|
||||
|
||||
const cancelData = () => {
|
||||
fileData.value = null
|
||||
disabledPic.value = false
|
||||
}
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
'full-width inputgreen cursor-pointer': val,
|
||||
|
|
|
|||
|
|
@ -4,12 +4,9 @@
|
|||
v-model:edit="edit"
|
||||
header="อาชีพ"
|
||||
icon="mdi-briefcase"
|
||||
:save="saveData"
|
||||
:addData="true"
|
||||
:editOnly="false"
|
||||
:cancel="cancelData"
|
||||
:editData="false"
|
||||
:disable="statusEdit"
|
||||
/>
|
||||
<!-- :changeBtn="changeBtn" -->
|
||||
<q-form ref="myform">
|
||||
|
|
@ -244,64 +241,34 @@
|
|||
</div>
|
||||
</div>
|
||||
</q-form>
|
||||
<!-- <q-dialog :model-value="modalConsend" persistent>
|
||||
<q-card style="min-width: 800px">
|
||||
<Conference :ok="consendOk" :close="consenClose" />
|
||||
</q-card>
|
||||
</q-dialog> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { QForm, useQuasar } from 'quasar'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
import type { Occupation } from '@/modules/01_exam/interface/index/Main'
|
||||
import { defaultOccupation, changeData } from '@/modules/01_exam/interface/index/Main'
|
||||
import HeaderTop from '@/components/top.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
notiNoEdit: {
|
||||
type: Function,
|
||||
default: () => console.log('not function')
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
form: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin()
|
||||
const store = useExamDataStore()
|
||||
const { success } = mixin
|
||||
const edit = ref<boolean>(true)
|
||||
// const defaultOccupation = ref<Occupation>(defaultOccupation)
|
||||
const myform = ref<any>({})
|
||||
// const modalConsend = ref<boolean>(false)
|
||||
const loader = ref<boolean>(false)
|
||||
const route = useRoute()
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
|
||||
const emit = defineEmits(['update:statusEdit', 'update:form'])
|
||||
|
||||
watch(props, async (count: any, prevCount: any) => {
|
||||
// if (props.btnSave == true) await saveData()
|
||||
})
|
||||
const emit = defineEmits(['update:form'])
|
||||
|
||||
watch(myform, async (count: any, prevCount: any) => {
|
||||
emit('update:form', count)
|
||||
|
|
@ -343,77 +310,6 @@ const fetchData = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
await myform.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
// if (store.consend == true) {
|
||||
const type = ref<string | null>('')
|
||||
if (defaultOccupation.value.status == 'official')
|
||||
type.value = defaultOccupation.value.official
|
||||
if (defaultOccupation.value.status == 'personnel')
|
||||
type.value = defaultOccupation.value.personnel
|
||||
if (defaultOccupation.value.status == 'officialsOther')
|
||||
type.value = defaultOccupation.value.officialsOther
|
||||
if (defaultOccupation.value.status == 'employee')
|
||||
type.value = defaultOccupation.value.employee
|
||||
if (defaultOccupation.value.status == 'other') type.value = defaultOccupation.value.other
|
||||
loader.value = true
|
||||
await http
|
||||
.post(config.API.candidateOccupation(examId.value), {
|
||||
occupationType: defaultOccupation.value.status,
|
||||
occupationCompany: defaultOccupation.value.company,
|
||||
occupationDepartment: defaultOccupation.value.department,
|
||||
occupationEmail: defaultOccupation.value.email,
|
||||
occupationTelephone: defaultOccupation.value.tel,
|
||||
occupationPosition: type.value
|
||||
})
|
||||
.then(() => {
|
||||
// success($q, 'บันทึกข้อมูลอาชีพสำเร็จ')
|
||||
// edit.value = false
|
||||
emit('update:statusEdit', false)
|
||||
})
|
||||
.catch(() => {
|
||||
// modalError.value = true
|
||||
// modalErrorTittle.value = 'ไม่สามารถบันทึกข้อมูลร่างได้'
|
||||
// modalErrorDetail.value = e.response.data.message
|
||||
// statusCode.value = e.response.data.status
|
||||
})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
await fetchData()
|
||||
})
|
||||
// } else {
|
||||
// modalConsend.value = true
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// const changeBtn = async () => {
|
||||
// if (edit.value == true) {
|
||||
// if (props.statusEdit === true) {
|
||||
// edit.value = false
|
||||
// props.notiNoEdit()
|
||||
// } else {
|
||||
// emit('update:statusEdit', true)
|
||||
// }
|
||||
// } else {
|
||||
// emit('update:statusEdit', false)
|
||||
// }
|
||||
// }
|
||||
|
||||
// const consenClose = () => {
|
||||
// modalConsend.value = false
|
||||
// }
|
||||
|
||||
// const consendOk = () => {
|
||||
// modalConsend.value = false
|
||||
// store.consend = true
|
||||
// saveData()
|
||||
// }
|
||||
|
||||
const cancelData = () => {}
|
||||
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
'full-width inputgreen cursor-pointer': val,
|
||||
|
|
|
|||
|
|
@ -5,86 +5,43 @@
|
|||
:prefixOptions="prefixOptions"
|
||||
:relationshipOptions="relationshipOptions"
|
||||
:provinceOptions="provinceOptions"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:form="formInformation"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Address
|
||||
:provinceOptions="provinceOptions"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:form="formAddress"
|
||||
/>
|
||||
<Address :provinceOptions="provinceOptions" :status="status" v-model:form="formAddress" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Family
|
||||
:prefixOptions="prefixOptions"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:form="formFamily"
|
||||
/>
|
||||
<Family :prefixOptions="prefixOptions" :status="status" v-model:form="formFamily" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Occupation
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
v-model:form="formOccupation"
|
||||
/>
|
||||
<Occupation :status="status" v-model:form="formOccupation" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Education
|
||||
:loader="loader"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
/>
|
||||
<Education :status="status" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Career
|
||||
:loader="loader"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
/>
|
||||
<Career :status="status" />
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Document
|
||||
:loader="loader"
|
||||
v-model:statusEdit="statusEdit"
|
||||
:notiNoEdit="notiNoEdit"
|
||||
:status="status"
|
||||
:btnSave="btnSave"
|
||||
/>
|
||||
<Document :status="status" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { QForm, useQuasar } from 'quasar'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import type { DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||
|
|
@ -97,23 +54,10 @@ import Career from '@/modules/01_exam/components/Form/Career.vue'
|
|||
import Document from '@/modules/01_exam/components/Form/Document.vue'
|
||||
|
||||
const props = defineProps({
|
||||
loader: {
|
||||
//หน้า main มีการอัพเดทค่าให้ refresh data
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
statusEdit: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
btnSave: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
},
|
||||
formInformation: {
|
||||
type: Object,
|
||||
required: true
|
||||
|
|
@ -132,11 +76,7 @@ const props = defineProps({
|
|||
}
|
||||
})
|
||||
|
||||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin() //เรียกฟังก์ชันกลาง
|
||||
const { modalError } = mixin
|
||||
const loader = ref<boolean>(true)
|
||||
const statusEdit = ref<boolean>(false)
|
||||
const prefixOptions = ref<DataOption[]>([])
|
||||
const relationshipOptions = ref<DataOption[]>([])
|
||||
const provinceOptions = ref<DataOption[]>([])
|
||||
|
|
@ -146,18 +86,12 @@ const formFamily = ref<any>({})
|
|||
const formOccupation = ref<any>({})
|
||||
|
||||
const emit = defineEmits([
|
||||
'update:loader',
|
||||
'update:statusEdit',
|
||||
'update:formInformation',
|
||||
'update:formAddress',
|
||||
'update:formFamily',
|
||||
'update:formOccupation'
|
||||
])
|
||||
|
||||
watch(statusEdit, (count: boolean, prevCount: boolean) => {
|
||||
emit('update:statusEdit', count)
|
||||
})
|
||||
|
||||
watch(formInformation, async (count: Object, prevCount: Object) => {
|
||||
emit('update:formInformation', count)
|
||||
})
|
||||
|
|
@ -233,8 +167,4 @@ const fetchProvince = async () => {
|
|||
loader.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const notiNoEdit = () => {
|
||||
modalError($q, 'ไม่สามารถไม่สามารถแก้ไขข้อมูลได้', 'มีข้อมูลที่ยังไม่ถูกบันทึกข้อมูล')
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ interface Information {
|
|||
provinceId: string | null
|
||||
districtId: string | null
|
||||
cardIdDate: Date | null
|
||||
relationship: string | null
|
||||
relationshipId: string | null
|
||||
statusId: string | null
|
||||
knowledge: string | null
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ const defaultInformation = ref<Information>({
|
|||
email: null,
|
||||
province: null,
|
||||
cardIdDate: new Date(),
|
||||
relationship: null,
|
||||
relationshipId: null,
|
||||
knowledge: null,
|
||||
districtId: null,
|
||||
provinceId: null,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
<q-toolbar class="q-pa-sm text-center">
|
||||
<q-toolbar-title class="text-dark text-weight-medium">
|
||||
{{ tittle }}
|
||||
<!-- <q-btn color="primary" label="ออกจากระบบ" push size="sm" v-close-popup @click="doLogout" /> -->
|
||||
</q-toolbar-title>
|
||||
</q-toolbar>
|
||||
<q-stepper
|
||||
|
|
@ -15,17 +14,6 @@
|
|||
done-icon="check"
|
||||
:active-icon="stepRaw === step && stepRaw != 4 ? 'mdi-pencil' : 'mdi-eye'"
|
||||
>
|
||||
<!-- <q-step
|
||||
:done="step > 1"
|
||||
:disable="stepRaw < 1"
|
||||
:name="1"
|
||||
title="อ่านคำชี้แจง"
|
||||
:icon="
|
||||
stepRaw >= 1 ? (stepRaw == 1 ? 'mdi-pencil' : 'mdi-check-bold') : 'mdi-pencil'
|
||||
"
|
||||
>
|
||||
<ExamDetail :fetchStep="fetchStep" :status="status" />
|
||||
</q-step> -->
|
||||
<q-step
|
||||
:done="step > 2"
|
||||
:disable="stepRaw < 2"
|
||||
|
|
@ -69,9 +57,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||
import keycloak from '@/plugins/keycloak'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import ExamForm from '@/modules/01_exam/components/ExamForm.vue'
|
||||
|
|
@ -80,7 +66,6 @@ import ExamFinished from '@/modules/01_exam/components/ExamFinished.vue'
|
|||
import Conference from '@/modules/01_exam/components/Conference.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const $q = useQuasar()
|
||||
const store = useExamDataStore()
|
||||
const step = ref<number>(1)
|
||||
const stepRaw = ref<number>(1)
|
||||
|
|
@ -181,22 +166,6 @@ const consendOk = () => {
|
|||
// store.consend = true
|
||||
// saveData()
|
||||
}
|
||||
|
||||
/**
|
||||
* logout keycloak
|
||||
* confirm ก่อนออกจากระบบ
|
||||
*/
|
||||
const doLogout = () => {
|
||||
$q.dialog({
|
||||
title: 'ยืนยันการออกจากระบบ',
|
||||
message: `ต้องการออกจากระบบใช้หรือไม่?`,
|
||||
cancel: 'ยกเลิก',
|
||||
ok: 'ยืนยัน',
|
||||
persistent: true
|
||||
}).onOk(() => {
|
||||
keycloak.logout()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.q-stepper {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue