Browse Source

Merge branch 'iteration-20240914-pdf' into jenkins-main

lex-xin 5 months ago
parent
commit
e6b5a05fe3
2 changed files with 13 additions and 8 deletions
  1. 5 5
      public/osmd/index.html
  2. 8 3
      src/views/accompany/music-detail.tsx

+ 5 - 5
public/osmd/index.html

@@ -113,11 +113,11 @@
         .then(
           function () {
             // 是否合并显示
-            if (!isComberRender) {
-              for (let i = 0; i < osmd.Sheet.Instruments.length; i++) {
-                osmd.Sheet.Instruments[i].Visible = i === partIndex;
-              }
-            }
+            // if (!isComberRender) {
+            //   for (let i = 0; i < osmd.Sheet.Instruments.length; i++) {
+            //     osmd.Sheet.Instruments[i].Visible = i === partIndex;
+            //   }
+            // }
 
             osmd.zoom = .5
             render();

+ 8 - 3
src/views/accompany/music-detail.tsx

@@ -118,13 +118,16 @@ export default defineComponent({
         if (staffData.musicPdfUrl) {
 
           const iframeRef = document.querySelector("#staffIframeRef") as any
-          iframeRef.contentWindow.location.replace( `${location.origin}${
+          iframeRef.contentWindow.location.replace(`${location.origin}${
               location.pathname
             }pdf/web/viewer.html?file=${encodeURIComponent(staffData.musicPdfUrl)}&t=${Date.now()}`);
+            staffData.iframeSrc = `${location.origin}${
+              location.pathname
+            }pdf/web/viewer.html?file=${encodeURIComponent(staffData.musicPdfUrl)}&t=${Date.now()}`
         } else {
           const iframeRef = document.querySelector("#staffIframeRef") as any
           iframeRef.contentWindow.location.replace(`${location.origin}${location.pathname}osmd/index.html`);
-          
+          staffData.iframeSrc = `${location.origin}${location.pathname}osmd/index.html`
         }
       } catch (error) {
         //
@@ -519,7 +522,9 @@ export default defineComponent({
           {downloadStatus.value && (
             <Download
               imgList={JSON.parse(JSON.stringify(showImg.value))}
-              musicSheetName={staffData.details.musicSheetName}
+              musicSheetName={staffData.details.musicSheetName + (staffData.details.musicSheetType === 'CONCERT' && staffData.selectedPartName
+                ? `(${staffData.selectedPartName})`
+                : '')}
             />
           )}
         </Popup>