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

bug fixes

上级 0a4ac982
...@@ -13,11 +13,10 @@ export default function(_this) { ...@@ -13,11 +13,10 @@ export default function(_this) {
// wfzsm(_this), // wfzsm(_this),
{ {
id: 'application_pay', id: 'application_pay',
title: '缴报名费' title: '缴报名费',
// show: false, visible() {
// visible() { return _this.visible
// return _this.visible }
// }
}, },
declare(_this) declare(_this)
] ]
......
...@@ -16,9 +16,9 @@ export default function(_this) { ...@@ -16,9 +16,9 @@ export default function(_this) {
profile(_this), profile(_this),
education(_this), education(_this),
career(_this), career(_this),
answer(_this),
training(_this), training(_this),
honor(_this), honor(_this),
answer(_this),
attachment(_this) attachment(_this)
] ]
} }
......
...@@ -39,8 +39,8 @@ export default function(_this) { ...@@ -39,8 +39,8 @@ export default function(_this) {
} }
}, },
form: { form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true }, prev: { to: { query: { active: 'application_info', tab: 'application_info_honor' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true }, next: { to: { query: { active: 'application_info', tab: 'application_info_attachment' } }, isSubmit: true },
options: {}, options: {},
items: [ items: [
{ {
......
...@@ -45,7 +45,7 @@ export default function(_this) { ...@@ -45,7 +45,7 @@ export default function(_this) {
} }
}, },
form: { form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_honor' } } }, prev: { to: { query: { active: 'application_info', tab: 'application_info_answer' } } },
next: { to: { query: { active: 'application_pay' } } }, next: { to: { query: { active: 'application_pay' } } },
hasButton: false, hasButton: false,
options: { labelWidth: '140px' }, options: { labelWidth: '140px' },
......
...@@ -41,7 +41,7 @@ export default function(_this) { ...@@ -41,7 +41,7 @@ export default function(_this) {
}, },
form: { form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_education' } }, isSubmit: true }, prev: { to: { query: { active: 'application_info', tab: 'application_info_education' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_answer' } }, isSubmit: true }, next: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true },
hasAdd: true, hasAdd: true,
options: { labelWidth: '140px' }, options: { labelWidth: '140px' },
items: [ items: [
...@@ -146,8 +146,11 @@ export default function(_this) { ...@@ -146,8 +146,11 @@ export default function(_this) {
type: 'v-input', type: 'v-input',
label: '年薪收入(万元)', label: '年薪收入(万元)',
model: 'annual_salary', model: 'annual_salary',
attrs: { placeholder: '请输入您的年薪收入', type: 'number', maxlength: '20' }, attrs: { placeholder: '请输入您的年薪收入', maxlength: '10' },
rules: [{ required: true, message: '请输入您的年薪收入', trigger: 'blur' }] rules: [
{ required: true, message: '请输入您的年薪收入', trigger: 'blur' },
{ pattern: /^([0-9]*)+(.[0-9]*)?$/, message: '请输入数字', trigger: 'blur' }
]
}, },
{ {
type: 'v-input', type: 'v-input',
......
...@@ -31,7 +31,7 @@ export default function(_this) { ...@@ -31,7 +31,7 @@ export default function(_this) {
}, },
form: { form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true }, prev: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_attachment' } }, isSubmit: true }, next: { to: { query: { active: 'application_info', tab: 'application_info_answer' } }, isSubmit: true },
hasAdd: true, hasAdd: true,
options: { labelWidth: '140px' }, options: { labelWidth: '140px' },
items: [ items: [
......
...@@ -219,7 +219,7 @@ export default function(_this) { ...@@ -219,7 +219,7 @@ export default function(_this) {
model: 'nationality', model: 'nationality',
values: country, values: country,
attrs: { placeholder: '请选择国籍', filterable: true }, attrs: { placeholder: '请选择国籍', filterable: true },
rules: [{ required: true, message: '请选择国籍', trigger: 'blur' }] rules: [{ required: true, message: '请选择国籍', trigger: 'change' }]
}, },
{ {
type: 'v-datepicker', type: 'v-datepicker',
......
...@@ -30,7 +30,7 @@ export default function(_this) { ...@@ -30,7 +30,7 @@ export default function(_this) {
} }
}, },
form: { form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_answer' } }, isSubmit: true }, prev: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_honor' } }, isSubmit: true }, next: { to: { query: { active: 'application_info', tab: 'application_info_honor' } }, isSubmit: true },
hasAdd: true, hasAdd: true,
options: { labelWidth: '140px' }, options: { labelWidth: '140px' },
......
...@@ -91,6 +91,9 @@ export default { ...@@ -91,6 +91,9 @@ export default {
}, },
// 检查支付状态 // 检查支付状态
checkPay(order) { checkPay(order) {
if (!order || !order.id) {
return
}
const userId = this.user.id const userId = this.user.id
api.checkPay(order.id, { user_id: userId }).then(response => { api.checkPay(order.id, { user_id: userId }).then(response => {
if (response.data.payment_status === 'SUCCESS') { if (response.data.payment_status === 'SUCCESS') {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<template v-for="item in options"> <template v-for="item in options">
<el-step <el-step
:title="item.title" :title="item.title"
:status="progress.FILLING[item.code] && progress.FILLING[item.code].progress === 1 ? 'success' : 'error'" :status="isSuccess(progress.FILLING[item.code], item) ? 'success' : 'error'"
:key="item.code" :key="item.code"
></el-step> ></el-step>
</template> </template>
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
<template v-for="item in options"> <template v-for="item in options">
<div <div
class="preview-item" class="preview-item"
:class="progress.FILLING[item.code].progress === 1 ? 'is-success' : 'is-error'" :class="isSuccess(progress.FILLING[item.code], item) ? 'is-success' : 'is-error'"
:key="item.code" :key="item.code"
v-if="progress.FILLING[item.code]" v-if="progress.FILLING[item.code]"
> >
<div class="preview-item-hd"> <div class="preview-item-hd">
<div class="title"> <div class="title">
{{ item.title }} {{ item.title }}
<template v-if="progress.FILLING[item.code].progress === 1">(已完善)</template> <template v-if="isSuccess(progress.FILLING[item.code], item)">(已完善)</template>
<template v-else>(待完善)</template> <template v-else>(待完善)</template>
</div> </div>
<div class="line"></div> <div class="line"></div>
...@@ -186,6 +186,7 @@ export default { ...@@ -186,6 +186,7 @@ export default {
edit: { edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_profile' } } to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_profile' } }
}, },
required: true,
items: [ items: [
{ label: '姓名', code: 'real_name_cn' }, { label: '姓名', code: 'real_name_cn' },
{ label: '英文名', code: 'real_name_en' }, { label: '英文名', code: 'real_name_en' },
...@@ -215,6 +216,7 @@ export default { ...@@ -215,6 +216,7 @@ export default {
edit: { edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_education' } } to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_education' } }
}, },
required: true,
isMultiple: true, isMultiple: true,
items: [ items: [
{ {
...@@ -235,6 +237,7 @@ export default { ...@@ -235,6 +237,7 @@ export default {
edit: { edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_career' } } to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_career' } }
}, },
required: true,
isMultiple: true, isMultiple: true,
items: [ items: [
{ {
...@@ -259,25 +262,13 @@ export default { ...@@ -259,25 +262,13 @@ export default {
{ label: '工作描述', code: 'job_desc_cn' } { label: '工作描述', code: 'job_desc_cn' }
] ]
}, },
{
title: '学习目的',
code: 'answers',
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_answer' } }
},
computed(data = []) {
const result = data.map(item => {
return `<dl><dt>${item.question}</dt><dd>${item.answer}</dd></dl>`
})
return `<div class="answers">${result.join('')}</div>`
}
},
{ {
title: '所受培训', title: '所受培训',
code: 'trainings', code: 'trainings',
edit: { edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_training' } } to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_training' } }
}, },
required: false,
isMultiple: true, isMultiple: true,
items: [ items: [
{ {
...@@ -297,6 +288,7 @@ export default { ...@@ -297,6 +288,7 @@ export default {
edit: { edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_honor' } } to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_honor' } }
}, },
required: false,
isMultiple: true, isMultiple: true,
items: [ items: [
{ label: '获取时间', code: 'time' }, { label: '获取时间', code: 'time' },
...@@ -304,12 +296,27 @@ export default { ...@@ -304,12 +296,27 @@ export default {
{ label: '授予机构', code: 'institution_cn' } { label: '授予机构', code: 'institution_cn' }
] ]
}, },
{
title: '学习目的',
code: 'answers',
required: true,
edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_answer' } }
},
computed(data = []) {
const result = data.map(item => {
return `<dl><dt>${item.question}</dt><dd>${item.answer}</dd></dl>`
})
return `<div class="answers">${result.join('')}</div>`
}
},
{ {
title: '照片/附件', title: '照片/附件',
code: 'attachments', code: 'attachments',
edit: { edit: {
to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_attachment' } } to: { path: '/my/application', query: { active: 'application_info', tab: 'application_info_attachment' } }
} },
required: true
} }
// { // {
// title: '推荐信', // title: '推荐信',
...@@ -423,6 +430,9 @@ export default { ...@@ -423,6 +430,9 @@ export default {
navbar: false, navbar: false,
toolbar: { zoomIn: true, zoomOut: true, rotateLeft: true, rotateRight: true } toolbar: { zoomIn: true, zoomOut: true, rotateLeft: true, rotateRight: true }
}) })
},
isSuccess(data, item) {
return data.progress === 1 || (Object.hasOwnProperty.call(item, 'required') && !item.required)
} }
}, },
beforeMount() { beforeMount() {
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "project-pc",
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@ezijing/vue-form": "^2.2.1", "@ezijing/vue-form": "^2.2.2",
"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",
...@@ -1009,9 +1010,9 @@ ...@@ -1009,9 +1010,9 @@
} }
}, },
"node_modules/@ezijing/vue-form": { "node_modules/@ezijing/vue-form": {
"version": "2.2.1", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.1.tgz", "resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.2.tgz",
"integrity": "sha512-6N6hM7vUAFQ+47lv2t3TYdAxOt2TEIlOWnvH7CkTp1noupSm+jCsu6lllmQb+F5GZX5wcQT4g6np66NsfxRWCA==", "integrity": "sha512-kfFnnpYxW+mW96Ba/+FxKKGmhOpPOAPmhUC71EVqOk49gFaqwpmjnUMLLHmC3jFXkfyGSwQNqSWLILrf+ii3bQ==",
"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",
...@@ -13722,9 +13723,9 @@ ...@@ -13722,9 +13723,9 @@
"integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==" "integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw=="
}, },
"@ezijing/vue-form": { "@ezijing/vue-form": {
"version": "2.2.1", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.1.tgz", "resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.2.tgz",
"integrity": "sha512-6N6hM7vUAFQ+47lv2t3TYdAxOt2TEIlOWnvH7CkTp1noupSm+jCsu6lllmQb+F5GZX5wcQT4g6np66NsfxRWCA==", "integrity": "sha512-kfFnnpYxW+mW96Ba/+FxKKGmhOpPOAPmhUC71EVqOk49gFaqwpmjnUMLLHmC3jFXkfyGSwQNqSWLILrf+ii3bQ==",
"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.1", "@ezijing/vue-form": "^2.2.2",
"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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论