|
@@ -12,7 +12,6 @@
|
|
|
<p style="text-align:start;color:#999999;">
|
|
|
{{$i18n.locale == 'zh' ? `已添加${pageList.length}页`:`${pageList.length}slides added successfully`}}
|
|
|
</p>
|
|
|
- <!-- <p class="hint-text" style="cursor: pointer;margin-left:auto;" @click="insertPageShow=true">插入PPT</p> -->
|
|
|
<p class="hint-text" style="cursor: pointer;" @click="saveCopyPages('cut')">{{$t('Slides.operations_cut')}}</p>
|
|
|
<p class="hint-text" style="cursor: pointer;" @click="saveCopyPages('copy')">{{$t('Slides.operations_copy')}}</p>
|
|
|
<p style="color:#B72E18;cursor: pointer;" @click="openDeletePageDialog">{{$t('Slides.operations_batch_delete')}}</p>
|
|
@@ -49,7 +48,6 @@
|
|
|
<div class="ppt-editor" id="pptEditor" ref="pptEditor" @paste="handlePasteOutSide">
|
|
|
<!-- 显示全部ppt -->
|
|
|
<template v-if="pageList.length">
|
|
|
- <!-- <transition-group name="flip-list"> -->
|
|
|
<div class="ppt-editor-item flex-column" v-for="(item,index) in pageList" :key="item.id">
|
|
|
<AddFormat @addPage="addPage($event,index)" :chooseModalId="chooseModalId"/>
|
|
|
<div class="ppt-item" :class="{'choose':currentItem.id===item.id}"
|
|
@@ -243,10 +241,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-collapse-item>
|
|
|
- <!-- <el-collapse-item v-if="activeLayerEl.type" :name="activeLayerEl.type"
|
|
|
- :title="{'line':'线条','shape':'线框','text':'文本'}[activeLayerEl.type]+`设置`" >
|
|
|
- <LayerEditTool :elInfo="activeLayerEl" />
|
|
|
- </el-collapse-item> -->
|
|
|
<el-collapse-item name="line"
|
|
|
:title="$t('Slides.line_settings')" >
|
|
|
<LayerEditTool
|
|
@@ -288,13 +282,6 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 选择封面弹窗 -->
|
|
|
- <!-- <choose-cover v-if="isShowChooseCover"
|
|
|
- :firstPage="firstPage"
|
|
|
- :pptCoverList="pptCoverList"
|
|
|
- :PptId="pptId"
|
|
|
- @close="closeChooseCover"
|
|
|
- @save="saveCover"
|
|
|
- /> -->
|
|
|
<ChooseCoverNew
|
|
|
:isShowChooseCover="isShowChooseCover"
|
|
|
:firstPage="firstPage"
|
|
@@ -443,10 +430,8 @@ export default {
|
|
|
panelTabs(){
|
|
|
return [
|
|
|
{val:'图表',label:this.$t('Slides.table_chart') },
|
|
|
- // {val:'MyETA批量',label:this.$t('Slides.my_eta_batch')},
|
|
|
{val:'沙盘', label:this.$t('Slides.sandbox_name')},
|
|
|
{val:'表格', label:this.$t('Slides.table_name')},
|
|
|
- // {val:'语义分析插入', label:this.$t('Slides.table_analysis_semantic')},
|
|
|
]
|
|
|
},
|
|
|
|
|
@@ -481,8 +466,6 @@ export default {
|
|
|
this.maxPageChart = res.Data.chart_num
|
|
|
}
|
|
|
})
|
|
|
- /* this.maxPageNum = 60
|
|
|
- this.maxPageChart = 8 */
|
|
|
},
|
|
|
async init(){
|
|
|
this.dataLoading = this.$loading({
|
|
@@ -575,17 +558,11 @@ export default {
|
|
|
let page = {
|
|
|
id: createRandomCode(),
|
|
|
key:0,
|
|
|
- /* isUpdating:false, */
|
|
|
modelId: modelId,
|
|
|
title:'',
|
|
|
elements: [],
|
|
|
titleDetail:this.titleSetting?this.titleSetting:null
|
|
|
}
|
|
|
- //限制取消
|
|
|
- /* if(this.pageList.length>=this.maxPageNum){
|
|
|
- this.$message.warning(`最多可添加${this.maxPageNum}页PPT,已超过最大页数!`)
|
|
|
- return
|
|
|
- } */
|
|
|
this.pageList.splice(index,0,page)
|
|
|
this.changeCurrentItem(page)
|
|
|
this.chooseModalId = modelId
|
|
@@ -647,10 +624,6 @@ export default {
|
|
|
if(textElements.length>0){
|
|
|
this.pageList[this.currentIndex].isLoadText = true
|
|
|
}
|
|
|
- //通过deleteFormatEl重新渲染被删除的区域,下面这几行都不需要了
|
|
|
- //this.$refs[`pptPage_${this.currentIndex}`][0].initPositionInfo()
|
|
|
- //this.initPageElements(this.pageList[this.currentIndex])
|
|
|
- //this.initPreviewPageEl('delete')
|
|
|
},
|
|
|
deleteFormatEl(type,position){
|
|
|
if(type==='chart'){
|
|
@@ -821,11 +794,6 @@ export default {
|
|
|
let height = $('.ppt-editor-item')[0].offsetHeight
|
|
|
const index = this.currentIndex
|
|
|
//pptEditor的滚动条动画
|
|
|
- /* this.$refs.pptEditor.scrollTo({
|
|
|
- top:height*index,
|
|
|
- left:0,
|
|
|
- behavior: 'smooth'
|
|
|
- }) */
|
|
|
const pptEditorDom = document.getElementById('pptEditor')
|
|
|
pptEditorDom.scrollTo({
|
|
|
top:height*index,
|
|
@@ -945,19 +913,6 @@ export default {
|
|
|
// type:sandImage 沙盘图 chart 图表 sheet
|
|
|
if(type=='chart'){
|
|
|
//判断选择的图表是否已经插入
|
|
|
- /* const length = this.pageList.length
|
|
|
- for(let i=0;i<length;i++){
|
|
|
- let hasChart = this.pageList[i].elements.some(i=>i.chartId===item.UniqueCode)
|
|
|
- if(hasChart){
|
|
|
- this.$message.warning("该图表已被使用");
|
|
|
- return
|
|
|
- }
|
|
|
- } */
|
|
|
- //限制取消
|
|
|
- /* if(this.chartNum>=this.maxPageChart){
|
|
|
- this.$message.warning("超过可设置的最大图表数,请删除现有图表");
|
|
|
- return;
|
|
|
- } */
|
|
|
this.isChartLoading = true
|
|
|
await this.getchartData(item.UniqueCode);
|
|
|
|
|
@@ -971,8 +926,6 @@ export default {
|
|
|
);
|
|
|
this.chartNum++
|
|
|
this.refleshElements(temp_elements);
|
|
|
- /* const page = this.currentItem
|
|
|
- const pageElements = page.elements.filter(i=>i.type==='chart') */
|
|
|
//优化一下
|
|
|
const tempEls = [{type:'chart',position:addPositions[0],chartId:item.UniqueCode}]
|
|
|
const tempPage = {id:this.currentItem.id,elements:tempEls}
|
|
@@ -1087,11 +1040,6 @@ export default {
|
|
|
},
|
|
|
//手动保存PPT
|
|
|
async handleSave(type){
|
|
|
- /* const {result,hintText} = this.checkPPT()
|
|
|
- if(!result){
|
|
|
- this.$message.warning(hintText)
|
|
|
- return
|
|
|
- } */
|
|
|
//保存走save_checkPPT,发布走checkPPT
|
|
|
let checkResult = null
|
|
|
if(type==='save'){
|
|
@@ -1104,8 +1052,6 @@ export default {
|
|
|
return checkResult
|
|
|
}
|
|
|
let Content = JSON.stringify(this.pageList)
|
|
|
- //console.log(Content)
|
|
|
- //console.log('firstPage',this.firstPage)
|
|
|
const {Title,ReportType,PptDate,BackgroundImg,BackIndex} = this.firstPage
|
|
|
const FirstPage = {
|
|
|
Title,ReportType,PptDate,BackIndex,
|
|
@@ -1130,7 +1076,6 @@ export default {
|
|
|
this.isSaved = false
|
|
|
if(res.Ret===200){
|
|
|
this.$message.success(this.$t('MsgPrompt.add_msg'))
|
|
|
- //this.$router.push({path:'/pptlist'})
|
|
|
this.isSave = true
|
|
|
this.pptId = res.Data.PptId
|
|
|
sessionStorage.removeItem('selectedCatalog')
|
|
@@ -1157,11 +1102,6 @@ export default {
|
|
|
this.isSave = true
|
|
|
this.pptId = res.Data.PptId
|
|
|
//如果ppt已转成双周报,则更新
|
|
|
- /* if(this.ReportId!==0){
|
|
|
- pptInterface.transReport({
|
|
|
- PptId:Number(this.pptId),
|
|
|
- }).then(res=>{})
|
|
|
- } */
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1203,9 +1143,7 @@ export default {
|
|
|
save_checkPPT(){
|
|
|
if(!this.firstPage.Title){
|
|
|
return {result:false,hintText:this.$t('Slides.please_input_cover_title')+'!'}
|
|
|
- }/* else if(!this.firstPage.ReportType){
|
|
|
- return {result:false,hintText:'请输入ppt类型!'}
|
|
|
- } */
|
|
|
+ }
|
|
|
if(this.pageList.length===0){
|
|
|
return {result:false,hintText:this.$t('Slides.least_one_ppt_msg') }
|
|
|
}
|
|
@@ -1216,9 +1154,7 @@ export default {
|
|
|
//检验首页
|
|
|
if(!this.firstPage.Title){
|
|
|
return {result:false,hintText:this.$t('Slides.please_input_cover_title')+'!'}
|
|
|
- }/* else if(!this.firstPage.ReportType){
|
|
|
- return {result:false,hintText:'请输入ppt类型!'}
|
|
|
- } */
|
|
|
+ }
|
|
|
if(this.pageList.length===0){
|
|
|
return {result:false,hintText:this.$t('Slides.least_one_ppt_msg') }
|
|
|
}
|
|
@@ -1430,7 +1366,6 @@ $titleColor:#333333;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
background-size: 100% 100% !important;
|
|
|
- /* background: no-repeat center/cover url(~@/assets/img/ppt_m/bg3.jpg); */
|
|
|
}
|
|
|
}
|
|
|
.hint-box{
|
|
@@ -1492,12 +1427,8 @@ $titleColor:#333333;
|
|
|
position: relative;
|
|
|
align-items: center;
|
|
|
.ppt-item {
|
|
|
- /* width: 835px;
|
|
|
- height: 580px; */
|
|
|
//padding 两边 40 减掉边框两边 8 max-width:100% - 32px
|
|
|
width:calc(100% - 64px);
|
|
|
- /* height: 0;
|
|
|
- padding-bottom: calc(69.408% - 64px); */
|
|
|
background: url('~@/assets/img/pptnextimg.png') no-repeat top;
|
|
|
background-size: 100% 100%;
|
|
|
/* margin-bottom: 30px; */
|
|
@@ -1505,7 +1436,6 @@ $titleColor:#333333;
|
|
|
border: 4px solid transparent;
|
|
|
cursor: pointer;
|
|
|
&.choose {
|
|
|
- // box-shadow: 1px 1px 2px rgba($color: #409eff, $alpha: 0.6);
|
|
|
border: 4px solid rgba($color: #4B8DFF, $alpha: 0.7);
|
|
|
}
|
|
|
.close-btn{
|
|
@@ -1588,24 +1518,19 @@ $titleColor:#333333;
|
|
|
}
|
|
|
}
|
|
|
.chart-tool{
|
|
|
- //btn:40+20,wrapPadding:40 -> 120+100
|
|
|
- //height: calc(100vh - 220px);
|
|
|
flex: 1;
|
|
|
margin-top: 10px;
|
|
|
- // height:calc(100% - 230px);
|
|
|
height: calc(100% - 80px);
|
|
|
.chart-search{
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
.chart-list{
|
|
|
- /* background-color: rgb(82, 106, 106); */
|
|
|
flex: 1;
|
|
|
border:2px solid #EBEBEB;
|
|
|
border-radius: 4px;
|
|
|
overflow-y: scroll;
|
|
|
text-align: center;
|
|
|
.chart-item {
|
|
|
- /* border: 0.5px solid rgba(116, 129, 141,0.1); */
|
|
|
cursor: pointer;
|
|
|
text-align: center;
|
|
|
color: #74818d;
|
|
@@ -1627,11 +1552,6 @@ $titleColor:#333333;
|
|
|
img{
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- // .source-identification{
|
|
|
- // color: #000;
|
|
|
- // text-align: left;
|
|
|
- // padding-left: 12px;
|
|
|
- // }
|
|
|
}
|
|
|
.loaded-text{
|
|
|
height: 20px;
|
|
@@ -1645,7 +1565,6 @@ $titleColor:#333333;
|
|
|
}
|
|
|
.layer-edit-box,.title-edit-box{
|
|
|
flex: 1;
|
|
|
- /* height: calc(100% - 182px); */
|
|
|
padding: 0 20px;
|
|
|
box-sizing: border-box;
|
|
|
border: 2px solid #EBEBEB;
|
|
@@ -1655,7 +1574,6 @@ $titleColor:#333333;
|
|
|
.tool-list{
|
|
|
.el-wrap{
|
|
|
display: flex;
|
|
|
- /* justify-content: space-between; */
|
|
|
gap: 0 15px;
|
|
|
flex-wrap: wrap;
|
|
|
.el-item{
|