|
@@ -10,7 +10,7 @@ import futuresInterface from '@/api/modules/futuresBaseApi';
|
|
import { fittingEquationInterface,statisticFeatureInterface,crossVarietyInterface } from '@/api/modules/chartRelevanceApi';
|
|
import { fittingEquationInterface,statisticFeatureInterface,crossVarietyInterface } from '@/api/modules/chartRelevanceApi';
|
|
import chartRelevanceApi from '@/api/modules/chartRelevanceApi.js';
|
|
import chartRelevanceApi from '@/api/modules/chartRelevanceApi.js';
|
|
import { defaultOpts } from '@/utils/defaultOptions';
|
|
import { defaultOpts } from '@/utils/defaultOptions';
|
|
-import {formatPPTDate,checkPPTpageElemant,getStrSize,isShowPPTTitle,toTextProps,toJson} from '../newVersion/utils/untils.js';
|
|
|
|
|
|
+import {formatPPTDate,checkPPTpageElemant,getStrSize,isShowPPTTitle,toTextProps,toJson,rgbaToHex} from '../newVersion/utils/untils.js';
|
|
import FormatOne from '../newVersion/components/formatPage/FormatOne.vue';
|
|
import FormatOne from '../newVersion/components/formatPage/FormatOne.vue';
|
|
import FormatTwo from '../newVersion/components/formatPage/FormatTwo.vue';
|
|
import FormatTwo from '../newVersion/components/formatPage/FormatTwo.vue';
|
|
import FormatThree from '../newVersion/components/formatPage/FormatThree.vue';
|
|
import FormatThree from '../newVersion/components/formatPage/FormatThree.vue';
|
|
@@ -201,6 +201,9 @@ export default {
|
|
this.chartInfo = Data.ChartInfo;
|
|
this.chartInfo = Data.ChartInfo;
|
|
if(!this.chartInfo) return
|
|
if(!this.chartInfo) return
|
|
if(this.chartInfo.Source === 1) { //常规图
|
|
if(this.chartInfo.Source === 1) { //常规图
|
|
|
|
+ //处理下历史默认来源
|
|
|
|
+ this.setDefaultSourceFrom();
|
|
|
|
+
|
|
this.dataList = Data.EdbInfoList;
|
|
this.dataList = Data.EdbInfoList;
|
|
//柱形图独立数据
|
|
//柱形图独立数据
|
|
this.chartInfo.ChartType === 7 && this.initBarData(res.Data);
|
|
this.chartInfo.ChartType === 7 && this.initBarData(res.Data);
|
|
@@ -370,6 +373,19 @@ export default {
|
|
this.options.xAxis.title.text=this.options.xAxis.title.textEn
|
|
this.options.xAxis.title.text=this.options.xAxis.title.textEn
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ /* 历史图表默认显示图表来源 d毛后端不修复只能自己每次详情处理下*/
|
|
|
|
+ setDefaultSourceFrom() {
|
|
|
|
+ if(!this.chartInfo.SourcesFrom) {
|
|
|
|
+ let themeOpt = JSON.parse(this.chartInfo.ChartThemeStyle);
|
|
|
|
+ this.chartInfo.SourcesFrom = JSON.stringify({
|
|
|
|
+ isShow: true,
|
|
|
|
+ text: this.chartInfo.ChartSource,
|
|
|
|
+ color: themeOpt&&themeOpt.markerOptions.style.color,
|
|
|
|
+ fontSize: themeOpt&&themeOpt.markerOptions.style.fontSize
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
//检查图表英文配置是否完整
|
|
//检查图表英文配置是否完整
|
|
checkChartEnData(){
|
|
checkChartEnData(){
|
|
let result = true
|
|
let result = true
|
|
@@ -510,7 +526,6 @@ export default {
|
|
|
|
|
|
/* 主题样式*/
|
|
/* 主题样式*/
|
|
const chartTheme = ChartThemeStyle ? JSON.parse(ChartThemeStyle) : null;
|
|
const chartTheme = ChartThemeStyle ? JSON.parse(ChartThemeStyle) : null;
|
|
- console.log(chartTheme)
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
let is_linear = options.series
|
|
let is_linear = options.series
|
|
@@ -546,7 +561,7 @@ export default {
|
|
...defaultOpts.legend,
|
|
...defaultOpts.legend,
|
|
...chartTheme&&chartTheme.legendOptions
|
|
...chartTheme&&chartTheme.legendOptions
|
|
},
|
|
},
|
|
- colors: chartTheme&&chartTheme.colorsOptions||defaultOpts.colors,
|
|
|
|
|
|
+ colors: options.colors||chartTheme&&chartTheme.colorsOptions||defaultOpts.colors,
|
|
title: isPublish?{
|
|
title: isPublish?{
|
|
text: isShowTitle?newStr:null,
|
|
text: isShowTitle?newStr:null,
|
|
margin:0,
|
|
margin:0,
|
|
@@ -913,6 +928,23 @@ export default {
|
|
})
|
|
})
|
|
this.setEnName = false
|
|
this.setEnName = false
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ /* 生成ppt时图表追加底部文字 来源/说明 */
|
|
|
|
+ transChartBottomInfo({slide,x,y,width,height},data) {
|
|
|
|
+ // console.log(slide,x,y,width,height)
|
|
|
|
+ if(data.SourcesFrom&&JSON.parse(data.SourcesFrom).isShow) {
|
|
|
|
+ let sourceObj = JSON.parse(data.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',
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
this.getpptConfig()
|
|
this.getpptConfig()
|