lex-xin пре 4 година
родитељ
комит
98b41d86c5
1 измењених фајлова са 19 додато и 12 уклоњено
  1. 19 12
      src/views/app/AppDetail.vue

+ 19 - 12
src/views/app/AppDetail.vue

@@ -65,7 +65,7 @@
                 {{ form.memo }}
             </van-cell>
         </van-cell-group>
-        <van-button type="primary" v-if="form.editStatus" round block>重新提交</van-button>
+        <van-button type="primary" v-if="form.editStatus" @click="onSubmit" round block>重新提交</van-button>
 
         <van-popup class="van-popup-song" v-model="songUpload.songStatus" :close-on-click-overlay="false">
             <div class="song-popup">
@@ -122,7 +122,7 @@ import { browser } from '@/utils/common'
 // import dayjs from 'dayjs'
 import setLoading from '@/utils/loading'
 import fileUtil from '@/utils/fileUtil'
-import { uploadFile } from '../signup/SignUpApi'
+import { uploadFile, examRegistrationUpdate } from '../signup/SignUpApi'
 import { applyList } from './appApi'
 export default {
     name: 'appDetail',
@@ -143,6 +143,8 @@ export default {
                 lastMusicTheoryLevel: null,
                 lastMusicTheoryCertificateUrl: null,
                 memo: null,
+                practiceSongIdList: null,
+                performSongIdList: null,
                 editStatus: false
             },
             uploadCertificate: [],
@@ -211,7 +213,6 @@ export default {
                     }
 
                     const songJson = detail.songJson ? JSON.parse(detail.songJson) : []
-                    console.log(songJson)
                     songJson.forEach(item => {
                         // 曲谱
                         const uploadUrl = item.uploadUrl.split(',')
@@ -229,13 +230,6 @@ export default {
                             this.performInfo.push(item)
                         }
                     })
-
-                    console.log({
-                        practiceInfo: this.practiceInfo,
-                        practiceUpload: this.practiceUpload,
-                        performInfo: this.performInfo,
-                        performUpload: this.performUpload
-                    })
                 }
                 // examRegistrationId
             }catch(err) {
@@ -245,17 +239,27 @@ export default {
         },
         onOpen(type, index) {
             let songUpload = this.songUpload
-            songUpload.indexName = type
-            songUpload.index = index
             let practiceSUL = this.practiceInfo[index]
             let performSUL = this.performInfo[index]
+            // practiceSongIdList: detail.practiceSongIdList,
+            //             performSongIdList: detail.performSongIdList,
+            const practiceSongIdList = this.form.practiceSongIdList
+            const performSongIdList = this.form.performSongIdList
             if(type == "perform") {
+                if(performSongIdList) {
+                    return
+                }
                 songUpload.name = performSUL ? performSUL.songName : null
                 songUpload.author = performSUL ? performSUL.songAuthor : null
             } else if(type == "practice") {
+                if(practiceSongIdList) { // 判断是否是自定义
+                    return
+                }
                 songUpload.name = practiceSUL ? practiceSUL.songName : null
                 songUpload.author = practiceSUL ? practiceSUL.songAuthor : null
             }
+            songUpload.indexName = type
+            songUpload.index = index
             songUpload.songStatus = true
         },
         beforeRead(file) {
@@ -326,6 +330,9 @@ export default {
                 return false
             }
         },
+        onSubmit() {
+            console.log(true)
+        },
         onSaveCancel() {
             this.songUpload.songStatus = false
         },