Przeglądaj źródła

fix-季节性图数据单独判断

cxmo 9 miesięcy temu
rodzic
commit
7e29d83311
1 zmienionych plików z 15 dodań i 3 usunięć
  1. 15 3
      src/views/dataEntry_manage/mixins/addOreditMixin.js

+ 15 - 3
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -242,9 +242,21 @@ 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 flag = true
+				data.forEach(d=>{
+					const ValueArr = d.DataList.map(i=>(i.Value||0))
+					const minData = Math.min(...ValueArr)
+					flag = minData>0
+				})
+				return flag
+			}else{
+				//其他图
+				const ValueArr = data.map(i=>(i.Value||0))
+				const minData = Math.min(...ValueArr)
+				return minData>0
+			}
 		},
 		/* 选择指标 获取指标详情并push到表格中*/
 		selectTarget(item,type='') {