提交 2b144053 authored 作者: matian's avatar matian

报名流程更新

上级 d1643670
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
/** /**
* 获取用户信息 * 获取用户信息
*/ */
...@@ -151,3 +151,9 @@ export function createSign(data) { ...@@ -151,3 +151,9 @@ export function createSign(data) {
export function getSignDocument(params) { export function getSignDocument(params) {
return httpRequest.get('/api/usercenter/v1/sign/document', { params }) return httpRequest.get('/api/usercenter/v1/sign/document', { params })
} }
/**
* 申请面试
*/
export function getInterview(data) {
return httpRequest.post(`${baseURL}/api/enrollment/v1.0/application-materials/submit/${projectId}`, data)
}
\ No newline at end of file
...@@ -19,6 +19,8 @@ export default function(_this) { ...@@ -19,6 +19,8 @@ export default function(_this) {
submission_stage: submissionStage = 'FILLING' submission_stage: submissionStage = 'FILLING'
} = data.data.material } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
list[0].education_status = basicInfo.education_status
return Object.assign({}, basicInfo, list.length ? list : [{}]) return Object.assign({}, basicInfo, list.length ? list : [{}])
} }
}, },
...@@ -31,7 +33,7 @@ export default function(_this) { ...@@ -31,7 +33,7 @@ export default function(_this) {
return result return result
}, {}) }, {})
}) })
const basic_info = { education_status: data.education_status } const basic_info = { education_status: data[0].education_status }
return { basic_info, educations } return { basic_info, educations }
} }
}, },
......
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
<dd>{{ material.basic_info.gpa_score }}</dd> <dd>{{ material.basic_info.gpa_score }}</dd>
</dl> </dl>
<dl> <dl>
<dt>语言成绩</dt> <dt>语言成绩</dt>
<dd></dd> <dd>{{ material.basic_info.language_score }}</dd>
</dl> </dl>
</div> </div>
<div class="group" v-for="(data, index) in material[item.code]" :key="index"> <div class="group" v-for="(data, index) in material[item.code]" :key="index">
......
...@@ -40,11 +40,11 @@ export default function(_this) { ...@@ -40,11 +40,11 @@ export default function(_this) {
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
// const basicInfo = ['gpa_score'].reduce((result, key) => { const basicInfo = ['gpa_score'].reduce((result, key) => {
// result[key] = data[key] result[key] = data[key]
// return result return result
// }, {}) }, {})
const basicInfo = { gpa_score: data.gpa_score } // const basicInfo = { gpa_score: data.gpa_score }
return { basic_info: basicInfo } return { basic_info: basicInfo }
} }
}, },
......
...@@ -35,15 +35,23 @@ export default function(_this) { ...@@ -35,15 +35,23 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const base_info = { language_score: data.language_score } const basicInfo = ['language_score'].reduce((result, key) => {
return { base_info, submission_stage: 'INTERVIEW_APPLICATION' } result[key] = data[key]
return result
}, {})
return { basic_info: basicInfo }
}, },
callback() { callback() {
this.form.options.disabled = true this.form.options.disabled = true
if (_this.showSubmitedDialog) {
_this.dialogVisible = true _this.dialogVisible = true
} else {
_this.completeVisible = true
}
_this.getApplication() _this.getApplication()
_this.getInterview()
}, },
errorCallback() { errorCallback() {
_this.completeVisible = true _this.completeVisible = true
......
...@@ -99,6 +99,16 @@ export default { ...@@ -99,6 +99,16 @@ 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)
}
})
},
handlePageChange(value) { handlePageChange(value) {
this.currentActive = value this.currentActive = value
this.$router.push({ path: this.$route.path, query: { active: value } }) this.$router.push({ path: this.$route.path, query: { active: value } })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论