|
@@ -664,8 +664,8 @@ const handlePlaying = () => {
|
|
|
// #8698 bug修复
|
|
|
if (state.modeType === "practise" && state.sectionStatus) {
|
|
|
onEnded();
|
|
|
- state.activeNoteIndex = state.sectionFirst ? state.sectionFirst.i : state.section[0].i
|
|
|
- dynamicShowPlaySpeed(state.activeNoteIndex)
|
|
|
+ // state.activeNoteIndex = state.sectionFirst ? state.sectionFirst.i : state.section[0].i
|
|
|
+ // dynamicShowPlaySpeed(state.activeNoteIndex)
|
|
|
resetPlaybackToStart();
|
|
|
return;
|
|
|
}
|
|
@@ -1093,10 +1093,6 @@ const formateSelectMearure = (_list: any[]): any[] => {
|
|
|
startItemINdex = state.sectionFirst ? state.sectionFirst.i : startItemINdex;
|
|
|
}
|
|
|
skipNotePlay(startItemINdex, startItemINdex === 0);
|
|
|
- const currentItem: any = (state.sectionStatus && state.section.length === 2) ? state.sectionFirst || state.section[0] : state.times[state.activeNoteIndex];
|
|
|
- if (currentItem.measureSpeed && query.workRecord === undefined) {
|
|
|
- handleSetSpeed(currentItem.measureSpeed);
|
|
|
- }
|
|
|
return list;
|
|
|
};
|
|
|
|
|
@@ -1181,6 +1177,11 @@ export const hanldeDirectSelection = (list: any[]) => {
|
|
|
state.sectionStatus = true;
|
|
|
setTimeout(() => {
|
|
|
state.section = formateSelectMearure(list);
|
|
|
+ // 选段完成后,需要根据预报小节的速度,设置右下角显示的速度
|
|
|
+ const currentItem: any = (state.sectionStatus && state.section.length === 2) ? state.sectionFirst || state.section[0] : state.times[state.activeNoteIndex];
|
|
|
+ if (currentItem.measureSpeed && query.workRecord === undefined) {
|
|
|
+ handleSetSpeed(currentItem.measureSpeed);
|
|
|
+ }
|
|
|
console.log('选段小节', state.section)
|
|
|
}, 0);
|
|
|
};
|
|
@@ -1665,8 +1666,9 @@ watch(
|
|
|
// const matchMeasureNum = state.activeMeasureIndex - needReduceMultipleRestNum - 1
|
|
|
// console.log('选中的小节',matchMeasureNum,'需要减去的小节',needReduceMultipleRestNum,'当前的小节',state.activeMeasureIndex)
|
|
|
state.vfmeasures.forEach((item: any, idx: number) => {
|
|
|
- const measureNum = item.getAttribute('data-num') ? Number(item.getAttribute('data-num')) : 1;
|
|
|
- if (measureNum === state.activeMeasureIndex) {
|
|
|
+ const measureNum = item.getAttribute('data-num') ? Number(item.getAttribute('data-num')) : -1;
|
|
|
+ const nextMeasureNum = state.vfmeasures[idx+1]?.getAttribute('data-num') ? Number(state.vfmeasures[idx+1]?.getAttribute('data-num')) : -1;
|
|
|
+ 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")
|
|
|
} else {
|
|
@@ -1731,8 +1733,9 @@ watch(
|
|
|
}else{
|
|
|
// 恢复选段前
|
|
|
state.vfmeasures.forEach((item: any, idx: number) => {
|
|
|
- const measureNum = item.getAttribute('data-num') ? Number(item.getAttribute('data-num')) : 1;
|
|
|
- if (measureNum === state.activeMeasureIndex) {
|
|
|
+ const measureNum = item.getAttribute('data-num') ? Number(item.getAttribute('data-num')) : -1;
|
|
|
+ const nextMeasureNum = state.vfmeasures[idx+1]?.getAttribute('data-num') ? Number(state.vfmeasures[idx+1]?.getAttribute('data-num')) : -1;
|
|
|
+ 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")
|
|
|
} else {
|