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

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

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