refactor code
This commit is contained in:
parent
d2c352de17
commit
92fc21033d
50 changed files with 652 additions and 2170 deletions
|
|
@ -20,17 +20,11 @@
|
|||
<div class="">เลขประจำตัวสอบ :</div>
|
||||
<div class="text-black text-bold q-pl-sm">{{ examNumber }}</div>
|
||||
</div>
|
||||
<!-- <div class="q-pt-xs row">
|
||||
<div class="">เวลาสอบ :</div>
|
||||
<div class="text-black q-pl-sm">{{ examTime }}</div>
|
||||
</div> -->
|
||||
<div class="q-pt-xs row">
|
||||
<div class="">เลขที่นั่งสอบ :</div>
|
||||
<div class="text-black text-bold q-pl-sm">{{ examSeat }}</div>
|
||||
</div>
|
||||
<div class="q-pt-xs row">
|
||||
<!-- <div class="">คะแนน</div>
|
||||
<div class="text-black text-bold q-pl-sm">{{ point }}</div> -->
|
||||
<div class="col-12 text-weight-bold">ผลการสอบ</div>
|
||||
<div class="row items-center q-gutter-y-sm col-12">
|
||||
<div class="col-xs-4 col-sm-5 text-weight-medium text-grey-7">ประเภท</div>
|
||||
|
|
@ -81,14 +75,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="q-pt-xs row">
|
||||
<div class="">ห้องสอบ :</div>
|
||||
<div class="text-black q-pl-sm">{{ examRoom }}</div>
|
||||
</div>
|
||||
<div class="q-pt-xs row">
|
||||
<div class="">เลขที่นั่ง :</div>
|
||||
<div class="text-black q-pl-sm">{{ seatNumber }}</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<q-card-section class="col-4 flex flex-center">
|
||||
|
|
@ -114,15 +100,19 @@
|
|||
import { onMounted, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useCounterMixin } from '@/stores/mixin'
|
||||
import { useDataStore } from '@/stores/data'
|
||||
import http from '@/plugins/http'
|
||||
import config from '@/app.config'
|
||||
import { useQuasar } from 'quasar'
|
||||
|
||||
const $q = useQuasar()
|
||||
const route = useRoute()
|
||||
const mixin = useCounterMixin() //เรียกฟังก์ชันกลาง
|
||||
const { dateThaiRange, modalDelete, modalConfirm, dateToISO, success, date2Thai } = mixin
|
||||
const { date2Thai, messageError } = mixin
|
||||
const dataStore = useDataStore()
|
||||
const { loaderPage } = dataStore
|
||||
const examId = ref<string>(route.params.id.toString())
|
||||
const positionId = ref<string>(route.params.positionId.toString())
|
||||
const loader = ref<boolean>(false)
|
||||
const fullName = ref<string>('')
|
||||
const examNumber = ref<string>('')
|
||||
const citizenId = ref<string>('')
|
||||
|
|
@ -143,7 +133,7 @@ onMounted(async () => {
|
|||
})
|
||||
|
||||
const fetchStatus = async () => {
|
||||
loader.value = true
|
||||
loaderPage(true)
|
||||
await http
|
||||
.get(config.API.candidateCard(examId.value, positionId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -180,25 +170,16 @@ const fetchStatus = async () => {
|
|||
score_expired.value = new Date(data.announcementDate)
|
||||
number.value = data.number
|
||||
})
|
||||
.catch(() => {
|
||||
// acceptTermOfUse.value = false
|
||||
.catch((e) => {
|
||||
messageError($q, e)
|
||||
})
|
||||
.finally(() => {
|
||||
loader.value = false
|
||||
loaderPage(false)
|
||||
})
|
||||
}
|
||||
|
||||
const download = () => {
|
||||
window.print()
|
||||
// var printContent = document.getElementById('print')
|
||||
// var WinPrint = window.open()
|
||||
// if (WinPrint != null && printContent != null) {
|
||||
// WinPrint.document.write(printContent.innerHTML)
|
||||
// // WinPrint.document.close()
|
||||
// // WinPrint.focus()
|
||||
// // WinPrint.print()
|
||||
// // WinPrint.close()
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue