|
@@ -59,7 +59,7 @@ import Cover from './components/Cover.vue';
|
|
|
import CustomCover from './components/CustomCover.vue';
|
|
|
import TransReport from './components/catalog/transReport.vue';
|
|
|
//import {pageList} from './utils/mock';
|
|
|
-import {countComponentName,pptConfigInit,toTextProps,toJson,svg2Base64,getImgRealSize,calcScale,getShapeOptions,createRandomCode,getTableData,getChartInfo} from './utils/untils';
|
|
|
+import {countComponentName,pptConfigInit,toTextProps,toJson,svg2Base64,getImgRealSize,calcScale,getShapeOptions,createRandomCode,getTableData,getChartInfo,pptInit,rgbaToHex } from './utils/untils';
|
|
|
import {marginTop,modelConfig,pptSlideMaster} from './utils/config';
|
|
|
import pptmixin from '../mixins/pptMixins';
|
|
|
import mixins from '../mixins/mixins';
|
|
@@ -321,6 +321,20 @@ export default {
|
|
|
|
|
|
//追加生成图表底部文字
|
|
|
this.transChartBottomInfo({slide,x,y,width,height},this.optionMap[this.pageList[i].elements[j].chartId])
|
|
|
+ let chartData = this.optionMap[this.pageList[i].elements[j].chartId]
|
|
|
+ if(chartData.SourcesFrom&&JSON.parse(chartData.SourcesFrom).isShow) {
|
|
|
+ let sourceObj = JSON.parse(chartData.SourcesFrom);
|
|
|
+
|
|
|
+ slide.addText(`来源:${sourceObj.text}`,{
|
|
|
+ x:x,
|
|
|
+ y:height,
|
|
|
+ w:width,
|
|
|
+ h:20,
|
|
|
+ fontSize: sourceObj.fontSize,
|
|
|
+ color: sourceObj.color.includes('rgb') ? rgbaToHex(sourceObj.color).color.substring(1) : '666',
|
|
|
+ })
|
|
|
+ console.log(x,y,width,height)
|
|
|
+ }
|
|
|
|
|
|
}else if (textData){
|
|
|
slide.addText(textData,{
|