สมัครสอบตามตำแหน่ง

This commit is contained in:
Kittapath 2023-04-06 03:05:54 +07:00
parent 24b6365afe
commit cce5f7adfd
6 changed files with 121 additions and 87 deletions

View file

@ -157,7 +157,7 @@ const props = defineProps({
})
const route = useRoute()
const examId = ref<string>(route.params.id.toString())
const positionId = ref<string>(route.params.positionId.toString())
const uploader = ref<any>()
const loader = ref<boolean>(false)
const edit = ref<boolean>(props.status == 'register' || props.status == 'rejectRegister')
@ -198,7 +198,7 @@ const fileUpload = async (file: any) => {
const getData = async () => {
loader.value = true
await http
.get(config.API.candidateUpload(examId.value))
.get(config.API.candidateUpload(examId.value, positionId.value))
.then((res) => {
const data = res.data.result
// console.log(data)
@ -216,7 +216,7 @@ const deleteData = async (id: string) => {
documentId: id
}
await http
.delete(config.API.candidateUpload(examId.value), {
.delete(config.API.candidateUpload(examId.value, positionId.value), {
params
})
.then((res) => {
@ -235,7 +235,7 @@ const uploadData = async () => {
const formData = new FormData()
formData.append('FileData', fileDataUpload.value)
await http
.put(config.API.candidateUpload(examId.value), formData)
.put(config.API.candidateUpload(examId.value, positionId.value), formData)
.then((res) => {
const data = res.data.result
console.log(data)