@opendesign-plus-test/components 0.0.1-rc.41 → 0.0.1-rc.43
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/chunk-OElCookieNotice.cjs.js +1 -1
- package/dist/chunk-OElCookieNotice.es.js +111 -111
- package/dist/components/OHeaderSearch.vue.d.ts +6 -10
- package/dist/components/OSourceCode.vue.d.ts +4 -6
- package/dist/components/activity/OActivityApproval.vue.d.ts +6 -10
- package/dist/components/activity/OActivityForm.vue.d.ts +3 -5
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +18 -26
- package/dist/components/activity/index.d.ts +15 -23
- package/dist/components/activity/types.d.ts +8 -1
- package/dist/components/events/config.d.ts +5 -18
- package/dist/components/events/types.d.ts +4 -1
- package/dist/components/header/OHeaderMobile.vue.d.ts +18 -11
- package/dist/components/header/components/HeaderNavMobile.vue.d.ts +4 -1
- package/dist/components/header/index.d.ts +12 -5
- package/dist/components/header/types.d.ts +4 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +10 -14
- package/dist/components/meeting/OMeetingForm.vue.d.ts +3 -5
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +18 -26
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +1 -1
- package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +2 -1
- package/dist/components/meeting/index.d.ts +786 -0
- package/dist/components/meeting/types.d.ts +83 -18
- package/dist/components/meeting/utils.d.ts +1 -1
- package/dist/components.cjs.js +38 -38
- package/dist/components.css +1 -1
- package/dist/components.es.js +12466 -12392
- package/package.json +3 -3
- package/src/components/OSourceCode.vue +8 -10
- package/src/components/activity/OActivityApproval.vue +35 -34
- package/src/components/activity/OActivityForm.vue +4 -4
- package/src/components/activity/OMyActivityCalendar.vue +44 -27
- package/src/components/activity/types.ts +8 -1
- package/src/components/common/MoreText.vue +1 -1
- package/src/components/common/ThFilter.vue +7 -7
- package/src/components/element-plus/OElCookieNotice.vue +1 -1
- package/src/components/events/OEventsList.vue +45 -10
- package/src/components/events/config.ts +1 -1
- package/src/components/events/types.ts +4 -1
- package/src/components/header/OHeaderMobile.vue +8 -1
- package/src/components/header/components/HeaderContent.vue +7 -3
- package/src/components/header/components/HeaderNavMobile.vue +5 -2
- package/src/components/header/types.ts +4 -0
- package/src/components/meeting/OMeetingCalendar.vue +42 -48
- package/src/components/meeting/OMeetingForm.vue +75 -37
- package/src/components/meeting/OMeetingPlayback.vue +4 -4
- package/src/components/meeting/OMyMeetingCalendar.vue +33 -27
- package/src/components/meeting/OSigMeetingCalendar.vue +29 -26
- package/src/components/meeting/components/OMeetingCalendarList.vue +107 -88
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +10 -6
- package/src/components/meeting/components/OMeetingDetail.vue +32 -16
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +7 -7
- package/src/components/meeting/components/OSigMeetingAside.vue +2 -3
- package/src/components/meeting/config.ts +1 -12
- package/src/components/meeting/types.ts +89 -18
- package/vite.config.ts +3 -2
|
@@ -14,18 +14,19 @@ import {
|
|
|
14
14
|
ORadioGroup,
|
|
15
15
|
OSelect,
|
|
16
16
|
OSwitch,
|
|
17
|
-
OTextarea,
|
|
17
|
+
OTextarea, RulesT,
|
|
18
18
|
useMessage,
|
|
19
19
|
} from '@opensig/opendesign';
|
|
20
20
|
import IconHelp from '~icons/meeting/icon-help.svg';
|
|
21
21
|
import IconTip from '~icons/meeting/icon-tip.svg';
|
|
22
|
-
import { MeetingFormPropsT, MeetingGroupType, MeetingPostT, OptionItemT } from './types';
|
|
22
|
+
import { CycleSubItemT, MeetingFormPropsT, MeetingGroupType, MeetingPostT, OptionItemT, PlatformT } from './types';
|
|
23
23
|
import dayjs from 'dayjs';
|
|
24
24
|
import { findLabelFromOptions, formatDateNumber, getDateNumber } from './utils';
|
|
25
25
|
import { EMAIL_REGEX, INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from './config';
|
|
26
26
|
import OMeetingCalendarSelector from './components/OMeetingCalendarSelector.vue';
|
|
27
27
|
import { useScreen } from '@opendesign-plus/composables';
|
|
28
28
|
import { useMeetingConfig } from './composables/useMeetingConfig';
|
|
29
|
+
import { ValidatorResultT } from '@opensig/opendesign/lib/form/types';
|
|
29
30
|
|
|
30
31
|
const { t, locale, cycleTypeOptions0, intervalWeekOptions, getPlatformLabel } = useMeetingConfig();
|
|
31
32
|
|
|
@@ -43,11 +44,11 @@ const weekOptions = intervalWeekOptions;
|
|
|
43
44
|
const intervalTypeMax = computed(() => {
|
|
44
45
|
return findLabelFromOptions(form.value.cycle_type, cycleTypeOptions.value, 'max');
|
|
45
46
|
});
|
|
46
|
-
const initForm = {
|
|
47
|
+
const initForm: MeetingPostT = {
|
|
47
48
|
is_record: false,
|
|
48
49
|
agenda: '',
|
|
49
50
|
email_list: '',
|
|
50
|
-
platform: '',
|
|
51
|
+
platform: 'WELINK',
|
|
51
52
|
topic: '',
|
|
52
53
|
group_name: '',
|
|
53
54
|
etherpad: '',
|
|
@@ -62,10 +63,10 @@ const initForm = {
|
|
|
62
63
|
cycle_point: [],
|
|
63
64
|
};
|
|
64
65
|
const form = ref<MeetingPostT>(Object.assign({}, initForm) as unknown as MeetingPostT); // 表单数据
|
|
65
|
-
const formRef = ref(null); // 表单实例
|
|
66
|
+
const formRef = ref<any>(null); // 表单实例
|
|
66
67
|
const loading = ref(false); // 提交状态
|
|
67
68
|
// 表单校验规则
|
|
68
|
-
const rules = computed(() => {
|
|
69
|
+
const rules = computed<Record<string, RulesT[]>>(() => {
|
|
69
70
|
return {
|
|
70
71
|
topic: [
|
|
71
72
|
{ required: true, message: t('meeting.enterMeetingName') },
|
|
@@ -98,23 +99,36 @@ const rules = computed(() => {
|
|
|
98
99
|
}],
|
|
99
100
|
etherpad: [{ required: true, message: t('meeting.enterEtherpad') }],
|
|
100
101
|
date: [{ required: true, message: t('meeting.selectDate') }],
|
|
102
|
+
platform: [{ required: true, message: t('meeting.selectPlatform') }],
|
|
101
103
|
time: [
|
|
102
104
|
{
|
|
103
|
-
validator: (value:
|
|
105
|
+
validator: (value: any) => {
|
|
104
106
|
const { is_cycle, cycle_type, cycle_interval, cycle_point, date, date_range } = form.value;
|
|
105
107
|
if (is_cycle) {
|
|
106
|
-
const msg =
|
|
107
|
-
type: 'danger',
|
|
108
|
-
message: t('meeting.finishMeetingConfig'),
|
|
109
|
-
};
|
|
108
|
+
const msg = t('meeting.finishMeetingConfig');
|
|
110
109
|
if (cycle_type === INTERVAL_DAY) {
|
|
111
|
-
if (!cycle_interval)
|
|
110
|
+
if (!cycle_interval) {
|
|
111
|
+
return {
|
|
112
|
+
type: 'danger',
|
|
113
|
+
message: msg,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
112
116
|
}
|
|
113
117
|
if (cycle_type === INTERVAL_WEEK) {
|
|
114
|
-
if (!cycle_interval || !cycle_point?.length)
|
|
118
|
+
if (!cycle_interval || !cycle_point?.length) {
|
|
119
|
+
return {
|
|
120
|
+
type: 'danger',
|
|
121
|
+
message: msg,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
115
124
|
}
|
|
116
125
|
if (cycle_type === INTERVAL_MONTH) {
|
|
117
|
-
if (!cycle_interval || !cycle_point?.length)
|
|
126
|
+
if (!cycle_interval || !cycle_point?.length) {
|
|
127
|
+
return {
|
|
128
|
+
type: 'danger',
|
|
129
|
+
message: msg,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
118
132
|
}
|
|
119
133
|
if (!date_range?.length) {
|
|
120
134
|
return {
|
|
@@ -129,7 +143,7 @@ const rules = computed(() => {
|
|
|
129
143
|
const weeks = new Set();
|
|
130
144
|
while (!dayjs(start).isAfter(dayjs(end))) {
|
|
131
145
|
weeks.add(dayjs(start).day());
|
|
132
|
-
start = dayjs(start).add(1, 'day');
|
|
146
|
+
start = dayjs(start).add(1, 'day').format('YYYY-MM-DD');
|
|
133
147
|
}
|
|
134
148
|
if (cycle_point.every((point) => !weeks.has(point))) {
|
|
135
149
|
return {
|
|
@@ -142,7 +156,7 @@ const rules = computed(() => {
|
|
|
142
156
|
const days = new Set();
|
|
143
157
|
while (!dayjs(start).isAfter(dayjs(end))) {
|
|
144
158
|
days.add(dayjs(start).date());
|
|
145
|
-
start = dayjs(start).add(1, 'day');
|
|
159
|
+
start = dayjs(start).add(1, 'day').format('YYYY-MM-DD');
|
|
146
160
|
}
|
|
147
161
|
if (cycle_point.every((point) => !days.has(point))) {
|
|
148
162
|
return {
|
|
@@ -165,7 +179,7 @@ const rules = computed(() => {
|
|
|
165
179
|
message: t('meeting.selectMeetingTime'),
|
|
166
180
|
};
|
|
167
181
|
}
|
|
168
|
-
const arr = value.split('-').map((v) => v.split(':').map(Number));
|
|
182
|
+
const arr = value.split('-').map((v: string) => v.split(':').map(Number));
|
|
169
183
|
if (arr[0][0] > arr[1][0] || (arr[0][0] === arr[1][0] && arr[0][1] >= arr[1][1])) {
|
|
170
184
|
return {
|
|
171
185
|
type: 'danger',
|
|
@@ -173,8 +187,8 @@ const rules = computed(() => {
|
|
|
173
187
|
};
|
|
174
188
|
}
|
|
175
189
|
if (!form.value.is_cycle && form.value.date && form.value.start) {
|
|
176
|
-
const start =
|
|
177
|
-
if (
|
|
190
|
+
const start = `${ form.value.date } ${ form.value.start }`;
|
|
191
|
+
if (dayjs(start).isBefore(dayjs())) {
|
|
178
192
|
return {
|
|
179
193
|
type: 'danger',
|
|
180
194
|
message: t('meeting.startTimeBeforeEndTime'),
|
|
@@ -185,12 +199,11 @@ const rules = computed(() => {
|
|
|
185
199
|
triggers: ['blur', 'change'],
|
|
186
200
|
},
|
|
187
201
|
],
|
|
188
|
-
platform: [{ required: true, message: t('meeting.selectPlatform') }],
|
|
189
202
|
email_list: [
|
|
190
203
|
{
|
|
191
|
-
validator: (value:
|
|
204
|
+
validator: (value: any) => {
|
|
192
205
|
if (props.isEdit) {
|
|
193
|
-
return {};
|
|
206
|
+
return {} as unknown as ValidatorResultT;
|
|
194
207
|
}
|
|
195
208
|
const str = value.replaceAll(' ', '').replaceAll(',', ';') || '';
|
|
196
209
|
if (str.length) {
|
|
@@ -200,7 +213,7 @@ const rules = computed(() => {
|
|
|
200
213
|
message: t('meeting.emailTooLong'),
|
|
201
214
|
};
|
|
202
215
|
}
|
|
203
|
-
const list = str.split(';') || [];
|
|
216
|
+
const list: string[] = str.split(';') || [];
|
|
204
217
|
if (list.some((v) => !EMAIL_REGEX.test(v))) {
|
|
205
218
|
return {
|
|
206
219
|
type: 'danger',
|
|
@@ -233,7 +246,7 @@ const getSigOptions = async () => {
|
|
|
233
246
|
return;
|
|
234
247
|
}
|
|
235
248
|
const res = await props.getGroupsRequest();
|
|
236
|
-
sigOptions.value = res.map((v) => ({ label: v.group_name, value: v.group_name
|
|
249
|
+
sigOptions.value = res.map((v: OptionItemT) => ({ ...v, label: v.group_name, value: v.group_name }));
|
|
237
250
|
if (props.data) {
|
|
238
251
|
changeSig(form.value.group_name);
|
|
239
252
|
}
|
|
@@ -245,9 +258,9 @@ const getPlatformOptions = async () => {
|
|
|
245
258
|
return;
|
|
246
259
|
}
|
|
247
260
|
const res = await props.getPlatformsRequest();
|
|
248
|
-
typeOptions.value = res.map((v) => ({ label: getPlatformLabel(v), value: v }));
|
|
261
|
+
typeOptions.value = res.map((v: string) => ({ label: getPlatformLabel(v), value: v }));
|
|
249
262
|
if (!props.data) {
|
|
250
|
-
form.value.platform = typeOptions.value[0].value;
|
|
263
|
+
form.value.platform = typeOptions.value[0].value as unknown as PlatformT;
|
|
251
264
|
}
|
|
252
265
|
};
|
|
253
266
|
|
|
@@ -256,7 +269,7 @@ watch(
|
|
|
256
269
|
() => props.data,
|
|
257
270
|
(data) => {
|
|
258
271
|
if (data) {
|
|
259
|
-
const sub = data?.cycle_sub?.find((v) => v.sub_id === props.subId) || {};
|
|
272
|
+
const sub = data?.cycle_sub?.find((v) => v.sub_id === props.subId) || {} as unknown as CycleSubItemT;
|
|
260
273
|
const { mid, date, start, end, sub_id } = sub;
|
|
261
274
|
Object.assign(
|
|
262
275
|
form.value,
|
|
@@ -311,8 +324,8 @@ watch(
|
|
|
311
324
|
);
|
|
312
325
|
const cancel = () => {
|
|
313
326
|
form.value = Object.assign({}, initForm);
|
|
314
|
-
formRef.value
|
|
315
|
-
formRef.value
|
|
327
|
+
formRef.value?.clearValidate?.();
|
|
328
|
+
formRef.value?.resetFields?.();
|
|
316
329
|
emits('cancel');
|
|
317
330
|
};
|
|
318
331
|
|
|
@@ -331,7 +344,7 @@ const confirm = async () => {
|
|
|
331
344
|
try {
|
|
332
345
|
loading.value = true;
|
|
333
346
|
const valid = await formRef.value.validate();
|
|
334
|
-
if (valid.some((v) => !!v)) {
|
|
347
|
+
if (!valid || valid.some((v: any) => !!v)) {
|
|
335
348
|
return;
|
|
336
349
|
}
|
|
337
350
|
const {
|
|
@@ -359,7 +372,7 @@ const confirm = async () => {
|
|
|
359
372
|
group_name,
|
|
360
373
|
platform,
|
|
361
374
|
is_cycle,
|
|
362
|
-
} as MeetingPostT;
|
|
375
|
+
} as MeetingPostT as unknown as any;
|
|
363
376
|
if (is_cycle) {
|
|
364
377
|
params = {
|
|
365
378
|
...params,
|
|
@@ -396,8 +409,14 @@ const confirm = async () => {
|
|
|
396
409
|
is_notify: true,
|
|
397
410
|
});
|
|
398
411
|
} else {
|
|
399
|
-
const {
|
|
400
|
-
|
|
412
|
+
const {
|
|
413
|
+
email_list: _email_list,
|
|
414
|
+
platform: _platform,
|
|
415
|
+
group_name: _group_name,
|
|
416
|
+
etherpad: _etherpad,
|
|
417
|
+
...data
|
|
418
|
+
} = params;
|
|
419
|
+
await props?.editMeetingRequest(props.data?.id as unknown as number, {
|
|
401
420
|
...data,
|
|
402
421
|
is_notify: true,
|
|
403
422
|
});
|
|
@@ -423,14 +442,14 @@ onMounted(() => {
|
|
|
423
442
|
getPlatformOptions();
|
|
424
443
|
});
|
|
425
444
|
|
|
426
|
-
const changeSig = (sig) => {
|
|
445
|
+
const changeSig = (sig: any) => {
|
|
427
446
|
const find = sigOptions.value.find((v) => v.value === sig);
|
|
428
447
|
if (!props.isEdit) {
|
|
429
448
|
form.value.etherpad = find?.etherpad || '';
|
|
430
449
|
form.value.email_list = find?.email_list || '';
|
|
431
450
|
}
|
|
432
451
|
};
|
|
433
|
-
const disabledDate = (date) => {
|
|
452
|
+
const disabledDate = (date: Date) => {
|
|
434
453
|
return date.getTime() < Date.now() - 24 * 60 * 60 * 1000;
|
|
435
454
|
};
|
|
436
455
|
const changeTime = () => {
|
|
@@ -606,7 +625,7 @@ defineExpose({
|
|
|
606
625
|
</div>
|
|
607
626
|
</div>
|
|
608
627
|
</OFormItem>
|
|
609
|
-
<OFormItem :label="t('meeting.meetingPlatform')" field="platform" :rules="rules.platform">
|
|
628
|
+
<OFormItem :label="t('meeting.meetingPlatform')" field="platform" :rules="rules.platform" class="platform-item">
|
|
610
629
|
<ORadioGroup v-model="form.platform" v-if="!data" :disabled="form.is_cycle">
|
|
611
630
|
<ORadio v-for="item in typeOptions" :key="item.value" :value="item.value">{{ getPlatformLabel(item.label) }}
|
|
612
631
|
</ORadio>
|
|
@@ -740,8 +759,10 @@ defineExpose({
|
|
|
740
759
|
display: flex;
|
|
741
760
|
align-items: center;
|
|
742
761
|
--form-label-gap-top: 0;
|
|
762
|
+
color: var(--o-color-info2);
|
|
743
763
|
@include respond-to('<=pad_v') {
|
|
744
764
|
height: fit-content;
|
|
765
|
+
@include text2;
|
|
745
766
|
}
|
|
746
767
|
}
|
|
747
768
|
|
|
@@ -749,6 +770,15 @@ defineExpose({
|
|
|
749
770
|
margin-left: var(--o-gap-3);
|
|
750
771
|
}
|
|
751
772
|
|
|
773
|
+
.platform-item {
|
|
774
|
+
align-items: center;
|
|
775
|
+
|
|
776
|
+
.o-form-item-main-wrap {
|
|
777
|
+
@include respond-to('<=pad_v') {
|
|
778
|
+
@include text2;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
752
782
|
.record-item {
|
|
753
783
|
@include respond-to('<=pad_v') {
|
|
754
784
|
display: flex;
|
|
@@ -792,6 +822,10 @@ defineExpose({
|
|
|
792
822
|
font-size: 16px;
|
|
793
823
|
position: relative;
|
|
794
824
|
top: 2px;
|
|
825
|
+
|
|
826
|
+
svg path {
|
|
827
|
+
fill: currentColor;
|
|
828
|
+
}
|
|
795
829
|
}
|
|
796
830
|
}
|
|
797
831
|
}
|
|
@@ -807,6 +841,10 @@ defineExpose({
|
|
|
807
841
|
.o-svg-icon {
|
|
808
842
|
font-size: 1.5em;
|
|
809
843
|
}
|
|
844
|
+
|
|
845
|
+
svg path {
|
|
846
|
+
fill: currentColor;
|
|
847
|
+
}
|
|
810
848
|
}
|
|
811
849
|
}
|
|
812
850
|
|
|
@@ -915,7 +953,7 @@ defineExpose({
|
|
|
915
953
|
}
|
|
916
954
|
|
|
917
955
|
.repeat-config {
|
|
918
|
-
background-color: color-mix(in srgb, var(--o-color-control2-light)
|
|
956
|
+
background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent);
|
|
919
957
|
padding: var(--o-gap-5);
|
|
920
958
|
border-radius: var(--o-radius-xs);
|
|
921
959
|
@include respond-to('<=pad_v') {
|
|
@@ -93,8 +93,8 @@ const getSubjectList = async (url: string) => {
|
|
|
93
93
|
subjectList.value = (json || []).map((z: SubjectItemT) => {
|
|
94
94
|
return {
|
|
95
95
|
...z,
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
startTimeNumber: transformTime(z.startTime),
|
|
97
|
+
endTimeNumber: transformTime(z.endTime),
|
|
98
98
|
};
|
|
99
99
|
});
|
|
100
100
|
};
|
|
@@ -244,8 +244,8 @@ onUnmounted(() => {
|
|
|
244
244
|
:data-start="sub.startTime"
|
|
245
245
|
:data-end="sub.endTime"
|
|
246
246
|
:style="{
|
|
247
|
-
'--start': (sub.
|
|
248
|
-
'--end': (sub.
|
|
247
|
+
'--start': (sub.startTimeNumber < 0 ? 0 : sub.startTimeNumber) / playerDuration,
|
|
248
|
+
'--end': (sub.endTimeNumber > playerDuration ? playerDuration : sub.endTimeNumber) / playerDuration,
|
|
249
249
|
background: getProgressColor(idx),
|
|
250
250
|
}"
|
|
251
251
|
></div>
|
|
@@ -37,10 +37,10 @@ const currentPage = ref(1); // 分页-当前页
|
|
|
37
37
|
const pageSize = ref(50); // 分页-每页数量
|
|
38
38
|
const total = ref<number | null>(null); // 分页-总数
|
|
39
39
|
const list = ref<MeetingItemT[]>([]); // 列表数据
|
|
40
|
-
const originList = ref([]); // 原始数据
|
|
40
|
+
const originList = ref<MeetingItemT[]>([]); // 原始数据
|
|
41
41
|
const canLoadMore = computed(() => total.value === null || originList.value.length < total.value);
|
|
42
42
|
const reloadAll = ref(false); // 是否需要清空数据
|
|
43
|
-
const { t, locale,
|
|
43
|
+
const { t, locale, getPointStr, getWeekFromDate } = useMeetingConfig();
|
|
44
44
|
const isEn = computed(() => locale.value === Locales.EN);
|
|
45
45
|
|
|
46
46
|
const props = withDefaults(defineProps<{
|
|
@@ -54,7 +54,7 @@ const props = withDefaults(defineProps<{
|
|
|
54
54
|
|
|
55
55
|
const dialogLoading = ref(false); // 弹窗按钮状态
|
|
56
56
|
const { isPhone } = useScreen();
|
|
57
|
-
const expanded = ref([]); // 展开的数据, sub_id 或 id
|
|
57
|
+
const expanded = ref<(string | number)[]>([]); // 展开的数据, sub_id 或 id
|
|
58
58
|
const emits = defineEmits(['edit']);
|
|
59
59
|
// -------------------- 自动加载下一页 --------------------
|
|
60
60
|
const nextLoading = ref(false);
|
|
@@ -73,7 +73,7 @@ const getList = async () => {
|
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
try {
|
|
76
|
-
if (total.value > 0 && (currentPage.value - 1) * pageSize.value > total.value) {
|
|
76
|
+
if (total.value !== null && total.value > 0 && (currentPage.value - 1) * pageSize.value > total.value) {
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
// 当月数据已加载完,手动切换下一月
|
|
@@ -130,7 +130,7 @@ const getList = async () => {
|
|
|
130
130
|
endTime: cycle_end,
|
|
131
131
|
cycleType,
|
|
132
132
|
});
|
|
133
|
-
const obsData = item.obs_data?.filter((v) => v.text_video_url);
|
|
133
|
+
const obsData = item.obs_data?.filter((v) => v.text_video_url) || [];
|
|
134
134
|
return cycle_sub
|
|
135
135
|
.filter((v) => {
|
|
136
136
|
return (
|
|
@@ -155,14 +155,14 @@ const getList = async () => {
|
|
|
155
155
|
...item,
|
|
156
156
|
dateRange: `${ start } - ${ end }`,
|
|
157
157
|
timeRange: `${ start } - ${ end }`,
|
|
158
|
-
hasObsData: item.obs_data?.filter((v) => v.text_video_url)?.length
|
|
158
|
+
hasObsData: !!item.obs_data?.filter((v) => v.text_video_url)?.length,
|
|
159
159
|
time: `${ start }-${ end }`,
|
|
160
160
|
isExpired: dayjs(`${ date } ${ start }`).isBefore(dayjs()),
|
|
161
161
|
},
|
|
162
162
|
];
|
|
163
163
|
})
|
|
164
164
|
.flat()
|
|
165
|
-
.filter((v) => v.date.slice(0, 7) === formatDate(selectedDate.value, 'YYYY-MM-DD').slice(0, 7));
|
|
165
|
+
.filter((v: MeetingItemT) => v.date.slice(0, 7) === formatDate(selectedDate.value, 'YYYY-MM-DD').slice(0, 7));
|
|
166
166
|
// 如果需要清空,则完全替换
|
|
167
167
|
// 如果页码为1,表示第一次加载
|
|
168
168
|
// 如果是移动端,则一直往里填充数据
|
|
@@ -224,12 +224,12 @@ const handleScroll = useDebounceFn(() => {
|
|
|
224
224
|
getList();
|
|
225
225
|
}
|
|
226
226
|
}, 200);
|
|
227
|
-
const calcIfAllDeleted = (date) => {
|
|
227
|
+
const calcIfAllDeleted = (date: string) => {
|
|
228
228
|
const meetingsOfDate = list.value.filter((v) => v.date === date);
|
|
229
229
|
return meetingsOfDate.length && meetingsOfDate.every((v) => v.is_delete);
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
const scrollerScroll = (el) => {
|
|
232
|
+
const scrollerScroll = (el: any) => {
|
|
233
233
|
const container = el.target;
|
|
234
234
|
if (!container) return;
|
|
235
235
|
const scrollTop = container.scrollTop; // 已经滚动的距离
|
|
@@ -244,13 +244,13 @@ const updateScroller = () => {
|
|
|
244
244
|
scrollerContainerEl.addEventListener('scroll', scrollerScroll);
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
const detailRefs = ref({}); // 会议详情组件实例
|
|
248
|
-
const getDetailRefs = (insRef, id) => {
|
|
247
|
+
const detailRefs = ref<Record<string, any>>({}); // 会议详情组件实例
|
|
248
|
+
const getDetailRefs = (insRef: any, id: number) => {
|
|
249
249
|
if (insRef && id) {
|
|
250
250
|
detailRefs.value[id] = insRef;
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
const copyInfo = async (idx) => {
|
|
253
|
+
const copyInfo = async (idx: number) => {
|
|
254
254
|
const instance = detailRefs.value[idx];
|
|
255
255
|
await instance.copyInfo();
|
|
256
256
|
message.success({
|
|
@@ -274,6 +274,9 @@ const confirmCancel = async () => {
|
|
|
274
274
|
if (!props.deleteMeetingRequest) {
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
|
+
if (!currentRow.value) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
277
280
|
try {
|
|
278
281
|
dialogLoading.value = true;
|
|
279
282
|
await props.deleteMeetingRequest(currentRow.value.id);
|
|
@@ -289,7 +292,7 @@ const confirmCancel = async () => {
|
|
|
289
292
|
};
|
|
290
293
|
const handleDialogVisible = ref(false);
|
|
291
294
|
const handleDialogType = ref('');
|
|
292
|
-
const handleDialogRow = ref(null);
|
|
295
|
+
const handleDialogRow = ref<MeetingItemT | null>(null);
|
|
293
296
|
const handleOptions = [
|
|
294
297
|
{
|
|
295
298
|
label: t('meeting.meetingSingle'),
|
|
@@ -323,6 +326,9 @@ const cancelHandleItem = () => {
|
|
|
323
326
|
};
|
|
324
327
|
const confirmHandleItem = async () => {
|
|
325
328
|
const row = handleDialogRow.value;
|
|
329
|
+
if (!row) {
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
326
332
|
if (handleDialogType.value === 'cancel') {
|
|
327
333
|
try {
|
|
328
334
|
dialogLoading.value = true;
|
|
@@ -386,7 +392,7 @@ const cellClick = (e: PointerEvent & any, clickable: boolean) => {
|
|
|
386
392
|
}
|
|
387
393
|
};
|
|
388
394
|
|
|
389
|
-
const changeMonth = (val) => {
|
|
395
|
+
const changeMonth = (val: string) => {
|
|
390
396
|
if (!calendarRef.value) return;
|
|
391
397
|
currentPage.value = 1;
|
|
392
398
|
total.value = null;
|
|
@@ -402,8 +408,13 @@ const changeMonth = (val) => {
|
|
|
402
408
|
});
|
|
403
409
|
};
|
|
404
410
|
// -------------------- 列表 --------------------
|
|
411
|
+
interface GroupListItemT {
|
|
412
|
+
date: string;
|
|
413
|
+
list: MeetingItemT[];
|
|
414
|
+
}
|
|
415
|
+
|
|
405
416
|
const groupList = computed(() => {
|
|
406
|
-
return list.value.reduce((prev, cur) => {
|
|
417
|
+
return list.value.reduce((prev: GroupListItemT[], cur: MeetingItemT) => {
|
|
407
418
|
if (!prev.length) {
|
|
408
419
|
return [
|
|
409
420
|
{
|
|
@@ -413,7 +424,7 @@ const groupList = computed(() => {
|
|
|
413
424
|
];
|
|
414
425
|
} else {
|
|
415
426
|
const last = prev.at(-1);
|
|
416
|
-
if (last
|
|
427
|
+
if (last?.date === cur.date) {
|
|
417
428
|
last.list.push(cur);
|
|
418
429
|
} else {
|
|
419
430
|
prev.push({
|
|
@@ -469,12 +480,12 @@ onUnmounted(() => {
|
|
|
469
480
|
scrollerContainerEl?.removeEventListener('scroll', scrollerScroll);
|
|
470
481
|
});
|
|
471
482
|
|
|
472
|
-
const formatYearMonth = (date) => {
|
|
473
|
-
|
|
483
|
+
const formatYearMonth = (date: string) => {
|
|
484
|
+
const date2 = dayjs(date ? date : undefined);
|
|
474
485
|
if (isEn.value) {
|
|
475
|
-
return
|
|
486
|
+
return date2.format('MMMM YYYY');
|
|
476
487
|
} else {
|
|
477
|
-
return
|
|
488
|
+
return date2.format('YYYY MM月');
|
|
478
489
|
}
|
|
479
490
|
};
|
|
480
491
|
const handleActions = computed<DialogActionT[]>(() => {
|
|
@@ -837,7 +848,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
837
848
|
.list-calendar {
|
|
838
849
|
flex-shrink: 0;
|
|
839
850
|
width: 334px;
|
|
840
|
-
background-color: color-mix(in srgb, var(--o-color-control2-light)
|
|
851
|
+
background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent);
|
|
841
852
|
|
|
842
853
|
@include respond-to('pad_h') {
|
|
843
854
|
.el-calendar {
|
|
@@ -1244,7 +1255,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1244
1255
|
}
|
|
1245
1256
|
|
|
1246
1257
|
&.o-collapse-item-expanded {
|
|
1247
|
-
background-color: color-mix(in srgb, var(--o-color-control2-light)
|
|
1258
|
+
background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent) !important;
|
|
1248
1259
|
}
|
|
1249
1260
|
}
|
|
1250
1261
|
|
|
@@ -1494,9 +1505,4 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1494
1505
|
}
|
|
1495
1506
|
}
|
|
1496
1507
|
|
|
1497
|
-
[data-o-theme='dark'] .meeting-list {
|
|
1498
|
-
.o-collapse-item-body {
|
|
1499
|
-
background-color: rgb(43, 43, 47) !important;
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
1508
|
</style>
|