@opendesign-plus-test/components 0.0.1-rc.24 → 0.0.1-rc.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/components",
3
- "version": "0.0.1-rc.24",
3
+ "version": "0.0.1-rc.25",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -1,8 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import { ElTable, ElTableColumn, dayjs } from 'element-plus';
3
3
  import {
4
+ DialogActionT,
4
5
  OButton,
5
- OCollapse,
6
+ OCollapse, OCollapseItem,
6
7
  ODialog,
7
8
  ODivider,
8
9
  OForm,
@@ -13,10 +14,11 @@ import {
13
14
  useMessage,
14
15
  } from '@opensig/opendesign';
15
16
  import { useScreen } from '@opendesign-plus/composables';
16
- import { onMounted, watch, ref, reactive } from 'vue';
17
+ import { onMounted, watch, ref, reactive, computed } from 'vue';
17
18
  import { ActivityItemT, ActivityTablePropsT, ReviewParamsT, TypeOptionT } from './types';
18
19
  import { approvalStatusMap, statusMap } from './config';
19
20
  import ThFilter from '../common/ThFilter.vue';
21
+ import OMeetingDetail from '@/components/meeting/components/OMeetingDetail.vue';
20
22
 
21
23
 
22
24
  const message = useMessage(null);
@@ -280,6 +282,51 @@ watch(
280
282
  },
281
283
  { deep: true },
282
284
  );
285
+
286
+ const cancelActions = computed<DialogActionT[]>(() => {
287
+ return [{
288
+ id: 'confirm',
289
+ loading: loading.value,
290
+ color: 'primary',
291
+ variant: lePadV.value ? 'text' : 'outline',
292
+ round: 'pill',
293
+ label: '确定',
294
+ onClick: () => {
295
+ confirmCancel();
296
+ },
297
+ }, {
298
+ id: 'cancel',
299
+ color: 'primary',
300
+ variant: lePadV.value ? 'text' : 'solid',
301
+ round: 'pill',
302
+ label: '取消',
303
+ onClick: () => {
304
+ cancel();
305
+ },
306
+ }];
307
+ });
308
+ const reviewActions = computed<DialogActionT[]>(() => {
309
+ return [{
310
+ id: 'confirm',
311
+ loading: loading.value,
312
+ color: 'primary',
313
+ variant: lePadV.value ? 'text' : 'solid',
314
+ round: 'pill',
315
+ label: '确定',
316
+ onClick: () => {
317
+ confirm();
318
+ },
319
+ }, {
320
+ id: 'cancel',
321
+ color: 'primary',
322
+ variant: lePadV.value ? 'text' : 'outline',
323
+ round: 'pill',
324
+ label: '取消',
325
+ onClick: () => {
326
+ cancel();
327
+ },
328
+ }];
329
+ });
283
330
  </script>
284
331
 
285
332
  <template>
@@ -289,7 +336,7 @@ watch(
289
336
  <ElTableColumn type="expand">
290
337
  <template #default="props">
291
338
  <div class="expand-detail">
292
- <MeetingDetail :data="props.row" page="approval" />
339
+ <OMeetingDetail :data="props.row" page="approval" show />
293
340
  </div>
294
341
  </template>
295
342
  </ElTableColumn>
@@ -344,7 +391,7 @@ watch(
344
391
  statusMap.get(scope.row.status)?.text
345
392
  }}
346
393
  </OTag>
347
- <OTag v-else color="primary" variant="outline" class="tag-calcel">已取消</OTag>
394
+ <OTag v-else color="primary" variant="outline" class="tag-cancel">已取消</OTag>
348
395
  </template>
349
396
  </ElTableColumn>
350
397
  <ElTableColumn label="操作">
@@ -396,7 +443,7 @@ watch(
396
443
  statusMap.get(act.status)?.text
397
444
  }}
398
445
  </OTag>
399
- <OTag v-else color="primary" variant="outline" class="tag-calcel">已取消</OTag>
446
+ <OTag v-else color="primary" variant="outline" class="tag-cancel">已取消</OTag>
400
447
  </div>
401
448
  <OCollapseItem :value="act.id">
402
449
  <template #title>
@@ -405,27 +452,47 @@ watch(
405
452
  <p>{{ dayjs(act.create_time).format('YYYY/MM/DD HH:mm:ss') }}</p>
406
453
  </div>
407
454
  <div class="activity-btn">
408
- <OLink v-if="act.status === 7 || act.is_delete" color="danger" variant="text"
409
- @click.stop="deleteItem(act)">
455
+ <OLink
456
+ v-if="act.status === 7 || act.is_delete"
457
+ color="danger"
458
+ variant="text"
459
+ @click.stop="deleteItem(act)"
460
+ >
410
461
  删除
411
462
  </OLink>
412
- <OLink v-if="(act.status === 3 || act.status === 4) && act.is_delete !== 1" color="danger"
413
- variant="text" @click.stop="cancelItem(act)"
463
+ <OLink
464
+ v-if="(act.status === 3 || act.status === 4) && act.is_delete !== 1"
465
+ color="danger"
466
+ variant="text"
467
+ @click.stop="cancelItem(act)"
414
468
  >
415
469
  取消活动
416
- </OLink
470
+ </OLink>
471
+ <OLink
472
+ v-if="act.status === 2"
473
+ color="primary"
474
+ variant="text"
475
+ @click.stop="passItem(act)"
417
476
  >
418
- <OLink v-if="act.status === 2" color="primary" variant="text" @click.stop="passItem(act)">
419
477
  通过
420
478
  </OLink>
421
- <OLink v-if="act.status === 2" color="primary" variant="text" @click.stop="rejectItem(act)">
479
+ <OLink
480
+ v-if="act.status === 2"
481
+ color="primary"
482
+ variant="text"
483
+ @click.stop="rejectItem(act)"
484
+ >
422
485
  驳回
423
486
  </OLink>
424
487
  </div>
425
488
  </template>
426
489
  <div class="activity-detail">
427
- <MeetingDetail :show="expanded.includes(act.id)" :data="act"
428
- :ref="(insRef) => getDetailRefs(insRef, act.id)" page="approval" />
490
+ <OMeetingDetail
491
+ :show="expanded.includes(act.id)"
492
+ :data="act"
493
+ :ref="(insRef) => getDetailRefs(insRef, act.id)"
494
+ page="approval"
495
+ />
429
496
  </div>
430
497
  </OCollapseItem>
431
498
  </template>
@@ -444,8 +511,12 @@ watch(
444
511
  />
445
512
  </div>
446
513
  </div>
447
- <ODialog v-model:visible="reviewVisible" :phone-half-full="lePadV"
448
- main-class="handle-dialog-approval review-dialog">
514
+ <ODialog
515
+ v-model:visible="reviewVisible"
516
+ :phone-half-full="lePadV"
517
+ main-class="handle-dialog-approval review-dialog"
518
+ :actions="reviewActions"
519
+ >
449
520
  <template #header>{{ digTitle }}</template>
450
521
  <div class="dialog-content">
451
522
  <OForm :model="form" ref="formRef" has-required layout="v" class="form-wrapper">
@@ -463,31 +534,18 @@ watch(
463
534
  </OFormItem>
464
535
  </OForm>
465
536
  </div>
466
- <template #footer>
467
- <div class="dialog-footer">
468
- <OButton color="primary" :variant="lePadV ? 'text' : 'solid'" size="large" @click="confirm"
469
- :loading="loading">确定
470
- </OButton>
471
- <ODivider v-if="lePadV" direction="v" />
472
- <OButton color="primary" :variant="lePadV ? 'text' : 'outline'" size="large" @click="cancel">取消</OButton>
473
- </div>
474
- </template>
475
537
  </ODialog>
476
538
  <!-- 取消活动弹窗 -->
477
- <ODialog v-model:visible="cancelVisible" :phone-half-full="lePadV" main-class="handle-dialog-approval">
539
+ <ODialog
540
+ v-model:visible="cancelVisible"
541
+ :phone-half-full="lePadV"
542
+ main-class="handle-dialog-approval"
543
+ :actions="cancelActions"
544
+ >
478
545
  <template #header>{{ cancelTitle }}</template>
479
- <div class="dialog-content">是否确认{{ cancelText }}“{{ currentRow.title
480
- }}”活动?取消后将不在会议首页呈现,且已报名的数据也会被清空,请谨慎操作。
546
+ <div class="dialog-content">
547
+ 是否确认{{ cancelText }}“{{ currentRow?.title }}”活动?{{ cancelText }}后将不在会议首页呈现,且已报名的数据也会被清空,请谨慎操作。
481
548
  </div>
482
- <template #footer>
483
- <div class="dialog-footer">
484
- <OButton color="primary" :variant="lePadV ? 'text' : 'outline'" size="large" @click="confirmCancel"
485
- :loading="loading">确定
486
- </OButton>
487
- <ODivider v-if="lePadV" direction="v" />
488
- <OButton color="primary" :variant="lePadV ? 'text' : 'solid'" size="large" @click="cancel">取消</OButton>
489
- </div>
490
- </template>
491
549
  </ODialog>
492
550
  </div>
493
551
  </template>
@@ -564,7 +622,7 @@ watch(
564
622
  }
565
623
 
566
624
  .tag-draft,
567
- .tag-calcel {
625
+ .tag-cancel {
568
626
  --tag-color: var(--o-color-info3);
569
627
  --tag-bg-color: rgba(222, 222, 227, 1);
570
628
  }
@@ -25,6 +25,7 @@ const message = useMessage(null);
25
25
  const { lePadV } = useScreen();
26
26
  const { t } = useI18n();
27
27
  const $t = t;
28
+
28
29
  interface TypeOptionT {
29
30
  label: string;
30
31
  value: number;
@@ -47,7 +48,6 @@ const form = ref<ParamsItemT>({
47
48
  end: '',
48
49
  is_publish: 'true',
49
50
  email_list: '',
50
- content: '',
51
51
  approver: '',
52
52
  });
53
53
 
@@ -174,7 +174,7 @@ const rules = ref<Record<string, RulesT[]>>({
174
174
  triggers: ['blur', 'change'],
175
175
  },
176
176
  ],
177
- content: [{
177
+ synopsis: [{
178
178
  validator: (value: string) => {
179
179
  if (value.length > 1000) {
180
180
  return {
@@ -258,6 +258,9 @@ watch(
258
258
  is_publish,
259
259
  approver,
260
260
  update_activity_id,
261
+ synopsis,
262
+ email_list,
263
+ organizer,
261
264
  } = val;
262
265
  let params = {
263
266
  title,
@@ -273,6 +276,9 @@ watch(
273
276
  is_publish,
274
277
  approver,
275
278
  update_activity_id,
279
+ synopsis,
280
+ email_list,
281
+ organizer,
276
282
  } as ParamsItemT;
277
283
  form.value = { ...params };
278
284
  typeValue.value = acticityTypeMap.get(val.activity_type)?.label;
@@ -314,6 +320,8 @@ const confirm = async (val: boolean) => {
314
320
  message.danger({
315
321
  content: msg,
316
322
  });
323
+ } finally {
324
+ loading.value = false;
317
325
  }
318
326
  };
319
327
  const close = () => {
@@ -341,7 +349,9 @@ defineExpose({
341
349
  <OInput size="large" placeholder="请输入活动名称" v-model="form.title" />
342
350
  </OFormItem>
343
351
  <OFormItem :rules="rules.organizer" label="活动主办方" field="organizer">
344
- <OInput size="large" placeholder="请选择活动主办方" v-model="form.organizer" />
352
+ <OSelect placeholder="请选择活动主办方" size="large" v-model="form.organizer">
353
+ <OOption v-for="t in organizers" :key="t.name" :value="t.name">{{ t.name }}</OOption>
354
+ </OSelect>
345
355
  </OFormItem>
346
356
  <OFormItem :rules="rules.activity_type" label="活动类型" field="activity_type">
347
357
  <OSelect placeholder="请选择活动类型" size="large" v-model="typeValue" @change="changeType">
@@ -404,8 +414,8 @@ defineExpose({
404
414
  <OFormItem :rules="rules.content_url" label="活动详情网址" field="content_url">
405
415
  <OInput size="large" placeholder="请输入活动详情介绍网址" v-model="form.content_url" />
406
416
  </OFormItem>
407
- <OFormItem :rules="rules.content" label="活动内容" field="content">
408
- <OTextarea size="large" placeholder="请输入活动内容" v-model="form.content" />
417
+ <OFormItem :rules="rules.synopsis" label="活动内容" field="synopsis">
418
+ <OTextarea size="large" placeholder="请输入活动内容" v-model="form.synopsis" />
409
419
  </OFormItem>
410
420
  <OFormItem field="email_list" :rules="rules.email_list" label="邮件地址">
411
421
  <OTextarea
@@ -479,6 +489,7 @@ defineExpose({
479
489
  }
480
490
 
481
491
  .o-textarea {
492
+ --_box-radius: var(--o-radius-xs);
482
493
  width: 100%;
483
494
  }
484
495
 
@@ -14,6 +14,7 @@ import {
14
14
  OIconArrowRight,
15
15
  OIconChevronLeft,
16
16
  OIconChevronRight,
17
+ DialogActionT,
17
18
  } from '@opensig/opendesign';
18
19
  import { ElCalendar } from 'element-plus';
19
20
  import dayjs from 'dayjs';
@@ -450,6 +451,52 @@ onUnmounted(() => {
450
451
  const scrollerContainerEl = scrollerRef.value?.getContainerEl();
451
452
  scrollerContainerEl?.removeEventListener('scroll', scrollerScroll);
452
453
  });
454
+
455
+
456
+ const revokeActions = computed<DialogActionT[]>(() => {
457
+ return [{
458
+ id: 'confirm',
459
+ loading: dialogLoading.value,
460
+ color: 'primary',
461
+ variant: 'outline',
462
+ round: 'pill',
463
+ label: '确定',
464
+ onClick: () => {
465
+ confirm();
466
+ },
467
+ }, {
468
+ id: 'cancel',
469
+ color: 'primary',
470
+ variant: 'solid',
471
+ round: 'pill',
472
+ label: '取消',
473
+ onClick: () => {
474
+ cancel();
475
+ },
476
+ }];
477
+ });
478
+ const deleteActions = computed<DialogActionT[]>(() => {
479
+ return [{
480
+ id: 'confirm',
481
+ loading: dialogLoading.value,
482
+ color: 'primary',
483
+ variant: 'outline',
484
+ round: 'pill',
485
+ label: '确定',
486
+ onClick: () => {
487
+ confirmDelete();
488
+ },
489
+ }, {
490
+ id: 'cancel',
491
+ color: 'primary',
492
+ variant: 'solid',
493
+ round: 'pill',
494
+ label: '取消',
495
+ onClick: () => {
496
+ cancelDelete();
497
+ },
498
+ }];
499
+ });
453
500
  </script>
454
501
 
455
502
  <template>
@@ -633,30 +680,14 @@ onUnmounted(() => {
633
680
  </div>
634
681
  </div>
635
682
  <!-- 撤销审核弹窗 -->
636
- <ODialog v-model:visible="revokeVisible" main-class="handle-dialog-active">
683
+ <ODialog v-model:visible="revokeVisible" main-class="handle-dialog-active" :actions="revokeActions">
637
684
  <template #header>撤销审核</template>
638
685
  <div class="dialog-content">是否确认要撤销“{{ currentRow.title }}”活动?撤销审核后活动将变成草稿状态。</div>
639
- <template #footer>
640
- <div class="dialog-footer">
641
- <OButton color="primary" variant="outline" size="large" round="pill" @click="confirm" :loading="dialogLoading">
642
- 确定
643
- </OButton>
644
- <OButton color="primary" variant="solid" size="large" round="pill" @click="cancel">取消</OButton>
645
- </div>
646
- </template>
647
686
  </ODialog>
648
687
  <!-- 删除活动弹窗 -->
649
- <ODialog v-model:visible="deleteVisible" main-class="handle-dialog-active">
688
+ <ODialog v-model:visible="deleteVisible" main-class="handle-dialog-active" :actions="deleteActions">
650
689
  <template #header>删除活动</template>
651
690
  <div class="dialog-content">是否确认删除“{{ currentRow.title }}”活动?删除后记录将不再我的个人中心呈现。</div>
652
- <template #footer>
653
- <div class="dialog-footer">
654
- <OButton color="primary" variant="outline" size="large" round="pill" @click="confirmDelete"
655
- :loading="dialogLoading">确定
656
- </OButton>
657
- <OButton color="primary" variant="solid" size="large" round="pill" @click="cancelDelete">取消</OButton>
658
- </div>
659
- </template>
660
691
  </ODialog>
661
692
  </template>
662
693
 
@@ -1321,7 +1352,6 @@ onUnmounted(() => {
1321
1352
  <style lang="scss">
1322
1353
  .handle-dialog-active {
1323
1354
  width: 450px;
1324
- --dlg-radius: 16px;
1325
1355
 
1326
1356
  .o-dlg-header {
1327
1357
  margin-bottom: var(--o-gap-5);
@@ -1331,12 +1361,5 @@ onUnmounted(() => {
1331
1361
  display: flex;
1332
1362
  justify-content: center;
1333
1363
  }
1334
-
1335
- .dialog-footer {
1336
- display: flex;
1337
- justify-content: center;
1338
- margin-top: var(--o-gap-4);
1339
- column-gap: var(--o-gap-4);
1340
- }
1341
1364
  }
1342
1365
  </style>
@@ -84,8 +84,8 @@ export const statusMap = new Map([
84
84
  7,
85
85
  {
86
86
  id: 'reject',
87
- label: '审核驳回',
88
- text: '审核驳回',
87
+ label: '已驳回',
88
+ text: '已驳回',
89
89
  value: 7,
90
90
  },
91
91
  ],
@@ -15,6 +15,8 @@ export interface ParamsItemT {
15
15
  schedules?: string;
16
16
  is_publish: string; // 是否发布 true-发布审核 false-发布为草稿
17
17
  update_activity_id?: string;
18
+ email_list?: string; // 邮件列表
19
+ organizer?: string; // 主办方
18
20
  approver: string; // 审批人
19
21
  }
20
22
 
@@ -23,6 +25,10 @@ export interface ActivityFormPropsT {
23
25
  creatActivity: any;
24
26
  editActivity: any;
25
27
  admins: string[];
28
+ organizers: {
29
+ id: number;
30
+ name: string;
31
+ }[];
26
32
  status?: string | null;
27
33
  }
28
34
 
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { OIcon, OIconChevronDown, OIconChevronUp } from '@opensig/opendesign';
3
3
  import { nextTick, onMounted, ref, watch } from 'vue';
4
+ import { useI18n } from '@/i18n';
4
5
 
5
6
  const props = withDefaults(
6
7
  defineProps<{
@@ -16,6 +17,9 @@ const props = withDefaults(
16
17
  show: false,
17
18
  },
18
19
  );
20
+
21
+ const { t } = useI18n();
22
+
19
23
  const expanded = ref(false); // 是否展开
20
24
  const showBtn = ref(false); // 受否显示展开按钮
21
25
  const offsetHeight = ref(0); // 内容高度