nationalregionalInformaions.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view>
  3. <!--搜索导航栏-->
  4. <rf-search-bar2 @search="inputValue" icon="iconkuaijiecaidan" @tab="tabClick"
  5. :title=" i18n('Committeeactivities') " style="z-index: 99;" />
  6. <view class="" style="background-color: #fff;margin-top: 150upx;width: 100%;">
  7. <view>
  8. <view style="margin: 10upx 20upx;
  9. overflow: hidden;background-color: #fff;position: relative;" v-for="(item,index) in activityInfo"
  10. @click="toView(item)">
  11. <image :src="websiteUrl+ item.activityLogo" alt="" v-if="item.activityLogo"
  12. style="width: 100%;height: 300upx;border-radius: 0 0 20upx 20upx;">
  13. </image>
  14. <image :src="websiteUrl+'/def/def1.png'" alt="" v-if="!item.activityLogo"
  15. style="width: 100%;height: 300upx;border-radius: 0 0 20upx 20upx;">
  16. </image>
  17. <view class="recommend-bottom">
  18. <view class="recommend-bottom-name">{{item.activityName}}</view>
  19. <view class="activityInfoDetails" style="margin-top: 10upx;margin-bottom: 20upx;">
  20. <image src="../../../static/img/nationaIntroductionList/naPlace.png" mode="" class="icon">
  21. </image>
  22. {{item.activityPlace}} | <text style="margin-left: 15upx;">
  23. {{formatDate(item.activityStartTime)}} -- {{formatDate(item.activityEndTime)}}
  24. </text>
  25. <image src="@/static/img/nationaIntroductionList/heat.png" alt=""
  26. style="vertical-align: middle; width: 32upx; height: 32upx; margin: 0upx 6upx 0upx 12upx; vertical-align: middle;">
  27. </image>
  28. <span style="vertical-align: middle;">
  29. {{item.num?item.num:0}}
  30. </span>
  31. </view>
  32. </view>
  33. <u-gap v-if="index+1 !==activityInfo.length" height="20" bg-color="#F3F4F5"
  34. style="width: 750upx !important;"></u-gap>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import rfSearchBar2 from '@/components/rf-search-bar-xiangmu';
  42. export default {
  43. components: {
  44. rfSearchBar2
  45. },
  46. data() {
  47. return {
  48. input: '',
  49. activityInfo: [],
  50. options: [], // 区域
  51. options2: [], // 类型
  52. }
  53. },
  54. created() {
  55. this.getDicts();
  56. },
  57. onShow() {
  58. this.getList();
  59. },
  60. computed: {
  61. // options2Map(value){
  62. // if(this.options2.length>0){
  63. // const PostDicts= this.options2.filter(item=>{
  64. // return item.value == value
  65. // })
  66. // return PostDicts[0].label;
  67. // }
  68. // },
  69. },
  70. methods: {
  71. options2Map() {
  72. return this.options2.array2Obj("value", "label")
  73. },
  74. async getDicts() {
  75. const res = await this.$myRequest({
  76. url: '/sys/sysDicts',
  77. data: {
  78. type: 'COMMITTEE_REGIONAL_DICT,COMMITTEE_ACTIVITY_TYPE,COMMITTEE_REGIONAL_DICT_EN,COMMITTEE_ACTIVITY_TYPE_EN'
  79. }
  80. })
  81. var data = res.data;
  82. if (data) {
  83. if (this.$i18n.locale == 'zh') {
  84. this.options = [];
  85. this.options2 = [];
  86. this.options = res.data[0];
  87. this.options2 = res.data[1];
  88. this.options.unshift({
  89. label: "全部区域",
  90. value: null,
  91. });
  92. this.options2.unshift({
  93. label: "全部类型",
  94. value: null,
  95. });
  96. } else if (this.$i18n.locale == 'en') {
  97. this.options = [];
  98. this.options2 = [];
  99. this.options = res.data[2];
  100. this.options2 = res.data[3];
  101. this.options.unshift({
  102. label: "ALL",
  103. value: null,
  104. });
  105. this.options2.unshift({
  106. label: "ALL",
  107. value: null,
  108. });
  109. }
  110. }
  111. },
  112. inputValue(data) {
  113. this.input = data.input;
  114. this.getList();
  115. },
  116. async getList() {
  117. let page = {
  118. pageSize: 5,
  119. pageNo: 1,
  120. language: this.$i18n.locale.toUpperCase(),
  121. activityName: this.input,
  122. };
  123. const res = await this.$myRequest({
  124. url: '/project/committeeActivityInfos/getCommitteeActivityList',
  125. data: page
  126. })
  127. this.activityInfo = res.data.committeeActivityInfos || [];
  128. },
  129. i18n(data) {
  130. return this.$t('common.' + data);
  131. },
  132. toView(item) {
  133. this.$mRouter.push({
  134. route: `/pages/nationalregionalCommissions/nationalregionalInformaions/nationalregionlInformationDetail?id=${item.entityId}`,
  135. });
  136. },
  137. }
  138. }
  139. </script>
  140. <style>
  141. page {
  142. background-color: #fff;
  143. }
  144. .yellow {
  145. position: absolute;
  146. top: 0;
  147. left: 0;
  148. /* min-width: 96px; */
  149. padding: 0 40upx;
  150. height: 64upx;
  151. text-align: center;
  152. line-height: 64upx;
  153. font-size: 28upx;
  154. color: #fff;
  155. border-radius: 0 0 20upx 0;
  156. }
  157. .yellow {
  158. background: rgb(255, 153, 0);
  159. }
  160. .icon {
  161. width: 30upx;
  162. height: 30upx;
  163. vertical-align: middle;
  164. margin-right: 14upx;
  165. }
  166. .activityInfoDetails {
  167. line-height: 50upx;
  168. }
  169. </style>