fix time range

This commit is contained in:
Qiuxia Fan 2022-06-07 17:00:49 +08:00
parent c875c95c20
commit 1d7eb0f0e5

View File

@ -165,7 +165,8 @@ const state = reactive<any>({
}); });
/*global Nullable */ /*global Nullable */
const intervalFn = ref<Nullable<any>>(null); const intervalFn = ref<Nullable<any>>(null);
const rangeTime = computed(() => { function rangeTime() {
{
const times = { const times = {
start: getLocalTime( start: getLocalTime(
appStore.utc, appStore.utc,
@ -179,7 +180,8 @@ const rangeTime = computed(() => {
end: dateFormatStep(times.end, times.step, false), end: dateFormatStep(times.end, times.step, false),
step: times.step, step: times.step,
}; };
}); }
}
onMounted(() => { onMounted(() => {
fetchSelectors(); fetchSelectors();
@ -236,7 +238,7 @@ function searchLogs() {
demandLogStore.setLogCondition({ demandLogStore.setLogCondition({
serviceInstanceId: instance || state.instance.id || "", serviceInstanceId: instance || state.instance.id || "",
container: state.container.value, container: state.container.value,
duration: rangeTime.value, duration: rangeTime(),
keywordsOfContent: keywordsOfContent.value.length keywordsOfContent: keywordsOfContent.value.length
? keywordsOfContent.value ? keywordsOfContent.value
: undefined, : undefined,