wujingjing
2024-11-05 022a757742c70b3106d817461464e821b537e794
src/components/chat/chatComponents/summaryCom/components/recordSet/components/TimeRange.vue
@@ -35,10 +35,10 @@
            @click="quickPickRangeClick(parseInt(item))"
            class="border border-solid rounded-md px-2 cursor-pointer"
            :class="{ 'bg-[#1677ff]': parseInt(item) === quickPickValue, 'text-white': parseInt(item) === quickPickValue }"
            v-for="item in Object.keys(timeRangeEnumMapTitle)"
            v-for="item in Object.keys(timeRangeMapTitle)"
            :key="item"
         >
            {{ timeRangeEnumMapTitle[item] }}
            {{ timeRangeMapTitle[item] }}
         </div>
      </div>
   </div>
@@ -49,8 +49,8 @@
import { definePropType } from 'element-plus/es/utils/vue/props/runtime';
import { ref, type PropType, computed, watch, nextTick } from 'vue';
import type { TimeRangeParam } from '../types';
import type { TimeRangeEnum } from './types';
import { timeRangeEnumMapTitle, timeRangeEnumMapValue } from './types';
import { TimeRangeEnum, TimeStepValue, monthTimeRangeEnumMapTitle } from './types';
import { dayTimeRangeEnumMapTitle, timeRangeEnumMapValue } from './types';
import {
   CURRENT_DAY,
   DEFAULT_FORMATS_DATE,
@@ -72,6 +72,19 @@
      default: false,
   },
});
const getRangeMapTitle = (timeStep: TimeStepValue) => {
   switch (timeStep) {
      case TimeStepValue.Day:
         return dayTimeRangeEnumMapTitle;
      case TimeStepValue.Month:
         return monthTimeRangeEnumMapTitle;
      default:
         return dayTimeRangeEnumMapTitle;
   }
};
const timeRangeMapTitle = getRangeMapTitle(props.data?.origin?.time_step);
const dateValue = defineModel({
   type: definePropType<[string, string]>(Array),
});