Karsa před 10 měsíci
rodič
revize
1786bb6414

+ 1 - 1
src/views/dataEntry_manage/chartSetting.vue

@@ -177,7 +177,7 @@
 					</div>
 
           <el-collapse v-model="activeNames" class="target-list" v-if="tableData.length">
-            <el-collapse-item v-for="(item,index) in tableData" :key="item.EdbInfoId" :disabled="[2,5,7,10].includes(chartInfo.ChartType)">
+            <el-collapse-item v-for="(item,index) in tableData" :key="item.EdbInfoId" :disabled="![1,4,6].includes(chartInfo.ChartType)">
               <template slot="title">
                 <span class="text_oneLine">{{item.EdbName}}</span>
               </template>

+ 2 - 2
src/views/dataEntry_manage/components/barOptionSection.vue

@@ -312,8 +312,8 @@ export default {
         Name:  _.Name
       }));
       this.sortObj = {
-        sort: Sort.Sort,
-        sortIndex: Sort.DateIndex
+        sort: Sort?Sort.Sort:0,
+        sortIndex: Sort?Sort.DateIndex:''
       }
     }
   }

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

@@ -120,7 +120,7 @@
 							placeholder="请选择所属分类"
 						/>
 					</el-form-item>
-					<el-form-item label="图表单位" prop="Unit" v-if="chartInfo.ChartType===7">
+					<el-form-item label="图表单位" prop="Unit" v-if="[7,11].includes(chartInfo.ChartType)">
 						<el-select
 							v-model="chartInfo.Unit"
 							filterable
@@ -196,7 +196,7 @@
 						<el-checkbox v-model="tableData[0].IsOrder">逆序</el-checkbox>
 					</div>
 
-          <el-collapse v-model="activeNames" class="target-list" v-if="tableData.length&&![7,10].includes(chartInfo.ChartType)">
+          <el-collapse v-model="activeNames" class="target-list" v-if="tableData.length&&![7,10,11].includes(chartInfo.ChartType)">
             <el-collapse-item v-for="(item,index) in tableData" :key="item.EdbInfoId" :disabled="[2,5].includes(chartInfo.ChartType)">
               <template slot="title">
                 <span class="text_oneLine">{{item.EdbName}}</span>
@@ -322,7 +322,7 @@
 						:chartInfo="chartInfo"
 						:edblist="tableData"
 						:datedata="chartInfo.ChartType===7?barDateList:radarChartData.YDataList"
-						:initData="initBarOptions"
+						:initData="chartInfo.ChartType===7?initBarOptions:(chartInfo.ExtraConfig&&JSON.parse(chartInfo.ExtraConfig))"
 						@getData="barOptionPreviewMap"
 					/>
 
@@ -732,7 +732,7 @@ export default {
           this.chartInfo = {
 						...ChartInfo,
 						classify: [ChartInfo.ChartClassify[0].ParentId,...ChartInfo.ChartClassify.map(item => item.ChartClassifyId)],
-						Unit: BarChartInfo ? BarChartInfo.Unit : '',
+						Unit: ChartInfo.ChartType===7 ? BarChartInfo.Unit : ChartInfo.Unit,
 						SourcesFromVisable: ChartInfo.SourcesFrom ? JSON.parse(ChartInfo.SourcesFrom).isShow : true
 					};
 

+ 1 - 1
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -1845,7 +1845,7 @@ export const chartSetMixin = {
         gridLineInterpolation: 'polygon',
         gridLineWidth: 1,
         lineWidth: 0,
-        endOnTick: true,
+        endOnTick: false,
         startOnTick: false,
         showLastLabel: true,
         // tickAmount:4,

+ 1 - 1
src/views/mychart_manage/components/chartDetailDia.vue

@@ -517,7 +517,7 @@
               label="操作"
               key="Copy"
               align="center"
-              v-if="[2,5,7].includes(chartInfo.ChartType)"
+              v-if="chartInfo.Source!==1 || ![1,4,6].includes(chartInfo.ChartType)"
               width="110"
             >
               <template slot-scope="scope">

+ 114 - 1
src/views/ppt_manage/mixins/mixins.js

@@ -75,7 +75,10 @@ export default {
       statisticFrequencyData: {},
 
       /* 跨品种分析图 */
-      crossVarietyChartData: {}
+      crossVarietyChartData: {},
+
+      /* 雷达图 */
+      radarChartData: {}
     }
   },
   methods: {
@@ -1490,6 +1493,116 @@ export default {
       }
     },
 
+    //雷达图数据初始化
+    initRadarData(data) {
+      const { DataResp,EdbInfoList,ChartInfo } = data;
+      
+      this.radarChartData = {
+        YDataList: DataResp.YDataList,
+        XDataList: EdbInfoList.filter(_ => DataResp.XEdbIdValue.includes(_.EdbInfoId))
+      }
+      this.chartLimit = {
+        min: Number(ChartInfo.LeftMin),
+        max: Number(ChartInfo.LeftMax)
+      }
+
+      this.setRadarChart();
+    },
+    /*雷达图绘图*/
+    setRadarChart() {
+      const { YDataList,XDataList } = this.radarChartData;
+
+      /* 主题样式*/
+      const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
+
+      //x轴
+      let xAxis = {
+        lineWidth: 0,
+        tickLength: 0,
+        tickmarkPlacement: 'on',
+        categories: XDataList.map(_ => _.EdbAliasName||_.EdbName),
+        labels: {
+          allowOverlap: true,
+          autoRotationLimit: 40,
+          style: {
+            ...chartTheme&&chartTheme.xAxisOptions.style
+          }
+        }
+      }
+
+      //y轴
+      const { max,min } = this.chartLimit;
+      let yAxis = [{
+        gridLineInterpolation: 'polygon',
+        gridLineWidth: 1,
+        lineWidth: 0,
+        endOnTick: false,
+        startOnTick: false,
+        showLastLabel: true,
+        // tickAmount:4,
+        title: {
+          text:  this.chartInfo.Unit,
+          textCh: this.chartInfo.Unit,
+          textEn: this.chartInfo.UnitEn,
+          align: 'high',
+          rotation: 0,
+          y: 5,
+          x:10,
+          textAlign: 'left',
+          reserveSpace: false,
+          style:{
+            ...chartTheme&&chartTheme.yAxisOptions.style
+          },
+        },
+        labels: {
+          allowOverlap: true,
+          style:{
+            ...chartTheme&&chartTheme.yAxisOptions.style
+          }
+        },
+        min: Number(min),
+        max: Number(max),
+      }]
+
+      //系列
+      let series = [];
+      YDataList.forEach(item => {
+        let serie_item = {
+          data: item.Value,
+          pointPlacement: 'on',
+          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'line',
+          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          yAxis: 0,
+          name: item.Name || item.Date,
+          nameCh: item.Name || item.Date,
+          nameEn: item.Date,
+          color: item.Color,
+          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 1,
+          chartType: 'linear'
+        };
+        series.push(serie_item)
+      })
+
+      this.options = {
+        chart: {
+          ...defaultOpts.chart,
+          ...chartTheme.drawOption,
+          spacing: [2,10,2,10],
+          polar:true,
+        },
+        title: {
+          text:''
+        },
+        pane: {
+          size: '85%'
+        },
+        series,
+        yAxis,
+        xAxis
+      }
+      this.currentLang=='en' && this.changeOptions();
+    },
+
     /* 查询范围为1年内 x轴显示为月/日 否则默认年/月 */
     xTimeDiffer() {
       const end_date =

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

@@ -1,7 +1,9 @@
 /** 图库9.0(智能PPT) 共通逻辑 */
 import Highcharts from "highcharts/highstock";
+import HighchartsMore from 'highcharts/highcharts-more';
 import HighchartszhCN  from '@/utils/highcahrts-zh_CN'
 HighchartszhCN(Highcharts)
+HighchartsMore(Highcharts)
 import { dataBaseInterface,pptInterface } from "@/api/api.js";
 import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
 import {pptEnInterface} from '@/api/modules/pptEnApi.js';
@@ -154,6 +156,8 @@ export default {
         this.chartInfo.ChartType === 7 && this.initBarData(res.Data);
         //截面散点图
         this.chartInfo.ChartType === 10 && this.initSectionScatterData(res.Data);
+        //雷达图
+        this.chartInfo.ChartType === 11 && this.initRadarData(res.Data);
 
         Data.Status && ![7,10].includes(this.chartInfo.ChartType) && this.setOptions();
         Data.Status&&this.setOptionsLang(currentLang)
@@ -489,6 +493,7 @@ export default {
             animation: false,
             backgroundColor: "rgba(0,0,0,0)",
             renderTo:$(`#${refName}`)[0],
+            ...options.chart||{}
           },
           legend: {
             ...defaultOpts.legend,