浏览代码

Merge branch 'ppt-img-fix'

cxmo 1 年之前
父节点
当前提交
5a5b878658

+ 2 - 2
src/views/ppt_manage/newVersion/components/Cover.vue

@@ -1,8 +1,8 @@
 <template>
-    <div class="flex-column cover" :style="`width:100%;color: ${$parent.pptCoverTextColor||'#fff'};`" v-if="pageInfo">
+    <div class="flex-column cover" :style="`width:100%;height:100%;color: ${$parent.pptCoverTextColor||'#fff'};`" v-if="pageInfo">
         <!-- <img :src="pageInfo.BackgroundImg" class="pptbg" /> -->
         <!-- <img :src="base64Url" class="pptbg" /> -->
-        <img :src="pageInfo.BackgroundImg" class="pptbg"  style="width:100%"/>
+        <img :src="pageInfo.BackgroundImg" class="pptbg"  style="width:100%;height:100%;object-fit: fill !important;"/>
         <div
         style="width:62%; font-size:16px; text-align:center; line-height:1.6;  position:absolute; right:20px; top:50%;zIndex:20;">
         <p :style="`height:5px; marginBottom:21px;`"></p>

+ 2 - 2
src/views/ppt_manage/newVersion/components/CoverEn.vue

@@ -1,6 +1,6 @@
 <template>
-    <div class="flex-column cover" style="width:100%;" v-if="pageInfo">
-        <img :src="pageInfo.BackgroundImg" class="pptbg"  style="width:100%"/>
+    <div class="flex-column cover" style="width:100%;height:100%;" v-if="pageInfo">
+        <img :src="pageInfo.BackgroundImg" class="pptbg"  style="width:100%;height:100%;object-fit: fill !important;"/>
         <div
         :style="`width:62%; font-size:16px; text-align:center; line-height:1.6; color:${$parent.pptCoverTextColor||'#fff'}; position:absolute; right:20px; top:50%;zIndex:20;`">
         <p :style="`height:5px;marginBottom:21px;`"></p>

+ 1 - 1
src/views/ppt_manage/newVersion/components/catalog/pptContent.vue

@@ -320,7 +320,7 @@ export default {
       position:relative;
       width:100%;
       background: url('~@/assets/img/pptnextimg.png') no-repeat center;
-      background-size: cover;
+      background-size: 100%;
       margin-bottom: 20px;
       border: 4px solid transparent;
       .ppt-info{

+ 6 - 4
src/views/ppt_manage/newVersion/pptEnPresent.vue

@@ -39,11 +39,11 @@
           <!-- <div class="image-move" v-if="dragShow" @mousedown.stop="handleMoveStart" ></div> -->
           <div class="ppt-wrap" @wheel.stop="normalMouseWheel">
             <!-- 封面 -->
-            <div class="ppt-item" id="cover" v-if="currentIndex===0">
+            <div class="ppt-item" id="cover" v-if="currentIndex===0" style="background-size:20%;">
               <Cover :pageInfo="coverInfo.page" v-show="coverInfo.page"></Cover>
             </div>
             <!-- 封底 -->
-            <div class="ppt-item" id="back" v-else-if="currentIndex===pageList.length+1">
+            <div class="ppt-item" id="back" v-else-if="currentIndex===pageList.length+1" style="background-size:20%;">
               <img :src="pptBackImage" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
             </div>
             <!-- PPT内容 -->
@@ -97,11 +97,11 @@
         @mousedown.stop="(e)=>{handleMouse('down',e)}" @mouseup="(e)=>{handleMouse('up',e)}" @wheel.stop="normalMouseWheel" @contextmenu="handleContextMenu">
           <div class="ppt-wrap">
             <!-- 封面 -->
-            <div class="ppt-item" id="cover" v-if="currentIndex===0">
+            <div class="ppt-item" id="cover" v-if="currentIndex===0" style="background-size:20%;">
               <Cover :pageInfo="coverInfo.page" v-show="coverInfo.page"></Cover>
             </div>
             <!-- 封底 -->
-            <div class="ppt-item" id="back" v-else-if="currentIndex===pageList.length+1">
+            <div class="ppt-item" id="back" v-else-if="currentIndex===pageList.length+1" style="background-size:20%;">
               <img :src="pptBackImage" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
             </div>
             <!-- PPT内容 -->
@@ -302,6 +302,7 @@ export default {
         this.sheetListHandle(sheetElements);
       }
       this.currentKey = 1
+      this.pptBgImage&&$('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
       this.dataLoading.close();
     },
     //根据id获取ppt数据
@@ -559,6 +560,7 @@ export default {
           $('.fullscreen .ppt-wrap').css('width','1100px')
           $('.ppt-item').css('transform',`scale(1)`)
           this.changeCurrentItem(this.currentItem)
+          $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
         })
       }else{
         this.$nextTick(()=>{

+ 2 - 2
src/views/ppt_manage/newVersion/pptEnPublish.vue

@@ -19,7 +19,7 @@
       <template v-if="loadingAll">
         <div class="ppt-wrap flex-center">
           <!-- 封面 -->
-          <div class="ppt-item" id="cover">
+          <div class="ppt-item" id="cover" style="background-size:20%;">
             <Cover :pageInfo="coverInfo.page"></Cover>
           </div>
           <!-- 内容 -->
@@ -37,7 +37,7 @@
             </component>
           </div>
           <!-- 封底 -->
-          <div class="ppt-item" id="back" v-if="pptBackImage.length">
+          <div class="ppt-item" id="back" v-if="pptBackImage.length" style="background-size:20%;">
             <img :src="pptBackImage" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
           </div>
         </div>

+ 6 - 4
src/views/ppt_manage/newVersion/pptPresent.vue

@@ -39,11 +39,11 @@
           <!-- <div class="image-move" v-if="dragShow" @mousedown.stop="handleMoveStart" ></div> -->
           <div class="ppt-wrap" @wheel.stop="normalMouseWheel">
             <!-- 封面 -->
-            <div class="ppt-item" id="cover" v-if="currentIndex===0">
+            <div class="ppt-item" id="cover" v-if="currentIndex===0" style="background-size:20%;">
               <Cover :pageInfo="coverInfo.page" v-show="coverInfo.page"></Cover>
             </div>
             <!-- 封底 -->
-            <div class="ppt-item" id="back" v-else-if="currentIndex===pageList.length+1">
+            <div class="ppt-item" id="back" v-else-if="currentIndex===pageList.length+1" style="background-size:20%;">
               <img :src="pptBackImage" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
             </div>
             <!-- PPT内容 -->
@@ -97,11 +97,11 @@
         @mousedown.stop="(e)=>{handleMouse('down',e)}" @mouseup="(e)=>{handleMouse('up',e)}" @wheel.stop="normalMouseWheel" @contextmenu="handleContextMenu" >
           <div class="ppt-wrap">
             <!-- 封面 -->
-            <div class="ppt-item" id="cover" v-if="currentIndex===0">
+            <div class="ppt-item" id="cover" v-if="currentIndex===0" style="background-size:20%;">
               <Cover :pageInfo="coverInfo.page" v-show="coverInfo.page"></Cover>
             </div>
             <!-- 封底 -->
-            <div class="ppt-item" id="back" v-else-if="currentIndex===pageList.length+1">
+            <div class="ppt-item" id="back" v-else-if="currentIndex===pageList.length+1" style="background-size:20%;">
               <img :src="pptBackImage" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
             </div>
             <!-- PPT内容 -->
@@ -300,6 +300,7 @@ export default {
         this.sheetListHandle(sheetElements);
       }
       this.currentKey = 1
+      this.pptBgImage&&$('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
       this.dataLoading.close();
     },
     //根据id获取ppt数据
@@ -557,6 +558,7 @@ export default {
           $('.fullscreen .ppt-wrap').css('width','1100px')
           $('.ppt-item').css('transform',`scale(1)`)
           this.changeCurrentItem(this.currentItem)
+          $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
         })
       }else{
         this.$nextTick(()=>{

+ 2 - 2
src/views/ppt_manage/newVersion/pptPublish.vue

@@ -20,7 +20,7 @@
       <template v-if="loadingAll">
         <div class="ppt-wrap flex-center">
           <!-- 封面 -->
-          <div class="ppt-item" id="cover">
+          <div class="ppt-item" id="cover" style="background-size:20%;">
             <Cover :pageInfo="coverInfo.page"></Cover>
           </div>
           <!-- 内容 -->
@@ -38,7 +38,7 @@
             </component>
           </div>
           <!-- 封底 -->
-          <div class="ppt-item" id="back" v-if="pptBackImage.length">
+          <div class="ppt-item" id="back" v-if="pptBackImage.length" style="background-size:20%;">
             <img :src="pptBackImage" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
           </div>
         </div>