ClauseNZPopup.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :showFooters="true" custom-class="clause-popup"
  3. :title="title">
  4. <view class="popup-content">
  5. <scroll-view scroll-y class="clause-content">
  6. <view>
  7. <view class="h4"><text v-t="'news_add_field1.activitiesNZ.item8'"></text>{{ startDate }} - {{ endDate }}
  8. </view>
  9. <view class="h4" v-t="'news_add_field1.activitiesNZ.item10'"></view>
  10. <view class="list">
  11. <view class="list-item" v-for="i in 5" :key="i" v-t="`news_add_field1.activitiesNZ.item1${i}`"></view>
  12. <view class="list-item">
  13. <view class="table-container">
  14. <view class="table">
  15. <view class="tr">
  16. <view class="th" v-for="th in 7" :key="th" v-t="`news_add_field1.activitiesNZ.item${30 + th}1`">
  17. </view>
  18. </view>
  19. <view class="tr" v-for="r in 4" :key="r">
  20. <view class="td" v-for="c in 7" :key="c" v-t="`news_add_field1.activitiesNZ.item${30 + r}${c}`">
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="list-item" v-for="i in 5" :key="i" v-t="`news_add_field1.activitiesNZ.item2${i}`"></view>
  27. </view>
  28. </view>
  29. </scroll-view>
  30. </view>
  31. <template #footer>
  32. <button @click="close">{{ t('Btn.Cancel') }}</button>
  33. <button type="primary" @click="close">{{ t('Btn.Confirm') }}</button>
  34. </template>
  35. </cwg-popup>
  36. </template>
  37. <script setup>
  38. import { computed } from 'vue';
  39. import { useI18n } from 'vue-i18n';
  40. const props = defineProps({
  41. visible: { type: Boolean, default: false },
  42. startDate: { type: String, default: '' },
  43. endDate: { type: String, default: '' },
  44. title: { type: String, default: '' }
  45. });
  46. const emit = defineEmits(['update:visible']);
  47. const { t } = useI18n();
  48. const visible = computed({
  49. get: () => props.visible,
  50. set: (val) => emit('update:visible', val)
  51. });
  52. const close = () => { visible.value = false; };
  53. </script>
  54. <style lang="scss" scoped>
  55. @import "@/uni.scss";
  56. .clause-popup {
  57. width: 90%;
  58. max-width: 800px;
  59. .clause-content {
  60. padding: px2rpx(20);
  61. max-height: px2rpx(500);
  62. overflow-y: auto;
  63. text-align: left;
  64. line-height: 1.6;
  65. .h4 {
  66. font-size: px2rpx(16);
  67. font-weight: bold;
  68. margin: px2rpx(16) 0;
  69. }
  70. .list {
  71. .list-item {
  72. margin-bottom: px2rpx(12);
  73. }
  74. }
  75. .table-container {
  76. width: 100%;
  77. overflow-x: auto;
  78. margin: px2rpx(16) 0;
  79. .table {
  80. width: 100%;
  81. border-collapse: collapse;
  82. .tr {
  83. display: flex;
  84. border-bottom: 1px solid #e4e7ed;
  85. &:last-child {
  86. border-bottom: none;
  87. }
  88. }
  89. .th,
  90. .td {
  91. flex: 1;
  92. padding: px2rpx(8);
  93. text-align: center;
  94. border-right: 1px solid #e4e7ed;
  95. &:last-child {
  96. border-right: none;
  97. }
  98. }
  99. .th {
  100. font-weight: bold;
  101. background-color: #f5f7fa;
  102. }
  103. .td {
  104. background-color: #ffffff;
  105. }
  106. }
  107. }
  108. }
  109. }
  110. </style>