| | |
| | | <div class="ml-2 inline-flex items-center space-x-2 text-[14px]"> |
| | | <div |
| | | @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 }" |
| | | class="border border-solid rounded-md px-2 py-1 cursor-pointer" |
| | | :class="{ |
| | | 'bg-[#1677ff]': parseInt(item) === quickPickValue, |
| | | 'text-white': parseInt(item) === quickPickValue, |
| | | 'bg-[#f5f7fa]': isSharePage, |
| | | 'text-[#a9acb3]': isSharePage, |
| | | 'border-[#dcdfe6]': isSharePage, |
| | | '!cursor-not-allowed': isSharePage, |
| | | }" |
| | | v-for="item in Object.keys(timeRangeMapTitle)" |
| | | :key="item" |
| | | > |
| | |
| | | } from '/@/components/form/datepicker/constants'; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | import moment from 'moment'; |
| | | import { isSharePage } from '/@/stores/chatRoom'; |
| | | |
| | | const valueFormat = DEFAULT_FORMATS_DATE + ' ' + DEFAULT_FORMATS_TIME; |
| | | const props = defineProps({ |
| | |
| | | }; |
| | | const quickPickValue = ref<TimeRangeEnum>(null); |
| | | const quickPickRangeClick = (val: TimeRangeEnum) => { |
| | | if (props.disabled) return; |
| | | if (quickPickValue.value === val) return; |
| | | |
| | | quickPickValue.value = val; |
| | |
| | | |
| | | const offsetClickIsAllow = computed(() => !!dateValue.value && !props.disabled); |
| | | const preDayClick = () => { |
| | | if (props.disabled) return; |
| | | |
| | | if (!dateValue.value) return; |
| | | dateValue.value[0] = moment(dateValue.value[0]).subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'); |
| | | dateChange(); |
| | |
| | | }; |
| | | |
| | | const nextDayClick = () => { |
| | | if (props.disabled) return; |
| | | |
| | | if (!dateValue.value) return; |
| | | dateValue.value[1] = moment(dateValue.value[1]).add(1, 'day').format('YYYY-MM-DD HH:mm:ss'); |
| | | dateChange(); |