|
@@ -217,7 +217,7 @@ export default {
|
|
|
const songJson = detail.songJson ? JSON.parse(detail.songJson) : []
|
|
|
songJson.forEach(item => {
|
|
|
// 曲谱
|
|
|
- const uploadUrl = item.uploadUrl.split(',')
|
|
|
+ const uploadUrl = item.uploadUrl ? item.uploadUrl.split(',') : []
|
|
|
let tempUrl = []
|
|
|
uploadUrl.forEach(url => {
|
|
|
tempUrl.push({
|
|
@@ -235,9 +235,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.practiceNum = this.practiceUpload.length
|
|
|
- this.performNum = this.performInfo.length
|
|
|
+ this.performNum = this.performUpload.length
|
|
|
}
|
|
|
- // examRegistrationId
|
|
|
} catch(err) {
|
|
|
//
|
|
|
setLoading(false)
|
|
@@ -339,14 +338,6 @@ export default {
|
|
|
if(!this.onCheckFields()) {
|
|
|
return
|
|
|
}
|
|
|
- console.log(true)
|
|
|
- console.log({
|
|
|
- form: this.form,
|
|
|
- performUpload: this.performUpload, // 演奏曲
|
|
|
- performInfo: this.performInfo, // 演奏曲基本信息
|
|
|
- practiceUpload: this.practiceUpload, // 练习曲
|
|
|
- practiceInfo: this.practiceInfo, // 练习曲基本信息
|
|
|
- })
|
|
|
|
|
|
let songJson = [] // json 数组
|
|
|
// 练习课 "PRACTICE"
|
|
@@ -379,36 +370,33 @@ export default {
|
|
|
uploadUrl: tempUrl.join(',')
|
|
|
})
|
|
|
})
|
|
|
- console.log(songJson)
|
|
|
- // lastExamCertificateUrl
|
|
|
- // lastMusicTheoryCertificateUrl
|
|
|
- // songJson
|
|
|
- // status AUDIT_WAIT
|
|
|
let form = this.form
|
|
|
let params = {
|
|
|
+ id: form.id,
|
|
|
lastExamCertificateUrl: form.lastExamCertificateUrl,
|
|
|
lastMusicTheoryCertificateUrl: form.lastMusicTheoryCertificateUrl,
|
|
|
songJson: JSON.stringify(songJson),
|
|
|
status: "AUDIT_WAIT"
|
|
|
}
|
|
|
- console.log(params)
|
|
|
- // setLoading(true)
|
|
|
- // try {
|
|
|
- // let res = await examRegistrationUpdate()
|
|
|
- // } catch(err) {
|
|
|
- // //
|
|
|
- // }
|
|
|
+ setLoading(true)
|
|
|
+ try {
|
|
|
+ const res = await examRegistrationUpdate(params)
|
|
|
+ setLoading(false)
|
|
|
+ const result = res.data
|
|
|
+ if(result.code == 200) {
|
|
|
+ this.__init()
|
|
|
+ } else {
|
|
|
+ this.$toast(result.msg)
|
|
|
+ }
|
|
|
+ } catch(err) {
|
|
|
+ //
|
|
|
+ setLoading(false)
|
|
|
+ }
|
|
|
},
|
|
|
onCheckFields() {
|
|
|
// 校验数据
|
|
|
let form = this.form
|
|
|
// 有值说明是列表
|
|
|
- console.log({
|
|
|
- practiceUpload: this.practiceUpload.length,
|
|
|
- practiceNum: this.practiceNum,
|
|
|
- performUpload: this.performUpload.length,
|
|
|
- performNum: this.performNum
|
|
|
- })
|
|
|
if(this.practiceUpload.length != this.practiceNum) {
|
|
|
this.$toast('请上传练习曲')
|
|
|
return false
|