Selaa lähdekoodia

Merge branch 'develop' into test

yuanliang 1 vuosi sitten
vanhempi
commit
a03f2e7ba1

+ 12 - 33
src/views/music-library/music-sheet/modal/music-operation.tsx

@@ -500,32 +500,6 @@ export default defineComponent({
           forms.playSpeed = 100
         }
       }
-
-      // 乐器
-      const instrumentCodeList: any = []
-      const instrumentEle = xmlParse.getElementsByTagName('virtual-instrument')
-      for (let index = 0; index < instrumentEle.length; index++) {
-        const note = instrumentEle[index]
-        const instrumentCode = note.getElementsByTagName('virtual-name')?.[0]?.textContent || ''
-        if (instrumentCode && !instrumentCodeList.includes(instrumentCode)) {
-          instrumentCodeList.push(instrumentCode)
-        }
-      }
-      const codeIdMap = new Map<string, string>()
-      state.instrumentData.forEach((data: any) => {
-        codeIdMap.set(data.code, data.id + '')
-      })
-      forms.musicalInstrumentIdList = []
-      instrumentCodeList.forEach((code: string) => {
-        if (codeIdMap.has(code)) {
-          forms.musicalInstrumentIdList.push(codeIdMap.get(code))
-        }
-      })
-
-      // 声部
-      if (forms.musicalInstrumentIdList.length > 0) {
-        showBackSubject(forms.musicalInstrumentIdList)
-      }
       return partListNames
     }
 
@@ -542,11 +516,6 @@ export default defineComponent({
         } else {
           item.disabled = true
         }
-        // if (index > -1 && track != item.value) {
-        //   item.disabled = true
-        // } else {
-        //   item.disabled = false
-        // }
       })
       return partListNames || []
     }
@@ -716,12 +685,22 @@ export default defineComponent({
           forms.remark = data.remark
           forms.status = data.status
           forms.musicCategoryId = data.musicCategoryId
+          forms.evaluationStandard = data.evaluationStandard
 
           forms.musicSheetType = data.musicSheetType || 'SINGLE'
           forms.evaluationStandard = data.evaluationStandard
           forms.musicalInstrumentIdList = data.musicalInstrumentIds.split(',') || []
 
-          forms.subjectIds = data.subjectIds?.split(',') || []
+          forms.subjectIds = []
+          if (data.subjectIds) {
+            const subjectIds = data.subjectIds.split(',') || []
+            subjectIds.forEach((subjectId: any) => {
+              if (!forms.subjectIds.includes(subjectId)) {
+                forms.subjectIds.push(subjectId)
+              }
+            })
+          }
+          console.log('forms.subjectIds',forms.subjectIds)
           forms.sourceType = data.sourceType
           forms.musicSheetExtend = data.musicSheetExtend
           forms.repeatedBeats = data.isPlayBeat
@@ -802,7 +781,7 @@ export default defineComponent({
                 <NInput
                   v-model:value={forms.name}
                   placeholder="请输入曲目名称"
-                  maxlength={25}
+                  maxlength={50}
                   showCount
                 />
               </NFormItemGi>

+ 2 - 11
src/views/music-library/music-sheet/modal/use-project.tsx

@@ -14,7 +14,7 @@ import {
   NTabs,
   useMessage
 } from 'naive-ui'
-import { appKey, musicSheetAvailableType, musicSheetPaymentType } from '@/utils/constant'
+import {appKey, musicSheetAvailableType, musicSheetPaymentType, musicSheetType} from '@/utils/constant'
 import {
   musicSheetApplicationExtendCategoryApplicationExtendInfo,
   musicSheetApplicationExtendCategoryList,
@@ -524,16 +524,7 @@ export default defineComponent({
                             placeholder="请选择是否收费"
                             clearable
                             v-model:value={forms.useProjectParamConfig.KLX.paymentType}
-                            options={[
-                              {
-                                label: '是',
-                                value: 1
-                              },
-                              {
-                                label: '否',
-                                value: 0
-                              }
-                            ]}
+                            options={getSelectDataFromObj(musicSheetPaymentType)}
                           ></NSelect>
                         </NFormItem>
                         <NFormItem