BonusAgreementPopup.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :showFooters="true"
  3. custom-class="clause-popup" :title="title">
  4. <view class="popup-content">
  5. <scroll-view scroll-y class="clause-content">
  6. <view v-if="type == 'nzTwo'">
  7. <view class="h4"><text v-t="'news_add_field1.activitiesNZTwo.item8'"></text>{{
  8. tableData4Two.applicationStartTime }} - {{ tableData4Two.applicationEndTime }}</view>
  9. <view class="h4" v-t="'news_add_field1.activitiesNZTwo.item10'"></view>
  10. <view class="list">
  11. <view class="list-item" v-for="i in 6" :key="i"
  12. v-t="`news_add_field1.activitiesNZTwo.item1${i}`" />
  13. <view class="list-item">
  14. <view class="table-container">
  15. <view class="table">
  16. <view class="tr">
  17. <view class="th" v-for="th in 7" :key="th"
  18. v-t="`news_add_field1.activitiesNZTwo.item${3 + th - 1}1`"></view>
  19. </view>
  20. <view class="tr" v-for="r in 5" :key="r">
  21. <view class="td" v-for="c in 7" :key="c"
  22. v-t="`news_add_field1.activitiesNZTwo.item${3 + r - 1}${c}`"></view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="list-item" v-for="i in 5" :key="i"
  28. v-t="`news_add_field1.activitiesNZTwo.item${17 + i - 1}`" />
  29. </view>
  30. </view>
  31. <view v-else-if="type == 'newList'">
  32. <cwg-rich-text class="popup-text" :nodes="content" />
  33. </view>
  34. </scroll-view>
  35. </view>
  36. <template #footer>
  37. <button @click="close">{{ t('Btn.Cancel') }}</button>
  38. <button type="primary" @click="close">{{ t('Btn.Confirm') }}</button>
  39. </template>
  40. </cwg-popup>
  41. </template>
  42. <script setup>
  43. import { computed } from 'vue';
  44. import { useI18n } from 'vue-i18n';
  45. const props = defineProps({
  46. visible: {
  47. type: Boolean,
  48. default: false
  49. },
  50. type: {
  51. type: String,
  52. default: 'nzTwo',
  53. },
  54. title: {
  55. type: String,
  56. default: ''
  57. },
  58. tableData4Two: {
  59. type: Object,
  60. default: () => ({})
  61. },
  62. content: {
  63. type: String,
  64. default: ''
  65. }
  66. });
  67. const emit = defineEmits(['update:visible']);
  68. const { t } = useI18n();
  69. // Watch for changes in visible prop and emit update event
  70. const visible = computed({
  71. get: () => props.visible,
  72. set: (value) => emit('update:visible', value)
  73. });
  74. const close = () => { visible.value = false; };
  75. </script>
  76. <style lang="scss" scoped>
  77. .clause-popup {
  78. width: 90%;
  79. max-width: 800px;
  80. max-height: 80vh;
  81. overflow: hidden;
  82. .popup-content {
  83. padding: 20px;
  84. }
  85. .clause-content {
  86. height: 60vh;
  87. width: 100%;
  88. .h4 {
  89. font-size: 16px;
  90. font-weight: 600;
  91. color: #303133;
  92. margin-bottom: 12px;
  93. margin-top: 16px;
  94. }
  95. .list {
  96. margin-bottom: 20px;
  97. .list-item {
  98. margin-bottom: 8px;
  99. line-height: 1.5;
  100. color: #606266;
  101. }
  102. .table-container {
  103. margin: 16px 0;
  104. overflow-x: auto;
  105. .table {
  106. width: 100%;
  107. border-collapse: collapse;
  108. .tr {
  109. display: flex;
  110. width: 100%;
  111. .th,
  112. .td {
  113. flex: 1;
  114. padding: 10px;
  115. text-align: center;
  116. border: 1px solid #dcdfe6;
  117. font-size: 14px;
  118. }
  119. .th {
  120. background: #f5f7fa;
  121. font-weight: 600;
  122. color: #303133;
  123. }
  124. .td {
  125. color: #606266;
  126. }
  127. }
  128. }
  129. }
  130. }
  131. .popup-text {
  132. line-height: 1.6;
  133. color: #606266;
  134. p {
  135. margin-bottom: 12px;
  136. }
  137. h1,
  138. h2,
  139. h3,
  140. h4,
  141. h5,
  142. h6 {
  143. margin: 16px 0 8px 0;
  144. color: #303133;
  145. }
  146. ul,
  147. ol {
  148. margin-left: 20px;
  149. margin-bottom: 12px;
  150. }
  151. li {
  152. margin-bottom: 4px;
  153. }
  154. }
  155. }
  156. }
  157. // Responsive styles
  158. @media (max-width: 768px) {
  159. .clause-popup {
  160. width: 95%;
  161. max-height: 85vh;
  162. .popup-content {
  163. padding: 16px;
  164. }
  165. .clause-content {
  166. height: 50vh;
  167. .h4 {
  168. font-size: 14px;
  169. }
  170. .list {
  171. .table-container {
  172. .table {
  173. .tr {
  174. .th,
  175. .td {
  176. padding: 8px;
  177. font-size: 12px;
  178. }
  179. }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. }
  186. </style>