|
|
@ -112,7 +112,6 @@ |
|
|
|
:on-error="uploadError" |
|
|
|
:on-error="uploadError" |
|
|
|
:before-upload="beforeUpload" |
|
|
|
:before-upload="beforeUpload" |
|
|
|
:on-success="uploadAnnexSuccess" |
|
|
|
:on-success="uploadAnnexSuccess" |
|
|
|
:before-remove="beforeRemove" |
|
|
|
|
|
|
|
:limit="5" |
|
|
|
:limit="5" |
|
|
|
:on-exceed="handleExceedAnnex" |
|
|
|
:on-exceed="handleExceedAnnex" |
|
|
|
:action="this.api.fileupload" |
|
|
|
:action="this.api.fileupload" |
|
|
@ -296,6 +295,7 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getData() { |
|
|
|
getData() { |
|
|
|
this.$post(`${this.api.getContest}?contestId=${this.form.id}`).then(({ contest }) => { |
|
|
|
this.$post(`${this.api.getContest}?contestId=${this.form.id}`).then(({ contest }) => { |
|
|
|
|
|
|
|
this.$parent.name = contest.name |
|
|
|
this.signupTime = [contest.signUpStartTime, contest.signUpEndTime] |
|
|
|
this.signupTime = [contest.signUpStartTime, contest.signUpEndTime] |
|
|
|
this.playTime = [contest.playStartTime, contest.playEndTime] |
|
|
|
this.playTime = [contest.playStartTime, contest.playEndTime] |
|
|
|
this.sponsorList = contest.sponsor.split(",") |
|
|
|
this.sponsorList = contest.sponsor.split(",") |
|
|
@ -333,7 +333,7 @@ export default { |
|
|
|
if (rangeName) { |
|
|
|
if (rangeName) { |
|
|
|
const range = [] |
|
|
|
const range = [] |
|
|
|
rangeName.map(e => { |
|
|
|
rangeName.map(e => { |
|
|
|
range.push(e.type ? (e.provinceName || e.cityName) : e.schoolName) |
|
|
|
range.push(e.type ? (e.cityName || e.provinceName) : e.schoolName) |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.rangeName = range.join(',') |
|
|
|
this.rangeName = range.join(',') |
|
|
|
} |
|
|
|
} |
|
|
@ -413,7 +413,14 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 附件上传前 |
|
|
|
// 附件上传前 |
|
|
|
beforeUpload(file) { |
|
|
|
beforeUpload(file) { |
|
|
|
|
|
|
|
const isLt2M = file.size / 1024 / 1024 < 10 |
|
|
|
|
|
|
|
if (!isLt2M) util.warningMsg('请上传小于10MB的附件!') |
|
|
|
|
|
|
|
if (isLt2M) { |
|
|
|
this.fileName = file.name |
|
|
|
this.fileName = file.name |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadError(err, file, fileList) { |
|
|
|
uploadError(err, file, fileList) { |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|