|
@@ -164,26 +164,9 @@ export default {
|
|
selectTarget(item,type='') {
|
|
selectTarget(item,type='') {
|
|
if(!item) return
|
|
if(!item) return
|
|
|
|
|
|
-
|
|
+
|
|
- if(this.chartInfo.ChartType === 7) return this.setBarEdbList(item);
|
|
+ if([7,11].includes(this.chartInfo.ChartType)) return this.setBarEdbList(item);
|
|
-
|
|
+
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
let dateArray=this.chartInfo.ChartType==2?this.season_year:this.select_date
|
|
let dateArray=this.chartInfo.ChartType==2?this.season_year:this.select_date
|
|
|
|
|
|
let params = {
|
|
let params = {
|
|
@@ -237,7 +220,7 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
+
|
|
setBarEdbList(edb) {
|
|
setBarEdbList(edb) {
|
|
let have_bol = this.tableData.some(item => item.EdbInfoId === edb.EdbInfoId);
|
|
let have_bol = this.tableData.some(item => item.EdbInfoId === edb.EdbInfoId);
|
|
|
|
|
|
@@ -247,7 +230,16 @@ export default {
|
|
this.search_txt = '';
|
|
this.search_txt = '';
|
|
this.chartInfo.Unit = this.chartInfo.Unit||edb.Unit
|
|
this.chartInfo.Unit = this.chartInfo.Unit||edb.Unit
|
|
this.tableData.push(edb)
|
|
this.tableData.push(edb)
|
|
|
|
+ },
|
|
|
|
|
|
|
|
+
|
|
|
|
+ barOptionPreviewMap(data) {
|
|
|
|
+ let tyepeMapApi = {
|
|
|
|
+ 7: this.getBarPreviewData,
|
|
|
|
+ 11: this.getRadarPreviewData
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ tyepeMapApi[this.chartInfo.ChartType](data);
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
@@ -290,8 +282,50 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
- getRadarPreviewData() {
|
|
+ async getRadarPreviewData({dateList}) {
|
|
|
|
+ if(this.tableData.length<3 || !dateList.length) return
|
|
|
|
+
|
|
|
|
+ let parmas = {
|
|
|
|
+ ChartEdbInfoList: this.tableData.map(_ => ({
|
|
|
|
+ EdbInfoId: _.EdbInfoId,
|
|
|
|
+ EdbAliasName:_.EdbAliasName
|
|
|
|
+ })),
|
|
|
|
+ ExtraConfig: JSON.stringify({ DateList: dateList})
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const res = await dataBaseInterface.getRadarPreviewData(parmas)
|
|
|
|
+
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+
|
|
|
|
+ const { DataResp,EdbInfoList,ChartInfo } = res.Data;
|
|
|
|
+
|
|
|
|
+ console.log(JSON.parse(this.chartInfo.ChartThemeStyle))
|
|
|
|
+
|
|
|
|
+ this.chartInfo.SourcesFrom = JSON.stringify({
|
|
|
|
+ isShow: true,
|
|
|
|
+ text: ChartInfo.ChartSource,
|
|
|
|
+ color: JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.color,
|
|
|
|
+ fontSize: JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.fontSize
|
|
|
|
+ });
|
|
|
|
|
|
|
|
+ this.radarChartData = {
|
|
|
|
+ YDataList: DataResp.YDataList,
|
|
|
|
+ XDataList: EdbInfoList.filter(_ => DataResp.XEdbIdValue.includes(_.EdbInfoId))
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(!this.chartInfo.LeftMin) {
|
|
|
|
+ const value_arr = this.radarChartData.YDataList.map(_ => _.Value).flat(Infinity)
|
|
|
|
+
|
|
|
|
+ this.chartLimit = {
|
|
|
|
+ min: Math.min(...value_arr),
|
|
|
|
+ max: Math.max(...value_arr)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.setRadarChart()
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
@@ -656,10 +690,27 @@ export default {
|
|
}))
|
|
}))
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ case 11:
|
|
|
|
+ return {
|
|
|
|
+ ...public_param,
|
|
|
|
+ DateType: 6,
|
|
|
|
+ Unit: this.chartInfo.Unit,
|
|
|
|
+ LeftMin: String(this.chartLimit.min),
|
|
|
|
+ LeftMax: String(this.chartLimit.max),
|
|
|
|
+ ExtraConfig: JSON.stringify({
|
|
|
|
+ DateList: this.$refs.BarOptRef.dateList.map(item => ({
|
|
|
|
+ Type: item.Type,
|
|
|
|
+ Date: item.Date,
|
|
|
|
+ Value: item.Value,
|
|
|
|
+ Name: item.Name,
|
|
|
|
+ Color: item.Color
|
|
|
|
+ })),
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
+
|
|
changeUnit(val) {
|
|
changeUnit(val) {
|
|
if(!this.options.series) return
|
|
if(!this.options.series) return
|
|
|
|
|
|
@@ -782,7 +833,8 @@ export default {
|
|
|
|
|
|
const chartTypeMap = {
|
|
const chartTypeMap = {
|
|
7: this.setBarChart,
|
|
7: this.setBarChart,
|
|
- 10: this.setSectionScatterChart
|
|
+ 10: this.setSectionScatterChart,
|
|
|
|
+ 11: this.setRadarChart
|
|
}
|
|
}
|
|
chartTypeMap[this.chartInfo.ChartType]
|
|
chartTypeMap[this.chartInfo.ChartType]
|
|
? chartTypeMap[this.chartInfo.ChartType]()
|
|
? chartTypeMap[this.chartInfo.ChartType]()
|