Explorar o código

图表别名接口联调

cxmo hai 4 meses
pai
achega
92666fca2c

+ 4 - 4
src/views/dataEntry_manage/addChart.vue

@@ -123,9 +123,9 @@
 						/>
 					</el-form-item>
 					<!-- 图表别名 英文文案还没给-->
-					<el-form-item label="图表别名" prop="ChartOtherName" v-if="[1,5,6].includes(chartInfo.ChartType)">
+					<el-form-item label="图表别名" prop="ChartAlias" v-if="[1,5,6].includes(chartInfo.ChartType)">
 						<el-input
-							v-model="chartInfo.ChartOtherName"
+							v-model="chartInfo.ChartAlias"
 							style="width: 90%"
 							placeholder="请输入图表别名"
 							clearable
@@ -864,7 +864,7 @@ export default {
 					}
 					
 
-					const { ChartType,ChartName,ChartThemeId,SourcesFrom,Instructions,MarkersLines,MarkersAreas,ChartThemeStyle,ChartOtherName } = this.chartInfo;
+					const { ChartType,ChartName,ChartThemeId,SourcesFrom,Instructions,MarkersLines,MarkersAreas,ChartThemeStyle,ChartAlias } = this.chartInfo;
 					let public_param = {
 						ChartClassifyId: this.chartInfo.classify.length ? this.chartInfo.classify[this.chartInfo.classify.length - 1] : 0,
 						ChartEdbInfoList: db_arr,
@@ -876,7 +876,7 @@ export default {
 						MarkersLines,
 						MarkersAreas,
 						ChartThemeStyle,
-						ChartOtherName,//别名
+						ChartAlias,//别名
 					}
 
 					//提交参数

+ 4 - 4
src/views/dataEntry_manage/editChart.vue

@@ -131,9 +131,9 @@
 						/>
 					</el-form-item>
 					<!-- 图表别名 英文文案还没给-->
-					<el-form-item label="图表别名" prop="ChartOtherName" v-if="[1,5,6].includes(chartInfo.ChartType)">
+					<el-form-item label="图表别名" prop="ChartAlias" v-if="[1,5,6].includes(chartInfo.ChartType)">
 						<el-input
-							v-model="chartInfo.ChartOtherName"
+							v-model="chartInfo.ChartAlias"
 							style="width: 90%"
 							placeholder="请输入图表别名"
 							clearable
@@ -975,7 +975,7 @@ export default {
 						})
 					}
 
-					const { ChartType,ChartName,ChartThemeId,SourcesFrom,Instructions,MarkersLines,MarkersAreas,ChartThemeStyle,ChartOtherName } = this.chartInfo;
+					const { ChartType,ChartName,ChartThemeId,SourcesFrom,Instructions,MarkersLines,MarkersAreas,ChartThemeStyle,ChartAlias } = this.chartInfo;
 					let public_param = {
 						ChartClassifyId: this.chartInfo.classify.length ? this.chartInfo.classify[this.chartInfo.classify.length - 1] : 0,
 						ChartInfoId: this.chartInfo.ChartInfoId,
@@ -988,7 +988,7 @@ export default {
 						MarkersLines,
 						MarkersAreas,
 						ChartThemeStyle,
-						ChartOtherName,//别名
+						ChartAlias,//别名
 					}
 
 					//提交参数

+ 5 - 5
src/views/ppt_manage/mixins/pptMixins.js

@@ -367,7 +367,7 @@ export default {
                             Instructions: this.chartInfo.Instructions,
                             SourcesFrom: this.chartInfo.SourcesFrom,
                             ChartThemeStyle: this.chartInfo.ChartThemeStyle,
-                            ChartOtherName:this.chartInfo.ChartOtherName||'别名,我是别名',//图表别名
+                            ChartAlias:this.chartInfo.ChartAlias||'',//图表别名
                           }
         this.optionMap[id] = { ...defaultOpts, ...this.options,...otherOpts };
       }else{
@@ -758,16 +758,16 @@ export default {
         //一行可容纳的中文字体数
         const fontSize = chartTheme?chartTheme.titleOptions.style.fontSize:16
         let count = parseInt($(`#${refName}`)[0].offsetWidth / fontSize)*1.75
-        let {total,newStr} = getStrSize(isShowTitle?options.MyChartTitle:isShowOtherTitle?options.ChartOtherName:'',count)
+        let {total,newStr} = getStrSize(isShowTitle?options.MyChartTitle:isShowOtherTitle?options.ChartAlias:'',count)
         const isPublish = this.$route.path==='/pptpublish'||this.$route.path==='/pptenpublish'
-        if(isShowTitle||isShowOtherTitle){
+        if(isShowTitle||(isShowOtherTitle&&options.ChartAlias.length)){
           titleHTML = `<div style="
             text-align:${chartTheme&&chartTheme.titleOptions.align};
             font-size:${chartTheme&&chartTheme.titleOptions.style.fontSize}px;
             color:${chartTheme&&chartTheme.titleOptions.style.color};
             min-height:18px;word-break: break-all;
           ">
-            ${isShowTitle?options.MyChartTitle:isShowOtherTitle?options.ChartOtherName:''}
+            ${isShowTitle?options.MyChartTitle:isShowOtherTitle?options.ChartAlias:''}
           </div>`
         }
         let SpecialOption = {
@@ -786,7 +786,7 @@ export default {
           },
           colors: options.colors||chartTheme&&chartTheme.colorsOptions||defaultOpts.colors,
           title: isPublish?{
-            text: isShowTitle?newStr:null,
+            text: (isShowTitle||(isShowOtherTitle&&options.ChartAlias.length))?newStr:null,
             margin:5,
             useHTML:false,
             style:{...chartTheme&&chartTheme.titleOptions.style},