@opendesign-plus-test/components 0.0.1-rc.64 → 0.0.1-rc.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +1 -0
- package/dist/components/meeting/types.d.ts +1 -0
- package/dist/components.cjs.js +23 -23
- package/dist/components.es.js +960 -957
- package/package.json +1 -1
- package/src/components/meeting/OMeetingCalendar.vue +13 -9
- package/src/components/meeting/components/OMeetingCalendarList.vue +7 -6
- package/src/components/meeting/types.ts +1 -0
package/package.json
CHANGED
|
@@ -84,15 +84,15 @@ const getSummitData = async (date: string) => {
|
|
|
84
84
|
let cur = dayjs(v.start_date);
|
|
85
85
|
const end = dayjs(v.end_date);
|
|
86
86
|
while (!cur.isAfter(end)) {
|
|
87
|
-
dates.push(cur
|
|
87
|
+
dates.push(formatDate(cur));
|
|
88
88
|
cur = cur.add(1, 'day');
|
|
89
89
|
}
|
|
90
90
|
return {
|
|
91
91
|
...v,
|
|
92
92
|
dates,
|
|
93
93
|
type: CalendarDataType.SUMMIT,
|
|
94
|
-
start_date_time: `${ formatDate(v.start_date) } ${ v.start || '' }`,
|
|
95
|
-
end_date_time: `${ formatDate(v.end_date) } ${ v.end || '' }`,
|
|
94
|
+
start_date_time: `${ props.disableFormat ? v.start_date : formatDate(v.start_date) } ${ v.start || '' }`,
|
|
95
|
+
end_date_time: `${ props.disableFormat ? v.end_date : formatDate(v.end_date) } ${ v.end || '' }`,
|
|
96
96
|
};
|
|
97
97
|
});
|
|
98
98
|
} else {
|
|
@@ -108,15 +108,15 @@ const getActivityData = async (date: string) => {
|
|
|
108
108
|
let cur = dayjs(v.start_date);
|
|
109
109
|
const end = dayjs(v.end_date);
|
|
110
110
|
while (!cur.isAfter(end)) {
|
|
111
|
-
dates.push(cur
|
|
111
|
+
dates.push(formatDate(cur));
|
|
112
112
|
cur = cur.add(1, 'day');
|
|
113
113
|
}
|
|
114
114
|
return {
|
|
115
115
|
...v,
|
|
116
116
|
dates,
|
|
117
117
|
type: CalendarDataType.EVENTS,
|
|
118
|
-
start_date_time: `${ formatDate(v.start_date) } ${ v.start || '' }`,
|
|
119
|
-
end_date_time: `${ formatDate(v.end_date) } ${ v.end || '' }`,
|
|
118
|
+
start_date_time: `${ props.disableFormat ? v.start_date : formatDate(v.start_date) } ${ v.start || '' }`,
|
|
119
|
+
end_date_time: `${ props.disableFormat ? v.end_date : formatDate(v.end_date) } ${ v.end || '' }`,
|
|
120
120
|
};
|
|
121
121
|
});
|
|
122
122
|
} else {
|
|
@@ -170,8 +170,8 @@ const paramGetDaysData = async (params: { date: string; type: string }) => {
|
|
|
170
170
|
const renderData = computed(() => {
|
|
171
171
|
return [
|
|
172
172
|
...meetingData.value,
|
|
173
|
-
...eventsData.value.filter(v => (!dayjs(v.start_date).isAfter(dayjs(currentDay.value)) && !dayjs(currentDay.value).isAfter(dayjs(v.end_date))) || v.dates?.includes(currentDay.value)),
|
|
174
|
-
...summitData.value.filter(v => v.dates?.includes(currentDay.value)),
|
|
173
|
+
...eventsData.value.filter(v => (!dayjs(v.start_date).isAfter(dayjs(currentDay.value)) && !dayjs(currentDay.value).isAfter(dayjs(v.end_date))) || v.dates?.includes(formatDate(currentDay.value))),
|
|
174
|
+
...summitData.value.filter(v => v.dates?.includes(formatDate(currentDay.value))),
|
|
175
175
|
].filter((v) => {
|
|
176
176
|
if (tabType.value === CalendarDataType.ALL) {
|
|
177
177
|
return true;
|
|
@@ -413,7 +413,11 @@ defineExpose({
|
|
|
413
413
|
<OScroller class="meeting-list" show-type="hover" size="small" :style="{
|
|
414
414
|
'--height': calendarHeight
|
|
415
415
|
}">
|
|
416
|
-
<OMeetingCalendarList
|
|
416
|
+
<OMeetingCalendarList
|
|
417
|
+
:list="renderData as unknown as MeetingItemT[]"
|
|
418
|
+
:groupType="groupType"
|
|
419
|
+
:disableFormat="disableFormat"
|
|
420
|
+
>
|
|
417
421
|
<template #empty>
|
|
418
422
|
<slot name="empty"></slot>
|
|
419
423
|
</template>
|
|
@@ -24,6 +24,7 @@ const { activityTypeMap } = useActivityConfig();
|
|
|
24
24
|
const props = withDefaults(defineProps<{
|
|
25
25
|
list: MeetingItemT[];
|
|
26
26
|
groupType?: MeetingGroupType;
|
|
27
|
+
disableFormat?: boolean;
|
|
27
28
|
}>(), {
|
|
28
29
|
list: () => [],
|
|
29
30
|
});
|
|
@@ -94,15 +95,15 @@ const computedList = computed<any[]>(() => {
|
|
|
94
95
|
let activity_type = activityTypeMap.value.get(v.activity_type)?.label;
|
|
95
96
|
if (v.start && v.end) {
|
|
96
97
|
if (v.end_date === v.start_date) {
|
|
97
|
-
dateRange = `${ formatDate(v.start_date) } ${ v.start }
|
|
98
|
+
dateRange = `${ props.disableFormat ? v.start_date : formatDate(v.start_date) } ${ v.start } - ${ v.end }`;
|
|
98
99
|
} else {
|
|
99
|
-
dateRange = `${ formatDate(v.start_date) } ${ v.start }
|
|
100
|
+
dateRange = `${ props.disableFormat ? v.start_date : formatDate(v.start_date) } ${ v.start } - ${ props.disableFormat ? v.end_date : formatDate(v.end_date) } ${ v.end }`;
|
|
100
101
|
}
|
|
101
102
|
} else {
|
|
102
103
|
if (v.start_date === v.end_date) {
|
|
103
|
-
dateRange = formatDate(v.start_date);
|
|
104
|
+
dateRange = props.disableFormat ? v.start_date : formatDate(v.start_date);
|
|
104
105
|
} else {
|
|
105
|
-
dateRange = `${ formatDate(v.start_date) }
|
|
106
|
+
dateRange = `${ props.disableFormat ? v.start_date : formatDate(v.start_date) } - ${ props.disableFormat ? v.end_date : formatDate(v.end_date) }`;
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
|
|
@@ -125,9 +126,9 @@ const computedList = computed<any[]>(() => {
|
|
|
125
126
|
cycle_interval,
|
|
126
127
|
cycle_point,
|
|
127
128
|
} = v;
|
|
128
|
-
dateRange = `${ formatDate(date) } ${ start } - ${ end }`;
|
|
129
|
+
dateRange = `${ props.disableFormat ? date : formatDate(date) } ${ start } - ${ end }`;
|
|
129
130
|
if (is_cycle) {
|
|
130
|
-
dateRange = `${ formatDate(cycle_start_date) } - ${ formatDate(cycle_end_date) }`;
|
|
131
|
+
dateRange = `${ props.disableFormat ? cycle_start_date : formatDate(cycle_start_date) } - ${ props.disableFormat ? cycle_end_date : formatDate(cycle_end_date) }`;
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
let timeRange = `${ start } - ${ end }`;
|