|
@@ -8,13 +8,28 @@
|
|
</div> -->
|
|
</div> -->
|
|
<el-button type="primary" plain style="width:182px;height:40px;" @click="$router.push({path:'/pptlist'})">{{$t('Slides.return_to_list')}}</el-button>
|
|
<el-button type="primary" plain style="width:182px;height:40px;" @click="$router.push({path:'/pptlist'})">{{$t('Slides.return_to_list')}}</el-button>
|
|
<!-- <el-button type="primary" style="width:182px;height:40px;margin-left: 0;" @click="downloadPPT" :disabled="isPublish">{{$t('Slides.operations_download')}}</el-button> -->
|
|
<!-- <el-button type="primary" style="width:182px;height:40px;margin-left: 0;" @click="downloadPPT" :disabled="isPublish">{{$t('Slides.operations_download')}}</el-button> -->
|
|
- <el-dropdown split-button style="width:182px;height:40px;" type="primary" @command="(command)=>{setCompression = command}" @click="downloadPPT">
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 下载配置 -->
|
|
|
|
+ <div class="setting">
|
|
|
|
+ <div>
|
|
|
|
+ <span>是否压缩</span>
|
|
|
|
+ <el-radio v-model="setCompression" :label="true">是</el-radio>
|
|
|
|
+ <el-radio v-model="setCompression" :label="false">否</el-radio>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <span>图表转换优化</span>
|
|
|
|
+ <el-radio v-model="setCompression2" :label="true">开</el-radio>
|
|
|
|
+ <el-radio v-model="setCompression2" :label="false">关</el-radio>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <el-button type="primary" style="width:182px;height:40px;margin-left: 0;" @click="downloadPPT" :disabled="isPublish">{{$t('Slides.operations_download')}}</el-button>
|
|
|
|
+ <!-- <el-dropdown split-button style="width:182px;height:40px;" type="primary" @command="(command)=>{setCompression = command}" @click="downloadPPT">
|
|
{{setCompression?'下载(压缩版)':'下载'}}
|
|
{{setCompression?'下载(压缩版)':'下载'}}
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-item :command="false">不压缩</el-dropdown-item>
|
|
<el-dropdown-item :command="false">不压缩</el-dropdown-item>
|
|
<el-dropdown-item :command="true">压缩</el-dropdown-item>
|
|
<el-dropdown-item :command="true">压缩</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
- </el-dropdown>
|
|
|
|
|
|
+ </el-dropdown> -->
|
|
<el-dropdown split-button style="width:182px;height:40px;" type="primary" @click="transHandle" @command="handleCommand" :disabled="isPublish">
|
|
<el-dropdown split-button style="width:182px;height:40px;" type="primary" @click="transHandle" @command="handleCommand" :disabled="isPublish">
|
|
{{layoutStr}}
|
|
{{layoutStr}}
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-menu slot="dropdown">
|
|
@@ -72,7 +87,7 @@ import Cover from './components/Cover.vue';
|
|
import CustomCover from './components/CustomCover.vue';
|
|
import CustomCover from './components/CustomCover.vue';
|
|
import TransReport from './components/catalog/transReport.vue';
|
|
import TransReport from './components/catalog/transReport.vue';
|
|
//import {pageList} from './utils/mock';
|
|
//import {pageList} from './utils/mock';
|
|
-import {countComponentName,pptConfigInit,toTextProps,toJson,svg2Base64,getImgRealSize,calcScale,countStrSize,getShapeOptions,createRandomCode,getTableData,getChartInfo,pptInit,rgbaToHex } from './utils/untils';
|
|
|
|
|
|
+import {countComponentName,pptConfigInit,toTextProps,toJson,svg2Base64,svgData2Base64,getImgRealSize,calcScale,countStrSize,getShapeOptions,createRandomCode,getTableData,getChartInfo,pptInit,rgbaToHex } from './utils/untils';
|
|
import {marginTop,modelConfig,pptSlideMaster} from './utils/config';
|
|
import {marginTop,modelConfig,pptSlideMaster} from './utils/config';
|
|
import pptmixin from '../mixins/pptMixins';
|
|
import pptmixin from '../mixins/pptMixins';
|
|
import mixins from '../mixins/mixins';
|
|
import mixins from '../mixins/mixins';
|
|
@@ -127,6 +142,7 @@ export default {
|
|
transChartType:2,//生成PPT时,转换动态图表的方式:1.将svg传至服务端转换;2.调用changeUrl转换
|
|
transChartType:2,//生成PPT时,转换动态图表的方式:1.将svg传至服务端转换;2.调用changeUrl转换
|
|
|
|
|
|
setCompression:false,
|
|
setCompression:false,
|
|
|
|
+ setCompression2:false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch:{
|
|
watch:{
|
|
@@ -320,8 +336,9 @@ export default {
|
|
imgData = Data.ResourceUrl
|
|
imgData = Data.ResourceUrl
|
|
}else if(this.transChartType===2){
|
|
}else if(this.transChartType===2){
|
|
//将svgDom转为base64 png,返回一个base64字符串
|
|
//将svgDom转为base64 png,返回一个base64字符串
|
|
- imgData = await this.changeUrl(`chart_${i}_${elements[j].position}`)
|
|
|
|
|
|
+ //imgData = await this.changeUrl(`chart_${i}_${elements[j].position}`)
|
|
//imgData = svg2Base64($(`#chart_${i}_${elements[j].position} svg`)[0])//生成的svg背景色是黑色不是透明
|
|
//imgData = svg2Base64($(`#chart_${i}_${elements[j].position} svg`)[0])//生成的svg背景色是黑色不是透明
|
|
|
|
+ imgData = this.setCompression2?svgData2Base64(this.chartSVGDataMap[elements[j].chartId]):await this.changeUrl(`chart_${i}_${elements[j].position}`)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (elements[j].type === 'text'){
|
|
} else if (elements[j].type === 'text'){
|