@opendesign-plus-test/components 0.0.1-rc.27 → 0.0.1-rc.29
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 +72 -60
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +3 -14
- package/dist/components/meeting/OMeetingForm.vue.d.ts +2 -1
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +5 -1
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +2 -1
- package/dist/components/meeting/types.d.ts +19 -1
- package/dist/components/meeting/utils.d.ts +1 -0
- package/dist/components.cjs.js +36 -36
- package/dist/components.css +1 -1
- package/dist/components.es.js +6336 -6318
- package/package.json +1 -1
- package/src/components/activity/OActivityApproval.vue +62 -27
- package/src/components/activity/OActivityForm.vue +2 -5
- package/src/components/activity/OMyActivityCalendar.vue +66 -64
- package/src/components/common/ThFilter.vue +7 -3
- package/src/components/meeting/OMeetingCalendar.vue +45 -32
- package/src/components/meeting/OMeetingForm.vue +145 -136
- package/src/components/meeting/OMyMeetingCalendar.vue +44 -42
- package/src/components/meeting/components/OMeetingCalendarList.vue +26 -18
- package/src/components/meeting/components/OMeetingDetail.vue +38 -17
- package/src/components/meeting/types.ts +20 -1
- package/src/components/meeting/utils.ts +18 -1
- package/src/i18n/en.ts +7 -1
- package/src/i18n/zh.ts +8 -2
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ const params = reactive<ReviewParamsT>({
|
|
|
36
36
|
|
|
37
37
|
// -------------------- 申请人 --------------------
|
|
38
38
|
const applicantValue = ref('');
|
|
39
|
-
const
|
|
39
|
+
const applicantOptions = computed(() => props.applicantList.map(v => ({ value: v, label: v })));
|
|
40
40
|
|
|
41
41
|
const filterApplicantList = () => {
|
|
42
42
|
params.sponsor = applicantValue.value.join(',');
|
|
@@ -51,9 +51,13 @@ const sortTime = () => {
|
|
|
51
51
|
|
|
52
52
|
// -------------------- 状态 --------------------
|
|
53
53
|
const statusValue = ref();
|
|
54
|
-
const statusOptions =
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
const statusOptions = computed<TypeOptionT[]>(() => {
|
|
55
|
+
let list: TypeOptionT[] | { label: string; value: string; }[] = [];
|
|
56
|
+
approvalStatusMap.forEach((item) => {
|
|
57
|
+
list.push(item);
|
|
58
|
+
});
|
|
59
|
+
return list.slice(1);
|
|
60
|
+
|
|
57
61
|
});
|
|
58
62
|
const filterStatusList = () => {
|
|
59
63
|
params.status = statusValue.value;
|
|
@@ -164,7 +168,7 @@ const cancel = () => {
|
|
|
164
168
|
};
|
|
165
169
|
|
|
166
170
|
const confirmCancel = async () => {
|
|
167
|
-
if (
|
|
171
|
+
if (props.deleteActivityRequest && props.cancelActivityRequest) {
|
|
168
172
|
try {
|
|
169
173
|
loading.value = true;
|
|
170
174
|
if (cancelStatus.value === 1) {
|
|
@@ -177,13 +181,15 @@ const confirmCancel = async () => {
|
|
|
177
181
|
message.success({
|
|
178
182
|
content: `“${ currentRow.value?.title }”活动${ cancelText.value }成功`,
|
|
179
183
|
});
|
|
180
|
-
} catch {
|
|
184
|
+
} catch (err) {
|
|
185
|
+
console.log(err);
|
|
181
186
|
loading.value = false;
|
|
182
187
|
cancelVisible.value = false;
|
|
183
188
|
message.danger({
|
|
184
189
|
content: `“${ currentRow.value?.title }”活动${ cancelText.value }失败`,
|
|
185
190
|
});
|
|
186
191
|
}
|
|
192
|
+
}
|
|
187
193
|
};
|
|
188
194
|
|
|
189
195
|
// -------------------- 审核操作 --------------------
|
|
@@ -350,7 +356,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
|
|
|
350
356
|
<ThFilter
|
|
351
357
|
v-model="applicantValue"
|
|
352
358
|
@confirm="filterApplicantList"
|
|
353
|
-
:list="
|
|
359
|
+
:list="applicantOptions"
|
|
354
360
|
:multiple="true"
|
|
355
361
|
>
|
|
356
362
|
|
|
@@ -389,8 +395,12 @@ const reviewActions = computed<DialogActionT[]>(() => {
|
|
|
389
395
|
</ThFilter>
|
|
390
396
|
</template>
|
|
391
397
|
<template #default="scope">
|
|
392
|
-
<OTag
|
|
393
|
-
|
|
398
|
+
<OTag
|
|
399
|
+
v-if="scope.row.is_delete !== 1"
|
|
400
|
+
color="primary"
|
|
401
|
+
variant="outline"
|
|
402
|
+
:class="[`tag-${statusMap.get(scope.row.status)?.id}`]"
|
|
403
|
+
>
|
|
394
404
|
{{
|
|
395
405
|
statusMap.get(scope.row.status)?.text
|
|
396
406
|
}}
|
|
@@ -555,10 +565,19 @@ const reviewActions = computed<DialogActionT[]>(() => {
|
|
|
555
565
|
|
|
556
566
|
<style lang="scss">
|
|
557
567
|
.o-activity-table {
|
|
568
|
+
.table-wrapper {
|
|
569
|
+
.el-table {
|
|
570
|
+
border-top: none;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.el-table__header {
|
|
574
|
+
margin-bottom: 0;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
558
577
|
|
|
559
578
|
.expand-detail {
|
|
560
579
|
padding: 16px 60px;
|
|
561
|
-
background-color:
|
|
580
|
+
background-color: var(--o-color-fill3);
|
|
562
581
|
}
|
|
563
582
|
|
|
564
583
|
.activity-btn {
|
|
@@ -594,28 +613,44 @@ const reviewActions = computed<DialogActionT[]>(() => {
|
|
|
594
613
|
|
|
595
614
|
.o-tag {
|
|
596
615
|
--tag-radius: 100px;
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
616
|
+
font-weight: 500;
|
|
617
|
+
padding: 0 8px;
|
|
618
|
+
height: 24px;
|
|
619
|
+
line-height: 24px !important;
|
|
620
|
+
@include tip1;
|
|
621
|
+
|
|
622
|
+
.o-tag-label {
|
|
623
|
+
transform: none !important;
|
|
624
|
+
}
|
|
600
625
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
}
|
|
626
|
+
&.o-tag-outline {
|
|
627
|
+
--tag-bd-color: transparent;
|
|
628
|
+
--tag-color: #fff;
|
|
629
|
+
}
|
|
606
630
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
631
|
+
&.tag-under-review {
|
|
632
|
+
--tag-bg-color: rgb(var(--o-blue-6));
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
&.tag-draft,
|
|
636
|
+
&.tag-cancel {
|
|
637
|
+
--tag-color: var(--o-color-info3);
|
|
638
|
+
--tag-bg-color: var(--o-color-control1-light);
|
|
639
|
+
}
|
|
613
640
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
641
|
+
&.tag-registration,
|
|
642
|
+
&.tag-in-progress,
|
|
643
|
+
&.tag-ended {
|
|
644
|
+
--tag-bg-color: var(--o-color-success1);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
&.tag-reject {
|
|
648
|
+
--tag-bg-color: var(--o-color-warning1);
|
|
649
|
+
}
|
|
617
650
|
}
|
|
618
651
|
|
|
652
|
+
|
|
653
|
+
|
|
619
654
|
.sort-time {
|
|
620
655
|
display: flex;
|
|
621
656
|
align-items: center;
|
|
@@ -111,11 +111,10 @@ const rules = ref<Record<string, RulesT[]>>({
|
|
|
111
111
|
},
|
|
112
112
|
],
|
|
113
113
|
register_end_date: [
|
|
114
|
-
{ required: true, message: '请选择报名截止时间' },
|
|
115
114
|
{
|
|
116
115
|
validator: () => {
|
|
117
116
|
const { register_end_date, end_date, end } = form.value;
|
|
118
|
-
if (dayjs(`${ end_date } ${ end }`).valueOf() < dayjs(register_end_date).valueOf()) {
|
|
117
|
+
if (register_end_date && dayjs(`${ end_date } ${ end }`).valueOf() < dayjs(register_end_date).valueOf()) {
|
|
119
118
|
return {
|
|
120
119
|
type: 'danger',
|
|
121
120
|
message: '报名截止日期必须小于结束日期',
|
|
@@ -139,7 +138,6 @@ const rules = ref<Record<string, RulesT[]>>({
|
|
|
139
138
|
},
|
|
140
139
|
],
|
|
141
140
|
register_url: [
|
|
142
|
-
{ required: true, message: '请输入活动报名网址' },
|
|
143
141
|
{
|
|
144
142
|
validator: (value: string) => {
|
|
145
143
|
const str = value.replaceAll(' ', '') || '';
|
|
@@ -157,7 +155,6 @@ const rules = ref<Record<string, RulesT[]>>({
|
|
|
157
155
|
},
|
|
158
156
|
],
|
|
159
157
|
content_url: [
|
|
160
|
-
{ required: true, message: '请输入活动详情介绍网址' },
|
|
161
158
|
{
|
|
162
159
|
validator: (value: string) => {
|
|
163
160
|
const str = value.replaceAll(' ', '') || '';
|
|
@@ -503,7 +500,7 @@ defineExpose({
|
|
|
503
500
|
|
|
504
501
|
.time-config {
|
|
505
502
|
width: 100%;
|
|
506
|
-
background-color: var(--o-color-control2-light);
|
|
503
|
+
background-color: color-mix(in srgb, var(--o-color-control2-light), transparent 60%);
|
|
507
504
|
padding: var(--o-gap-5);
|
|
508
505
|
padding-right: calc(var(--o-gap-4) + var(--o-gap-5));
|
|
509
506
|
border-radius: var(--o-radius-xs);
|
|
@@ -620,7 +620,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
620
620
|
</div>
|
|
621
621
|
</div>
|
|
622
622
|
</div>
|
|
623
|
-
<div class="item-header-right" v-if="!row.is_delete">
|
|
623
|
+
<div class="item-header-right" v-if="!row.is_delete && [3,4,5,6].includes(row.status)">
|
|
624
624
|
<OLink v-if="row.content_url" :href="row.content_url" target="_blank" rel="noopener noreferrer">
|
|
625
625
|
活动详情
|
|
626
626
|
<template #suffix>
|
|
@@ -808,7 +808,30 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
808
808
|
.left-calendar {
|
|
809
809
|
width: 336px;
|
|
810
810
|
flex-shrink: 0;
|
|
811
|
+
@include respond-to('pad_h') {
|
|
812
|
+
.el-calendar {
|
|
813
|
+
.el-calendar__body {
|
|
814
|
+
padding-left: 12px;
|
|
815
|
+
padding-right: 12px;
|
|
816
|
+
|
|
817
|
+
.el-calendar-table .date-cell {
|
|
818
|
+
height: 40px;
|
|
819
|
+
width: 28px;
|
|
811
820
|
|
|
821
|
+
.date-cell-text {
|
|
822
|
+
line-height: 24px;
|
|
823
|
+
@include tip2;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
@include respond-to('pad_v') {
|
|
830
|
+
width: 100%;
|
|
831
|
+
}
|
|
832
|
+
@include respond-to('phone') {
|
|
833
|
+
display: none;
|
|
834
|
+
}
|
|
812
835
|
.el-calendar {
|
|
813
836
|
min-height: 460px;
|
|
814
837
|
height: calc(100% - 54px);
|
|
@@ -842,6 +865,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
842
865
|
|
|
843
866
|
.el-calendar__body {
|
|
844
867
|
.el-calendar-table {
|
|
868
|
+
width: 100%;
|
|
845
869
|
tr {
|
|
846
870
|
background-color: color-mix(in srgb, var(--o-color-control2-light), transparent 60%) !important;
|
|
847
871
|
}
|
|
@@ -886,7 +910,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
886
910
|
font-size: 14px;
|
|
887
911
|
line-height: 36px;
|
|
888
912
|
border-radius: var(--o-radius-xs);
|
|
889
|
-
background-color: var(--
|
|
913
|
+
background-color: var(--o-color-control2-light);
|
|
890
914
|
border: 1px solid transparent;
|
|
891
915
|
}
|
|
892
916
|
|
|
@@ -957,31 +981,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
957
981
|
}
|
|
958
982
|
}
|
|
959
983
|
|
|
960
|
-
@include respond-to('pad_h') {
|
|
961
|
-
width: 240px;
|
|
962
|
-
.el-calendar {
|
|
963
|
-
.el-calendar__body {
|
|
964
|
-
padding-left: 12px;
|
|
965
|
-
padding-right: 12px;
|
|
966
|
-
|
|
967
|
-
.el-calendar-table .date-cell {
|
|
968
|
-
height: 40px;
|
|
969
|
-
width: 28px;
|
|
970
984
|
|
|
971
|
-
.date-cell-text {
|
|
972
|
-
line-height: 24px;
|
|
973
|
-
@include tip2;
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
@include respond-to('pad_v') {
|
|
980
|
-
width: 100%;
|
|
981
|
-
}
|
|
982
|
-
@include respond-to('phone') {
|
|
983
|
-
display: none;
|
|
984
|
-
}
|
|
985
985
|
}
|
|
986
986
|
|
|
987
987
|
.right-meeting {
|
|
@@ -1006,7 +1006,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
1006
1006
|
|
|
1007
1007
|
.scroller-container {
|
|
1008
1008
|
height: 100%;
|
|
1009
|
-
max-height: calc(var(--layout-left-height) - 4 * var(--o-gap-5) - var(--header-height) * 1px);
|
|
1009
|
+
max-height: calc(var(--layout-left-height, 900px) - 4 * var(--o-gap-5) - var(--header-height) * 1px);
|
|
1010
1010
|
@include respond-to('phone') {
|
|
1011
1011
|
max-height: fit-content;
|
|
1012
1012
|
}
|
|
@@ -1168,14 +1168,6 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
1168
1168
|
display: flex;
|
|
1169
1169
|
flex-direction: column;
|
|
1170
1170
|
|
|
1171
|
-
.o-collapse-item {
|
|
1172
|
-
&.last-item {
|
|
1173
|
-
.o-collapse-item-header {
|
|
1174
|
-
border-bottom: none;
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
1171
|
.o-collapse-item-expanded + .o-collapse-item-expanded {
|
|
1180
1172
|
margin-top: var(--o-gap-4);
|
|
1181
1173
|
}
|
|
@@ -1307,32 +1299,43 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
1307
1299
|
max-width: 100%;
|
|
1308
1300
|
@include text-truncate(1);
|
|
1309
1301
|
}
|
|
1310
|
-
|
|
1311
1302
|
.o-tag {
|
|
1312
1303
|
margin-left: 8px;
|
|
1313
|
-
--tag-radius:
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1304
|
+
--tag-radius: 4px;
|
|
1305
|
+
font-weight: 500;
|
|
1306
|
+
padding: 0 8px;
|
|
1307
|
+
height: 24px;
|
|
1308
|
+
line-height: 24px !important;
|
|
1309
|
+
@include tip1;
|
|
1310
|
+
|
|
1311
|
+
.o-tag-label {
|
|
1312
|
+
transform: none !important;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
&.o-tag-outline {
|
|
1316
|
+
--tag-bd-color: transparent;
|
|
1317
|
+
--tag-color: #fff;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
&.tag-under-review {
|
|
1321
|
+
--tag-bg-color: rgb(var(--o-blue-6));
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
&.tag-draft,
|
|
1325
|
+
&.tag-cancel {
|
|
1326
|
+
--tag-color: var(--o-color-info3);
|
|
1327
|
+
--tag-bg-color: var(--o-color-control1-light);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
&.tag-registration,
|
|
1331
|
+
&.tag-in-progress,
|
|
1332
|
+
&.tag-ended {
|
|
1333
|
+
--tag-bg-color: var(--o-color-success1);
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
&.tag-reject {
|
|
1337
|
+
--tag-bg-color: var(--o-color-warning1);
|
|
1338
|
+
}
|
|
1336
1339
|
}
|
|
1337
1340
|
}
|
|
1338
1341
|
|
|
@@ -1355,16 +1358,15 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
1355
1358
|
display: flex;
|
|
1356
1359
|
align-items: center;
|
|
1357
1360
|
padding-left: calc(var(--o-gap-3) + var(--icon-size));
|
|
1358
|
-
gap: var(--o-gap-
|
|
1361
|
+
gap: var(--o-gap-4);
|
|
1359
1362
|
width: 100%;
|
|
1360
1363
|
|
|
1361
1364
|
.o-link {
|
|
1362
1365
|
font-size: 14px;
|
|
1363
1366
|
line-height: 21px;
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
margin-left: var(--o-gap-section-6);
|
|
1367
|
+
--link-color: var(--o-color-info2);
|
|
1368
|
+
--link-color-hover: var(--o-color-primary2);
|
|
1369
|
+
--link-color-active: var(--o-color-primary3);
|
|
1368
1370
|
}
|
|
1369
1371
|
|
|
1370
1372
|
.o-icon {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useLocale } from '@opendesign-plus/composables';
|
|
3
2
|
import {
|
|
4
3
|
OCheckbox,
|
|
5
4
|
OCheckboxGroup,
|
|
@@ -13,10 +12,14 @@ import {
|
|
|
13
12
|
} from '@opensig/opendesign';
|
|
14
13
|
import { computed, h, nextTick, ref, watch } from 'vue';
|
|
15
14
|
import IconFilter from '~icons/components/icon-filter.svg';
|
|
16
|
-
import
|
|
15
|
+
import { useI18n } from '@/i18n';
|
|
16
|
+
import { buildVueDompurifyHTMLDirective } from 'vue-dompurify-html';
|
|
17
|
+
|
|
18
|
+
// 局部注册 v-dompurify-html 指令
|
|
19
|
+
const vDompurifyHtml = buildVueDompurifyHTMLDirective();
|
|
17
20
|
|
|
18
21
|
type TItem = { label: string; value: string | number; children?: TItem[] };
|
|
19
|
-
const { t } =
|
|
22
|
+
const { t } = useI18n();
|
|
20
23
|
const props = withDefaults(
|
|
21
24
|
defineProps<{
|
|
22
25
|
modelValue: string[] | number[] | string | number;
|
|
@@ -257,6 +260,7 @@ const renderLabel = ({ data }) => {
|
|
|
257
260
|
min-width: 80px;
|
|
258
261
|
max-width: calc(var(--table-width, 300) * 0.8px);
|
|
259
262
|
--dropdown-item-justify: flex-start;
|
|
263
|
+
--dropdown-item-padding: 7px 12px;
|
|
260
264
|
}
|
|
261
265
|
|
|
262
266
|
.o-dropdown-item.is-active {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, nextTick, onMounted, ref, watch } from 'vue';
|
|
3
3
|
import {
|
|
4
|
-
isClient,
|
|
4
|
+
isClient,
|
|
5
5
|
OIcon,
|
|
6
6
|
OIconChevronLeft,
|
|
7
7
|
OIconChevronRight,
|
|
@@ -12,42 +12,34 @@ import {
|
|
|
12
12
|
OTabPane,
|
|
13
13
|
} from '@opensig/opendesign';
|
|
14
14
|
import dayjs from 'dayjs';
|
|
15
|
-
import { ElCalendar
|
|
15
|
+
import { ElCalendar } from 'element-plus';
|
|
16
16
|
import OMeetingCalendarList from './components/OMeetingCalendarList.vue';
|
|
17
|
-
import elZh from 'element-plus/es/locale/lang/zh-cn';
|
|
18
|
-
import elEn from 'element-plus/es/locale/lang/en';
|
|
19
17
|
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
20
18
|
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
21
19
|
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
22
20
|
import { Locales, useI18n } from '@/i18n';
|
|
23
21
|
import { MEETING_TABS } from './config';
|
|
24
|
-
import { CalendarDataType, GroupItemT } from './types.ts';
|
|
22
|
+
import { CalendarDataType, GroupItemT, MeetingCalendarPropsT, MeetingGroupType } from './types.ts';
|
|
25
23
|
import { formatDate, getConfig } from './utils.ts';
|
|
26
24
|
|
|
27
|
-
const props = withDefaults(defineProps<{
|
|
28
|
-
getDateListRequest: any;
|
|
29
|
-
getMeetingListRequest: any;
|
|
30
|
-
getSummitListRequest: any;
|
|
31
|
-
getEventsListRequest: any;
|
|
32
|
-
hiddenEvents?: boolean;
|
|
33
|
-
hiddenSummit?: boolean;
|
|
34
|
-
createDesc?: string
|
|
35
|
-
}>(), {
|
|
25
|
+
const props = withDefaults(defineProps<MeetingCalendarPropsT>(), {
|
|
36
26
|
getSummitListRequest: async () => [],
|
|
37
27
|
getEventsListRequest: async () => [],
|
|
38
28
|
hiddenEvents: false,
|
|
39
29
|
hiddenSummit: false,
|
|
30
|
+
groupType: MeetingGroupType.SIG,
|
|
40
31
|
});
|
|
41
32
|
|
|
42
33
|
const { t, locale } = useI18n();
|
|
43
34
|
const isEn = computed(() => locale.value === Locales.EN);
|
|
44
|
-
const isZh = computed(() => locale.value === Locales.ZH);
|
|
45
35
|
|
|
46
36
|
// -------------------- 获取存在会议的日期列表 --------------------
|
|
47
37
|
const latestDay = ref<string>(''); // 截止当天最新的活动日期
|
|
48
38
|
const dateList = ref([]);
|
|
49
39
|
const summitData = ref([]);
|
|
40
|
+
const summitDates = ref([]);
|
|
50
41
|
const eventsData = ref([]);
|
|
42
|
+
const eventsDates = ref([]);
|
|
51
43
|
const allDates = ref<string[]>([]);
|
|
52
44
|
const meetingData = ref([]);
|
|
53
45
|
// 日历展示时间限制
|
|
@@ -107,9 +99,19 @@ const getActivityData = async (date) => {
|
|
|
107
99
|
|
|
108
100
|
const getDateList = async (date) => {
|
|
109
101
|
if (props.getDateListRequest) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
102
|
+
props.getDateListRequest(date).then(res => {
|
|
103
|
+
dateList.value = res;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (props.getEventsDatesRequest) {
|
|
107
|
+
props.getEventsDatesRequest(date).then(res => {
|
|
108
|
+
eventsDates.value = res;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
if (props.getSummitDatesRequest) {
|
|
112
|
+
props.getSummitDatesRequest(date).then(res => {
|
|
113
|
+
summitDates.value = res;
|
|
114
|
+
});
|
|
113
115
|
}
|
|
114
116
|
};
|
|
115
117
|
|
|
@@ -162,7 +164,7 @@ const getDateData = async (day?: string) => {
|
|
|
162
164
|
getActivityData(date);
|
|
163
165
|
getDateList(date);
|
|
164
166
|
|
|
165
|
-
allDates.value = [...new Set([...dateList.value, ...
|
|
167
|
+
allDates.value = [...new Set([...dateList.value, ...summitDates.value, ...eventsDates.value])]
|
|
166
168
|
.flat()
|
|
167
169
|
.sort((a: string, b: string) => dayjs(a).isAfter(dayjs(b)) ? 1 : -1);
|
|
168
170
|
if (!day) {
|
|
@@ -264,17 +266,22 @@ const formatYearMonth = (date: string) => {
|
|
|
264
266
|
return date;
|
|
265
267
|
}
|
|
266
268
|
};
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
|
|
269
|
+
// 根据类型校验日历日期是否可选
|
|
270
|
+
const checkSelectedDay = (type: CalendarDataType, date: string) => {
|
|
271
|
+
if (type === CalendarDataType.MEETING) {
|
|
272
|
+
return ([CalendarDataType.ALL, CalendarDataType.MEETING].includes(tabType.value) && dateList.value.includes(date));
|
|
273
|
+
}
|
|
274
|
+
if (type === CalendarDataType.SUMMIT) {
|
|
275
|
+
return ([CalendarDataType.ALL, CalendarDataType.SUMMIT].includes(tabType.value) && summitDates.value.includes(date));
|
|
276
|
+
}
|
|
277
|
+
if (type === CalendarDataType.EVENTS) {
|
|
278
|
+
return ([CalendarDataType.ALL, CalendarDataType.EVENTS].includes(tabType.value) && eventsDates.value.includes(date));
|
|
279
|
+
}
|
|
280
|
+
return false;
|
|
270
281
|
};
|
|
271
282
|
</script>
|
|
272
283
|
<template>
|
|
273
284
|
<div class="o-meeting-calendar">
|
|
274
|
-
<div class="calendar-header">
|
|
275
|
-
<span>{{ createDesc || '' }}</span>
|
|
276
|
-
<OButton color="primary" variant="solid" round="pill" @click="create">预定会议</OButton>
|
|
277
|
-
</div>
|
|
278
285
|
<div class="calendar-body">
|
|
279
286
|
<ElCalendar ref="calendar" class="calender">
|
|
280
287
|
<template #header="{ date }">
|
|
@@ -288,7 +295,11 @@ const create = () => {
|
|
|
288
295
|
<OIconChevronRight />
|
|
289
296
|
</OIcon>
|
|
290
297
|
</div>
|
|
291
|
-
<OSelect
|
|
298
|
+
<OSelect
|
|
299
|
+
v-model="sig"
|
|
300
|
+
:placeholder="groupType === MeetingGroupType.GROUP ? t('meeting.allGroups') : t('meeting.allSigs')"
|
|
301
|
+
clearable
|
|
302
|
+
>
|
|
292
303
|
<OOption v-for="t in sigOptions" :value="t.group_name" :key="t.group_name">{{ t.group_name }}</OOption>
|
|
293
304
|
</OSelect>
|
|
294
305
|
</div>
|
|
@@ -312,7 +323,7 @@ const create = () => {
|
|
|
312
323
|
zIndex: getConfig(CalendarDataType.MEETING, 'zIndex'),
|
|
313
324
|
backgroundColor: getConfig(CalendarDataType.MEETING, 'color')
|
|
314
325
|
}"
|
|
315
|
-
v-if="(
|
|
326
|
+
v-if="checkSelectedDay(CalendarDataType.MEETING, data.day)">
|
|
316
327
|
<IconMeeting />
|
|
317
328
|
</OIcon>
|
|
318
329
|
<OIcon
|
|
@@ -321,7 +332,7 @@ const create = () => {
|
|
|
321
332
|
zIndex: getConfig(CalendarDataType.EVENTS, 'zIndex'),
|
|
322
333
|
backgroundColor: getConfig(CalendarDataType.EVENTS, 'color')
|
|
323
334
|
}"
|
|
324
|
-
v-if="(
|
|
335
|
+
v-if="checkSelectedDay(CalendarDataType.EVENTS, data.day)">
|
|
325
336
|
<IconEvent />
|
|
326
337
|
</OIcon>
|
|
327
338
|
<OIcon
|
|
@@ -330,7 +341,7 @@ const create = () => {
|
|
|
330
341
|
zIndex: getConfig(CalendarDataType.SUMMIT, 'zIndex'),
|
|
331
342
|
backgroundColor: getConfig(CalendarDataType.SUMMIT, 'color')
|
|
332
343
|
}"
|
|
333
|
-
v-if="(
|
|
344
|
+
v-if="checkSelectedDay(CalendarDataType.SUMMIT, data.day)">
|
|
334
345
|
<IconSummit />
|
|
335
346
|
</OIcon>
|
|
336
347
|
</div>
|
|
@@ -363,7 +374,7 @@ const create = () => {
|
|
|
363
374
|
|
|
364
375
|
<div>
|
|
365
376
|
<OScroller class="meeting-list" show-type="hover" size="small">
|
|
366
|
-
<OMeetingCalendarList :list="renderData">
|
|
377
|
+
<OMeetingCalendarList :list="renderData" :groupType="groupType">
|
|
367
378
|
<template #empty>
|
|
368
379
|
<slot name="empty"></slot>
|
|
369
380
|
</template>
|
|
@@ -386,6 +397,7 @@ const create = () => {
|
|
|
386
397
|
.el-calendar-table {
|
|
387
398
|
margin-bottom: 0;
|
|
388
399
|
display: table;
|
|
400
|
+
width: 100%;
|
|
389
401
|
}
|
|
390
402
|
|
|
391
403
|
.calendar-header {
|
|
@@ -662,6 +674,7 @@ const create = () => {
|
|
|
662
674
|
|
|
663
675
|
.date-calender {
|
|
664
676
|
position: relative;
|
|
677
|
+
margin-bottom: 0;
|
|
665
678
|
|
|
666
679
|
&::after {
|
|
667
680
|
content: '';
|
|
@@ -778,7 +791,7 @@ const create = () => {
|
|
|
778
791
|
.title-list {
|
|
779
792
|
display: flex;
|
|
780
793
|
align-items: center;
|
|
781
|
-
justify-content:
|
|
794
|
+
justify-content: center;
|
|
782
795
|
padding: 14px 24px;
|
|
783
796
|
position: relative;
|
|
784
797
|
height: 60px;
|