Jelajahi Sumber

Merge branch 'feature-tianyong' into klx-online

TIANYONG 5 bulan lalu
induk
melakukan
a674ff9b42

+ 1 - 0
src/constant/instruments.ts

@@ -156,6 +156,7 @@ const instruments: any = {
 	Melodica: '口风琴',
 	'Snare Drum': '小军鼓',
 	'Horn in F': '圆号',
+	'Horns in F': '圆号',
 	Triangle: '三角铁',
 	Vibrato: '颤音琴',
 	'Suspend Cymbals': '吊镲',

+ 1 - 1
src/constant/instrumentsClassfiy.ts

@@ -3,7 +3,7 @@ const instrumentsClassfiy: any = {
 	"4": ["Clarinet"],
 	"6": ["Soprano Sax", "Alto Sax", "Tenor Sax", "Baritone Sax", "Soprano Saxophone", "Alto Saxophone", "Tenor Saxophone", "Baritone Saxophone"],
 	"12": ["Trumpet", "Muted Trumpet"],
-	"13": ["Horn in F", "French Horn"],
+	"13": ["Horn in F", "French Horn", "Horns in F"],
 	"14": ["Trombone"],
 	"15": ["Euphonium"],
 	"17": ["Tuba"],

+ 0 - 12
src/helpers/customMusicScore.ts

@@ -1073,21 +1073,9 @@ export const setGlobalMusicSheet = () => {
 	}
 }
 
-
 /** 设置自定义音符数据 */
 export const setCustomNoteRealValue = () => {
 	const detailId = state.cbsExamSongId + "";
-    const partIndex = state.partIndex + "";
-	if (["2670"].includes(detailId)) {
-		customData.customNoteRealValue = {
-			0: 0.03125,
-		};
-	}
-	if (["12673"].includes(detailId) && ['22'].includes(partIndex)) {
-		customData.customNoteRealValue = {
-			208: 0.125,
-		};
-	}
 
     if (["12667", "12673"].includes(detailId)){
         customData.customNoteCurrentTime = true

+ 3 - 3
src/helpers/formateMusic.ts

@@ -364,7 +364,7 @@ export const isRepeatWord = (text: string): boolean => {
 export const onlyVisible = (xml: string, partIndex: number, resourceType?: string): string => {
 	if (!xml) return "";
 	// console.log('原始xml')
-	const detailId = state.examSongId + "";
+	const detailId = state.cbsExamSongId + "";
 	const xmlParse = new DOMParser().parseFromString(xml, "text/xml");
 	const partList = xmlParse.getElementsByTagName("part-list")?.[0]?.getElementsByTagName("score-part") || [];
 	const partListNames = Array.from(partList).map((item) => item.getElementsByTagName("part-name")?.[0]?.textContent?.trim() || "");
@@ -534,7 +534,7 @@ export const onlyVisible = (xml: string, partIndex: number, resourceType?: strin
 export const onlyVisible2 = (xml: string): string => {
 	if (!xml) return "";
 	// console.log('原始xml')
-	//const detailId = state.examSongId + "";
+	//const detailId = state.cbsExamSongId + "";
 	const xmlParse = new DOMParser().parseFromString(xml, "text/xml");
 	const partList = xmlParse.getElementsByTagName("part-list")?.[0]?.getElementsByTagName("score-part") || [];
 	//const partListNames = Array.from(partList).map((item) => item.getElementsByTagName("part-name")?.[0]?.textContent?.trim() || "");
@@ -815,7 +815,7 @@ export const formatXML = (xml: string, xmlUrl?: string): string => {
 export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 	const customNoteRealValue = customData.customNoteRealValue;
 	const customNoteCurrentTime = customData.customNoteCurrentTime;
-	const detailId = state.examSongId + "";
+	const detailId = state.cbsExamSongId + "";
 	const partIndex = state.partIndex + "";
 	//let fixtime = browserInfo.huawei ? 0.08 : 0; //getFixTime()
 	let fixtime = 0;

+ 1 - 1
src/page-instrument/simple-detail/index.tsx

@@ -127,7 +127,7 @@ export default defineComponent({
 			if (saveSpeed) {
 				handleSetSpeed(saveSpeed);
 			}
-			setCustomNoteRealValue();
+			// setCustomNoteRealValue();
 			state.times = formateTimes(osmd);
 			console.log("🚀 ~ state.times:", state.times, state);
 			nextTick(() => {

+ 1 - 1
src/page-instrument/view-detail/index.tsx

@@ -224,7 +224,7 @@ export default defineComponent({
       // if (saveSpeed) {
       //   handleSetSpeed(saveSpeed);
       // }
-      setCustomNoteRealValue();
+      // setCustomNoteRealValue();
       state.times = formateTimes(osmd);
       // state.times = resetFrequency(state.times);
       state.times = setNoteHalfTone(state.times);

+ 2 - 0
src/view/fingering/fingering-config.ts

@@ -180,6 +180,7 @@ export const mappingVoicePart = (id: number | string, soruce: "GYM" | "COLEXIU"
       "Horn in F": 13,
       "Horn in F 1": 13,
       "Horn in F 2": 13,
+      "Horns in F": 13,
       "Trombone 1": 14,
       "Trombone 2": 14,
       "Trombone 3": 14,
@@ -292,6 +293,7 @@ export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"):
       "Horn in F": 13,
       "Horn in F 1": 13,
       "Horn in F 2": 13,
+      "Horns in F": 13,
       "Trombone 1": 14,
       "Trombone 2": 14,
       "Trombone 3": 14,