|
@@ -115,7 +115,7 @@
|
|
|
<p class="song-popup-tips"><i style="color: #ee0a24">*</i>支持格式:pdf,png,jpg,bmp</p>
|
|
|
|
|
|
<div class="popup-group">
|
|
|
- <span @click="songUpload.songStatus = false">取消</span>
|
|
|
+ <span @click="onSaveCancel">取消</span>
|
|
|
<span class="popup-sure" @click="onSaveUpload">确定</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -212,7 +212,9 @@ export default {
|
|
|
uploadCertificate: [], // 上传证书
|
|
|
uploadCertificate2: [], // 上传乐理证书
|
|
|
practiceUpload: [],
|
|
|
+ practiceUploadTemp: [],
|
|
|
performNumUpload: [],
|
|
|
+ performNumUploadTemp: [],
|
|
|
examMusicTheoryList: [], // 乐理列表
|
|
|
examMusicTheoryIndex: 0, // 乐理索引
|
|
|
}
|
|
@@ -691,6 +693,11 @@ export default {
|
|
|
songUpload.author = performSUL ? performSUL.author : null
|
|
|
}
|
|
|
},
|
|
|
+ onSaveCancel() {
|
|
|
+ this.songUpload.songStatus = false
|
|
|
+ this.performNumUpload = this.performNumUploadTemp // 回填数据
|
|
|
+ this.practiceUpload = this.practiceUploadTemp // 回填数据
|
|
|
+ },
|
|
|
onSaveUpload() {
|
|
|
let songUpload = this.songUpload
|
|
|
if(!songUpload.name) {
|
|
@@ -699,17 +706,33 @@ export default {
|
|
|
}
|
|
|
const nameAuthor = songUpload.name + (songUpload.author ? "-" + songUpload.author : "")
|
|
|
if(songUpload.indexName == "practiceNum") {
|
|
|
- if(this.practiceUpload[songUpload.index] && this.practiceUpload[songUpload.index].length > 0 && this.practiceUpload[songUpload.index][0].url) {
|
|
|
- this.practiceSelect[songUpload.index] = nameAuthor
|
|
|
- this.practiceSelectUploadList[songUpload.index] = JSON.parse(JSON.stringify(songUpload))
|
|
|
+ const practiceObj = this.practiceUpload[songUpload.index]
|
|
|
+ const practiceLength = practiceObj ? practiceObj.length : 0
|
|
|
+ if(practiceObj && practiceLength > 0 && practiceObj[0].url) {
|
|
|
+ if(practiceObj[practiceLength - 1].url) {
|
|
|
+ this.practiceSelect[songUpload.index] = nameAuthor
|
|
|
+ this.practiceSelectUploadList[songUpload.index] = JSON.parse(JSON.stringify(songUpload))
|
|
|
+ this.practiceUploadTemp = JSON.parse(JSON.stringify(this.practiceUpload))
|
|
|
+ } else {
|
|
|
+ this.$toast("上传曲谱中,请稍等")
|
|
|
+ return
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$toast("请上传文件")
|
|
|
return
|
|
|
}
|
|
|
} else if(songUpload.indexName == "performNum") {
|
|
|
- if(this.performNumUpload[songUpload.index] && this.performNumUpload[songUpload.index].length > 0 && this.performNumUpload[songUpload.index][0].url) {
|
|
|
- this.performNumSelect[songUpload.index] = nameAuthor
|
|
|
- this.performNumSelectUploadList[songUpload.index] = JSON.parse(JSON.stringify(songUpload))
|
|
|
+ const performObj = this.performNumUpload[songUpload.index]
|
|
|
+ const performLength = performObj ? performObj.length : 0
|
|
|
+ if(performObj && performLength > 0) {
|
|
|
+ if(performObj[performLength - 1].url) {
|
|
|
+ this.performNumSelect[songUpload.index] = nameAuthor
|
|
|
+ this.performNumSelectUploadList[songUpload.index] = JSON.parse(JSON.stringify(songUpload))
|
|
|
+ this.performNumUploadTemp = JSON.parse(JSON.stringify(this.performNumUpload))
|
|
|
+ } else {
|
|
|
+ this.$toast("上传曲谱中,请稍等")
|
|
|
+ return
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$toast("请上传文件")
|
|
|
return
|
|
@@ -802,7 +825,6 @@ export default {
|
|
|
levelFee: form.levelFee,
|
|
|
theoryLevelFee: form.theoryLevelFee
|
|
|
}
|
|
|
- // console.log("参数", params)
|
|
|
setLoading(false)
|
|
|
localStorage.setItem("examRegistrationParams", JSON.stringify(params))
|
|
|
this.$router.push({
|