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

报名字段调整和日期选择器优化

上级 a9ffba70
...@@ -235,9 +235,9 @@ ...@@ -235,9 +235,9 @@
} }
}, },
"@babel/plugin-syntax-jsx": { "@babel/plugin-syntax-jsx": {
"version": "7.10.4", "version": "7.12.1",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.10.4.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz",
"integrity": "sha512-KCg9mio9jwiARCB7WAcQ7Y1q+qicILjoK8LP/VkPkEKaf5dkaZZK1EcTe91a3JJlZ3qy6L5s9X52boEYi8DM9g==", "integrity": "sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==",
"requires": { "requires": {
"@babel/helper-plugin-utils": "^7.10.4" "@babel/helper-plugin-utils": "^7.10.4"
} }
...@@ -348,17 +348,17 @@ ...@@ -348,17 +348,17 @@
} }
}, },
"@ezijing/vue-form": { "@ezijing/vue-form": {
"version": "2.0.7", "version": "2.0.10",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.0.7.tgz", "resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.0.10.tgz",
"integrity": "sha512-UZZ5IsQ3dLDlX9e/bFES0KTHMh+WwJfX/7NXRLJ4VIWRtY9p8rV7NTOOEDmwQGCK8zKaatcfWvI3XxcBruM+xw==", "integrity": "sha512-0frE192JzxA30OWs7tKDcIAxEHOFX5kCsHeAiTlwUwXFohKIcsl+++BUxajmDO3tYgFHLw4HdnpCavlMBwPRfA==",
"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",
"axios": "^0.20.0", "axios": "^0.20.0",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"element-ui": "^2.13.2", "element-ui": "^2.14.1",
"qs": "^6.9.4", "qs": "^6.9.4",
"vue": "^2.6.11" "vue": "^2.6.12"
}, },
"dependencies": { "dependencies": {
"axios": { "axios": {
...@@ -370,9 +370,22 @@ ...@@ -370,9 +370,22 @@
} }
}, },
"core-js": { "core-js": {
"version": "3.6.5", "version": "3.7.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.7.0.tgz",
"integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==" "integrity": "sha512-NwS7fI5M5B85EwpWuIwJN4i/fbisQUwLwiSNUWeXlkAZ0sbBjLEvLvFLf1uzAUV66PcEPt4xCGCmOZSxVf3xzA=="
},
"element-ui": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.14.1.tgz",
"integrity": "sha512-Uje0J12dBaXdyvt/EtuDA8diFbYTdO7uI4QCfl7zmEJmE1WxgCSVKhlRRoL8MDonO8pyNVhB4n0AFAR14g56nw==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
}
}, },
"follow-redirects": { "follow-redirects": {
"version": "1.13.0", "version": "1.13.0",
...@@ -504,72 +517,90 @@ ...@@ -504,72 +517,90 @@
} }
}, },
"@vue/babel-helper-vue-jsx-merge-props": { "@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.0.0", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.0.0.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
"integrity": "sha512-6tyf5Cqm4m6v7buITuwS+jHzPlIPxbFzEhXR5JGZpbrvOcp1hiQKckd305/3C7C36wFekNTQSxAtgeM0j0yoUw==" "integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA=="
}, },
"@vue/babel-plugin-transform-vue-jsx": { "@vue/babel-plugin-transform-vue-jsx": {
"version": "1.1.2", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.2.1.tgz",
"integrity": "sha512-YfdaoSMvD1nj7+DsrwfTvTnhDXI7bsuh+Y5qWwvQXlD24uLgnsoww3qbiZvWf/EoviZMrvqkqN4CBw0W3BWUTQ==", "integrity": "sha512-HJuqwACYehQwh1fNT8f4kyzqlNMpBuUK4rSiSES5D4QsYncv5fxFsLyrxFPG2ksO7t5WP+Vgix6tt6yKClwPzA==",
"requires": { "requires": {
"@babel/helper-module-imports": "^7.0.0", "@babel/helper-module-imports": "^7.0.0",
"@babel/plugin-syntax-jsx": "^7.2.0", "@babel/plugin-syntax-jsx": "^7.2.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
"html-tags": "^2.0.0", "html-tags": "^2.0.0",
"lodash.kebabcase": "^4.1.1", "lodash.kebabcase": "^4.1.1",
"svg-tags": "^1.0.0" "svg-tags": "^1.0.0"
} }
}, },
"@vue/babel-preset-jsx": { "@vue/babel-preset-jsx": {
"version": "1.1.2", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.2.4.tgz",
"integrity": "sha512-zDpVnFpeC9YXmvGIDSsKNdL7qCG2rA3gjywLYHPCKDT10erjxF4U+6ay9X6TW5fl4GsDlJp9bVfAVQAAVzxxvQ==", "integrity": "sha512-oRVnmN2a77bYDJzeGSt92AuHXbkIxbf/XXSE3klINnh9AXBmVS1DGa1f0d+dDYpLfsAKElMnqKTQfKn7obcL4w==",
"requires": { "requires": {
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
"@vue/babel-plugin-transform-vue-jsx": "^1.1.2", "@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
"@vue/babel-sugar-functional-vue": "^1.1.2", "@vue/babel-sugar-composition-api-inject-h": "^1.2.1",
"@vue/babel-sugar-inject-h": "^1.1.2", "@vue/babel-sugar-composition-api-render-instance": "^1.2.4",
"@vue/babel-sugar-v-model": "^1.1.2", "@vue/babel-sugar-functional-vue": "^1.2.2",
"@vue/babel-sugar-v-on": "^1.1.2" "@vue/babel-sugar-inject-h": "^1.2.2",
"@vue/babel-sugar-v-model": "^1.2.3",
"@vue/babel-sugar-v-on": "^1.2.3"
}
},
"@vue/babel-sugar-composition-api-inject-h": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@vue/babel-sugar-composition-api-inject-h/-/babel-sugar-composition-api-inject-h-1.2.1.tgz",
"integrity": "sha512-4B3L5Z2G+7s+9Bwbf+zPIifkFNcKth7fQwekVbnOA3cr3Pq71q71goWr97sk4/yyzH8phfe5ODVzEjX7HU7ItQ==",
"requires": {
"@babel/plugin-syntax-jsx": "^7.2.0"
}
},
"@vue/babel-sugar-composition-api-render-instance": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/@vue/babel-sugar-composition-api-render-instance/-/babel-sugar-composition-api-render-instance-1.2.4.tgz",
"integrity": "sha512-joha4PZznQMsxQYXtR3MnTgCASC9u3zt9KfBxIeuI5g2gscpTsSKRDzWQt4aqNIpx6cv8On7/m6zmmovlNsG7Q==",
"requires": {
"@babel/plugin-syntax-jsx": "^7.2.0"
} }
}, },
"@vue/babel-sugar-functional-vue": { "@vue/babel-sugar-functional-vue": {
"version": "1.1.2", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.2.2.tgz",
"integrity": "sha512-YhmdJQSVEFF5ETJXzrMpj0nkCXEa39TvVxJTuVjzvP2rgKhdMmQzlJuMv/HpadhZaRVMCCF3AEjjJcK5q/cYzQ==", "integrity": "sha512-JvbgGn1bjCLByIAU1VOoepHQ1vFsroSA/QkzdiSs657V79q6OwEWLCQtQnEXD/rLTA8rRit4rMOhFpbjRFm82w==",
"requires": { "requires": {
"@babel/plugin-syntax-jsx": "^7.2.0" "@babel/plugin-syntax-jsx": "^7.2.0"
} }
}, },
"@vue/babel-sugar-inject-h": { "@vue/babel-sugar-inject-h": {
"version": "1.1.2", "version": "1.2.2",
"resolved": "https://registry.npmjs.org/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.2.2.tgz",
"integrity": "sha512-VRSENdTvD5htpnVp7i7DNuChR5rVMcORdXjvv5HVvpdKHzDZAYiLSD+GhnhxLm3/dMuk8pSzV+k28ECkiN5m8w==", "integrity": "sha512-y8vTo00oRkzQTgufeotjCLPAvlhnpSkcHFEp60+LJUwygGcd5Chrpn5480AQp/thrxVm8m2ifAk0LyFel9oCnw==",
"requires": { "requires": {
"@babel/plugin-syntax-jsx": "^7.2.0" "@babel/plugin-syntax-jsx": "^7.2.0"
} }
}, },
"@vue/babel-sugar-v-model": { "@vue/babel-sugar-v-model": {
"version": "1.1.2", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.2.3.tgz",
"integrity": "sha512-vLXPvNq8vDtt0u9LqFdpGM9W9IWDmCmCyJXuozlq4F4UYVleXJ2Fa+3JsnTZNJcG+pLjjfnEGHci2339Kj5sGg==", "integrity": "sha512-A2jxx87mySr/ulAsSSyYE8un6SIH0NWHiLaCWpodPCVOlQVODCaSpiR4+IMsmBr73haG+oeCuSvMOM+ttWUqRQ==",
"requires": { "requires": {
"@babel/plugin-syntax-jsx": "^7.2.0", "@babel/plugin-syntax-jsx": "^7.2.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
"@vue/babel-plugin-transform-vue-jsx": "^1.1.2", "@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
"camelcase": "^5.0.0", "camelcase": "^5.0.0",
"html-tags": "^2.0.0", "html-tags": "^2.0.0",
"svg-tags": "^1.0.0" "svg-tags": "^1.0.0"
} }
}, },
"@vue/babel-sugar-v-on": { "@vue/babel-sugar-v-on": {
"version": "1.1.2", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.2.3.tgz",
"integrity": "sha512-T8ZCwC8Jp2uRtcZ88YwZtZXe7eQrJcfRq0uTFy6ShbwYJyz5qWskRFoVsdTi9o0WEhmQXxhQUewodOSCUPVmsQ==", "integrity": "sha512-kt12VJdz/37D3N3eglBywV8GStKNUhNrsxChXIV+o0MwVXORYuhDTHJRKPgLJRb/EY3vM2aRFQdxJBp9CLikjw==",
"requires": { "requires": {
"@babel/plugin-syntax-jsx": "^7.2.0", "@babel/plugin-syntax-jsx": "^7.2.0",
"@vue/babel-plugin-transform-vue-jsx": "^1.1.2", "@vue/babel-plugin-transform-vue-jsx": "^1.2.1",
"camelcase": "^5.0.0" "camelcase": "^5.0.0"
} }
}, },
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
"webpack-merge": "^4.2.2" "webpack-merge": "^4.2.2"
}, },
"dependencies": { "dependencies": {
"@ezijing/vue-form": "^2.0.7", "@ezijing/vue-form": "^2.0.10",
"animate.css": "^4.1.0", "animate.css": "^4.1.0",
"axios": "^0.19.2", "axios": "^0.19.2",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
......
...@@ -16,21 +16,14 @@ export default function(_this) { ...@@ -16,21 +16,14 @@ export default function(_this) {
const { answers = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { answers = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
const [first = {}, second = {}, third = {}, fourth = {}] = answers const [first = {}, second = {}] = answers
return { return {
qid1: first.qid || '1', qid1: first.qid || '1',
question1: first.question || '自我介绍', question1: first.question || '这个MBA项目对你将来的职业发展有什么好处?你的职业发展目标是什么?',
answer1: first.answer, answer1: first.answer,
qid2: second.qid || '2', qid2: second.qid || '2',
question2: second.question || '这个MAP计划对你个人将来有什么好处?你在这个项目中的个人发展目标是什么?', question2: second.question || '您参加过其他的培训项目有哪些?请列出来。你是如何从这些学习经验中获益的?',
answer2: second.answer, answer2: second.answer
qid3: third.qid || '3',
question3: third.question || '这个MAP计划对你将来的职业发展有什么好处?你的职业发展目标是什么?',
answer3: third.answer,
qid4: fourth.qid || '4',
question4:
fourth.question || '你参加过心理学的工作坊或培训班吗?请把它列出来。你是如何从这些学习经验中获益的?',
answer4: fourth.answer
} }
} }
}, },
...@@ -40,9 +33,7 @@ export default function(_this) { ...@@ -40,9 +33,7 @@ export default function(_this) {
return { return {
answers: [ answers: [
{ qid: data.qid1, question: data.question1, answer: data.answer1 }, { qid: data.qid1, question: data.question1, answer: data.answer1 },
{ qid: data.qid2, question: data.question2, answer: data.answer2 }, { qid: data.qid2, question: data.question2, answer: data.answer2 }
{ qid: data.qid3, question: data.question3, answer: data.answer3 },
{ qid: data.qid4, question: data.question4, answer: data.answer4 }
] ]
} }
} }
...@@ -54,7 +45,7 @@ export default function(_this) { ...@@ -54,7 +45,7 @@ export default function(_this) {
items: [ items: [
{ {
type: 'v-input', type: 'v-input',
label: '自我介绍', label: '这个MBA项目对你将来的职业发展有什么好处?你的职业发展目标是什么?',
model: 'answer1', model: 'answer1',
attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' }, attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' },
rules: [ rules: [
...@@ -64,33 +55,13 @@ export default function(_this) { ...@@ -64,33 +55,13 @@ export default function(_this) {
}, },
{ {
type: 'v-input', type: 'v-input',
label: '这个MAP计划对你个人将来有什么好处?你在这个项目中的个人发展目标是什么?', label: '您参加过其他的培训项目有哪些?请列出来。你是如何从这些学习经验中获益的?',
model: 'answer2', model: 'answer2',
attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' }, attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' },
rules: [ rules: [
{ required: true, message: '请输入', trigger: 'blur' }, { required: true, message: '请输入', trigger: 'blur' },
{ min: 60, max: 1000, message: '长度在 60 到 1000 个字符', trigger: 'blur' } { min: 60, max: 1000, message: '长度在 60 到 1000 个字符', trigger: 'blur' }
] ]
},
{
type: 'v-input',
label: '这个MAP计划对你将来的职业发展有什么好处?你的职业发展目标是什么?',
model: 'answer3',
attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' },
rules: [
{ required: true, message: '请输入', trigger: 'blur' },
{ min: 60, max: 1000, message: '长度在 60 到 1000 个字符', trigger: 'blur' }
]
},
{
type: 'v-input',
label: '你参加过心理学的工作坊或培训班吗?请把它列出来。你是如何从这些学习经验中获益的?',
model: 'answer4',
attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' },
rules: [
{ required: true, message: '请输入', trigger: 'blur' },
{ min: 60, max: 1000, message: '长度在 60 到 1000 个字符', trigger: 'blur' }
]
} }
] ]
} }
......
...@@ -13,16 +13,8 @@ export default function(_this) { ...@@ -13,16 +13,8 @@ export default function(_this) {
get: { get: {
action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}`, action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) { callback(data) {
let { careers: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { careers: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
list = list.map(item => {
const { start_date: startDate, end_date: endDate } = item
if (startDate) {
item.dates = [startDate, endDate]
}
return item
})
return list.length ? list : [{}] return list.length ? list : [{}]
} }
}, },
...@@ -30,9 +22,6 @@ export default function(_this) { ...@@ -30,9 +22,6 @@ export default function(_this) {
action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`, action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const careers = data.map(item => { const careers = data.map(item => {
const [startDate, endDate] = item.dates
item.start_date = startDate
item.end_date = endDate
return [ return [
'start_date', 'start_date',
'end_date', 'end_date',
...@@ -57,16 +46,25 @@ export default function(_this) { ...@@ -57,16 +46,25 @@ export default function(_this) {
items: [ items: [
{ {
type: 'v-datepicker', type: 'v-datepicker',
label: '工作时间', label: '开始时间',
model: 'dates', model: 'start_date',
attrs: {
type: 'month',
placeholder: '请选择工作开始时间',
valueFormat: 'yyyy-MM'
},
rules: [{ required: true, message: '请选择工作开始时间', trigger: 'blur' }]
},
{
type: 'v-datepicker',
label: '结束时间',
model: 'end_date',
attrs: { attrs: {
type: 'monthrange', type: 'month',
rangeSeparator: '至', placeholder: '请选择工作结束时间',
startPlaceholder: '请选择开始时间',
endPlaceholder: '请选择结束时间',
valueFormat: 'yyyy-MM' valueFormat: 'yyyy-MM'
}, },
rules: [{ required: true, message: '请选择工作时间', trigger: 'blur' }] rules: [{ required: true, message: '请选择工作结束时间', trigger: 'blur' }]
}, },
{ {
type: 'v-input', type: 'v-input',
......
...@@ -13,16 +13,8 @@ export default function(_this) { ...@@ -13,16 +13,8 @@ export default function(_this) {
get: { get: {
action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}`, action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) { callback(data) {
let { educations: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { educations: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
list = list.map(item => {
const { start_date: startDate, end_date: endDate } = item
if (startDate) {
item.dates = [startDate, endDate]
}
return item
})
return list.length ? list : [{}] return list.length ? list : [{}]
} }
}, },
...@@ -30,9 +22,6 @@ export default function(_this) { ...@@ -30,9 +22,6 @@ export default function(_this) {
action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`, action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const educations = data.map(item => { const educations = data.map(item => {
const [startDate, endDate] = item.dates
item.start_date = startDate
item.end_date = endDate
return ['start_date', 'end_date', 'school_name_cn', 'major_cn', 'degree'].reduce((result, key) => { return ['start_date', 'end_date', 'school_name_cn', 'major_cn', 'degree'].reduce((result, key) => {
result[key] = item[key] result[key] = item[key]
return result return result
...@@ -49,16 +38,25 @@ export default function(_this) { ...@@ -49,16 +38,25 @@ export default function(_this) {
items: [ items: [
{ {
type: 'v-datepicker', type: 'v-datepicker',
label: '教育时间', label: '开始时间',
model: 'dates', model: 'start_date',
attrs: {
type: 'month',
placeholder: '请选择教育开始时间',
valueFormat: 'yyyy-MM'
},
rules: [{ required: true, message: '请选择教育开始时间', trigger: 'blur' }]
},
{
type: 'v-datepicker',
label: '结束时间',
model: 'end_date',
attrs: { attrs: {
type: 'monthrange', type: 'month',
rangeSeparator: '至', placeholder: '请选择教育结束时间',
startPlaceholder: '请选择开始时间',
endPlaceholder: '请选择结束时间',
valueFormat: 'yyyy-MM' valueFormat: 'yyyy-MM'
}, },
rules: [{ required: true, message: '请选择教育时间', trigger: 'blur' }] rules: [{ required: true, message: '请选择教育结束时间', trigger: 'blur' }]
}, },
{ {
type: 'v-input', type: 'v-input',
......
...@@ -12,16 +12,8 @@ export default function(_this) { ...@@ -12,16 +12,8 @@ export default function(_this) {
get: { get: {
action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}`, action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) { callback(data) {
let { trainings: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { trainings: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
list = list.map(item => {
const { start_date: startDate, end_date: endDate } = item
if (startDate) {
item.dates = [startDate, endDate]
}
return item
})
return list.length ? list : [{}] return list.length ? list : [{}]
} }
}, },
...@@ -29,9 +21,6 @@ export default function(_this) { ...@@ -29,9 +21,6 @@ export default function(_this) {
action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`, action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const trainings = data.map(item => { const trainings = data.map(item => {
const [startDate, endDate] = item.dates
item.start_date = startDate
item.end_date = endDate
return ['start_date', 'end_date', 'institution_cn', 'course_cn'].reduce((result, key) => { return ['start_date', 'end_date', 'institution_cn', 'course_cn'].reduce((result, key) => {
result[key] = item[key] result[key] = item[key]
return result return result
...@@ -48,16 +37,25 @@ export default function(_this) { ...@@ -48,16 +37,25 @@ export default function(_this) {
items: [ items: [
{ {
type: 'v-datepicker', type: 'v-datepicker',
label: '培训时间', label: '开始时间',
model: 'dates', model: 'start_date',
attrs: {
type: 'month',
placeholder: '请选择培训开始时间',
valueFormat: 'yyyy-MM'
},
rules: [{ required: true, message: '请选择培训开始时间', trigger: 'blur' }]
},
{
type: 'v-datepicker',
label: '结束时间',
model: 'end_date',
attrs: { attrs: {
type: 'monthrange', type: 'month',
rangeSeparator: '至', placeholder: '请选择培训结束时间',
startPlaceholder: '请选择开始时间',
endPlaceholder: '请选择结束时间',
valueFormat: 'yyyy-MM' valueFormat: 'yyyy-MM'
}, },
rules: [{ required: true, message: '请选择培训时间', trigger: 'blur' }] rules: [{ required: true, message: '请选择培训结束时间', trigger: 'blur' }]
}, },
{ {
type: 'v-input', type: 'v-input',
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div class="pay-ft"> <div class="pay-ft">
<p class="t2">注释:再提交600元申请费后,申请人还需上传并提交如下文件。</p> <p class="t2">注释:再提交600元申请费后,申请人还需上传并提交如下文件。</p>
<p class="t2"> <p class="t2">
专科/本科毕业证书、②专科/本科中、英文成绩单各一份、③个人证件照(2寸、免冠、白底)该申请费不退,请慎重缴费! 最高学历(学位)证书、②专科/本科中或英文成绩单、③个人证件照(免冠、白底)该申请费不退,请慎重缴费!
</p> </p>
<p class="t2">该申请费不退,请慎重缴费!</p> <p class="t2">该申请费不退,请慎重缴费!</p>
</div> </div>
......
export default { export default {
id: 'interview_cjd', id: 'interview_cjd',
title: '成绩单(中+英)', title: '成绩单(中/英)',
get: { get: {
action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}`, action: `/api/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) { callback(data) {
...@@ -36,13 +36,13 @@ export default { ...@@ -36,13 +36,13 @@ export default {
hasButton: false, hasButton: false,
options: { 'label-position': 'top' }, options: { 'label-position': 'top' },
hint: ` hint: `
<p>成绩单:中英文成绩单各上传一个文件</p> <p>成绩单:中/英文成绩单上传一个或多个。</p>
<p>注意事项:需要将证书原件扫描或拍照后提交,请确保证书内容清晰可辨。</p> <p>注意事项:需要将证书原件扫描或拍照后提交,请确保证书内容清晰可辨。</p>
`, `,
items: [ items: [
{ {
type: 'v-upload', type: 'v-upload',
label: '中文成绩单', label: '中/英文成绩单',
required: true, required: true,
model: 'REPORT_CARD_CN', model: 'REPORT_CARD_CN',
attrs: { attrs: {
...@@ -50,17 +50,6 @@ export default { ...@@ -50,17 +50,6 @@ export default {
deleteAction: `/api/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`, deleteAction: `/api/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'REPORT_CARD_CN' } data: { file_type: 'REPORT_CARD_CN' }
} }
},
{
type: 'v-upload',
label: '英文成绩单',
required: true,
model: 'REPORT_CARD_EN',
attrs: {
action: `/api/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `/api/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'REPORT_CARD_EN' }
}
} }
] ]
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论