提交 6469f35b authored 作者: matian's avatar matian

报名流程更新

上级 43a498af
import httpRequest from '@/utils/httpRequest'
const projectId = process.env.projectId
const baseURL = process.env.baseURL
/**
* 获取用户信息
......@@ -151,3 +152,9 @@ export function createSign(data) {
export function getSignDocument(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)
}
......@@ -19,7 +19,7 @@ export default function(_this) {
submission_stage: submissionStage = 'FILLING'
} = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
console.log(list)
list[0].education_status = basicInfo.education_status
return list.length ? list : [{}]
}
},
......@@ -32,9 +32,11 @@ export default function(_this) {
return result
}, {})
})
const basicInfo = { education_status: data.education_status }
const basicInfo = { education_status: data[0].education_status }
return { basic_info: basicInfo, educations }
},
callback() {
_this.getApplication()
}
},
form: {
......@@ -42,6 +44,16 @@ export default function(_this) {
next: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true },
hasAdd: true,
options: { labelWidth: '140px' },
appendItems: [
{
type: 'v-input',
label: '当前教育状态',
model: 'education_status',
attrs: { placeholder: '请填写当前教育状态' },
rules: [{ required: true, message: '请填写当前教育状态', trigger: 'blur' }],
append: '<p style="color:#606266">当前教育状态(填写示例:本科在读/大四)</p>'
}
],
items: [
{
type: 'v-datepicker',
......@@ -96,16 +108,6 @@ export default function(_this) {
model: 'degree',
rules: [{ required: true, message: '请选择学历/学位', trigger: 'change' }]
}
],
appendItems: [
{
type: 'v-input',
label: '当前教育状态',
model: 'education_status',
attrs: { placeholder: '请填写当前教育状态' },
rules: [{ required: true, message: '请填写当前教育状态', trigger: 'blur' }],
append: '<p style="color:#606266">当前教育状态(填写示例:本科在读/大四)</p>'
}
]
}
}
......
......@@ -63,8 +63,8 @@
<dd>{{ material.basic_info.gpa_score }}</dd>
</dl>
<dl>
<dt>语言成绩</dt>
<dd></dd>
<dt>语言成绩</dt>
<dd>{{ material.basic_info.language_score }}</dd>
</dl>
</div>
<div class="group" v-for="(data, index) in material[item.code]" :key="index">
......
......@@ -40,13 +40,13 @@ export default function(_this) {
update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`,
beforeRequest(data) {
// const basicInfo = ['gpa_score'].reduce((result, key) => {
// result[key] = data[key]
// return result
// }, {})
const basicInfo = {
gpa_score: data.gpa_score
}
const basicInfo = ['gpa_score'].reduce((result, key) => {
result[key] = data[key]
return result
}, {})
// const basicInfo = {
// gpa_score: data.gpa_score
// }
return { basic_info: basicInfo }
}
},
......
......@@ -35,18 +35,23 @@ export default function(_this) {
}
},
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) {
console.log(data)
const basicInfo = {
language_score: data.language_score
}
return { basic_info: basicInfo, submission_stage: 'INTERVIEW_APPLICATION' }
const basicInfo = ['language_score'].reduce((result, key) => {
result[key] = data[key]
return result
}, {})
return { basic_info: basicInfo }
},
callback() {
this.form.options.disabled = true
_this.dialogVisible = true
if (_this.showSubmitedDialog) {
_this.dialogVisible = true
} else {
_this.completeVisible = true
}
_this.getApplication()
_this.getInterview()
},
errorCallback() {
_this.completeVisible = true
......
......@@ -99,6 +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)
}
})
},
handlePageChange(value) {
this.currentActive = value
this.$router.push({ path: this.$route.path, query: { active: value } })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论