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

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.
@@ -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,55 @@ 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' : 'solid',
292
+ round: 'pill',
293
+ size: 'large',
294
+ label: '确定',
295
+ onClick: () => {
296
+ confirmCancel();
297
+ },
298
+ }, {
299
+ id: 'cancel',
300
+ color: 'primary',
301
+ variant: lePadV.value ? 'text' : 'outline',
302
+ round: 'pill',
303
+ size: 'large',
304
+ label: '取消',
305
+ onClick: () => {
306
+ cancel();
307
+ },
308
+ }];
309
+ });
310
+ const reviewActions = computed<DialogActionT[]>(() => {
311
+ return [{
312
+ id: 'confirm',
313
+ loading: loading.value,
314
+ color: 'primary',
315
+ variant: lePadV.value ? 'text' : 'solid',
316
+ round: 'pill',
317
+ size: 'large',
318
+ label: '确定',
319
+ onClick: () => {
320
+ confirm();
321
+ },
322
+ }, {
323
+ id: 'cancel',
324
+ color: 'primary',
325
+ variant: lePadV.value ? 'text' : 'outline',
326
+ round: 'pill',
327
+ size: 'large',
328
+ label: '取消',
329
+ onClick: () => {
330
+ cancel();
331
+ },
332
+ }];
333
+ });
283
334
  </script>
284
335
 
285
336
  <template>
@@ -289,7 +340,7 @@ watch(
289
340
  <ElTableColumn type="expand">
290
341
  <template #default="props">
291
342
  <div class="expand-detail">
292
- <MeetingDetail :data="props.row" page="approval" />
343
+ <OMeetingDetail :data="props.row" page="approval" show />
293
344
  </div>
294
345
  </template>
295
346
  </ElTableColumn>
@@ -344,7 +395,7 @@ watch(
344
395
  statusMap.get(scope.row.status)?.text
345
396
  }}
346
397
  </OTag>
347
- <OTag v-else color="primary" variant="outline" class="tag-calcel">已取消</OTag>
398
+ <OTag v-else color="primary" variant="outline" class="tag-cancel">已取消</OTag>
348
399
  </template>
349
400
  </ElTableColumn>
350
401
  <ElTableColumn label="操作">
@@ -396,7 +447,7 @@ watch(
396
447
  statusMap.get(act.status)?.text
397
448
  }}
398
449
  </OTag>
399
- <OTag v-else color="primary" variant="outline" class="tag-calcel">已取消</OTag>
450
+ <OTag v-else color="primary" variant="outline" class="tag-cancel">已取消</OTag>
400
451
  </div>
401
452
  <OCollapseItem :value="act.id">
402
453
  <template #title>
@@ -405,27 +456,47 @@ watch(
405
456
  <p>{{ dayjs(act.create_time).format('YYYY/MM/DD HH:mm:ss') }}</p>
406
457
  </div>
407
458
  <div class="activity-btn">
408
- <OLink v-if="act.status === 7 || act.is_delete" color="danger" variant="text"
409
- @click.stop="deleteItem(act)">
459
+ <OLink
460
+ v-if="act.status === 7 || act.is_delete"
461
+ color="danger"
462
+ variant="text"
463
+ @click.stop="deleteItem(act)"
464
+ >
410
465
  删除
411
466
  </OLink>
412
- <OLink v-if="(act.status === 3 || act.status === 4) && act.is_delete !== 1" color="danger"
413
- variant="text" @click.stop="cancelItem(act)"
467
+ <OLink
468
+ v-if="(act.status === 3 || act.status === 4) && act.is_delete !== 1"
469
+ color="danger"
470
+ variant="text"
471
+ @click.stop="cancelItem(act)"
414
472
  >
415
473
  取消活动
416
- </OLink
474
+ </OLink>
475
+ <OLink
476
+ v-if="act.status === 2"
477
+ color="primary"
478
+ variant="text"
479
+ @click.stop="passItem(act)"
417
480
  >
418
- <OLink v-if="act.status === 2" color="primary" variant="text" @click.stop="passItem(act)">
419
481
  通过
420
482
  </OLink>
421
- <OLink v-if="act.status === 2" color="primary" variant="text" @click.stop="rejectItem(act)">
483
+ <OLink
484
+ v-if="act.status === 2"
485
+ color="primary"
486
+ variant="text"
487
+ @click.stop="rejectItem(act)"
488
+ >
422
489
  驳回
423
490
  </OLink>
424
491
  </div>
425
492
  </template>
426
493
  <div class="activity-detail">
427
- <MeetingDetail :show="expanded.includes(act.id)" :data="act"
428
- :ref="(insRef) => getDetailRefs(insRef, act.id)" page="approval" />
494
+ <OMeetingDetail
495
+ :show="expanded.includes(act.id)"
496
+ :data="act"
497
+ :ref="(insRef) => getDetailRefs(insRef, act.id)"
498
+ page="approval"
499
+ />
429
500
  </div>
430
501
  </OCollapseItem>
431
502
  </template>
@@ -444,8 +515,12 @@ watch(
444
515
  />
445
516
  </div>
446
517
  </div>
447
- <ODialog v-model:visible="reviewVisible" :phone-half-full="lePadV"
448
- main-class="handle-dialog-approval review-dialog">
518
+ <ODialog
519
+ v-model:visible="reviewVisible"
520
+ :phone-half-full="lePadV"
521
+ main-class="handle-dialog-approval review-dialog"
522
+ :actions="reviewActions"
523
+ >
449
524
  <template #header>{{ digTitle }}</template>
450
525
  <div class="dialog-content">
451
526
  <OForm :model="form" ref="formRef" has-required layout="v" class="form-wrapper">
@@ -453,7 +528,6 @@ watch(
453
528
  <OTextarea
454
529
  size="large"
455
530
  placeholder="请输入审核的备注信息"
456
- style="width: 100%"
457
531
  :rows="4"
458
532
  resize="none"
459
533
  :max-length="1000"
@@ -463,313 +537,289 @@ watch(
463
537
  </OFormItem>
464
538
  </OForm>
465
539
  </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
540
  </ODialog>
476
541
  <!-- 取消活动弹窗 -->
477
- <ODialog v-model:visible="cancelVisible" :phone-half-full="lePadV" main-class="handle-dialog-approval">
542
+ <ODialog
543
+ v-model:visible="cancelVisible"
544
+ :phone-half-full="lePadV"
545
+ main-class="handle-dialog-approval cancel-dialog"
546
+ :actions="cancelActions"
547
+ >
478
548
  <template #header>{{ cancelTitle }}</template>
479
- <div class="dialog-content">是否确认{{ cancelText }}“{{ currentRow.title
480
- }}”活动?取消后将不在会议首页呈现,且已报名的数据也会被清空,请谨慎操作。
549
+ <div class="dialog-content">
550
+ 是否确认{{ cancelText }}“{{ currentRow?.title }}”活动?{{ cancelText }}后将不在会议首页呈现,且已报名的数据也会被清空,请谨慎操作。
481
551
  </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
552
  </ODialog>
492
553
  </div>
493
554
  </template>
494
555
 
495
- <style lang="scss" scoped>
496
- .my-approval {
497
- height: 100%;
498
- }
499
-
500
- .title {
501
- color: var(--o-color-info1);
502
- font-weight: 500;
503
- @include h2;
504
- }
505
-
506
- .desc {
507
- color: var(--o-color-info2);
508
- margin-top: 12px;
509
- @include tip1;
510
- }
511
-
512
- .o-divider {
513
- --o-divider-gap: 24px;
514
- }
556
+ <style lang="scss">
557
+ .o-activity-table {
515
558
 
516
- .expand-detail {
517
- padding: 16px 60px;
518
- background-color: rgba(243, 246, 250, 1);
519
- }
559
+ .expand-detail {
560
+ padding: 16px 60px;
561
+ background-color: rgba(243, 246, 250, 1);
562
+ }
520
563
 
521
- .o-form {
522
- &.o-form-layout-v {
523
- .o-form-item-label {
524
- margin-bottom: var(--o-gap-2);
564
+ .activity-btn {
565
+ .o-btn + .o-btn {
566
+ margin-left: 24px;
525
567
  }
526
- }
527
- }
528
568
 
529
- .activity-btn {
530
- .o-btn + .o-btn {
531
- margin-left: 24px;
569
+ @include respond-to('<=pad_v') {
570
+ .o-btn + .o-btn {
571
+ margin-left: 16px;
572
+ }
573
+ }
574
+ @include respond-to('phone') {
575
+ margin-top: 8px;
576
+ .o-btn + .o-btn {
577
+ margin-left: 12px;
578
+ }
579
+ }
532
580
  }
533
581
 
534
- @include respond-to('<=pad_v') {
535
- .o-btn + .o-btn {
536
- margin-left: 16px;
582
+ .o-btn-text {
583
+ @include hover {
584
+ background-color: transparent;
585
+ color: var(--o-color-primary1);
537
586
  }
538
587
  }
539
- @include respond-to('phone') {
540
- margin-top: 8px;
541
- .o-btn + .o-btn {
542
- margin-left: 12px;
543
- }
588
+
589
+ .o-btn.o-btn-text {
590
+ padding-left: 0 !important;
591
+ padding-right: 0 !important;
592
+ min-width: auto;
544
593
  }
545
- }
546
594
 
547
- .o-btn-text {
548
- @include hover {
549
- background-color: transparent;
550
- color: var(--o-color-primary1);
595
+ .o-tag {
596
+ --tag-radius: 100px;
597
+ --tag-bg-color: rgba(0, 113, 243, 0.1);
598
+ --tag-bd-color: transparent;
551
599
  }
552
- }
553
600
 
554
- .o-btn.o-btn-text {
555
- padding-left: 0 !important;
556
- padding-right: 0 !important;
557
- min-width: auto;
558
- }
601
+ .tag-draft,
602
+ .tag-cancel {
603
+ --tag-color: var(--o-color-info3);
604
+ --tag-bg-color: rgba(222, 222, 227, 1);
605
+ }
559
606
 
560
- .o-tag {
561
- --tag-radius: 100px;
562
- --tag-bg-color: rgba(0, 113, 243, 0.1);
563
- --tag-bd-color: transparent;
564
- }
607
+ .tag-registration,
608
+ .tag-in-progress,
609
+ .tag-ended {
610
+ --tag-color: rgba(36, 171, 54, 1);
611
+ --tag-bg-color: rgba(36, 171, 54, 0.1);
612
+ }
565
613
 
566
- .tag-draft,
567
- .tag-calcel {
568
- --tag-color: var(--o-color-info3);
569
- --tag-bg-color: rgba(222, 222, 227, 1);
570
- }
614
+ .tag-reject {
615
+ --tag-color: rgba(294, 118, 17, 1);
616
+ --tag-bg-color: rgba(294, 118, 17, 0.1);
617
+ }
571
618
 
572
- .tag-registration,
573
- .tag-in-progress,
574
- .tag-ended {
575
- --tag-color: rgba(36, 171, 54, 1);
576
- --tag-bg-color: rgba(36, 171, 54, 0.1);
577
- }
619
+ .sort-time {
620
+ display: flex;
621
+ align-items: center;
622
+ cursor: pointer;
623
+ }
578
624
 
579
- .tag-reject {
580
- --tag-color: rgba(294, 118, 17, 1);
581
- --tag-bg-color: rgba(294, 118, 17, 0.1);
582
- }
625
+ .sort-btn {
626
+ margin-left: 4px;
627
+ }
583
628
 
584
- .sort-time {
585
- display: flex;
586
- align-items: center;
587
- cursor: pointer;
588
- }
629
+ .sort-item {
630
+ width: 0;
631
+ height: 0;
632
+ border: 5px solid transparent;
633
+ }
589
634
 
590
- .sort-btn {
591
- margin-left: 4px;
592
- }
635
+ .sort-asc {
636
+ border-bottom-color: var(--o-color-info2);
637
+ margin-bottom: 2px;
593
638
 
594
- .sort-item {
595
- width: 0;
596
- height: 0;
597
- border: 5px solid transparent;
598
- }
639
+ &.active {
640
+ border-bottom-color: var(--o-color-primary1);
641
+ }
642
+ }
599
643
 
600
- .sort-asc {
601
- border-bottom-color: var(--o-color-info2);
602
- margin-bottom: 2px;
644
+ .sort-desc {
645
+ border-top-color: var(--o-color-info2);
646
+ margin-top: 2px;
603
647
 
604
- &.active {
605
- border-bottom-color: var(--o-color-primary1);
648
+ &.active {
649
+ border-top-color: var(--o-color-primary1);
650
+ }
606
651
  }
607
- }
608
652
 
609
- .sort-desc {
610
- border-top-color: var(--o-color-info2);
611
- margin-top: 2px;
653
+ .el-table {
654
+ --el-table-header-bg-color: rgba(235, 241, 250, 1);
655
+ color: var(--o-color-info1);
656
+ @include text1;
612
657
 
613
- &.active {
614
- border-top-color: var(--o-color-primary1);
615
- }
616
- }
658
+ .el-table__header-wrapper {
659
+ border-radius: 12px 12px 0 0;
617
660
 
618
- .el-table {
619
- --el-table-header-bg-color: rgba(235, 241, 250, 1);
620
- color: var(--o-color-info1);
621
- @include text1;
661
+ .el-table__cell {
662
+ padding: 12px 0 11px;
663
+ }
622
664
 
623
- .el-table__header-wrapper {
624
- border-radius: 12px 12px 0 0;
665
+ .cell {
666
+ color: var(--o-color-info2);
667
+ font-weight: 600;
668
+ @include text1;
669
+ }
670
+ }
625
671
 
626
- .el-table__cell {
627
- padding: 12px 0 11px;
672
+ .el-table__expanded-cell {
673
+ padding: 0;
628
674
  }
629
675
 
630
676
  .cell {
631
- color: var(--o-color-info2);
632
- font-weight: 600;
633
- @include text1;
677
+ white-space: nowrap;
634
678
  }
635
679
  }
636
680
 
637
- .el-table__expanded-cell {
638
- padding: 0;
639
- }
640
-
641
- .cell {
642
- white-space: nowrap;
681
+ .pagination {
682
+ margin-top: 32px;
683
+ display: flex;
684
+ align-items: center;
685
+ justify-content: flex-end;
643
686
  }
644
- }
645
687
 
646
- .pagination {
647
- margin-top: 32px;
648
- display: flex;
649
- align-items: center;
650
- justify-content: flex-end;
651
- }
652
-
653
- .review-dialog {
654
- .review-content {
655
- width: 100%;
688
+ .o-textarea {
689
+ --_box-radius: 16px;
656
690
  }
657
- }
658
691
 
659
- .o-textarea {
660
- --_box-radius: 16px;
661
- }
692
+ .dialog-footer {
693
+ display: flex;
694
+ justify-content: center;
695
+ align-items: center;
662
696
 
663
- .dialog-footer {
664
- display: flex;
665
- justify-content: center;
666
- align-items: center;
697
+ .o-btn + .o-btn {
698
+ margin-left: 16px;
699
+ }
667
700
 
668
- .o-btn + .o-btn {
669
- margin-left: 16px;
701
+ @include respond-to('<=pad_v') {
702
+ .o-btn {
703
+ width: 140px;
704
+ color: var(--o-color-info1);
705
+ padding: 6px 24px !important;
706
+ }
707
+ .o-btn + .o-btn {
708
+ margin-left: 0;
709
+ }
710
+ }
670
711
  }
671
712
 
672
- @include respond-to('<=pad_v') {
673
- .o-btn {
674
- width: 140px;
675
- color: var(--o-color-info1);
676
- padding: 6px 24px !important;
677
- }
678
- .o-btn + .o-btn {
679
- margin-left: 0;
713
+ .collapse-wrapper {
714
+ .o-tag {
715
+ height: 24px;
680
716
  }
681
- }
682
- }
683
717
 
684
- .collapse-wrapper {
685
- .o-tag {
686
- height: 24px;
687
- }
718
+ .o-collapse {
719
+ padding: 0;
720
+ border-radius: 12px;
688
721
 
689
- .o-collapse {
690
- padding: 0;
691
- border-radius: 12px;
722
+ .o-collapse-item {
723
+ --collapse-item-header-padding: 8px 0 12px;
692
724
 
693
- .o-collapse-item {
694
- --collapse-item-header-padding: 8px 0 12px;
725
+ &:last-child {
726
+ padding-bottom: 16px;
727
+ }
728
+ }
695
729
 
696
- &:last-child {
697
- padding-bottom: 16px;
730
+ .act-sponsor {
731
+ display: flex;
732
+ align-items: center;
733
+ color: var(--o-color-info3);
734
+ margin-right: 16px;
735
+ @include text1;
698
736
  }
699
- }
700
737
 
701
- .act-sponsor {
702
- display: flex;
703
- align-items: center;
704
- color: var(--o-color-info3);
705
- margin-right: 16px;
706
- @include text1;
707
- }
738
+ .sponsor {
739
+ margin-right: 12px;
740
+ @include text-truncate(1);
741
+ }
708
742
 
709
- .sponsor {
710
- margin-right: 12px;
711
- @include text-truncate(1);
712
- }
743
+ .o-collapse-item-icon {
744
+ transform: rotate(0deg);
745
+ width: 24px;
746
+ height: 24px;
747
+ }
713
748
 
714
- .o-collapse-item-icon {
715
- transform: rotate(0deg);
716
- width: 24px;
717
- height: 24px;
749
+ .o-collapse-item-expanded .o-collapse-item-icon {
750
+ transform: rotate(90deg);
751
+ }
752
+
753
+ .o-collapse-item-header {
754
+ border-bottom: 1px solid var(--o-color-control4);
755
+ margin: 0 16px;
756
+ }
718
757
  }
719
758
 
720
- .o-collapse-item-expanded .o-collapse-item-icon {
721
- transform: rotate(90deg);
759
+ .activity-detail {
760
+ padding: 12px 16px;
761
+ background-color: rgba(243, 246, 250, 1);
722
762
  }
723
763
 
724
- .o-collapse-item-header {
725
- border-bottom: 1px solid var(--o-color-control4);
726
- margin: 0 16px;
764
+ .pagination {
765
+ justify-content: center;
766
+ margin-top: 24px;
727
767
  }
728
768
  }
729
769
 
730
- .activity-detail {
731
- padding: 12px 16px;
732
- background-color: rgba(243, 246, 250, 1);
733
- }
770
+ .title-top {
771
+ display: flex;
772
+ align-items: center;
773
+ justify-content: space-between;
774
+ padding: 12px 16px 0;
734
775
 
735
- .pagination {
736
- justify-content: center;
737
- margin-top: 24px;
776
+ .act-title {
777
+ color: var(--o-color-info1);
778
+ margin-right: 12px;
779
+ font-weight: 600;
780
+ @include text1;
781
+ @include text-truncate(1);
782
+ }
738
783
  }
739
784
  }
740
785
 
741
- .title-top {
742
- display: flex;
743
- align-items: center;
744
- justify-content: space-between;
745
- padding: 12px 16px 0;
746
-
747
- .act-title {
748
- color: var(--o-color-info1);
749
- margin-right: 12px;
750
- font-weight: 600;
751
- @include text1;
752
- @include text-truncate(1);
753
- }
754
- }
755
786
  </style>
756
787
 
757
788
  <style lang="scss">
758
- .review-dialog {
759
- width: 690px;
760
- --dlg-radius: 16px;
789
+ .handle-dialog-approval {
790
+ --dlg-width: 450px;
791
+ --dlg-radius: var(--o-radius-xs);
761
792
  @include respond-to('<=pad_v') {
762
793
  width: 100%;
763
- --dlg-radius: 16px 16px 0 0;
794
+ --dlg-radius: var(--o-radius-xs) var(--o-radius-xs) 0 0;
764
795
  }
765
796
  }
766
797
 
767
- .handle-dialog-approval {
768
- width: 450px;
769
- --dlg-radius: 16px;
770
- @include respond-to('<=pad_v') {
771
- width: 100%;
772
- --dlg-radius: 16px 16px 0 0;
798
+ .cancel-dialog {
799
+ .o-dlg-footer {
800
+ margin-top: var(--o-gap-5);
773
801
  }
774
802
  }
803
+ .review-dialog {
804
+ --dlg-width: 690px;
805
+
806
+ .o-form {
807
+ width: 450px;
808
+ margin: 0 auto;
809
+
810
+ .o-form-item-label {
811
+ margin-bottom: var(--o-gap-2);
812
+ }
813
+
814
+ .o-textarea {
815
+ width: 100%;
816
+ --_box-radius: var(--o-radius-xs);
817
+ }
818
+ }
819
+
820
+ .o-dlg-footer {
821
+ margin-top: var(--o-gap-6);
822
+ }
823
+ }
824
+
775
825
  </style>