@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opendesign-plus-test/components",
|
|
3
|
-
"version": "0.0.1-rc.
|
|
3
|
+
"version": "0.0.1-rc.43",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dayjs": "^1.11.13",
|
|
33
33
|
"video.js": "^8.23.7",
|
|
34
34
|
"vue-dompurify-html": "^3.1.2",
|
|
35
|
-
"@opendesign-plus/
|
|
36
|
-
"@opendesign-plus/
|
|
35
|
+
"@opendesign-plus/composables": "0.0.1-rc.11",
|
|
36
|
+
"@opendesign-plus/styles": "0.0.1-rc.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@vitejs/plugin-vue": "^5.1.0",
|
|
@@ -6,28 +6,26 @@ import IconChevronDown from '~icons/components/icon-chevron-down.svg';
|
|
|
6
6
|
|
|
7
7
|
interface CodeItemT {
|
|
8
8
|
label: string;
|
|
9
|
-
|
|
9
|
+
href: string;
|
|
10
10
|
icon?: string;
|
|
11
|
+
target?: string;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
interface CodePropsT {
|
|
14
15
|
title?: string;
|
|
15
16
|
options?: CodeItemT[];
|
|
16
|
-
|
|
17
|
+
href?: string;
|
|
18
|
+
target?: string;
|
|
17
19
|
icon?: string;
|
|
18
20
|
justify?: string;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
withDefaults(defineProps<CodePropsT>(), {
|
|
22
|
-
title: undefined,
|
|
23
|
-
options: undefined,
|
|
24
|
-
url: undefined,
|
|
25
|
-
icon: undefined,
|
|
26
24
|
justify: 'center',
|
|
27
25
|
});
|
|
28
26
|
|
|
29
|
-
const itemChange = (data:
|
|
30
|
-
window.open(data.
|
|
27
|
+
const itemChange = (data: Pick<CodeItemT, 'href' | 'target'>) => {
|
|
28
|
+
window.open(data.href, data.target ? data.target : '_blank');
|
|
31
29
|
};
|
|
32
30
|
|
|
33
31
|
const dropdownVisible = ref(false);
|
|
@@ -38,7 +36,7 @@ const visibleChange = (val: boolean) => {
|
|
|
38
36
|
|
|
39
37
|
<template>
|
|
40
38
|
<div class="source-code">
|
|
41
|
-
<div v-if="
|
|
39
|
+
<div v-if="href" class="info-wrap" @click="itemChange({ href: href, target: target })">
|
|
42
40
|
<span class="title">{{ title }}</span>
|
|
43
41
|
<OIcon v-if="icon">
|
|
44
42
|
<component :is="icon" class="icon" />
|
|
@@ -57,7 +55,7 @@ const visibleChange = (val: boolean) => {
|
|
|
57
55
|
<OIcon class="icon"><IconChevronDown /></OIcon>
|
|
58
56
|
</div>
|
|
59
57
|
<template #dropdown>
|
|
60
|
-
<ODropdownItem v-for="item in options" @click="itemChange(item)" :key="item.
|
|
58
|
+
<ODropdownItem v-for="item in options" @click="itemChange(item)" :key="item.href" class="list" :style="{ '--dropdown-item-justify': justify }">
|
|
61
59
|
{{ item.label }}
|
|
62
60
|
<OIcon v-if="item.icon">
|
|
63
61
|
<component :is="item.icon" class="icon" />
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
} from '@opensig/opendesign';
|
|
15
15
|
import { useScreen } from '@opendesign-plus/composables';
|
|
16
16
|
import { onMounted, watch, ref, reactive, computed } from 'vue';
|
|
17
|
-
import { ActivityItemT, ActivityTablePropsT, ReviewParamsT
|
|
17
|
+
import { ActivityItemT, ActivityTablePropsT, ReviewParamsT } from './types';
|
|
18
18
|
import { useActivityConfig } from './composables/useActivityConfig';
|
|
19
19
|
import ThFilter from '../common/ThFilter.vue';
|
|
20
20
|
import OMeetingDetail from '@/components/meeting/components/OMeetingDetail.vue';
|
|
21
21
|
import { useI18n } from '@/i18n';
|
|
22
|
+
import { CalendarDataType, MeetingItemT } from '@/components/meeting';
|
|
22
23
|
|
|
23
24
|
const { t, locale } = useI18n();
|
|
24
25
|
const isZh = computed(() => locale.value === 'zh');
|
|
25
|
-
const { approvalStatusMap, statusMap } = useActivityConfig();
|
|
26
|
-
|
|
26
|
+
const { approvalStatusMap, statusMap, activityTypeMap } = useActivityConfig();
|
|
27
27
|
|
|
28
28
|
const message = useMessage(null);
|
|
29
29
|
const { isPhone, lePadV } = useScreen();
|
|
@@ -55,13 +55,12 @@ const sortTime = () => {
|
|
|
55
55
|
|
|
56
56
|
// -------------------- 状态 --------------------
|
|
57
57
|
const statusValue = ref();
|
|
58
|
-
const statusOptions = computed
|
|
59
|
-
|
|
58
|
+
const statusOptions = computed(() => {
|
|
59
|
+
const list: { label: string; value: string | number }[] = [];
|
|
60
60
|
approvalStatusMap.value.forEach((item) => {
|
|
61
61
|
list.push(item);
|
|
62
62
|
});
|
|
63
63
|
return list.slice(1);
|
|
64
|
-
|
|
65
64
|
});
|
|
66
65
|
const filterStatusList = () => {
|
|
67
66
|
params.status = statusValue.value;
|
|
@@ -72,7 +71,7 @@ const filterStatusList = () => {
|
|
|
72
71
|
}
|
|
73
72
|
};
|
|
74
73
|
|
|
75
|
-
const tableData = ref([]);
|
|
74
|
+
const tableData = ref<ActivityItemT[]>([]);
|
|
76
75
|
const total = ref(0);
|
|
77
76
|
|
|
78
77
|
const COUNT_PER_PAGE = [10, 20, 30, 40];
|
|
@@ -93,16 +92,17 @@ const getData = async () => {
|
|
|
93
92
|
}
|
|
94
93
|
const res = await props.getTableDataRequest(paramsData);
|
|
95
94
|
tableData.value = (res.data || [])
|
|
96
|
-
.map((item) => {
|
|
97
|
-
const { start_date, end_date, start, end } = item;
|
|
95
|
+
.map((item: ActivityItemT) => {
|
|
96
|
+
const { start_date, end_date, start, end, activity_type } = item;
|
|
98
97
|
return [
|
|
99
98
|
{
|
|
100
99
|
...item,
|
|
101
100
|
time: `${ start_date }-${ end }`,
|
|
102
101
|
start_date_time: `${ start_date } ${ start }`,
|
|
103
102
|
end_date_time: `${ end_date } ${ end }`,
|
|
104
|
-
type:
|
|
103
|
+
type: CalendarDataType.EVENTS,
|
|
105
104
|
dateRange: `${ start_date } ${ start }-${ end_date } ${ end }`,
|
|
105
|
+
activity_type: activityTypeMap.value.get(activity_type)?.label,
|
|
106
106
|
},
|
|
107
107
|
];
|
|
108
108
|
})
|
|
@@ -143,14 +143,14 @@ const confirm = async () => {
|
|
|
143
143
|
try {
|
|
144
144
|
loading.value = true;
|
|
145
145
|
const valid = await formRef.value?.validate();
|
|
146
|
-
if (valid.some((v) => !!v)) {
|
|
146
|
+
if (!valid || valid.some((v: any) => !!v)) {
|
|
147
147
|
loading.value = false;
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
if (reviewStatus.value === 1) {
|
|
151
|
-
await props.approveActivityRequest(currentRow.value
|
|
151
|
+
await props.approveActivityRequest(currentRow.value?.id, form.value);
|
|
152
152
|
} else {
|
|
153
|
-
await props.rejectActivityRequest(currentRow.value
|
|
153
|
+
await props.rejectActivityRequest(currentRow.value?.id, form.value);
|
|
154
154
|
}
|
|
155
155
|
getData();
|
|
156
156
|
cancel();
|
|
@@ -174,9 +174,9 @@ const confirmCancel = async () => {
|
|
|
174
174
|
try {
|
|
175
175
|
loading.value = true;
|
|
176
176
|
if (cancelStatus.value === 1) {
|
|
177
|
-
await props.cancelActivityRequest(currentRow.value
|
|
177
|
+
await props.cancelActivityRequest(currentRow.value!.id, form.value);
|
|
178
178
|
} else {
|
|
179
|
-
await props.deleteActivityRequest(currentRow.value
|
|
179
|
+
await props.deleteActivityRequest(currentRow.value!.id, form.value);
|
|
180
180
|
}
|
|
181
181
|
getData();
|
|
182
182
|
cancel();
|
|
@@ -223,16 +223,17 @@ const rejectItem = (row: ActivityItemT) => {
|
|
|
223
223
|
reviewVisible.value = true;
|
|
224
224
|
};
|
|
225
225
|
|
|
226
|
-
const expandList = ref([]);
|
|
227
|
-
const expandedRows = ref([]);
|
|
226
|
+
const expandList = ref<string[]>([]);
|
|
227
|
+
const expandedRows = ref<string[]>([]);
|
|
228
228
|
|
|
229
|
-
const getActivityDetail = (
|
|
229
|
+
const getActivityDetail = (id: number) => {
|
|
230
|
+
const val = id.toString();
|
|
230
231
|
if (!props.getActivityDetailRequest) {
|
|
231
232
|
return;
|
|
232
233
|
}
|
|
233
234
|
if (!expandList.value.includes(val)) {
|
|
234
235
|
expandList.value.push(val);
|
|
235
|
-
props.getActivityDetailRequest(val).then((res) => {
|
|
236
|
+
props.getActivityDetailRequest(val).then((res: ActivityItemT) => {
|
|
236
237
|
tableData.value?.forEach((item) => {
|
|
237
238
|
if (item.id === res.id) {
|
|
238
239
|
item.approve_record = res.approve_record;
|
|
@@ -249,26 +250,26 @@ const getActivityDetail = (val: number) => {
|
|
|
249
250
|
}
|
|
250
251
|
};
|
|
251
252
|
|
|
252
|
-
const expandChange = (val) => {
|
|
253
|
+
const expandChange = (val: ActivityItemT) => {
|
|
253
254
|
getActivityDetail(val.id);
|
|
254
255
|
};
|
|
255
256
|
|
|
256
|
-
const getRowKey = (row) => {
|
|
257
|
-
return row.id;
|
|
257
|
+
const getRowKey = (row: ActivityItemT): string => {
|
|
258
|
+
return row.id.toString();
|
|
258
259
|
};
|
|
259
260
|
|
|
260
261
|
// -------------------- 移动端 ---------------------
|
|
261
|
-
const expanded = ref([]); // 展开的数据,id
|
|
262
|
-
const change = (val: number[]) => {
|
|
262
|
+
const expanded = ref<(string | number)[]>([]); // 展开的数据,id
|
|
263
|
+
const change = (val: (string | number)[]) => {
|
|
263
264
|
if (val.length) {
|
|
264
|
-
val.forEach((item
|
|
265
|
-
getActivityDetail(item);
|
|
265
|
+
val.forEach((item) => {
|
|
266
|
+
getActivityDetail(item as number);
|
|
266
267
|
});
|
|
267
268
|
}
|
|
268
269
|
};
|
|
269
270
|
|
|
270
|
-
const detailRefs = ref({});
|
|
271
|
-
const getDetailRefs = (insRef, id) => {
|
|
271
|
+
const detailRefs = ref<Record<number, any>>({});
|
|
272
|
+
const getDetailRefs = (insRef: any, id: number) => {
|
|
272
273
|
if (insRef && id) {
|
|
273
274
|
detailRefs.value[id] = insRef;
|
|
274
275
|
}
|
|
@@ -344,7 +345,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
|
|
|
344
345
|
<ElTableColumn type="expand">
|
|
345
346
|
<template #default="props">
|
|
346
347
|
<div class="expand-detail">
|
|
347
|
-
<OMeetingDetail :data="props.row" page="
|
|
348
|
+
<OMeetingDetail :data="props.row" :page="CalendarDataType.APPROVAL" show />
|
|
348
349
|
</div>
|
|
349
350
|
</template>
|
|
350
351
|
</ElTableColumn>
|
|
@@ -446,7 +447,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
|
|
|
446
447
|
</div>
|
|
447
448
|
<div v-else class="collapse-wrapper">
|
|
448
449
|
<OCollapse v-model="expanded" :accordion="isPhone" @change="change">
|
|
449
|
-
<template v-for="(act
|
|
450
|
+
<template v-for="(act) in tableData" :key="act.id">
|
|
450
451
|
<div class="title-top">
|
|
451
452
|
<p class="act-title">{{ act.title }}</p>
|
|
452
453
|
<OTag v-if="act.is_delete !== 1" color="primary" variant="outline"
|
|
@@ -501,9 +502,9 @@ const reviewActions = computed<DialogActionT[]>(() => {
|
|
|
501
502
|
<div class="activity-detail">
|
|
502
503
|
<OMeetingDetail
|
|
503
504
|
:show="expanded.includes(act.id)"
|
|
504
|
-
:data="act"
|
|
505
|
+
:data="act as unknown as MeetingItemT"
|
|
505
506
|
:ref="(insRef) => getDetailRefs(insRef, act.id)"
|
|
506
|
-
page="
|
|
507
|
+
:page="CalendarDataType.APPROVAL"
|
|
507
508
|
/>
|
|
508
509
|
</div>
|
|
509
510
|
</OCollapseItem>
|
|
@@ -716,8 +717,8 @@ const reviewActions = computed<DialogActionT[]>(() => {
|
|
|
716
717
|
}
|
|
717
718
|
}
|
|
718
719
|
|
|
719
|
-
.pagination {
|
|
720
|
-
margin-top:
|
|
720
|
+
.pagination, .pagination-wrapper {
|
|
721
|
+
margin-top: var(--o-gap-6);
|
|
721
722
|
display: flex;
|
|
722
723
|
align-items: center;
|
|
723
724
|
justify-content: flex-end;
|
|
@@ -225,7 +225,7 @@ const approverList = computed(() => {
|
|
|
225
225
|
return props.admins || [];
|
|
226
226
|
});
|
|
227
227
|
|
|
228
|
-
const typeValue = ref<string>('');
|
|
228
|
+
const typeValue = ref<string | undefined>('');
|
|
229
229
|
const typeOptions = ref<TypeOptionT[]>([]); // 活动类型
|
|
230
230
|
activityTypeMap.value.forEach((item) => {
|
|
231
231
|
typeOptions.value.push(item);
|
|
@@ -280,7 +280,7 @@ watch(
|
|
|
280
280
|
organizer,
|
|
281
281
|
} as ParamsItemT;
|
|
282
282
|
form.value = { ...params };
|
|
283
|
-
typeValue.value = activityTypeMap.value.get(val.activity_type)?.label;
|
|
283
|
+
typeValue.value = activityTypeMap.value.get(Number(val.activity_type))?.label;
|
|
284
284
|
form.value.start_date = `${ form.value.start_date } ${ form.value.start }`;
|
|
285
285
|
form.value.end_date = `${ form.value.end_date } ${ form.value.end }`;
|
|
286
286
|
}
|
|
@@ -292,7 +292,7 @@ const confirm = async (val: boolean) => {
|
|
|
292
292
|
let type = isEdit.value ? t('meeting.modifyActivity') : val ? t('meeting.create') : t('meeting.saveDraft');
|
|
293
293
|
try {
|
|
294
294
|
const valid = await formRef.value?.validate();
|
|
295
|
-
if (valid.some((v) => !!v)) {
|
|
295
|
+
if (valid.some((v: any) => !!v)) {
|
|
296
296
|
return;
|
|
297
297
|
}
|
|
298
298
|
loading.value = true;
|
|
@@ -494,7 +494,7 @@ defineExpose({
|
|
|
494
494
|
|
|
495
495
|
.time-config {
|
|
496
496
|
width: 100%;
|
|
497
|
-
background-color: color-mix(in srgb, var(--o-color-control2-light)
|
|
497
|
+
background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent);
|
|
498
498
|
padding: var(--o-gap-5);
|
|
499
499
|
padding-right: calc(var(--o-gap-4) + var(--o-gap-5));
|
|
500
500
|
border-radius: var(--o-radius-xs);
|
|
@@ -27,7 +27,7 @@ import type { ActivityItemT, MyActivityCalendarPropsT, ParamsItemT } from './typ
|
|
|
27
27
|
import { useScreen } from '@opendesign-plus/composables';
|
|
28
28
|
import { formatDate, getDateNumber } from '../meeting/utils';
|
|
29
29
|
import { useActivityConfig } from './composables/useActivityConfig';
|
|
30
|
-
import { PageParamsT } from '../meeting/types';
|
|
30
|
+
import { CalendarDataType, MeetingItemT, PageParamsT } from '../meeting/types';
|
|
31
31
|
import OMeetingDetail from '@/components/meeting/components/OMeetingDetail.vue';
|
|
32
32
|
import { useI18n, Locales } from '@/i18n';
|
|
33
33
|
|
|
@@ -47,19 +47,19 @@ const props = defineProps<MyActivityCalendarPropsT>();
|
|
|
47
47
|
|
|
48
48
|
const emits = defineEmits(['edit']);
|
|
49
49
|
const list = ref<ActivityItemT[]>([]); // 列表数据
|
|
50
|
-
const originList = ref([]); // 原始数据
|
|
50
|
+
const originList = ref<ActivityItemT[]>([]); // 原始数据
|
|
51
51
|
|
|
52
52
|
const currentPage = ref(1); // 分页-当前页
|
|
53
53
|
const pageSize = ref(50); // 分页-每页数量
|
|
54
|
-
const total = ref(null); // 分页-总数
|
|
54
|
+
const total = ref<number | null>(null); // 分页-总数
|
|
55
55
|
const reloadAll = ref(false); // 是否需要清空数据
|
|
56
56
|
|
|
57
|
-
const expanded = ref([]); // 展开的数据,id
|
|
57
|
+
const expanded = ref<number[]>([]); // 展开的数据,id
|
|
58
58
|
|
|
59
59
|
const nextLoading = ref(false);
|
|
60
60
|
const bottomReached = ref(false);
|
|
61
61
|
|
|
62
|
-
const canLoadMore = computed(() => originList.value.length < total.value
|
|
62
|
+
const canLoadMore = computed(() => total.value === null || originList.value.length < total.value);
|
|
63
63
|
|
|
64
64
|
const getList = async () => {
|
|
65
65
|
if (!props.getListRequest) {
|
|
@@ -69,7 +69,7 @@ const getList = async () => {
|
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
try {
|
|
72
|
-
if (total.value > 0 && (currentPage.value - 1) * pageSize.value > total.value) {
|
|
72
|
+
if (total.value !== null && total.value > 0 && (currentPage.value - 1) * pageSize.value > total.value) {
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
// 当月数据已加载完,手动切换下一月
|
|
@@ -81,6 +81,7 @@ const getList = async () => {
|
|
|
81
81
|
const res = await props.getListRequest({
|
|
82
82
|
page: currentPage.value,
|
|
83
83
|
size: pageSize.value,
|
|
84
|
+
start_date: selectedDate.value,
|
|
84
85
|
} as unknown as PageParamsT);
|
|
85
86
|
const tempList = (res.data || [])
|
|
86
87
|
.map((item: ActivityItemT) => {
|
|
@@ -91,14 +92,14 @@ const getList = async () => {
|
|
|
91
92
|
time: `${ start_date }-${ end }`,
|
|
92
93
|
start_date_time: `${ start_date } ${ start }`,
|
|
93
94
|
end_date_time: `${ end_date } ${ end }`,
|
|
94
|
-
type:
|
|
95
|
+
type: CalendarDataType.EVENTS,
|
|
95
96
|
dateRange: `${ start_date } ${ start }-${ end_date } ${ end }`,
|
|
96
97
|
isExpired: dayjs(`${ start_date } ${ start }`).isBefore(dayjs()),
|
|
97
98
|
},
|
|
98
99
|
];
|
|
99
100
|
})
|
|
100
101
|
.flat()
|
|
101
|
-
.filter((v) => {
|
|
102
|
+
.filter((v: ActivityItemT) => {
|
|
102
103
|
return v.start_date.slice(0, 7) === formatDate(selectedDate.value, 'YYYY-MM-DD').slice(0, 7);
|
|
103
104
|
});
|
|
104
105
|
if (reloadAll.value) {
|
|
@@ -142,7 +143,7 @@ const getActivityDetail = (val: number) => {
|
|
|
142
143
|
}
|
|
143
144
|
if (!expandList.value.includes(val)) {
|
|
144
145
|
expandList.value.push(val);
|
|
145
|
-
props.getActivityDetailRequest(val).then((res) => {
|
|
146
|
+
props.getActivityDetailRequest(val).then((res: ActivityItemT) => {
|
|
146
147
|
list.value?.forEach((item) => {
|
|
147
148
|
if (item.id === res.id) {
|
|
148
149
|
item.approve_record = res.approve_record;
|
|
@@ -152,20 +153,20 @@ const getActivityDetail = (val: number) => {
|
|
|
152
153
|
}
|
|
153
154
|
};
|
|
154
155
|
|
|
155
|
-
const change = (val: number[]) => {
|
|
156
|
+
const change = (val: (number | string)[]) => {
|
|
156
157
|
if (val.length) {
|
|
157
|
-
val.forEach((item
|
|
158
|
-
getActivityDetail(item);
|
|
158
|
+
val.forEach((item) => {
|
|
159
|
+
getActivityDetail(item as unknown as number);
|
|
159
160
|
});
|
|
160
161
|
}
|
|
161
162
|
};
|
|
162
163
|
|
|
163
|
-
const calcIfApproved = (date) => {
|
|
164
|
+
const calcIfApproved = (date: string) => {
|
|
164
165
|
const activityOfDate = list.value.filter((v) => v.start_date === date);
|
|
165
166
|
return activityOfDate.length && activityOfDate.every((v) => v.status === 3 || v.status === 4);
|
|
166
167
|
};
|
|
167
168
|
|
|
168
|
-
const scrollerScroll = (el) => {
|
|
169
|
+
const scrollerScroll = (el: any) => {
|
|
169
170
|
const container = el.target;
|
|
170
171
|
if (!container) return;
|
|
171
172
|
const scrollTop = container.scrollTop; // 已经滚动的距离
|
|
@@ -182,7 +183,7 @@ const updateScroller = () => {
|
|
|
182
183
|
|
|
183
184
|
// -------------------- 日历 --------------------
|
|
184
185
|
const calendarRef = ref();
|
|
185
|
-
const selectedDate = ref();
|
|
186
|
+
const selectedDate = ref<any>(dayjs().format('YYYY-MM-DD'));
|
|
186
187
|
const allDateList = computed<string[]>(() => [...new Set(list.value.map((v) => v.start_date))].sort((a, b) => (dayjs(a).isBefore(dayjs(b)) ? -1 : 1)));
|
|
187
188
|
const dateList = computed<string[]>(() =>
|
|
188
189
|
[...new Set(list.value.filter((v) => !v.isExpired && !v.is_delete).map((v) => v.start_date))].sort((a, b) => (dayjs(a).isBefore(dayjs(b)) ? -1 : 1)),
|
|
@@ -230,8 +231,13 @@ const changeMonth = (val: string) => {
|
|
|
230
231
|
|
|
231
232
|
|
|
232
233
|
// -------------------- 活动列表 --------------------
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
interface ActivityListItemT {
|
|
235
|
+
start_date: string;
|
|
236
|
+
list: ActivityItemT[];
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const activityList = computed<ActivityListItemT[]>(() => {
|
|
240
|
+
return list.value.reduce((prev: ActivityListItemT[], cur: ActivityItemT) => {
|
|
235
241
|
if (!prev.length) {
|
|
236
242
|
return [
|
|
237
243
|
{
|
|
@@ -255,13 +261,19 @@ const activityList = computed(() => {
|
|
|
255
261
|
});
|
|
256
262
|
|
|
257
263
|
// -------------------- 活动详情组件实例 --------------------
|
|
258
|
-
const detailRefs = ref({});
|
|
259
|
-
const getDetailRefs = (insRef, id) => {
|
|
264
|
+
const detailRefs = ref<any>({});
|
|
265
|
+
const getDetailRefs = (insRef: any, id: number) => {
|
|
260
266
|
if (insRef && id) {
|
|
261
267
|
detailRefs.value[id] = insRef;
|
|
262
268
|
}
|
|
263
269
|
};
|
|
264
|
-
|
|
270
|
+
const copyInfo = async (idx: number) => {
|
|
271
|
+
const instance = detailRefs.value[idx];
|
|
272
|
+
await instance.copyInfo();
|
|
273
|
+
message.success({
|
|
274
|
+
content: t('common.copySuccess'),
|
|
275
|
+
});
|
|
276
|
+
};
|
|
265
277
|
// -------------------- 处理滚动事件 --------------------
|
|
266
278
|
const scrollerRef = ref();
|
|
267
279
|
const scrollToSelectedDate = (date: string) => {
|
|
@@ -311,11 +323,14 @@ const confirm = () => {
|
|
|
311
323
|
if (!props.revokeActivityRequest) {
|
|
312
324
|
return;
|
|
313
325
|
}
|
|
326
|
+
if (!currentRow.value) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
314
329
|
dialogLoading.value = true;
|
|
315
330
|
props.revokeActivityRequest(currentRow.value?.id)
|
|
316
331
|
.then(() => {
|
|
317
332
|
message.success({
|
|
318
|
-
content: t('meeting.revokeActivitySuccess', [currentRow.value
|
|
333
|
+
content: t('meeting.revokeActivitySuccess', [currentRow.value?.title]),
|
|
319
334
|
});
|
|
320
335
|
reloadAll.value = true;
|
|
321
336
|
getList();
|
|
@@ -390,7 +405,7 @@ const confirmDelete = () => {
|
|
|
390
405
|
props.deleteActivityRequest(currentRow.value?.id)
|
|
391
406
|
.then(() => {
|
|
392
407
|
message.success({
|
|
393
|
-
content: t('meeting.deleteActivitySuccess', [currentRow.value
|
|
408
|
+
content: t('meeting.deleteActivitySuccess', [currentRow.value?.title]),
|
|
394
409
|
});
|
|
395
410
|
reloadAll.value = true;
|
|
396
411
|
getList();
|
|
@@ -494,6 +509,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
494
509
|
},
|
|
495
510
|
}];
|
|
496
511
|
});
|
|
512
|
+
|
|
497
513
|
</script>
|
|
498
514
|
|
|
499
515
|
<template>
|
|
@@ -652,7 +668,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
652
668
|
<div class="activity-detail">
|
|
653
669
|
<OMeetingDetail
|
|
654
670
|
:show="expanded.includes(row.id)"
|
|
655
|
-
:data="row"
|
|
671
|
+
:data="row as unknown as MeetingItemT"
|
|
656
672
|
:ref="(insRef) => getDetailRefs(insRef, row.id)"
|
|
657
673
|
/>
|
|
658
674
|
<div class="activity-btn" v-if="!row.isExpired && !row.is_delete">
|
|
@@ -707,12 +723,12 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
707
723
|
<!-- 撤销审核弹窗 -->
|
|
708
724
|
<ODialog v-model:visible="revokeVisible" main-class="handle-dialog-active" :actions="revokeActions">
|
|
709
725
|
<template #header>{{ t('meeting.withdrawReview') }}</template>
|
|
710
|
-
<div class="dialog-content">{{ t('meeting.confirmRevokeActivity', [currentRow
|
|
726
|
+
<div class="dialog-content">{{ t('meeting.confirmRevokeActivity', [currentRow?.title]) }}</div>
|
|
711
727
|
</ODialog>
|
|
712
728
|
<!-- 删除活动弹窗 -->
|
|
713
729
|
<ODialog v-model:visible="deleteVisible" main-class="handle-dialog-active" :actions="deleteActions">
|
|
714
730
|
<template #header>{{ t('meeting.deleteActivity') }}</template>
|
|
715
|
-
<div class="dialog-content">{{ t('meeting.confirmDeleteActivity', [currentRow
|
|
731
|
+
<div class="dialog-content">{{ t('meeting.confirmDeleteActivity', [currentRow?.title]) }}</div>
|
|
716
732
|
</ODialog>
|
|
717
733
|
</template>
|
|
718
734
|
|
|
@@ -838,7 +854,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
838
854
|
.el-calendar {
|
|
839
855
|
min-height: 460px;
|
|
840
856
|
height: calc(100% - 54px);
|
|
841
|
-
background-color: color-mix(in srgb, var(--o-color-control2-light)
|
|
857
|
+
background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent);
|
|
842
858
|
border-radius: var(--o-radius-xs);
|
|
843
859
|
|
|
844
860
|
.el-calendar__header {
|
|
@@ -1215,7 +1231,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
1215
1231
|
|
|
1216
1232
|
|
|
1217
1233
|
&.o-collapse-item-expanded {
|
|
1218
|
-
background-color: color-mix(in srgb, var(--o-color-control2-light)
|
|
1234
|
+
background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent);
|
|
1219
1235
|
}
|
|
1220
1236
|
}
|
|
1221
1237
|
|
|
@@ -1258,6 +1274,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
|
|
|
1258
1274
|
align-items: flex-start;
|
|
1259
1275
|
gap: var(--o-gap-3);
|
|
1260
1276
|
width: 100%;
|
|
1277
|
+
padding-right: 48px;
|
|
1261
1278
|
@include respond-to('phone') {
|
|
1262
1279
|
flex-grow: 1;
|
|
1263
1280
|
width: 100%;
|
|
@@ -14,10 +14,11 @@ export interface ParamsItemT {
|
|
|
14
14
|
end: string; // 活动结束时间
|
|
15
15
|
schedules?: string;
|
|
16
16
|
is_publish: string; // 是否发布 true-发布审核 false-发布为草稿
|
|
17
|
-
update_activity_id?: string;
|
|
17
|
+
update_activity_id?: string | number;
|
|
18
18
|
email_list?: string; // 邮件列表
|
|
19
19
|
organizer?: string; // 主办方
|
|
20
20
|
approver: string; // 审批人
|
|
21
|
+
status?: number; // 状态
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export interface ActivityFormPropsT {
|
|
@@ -50,12 +51,18 @@ export interface ActivityItemT {
|
|
|
50
51
|
live_address: string;
|
|
51
52
|
register_end_date: string;
|
|
52
53
|
register_url: string;
|
|
54
|
+
content_url: string;
|
|
53
55
|
start: string;
|
|
54
56
|
status: number; // 1-草稿 2-审核中 3-报名中 4-进行中 5-已结束 6-已修改 7-驳回
|
|
55
57
|
synopsis: string;
|
|
56
58
|
title: string;
|
|
57
59
|
update_activity_id: number;
|
|
58
60
|
user: string;
|
|
61
|
+
sponsor: string; // 创建人
|
|
62
|
+
create_time: string; // 创建时间
|
|
63
|
+
isExpired?: number; // 计算属性表示是否过期
|
|
64
|
+
sub_id?: string;
|
|
65
|
+
dateRange?: string; // 计算属性
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
export interface ReviewParamsT {
|
|
@@ -23,7 +23,7 @@ const { t } = useI18n();
|
|
|
23
23
|
const expanded = ref(false); // 是否展开
|
|
24
24
|
const showBtn = ref(false); // 受否显示展开按钮
|
|
25
25
|
const offsetHeight = ref(0); // 内容高度
|
|
26
|
-
const contentRef = ref(null); // 内容节点
|
|
26
|
+
const contentRef = ref<any>(null); // 内容节点
|
|
27
27
|
|
|
28
28
|
onMounted(() => {
|
|
29
29
|
determineHeight();
|
|
@@ -58,7 +58,7 @@ const visible = ref(false); // 控制浮窗展示
|
|
|
58
58
|
|
|
59
59
|
watch(
|
|
60
60
|
() => props.modelValue,
|
|
61
|
-
(val:
|
|
61
|
+
(val: any) => {
|
|
62
62
|
if (!props.multiple) {
|
|
63
63
|
checked.value = val;
|
|
64
64
|
} else {
|
|
@@ -67,16 +67,16 @@ watch(
|
|
|
67
67
|
},
|
|
68
68
|
);
|
|
69
69
|
// -------------------- 普通多选 --------------------
|
|
70
|
-
const multiChecked = ref([]); // 选中的值
|
|
70
|
+
const multiChecked = ref<any>([]); // 选中的值
|
|
71
71
|
|
|
72
|
-
const change = (val: string | number) => {
|
|
72
|
+
const change = (val: (string | number)[]) => {
|
|
73
73
|
multiChecked.value = val;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
// -------------------- 级联选择 --------------------
|
|
77
77
|
const cascaderValue = ref([]);
|
|
78
78
|
// -------------------- 单选 --------------------
|
|
79
|
-
const checked = ref(null); // 选中的值
|
|
79
|
+
const checked = ref<any>(null); // 选中的值
|
|
80
80
|
// 单选没有按钮,点击即是确认
|
|
81
81
|
const handleCommand = (val: string | number) => {
|
|
82
82
|
if (checked.value === val) {
|
|
@@ -115,8 +115,8 @@ const hasChecked = computed(() => {
|
|
|
115
115
|
return multiChecked.value.length || cascaderValue.value.length || checked.value || props.modelValue;
|
|
116
116
|
});
|
|
117
117
|
// -------------------- 自定义级联选择器label --------------------
|
|
118
|
-
const aref = ref(null);
|
|
119
|
-
const clickLabelSpan = async (e) => {
|
|
118
|
+
const aref = ref<any>(null);
|
|
119
|
+
const clickLabelSpan = async (e: any) => {
|
|
120
120
|
const ele = e.target.parentElement.parentElement;
|
|
121
121
|
await nextTick();
|
|
122
122
|
const input = ele.querySelector('input');
|
|
@@ -127,7 +127,7 @@ const clickLabelSpan = async (e) => {
|
|
|
127
127
|
aref.value?.$forceUpdate();
|
|
128
128
|
cascaderValue.value = JSON.parse(JSON.stringify(cascaderValue.value));
|
|
129
129
|
};
|
|
130
|
-
const renderLabel = ({ data }) => {
|
|
130
|
+
const renderLabel = ({ data }: any) => {
|
|
131
131
|
return h('span', { onclick: clickLabelSpan }, data.label);
|
|
132
132
|
};
|
|
133
133
|
</script>
|
|
@@ -25,7 +25,7 @@ const emits = defineEmits<{
|
|
|
25
25
|
(e: 'update:visible', value: boolean): void;
|
|
26
26
|
}>();
|
|
27
27
|
|
|
28
|
-
const { lePadV
|
|
28
|
+
const { lePadV } = useScreen();
|
|
29
29
|
const { locale, t } = useI18n();
|
|
30
30
|
const isZh = computed(() => locale.value === 'zh');
|
|
31
31
|
|