Sfoglia il codice sorgente

feat: 评测报告错音修改

TIANYONG 1 anno fa
parent
commit
dfb6bb1195

+ 2 - 2
src/page-instrument/view-evaluat-report/index.module.less

@@ -151,8 +151,8 @@
 .intonation_high,
 .intonation_low{
   path{
-    fill: #977CFF;
-    stroke: #977CFF;
+    fill: #FFAB25;
+    stroke: #FFAB25;
   }
 }
 

+ 3 - 3
src/page-instrument/view-evaluat-report/index.tsx

@@ -232,7 +232,7 @@ export default defineComponent({
 		  const setViewColor = () => {
 			clearViewColor()
 			const notes = filterNotes()
-			//console.log(1111,notes)
+			// console.log(1111,notes)
 			for (const note of notes) {
 			  const active = state.times[note.index]
 			  setTimeout(() => {
@@ -243,7 +243,7 @@ export default defineComponent({
 				const svgEl = document.getElementById('vf-' + active.id)
 				const stemEl = document.getElementById('vf-' + active.id + '-stem')
 				const errType = scoreData.itemType === 'cadence' ? note.rhythmicAssessment.result : note.pitchAssessment.result
-				//console.log(1111222,errType)
+				// console.log(1111222,errType)
 				const isNeedCopyElement = ['HIGH', 'LOW', 'EARLY', 'LATE'].includes(
 				  errType
 				)
@@ -264,7 +264,7 @@ export default defineComponent({
 				  copySvg?.classList.add(colorsClass[errType])
 				  // stemEl?.classList.add(colorsClass.RIGHT)
 				  // @ts-ignore
-				  runtime.osmd?.container.querySelector('svg')!.insertAdjacentElement('afterbegin', copySvg)
+				  state.osmd?.container.querySelector('svg')!.insertAdjacentElement('afterbegin', copySvg)
 				  // svgEl?.parentElement?.appendChild(copySvg)
 				}
 			  }, 300)

+ 12 - 3
src/view/plugins/toggleMusicSheet/choosePartName/index.tsx

@@ -16,12 +16,14 @@ export default defineComponent({
   },
   emits: ['close'],
   setup(props, { emit }) {
+    // #9463 bug,未更换声轨点击确定不应该重新加载,现在会导致切换错误
+    const partIndexChanged = ref(false);
     const { partListNames, partIndex } = toRefs(props)
     const selectIndex = ref((partListNames.value[partIndex.value] as any).value)
     const columns = computed(() => {
       return partListNames.value
     })
-    // console.log(partListNames.value, partIndex.value, selectIndex.value, columns.value, 999999)
+    // console.log(1111,partListNames.value, partIndex.value, selectIndex.value, columns.value, 999999)
     /**
      * 默认选中的
      * picker组件,3.x的版本可以使用defaultIndex,4.x的版本只能使用v-model传递
@@ -46,12 +48,19 @@ export default defineComponent({
           columns={columns.value}
           visibleItemCount={Math.ceil(document.body.clientHeight / 44 / 3)}
           onChange={(row) => {
-            // console.log('选择的索引', row)
+            // console.log(1111,'选择的索引', row)
+            if (!partIndexChanged.value) partIndexChanged.value = true
             selectIndex.value = row.selectedValues[0]
           }}
         />
         <Button class={styles.button} type="primary" round block onClick={() => {
-          emit('close', selectIndex.value)}
+            console.log(1111,selectIndex.value)
+            if (partIndexChanged.value) {
+              emit('close', selectIndex.value)
+            } else {
+              emit('close', partIndex.value)
+            }
+          }
         }>
           确定
         </Button>