瀏覽代碼

Merge branch 'feature-tianyong-newVersion' of http://git.dayaedu.com/liushengqiang/music-score into hqyDevNewVersion

黄琪勇 11 月之前
父節點
當前提交
6f75e0fe28

+ 1 - 1
osmd-extended

@@ -1 +1 @@
-Subproject commit 819ccbde325ae4cff71a819534853c83520372b1
+Subproject commit bab1ca04065946e20f10fa1aacdb0c25b533a6f2

+ 2 - 0
src/page-instrument/component/authorName/index.module.less

@@ -1,5 +1,7 @@
 .authorName{
     height: 1.8rem;
+    position: relative;
+    top: 36px;
 }
 .title{
     width: 280px;

+ 1 - 1
src/page-instrument/component/authorName/index.tsx

@@ -15,7 +15,7 @@ export default defineComponent({
       return () => (
          <>
             {
-               !smoothAnimationState.isShow.value && 
+               !smoothAnimationState.isShow.value && !state.isCombineRender && 
                <div class={["authorName", styles.authorName]}>
                   <div class={styles.title}>
                      <NoticeBar text={state.examSongName} background="none" />

二進制
src/page-instrument/evaluat-model/evaluat-result/img/arrow_icon.png


+ 7 - 6
src/page-instrument/evaluat-model/evaluat-result/index.module.less

@@ -221,13 +221,14 @@
     .arrowIcon {
       position: absolute;
       left: 50%;
-      bottom: -8PX;
+      bottom: -9PX;
       transform: translateX(-50%);
-      width: 0;
-      height: 0;
-      border-top: 8PX solid rgba(0,0,0,0.7);
-      border-right: 8PX solid transparent;
-      border-left: 8PX solid transparent;  
+      width: 13Px;
+      height: 9Px;
+      background-image: url('./img/arrow_icon.png');
+      background-size: 100% 100%;
+      background-position: center center;
+      background-repeat: no-repeat;
       z-index: 2;      
     }
 }

+ 2 - 2
src/page-instrument/header-top/index.tsx

@@ -584,7 +584,7 @@ export default defineComponent({
     const noticeBarWidth = ref<number>()
     watch(()=>smoothAnimationState.isShow.value, ()=>{
       // NoticeBar能不能滚动
-      if(smoothAnimationState.isShow.value && isMusicList.value){
+      if((smoothAnimationState.isShow.value || state.isCombineRender) && isMusicList.value){
         nextTick(()=>{
           const widthCon = (document.querySelector("#noticeBarRollDom .van-notice-bar__content") as any)?.offsetWidth || undefined
           noticeBarWidth.value = widthCon
@@ -646,7 +646,7 @@ export default defineComponent({
               <div id="noticeBarRollDom" class={styles.headTopLeftBox}>
                 <img src={iconBack} class={['headTopBackBtn', styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
                 {
-                  smoothAnimationState.isShow.value ?
+                  smoothAnimationState.isShow.value || state.isCombineRender ?
                     <div 
                       style={
                         noticeBarWidth.value ? {

+ 8 - 5
src/page-instrument/header-top/modeView.tsx

@@ -126,11 +126,14 @@ export default defineComponent({
         </div>
         {data.showVip && <TheVip />}
         {/** 延迟检测中途,socket出错,网络提示弹窗 */}
-        <div>
-            <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale", evaluatingData.socketErrorStatus === 2 && styles.socketErrorStatus]} transition="van-scale" v-model:show={evaluatingData.socketErrorPop} overlay-style={evaluatingData.socketErrorStatus === 2?{ background: "initial" }:{}}>
-              <AbnormalPop onConfirm={hanldeConfirmPop} onClose={hanldeClosePop} />
-            </Popup>
-        </div>         
+        {/* {
+          state.modeType !== 'evaluating' && 
+          <div>
+              <Popup teleport="body" closeOnClickOverlay={false} class={["popup-custom", "van-scale", evaluatingData.socketErrorStatus === 2 && styles.socketErrorStatus]} transition="van-scale" v-model:show={evaluatingData.socketErrorPop} overlay-style={evaluatingData.socketErrorStatus === 2?{ background: "initial" }:{}}>
+                <AbnormalPop onConfirm={hanldeConfirmPop} onClose={hanldeClosePop} />
+              </Popup>
+          </div>            
+        } */}
       </div>
     );
   },

+ 4 - 0
src/page-instrument/view-detail/index.module.less

@@ -67,6 +67,10 @@
         transition: padding-bottom .2s;
         overflow: hidden;
     }
+    .multiContainer {
+        top: 0;
+        height: calc(100vh);
+    }
     .pcContainer {
         // height: calc(100vh - var(--header-height) - var(--pc-header-height));
     }

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

@@ -499,7 +499,7 @@ export default defineComponent({
         <div
           id="scrollContainer"
           style={{ ...fingerConfig.value.container }}
-          class={[styles.container, !state.setting.displayCursor && "hideCursor", browsInfo.xiaomi && styles.xiaomi, state.platform === IPlatform.PC && styles.pcContainer]}
+          class={[styles.container, !state.setting.displayCursor && "hideCursor", browsInfo.xiaomi && styles.xiaomi, state.platform === IPlatform.PC && styles.pcContainer, (!state.isSingleLine || state.isCombineRender) && styles.multiContainer]}
           onClick={(e: Event) => {
             e.stopPropagation();
             // if (state.playState === "play" && state.platform != IPlatform.PC) {

+ 1 - 0
src/page-instrument/view-detail/smoothAnimation/index.less

@@ -26,6 +26,7 @@
     }
     .authorName{
         position: fixed;
+        // position: absolute;
         left: 0;
         top: 36px;
         width: 100vw;

+ 1 - 1
src/view/evaluating/index.module.less

@@ -33,5 +33,5 @@
 }
 
 .socketErrorStatus{
-    top: 10vh;
+    top: 20vh;
 }

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

@@ -505,6 +505,7 @@ export const subjectFingering = (subjectId: number | string): IFingering => {
         hasTizhi: false,
         id: 39,
       };
+    case 137: // 口风琴
     case "melodica": // 口风琴
       return {
         name: "melodica",

二進制
src/view/selection/imgs/arrow_icon.png


+ 7 - 6
src/view/selection/index.module.less

@@ -186,13 +186,14 @@
         content: "";
         position: absolute;
         left: 50%;
-        bottom: -7PX;
+        bottom: -8PX;
         transform: translateX(-50%);
-        width: 0;
-        height: 0;
-        border-top: 8PX solid rgba(0,0,0,0.6);
-        border-right: 8PX solid transparent;
-        border-left: 8PX solid transparent;  
+        width: 13Px;
+        height: 9Px;
+        background-image: url('./imgs/arrow_icon.png');
+        background-size: 100% 100%;
+        background-position: center center;
+        background-repeat: no-repeat;
         z-index: 2;    
     }
 }

+ 44 - 12
src/view/selection/index.tsx

@@ -145,19 +145,51 @@ const calcNoteData = () => {
 				MeasureNumberXMLList.push(item.MeasureNumberXML);
 			} else {
 				if (item.multipleRestMeasures) {
-					const preItem = selectData.staves.find(
-						(n: any) => n.MeasureNumberXML === item.MeasureNumberXML - 1
-					);
-					if (preItem?.staveBox) {
-						noteItem.staveBox = {
-							left: preItem.staveBox.left,
-							top: preItem.staveBox.top,
-							width: preItem.staveBox.width,
-							// height: preItem.staveBox.height,
-						};
-						selectData.staves.push(noteItem);
-						MeasureNumberXMLList.push(item.MeasureNumberXML);
+					console.log(111111)
+					if (state.isCombineRender) {
+						state.vfmeasures.forEach((item: any, idx: number) => {
+							const measureNum = item.getAttribute('data-num') ? Number(item.getAttribute('data-num')) : -1;
+							
+						})
+						let currentItem = null;
+						for (let index = 0; index < state.vfmeasures.length; index++) {
+							const element = state.vfmeasures[index];
+							const measureNum = element.getAttribute('data-num') ? Number(element.getAttribute('data-num')) : -1;
+							if (measureNum === item.MeasureNumberXML) {
+								currentItem = element
+								break;
+							}
+							
+						}
+						const staveBbox = currentItem?.querySelector('.vf-stave')?.getBoundingClientRect() || { x: 0, width: 0, y: 0, height: 0 };
+						if (currentItem) {
+							noteItem.staveBox = {
+								left: staveBbox.x - parentLeft + "px",
+								// top: ((item.stave.y || 0) - 5) * state.zoom + "px",
+								top: staveBbox.y - parentTop  + "px",
+								width: staveBbox.width + "px",
+								height: staveBbox.height + "px",
+								// height: preItem.staveBox.height,
+							};
+							selectData.staves.push(noteItem);
+							MeasureNumberXMLList.push(item.MeasureNumberXML);
+						}
+					} else {
+						const preItem = selectData.staves.find(
+							(n: any) => n.MeasureNumberXML === item.MeasureNumberXML - 1
+						);
+						if (preItem?.staveBox) {
+							noteItem.staveBox = {
+								left: preItem.staveBox.left,
+								top: preItem.staveBox.top,
+								width: preItem.staveBox.width,
+								// height: preItem.staveBox.height,
+							};
+							selectData.staves.push(noteItem);
+							MeasureNumberXMLList.push(item.MeasureNumberXML);
+						}
 					}
+
 				}
 			}
 		}