Commit 6adbfa5e3805cf9fc1a8b8ccc7bc05a5d2fce7c1

Authored by ww
1 parent eff85365

fix(DEFECT-1273): 修复日期区间时间段起始结尾时间

@@ -136,7 +136,9 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { @@ -136,7 +136,9 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => {
136 136
137 if (Reflect.has(value, BuiltInVariable.DATE_RANGE)) { 137 if (Reflect.has(value, BuiltInVariable.DATE_RANGE)) {
138 const fieldMapping = unref(getParams).find(item => item.key === BuiltInVariable.DATE_RANGE) 138 const fieldMapping = unref(getParams).find(item => item.key === BuiltInVariable.DATE_RANGE)
139 - const [start, end] = ((fieldMapping || {}).value || '').split(GROUP_SEPARATOR) 139 + let [start, end] = ((fieldMapping || {}).value || '').split(GROUP_SEPARATOR)
  140 + start = start ? start : SelectTimeAggregationFieldEnum.START_TS
  141 + end = end ? end : SelectTimeAggregationFieldEnum.END_TS
140 const dateRangeValue = value[BuiltInVariable.DATE_RANGE] 142 const dateRangeValue = value[BuiltInVariable.DATE_RANGE]
141 const [startValue, endValue] = isArray(dateRangeValue) ? dateRangeValue : [null, null] 143 const [startValue, endValue] = isArray(dateRangeValue) ? dateRangeValue : [null, null]
142 value[start] = startValue 144 value[start] = startValue
@@ -404,7 +406,9 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => { @@ -404,7 +406,9 @@ export const useDynamicPublicForm = (paramsItemList: Ref<ParamsItemType[]>) => {
404 const setParams = (Params: Recordable = {}) => { 406 const setParams = (Params: Recordable = {}) => {
405 for (const { key, value, mores } of unref(getParams)) { 407 for (const { key, value, mores } of unref(getParams)) {
406 const splitKeys = value ? value.split(GROUP_SEPARATOR) : (key || '').split(GROUP_SEPARATOR) 408 const splitKeys = value ? value.split(GROUP_SEPARATOR) : (key || '').split(GROUP_SEPARATOR)
407 - const [ start, end ] = splitKeys 409 + let [start, end] = splitKeys
  410 + start = start ? start : SelectTimeAggregationFieldEnum.START_TS
  411 + end = end ? end : SelectTimeAggregationFieldEnum.END_TS
408 if (isDateComponent(key as BuiltInVariable)) { 412 if (isDateComponent(key as BuiltInVariable)) {
409 if (key as BuiltInVariable === BuiltInVariable.DATE_FIXED) { 413 if (key as BuiltInVariable === BuiltInVariable.DATE_FIXED) {
410 params[key] = Params[start] || null 414 params[key] = Params[start] || null