|
@@ -186,7 +186,7 @@ export default {
|
|
|
}
|
|
|
//如果类型为对数,检测数据是否包含负数
|
|
|
if(ConvertType===3){
|
|
|
- if(!this.checkEdbData(this.tableData[index].DataList)){
|
|
|
+ if(!this.checkEdbData(this.tableData[index].DataList||[])){
|
|
|
this.updateData[index].IsConvert = false
|
|
|
return this.$message.warning("指标数据含有负数或0,无法进行对数运算")
|
|
|
}
|
|
@@ -245,9 +245,22 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
checkEdbData(data){
|
|
|
- const ValueArr = data.map(i=>(i.Value||0))
|
|
|
- const minData = Math.min(...ValueArr)
|
|
|
- return minData>0
|
|
|
+ //季节性图要遍历data 取下一层的DataList
|
|
|
+ if(this.chartInfo.ChartType===2){
|
|
|
+ let minDataArr = []
|
|
|
+ data.forEach(d=>{
|
|
|
+ const DataList = d.DataList||[]
|
|
|
+ const ValueArr = DataList.map(i=>(i.Value||0))
|
|
|
+ const minData = Math.min(...ValueArr)
|
|
|
+ minDataArr.push(minData)
|
|
|
+ })
|
|
|
+ return Math.min(...minDataArr)>0
|
|
|
+ }else{
|
|
|
+ //其他图
|
|
|
+ const ValueArr = data.map(i=>(i.Value||0))
|
|
|
+ const minData = Math.min(...ValueArr)
|
|
|
+ return minData>0
|
|
|
+ }
|
|
|
},
|
|
|
/* 选择指标 获取指标详情并push到表格中*/
|
|
|
selectTarget(item,type='') {
|