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

chore(报名申请): 新增荣誉证书附件

上级 b832ddc8
...@@ -12,9 +12,18 @@ export default function(_this) { ...@@ -12,9 +12,18 @@ 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 { honors: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const {
attachments = [],
honors: list = [],
submission_stage: submissionStage = 'FILLING'
} = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
return list.length ? list : [{}] const CERTIFICATE_OF_HONOR = attachments.filter(item => {
return item.file_type_id === 'CERTIFICATE_OF_HONOR'
})
return list.length
? list.map(item => Object.assign({}, item, { CERTIFICATE_OF_HONOR }))
: [{ CERTIFICATE_OF_HONOR }]
} }
}, },
update: { update: {
...@@ -56,6 +65,21 @@ export default function(_this) { ...@@ -56,6 +65,21 @@ export default function(_this) {
attrs: { placeholder: '请输入证书颁发机构' } attrs: { placeholder: '请输入证书颁发机构' }
// rules: [{ required: true, message: '请输入证书颁发机构', trigger: 'blur' }] // rules: [{ required: true, message: '请输入证书颁发机构', trigger: 'blur' }]
} }
],
appendItems: [
// 推荐信附件
{
type: 'v-upload',
label: '荣誉证书附件',
model: 'CERTIFICATE_OF_HONOR',
attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`,
data: { file_type: 'CERTIFICATE_OF_HONOR' },
accept: 'image/*'
},
class: 'upload-attachments'
}
] ]
} }
} }
......
...@@ -164,4 +164,19 @@ export default { ...@@ -164,4 +164,19 @@ export default {
padding: 0; padding: 0;
} }
} }
::v-deep .upload-attachments {
border-top: 1px solid #f1f1f1;
margin-top: 20px;
padding-top: 20px;
.el-form-item__label {
width: auto !important;
float: none !important;
font-size: 14px;
font-weight: 700;
color: #222;
}
.el-form-item__content {
margin: 0 !important;
}
}
</style> </style>
...@@ -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.12", "@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.12", "version": "2.3.13",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.12.tgz", "resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.3.13.tgz",
"integrity": "sha512-PG9YfVVt/2+mrMDKJ4jB7rEuet7J8o8Xl6FYYYfZOcS+BYYHsvRQ+WaW3imqRNxGccRtrq99KoXRBlpe8e2Pww==", "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.12", "version": "2.3.13",
"resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.2.12.tgz", "resolved": "https://registry.npmjs.org/@ezijing/vue-form/-/vue-form-2.3.13.tgz",
"integrity": "sha512-PG9YfVVt/2+mrMDKJ4jB7rEuet7J8o8Xl6FYYYfZOcS+BYYHsvRQ+WaW3imqRNxGccRtrq99KoXRBlpe8e2Pww==", "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.12", "@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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论