|
@@ -319,6 +319,8 @@ const state = reactive({
|
|
extConfigJson: {} as any,
|
|
extConfigJson: {} as any,
|
|
/** 扩展样式字段 */
|
|
/** 扩展样式字段 */
|
|
extStyleConfigJson: {} as any,
|
|
extStyleConfigJson: {} as any,
|
|
|
|
+ /** 简谱扩展样式字段 */
|
|
|
|
+ extJianStyleConfigJson: {} as any,
|
|
/** 是否开启节拍器(mp3节拍器) */
|
|
/** 是否开启节拍器(mp3节拍器) */
|
|
isOpenMetronome: false,
|
|
isOpenMetronome: false,
|
|
/** 演唱模式是否开启节拍器(mp3节拍器) */
|
|
/** 演唱模式是否开启节拍器(mp3节拍器) */
|
|
@@ -507,6 +509,8 @@ const state = reactive({
|
|
beatStartTime: 0,
|
|
beatStartTime: 0,
|
|
/** 是否为详情预览模式 */
|
|
/** 是否为详情预览模式 */
|
|
isPreView: false,
|
|
isPreView: false,
|
|
|
|
+ /** 是否为内容平台预览模式 */
|
|
|
|
+ isCbsView: false,
|
|
/** 是否为评测报告模式 */
|
|
/** 是否为评测报告模式 */
|
|
isEvaluatReport: false,
|
|
isEvaluatReport: false,
|
|
/** midi播放器是否初始化中 */
|
|
/** midi播放器是否初始化中 */
|
|
@@ -573,6 +577,8 @@ const state = reactive({
|
|
/** 是否是C调,切换到唱名时,只有C调所有的谱面类型都可以播放唱名文件;其它调的只有首调可以播放唱名,因为唱名是按照C调制作的,没有其它调的唱名文件 */
|
|
/** 是否是C调,切换到唱名时,只有C调所有的谱面类型都可以播放唱名文件;其它调的只有首调可以播放唱名,因为唱名是按照C调制作的,没有其它调的唱名文件 */
|
|
isCTone: false,
|
|
isCTone: false,
|
|
evxmlAddPartName: false, // 妙极客的部分曲子没有part-name,需要自行添加的part-name
|
|
evxmlAddPartName: false, // 妙极客的部分曲子没有part-name,需要自行添加的part-name
|
|
|
|
+ /** 乐器id */
|
|
|
|
+ instrumentId: null,
|
|
});
|
|
});
|
|
const browserInfo = browser();
|
|
const browserInfo = browser();
|
|
let offset_duration = 0;
|
|
let offset_duration = 0;
|
|
@@ -764,6 +770,7 @@ const handlePlaying = () => {
|
|
};
|
|
};
|
|
/** 跳转到指定音符开始播放 */
|
|
/** 跳转到指定音符开始播放 */
|
|
export const skipNotePlay = async (itemIndex: number, isStart = false) => {
|
|
export const skipNotePlay = async (itemIndex: number, isStart = false) => {
|
|
|
|
+ if (state.isPreView) return;
|
|
console.log('点击音符')
|
|
console.log('点击音符')
|
|
const item = state.times[itemIndex];
|
|
const item = state.times[itemIndex];
|
|
let itemTime = item.time;
|
|
let itemTime = item.time;
|
|
@@ -1409,6 +1416,7 @@ function xmlToTracks(xmlString: string) {
|
|
function initMusicSource(data: any, tracks: string[], partIndex: number, workRecordInstrumentId?: string) {
|
|
function initMusicSource(data: any, tracks: string[], partIndex: number, workRecordInstrumentId?: string) {
|
|
let track:string,index:number, musicalInstrumentId: string
|
|
let track:string,index:number, musicalInstrumentId: string
|
|
const instrumentId = workRecordInstrumentId || query.instrumentId || storeData.user?.instrumentId
|
|
const instrumentId = workRecordInstrumentId || query.instrumentId || storeData.user?.instrumentId
|
|
|
|
+ state.instrumentId = instrumentId;
|
|
let { musicSheetType, isAllSubject, musicSheetSoundList, musicSheetAccompanimentList } = data
|
|
let { musicSheetType, isAllSubject, musicSheetSoundList, musicSheetAccompanimentList } = data
|
|
musicSheetSoundList || (musicSheetSoundList = [])
|
|
musicSheetSoundList || (musicSheetSoundList = [])
|
|
musicSheetAccompanimentList || (musicSheetAccompanimentList = [])
|
|
musicSheetAccompanimentList || (musicSheetAccompanimentList = [])
|
|
@@ -1666,6 +1674,7 @@ const setState = (data: any, index: number) => {
|
|
// 开启预备小节
|
|
// 开启预备小节
|
|
state.isOpenPrepare = true;
|
|
state.isOpenPrepare = true;
|
|
state.extStyleConfigJson = data.extStyleConfigJson || {}
|
|
state.extStyleConfigJson = data.extStyleConfigJson || {}
|
|
|
|
+ state.extJianStyleConfigJson = data.extJianStyleConfigJson || {}
|
|
// console.log("🚀 ~ state.subjectId:", state.subjectId, state.track as any , state.subjectId)
|
|
// console.log("🚀 ~ state.subjectId:", state.subjectId, state.track as any , state.subjectId)
|
|
// 是否打击乐
|
|
// 是否打击乐
|
|
/**
|
|
/**
|
|
@@ -1704,7 +1713,9 @@ const setState = (data: any, index: number) => {
|
|
// 如果是PC端,放大曲谱
|
|
// 如果是PC端,放大曲谱
|
|
state.platform = query.platform?.toLocaleUpperCase() || "";
|
|
state.platform = query.platform?.toLocaleUpperCase() || "";
|
|
if (state.platform === IPlatform.PC) {
|
|
if (state.platform === IPlatform.PC) {
|
|
- state.zoom = query.zoom || 1.5;
|
|
|
|
|
|
+ if (query.zoom <= 1) {
|
|
|
|
+ state.zoom = query.zoom || state.zoom;
|
|
|
|
+ }
|
|
state.enableEvaluation = false;
|
|
state.enableEvaluation = false;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -2008,12 +2019,20 @@ watch(
|
|
measureNum = nextMeasureNum
|
|
measureNum = nextMeasureNum
|
|
}
|
|
}
|
|
if (measureNum >= 0 && (measureNum === state.activeMeasureIndex || (measureNum < state.activeMeasureIndex && nextMeasureNum > state.activeMeasureIndex))) {
|
|
if (measureNum >= 0 && (measureNum === state.activeMeasureIndex || (measureNum < state.activeMeasureIndex && nextMeasureNum > state.activeMeasureIndex))) {
|
|
- item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#132D4C")
|
|
|
|
- item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#040D1E")
|
|
|
|
|
|
+ if (state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#FFF6E1")
|
|
|
|
+ } else {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#132D4C")
|
|
|
|
+ item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#040D1E")
|
|
|
|
+ }
|
|
// 预备小节
|
|
// 预备小节
|
|
if(state.sectionFirst && measureNum === state.sectionFirst.MeasureNumberXML && state.section.length === 2){
|
|
if(state.sectionFirst && measureNum === state.sectionFirst.MeasureNumberXML && state.section.length === 2){
|
|
- item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#71B8BD")
|
|
|
|
- item?.querySelector('.vf-custom-bot')?.setAttribute("fill", "#448F9C")
|
|
|
|
|
|
+ if (state.isCbsView) {
|
|
|
|
+ item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#E3F1FF")
|
|
|
|
+ } else {
|
|
|
|
+ item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#71B8BD")
|
|
|
|
+ item?.querySelector('.vf-custom-bot')?.setAttribute("fill", "#448F9C")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
// 有选段只清除选段处的
|
|
// 有选段只清除选段处的
|
|
@@ -2026,17 +2045,34 @@ watch(
|
|
rightMeasureNumberXML = state.section[0].MeasureNumberXML
|
|
rightMeasureNumberXML = state.section[0].MeasureNumberXML
|
|
}
|
|
}
|
|
if(measureNum >= leftMeasureNumberXML && measureNum <= rightMeasureNumberXML){
|
|
if(measureNum >= leftMeasureNumberXML && measureNum <= rightMeasureNumberXML){
|
|
- item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#609FCF")
|
|
|
|
- item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#2B70A5")
|
|
|
|
|
|
+ if (!state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#609FCF")
|
|
|
|
+ item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#2B70A5")
|
|
|
|
+ } else {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", 'transparent')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (measureNum >= leftMeasureNumberXML && measureNum <= rightMeasureNumberXML) {
|
|
|
|
+ if (state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "rgba(255,246,225,0.5)")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 预备小节
|
|
// 预备小节
|
|
if(state.sectionFirst && measureNum === state.sectionFirst.MeasureNumberXML){
|
|
if(state.sectionFirst && measureNum === state.sectionFirst.MeasureNumberXML){
|
|
- item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#71B8BD")
|
|
|
|
- item?.querySelector('.vf-custom-bot')?.setAttribute("fill", "#448F9C")
|
|
|
|
|
|
+ if (state.isCbsView) {
|
|
|
|
+ item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#E3F1FF")
|
|
|
|
+ } else {
|
|
|
|
+ item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#71B8BD")
|
|
|
|
+ item?.querySelector('.vf-custom-bot')?.setAttribute("fill", "#448F9C")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#609FCF")
|
|
|
|
- item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#2B70A5")
|
|
|
|
|
|
+ if (!state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#609FCF")
|
|
|
|
+ item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#2B70A5")
|
|
|
|
+ } else {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", 'transparent')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -2071,18 +2107,35 @@ watch(
|
|
}
|
|
}
|
|
// 小于选中置灰
|
|
// 小于选中置灰
|
|
if (measureNum < leftMeasureNumberXML) {
|
|
if (measureNum < leftMeasureNumberXML) {
|
|
- item.querySelector('.vf-custom-bg')?.setAttribute("fill", "rgba(96,159,207,0.5)")
|
|
|
|
- item.querySelector('.vf-custom-bot')?.setAttribute("fill", "rgba(43,112,165,0.5)")
|
|
|
|
|
|
+ if (!state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "rgba(96,159,207,0.5)")
|
|
|
|
+ item.querySelector('.vf-custom-bot')?.setAttribute("fill", "rgba(43,112,165,0.5)")
|
|
|
|
+ } else {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", 'transparent')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 大于选中置灰
|
|
// 大于选中置灰
|
|
if(measureNum > rightMeasureNumberXML){
|
|
if(measureNum > rightMeasureNumberXML){
|
|
- item.querySelector('.vf-custom-bg')?.setAttribute("fill", "rgba(96,159,207,0.5)")
|
|
|
|
- item.querySelector('.vf-custom-bot')?.setAttribute("fill", "rgba(43,112,165,0.5)")
|
|
|
|
|
|
+ if (!state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "rgba(96,159,207,0.5)")
|
|
|
|
+ item.querySelector('.vf-custom-bot')?.setAttribute("fill", "rgba(43,112,165,0.5)")
|
|
|
|
+ } else {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", 'transparent')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (measureNum >= leftMeasureNumberXML && measureNum <= rightMeasureNumberXML) {
|
|
|
|
+ if (state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "rgba(255,246,225,0.5)")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 预备小节
|
|
// 预备小节
|
|
if(state.sectionFirst && measureNum === state.sectionFirst.MeasureNumberXML){
|
|
if(state.sectionFirst && measureNum === state.sectionFirst.MeasureNumberXML){
|
|
- item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#71B8BD")
|
|
|
|
- item?.querySelector('.vf-custom-bot')?.setAttribute("fill", "#448F9C")
|
|
|
|
|
|
+ if (state.isCbsView) {
|
|
|
|
+ item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#E3F1FF")
|
|
|
|
+ } else {
|
|
|
|
+ item?.querySelector('.vf-custom-bg')?.setAttribute("fill", "#71B8BD")
|
|
|
|
+ item?.querySelector('.vf-custom-bot')?.setAttribute("fill", "#448F9C")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
@@ -2101,11 +2154,20 @@ watch(
|
|
measureNum = nextMeasureNum
|
|
measureNum = nextMeasureNum
|
|
}
|
|
}
|
|
if (measureNum >= 0 && (measureNum === state.activeMeasureIndex || (measureNum < state.activeMeasureIndex && nextMeasureNum > state.activeMeasureIndex)) ) {
|
|
if (measureNum >= 0 && (measureNum === state.activeMeasureIndex || (measureNum < state.activeMeasureIndex && nextMeasureNum > state.activeMeasureIndex)) ) {
|
|
- item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#132D4C")
|
|
|
|
- item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#040D1E")
|
|
|
|
|
|
+ if (state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "transparent")
|
|
|
|
+ } else {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#132D4C")
|
|
|
|
+ item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#040D1E")
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#609FCF")
|
|
|
|
- item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#2B70A5")
|
|
|
|
|
|
+ if (state.isCbsView) {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "transparent")
|
|
|
|
+ } else {
|
|
|
|
+ item.querySelector('.vf-custom-bg')?.setAttribute("fill", "#609FCF")
|
|
|
|
+ item.querySelector('.vf-custom-bot')?.setAttribute("fill", "#2B70A5")
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -2143,6 +2205,7 @@ export const checkMoveNoSave = async () => {
|
|
|
|
|
|
/** 刷新谱面 */
|
|
/** 刷新谱面 */
|
|
export const refreshMusicSvg = () => {
|
|
export const refreshMusicSvg = () => {
|
|
|
|
+ moveData.noteCoords = []
|
|
moveData.modelList = []
|
|
moveData.modelList = []
|
|
clearSelection();
|
|
clearSelection();
|
|
resetBaseRate();
|
|
resetBaseRate();
|