提交 fb92902f authored 作者: 王鹏飞's avatar 王鹏飞

chore(报名申请): 优化申请面试阶段

上级 af79b238
import httpRequest from '@/utils/httpRequest'
const projectId = process.env.projectId
const baseURL = process.env.baseURL
/**
* 获取用户信息
......@@ -155,6 +154,8 @@ export function getSignDocument(params) {
/**
* 申请面试
*/
export function getInterview(data) {
return httpRequest.post(`${baseURL}/api/enrollment/v1.0/application-materials/submit/${projectId}`, data)
export function changeSubmissionStage(data) {
return httpRequest.post(`/api/enrollment/v1.0/application-materials/submit/${projectId}`, data, {
headers: { 'Content-Type': 'application/json' }
})
}
......@@ -44,17 +44,9 @@ export default function(_this) {
return { basic_info: basicInfo }
},
callback() {
this.form.options.disabled = true
if (_this.showSubmitedDialog) {
_this.dialogVisible = true
} else {
_this.completeVisible = true
}
_this.getApplication()
_this.getInterview()
},
errorCallback() {
_this.completeVisible = true
_this.changeSubmissionStage(() => {
this.form.options.disabled = true
})
}
},
form: {
......
......@@ -99,15 +99,17 @@ export default {
}
})
},
getInterview() {
api.getInterview({ submission_stage: 'INTERVIEW_APPLICATION' }).then(response => {
const { data, error, message } = response
if (error.toString() === '0') {
this.detail = data
} else {
this.$message.error(message)
}
})
changeSubmissionStage(callback) {
api
.changeSubmissionStage({ submission_stage: 'INTERVIEW_APPLICATION' })
.then(response => {
this.dialogVisible = true
this.getApplication()
callback && callback()
})
.catch(() => {
this.completeVisible = true
})
},
handlePageChange(value) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论