Procházet zdrojové kódy

Merge branch 'iteration-20240918-pdf' into jenkins-test

lex-xin před 1 měsícem
rodič
revize
e5aed25156
2 změnil soubory, kde provedl 6 přidání a 11 odebrání
  1. 1 0
      public/pdf/web/viewer.css
  2. 5 11
      src/views/co-ai/index.tsx

+ 1 - 0
public/pdf/web/viewer.css

@@ -3366,6 +3366,7 @@ html[dir="rtl"] .treeItemToggler::before {
 #errorWrapper {
   background: none repeat scroll 0 0 rgba(255, 74, 74, 1);
   background: none repeat scroll 0 0 var(--errorWrapper-bg-color);
+  opacity: 0;
   color: rgba(12, 12, 13, 1);
   color: var(--main-color);
   left: 0;

+ 5 - 11
src/views/co-ai/index.tsx

@@ -366,11 +366,6 @@ export default defineComponent({
         const selectTrack = trackList.find((item: any) => item.value === data.selectMusicInstrumentIndex)
         const background = details.background || []
         const selectItem = background.find((item: any) => item.track === selectTrack?.track && item.audioPlayType === "PLAY")
-        // console.log({
-        //   selectItem,
-        //   selectTrack,
-        //   background
-        // }, '11111')
         if(selectItem) {
           if( data.showMusicImg === "first") {
             musicPdfUrl = selectItem.firstPdfUrl
@@ -383,7 +378,6 @@ export default defineComponent({
       }
       data.musicPdfUrl = musicPdfUrl
       if(musicPdfUrl) {
-        console.log(musicPdfUrl, 'musicPdfUrl')
         // data.iframeSrc = `/pdf/web/viewer.html?file=${encodeURIComponent(data.musicPdfUrl)}&t=${Date.now()}`;
         data.iframeSrc = `${location.origin}${location.pathname}pdf/web/viewer.html?file=${encodeURIComponent(data.musicPdfUrl)}&t=${Date.now()}`;
       } else {
@@ -401,7 +395,6 @@ export default defineComponent({
       
 
       console.log('地址', data.iframeSrc);
-      console.log(data.musicPdfUrl, !isMusicImg.value)
     };
 
     const setSearchBox = () => {
@@ -619,7 +612,6 @@ export default defineComponent({
         : [];
       const musicalInstruments =
         data.musics[data.musicIndex]?.musicalInstruments || [];
-      // console.log(canSelectTracks, partListNames);
       const arr = partListNames
         .map((item: any, index: number) => {
           // 该声轨能否被选
@@ -860,7 +852,7 @@ export default defineComponent({
                             placement="bottom-start"
                             showArrow={false}
                             class={styles.subjectListContainer}
-                            onSelect={(item: any) => {
+                            onSelect={async (item: any) => {
                               data.audioPlayTypeList.forEach((c: any) => {
                                 c.className = '';
                                 if (c.value === item.value) {
@@ -871,7 +863,9 @@ export default defineComponent({
                                 ...item,
                                 className: 'selected'
                               };
-                              handleReset();
+                              await handleReset();
+                              await analyzeXml();
+                              musicIframeLoad();
                             }}>
                             {{
                               reference: () => (
@@ -1158,7 +1152,7 @@ export default defineComponent({
                 </Popover>
               )}
 
-              {!isEnsemble.value && isMusicImg.value && (
+              {!isEnsemble.value && (isMusicImg.value || data.musicPdfUrl) && (
                 <img id="coai-2" src={icon_down} onClick={handleSave} />
               )}
               {data.musics[data.musicIndex]?.id && (