Browse Source

修改声部反显

lex-xin 6 months ago
parent
commit
6ab40728e7
2 changed files with 8 additions and 2 deletions
  1. 7 1
      src/views/music-library/music-sheet/modal/music-operationV2.tsx
  2. 1 1
      vite.config.ts

+ 7 - 1
src/views/music-library/music-sheet/modal/music-operationV2.tsx

@@ -376,6 +376,7 @@ export default defineComponent({
     })
     const state = reactive({
       loading: false,
+      musicUpdateLoading: false, // 是否在加载 中
       previewMode: false, //是否是预览模式
       tagList: [...props.tagList] as any, // 标签列表
       xmlFirstSpeed: null as any, // 第一个音轨速度
@@ -415,6 +416,8 @@ export default defineComponent({
     watch(
       () => forms.multiTracksSelection,
       (value) => {
+        // 在修改的时候不用自动更新
+        if(state.musicUpdateLoading) return
         initInstrumentAndSubjectByTrack(value)
         initFSongList()
       }
@@ -879,7 +882,7 @@ export default defineComponent({
 
     // 通过乐器编码反显乐器和声部
     const initInstrumentAndSubjectByCode = async (codes: string[]) => {
-      forms.musicalInstrumentIdList = []
+      // forms.musicalInstrumentIdList = []
       forms.subjectIds = []
       const codeIdMap = new Map<string, []>() as any
       const codeMapKeys: string[] = []
@@ -1256,6 +1259,7 @@ export default defineComponent({
 
       if (props.type === 'edit' || props.type === 'preview') {
         const detail = props.data
+        
         try {
           const { data } = await musicSheetDetail({ id: detail.id })
           forms.details = data
@@ -1367,6 +1371,7 @@ export default defineComponent({
           setOwnerName()
           axios.get(data.xmlFileUrl).then((res: any) => {
             if (res?.data) {
+              state.musicUpdateLoading = true;
               gradualData.list = getGradualLengthByXml(res?.data as any).filter(
                 (item: any) => item.length === 2
               )
@@ -1461,6 +1466,7 @@ export default defineComponent({
                 })
                 // }
               }
+              state.musicUpdateLoading = false
             }
           })
         } catch (error) {}

+ 1 - 1
vite.config.ts

@@ -21,7 +21,7 @@ function pathResolve(dir: string) {
 // const proxyUrl = 'https://dev.lexiaoya.cn'
 // const proxyUrl = 'http://127.0.0.1:7293/'
 // const proxyUrl = 'https://resource.colexiu.com/'
-const proxyUrl = 'https://dev.resource.colexiu.com/'
+const proxyUrl = 'https://test.resource.colexiu.com/'
 // https://test.resource.colexiu.com/
 
 export default ({ command, mode }: ConfigEnv): UserConfig => {