Browse Source

Merge branch 'yh319' into debug

ldong 1 month ago
parent
commit
6fa1260b45

+ 8 - 8
src/views/ppt_manage/newVersion/components/catalog/addPptBaseDia.vue

@@ -189,9 +189,9 @@ export default {
         cooperationUsers: [],
         FirstPage:{
           CurrentBackgroundImg: "", 
-          BackCoverImg: "", 
+          ImgUrl: "", 
           CurrentBackgroundImgId: 0, 
-          BackCoverImgId: 0, 
+          BackgroundImgId: 0, 
         }
       },
 
@@ -244,9 +244,9 @@ export default {
         cooperationUsers: [],
         FirstPage:{
           CurrentBackgroundImg: "", 
-          BackCoverImg: "", 
+          ImgUrl: "", 
           CurrentBackgroundImgId: 0, 
-          BackCoverImgId: 0, 
+          BackgroundImgId: 0, 
         }
       }
 
@@ -390,18 +390,18 @@ export default {
       });
     },
 
-    // 获取封列表
+    // 获取封列表
     getBackCoverList(){
       apiSmartReport.pptMaterialList({
           CurrentIndex: 1,
           PageSize: 1000,
-          ImageType: 3,
+          ImageType: 1,
           ImageName: '',
           ConfType: 1
       }).then(res => {
         if(res.Data.List){
-          this.formData.FirstPage.BackCoverImg=res.Data.List[0].Url
-          this.formData.FirstPage.BackCoverImgId=res.Data.List[0].ImageConfId
+          this.formData.FirstPage.ImgUrl=res.Data.List[0].Url
+          this.formData.FirstPage.BackgroundImgId=res.Data.List[0].ImageConfId
         }
       })
     },

+ 24 - 3
src/views/ppt_manage/newVersion/components/selectImage.vue

@@ -14,7 +14,10 @@
                                 <img src="~@/assets/img/icons/fullsreen.png" alt="">
                             </div>
                             <div class="radio-fix">
-                                <el-radio size="medium" v-model="momentChooseId" @change="changeRadio"
+                                <el-radio v-if="imgType != 3" size="medium" v-model="momentChooseId"
+                                    @change="changeRadio" :label="item.ImageConfId"></el-radio>
+                                <el-radio class="backcover-radio" v-else size="medium" v-model="momentChooseId"
+                                    @click.native.prevent="clickRadio(item.ImageConfId)"
                                     :label="item.ImageConfId"></el-radio>
                             </div>
                         </div>
@@ -24,8 +27,8 @@
                 </div>
             </div>
             <div style="margin-top: 20px;display: flex;justify-content:flex-end;padding-right: 40px;">
-                <el-pagination  @current-change="handleCurrentChange"
-                    :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper" :total="total">
+                <el-pagination @current-change="handleCurrentChange" :current-page="page" :page-size="pageSize"
+                    layout="total, prev, pager, next, jumper" :total="total">
                 </el-pagination>
             </div>
             <div style="text-align:center;padding: 30px 0;margin-top: 60px;">
@@ -99,6 +102,19 @@ export default {
                 this.momentChooseUrl = this.list[index].Url
             }
         },
+        // 封底图片选择
+        clickRadio(val) {
+            if (val === this.momentChooseId) {
+                this.momentChooseId = 0
+                this.momentChooseUrl = ''
+            } else {
+                this.momentChooseId = val
+                const index = this.list.findIndex(el => el.ImageConfId == val)
+                if (index > -1) {
+                    this.momentChooseUrl = this.list[index].Url
+                }
+            }
+        },
         //资源库列表
         getImgList() {
             apiSmartReport.pptMaterialList({
@@ -238,5 +254,10 @@ export default {
             display: none;
         }
     }
+
+    .backcover-radio.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
+        -webkit-box-shadow: none !important;
+        box-shadow: none !important;
+    }
 }
 </style>