From 651cc37b98c2f496bbaa42704f801d4ac0af58bb Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期五, 08 十一月 2024 11:39:35 +0800
Subject: [PATCH] time range disabled

---
 src/components/chat/chatComponents/summaryCom/components/recordSet/components/TimeRange.vue |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/components/chat/chatComponents/summaryCom/components/recordSet/components/TimeRange.vue b/src/components/chat/chatComponents/summaryCom/components/recordSet/components/TimeRange.vue
index 005ad19..a9ea3cd 100644
--- a/src/components/chat/chatComponents/summaryCom/components/recordSet/components/TimeRange.vue
+++ b/src/components/chat/chatComponents/summaryCom/components/recordSet/components/TimeRange.vue
@@ -33,8 +33,15 @@
 		<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"
 			>
@@ -61,6 +68,7 @@
 } 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({
@@ -105,6 +113,7 @@
 };
 const quickPickValue = ref<TimeRangeEnum>(null);
 const quickPickRangeClick = (val: TimeRangeEnum) => {
+	if (props.disabled) return;
 	if (quickPickValue.value === val) return;
 
 	quickPickValue.value = val;
@@ -114,6 +123,8 @@
 
 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();
@@ -122,6 +133,8 @@
 };
 
 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();

--
Gitblit v1.9.3