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

chore(报名申请): 新增cbu要求信息

上级 f8f1a751
...@@ -5,11 +5,21 @@ import career from './info/career' ...@@ -5,11 +5,21 @@ import career from './info/career'
import honor from './info/honor' import honor from './info/honor'
import training from './info/training' import training from './info/training'
import answer from './info/answer' import answer from './info/answer'
import cbu from './info/cbu'
export default function(_this) { export default function(_this) {
return { return {
id: 'application_info', id: 'application_info',
title: '个人资料', title: '个人资料',
tabs: [first(_this), profile(_this), education(_this), career(_this), answer(_this), training(_this), honor(_this)] tabs: [
first(_this),
profile(_this),
cbu(_this),
education(_this),
career(_this),
answer(_this),
training(_this),
honor(_this)
]
} }
} }
/**
* 个人信息
*/
export default function(_this) {
return {
id: 'application_info_cbu',
title: 'CBU要求信息',
required: true,
visible() {
return _this.visible
},
get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`,
callback(data) {
const { basic_info: basicInfo = {}, submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
return Object.assign({}, basicInfo)
}
},
update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`,
beforeRequest(data) {
// let [province, city] = data.city.split('-')
// data.address_province = province
// data.address_city = city
const basicInfo = [
'faith',
'marital_status',
'identity_status',
'have_studied',
'have_crimed',
'have_fired',
'have_broke_the_rules'
].reduce((result, key) => {
result[key] = data[key]
return result
}, {})
return { basic_info: basicInfo }
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_profile' } } },
next: { to: { query: { active: 'application_info', tab: 'application_info_education' } }, isSubmit: true },
options: {},
items: [
{
type: 'v-select',
label: '宗教信仰',
model: 'faith',
values: [
{ label: '无宗教信仰', value: '无宗教信仰' },
{ label: '基督教', value: '基督教' },
{ label: '天主教', value: '天主教' },
{ label: '佛教', value: '佛教' },
{ label: '伊斯兰教', value: '伊斯兰教' },
{ label: '道教', value: '道教' },
{ label: '其它', value: '其它' }
],
attrs: { placeholder: '请选择', filterable: true },
rules: [{ required: true, message: '请选择', trigger: 'blur' }]
},
{
type: 'v-select',
label: '婚姻状况',
model: 'marital_status',
values: [
{ label: '单身', value: '单身' },
{ label: '已婚', value: '已婚' },
{ label: '离异', value: '离异' },
{ label: '丧偶', value: '丧偶' },
{ label: '分居', value: '分居' }
],
attrs: { placeholder: '请选择', filterable: true },
rules: [{ required: true, message: '请选择', trigger: 'blur' }]
},
{
type: 'v-select',
label: '身份状况',
model: 'identity_status',
values: [
{ label: '美国公民', value: '美国公民' },
{ label: '永久居民', value: '永久居民' },
{ label: '非美国公民/非永久居民', value: '非美国公民/非永久居民' }
],
attrs: { placeholder: '请选择', filterable: true },
rules: [{ required: true, message: '请选择', trigger: 'blur' }]
},
{
type: 'v-radio',
values: [
{ label: '是', value: '1' },
{ label: '否', value: '0' }
],
label: '您之前是否在CBU学习过',
model: 'have_studied',
rules: [{ required: true, message: '请选择', trigger: 'change' }]
},
{
type: 'v-radio',
values: [
{ label: '是', value: '1' },
{ label: '否', value: '0' }
],
label: '您之前是否有过犯罪记录(不包括轻微的交通违规行为),或者目前有任何指控待决',
model: 'have_crimed',
rules: [{ required: true, message: '请选择', trigger: 'change' }]
},
{
type: 'v-radio',
values: [
{ label: '是', value: '1' },
{ label: '否', value: '0' }
],
label: '您是否曾经被学术解雇,被宣布没有资格参加,或在任何机构受到纪律处分,或者是否有任何案件正在审理中?',
model: 'have_fired',
rules: [{ required: true, message: '请选择', trigger: 'change' }]
},
{
type: 'v-radio',
values: [
{ label: '是', value: '1' },
{ label: '否', value: '0' }
],
label: '您是否曾经因违反学生手册或荣誉守则政策而被定罪,或者目前有任何案件悬而未决?',
model: 'have_broke_the_rules',
rules: [{ required: true, message: '请选择', trigger: 'change' }]
}
]
}
}
}
...@@ -31,11 +31,12 @@ export default function(_this) { ...@@ -31,11 +31,12 @@ export default function(_this) {
} }
}, },
form: { form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_profile' } }, isSubmit: true }, prev: { to: { query: { active: 'application_info', tab: 'application_info_cbu' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true }, next: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true },
hasAdd: true, hasAdd: true,
options: { labelWidth: '140px' }, options: { labelWidth: '140px' },
hint: '<p style="color:#606266;padding-left:70px">请填写本科及以上教育经历</p>', hint:
'<p style="color:#606266;padding-left:70px">请填写本科及以上教育经历(请从最高学历填起,硕士/MBA教育经历必填)</p>',
items: [ items: [
{ {
type: 'v-datepicker', type: 'v-datepicker',
......
...@@ -59,7 +59,8 @@ export default function(_this) { ...@@ -59,7 +59,8 @@ export default function(_this) {
'we_chat_account', 'we_chat_account',
'mailing_address', 'mailing_address',
'emergency_contact_name', 'emergency_contact_name',
'emergency_contacts_phone' 'emergency_contacts_phone',
'country_of_birth'
].reduce((result, key) => { ].reduce((result, key) => {
result[key] = data[key] result[key] = data[key]
return result return result
...@@ -69,7 +70,7 @@ export default function(_this) { ...@@ -69,7 +70,7 @@ export default function(_this) {
}, },
form: { form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_first' } } }, prev: { to: { query: { active: 'application_info', tab: 'application_info_first' } } },
next: { to: { query: { active: 'application_info', tab: 'application_info_education' } }, isSubmit: true }, next: { to: { query: { active: 'application_info', tab: 'application_info_cbu' } }, isSubmit: true },
options: { labelWidth: '140px' }, options: { labelWidth: '140px' },
items: [ items: [
{ {
...@@ -213,6 +214,14 @@ export default function(_this) { ...@@ -213,6 +214,14 @@ export default function(_this) {
model: 'gender', model: 'gender',
rules: [{ required: true, message: '请选择性别', trigger: 'change' }] rules: [{ required: true, message: '请选择性别', trigger: 'change' }]
}, },
{
type: 'v-select',
label: '出生国家',
model: 'country_of_birth',
values: country,
attrs: { placeholder: '请选择出生国家', filterable: true },
rules: [{ required: true, message: '请选择出生国家', trigger: 'blur' }]
},
{ {
type: 'v-select', type: 'v-select',
label: '国籍', label: '国籍',
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</template> </template>
<template v-else> <template v-else>
<div class="group"> <div class="group">
<dl v-for="subitem in item.items" :key="subitem.code"> <dl v-for="subitem in item.items" :key="subitem.code" v-bind="subitem">
<dt>{{ subitem.label }}</dt> <dt>{{ subitem.label }}</dt>
<dd> <dd>
<template v-if="subitem.computed"> <template v-if="subitem.computed">
...@@ -223,13 +223,59 @@ export default { ...@@ -223,13 +223,59 @@ export default {
{ label: '手机', code: 'phone_number' }, { label: '手机', code: 'phone_number' },
{ label: '邮箱', code: 'email' }, { label: '邮箱', code: 'email' },
{ label: '性别', code: 'gender' }, { label: '性别', code: 'gender' },
{ label: '出生国家', code: 'country_of_birth' },
{ label: '国籍', code: 'nationality' }, { label: '国籍', code: 'nationality' },
{ label: '生日', code: 'birthday' }, { label: '生日', code: 'birthday' },
{ label: '微信号', code: 'we_chat_account' }, { label: '微信号', code: 'we_chat_account' },
{ label: '邮寄地址', code: 'mailing_address' }, { label: '邮寄地址', code: 'mailing_address' },
{ label: '紧急联系人', code: 'emergency_contact_name' }, { label: '紧急联系人', code: 'emergency_contact_name' },
{ label: '紧急联系人电话', code: 'emergency_contacts_phone' }, { label: '紧急联系人电话', code: 'emergency_contacts_phone' },
{ label: '入学日期', code: 'admission_date' } { label: '入学日期', code: 'admission_date' },
{ label: '宗教信仰', code: 'faith' },
{ label: '婚姻状况', code: 'marital_status' },
{ label: '身份状况', code: 'identity_status' },
{
style: 'flex:100%',
label: '您之前是否在CBU学习过',
code: 'have_studied',
computed: data => {
console.log(this)
return this.whetherText(data.have_studied)
}
},
{
style: 'flex:100%',
label: '您之前是否有过犯罪记录(不包括轻微的交通违规行为),或者目前有任何指控待决',
code: 'have_crimed',
computed: data => {
return this.whetherText(data.have_crimed)
}
},
{
style: 'flex:100%',
label:
'您是否曾经被学术解雇,被宣布没有资格参加,或在任何机构受到纪律处分,或者是否有任何案件正在审理中?',
code: 'have_fired',
computed: data => {
return this.whetherText(data.have_fired)
}
},
{
style: 'flex:100%',
label: '您是否曾经因违反学生手册或荣誉守则政策而被定罪,或者目前有任何案件悬而未决?',
code: 'have_broke_the_rules',
computed: data => {
return this.whetherText(data.have_broke_the_rules)
}
},
{
style: 'flex:100%',
label: '是否为MBA学位',
code: 'is_mba',
computed: data => {
return this.whetherText(data.is_mba)
}
}
] ]
}, },
{ {
...@@ -364,6 +410,10 @@ export default { ...@@ -364,6 +410,10 @@ export default {
} }
}, },
methods: { methods: {
whetherText(value) {
const map = { 0: '否', 1: '是' }
return map[value] || value
},
// 获取报名信息 // 获取报名信息
getApplication() { getApplication() {
this.loading = true this.loading = true
......
...@@ -5,7 +5,11 @@ export default function(_this) { ...@@ -5,7 +5,11 @@ export default function(_this) {
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const {
basic_info: basicInfo = {},
attachments = [],
submission_stage: submissionStage = 'FILLING'
} = data.data.material
const stageList = [ const stageList = [
'FILLING', 'FILLING',
'PREPAYMENT', 'PREPAYMENT',
...@@ -27,15 +31,37 @@ export default function(_this) { ...@@ -27,15 +31,37 @@ export default function(_this) {
} }
return result return result
}, },
{ DIPLOMA_CN: [], REPORT_CARD_CN: [] } { ...basicInfo, DIPLOMA_CN: [], REPORT_CARD_CN: [] }
) )
} }
}, },
update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`,
beforeRequest(data) {
// let [province, city] = data.city.split('-')
// data.address_province = province
// data.address_city = city
const basicInfo = ['is_mba'].reduce((result, key) => {
result[key] = data[key]
return result
}, {})
return { basic_info: basicInfo }
}
},
form: { form: {
next: { to: { query: { active: 'interview_ywjl' } } }, next: { to: { query: { active: 'interview_ywjl' } }, isSubmit: true },
hasButton: false,
options: { 'label-position': 'top' }, options: { 'label-position': 'top' },
items: [ items: [
{
type: 'v-radio',
values: [
{ label: '是', value: '1' },
{ label: '否', value: '0' }
],
label: '是否为MBA学位',
model: 'is_mba',
rules: [{ required: true, message: '请选择', trigger: 'change' }]
},
{ {
label: '学位证书', label: '学位证书',
type: 'v-upload', type: 'v-upload',
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"name": "project-pc", "name": "project-pc",
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@ezijing/vue-form": "^2.2.4", "@ezijing/vue-form": "^2.3.13",
"axios": "^0.21.1", "axios": "^0.21.1",
"cookie-universal-nuxt": "^2.1.4", "cookie-universal-nuxt": "^2.1.4",
"core-js": "^3.9.1", "core-js": "^3.9.1",
...@@ -1013,9 +1013,9 @@ ...@@ -1013,9 +1013,9 @@
} }
}, },
"node_modules/@ezijing/vue-form": { "node_modules/@ezijing/vue-form": {
"version": "2.2.4", "version": "2.3.13",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.4.tgz", "resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.3.13.tgz",
"integrity": "sha512-pK3E+KMTquSfpUkoz+mP9EbVrcjttKk72KsS75wL5toVC71tt3VysipsKeQcYzJFtOPKNTEbb0af0Um0Fsx3zQ==", "integrity": "sha512-d5Z2iNkUb0BDPTP2wagvRXiWkxHQi9ddVhDBBzspMiEwQG1Bk+mVi5JotIRNmHvnzhTojTw1J4qnBEoctffs7g==",
"dependencies": { "dependencies": {
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.1.2", "@vue/babel-preset-jsx": "^1.1.2",
...@@ -13736,9 +13736,9 @@ ...@@ -13736,9 +13736,9 @@
"integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==" "integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw=="
}, },
"@ezijing/vue-form": { "@ezijing/vue-form": {
"version": "2.2.4", "version": "2.3.13",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.4.tgz", "resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.3.13.tgz",
"integrity": "sha512-pK3E+KMTquSfpUkoz+mP9EbVrcjttKk72KsS75wL5toVC71tt3VysipsKeQcYzJFtOPKNTEbb0af0Um0Fsx3zQ==", "integrity": "sha512-d5Z2iNkUb0BDPTP2wagvRXiWkxHQi9ddVhDBBzspMiEwQG1Bk+mVi5JotIRNmHvnzhTojTw1J4qnBEoctffs7g==",
"requires": { "requires": {
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.1.2", "@vue/babel-preset-jsx": "^1.1.2",
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"generate": "nuxt generate" "generate": "nuxt generate"
}, },
"dependencies": { "dependencies": {
"@ezijing/vue-form": "^2.2.4", "@ezijing/vue-form": "^2.3.13",
"axios": "^0.21.1", "axios": "^0.21.1",
"cookie-universal-nuxt": "^2.1.4", "cookie-universal-nuxt": "^2.1.4",
"core-js": "^3.9.1", "core-js": "^3.9.1",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论