浏览代码

Merge branch 'master' into eta1.5.6

Karsa 1 年之前
父节点
当前提交
f1496fa955

+ 2 - 8
src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue

@@ -600,10 +600,6 @@ export default {
           );
           const s_yItem = {
             labels: {
-              formatter: function () {
-                let val = this.value;
-                return index !== 0 ? '' : val;
-              },
               align: 'center',
             },
             title: {
@@ -617,6 +613,7 @@ export default {
             max: Number(this.chartInfo.MaxValue),
             min: Number(this.chartInfo.MinValue),
             ...seasonOptions.yAxis,
+						visible: index===0
           };
           seasonData.push(serie_item);
           seasonYdata.push(s_yItem);
@@ -644,10 +641,6 @@ export default {
           const index = filterArr.findIndex((item) => item.Year === j.Year);
           const s_yItem = {
             labels: {
-              formatter: function () {
-                let val = this.value;
-                return index !== 0 ? '' : val;
-              },
               align: 'center',
             },
             title: {
@@ -661,6 +654,7 @@ export default {
             max: Number(this.chartInfo.MaxValue),
             min: Number(this.chartInfo.MinValue),
             ...seasonOptions.yAxis,
+						visible: index===0
           };
           seasonData.push(serie_item);
           seasonYdata.push(s_yItem);

+ 11 - 16
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -974,7 +974,7 @@ export const chartSetMixin = {
         xDateFormat: '%m/%d',
       }
 
-      let colors = chartTheme&&chartTheme.colorsOptions.reverse();
+      let colors = chartTheme&&chartTheme.colorsOptions.reverse()||seasonOptions.colors;
       this.options = {
         colors: colors.slice(-chartDataHandle.length),
         series: seasonData,
@@ -2231,23 +2231,18 @@ export const chartSetMixin = {
       let dynamic_copyOptions = {
         legend: {
           labelFormatter: function () {
-            let count = 0
-            let reg = ''
-            // let newName = this.name.replace(/-/g, "—").replace(/\s/g, "").replace(reg, "$1<br/>");
-            let newName=''
-            if(this.currentLang == 'ch'){
-              count = widthNum > 1000 ? 510 / 14 : 15;
-              reg = new RegExp("(.{" + parseInt(count) + "})", "g");
-              newName = this.name.replace(/-/g, "—").replace(/\s/g, "").replace(/(/g, "(").replace(/)/g, ")").replace(reg, "$1<br/>");
-            }else{
-              // '<span style="color:#999">无英文名称</span>' 没有填写指标名称 显示为空
-              if(this.name.indexOf('<span style="color:#999">无英文名称</span>')!=-1) this.name=''
-              newName = this.name.replace(/(/g, "(").replace(/)/g, ")");
-            }
-            let finalName=  newName.substring(newName.length - 6, newName.length) === "<br/>)" ? newName.slice(0, newName.length - 6) + ")" : newName;
-            return finalName;
+            let count =  Math.floor(widthNum/2/15);//多少字数换行;
+            let reg2 = new RegExp("(.{" + count + "})", "g");
+              
+            let  newName = this.name.replace(/-/g, "—").replace(/\s/g, "").replace(/(/g, "(").replace(/)/g, ")").replace(reg2, "$1<br/>");
+            return newName;
           },
           itemWidth: widthNum > 1000 ? 530 : 235,
+          itemStyle: {
+            fontSize: 10,
+            color: this.chartInfo.ChartThemeStyle&&JSON.parse(this.chartInfo.ChartThemeStyle).legendOptions.itemStyle.color,
+            textOverflow:undefined
+          },
         },
         seasonLegend: {},
       };

+ 4 - 3
src/views/ppt_manage/mixins/pptMixins.js

@@ -92,8 +92,9 @@ export default {
                 valign:'top'
             })
         }
+        //不需要显示了
         //若contentList为空,则在右下的位置显示标题
-        if(!contentList.length){
+        /* if(!contentList.length){
             cover.addText(
                 [{text:title,options:{fontSize:28*0.75,breakLine:true}}],
                 {
@@ -101,11 +102,11 @@ export default {
                     y:'50%',
                     w:'60%',
                     h:'28%',
-                    color:'333333',
+                    color:'ffffff',
                     align:'center',
                     fontFace:'SimHei'
                 })
-        }
+        } */
         return cover
     },
     //获取基本配置-ppt配置

+ 4 - 3
src/views/ppt_manage/newVersion/components/CustomCover.vue

@@ -18,10 +18,11 @@
                 </div>
             </div>
         </div>
+        <!-- 不需要显示了 -->
         <!-- 如果没有自定义文本,则在右下的位置显示标题 -->
-        <div class="cover-el default" v-if="!coverList.length">
-            <div class="editor-content"><p style="font-size:28px;">{{ pageInfo.Title }}</p></div>
-        </div>
+        <!-- <div class="cover-el default" v-if="!coverList.length">
+            <div class="editor-content"><p style="font-size:28px;color:#fff;">{{ pageInfo.Title }}</p></div>
+        </div> -->
     </div>
 </template>