Browse Source

Merge branch 'gn2.6'

ldong 2 months ago
parent
commit
a36bd02b14
25 changed files with 886 additions and 169 deletions
  1. 21 0
      src/api/modules/smartReport.js
  2. 8 0
      src/lang/modules/Slides/pptPresent.js
  3. 14 2
      src/lang/modules/systemManage/BaseConfig.js
  4. 12 1
      src/utils/buttonConfig.js
  5. 13 4
      src/views/chartRelevance_manage/components/saveChartSetting.vue
  6. 19 13
      src/views/dataEntry_manage/addChart.vue
  7. 18 10
      src/views/dataEntry_manage/chartSetting.vue
  8. 10 2
      src/views/dataEntry_manage/components/chartSourceEditDialog.vue
  9. 7 0
      src/views/dataEntry_manage/components/markersSection.vue
  10. 19 11
      src/views/dataEntry_manage/editChart.vue
  11. 1 1
      src/views/datasheet_manage/customSheetEdit.vue
  12. 1 1
      src/views/datasheet_manage/mixedSheetEdit.vue
  13. 14 2
      src/views/intervalAnalysis/components/chartSetWrap.vue
  14. 12 2
      src/views/ppt_manage/mixins/pptMixins.js
  15. 50 3
      src/views/ppt_manage/newVersion/components/catalog/addPptBaseDia.vue
  16. 21 2
      src/views/ppt_manage/newVersion/components/catalog/mergePPTDialog.vue
  17. 21 6
      src/views/ppt_manage/newVersion/components/editor/ChooseCoverNew.vue
  18. 44 18
      src/views/ppt_manage/newVersion/components/formatEl/ChartEl.vue
  19. 13 9
      src/views/ppt_manage/newVersion/components/formatEl/SheetEl.vue
  20. 242 0
      src/views/ppt_manage/newVersion/components/selectImage.vue
  21. 79 13
      src/views/ppt_manage/newVersion/pptEditor.vue
  22. 7 7
      src/views/ppt_manage/newVersion/pptPresent.vue
  23. 8 7
      src/views/ppt_manage/newVersion/pptPublish.vue
  24. 221 51
      src/views/system_manage/components/smartReportImgSet.vue
  25. 11 4
      src/views/system_manage/etaBaseConfig.vue

+ 21 - 0
src/api/modules/smartReport.js

@@ -82,12 +82,33 @@ const apiSmartReport={
     imgReourceList:params=>{
         return http.get('/smart_report/resource/list',params)
     },
+    
 
     //新增资源库图片
     imgReourceAdd:params=>{
         return http.post('/smart_report/resource/add',params)
     },
 
+    //根据条件查询ppt图片素材
+    pptMaterialList:params=>{
+        return http.get('/image_conf/get/image/material',params)
+    },
+
+    //新增图片素材
+    pptAddMaterial:params=>{
+        return http.post('/image_conf/add/image/material',params)
+    },
+
+    //删除图片素材
+    pptDeleteMaterial:params=>{
+        return http.post('/image_conf/delete/image/material',params)
+    },
+
+    //修改图片素材
+    pptEditMaterial:params=>{
+        return http.post('/image_conf/edit/image/material',params)
+    },
+
     // //资源库图片重命名
     // imgReourceRename:params=>{
     //     return http.post('/smart_report/resource/rename',params)

+ 8 - 0
src/lang/modules/Slides/pptPresent.js

@@ -11,6 +11,10 @@ export const presentEn = {
   return_to_list: "Return to list",
   default_publish: " Publish",
   select_cover_page: "Select cover page",
+  select_ground_page: "Replace background image",
+  select_back_page: "Replace the back cover image",
+  more_cover_page: "More templates for cover images",
+  more_templates:'More templates',
   operating_instructions: "Operating instructions",
   click_to_input_title: "Click to input title",
   update_chart_btn: "Update chart",
@@ -116,6 +120,10 @@ export const presentZh = {
   return_to_list: "返回列表",
   default_publish: "(默认)发布",
   select_cover_page: "选择封面页",
+  select_ground_page: "更换背景图",
+  select_back_page: "更换封底图",
+  more_cover_page: "封面图更多模板",
+  more_templates: "更多模板",
   operating_instructions: "操作说明",
   click_to_input_title: "单击输入标题",
   update_chart_btn: "更新图表",

+ 14 - 2
src/lang/modules/systemManage/BaseConfig.js

@@ -57,6 +57,10 @@ export const BaseConfigEn = {
     resource_placeholder03:'Please upload Image',
     resource_type01:'Header',
     resource_type02:'Footer',
+    ppt_type01:'Cover Image',
+    ppt_type02:'Background Image',
+    ppt_type03:'Back Cover Image',
+    ppt_btn02:'Edit Image',
     resource_btn01:'Upload Image',
     resource_btn02:'Rename',
     resource_btn03:'Deselect/Deselect All',
@@ -73,13 +77,15 @@ export const BaseConfigEn = {
     edit_layout:"Edit Layout",
     completed_step:"Completed Step",
     text_style:"Text Style",
-    smart_layout_resource_library:"Intelligent Research Report Template Library",
+    smart_layout_resource_library:"Intelligent Research Report Layout",
+    ppt_resource_library:"PPT Material Library",
     style_font_w_normal:'normal',
     style_font_w_bold:'body',
     style_text_align_left:'left',
     style_text_align_center:'center',
     style_text_align_right:'right',
     upload_suggest:'Supports formats like jpg, jpeg, png, etc. It is recommended to upload headers of 800*200 and footers of 800*80',
+    upload_ppt_suggest:'Supports formats like jpg, jpeg, png, etc.',
     resource_del_msg:'Are you sure to delete the selected image?',
 
     tip_msg01:'Save successful, please check the corresponding page/project later',
@@ -162,6 +168,10 @@ export const BaseConfigZh = {
     resource_placeholder03:'请上传图片',
     resource_type01:'版头',
     resource_type02:'版尾',
+    ppt_type01:'封面图',
+    ppt_type02:'背景图',
+    ppt_type03:'封底图',
+    ppt_btn02:'编辑图片',
     resource_btn01:'上传图片',
     resource_btn02:'重命名',
     resource_btn03:'取消选择',
@@ -178,7 +188,8 @@ export const BaseConfigZh = {
     edit_layout:"编辑版图",
     completed_step:"已完成步骤",
     text_style:"文字样式",
-    smart_layout_resource_library:"智能研报版图资源库",
+    smart_layout_resource_library:"智能研报版图",
+    ppt_resource_library:"PPT素材库",
     // 样式
     style_font_w_normal:'常规体',
     style_font_w_bold:'加粗体',
@@ -186,6 +197,7 @@ export const BaseConfigZh = {
     style_text_align_center:'居中',
     style_text_align_right:'居右',
     upload_suggest:'支持jpg、jpeg、png等格式,建议上传版头800*200,版尾800*80',
+    upload_ppt_suggest:'支持jpg、jpeg、png等格式',
     resource_del_msg:'是否确认删除选中图片?',
 
     tip_msg01:'保存成功,请稍后到对应页面/项目查看',

+ 12 - 1
src/utils/buttonConfig.js

@@ -431,6 +431,7 @@ export const chartLibPermission = {
     chartLib_uploadToForum:'chartLib:uploadToForum',//上传至社区
     chartLib_updateToForum:'chartLib:updateToForum',//同步至社区
     chartLib_withdrawfromForum:'chartLib:withdrawfromForum',//从社区撤回
+    chartLib_sourceEdit:'chartLib:sourceEdit',//编辑数据来源
 }
 
 /*
@@ -495,6 +496,7 @@ export const etaTablePermission = {
     etaTable_customize_mix_download:'etaTable:customize:mix:download',//下载
     etaTable_customize_mix_save:'etaTable:customize:mix:save',//保存
     etaTable_customize_mix_del:'etaTable:customize:mix:del',//删除
+    etaTable_customize_mix_source_edit:'etaTable:customize:mix:classifyOpt:sourceEdit',//编辑数据来源
 
     //数据表格页面
     etaTable_customize_data_sheetAdd: 'etaTable:customize:data:sheetAdd',//添加数据表格按钮
@@ -506,6 +508,7 @@ export const etaTablePermission = {
     etaTable_customize_data_download:'etaTable:customize:data:download',//下载
     etaTable_customize_data_del:'etaTable:customize:data:del',//删除
     etaTable_customize_data_save:'etaTable:customize:data:save',//保存
+    etaTable_customize_data_sourceEdit:'etaTable:customize:data:classifyOpt:sourceEdit',//编辑数据来源
 
     /*-----------excel表格页面--------- */
     etaTable_excel:'etaTable:excel',//添加Excel表格这个按钮显示不显示
@@ -621,6 +624,7 @@ export const statisticPermission = {
     corrAnalysis_classifyOpt_edit:'corrAnalysis:classifyOpt:edit',//添加/编辑分类
     corrAnalysis_classifyOpt_delete:'corrAnalysis:classifyOpt:delete',//删除分类
     corrAnalysis_classifyOpt_move:'corrAnalysis:classifyOpt:move',//移动分类
+    corrAnalysis_source_edit:'corrAnalysis:sourceEdit',//编辑数据来源
         /*---图表操作栏--- */
     corrAnalysis_del:'corrAnalysis:del',
     corrAnalysis_enNameSetting:'corrAnalysis:enNameSetting',
@@ -688,6 +692,7 @@ export const statisticPermission = {
     rangeAnalysis_classifyOpt_edit:'rangeAnalysis:classifyOpt:edit',//添加编辑分类
     rangeAnalysis_classifyOpt_delete:'rangeAnalysis:classifyOpt:delete',//删除分类
     rangeAnalysis_classifyOpt_move:'rangeAnalysis:classifyOpt:move',//删除分类
+    rangeAnalysis_source_edit:'rangeAnalysis:sourceEdit',//编辑数据来源
     /*---图表操作栏--- */
     rangeAnalysis_del:'rangeAnalysis:del',
     rangeAnalysis_copyWechat:'rangeAnalysis:copyWechat',
@@ -827,8 +832,14 @@ export const baseConfigPermission = {
     etaBaseConfig_biApprove:'etaBaseConfig:biApprove',//BI看板审批
     etaBaseConfig_login:'baseSetting:loginSetting',//登录
     etaBaseConfig_watermark_ybShare:'etaBaseConfig:watermark:ybShare',//如果没权限,表单不显示也不校验
-    etaBaseConfig_source_see:'baseSetting:sourceSetting:see',//资源库查看
+    etaBaseConfig_source_see:'baseSetting:sourceSetting:see',//资源库版图查看
     etaBaseConfig_source_upload:'baseSetting:sourceSetting:upload',//资源库上传
+    etaBaseConfig_source_edit:'baseSetting:sourceSetting:edit',//资源库编辑
+    etaBaseConfig_source_del:'baseSetting:sourceSetting:del',//资源库删除
+    etaBaseConfig_source_ppt_upload:'pptMaterial:upload',//资源库ppt上传
+    etaBaseConfig_source_ppt_see:'pptMaterial:find',//资源库ppt查看
+    etaBaseConfig_source_ppt_edit:'pptMaterial:edit',//资源库ppt编辑
+    etaBaseConfig_source_ppt_del:'pptMaterial:delete',//资源库ppt删除
     // 登录设置
     etaBaseConfig_login_systemLogo_mobile:'baseSetting:loginSetting:systemLogo:mobile',//系统logo移动端
     etaBaseConfig_login_systemLogo_pc:'baseSetting:loginSetting:systemLogo:pc',//系统logoPC端

+ 13 - 4
src/views/chartRelevance_manage/components/saveChartSetting.vue

@@ -15,7 +15,7 @@
                 label-width="100px"
                 ref="settingForm">
                 <el-form-item label="图表名称">
-                    <el-input v-model="settingData.chartName"></el-input>
+                    <el-input style="width: 250px;" v-model="settingData.chartName"></el-input>
                 </el-form-item>
                 <el-form-item label="图例名称" style="margin-bottom: 0;">
                 </el-form-item>
@@ -27,13 +27,15 @@
                                 size="mini"
                                 show-alpha
                                 :predefine="predefineColors"/>
-                            <el-input v-model="data.Name"></el-input>
+                            <el-input style="width: 250px;" v-model="data.Name"></el-input>
                         </div>
                     </div>
                 </el-form-item>
                 <el-form-item label="数据来源">
-                    <el-input v-model="settingData.SourcesFrom.text"></el-input>
-                    <el-switch v-model="settingData.SourcesFrom.isShow"></el-switch>
+                    <div class="flex-align">
+                        <el-input :disabled="!permissionBtn.checkPermissionBtn(permissionBtn.statisticPermission.corrAnalysis_source_edit)" :autosize="{ minRows: 2, maxRows: 4}" style="width: 250px;margin-right: 5px;" type="textarea" maxlength="50" show-word-limit v-model="settingData.SourcesFrom.text"></el-input>
+                        <el-switch v-model="settingData.SourcesFrom.isShow"></el-switch>
+                    </div>
                 </el-form-item>
             </el-form>
         </div>
@@ -107,5 +109,12 @@ export default {
         text-align:center;
         margin:30px 0 20px 0;
     }
+    .flex-align{
+        display: flex;
+        align-items: center;
+        .el-textarea .el-input__count{
+            background: transparent;
+        }
+    }
 }
 </style>

+ 19 - 13
src/views/dataEntry_manage/addChart.vue

@@ -549,7 +549,17 @@
 						</div>
 
 						<div class="chart-bottom-insruction-info">
-
+							
+							<!-- 图表说明 -->
+							<div 
+								class="chart-instruction" 
+								v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
+								v-text="JSON.parse(chartInfo.Instructions).text"
+								:style="`
+									color: ${JSON.parse(chartInfo.Instructions).color};
+									fontSize: ${ JSON.parse(chartInfo.Instructions).fontSize }px
+								`"
+							></div>
 							<div class="chart-source">
 								<span
 									v-if="chartInfo.SourcesFrom"
@@ -568,7 +578,7 @@
 									style="margin:0 15px;"
 									@change="changeSourceVisable"
 								/>
-								<span class="editsty" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Chart.chart_edit_btn')}}</span>
+								<span class="editsty" v-if="permissionBtn.checkPermissionBtn(permissionBtn.chartLibPermission.chartLib_sourceEdit)" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Chart.chart_edit_btn')}}</span>
 							</div>
 
 							<!-- 是否堆积 -->
@@ -599,17 +609,6 @@
 								<el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
 								<el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
 							</el-radio-group>
-
-							<!-- 图表说明 -->
-							<div 
-								class="chart-instruction" 
-								v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
-								v-text="JSON.parse(chartInfo.Instructions).text"
-								:style="`
-									color: ${JSON.parse(chartInfo.Instructions).color};
-									fontSize: ${ JSON.parse(chartInfo.Instructions).fontSize }px
-								`"
-							></div>
 						</div>
 
 
@@ -1342,6 +1341,13 @@ export default {
 			}
 		}
 	}
+	.chart-bottom-insruction-info{
+		display:block;
+		.chart-instruction{
+			margin-bottom:16px;
+			width:auto;
+		}
+	}
 }
 </style>
 <style lang="scss">

+ 18 - 10
src/views/dataEntry_manage/chartSetting.vue

@@ -510,6 +510,17 @@
                       ><!-- 作者 -->{{$t('Chart.Detail.author')}}:{{ chartInfo.SysUserRealName || '' }}</span
                     >
 
+                    <!-- 图表说明 -->
+                    <div 
+                        class="chart-instruction" 
+                        v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
+                        v-text="JSON.parse(chartInfo.Instructions).text"
+                        :style="`
+                          color: ${JSON.parse(chartInfo.Instructions).color};
+                          fontSize: ${ JSON.parse(chartInfo.Instructions).fontSize }px
+                        `"
+                      ></div>
+
                     <div class="chart-bottom-insruction-info">
 
                       <div class="chart-source" >
@@ -533,16 +544,6 @@
                         <el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
                       </el-radio-group>
 
-                      <!-- 图表说明 -->
-                      <div 
-                        class="chart-instruction" 
-                        v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
-                        v-text="JSON.parse(chartInfo.Instructions).text"
-                        :style="`
-                          color: ${JSON.parse(chartInfo.Instructions).color};
-                          fontSize: ${ JSON.parse(chartInfo.Instructions).fontSize }px
-                        `"
-                      ></div>
                     </div>
                     
                   </div>
@@ -3128,6 +3129,13 @@ export default {
       z-index: -100;
     }
   }
+  .chart-bottom-insruction-info{
+		display:block;
+		.chart-instruction{
+			margin-bottom:16px;
+			width:auto;
+		}
+	}
 
 }
 </style>

+ 10 - 2
src/views/dataEntry_manage/components/chartSourceEditDialog.vue

@@ -19,6 +19,10 @@
       >
         <el-form-item :label="$t('Edb.Detail.source')">
           <el-input
+            :autosize="{ minRows: 2, maxRows: 4}"
+            type="textarea"
+            maxlength="50"
+            show-word-limit
             v-model="chartSourceForm.text"
             :placeholder="$t('Chart.InputHolderAll.input_content')"
           />
@@ -100,6 +104,10 @@ export default {
   },
 }
 </script>
-<style scoped lang='scss'>
-
+<style lang='scss'>
+.marker-edit-dialog{
+  .el-textarea .el-input__count{
+    background: transparent;
+  }
+}
 </style>

+ 7 - 0
src/views/dataEntry_manage/components/markersSection.vue

@@ -202,6 +202,10 @@
         >
           <el-form-item :label="$t('Chart.Detail.chart_intru')">
             <el-input
+              :autosize="{ minRows: 2, maxRows: 5}"
+              type="textarea"
+              maxlength="100"
+              show-word-limit
               v-model="chartInductionDiaForm.text"
               :placeholder="$t('Chart.InputHolderAll.input_content')"
             />
@@ -541,5 +545,8 @@ export default {
       align-items: center;
     }
   }
+  .marker-edit-dialog .el-textarea .el-input__count{
+    background: transparent;
+  }
 }
 </style>

+ 19 - 11
src/views/dataEntry_manage/editChart.vue

@@ -556,6 +556,17 @@
 
 						<div class="chart-bottom-insruction-info">
 
+							<!-- 图表说明 -->
+							<div 
+								class="chart-instruction" 
+								v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
+								v-text="JSON.parse(chartInfo.Instructions).text"
+								:style="`
+									color: ${JSON.parse(chartInfo.Instructions).color};
+									fontSize: ${ JSON.parse(chartInfo.Instructions).fontSize }px
+								`"
+							></div>
+
 							<div class="chart-source">
 									<span
 										v-if="chartInfo.SourcesFrom"
@@ -572,7 +583,7 @@
 									style="margin:0 15px;"
 									@change="changeSourceVisable"
 								/>
-								<span class="editsty" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Chart.chart_edit_btn')}}</span>
+								<span class="editsty" v-if="permissionBtn.checkPermissionBtn(permissionBtn.chartLibPermission.chartLib_sourceEdit)" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Chart.chart_edit_btn')}}</span>
 							</div>
 
 							<!-- 是否堆积 -->
@@ -603,16 +614,6 @@
 								<el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
 							</el-radio-group>
 
-							<!-- 图表说明 -->
-							<div 
-								class="chart-instruction" 
-								v-if="chartInfo.Instructions&&JSON.parse(chartInfo.Instructions).isShow"
-								v-text="JSON.parse(chartInfo.Instructions).text"
-								:style="`
-									color: ${JSON.parse(chartInfo.Instructions).color};
-									fontSize: ${ JSON.parse(chartInfo.Instructions).fontSize }px
-								`"
-							></div>
 						</div>
 
 						<span class="chart-author"><!-- 作者 -->{{$t('Chart.Detail.author')}}:{{ chartInfo.SysUserRealName }}</span>
@@ -1471,6 +1472,13 @@ export default {
 			}
 		}
 	}
+	.chart-bottom-insruction-info{
+		display:block;
+		.chart-instruction{
+			margin-bottom:16px;
+			width:auto;
+		}
+	}
 }
 </style>
 <style lang="scss">

+ 1 - 1
src/views/datasheet_manage/customSheetEdit.vue

@@ -98,7 +98,7 @@
         style="margin:0 15px;"
         @change="(e) => {sheetSourceFrom.isShow=e,sheetForm.SourcesFrom=JSON.stringify(sheetSourceFrom)}"
       />
-      <span class="editsty" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Common.edit_btn')}}</span>
+      <span class="editsty" v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_data_sourceEdit)" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Common.edit_btn')}}</span>
     </div>
 
     <!-- 数据来源编辑弹窗 -->

+ 1 - 1
src/views/datasheet_manage/mixedSheetEdit.vue

@@ -67,7 +67,7 @@
         style="margin:0 15px;"
         @change="(e) => {sheetSourceFrom.isShow=e,sheetForm.SourcesFrom=JSON.stringify(sheetSourceFrom)}"
       />
-      <span class="editsty" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Common.edit_btn')}}</span>
+      <span class="editsty" v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_mix_source_edit)" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Common.edit_btn')}}</span>
     </div>
 
     <!-- 数据来源编辑弹窗 -->

+ 14 - 2
src/views/intervalAnalysis/components/chartSetWrap.vue

@@ -82,8 +82,10 @@
           </div>
         </div>
         <el-form-item :label="$t('Edb.Detail.source')" prop="source">
-          <el-input v-model="formData.source" style="width:80%"></el-input>
-          <el-switch v-model="formData.showSource"></el-switch>
+          <div class="flex-align">
+            <el-input :disabled="!permissionBtn.checkPermissionBtn(permissionBtn.statisticPermission.rangeAnalysis_source_edit)" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" maxlength="50" show-word-limit v-model="formData.source" style="width:80%;margin-right: 5px;"></el-input>
+            <el-switch v-model="formData.showSource"></el-switch>
+          </div>
         </el-form-item>
       </el-form>
       <div class="dia-bot">
@@ -238,4 +240,14 @@ div{
     text-align: center;
   }
 }
+</style>
+
+<style lang="scss">
+.flex-align{
+  display: flex;
+  align-items: center;
+  .el-textarea .el-input__count{
+      background: transparent;
+  }
+}
 </style>

+ 12 - 2
src/views/ppt_manage/mixins/pptMixins.js

@@ -182,7 +182,7 @@ export default {
                EnPptCoverImgs,EnPptBackgroundImg,EnPptBottomImg,PptCompanyNameEn,PptTeamNameEn,PptFontColorEn,EnPptSheetSize
               } = res.Data
         if(this.currentLang==='en'){
-            this.pptCoverList = EnPptCoverImgs.split(',')
+            // this.pptCoverList = EnPptCoverImgs.split(',')
             this.pptBgImage = EnPptBackgroundImg
             this.pptBackImage = EnPptBottomImg
             this.pptCoverCompenyName = PptCompanyNameEn
@@ -190,7 +190,7 @@ export default {
             this.pptCoverTextColor = PptFontColorEn
             this.pptSheetSize = EnPptSheetSize
         }else{
-            this.pptCoverList = CnPptCoverImgs.split(',')
+            // this.pptCoverList = CnPptCoverImgs.split(',')
             this.pptBgImage = CnPptBackgroundImg
             this.pptBackImage = CnPptBottomImg
             this.pptCoverCompenyName = PptCompanyName
@@ -210,6 +210,11 @@ export default {
             Title,
             ReportType,
             BackgroundImg,
+            CurrentBackgroundImg,
+            BackCoverImg,
+            BackCoverImgId,
+            BackgroundImgId,
+            CurrentBackgroundImgId,
             PptDate,
             TemplateType,
             ReportId,
@@ -244,7 +249,12 @@ export default {
                 ReportType,
                 BackgroundImg,
                 PptDate: pptDate,
+                CurrentBackgroundImg,
+                BackCoverImg,
                 TemplateType,
+                BackCoverImgId,
+                BackgroundImgId,
+                CurrentBackgroundImgId,
             },
             ReportId,
             ModifyTime,

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

@@ -131,6 +131,7 @@
 import { pptInterface } from '@/api/api.js';
 import chooseCooperaUserDia from '@/views/report_manage/reportV2/components/chooseCooperaUserDia.vue';
 import chooseInherReportDia from '@/views/report_manage/reportV2/components/chooseInherReportDia.vue';
+import { apiSmartReport } from '@/api/modules/smartReport'
 export default {
   name: "BaseInfo",
   components: { chooseCooperaUserDia,chooseInherReportDia },
@@ -156,6 +157,8 @@ export default {
       if (!n) return
       
       this.getclassifylist();
+      this.getBackCoverList()
+      this.getBackGroundList()
       
       if (this.reportInfo) {
           this.formData = {
@@ -183,7 +186,13 @@ export default {
         classify: 0,
         title: "",
         cooperationType: 1,//协作方式
-        cooperationUsers: []
+        cooperationUsers: [],
+        FirstPage:{
+          CurrentBackgroundImg: "", 
+          BackCoverImg: "", 
+          CurrentBackgroundImgId: 0, 
+          BackCoverImgId: 0, 
+        }
       },
 
       classifyArr: [],
@@ -232,7 +241,13 @@ export default {
         classify: 0,
         title: "",
         cooperationType: 1,//协作方式
-        cooperationUsers: []
+        cooperationUsers: [],
+        FirstPage:{
+          CurrentBackgroundImg: "", 
+          BackCoverImg: "", 
+          CurrentBackgroundImgId: 0, 
+          BackCoverImgId: 0, 
+        }
       }
 
       this.$emit("update:show", false);
@@ -247,7 +262,8 @@ export default {
         Title: this.formData.title,
         CollaborateType: this.formData.cooperationType,
         InheritPptId: this.formData.inheritId,
-        CollaborateUserIds: this.formData.cooperationUsers.map(_ => _.NodeId)
+        CollaborateUserIds: this.formData.cooperationUsers.map(_ => _.NodeId),
+        FirstPage:this.formData.FirstPage
       };
 
       // 编辑
@@ -374,6 +390,37 @@ export default {
       });
     },
 
+    // 获取封底列表
+    getBackCoverList(){
+      apiSmartReport.pptMaterialList({
+          CurrentIndex: 1,
+          PageSize: 1000,
+          ImageType: 3,
+          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
+        }
+      })
+    },
+    // 获取背景列表
+    getBackGroundList(){
+      apiSmartReport.pptMaterialList({
+          CurrentIndex: 1,
+          PageSize: 1000,
+          ImageType: 2,
+          ImageName: '',
+          ConfType: 1
+      }).then(res => {
+        if(res.Data.List){
+          this.formData.FirstPage.CurrentBackgroundImg=res.Data.List[0].Url
+          this.formData.FirstPage.CurrentBackgroundImgId=res.Data.List[0].ImageConfId
+        }
+      })
+    },
+
     filterNodes(arr) {
 			arr.length && arr.forEach(item => {
 				if(item.Child && item.Child.length) {

+ 21 - 2
src/views/ppt_manage/newVersion/components/catalog/mergePPTDialog.vue

@@ -209,7 +209,7 @@ export default {
         this.init()
         this.getCatalogsList('init')
         this.getPPtList()
-        this.getBaseConfig()
+        // this.getBaseConfig()
       }
       if(!newValue){
         if(this.saveLoading){
@@ -301,6 +301,15 @@ export default {
 
       if(res_font.Ret===200){
         content_font = JSON.parse(res_font.Data.Content)
+        this.pptInfo={
+          ...this.pptInfo,
+          ImgUrl:res_font.Data.BackgroundImg,
+          BackgroundImgId:res_font.Data.BackgroundImgId,
+          BackCoverImg:res_font.Data.BackCoverImg,
+          BackCoverImgId:res_font.Data.BackCoverImgId,
+          CurrentBackgroundImg:res_font.Data.CurrentBackgroundImg,
+          CurrentBackgroundImgId:res_font.Data.CurrentBackgroundImgId
+        }
       } 
       const res_back = await pptInterface.getpptDetail({
         PptId:this.choosedIdArr[1]
@@ -324,12 +333,22 @@ export default {
         ImgUrl,
         BackIndex,
         TemplateType, 
+        CurrentBackgroundImgId,
+        CurrentBackgroundImg,
+        BackCoverImg,
+        BackCoverImgId,
+        BackgroundImgId
       } = this.pptInfo
-
+      console.log(this.pptInfo)
       const res = await pptInterface.addpptV2({
           FirstPage:{
             Title,
             ImgUrl,
+            CurrentBackgroundImgId,
+            CurrentBackgroundImg,
+            BackCoverImg,
+            BackCoverImgId,
+            BackgroundImgId,
             BackIndex,
             TemplateType 
           },

+ 21 - 6
src/views/ppt_manage/newVersion/components/editor/ChooseCoverNew.vue

@@ -13,7 +13,7 @@
             <div class="edit-cover-wrap" @mousedown.stop="clickOutside">
                 <div class="cover">
                     <!-- 封面图 -->
-                    <div class="editor-area" :style="`background-image:url(${pptCoverList[choosedIndex]});`">
+                    <div class="editor-area" :style="`background-image:url(${pptCoverList[choosedIndex].Url});`">
                         <!-- 封面内文本元素 -->
                         <TextEl v-for="el in coverElList" :key="el.id"
                             :element-info="el"
@@ -39,6 +39,7 @@
                         <div class="cover-text-toolbar" @mousedown.stop></div>
                     </div>
                     <div class="dialog-btn">
+                        <el-button @click="chooseCoverImg">{{$t('Slides.more_templates')}}</el-button>
                         <el-button @click="changeBg">{{$t('Slides.change_the_template_cover')}}</el-button>
                         <el-button @click="saveCover">{{$t('Dialog.confirm_save_btn')}}</el-button>
                     </div>
@@ -97,15 +98,24 @@ export default {
             if(newVal){
                 this.setCoverInfo()
             }
-        }
+        },
     },
     methods: {
+        showDialog(){
+            this.changeActEl({})
+            this.setCoverInfo()
+        },
         setCoverInfo() {
             this.pageData.Title = this.firstPage.Title||''
-            this.searchIndex = this.pptCoverList.findIndex(i=>i===this.firstPage.BackgroundImg)
+            this.searchIndex = this.pptCoverList.findIndex(i=>i.Url===this.firstPage.BackgroundImg)
             //如果基本配置-封面图,没有当前ppt的封面图,则默认第一个
             if(this.searchIndex===-1){
-                this.pageData.BackgroundImg = this.pptCoverList[0]
+                this.pageData.BackgroundImg = this.pptCoverList[0].Url
+                this.pageData.BackgroundImgId = this.pptCoverList[0].ImageConfId
+            }else{
+                this.pageData.BackgroundImg = this.pptCoverList[this.searchIndex].Url
+                this.pageData.BackgroundImgId = this.pptCoverList[this.searchIndex].ImageConfId
+                this.choosedIndex=this.searchIndex
             }
             //如果封面页内容不是合法的json,置空
             try{
@@ -163,7 +173,7 @@ export default {
             const url = canvas.toDataURL("image/png")
             this.checkImg(url)
             //转换完成后,将背景图设置回来
-            cover.style.backgroundImage = `url(${this.pptCoverList[this.choosedIndex]})`
+            cover.style.backgroundImage = `url(${this.pptCoverList[this.choosedIndex].Url})`
             return url
         },
             //测试用
@@ -179,13 +189,18 @@ export default {
         clickOutside(){
             this.changeActEl({})
         },
+        //选择更多封面图
+        chooseCoverImg(){
+            this.$emit('chooseMoreCover')  
+        },
         changeBg(){
             if(this.choosedIndex<this.pptCoverList.length-1){
                 this.choosedIndex++
             }else{
                 this.choosedIndex=0
             }
-            this.pageData.BackgroundImg = this.pptCoverList[this.choosedIndex]
+            this.pageData.BackgroundImg = this.pptCoverList[this.choosedIndex].Url
+            this.pageData.BackgroundImgId = this.pptCoverList[this.choosedIndex].ImageConfId
         },
         addTextEl(options={}){
             let el = _.cloneDeep(BaseTextShape)

+ 44 - 18
src/views/ppt_manage/newVersion/components/formatEl/ChartEl.vue

@@ -41,25 +41,28 @@
   <!-- 底部来源,图表说明 -->
   <div class="chart-bottom-insruction-info"
   v-if="((chartSourcesFrom&&chartSourcesFrom.isShow) || (chartInstructions&&chartInstructions.isShow)) &&!this.$parent.isHintShow(position)">
-
-    <div class="chart-source text_oneLine" v-if="chartSourcesFrom&&chartSourcesFrom.isShow">
-        <span
-          :style="`
-          color: ${ chartSourcesFrom.color };
-          fontSize: ${ chartSourcesFrom.fontSize }px;
-        `"
-        >{{$t('Slides.source_info')}}:{{ chartSourcesFrom.text}}</span>
-    </div>
+    <el-tooltip  v-if="showSource()" popper-class="tooltip-width" :offset="50" effect="dark" :content="chartSourcesFrom.text" placement="top-start">
+      <div class="chart-source text_oneLine" :class="{'show-width':!showInstruction()}">
+          <span
+            :style="`
+            color: ${ chartSourcesFrom.color };
+            fontSize: ${ chartSourcesFrom.fontSize }px;
+          `"
+          >{{$t('Slides.source_info')}}:{{ chartSourcesFrom.text}}</span>
+      </div>
+    </el-tooltip>
     <!-- 图表说明 -->
-    <div 
-      class="chart-instruction text_oneLine"
-      v-if="chartInstructions&&chartInstructions.isShow&&chartInstructions.text.length"
-      v-text="chartInstructions.text"
-      :style="`
-        color: ${chartInstructions.color};
-        fontSize: ${ chartInstructions.fontSize }px
-      `"
-    ></div>
+    <el-tooltip  v-if="showInstruction()" popper-class="tooltip-width" :offset="-40" effect="dark" :content="chartInstructions.text" :placement="!showSource()?'top-start':'top-end'">
+      <div 
+        class="chart-instruction text_oneLine"
+        :class="{'show-width':!showSource()}"
+        v-text="chartInstructions.text"
+        :style="`
+          color: ${chartInstructions.color};
+          fontSize: ${ chartInstructions.fontSize }px
+        `"
+      ></div>
+    </el-tooltip>
   </div>
  
 </div>
@@ -97,6 +100,12 @@ export default {
     };
   },
   methods:{
+    showSource(){
+      return this.chartSourcesFrom&&this.chartSourcesFrom.isShow
+    },
+    showInstruction(){
+      return this.chartInstructions&&this.chartInstructions.isShow&&this.chartInstructions.text.length
+    },
     copyChartName(position){
         console.log(this.chartInfoMap[this.item.chartId])
       this.$parent.copyChartName(position)
@@ -138,4 +147,21 @@ export default {
   align-items: center;
   justify-content: space-between;
 }
+.chart-source{
+  width: 35%;
+  flex: none;
+}
+.chart-instruction{
+  width: 60%;
+  text-align: right;
+}
+.show-width{
+  width:100%;
+}
 </style>
+
+<style lang="scss">
+.tooltip-width {
+  max-width: 300px;
+}
+</style>

+ 13 - 9
src/views/ppt_manage/newVersion/components/formatEl/SheetEl.vue

@@ -52,15 +52,16 @@
       @click.stop="delChart(position)"
       v-if="isBtnShow"
     ></div>
-  <div class="chart-source">
-    <span
-      v-if="sheetSourceFrom && sheetSourceFrom.isShow"
-      :style="`
-      color: ${sheetSourceFrom.isShow ? sheetSourceFrom.color : '#999'};
-      font-size: ${ sheetSourceFrom.fontSize }px;
-    `"
-    ><!-- 来源 -->{{$t('ETable.Common.source')}}:{{ sheetSourceFrom.text}}</span>
-  </div>
+  <el-tooltip v-if="sheetSourceFrom && sheetSourceFrom.isShow" popper-class="tooltip-width" :offset="50" effect="dark" :content="sheetSourceFrom.text" placement="top-start">
+    <div class="chart-source">
+      <span
+        :style="`
+        color: ${sheetSourceFrom.isShow ? sheetSourceFrom.color : '#999'};
+        font-size: ${ sheetSourceFrom.fontSize }px;
+      `"
+      ><!-- 来源 -->{{$t('ETable.Common.source')}}:{{ sheetSourceFrom.text}}</span>
+    </div>
+  </el-tooltip>
 </div>
   
 </template>
@@ -124,5 +125,8 @@ export default {
   width: 95%;
   position: absolute;
   left: 2%;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
 }
 </style>

+ 242 - 0
src/views/ppt_manage/newVersion/components/selectImage.vue

@@ -0,0 +1,242 @@
+<template>
+    <div class="select-image">
+        <el-dialog :visible.sync="showDialog" :title="titleObj[imgType]" :close-on-click-modal="false"
+            :modal-append-to-body="false" @close="cancelHandle" custom-class="select-image-dialog" center width="820px"
+            v-dialogDrag>
+            <el-input v-model="keyword"
+                :placeholder="$t('OnlineExcelPage.please_input') + inputName[imgType] + $t('ETable.BalanceSheetTable.name')"
+                clearable style="width:200px;" @input="handleSearch"></el-input>
+            <div class="image-list">
+                <div class="image-item" v-for="item in list" :key="item.ImageConfId">
+                    <div class="img-box">
+                        <div class="opt-box">
+                            <div class="item full-fix" @click="handleShowImgFull(item)">
+                                <img src="~@/assets/img/icons/fullsreen.png" alt="">
+                            </div>
+                            <div class="radio-fix">
+                                <el-radio size="medium" v-model="momentChooseId" @change="changeRadio"
+                                    :label="item.ImageConfId"></el-radio>
+                            </div>
+                        </div>
+                        <img class="img" :src="item.Url" alt="">
+                    </div>
+                    <p class="name">{{ item.ImgName || item.ImageName }}</p>
+                </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>
+            </div>
+            <div style="text-align:center;padding: 30px 0;margin-top: 60px;">
+                <el-button style="width:120px;" @click="cancelHandle()">{{ $t('Dialog.cancel_btn') }}</el-button>
+                <el-button type="primary" style="margin-left:20px;width:120px;" @click="handleSave">{{
+                    $t('Dialog.confirm_save_btn') }}</el-button>
+            </div>
+            <el-image-viewer :zIndex="9999" v-if="showPptViewer"
+                :on-close="() => { this.picShowList = []; this.showPptViewer = false }" :url-list="picShowList" />
+        </el-dialog>
+    </div>
+</template>
+<script>
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer';
+import { apiSmartReport } from '@/api/modules/smartReport'
+export default {
+    components: { ElImageViewer },
+    props: {
+    },
+    data() {
+        return {
+            momentChooseId: '',
+            momentChooseUrl: '',
+            total: 0,
+            list: [],
+            pageSize: 8,
+            page: 1,
+            keyword: '',
+            showPptViewer: false,
+            picShowList: [],
+            imgType: 1,
+            showDialog: false,
+            inputName: {
+                1: this.$t('SystemManage.BaseConfig.ppt_type01'),
+                2: this.$t('SystemManage.BaseConfig.ppt_type02'),
+                3: this.$t('SystemManage.BaseConfig.ppt_type03')
+            },
+            titleObj: {
+                1: this.$t('Slides.more_cover_page'),
+                2: this.$t('Slides.select_ground_page'),
+                3: this.$t('Slides.select_back_page')
+            }
+        }
+    },
+    mounted() {
+    },
+    methods: {
+        handleShowImgFull(e) {
+            console.log(e);
+            this.picShowList = [e.Url]
+            this.showPptViewer = true
+        },
+        handleCurrentChange(val) {
+            this.page = val
+            this.getImgList()
+        },
+        // 保存
+        handleSave() {
+            const obj = {
+                url: this.momentChooseUrl,
+                type: this.imgType,
+                id: this.momentChooseId
+            }
+            this.cancelHandle()
+            this.$emit('saveChoose', obj)
+        },
+        // 选择图片
+        changeRadio(val) {
+            const index = this.list.findIndex(el => el.ImageConfId == val)
+            if (index > -1) {
+                this.momentChooseUrl = this.list[index].Url
+            }
+        },
+        //资源库列表
+        getImgList() {
+            apiSmartReport.pptMaterialList({
+                CurrentIndex: this.page,
+                PageSize: this.pageSize,
+                ImageType: this.imgType,
+                ImageName: this.keyword,
+                ConfType: 1
+            }).then(res => {
+                this.list = res.Data ? res.Data.List : []
+                this.total = res.Data ? res.Data.Paging.Totals : 0
+                if (!this.momentChooseId) {
+                    if (this.list.length) {
+                        this.momentChooseId = this.list[0].ImageConfId
+                        this.momentChooseUrl = this.list[0].Url
+                    }
+                }
+            })
+        },
+        // 搜索图片
+        handleSearch() {
+            this.page = 1
+            this.getImgList()
+        },
+        // 打开弹框
+        showHandle(type, id, url) {
+            this.showDialog = true
+            this.momentChoose = ''
+            this.momentChooseUrl = ''
+            this.imgType = type
+            this.keyword = ''
+            this.momentChooseId = id
+            this.momentChooseUrl = url
+            this.handleSearch()
+        },
+        // 关闭弹窗
+        cancelHandle() {
+            this.showDialog = false
+        }
+    }
+}
+</script>
+
+<style lang="scss">
+.select-image-dialog {
+    .el-dialog__body {
+        padding: 40px 60px !important;
+    }
+
+    .image-list {
+        margin-top: 20px;
+        display: flex;
+        flex-wrap: wrap;
+        gap: 20px;
+
+        .image-item {
+            width: 160px;
+
+            .img-box {
+                position: relative;
+                cursor: pointer;
+                width: 160px;
+
+                .img {
+                    display: block;
+                    width: 100%;
+                    height: 160px;
+                    background-color: var(--gary-gy-3-disabled, #EBEFF6);
+                    object-fit: contain !important;
+                    box-sizing: border-box;
+
+                    &:hover {
+                        border: 1px solid #3375e1;
+                    }
+                }
+
+                .opt-box {
+                    position: absolute;
+                    z-index: 5;
+                    width: 100%;
+                    height: 100%;
+
+                    .item {
+                        width: 24px;
+                        height: 24px;
+                        display: flex;
+                        align-items: center;
+                        justify-content: center;
+                        background-color: #fff;
+                        border-radius: 50%;
+                        margin-left: 10px;
+
+                        img {
+                            width: 16px;
+                            height: 16px;
+                        }
+                    }
+
+                    .full-fix {
+                        position: absolute;
+                        top: 12px;
+                        right: 12px;
+                    }
+
+                    .radio-fix {
+                        position: absolute;
+                        top: 12px;
+                        left: 12px;
+                    }
+                }
+
+                &:hover {
+                    .opt-box {
+                        display: flex;
+                    }
+
+                    .select-box {
+                        display: block;
+                    }
+                }
+            }
+
+            .name {
+                padding-top: 5px;
+                display: -webkit-box;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                -webkit-line-clamp: 2;
+                line-break: anywhere;
+                -webkit-box-orient: vertical;
+            }
+        }
+    }
+
+    .el-radio {
+        .el-radio__label {
+            display: none;
+        }
+    }
+}
+</style>

+ 79 - 13
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -1,11 +1,15 @@
 <template>
   <div class="page-wrap">
     <div class="index-wrap ppt-page-wrap flex-column">
-        <div class="cover-wrap" @click="openChooseCover">
-            <div class="cover" :style="`background: no-repeat center/cover url(${firstPage.BackgroundImg||''});background-color:#F2F6FA;background-size:100% 100%;`">
+        <div class="cover-wrap">
+            <div class="flex-align">
+              <p class="hint-text" @click="openSelectImage(2,firstPage.CurrentBackgroundImgId,firstPage.CurrentBackgroundImg)">{{$t('Slides.select_ground_page')}}</p>
+              <p class="hint-text" style="margin-left:37px" @click="openSelectImage(3,firstPage.BackCoverImgId,firstPage.BackCoverImg)">{{$t('Slides.select_back_page')}}</p>
+            </div>
+            <div class="flex-align" style="margin:8px 0"><p class="hint-text"  @click="openChooseCover">{{$t('Slides.select_cover_page')}}</p></div>
+            <div class="cover" @click="openChooseCover" :style="`background: no-repeat center/cover url(${firstPage.BackgroundImg||''});background-color:#F2F6FA;background-size:100% 100%;`">
                 <img src="~@/assets/img/ppt_m/add_first.png" />
             </div>
-            <p class="hint-text">{{$t('Slides.select_cover_page')}}</p>
         </div>
         <div class="hint-box"><div class="hint"  @click="showHint"><span class="el-icon-info" style="margin-right:5px;"></span>{{$t('Slides.operating_instructions')}}</div></div>
         <div style="display:flex;justify-content: space-between;">
@@ -282,7 +286,9 @@
     </div>
 
     <!-- 选择封面弹窗 -->
-    <ChooseCoverNew 
+    <ChooseCoverNew
+        ref="ChooseCoverNewRef"
+        v-if="isShowChooseCover" 
         :isShowChooseCover="isShowChooseCover"
         :firstPage="firstPage"
         :pptCoverList="pptCoverList"
@@ -290,6 +296,7 @@
         :CoverContent="CoverContent"
         @saveCover="saveCover2"
         @close="isShowChooseCover=false"
+        @chooseMoreCover="coverChooseImage()"
     />
     <!-- 批量删除弹窗 -->
     <delete-page-dialog 
@@ -321,6 +328,7 @@
       @cancel="addMyChartShow = false"
       @addSuccess="addChartToGallery"
     />
+    <selectImage @saveChoose='saveChooseImage' ref="selectImageRef"/>
   </div>
 </template>
 
@@ -356,6 +364,8 @@ import ContextMenu from './components/ContextMenu.vue';
 import InsertSemantics from './components/editor/InsertSemantics.vue';
 import ChooseCoverNew from './components/editor/ChooseCoverNew.vue';
 import TitleEditorTool from './components/editor/TitleEditorTool';
+import selectImage from './components/selectImage.vue';
+import { apiSmartReport } from '@/api/modules/smartReport'
 export default {
   mixins:[pptmixin,//ppt页面共同逻辑
           mixins,//图表加载逻辑
@@ -365,7 +375,7 @@ export default {
   components: {
     IndexItem, ChooseCover, AddFormat, ShapePreview,
     LayerEditTool, DeletePageDialog, ChangeFormatDialog, InsertPageDialog, addMyClassifyDia, InsertCharts, ContextMenu, InsertSemantics,
-    ChooseCoverNew,TitleEditorTool
+    ChooseCoverNew,TitleEditorTool,selectImage
 },
   data() {
     return {
@@ -508,7 +518,7 @@ export default {
         i.isUpdating = false
       })
       this.dataLoading.close();
-      $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
+      // $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
       //开启自动保存
       this.autoSave()
     },
@@ -526,6 +536,9 @@ export default {
           this.ReportId=ReportId
           this.CoverContent = this.result.CoverContent
           this.titleSetting = TitleSetting||null
+          if(this.firstPage.CurrentBackgroundImg){
+            $('.ppt-item').css('background-image',`url(${this.firstPage.CurrentBackgroundImg})`);
+          }
           /* //开启自动保存
           this.autoSave() */
         }else{
@@ -539,9 +552,58 @@ export default {
       }
       this.currentIndex = 0
     },
+    // 选择图片保存
+    saveChooseImage(item){
+        console.log(item)
+        const key={
+            1:'BackgroundImg',
+            2:'CurrentBackgroundImg',
+            3:'BackCoverImg'
+        }
+        const idKey={
+            1:'BackgroundImgId',
+            2:'CurrentBackgroundImgId',
+            3:'BackCoverImgId'
+        }
+        if(item.type==1){
+            const searchIndex = this.pptCoverList.findIndex(i=>i.Url===item.url)
+            //如果基本配置-封面图,没有当前ppt的封面图,则默认第一个
+            if(searchIndex>-1){
+                this.$refs.ChooseCoverNewRef.pageData.BackgroundImg = item.url
+                this.$refs.ChooseCoverNewRef.pageData.BackgroundImgId = item.id
+                this.$refs.ChooseCoverNewRef.choosedIndex=searchIndex
+            }
+        }else{
+          this.$set(this.firstPage,key[item.type],item.url)
+          this.$set(this.firstPage,idKey[item.type],item.id)
+          if(item.type==2){
+              $('.ppt-item').css('background-image',`url(${item.url})`);
+          }
+        }
+    },
+    // 选择封面弹框选择更多模板
+    coverChooseImage(){
+        this.openSelectImage(1,this.$refs.ChooseCoverNewRef.pageData.BackgroundImgId,this.$refs.ChooseCoverNewRef.pageData.BackgroundImg)
+    },
+    // 打开选择背景图、封底图、封面图
+    openSelectImage(type,id,url){
+        this.$refs.selectImageRef.showHandle(type,id,url)
+    },
     //打开选择封面页弹窗
     openChooseCover(){
-        this.isShowChooseCover = true
+        apiSmartReport.pptMaterialList({
+            CurrentIndex: 1,
+            PageSize: 1000,
+            ImageType: 1,
+            ImageName: '',
+            ConfType: 1
+        }).then(res => {
+            this.pptCoverList=res.Data ? res.Data.List : []
+            this.isShowChooseCover = true
+            this.$nextTick(()=>{
+              this.$refs.ChooseCoverNewRef.showDialog()
+            })
+        })
     },
     //关闭选择封面页弹窗
     closeChooseCover(){
@@ -1052,9 +1114,9 @@ export default {
         return checkResult
       }
       let Content = JSON.stringify(this.pageList)
-      const {Title,ReportType,PptDate,BackgroundImg,BackIndex} = this.firstPage
+      const {Title,ReportType,PptDate,BackgroundImg,BackIndex,CurrentBackgroundImg,BackCoverImg, BackCoverImgId,BackgroundImgId,CurrentBackgroundImgId} = this.firstPage
       const FirstPage = {
-        Title,ReportType,PptDate,BackIndex,
+        Title,ReportType,PptDate,BackIndex,BackCoverImg,CurrentBackgroundImg,BackCoverImgId,BackgroundImgId,CurrentBackgroundImgId,
         ImgUrl:BackgroundImg,
         TemplateType:BackIndex+1
       }
@@ -1113,9 +1175,9 @@ export default {
         //如果当前在刷新图表,则不进行自动保存
         if(this.refreshBtnLoading) return
         const ppt_id = this.$route.query.id||this.pptId
-        const {Title,ReportType,PptDate,BackgroundImg,BackIndex} = this.firstPage
+        const {Title,ReportType,PptDate,BackgroundImg,BackIndex,CurrentBackgroundImg,BackCoverImg,BackCoverImgId,BackgroundImgId,CurrentBackgroundImgId} = this.firstPage
         const FirstPage = {
-          Title,ReportType,PptDate,BackIndex,
+          Title,ReportType,PptDate,BackIndex,CurrentBackgroundImg,BackCoverImg,CurrentBackgroundImg,BackCoverImgId,BackgroundImgId,CurrentBackgroundImgId,
           ImgUrl:BackgroundImg,
           TemplateType:BackIndex+1
         }
@@ -1324,7 +1386,7 @@ export default {
   },
   updated(){
     $('.ppt-item').css('height',$('.ppt-item').width()*0.7);
-    $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
+    $('.ppt-item').css('background-image',`url(${this.firstPage.CurrentBackgroundImg})`);
     window.onresize = ()=>{
       $('.ppt-item').css('height',$('.ppt-item').width()*0.7);
     }
@@ -1432,7 +1494,7 @@ $titleColor:#333333;
                 .ppt-item {
                     //padding 两边 40 减掉边框两边 8 max-width:100% - 32px
                     width:calc(100% - 64px);
-                    background: url('~@/assets/img/pptnextimg.png') no-repeat top;
+                    background: transparent;
                     background-size: 100% 100%;
                     /* margin-bottom: 30px; */
                     position: relative;
@@ -1610,5 +1672,9 @@ $titleColor:#333333;
             }
        }
     }
+    .flex-align{
+      display:flex;
+      align-items: center;
+    }
 }
 </style>

+ 7 - 7
src/views/ppt_manage/newVersion/pptPresent.vue

@@ -45,7 +45,7 @@
             </div>
             <!-- 封底 -->
             <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;"/>
+              <img :src="coverInfo.page.BackCoverImg" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
             </div>
             <!-- PPT内容 -->
               <div class="ppt-item" v-else>
@@ -113,7 +113,7 @@
             </div>
             <!-- 封底 -->
             <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;"/>
+              <img :src="coverInfo.page.BackCoverImg" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
             </div>
             <!-- PPT内容 -->
               <div class="ppt-item" v-else>
@@ -251,7 +251,7 @@ export default {
         return this.LayoutType===2?2:3
     },
     isShowBack(){
-        return Boolean(this.pptBackImage)
+        return Boolean(this.coverInfo.page.BackCoverImg)
     },
     pptSlidePages(){
       let str = this.$i18n.locale == 'zh'? 
@@ -291,7 +291,7 @@ export default {
           $('.editor-content').css('transform',`scale(${this.contentScale})`)
         }
         this.changeLayersSize()
-        $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
+        $('.ppt-item').css('background-image',`url(${this.coverInfo.page.CurrentBackgroundImg})`);
       })
     },
     async init(){
@@ -323,7 +323,7 @@ export default {
         this.sheetListHandle(sheetElements);
       }
       this.currentKey = 1
-      this.pptBgImage&&$('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
+      this.coverInfo.page.CurrentBackgroundImg&&$('.ppt-item').css('background-image',`url(${this.coverInfo.page.CurrentBackgroundImg})`);
       this.dataLoading.close();
     },
     //根据id获取ppt数据
@@ -575,7 +575,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})`);
+          $('.ppt-item').css('background-image',`url(${this.coverInfo.page.CurrentBackgroundImg})`);
         })
       }else{
         this.$nextTick(()=>{
@@ -875,7 +875,7 @@ $titleColor:#333333;
     .ppt-item{
       width: 100%;
       height: 100%;
-      background: url('~@/assets/img/pptnextimg.png') no-repeat top;
+      background: transparent;
       background-size: 100% 100%;
       position:relative;
       border: 4px solid transparent;

+ 8 - 7
src/views/ppt_manage/newVersion/pptPublish.vue

@@ -58,8 +58,8 @@
             </component>
           </div>
           <!-- 封底 -->
-          <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 class="ppt-item" id="back" v-if="coverInfo.page&&coverInfo.page.BackCoverImg" style="background-size:20%;">
+            <img :src="coverInfo.page.BackCoverImg" class="pptbg" style="width:100%;height:100%;object-fit: fill !important;"/>
           </div>
         </div>
       </template>
@@ -223,7 +223,7 @@ export default {
         this.$store.commit('SET_CHART_INFO_MAP',chartInfoMap)
 
         this.dataLoading.close();
-        $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
+        $('.ppt-item').css('background-image',`url(${this.coverInfo.page.CurrentBackgroundImg})`);
       }
     },
     async getpptData(){
@@ -232,6 +232,7 @@ export default {
         await this.getpptDataById(id)
         const {status} = this.result
         if(status===200){
+          console.log(this.result)
           const {content,FirstPage,ReportId} = this.result
           this.pageList = content
           this.coverInfo.page = FirstPage
@@ -290,8 +291,8 @@ export default {
       //开始计时
       const start = Date.now()
       const SlideMaster = _.cloneDeep(pptSlideMaster) 
-      SlideMaster.objects[1] = {image: {x:0,y:0,w:10,h:7,path: this.isTestLocal?require('@/assets/img/pptnextimg.png'):this.pptBgImage}}
-      let pptx = pptConfigInit(new pptxgen(),this.LayoutType,'ch',SlideMaster,this.isTestLocal?require('@/assets/img/pptnextimg.png'):this.pptBgImage)
+      SlideMaster.objects[1] = {image: {x:0,y:0,w:10,h:7,path: this.isTestLocal?require('@/assets/img/pptnextimg.png'):this.coverInfo.page.CurrentBackgroundImg}}
+      let pptx = pptConfigInit(new pptxgen(),this.LayoutType,'ch',SlideMaster,this.isTestLocal?require('@/assets/img/pptnextimg.png'):this.coverInfo.page.CurrentBackgroundImg)
       //添加封面
       let cover = pptx.addSlide()
       let coverId = 'cover'
@@ -431,7 +432,7 @@ export default {
         }
       }
       //添加封底 如果有
-      if(this.pptBackImage.length){
+      if(this.coverInfo.page&&this.coverInfo.page.BackCoverImg){
         let back = pptx.addSlide()
         let backId = 'back'
         let backImg = $(`#${backId} img`)[0].src
@@ -745,7 +746,7 @@ $titleColor:#333333;
       /* height: 628.594px; */
       background-color: pink;
       margin-bottom: 20px;
-      background: url('~@/assets/img/pptnextimg.png') no-repeat top;
+      background: transparent;
       background-size: 100% 100%;
       position:relative;
       border: 4px solid transparent;

+ 221 - 51
src/views/system_manage/components/smartReportImgSet.vue

@@ -2,11 +2,12 @@
     <div class="smart-report-img-set-page">
         <div class="top-wrap">
             <el-input v-model="keyword" :placeholder="$t('SystemManage.BaseConfig.resource_placeholder01')" clearable style="width:200px;margin-right:20px" @input="handleSearch"></el-input>
-            <el-select :placeholder="$t('SystemManage.BaseConfig.resource_placeholder02')" v-model="type" clearable style="width:200px" @change="handleSearch">
-                <el-option :label="$t('SystemManage.BaseConfig.resource_type01')" :value="1"></el-option>
-                <el-option :label="$t('SystemManage.BaseConfig.resource_type02')" :value="2"></el-option>
+            <el-select  :placeholder="$t('SystemManage.BaseConfig.resource_placeholder02')" v-model="type" clearable style="width:200px" @change="handleSearch">
+                <el-option :label="libraryType==2?$t('SystemManage.BaseConfig.ppt_type01'):$t('SystemManage.BaseConfig.resource_type01')" :value="1"></el-option>
+                <el-option :label="libraryType==2?$t('SystemManage.BaseConfig.ppt_type02'):$t('SystemManage.BaseConfig.resource_type02')" :value="2"></el-option>
+                <el-option v-if="libraryType==2" :label="$t('SystemManage.BaseConfig.ppt_type03')" :value="3"></el-option>
             </el-select>
-            <el-button type="primary" style="float:right" @click="handleShowUploadPop" v-permission="permissionBtn.baseConfigPermission.etaBaseConfig_source_upload">{{$t('SystemManage.BaseConfig.resource_btn04')}}</el-button>
+            <el-button type="primary" style="float:right" @click="handleShowUploadPop" v-if="(libraryType==1&&permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_upload)) || (libraryType==2&&permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_ppt_upload))">{{libraryType==1?$t('SystemManage.BaseConfig.resource_btn04'):$t('SystemManage.BaseConfig.resource_btn01')}}</el-button>
         </div>
 
         <div class="select-status-box" v-if="selectIds.length>0">
@@ -22,24 +23,24 @@
 
 
         <ul class="img-list-wrap">
-            <li class="img-item" v-for="item in list" :key="item.ResourceId">
-                <div :class="['select-box',selectIds.includes(item.ResourceId)?'select-box-active':'']" @click="handleSelectItem(item)"></div>
+            <li class="img-item" v-for="item in list" :key="item.ResourceId || item.ImageConfId">
+                <div :class="['select-box',selectIds.includes(item.ResourceId || item.ImageConfId)?'select-box-active':'']" @click="handleSelectItem(item)"></div>
                 <div class="opt-box">
                     <div class="item" @click="handleShowImgFull(item)">
                         <img src="~@/assets/img/icons/fullsreen.png" alt="">
                     </div>
-                    <el-dropdown @command="handleClickOpt">
+                    <el-dropdown @command="handleClickOpt" v-if="(libraryType==1&&(permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_edit)|| permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_del))) || (libraryType==2&&(permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_ppt_edit) || permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_ppt_del)))">
                     <div class="item">
                         <img src="~@/assets/img/icons/more.png" alt="">
                     </div>
                     <el-dropdown-menu slot="dropdown">
-                        <el-dropdown-item :command="{type:'edit',data:item}">{{$t('Dialog.title_prefix_edit')}}</el-dropdown-item>
-                        <el-dropdown-item :command="{type:'del',data:item}" style="color: #AD352F;">{{$t('Table.delete_btn')}}</el-dropdown-item>
+                        <el-dropdown-item v-if="(libraryType==1&&permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_edit)) || (libraryType==2&&permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_ppt_edit))" :command="{type:'edit',data:item}">{{$t('Dialog.title_prefix_edit')}}</el-dropdown-item>
+                        <el-dropdown-item v-if="(libraryType==1&&permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_del)) || (libraryType==2&&permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_ppt_del))" :command="{type:'del',data:item}" style="color: #AD352F;">{{$t('Table.delete_btn')}}</el-dropdown-item>
                     </el-dropdown-menu>
                     </el-dropdown>
                 </div>
-                <img class="img" :src="item.ImgUrl" alt="">
-                <p class="name">{{item.ImgName}}</p>
+                <img class="img" :src="item.ImgUrl || item.Url" alt="">
+                <p class="name">{{item.ImgName || item.ImageName}}</p>
             </li>
         </ul>
         <tableNoData :text="$t('Table.prompt_slogan')" v-if="list.length===0"/>
@@ -165,7 +166,75 @@
             </el-form>
             
         </el-dialog>
-        <el-image-viewer 
+
+        <!-- ppt上传图片弹窗 -->
+        <el-dialog
+            :visible.sync="uploadImgPpt"
+            :title="ruleForm.ImageConfId?$t('SystemManage.BaseConfig.ppt_btn02'):$t('SystemManage.BaseConfig.resource_btn01')"
+            :close-on-click-modal="false"
+            :append-to-body="true"
+            @close="cancelPpt"
+            custom-class="classify-dialog"
+            center
+            width="550px"
+            v-dialogDrag
+        >
+            <el-form 
+                :model="ruleForm" 
+                :rules="formRules" 
+                ref="ruleForms" 
+                label-width="120px" 
+                class="upload-img-form"
+            >   
+                <el-form-item :label="$t('SystemManage.BaseConfig.resource_label01')" prop="ImageName">
+                    <el-input v-model="ruleForm.ImageName" :placeholder="$t('SystemManage.BaseConfig.resource_placeholder01')"></el-input>
+                </el-form-item>
+                <el-form-item :label="$t('SystemManage.BaseConfig.resource_label02')" prop="ImageType">
+                    <el-radio-group :disabled="ruleForm.ImageConfId" v-model="ruleForm.ImageType">
+                        <el-radio :label="1">{{$t('SystemManage.BaseConfig.ppt_type01')}}</el-radio>
+                        <el-radio :label="2">{{$t('SystemManage.BaseConfig.ppt_type02')}}</el-radio>
+                        <el-radio :label="3">{{$t('SystemManage.BaseConfig.ppt_type03')}}</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <el-form-item
+                    :label="$t('SystemManage.BaseConfig.resource_btn01')" 
+                    prop="Url"
+                >
+                    <el-upload
+                        :disabled="ruleForm.ImageConfId" 
+                        action="" 
+                        accept="image/*" 
+                        :http-request="handleUploadImg" 
+                        :show-file-list="false"
+                    >
+                        <div class="upload-box">
+                            <template v-if="!ruleForm.Url">
+                                <i class="el-icon-plus" style="font-size: 24px;"></i>
+                            </template>
+                            <template v-else>
+                                <img class="upload-img" :src="ruleForm.Url" alt="">
+                                <div class="upload-mask">
+                                    <i class="el-icon-zoom-in" @click.stop="handleShowImgPpt()"></i>
+                                    <i class="el-icon-delete" v-if="!ruleForm.ImageConfId" @click.stop="ruleForm.Url=''"></i>
+                                </div>
+                            </template>
+                        </div>
+                    </el-upload>
+                    <p>{{$t('SystemManage.BaseConfig.upload_ppt_suggest')}}</p>
+                </el-form-item>
+                <div style="text-align: center;padding: 30px 0;margin-top: 60px;">
+                    <el-button style="width:120px;" @click="cancelPpt()" >{{$t('Dialog.cancel_btn')}}</el-button>
+                    <el-button type="primary" style="margin-left:20px;width:120px;" @click="handlePptSave">{{$t('Dialog.confirm_save_btn')}}</el-button>
+                </div>
+            </el-form>
+            <el-image-viewer
+                :zIndex="9999"
+                v-if="showPptViewer" 
+                :on-close="()=>{this.picShowList=[];this.showPptViewer = false}" 
+                :url-list="picShowList" 
+            />
+        </el-dialog>
+        <el-image-viewer
             v-if="showViewer" 
             :on-close="()=>{this.picShowList=[];this.showViewer = false}" 
             :url-list="picShowList" 
@@ -181,6 +250,24 @@ import draggable from 'vuedraggable'
 import VueDragResize from 'vue-drag-resize'
 export default {
     components:{ElImageViewer,draggable,VueDragResize},
+    props:{
+        libraryType:{
+            type:Number,
+            default:1
+        }
+    },
+    watch:{
+        libraryType:{
+            handler(newval){
+                this.page = 1;
+                this.keyword=''
+                this.type=''
+                this.list=[]
+                this.getImgList()
+            },
+            deep:true
+        }
+    },
     data() {
         return {
             keyword:'',
@@ -191,6 +278,7 @@ export default {
             total:0,
 
             uploadImgPop:false,
+            uploadImgPpt:false,
             formData:{
                 id:0,
                 name:'',
@@ -198,10 +286,19 @@ export default {
                 imgUrl:'',
                 layout:''
             },
+            ruleForm:{
+                ImageName:'',
+                Url:"",
+                ConfType:1,
+                ImageType:''
+            },
             formRules:{
                 name:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder01')||'请输入图片名称', trigger: 'blur' }],
                 type:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder02')||'请选择图片类型', trigger: 'change' }],
-                imgUrl:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder03')||'请上传图片', trigger: 'change' }]
+                imgUrl:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder03')||'请上传图片', trigger: 'change' }],
+                ImageName:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder01')||'请输入图片名称', trigger: 'blur' }],
+                ImageType:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder02')||'请选择图片类型', trigger: 'change' }],
+                Url:[{ required: true, message: this.$t('SystemManage.BaseConfig.resource_placeholder03')||'请上传图片', trigger: 'change' }]
             },
             step:1,
             steps:[this.$t('SystemManage.BaseConfig.select_layout'),this.$t('SystemManage.BaseConfig.edit_layout')],
@@ -236,6 +333,7 @@ export default {
                             {value:'center',label:this.$t('SystemManage.BaseConfig.style_text_align_center')},
                             {value:'right',label:this.$t('SystemManage.BaseConfig.style_text_align_right')}],
             showViewer:false,
+            showPptViewer:false,
             picShowList:[],
             rigtMenuHideTimer:null,
             delIds:[],//要删除的id集合
@@ -253,19 +351,22 @@ export default {
     },
     methods: {
         handleSelectItem(e){
-            const index=this.selectIds.indexOf(e.ResourceId)
+            const key=this.libraryType==1?'ResourceId':'ImageConfId'
+            console.log(e[key])
+            const index=this.selectIds.indexOf(e[key])
             if(index>-1){
                 this.selectIds.splice(index,1)
             }else{
-                this.selectIds.push(e.ResourceId)
+                this.selectIds.push(e[key])
             }
 
             this.checkAll=this.selectIds.length===this.list.length?true:false
             this.isIndeterminate=this.selectIds.length>0&&this.selectIds.length<this.list.length
         },
         handleCheckAllChange(val){
+            const key=this.libraryType==1?'ResourceId':'ImageConfId'
             if(val){
-                this.selectIds=this.list.map(item=>item.ResourceId)
+                this.selectIds=this.list.map(item=>item[key])
             }else{
                 this.selectIds=[]
             }
@@ -285,16 +386,26 @@ export default {
             this.isIndeterminate=false
             this.checkAll=false
             this.delIds=[]
-            
-            const res=await apiSmartReport.imgReourceList({
-                CurrentIndex:this.page,
-                PageSize:this.pageSize,
-                Type:this.type,
-                Keyword:this.keyword
-            })
-            if(res.Ret===200){
-                this.list=res.Data.List||[]
-                this.total=res.Data.Paging.Totals
+            let res='' 
+            if(this.libraryType==1){
+                res=await apiSmartReport.imgReourceList({
+                    CurrentIndex:this.page,
+                    PageSize:this.pageSize,
+                    Type:this.type,
+                    Keyword:this.keyword
+                })
+            }else{
+                res=await apiSmartReport.pptMaterialList({
+                    CurrentIndex:this.page,
+                    PageSize:this.pageSize,
+                    ImageType:this.type?this.type:null,
+                    ImageName:this.keyword,
+                    ConfType:1
+                })
+            }
+            if(res&&res.Ret===200){
+                this.list=res.Data?res.Data.List:[]
+                this.total=res.Data?res.Data.Paging.Totals:0
             }
         },
 
@@ -310,8 +421,13 @@ export default {
             form.append('file',file.file);
             bannerupload(form).then(res=>{
                 // console.log(res);
-                if(res.Ret!==200) return 
-                this.formData.imgUrl=res.Data.ResourceUrl
+                if(res.Ret!==200) return
+                if(this.libraryType==1){
+                    this.formData.imgUrl=res.Data.ResourceUrl
+                }else{
+                    this.ruleForm.Url=res.Data.ResourceUrl
+                    this.$refs.ruleForms.clearValidate('Url');
+                }
             })
         
         },
@@ -375,6 +491,33 @@ export default {
         handleCloseImgUpload(){
             this.uploadImgPop=false
         },
+        handlePptSave(){
+            this.$refs.ruleForms.validate(async (valid)=>{
+                if(valid){
+                    const params={
+                        ...this.ruleForm
+                    }
+                    let res=''
+                    if(this.ruleForm.ImageConfId){
+                        res=await apiSmartReport.pptEditMaterial(params)
+                    }else{
+                        res=await apiSmartReport.pptAddMaterial([params])
+                    }
+                    if(res&&res.Ret===200){
+                        this.$message.success(this.ruleForm.ImageConfId?this.$t('MsgPrompt.edit_msg'):this.$t('MsgPrompt.add_msg'))
+                        this.cancelPpt()
+                        this.page=1
+                        this.getImgList()
+                    }
+                }
+            })   
+        },
+        cancelPpt(){
+            this.uploadImgPpt=false
+            this.$nextTick(()=>{
+                this.$refs.ruleForms.clearValidate()
+            })        
+        },
         cancelHandle(){
             this.step=1
             this.formData.id=0
@@ -400,34 +543,57 @@ export default {
                 this.$refs.ruleForm.clearValidate()
             })
         },
+        handleShowImgPpt(){
+            this.showPptViewer=true
+            this.picShowList=[this.ruleForm.Url]
+        },
         handleShowImgFull(e){
             console.log(e);
-            this.picShowList=[e.ImgUrl]
+            this.picShowList=[this.libraryType==1?e.ImgUrl:e.Url]
             this.showViewer=true
         },
 
         handleClickOpt(e){
             if(e.type==='del'){
-                this.delIds=[e.data.ResourceId]
+                this.delIds=[this.libraryType==1?e.data.ResourceId:e.data.ImageConfId]
                 this.handleImgDel()
             }
             if(e.type==='edit'){
-                this.formData.id=e.data.ResourceId
-                this.formData.name=e.data.ImgName
-                this.formData.type=e.data.Type
-                this.formData.imgUrl=e.data.ImgUrl
-                this.formData.layout=e.data.Style
+                if(this.libraryType==1){
+                    this.formData.id=e.data.ResourceId
+                    this.formData.name=e.data.ImgName
+                    this.formData.type=e.data.Type
+                    this.formData.imgUrl=e.data.ImgUrl
+                    this.formData.layout=e.data.Style
 
-                this.uploadImgPop=true
+                    this.uploadImgPop=true
+                }else{
+                    this.ruleForm=JSON.parse(JSON.stringify(e.data))
+
+                    this.uploadImgPpt=true
+                }
             }
         },
         handleShowUploadPop(){
-            this.formData.id=0
-            this.formData.name=''
-            this.formData.type=''
-            this.formData.imgUrl=''
-            this.formData.layout=''
-            this.uploadImgPop=true
+            if(this.libraryType==1){
+                this.formData.id=0
+                this.formData.name=''
+                this.formData.type=''
+                this.formData.imgUrl=''
+                this.formData.layout=''
+                this.uploadImgPop=true
+            }else{
+                this.ruleForm={
+                    ImageName:'',
+                    Url:"",
+                    ConfType:1,
+                    ImageType:''
+                }
+                this.uploadImgPpt=true
+                this.$nextTick(()=>{
+                    this.$refs.ruleForms.clearValidate()
+                }) 
+            }
         },
 
         handleBatchDel(){
@@ -438,14 +604,18 @@ export default {
         handleImgDel(){
             this.$confirm(this.$t('SystemManage.BaseConfig.resource_del_msg'),this.$t('Confirm.prompt'),{
                 type: 'warning'
-            }).then(()=>{
-                apiSmartReport.imgReourceDel({ResourceIds:this.delIds.join(',')}).then(res=>{
-                    if(res.Ret===200){
-                        this.$message.success(this.$t('MsgPrompt.delete_msg'))
-                        this.page=1
-                        this.getImgList()
-                    }
-                })
+            }).then(async ()=>{
+                let res=''
+                if(this.libraryType==1){
+                    res=await apiSmartReport.imgReourceDel({ResourceIds:this.delIds.join(',')})
+                }else{
+                    res=await apiSmartReport.pptDeleteMaterial(this.delIds.map(el=>{return {ImageConfId:el}}))
+                }
+                if(res&&res.Ret===200){
+                    this.$message.success(this.$t('MsgPrompt.delete_msg'))
+                    this.page=1
+                    this.getImgList()
+                }
             })
         },
         // 切换步骤
@@ -563,7 +733,7 @@ export default {
     display: none;
 }
 .smart-report-img-set-page{
-    padding: 30px;
+    padding:11px 30px 30px;
     padding-bottom: 100px;
     .select-status-box{
         background-color: #F8F8F8;

+ 11 - 4
src/views/system_manage/etaBaseConfig.vue

@@ -304,7 +304,7 @@
                     <div v-if="isShowPPT&&pptLang === 'cn'" class="ppt-form-item-wrap">
                         
                         
-                        <el-form-item :label="$t('SystemManage.BaseConfig.ppt_type01')" prop="CnPptCoverImgs" style="min-width:400px;">
+                        <!-- <el-form-item :label="$t('SystemManage.BaseConfig.ppt_type01')" prop="CnPptCoverImgs" style="min-width:400px;">
                             <div class="input-line" style="display:flex;">
                                 <ImgUpload 
                                     :imgUrl="formData.CnPptCoverImgs.length===3?formData.CnPptCoverImgs[2]:''"
@@ -342,7 +342,7 @@
                             <ConfigAnnotation picName="pptBackPic" @showImage="previewImage"
                                 :picHintText="$t('SystemManage.BaseConfig.ppt_tip03')"
                                 :buttonText="$t('SystemManage.BaseConfig.view_example_text')"/>
-                        </el-form-item>
+                        </el-form-item> -->
                         <el-form-item label="PPT表格" prop="CnPptSheetSize">
                             <template slot="label">
                                 <span>
@@ -428,9 +428,12 @@
         
         </template>
         <template v-if="sectionType==2&&isShowSource">
-            <div class="smart-report-title">{{$t('SystemManage.BaseConfig.smart_layout_resource_library')}}</div>
+            <el-radio-group v-model="libraryType" style="margin:16px 0 0 30px;">
+                <el-radio-button label="1" v-if="permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_see)">{{$t('SystemManage.BaseConfig.smart_layout_resource_library')}}</el-radio-button>
+                <el-radio-button label="2" v-if="permissionBtn.checkPermissionBtn(permissionBtn.baseConfigPermission.etaBaseConfig_source_ppt_see)">{{$t('SystemManage.BaseConfig.ppt_resource_library')}}</el-radio-button>
+            </el-radio-group>
             <!-- 资源库 -->
-            <smartReportImgSet />
+            <smartReportImgSet :libraryType="libraryType" />
         </template>
 
 
@@ -462,6 +465,7 @@ export default {
         }
         return {
             /* base config */
+            libraryType:'1',
             checkList:[],//水印应用
             Iflytek:false,//是否启用科大讯飞服务
             approve:false,//是否开启研报审批
@@ -700,6 +704,8 @@ export default {
         isShowSource(){
             return this.permissionBtn.checkPermissionBtn(
                 this.permissionBtn.baseConfigPermission.etaBaseConfig_source_see
+            ) || this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.baseConfigPermission.etaBaseConfig_source_ppt_see
             )
         },
 
@@ -886,6 +892,7 @@ export default {
     },
     mounted(){
         this.getBaseConfig()
+        this.libraryType=this.permissionBtn.checkPermissionBtn(this.permissionBtn.baseConfigPermission.etaBaseConfig_source_see)?'1':'2'
     }
 };
 </script>