|
@@ -64,6 +64,7 @@ export default defineComponent({
|
|
setup() {
|
|
setup() {
|
|
const query: any = getQuery();
|
|
const query: any = getQuery();
|
|
const useedid = ref<string[]>([]);
|
|
const useedid = ref<string[]>([]);
|
|
|
|
+ const allNote = ref<any[]>([]);
|
|
const scoreData = reactive({
|
|
const scoreData = reactive({
|
|
videoFilePath: "", // 回放视频路径
|
|
videoFilePath: "", // 回放视频路径
|
|
cadence: 0,
|
|
cadence: 0,
|
|
@@ -259,7 +260,7 @@ export default defineComponent({
|
|
const notes = filterNotes();
|
|
const notes = filterNotes();
|
|
// console.log(1111,notes)
|
|
// console.log(1111,notes)
|
|
for (const note of notes) {
|
|
for (const note of notes) {
|
|
- const active = state.times[note.index];
|
|
|
|
|
|
+ const active = allNote.value[note.musicalNotesIndex];
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
if (useedid.value.includes(active.id)) {
|
|
if (useedid.value.includes(active.id)) {
|
|
return;
|
|
return;
|
|
@@ -362,7 +363,7 @@ export default defineComponent({
|
|
const setPathColor = () => {
|
|
const setPathColor = () => {
|
|
console.log(11111, detailData.musicalNotesPlayStats, scoreData.itemType);
|
|
console.log(11111, detailData.musicalNotesPlayStats, scoreData.itemType);
|
|
for (const note of detailData.musicalNotesPlayStats) {
|
|
for (const note of detailData.musicalNotesPlayStats) {
|
|
- const active = state.times[note.index];
|
|
|
|
|
|
+ const active = allNote.value[note.index];
|
|
const svgEl = active?.id ? document.getElementById("vf-" + active?.id) : null;
|
|
const svgEl = active?.id ? document.getElementById("vf-" + active?.id) : null;
|
|
switch (scoreData.itemType) {
|
|
switch (scoreData.itemType) {
|
|
case "intonation":
|
|
case "intonation":
|
|
@@ -389,8 +390,11 @@ export default defineComponent({
|
|
const handleRendered = (osmd: any) => {
|
|
const handleRendered = (osmd: any) => {
|
|
state.musicRendered = true;
|
|
state.musicRendered = true;
|
|
state.osmd = osmd;
|
|
state.osmd = osmd;
|
|
- state.times = formateTimes(osmd);
|
|
|
|
- console.log("🚀 ~ state.times:", state.times);
|
|
|
|
|
|
+ allNote.value = formateTimes(osmd);
|
|
|
|
+ console.log("🚀 ~ state.times:", allNote.value);
|
|
|
|
+ // @ts-ignore
|
|
|
|
+ const startMeasureNum = detailData.musicalNotesPlayStats?.[0].measureRenderIndex, endMeasureNum = detailData.musicalNotesPlayStats?.last()?.measureRenderIndex;
|
|
|
|
+ allNote.value = allNote.value.filter((item: any) => (item.MeasureNumberXML >= startMeasureNum+1 && item.MeasureNumberXML <= endMeasureNum+1))
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
const beams = Array.from(new Set(document.getElementsByClassName("vf-beam")));
|
|
const beams = Array.from(new Set(document.getElementsByClassName("vf-beam")));
|
|
beams.forEach((item: any) => {
|
|
beams.forEach((item: any) => {
|