Karsa hace 1 año
padre
commit
9941d75d9c

+ 3 - 1
src/views/dataEntry_manage/databaseComponents/computedDialog.vue

@@ -522,7 +522,9 @@ export default {
 						FromTag: item.tag,
 					}));
 
-				let formulaArr = this.formulaList.map(_ => ({f: _.formula,d: _.date}))
+				let formulaArr = this.formulaList
+					.filter((_,index) => index===0||(index>0&&_.formula&&_.date))
+					.map(_ => ({f: _.formula,d: _.date}))
 
 				const { nullValueWay,maxNullWay } = this.nullValueForm;
 				

+ 9 - 2
src/views/predictEdb_manage/components/dynamicRingdiffer.vue

@@ -404,7 +404,11 @@ export default {
 			// 指标id数组
       let target_arr = this.addList.filter(item => item.target);
 			
-			let formula = JSON.stringify(this.formulaList.map(_ => ({f: _.formula,d: _.date})))
+			let formula = JSON.stringify(this.formulaList
+				.filter((_,index) => index===0||(index>0&&_.formula&&_.date))
+				.map(_ => ({f: _.formula,d: _.date}))
+			)
+			
 			this.$emit('ensureBack',{arr:target_arr,formula,...this.nullValueForm})
 			this.cancelHandle();
 		},
@@ -418,7 +422,10 @@ export default {
 				FromTag: _.tag
 			}))
 			const { nullValueWay,maxNullWay } = this.nullValueForm;
-			let formula = JSON.stringify(this.formulaList.map(_ => ({f: _.formula,d: _.date})))
+			let formula = JSON.stringify(this.formulaList
+				.filter((_,index) => index===0||(index>0&&_.formula&&_.date))
+				.map(_ => ({f: _.formula,d: _.date}))
+			)
 
 			const params = {
 				RuleType: 9,