Commit 32bfcca692f66d0e4290322bbcd81067286384a1

Authored by fengwotao
1 parent 08ab7d72

perf(external/Composes): 修复日期区间如果聚合条件为空的话,日期区间验证还存在问题

@@ -312,11 +312,18 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { @@ -312,11 +312,18 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => {
312 return [{ 312 return [{
313 trigger: ['blur', 'change'], 313 trigger: ['blur', 'change'],
314 validator() { 314 validator() {
  315 + /**
  316 + * ft 修改在公共接口下拉框里加上接口类型
  317 + * 修改后的代码在注释之间,并标注好源代码和修改后代码,方便回溯
  318 + * 源代码 record[SelectTimeAggregationFieldEnum.INTERVAL]
  319 + * 修改后代码在//ft之间 record[SelectTimeAggregationFieldEnum.AGG]!=='NONE'?record[SelectTimeAggregationFieldEnum.INTERVAL]:[]
  320 + */
315 const record = params[BuiltInVariable.SELECT_TIME_AGGREGATION] 321 const record = params[BuiltInVariable.SELECT_TIME_AGGREGATION]
316 - if (required && ![record[SelectTimeAggregationFieldEnum.AGG], record[SelectTimeAggregationFieldEnum.INTERVAL], record[SelectTimeAggregationFieldEnum.END_TS], record[SelectTimeAggregationFieldEnum.START_TS]].every(Boolean)) { 322 + if (required && ![record[SelectTimeAggregationFieldEnum.AGG],record[SelectTimeAggregationFieldEnum.AGG]!=='NONE'?record[SelectTimeAggregationFieldEnum.INTERVAL]:[], record[SelectTimeAggregationFieldEnum.END_TS], record[SelectTimeAggregationFieldEnum.START_TS]].every(Boolean)) {
317 validFlag.value = false 323 validFlag.value = false
318 return new Error(`${message}需要填写完整`) 324 return new Error(`${message}需要填写完整`)
319 } 325 }
  326 + //ft
320 validFlag.value = true 327 validFlag.value = true
321 } 328 }
322 }] as FormItemRule 329 }] as FormItemRule