nationalregionlInformationDetail.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <view class="">
  3. <u-navbar :back-text="i18n('Back')" :back-text-style="backStyle" back-icon-color="#fff" title-color="#fff"
  4. :title="i18n('NationalregionalCommissions')" :background="background">
  5. </u-navbar>
  6. <view class="" style="background-color: #fff;width: 100%;">
  7. <view>
  8. <view style="margin: 10upx 20upx;
  9. overflow: hidden;background-color: #fff;position: relative;">
  10. <img :src="websiteUrl+ activityInfo.activityLogo" alt="" v-if="activityInfo.activityLogo"
  11. style="width: 100%;height: 300upx;border-radius: 0 0 20upx 20upx;">
  12. <img :src="websiteUrl+'/def/def1.png'" alt="" v-if="!activityInfo.activityLogo"
  13. style="width: 100%;height: 300upx;border-radius: 0 0 20upx 20upx;">
  14. <view class="recommend-bottom">
  15. <view class="recommend-bottom-name" style="width: 700upx;">
  16. {{activityInfo.activityName}}
  17. </view>
  18. <view style="padding: 10upx 15upx;background-color: #66CC01;color: #fff;
  19. border-radius: 12upx;margin-left: 10upx;min-width: 200upx;text-align: center;max-width: 300upx;">
  20. {{activityInfo.activityTypeDict == '1' ?
  21. $i18n.locale == 'zh'? '委员会活动':'CommitteeActivities':$i18n.locale == 'zh'?'委员会动态':'CommitteeDynamics'
  22. }}
  23. </view>
  24. <view class="activityInfoDetails">
  25. <image src="../../../static/img/nationaIntroductionList/placeName.png" mode="" class="icon">
  26. </image>
  27. {{$i18n.locale=='zh'?basisInfo.ZH:basisInfo.EN}}
  28. </view>
  29. <view class="recommend-bottom-time activityInfoDetails">
  30. <image src="../../../static/img/nationaIntroductionList/naTime.png" mode="" class="icon">
  31. </image>
  32. <text>{{formatDate(activityInfo.activityStartTime)}} -
  33. {{formatDate(activityInfo.activityEndTime)}}</text>
  34. </view>
  35. <view class="activityInfoDetails">
  36. <image src="../../../static/img/nationaIntroductionList/naPlace.png" mode="" class="icon">
  37. </image>
  38. {{activityInfo.activityPlace}}
  39. </view>
  40. <view class="" style="color: #333333;width: 700upx;">
  41. {{activityInfo.activityIntroduction}}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <u-gap height="20" bg-color="#F3F4F5" style="width: 750upx !important;"></u-gap>
  48. <view style="margin: 10upx 20upx;" v-if="activityInfo.activityReviewUe">
  49. <view v-html="activityInfo.activityReviewUe" class="coo_box"></view>
  50. </view>
  51. <view style="margin: 10upx 20upx;" v-else>
  52. <view v-html="activityInfo.activityPreviewUe" class="coo_box"></view>
  53. </view>
  54. <u-gap height="20" bg-color="#F3F4F5" style="width: 750upx !important;"
  55. v-if="activityInfo.activityReviewUe || activityInfo.activityPreviewUe"></u-gap>
  56. <!-- 重要活动 -->
  57. <view class="" style="margin: 10upx 30upx;" v-if="recommendData.length>0">
  58. <text style="display: inline-block;width: 10upx;height: 30upx;
  59. background-color: #6DD400;vertical-align: middle;margin-right: 10upx;"></text>
  60. {{i18n('ImportantEvent')}}
  61. </view>
  62. <view class="" style="margin-left: 30upx;">
  63. <view class="swiper " style="height: 400upx;">
  64. <view class="swiper-box" style="height: 400upx">
  65. <swiper>
  66. <swiper-item v-for="(item, index) in recommendData" :key="index"
  67. @click="dataChange(item.entityId)">
  68. <view class="swiper-item" style="height: 100%;">
  69. <image v-if="item.activityLogo" :src="websiteUrl + item.activityLogo" alt=""
  70. style="width: 100%;height:200upx"></image>
  71. <image v-else :src="websiteUrl+'/def/def1.png'" alt=""
  72. style="width: 100%;height:200upx"></image>
  73. <view class="" style="min-height: 100upx;">{{item.activityName}}</view>
  74. </view>
  75. </swiper-item>
  76. </swiper>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. export default {
  84. data() {
  85. return {
  86. input: '',
  87. activityId: null,
  88. activityInfo: [],
  89. options: [], // 区域
  90. options2: [], // 类型
  91. background: {
  92. backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
  93. },
  94. backStyle: {
  95. color: '#fff'
  96. },
  97. basisInfo: {},
  98. recommendData: [],
  99. }
  100. },
  101. async onLoad(options) {
  102. this.activityId = options.id;
  103. this.getDicts();
  104. },
  105. onShow() {
  106. this.getList();
  107. },
  108. methods: {
  109. options2Map() {
  110. return this.options2.array2Obj("value", "label");
  111. },
  112. async getDicts() {
  113. const res = await this.$myRequest({
  114. url: '/sys/sysDicts',
  115. data: {
  116. type: 'COMMITTEE_REGIONAL_DICT,COMMITTEE_ACTIVITY_TYPE,COMMITTEE_REGIONAL_DICT_EN,COMMITTEE_ACTIVITY_TYPE_EN'
  117. }
  118. })
  119. var data = res.data;
  120. if (data) {
  121. if (this.$i18n.locale == 'zh') {
  122. this.options = [];
  123. this.options2 = [];
  124. this.options = res.data[0];
  125. this.options2 = res.data[1];
  126. this.options.unshift({
  127. label: "全部区域",
  128. value: null,
  129. });
  130. this.options2.unshift({
  131. label: "全部类型",
  132. value: null,
  133. });
  134. } else if (this.$i18n.locale == 'en') {
  135. this.options = [];
  136. this.options2 = [];
  137. this.options = res.data[2];
  138. this.options2 = res.data[3];
  139. this.options.unshift({
  140. label: "ALL",
  141. value: null,
  142. });
  143. this.options2.unshift({
  144. label: "ALL",
  145. value: null,
  146. });
  147. }
  148. }
  149. },
  150. dataChange(id) {
  151. this.activityId = id;
  152. this.getList();
  153. },
  154. async getList() {
  155. // 详情信息
  156. let page = {
  157. language: this.$i18n.locale.toUpperCase(),
  158. entityId: this.activityId,
  159. };
  160. const res = await this.$myRequest({
  161. url: '/project/committeeActivityInfos/getCommitteeActivityInfo',
  162. data: page
  163. })
  164. this.activityInfo = res.data.committeeActivityInfo || [];
  165. this.basisInfo = res.data.basisInfo;
  166. // 重要活动
  167. let list = {
  168. pageSize: 6,
  169. pageNo: 1,
  170. language: this.$i18n.locale.toUpperCase(),
  171. };
  172. const important = await this.$myRequest({
  173. url: '/project/committeeActivityInfos/getCommitteeActivityList',
  174. data: list
  175. })
  176. if (important.data.importantCommitteeActivityInfos !== undefined) {
  177. important.data.importantCommitteeActivityInfos.forEach((item, index) => {
  178. if (item.activityId = this.activityId) {
  179. important.data.importantCommitteeActivityInfos.splice(index, 1);
  180. }
  181. })
  182. }
  183. this.recommendData = important.data.importantCommitteeActivityInfos || [];
  184. },
  185. i18n(data) {
  186. return this.$t('common.' + data);
  187. },
  188. }
  189. }
  190. </script>
  191. <style>
  192. page {
  193. background-color: #fff;
  194. }
  195. .yellow {
  196. position: absolute;
  197. top: 0;
  198. left: 0;
  199. /* min-width: 96px; */
  200. padding: 0 40upx;
  201. height: 64upx;
  202. text-align: center;
  203. line-height: 64upx;
  204. font-size: 28upx;
  205. color: #fff;
  206. border-radius: 0 0 20upx 0;
  207. }
  208. .yellow {
  209. background: rgb(255, 153, 0);
  210. }
  211. .icon {
  212. width: 30upx;
  213. height: 30upx;
  214. vertical-align: middle;
  215. margin-right: 14upx;
  216. }
  217. .activityInfoDetails {
  218. line-height: 50upx;
  219. }
  220. /deep/.uni-swiper-slides,
  221. .swiper-item {
  222. width: 270upx;
  223. max-height: 400upx;
  224. }
  225. .swiper-item {
  226. height: 100% !important;
  227. }
  228. .uni-swiper-slide-frame :nth-child(1) {
  229. margin-right: 50upx;
  230. }
  231. .border-top {
  232. border-top: 1px solid #03B6B3;
  233. }
  234. .uni-swiper-slide-frame :nth-child(1) .swiper-item {
  235. background: #F8F8F8;
  236. }
  237. .uni-swiper-slide-frame :nth-child(2) .swiper-item {
  238. background: #EFFAFF;
  239. }
  240. .uni-swiper-slide-frame :nth-child(3) .swiper-item {
  241. background: #c2a3e0;
  242. }
  243. .uni-swiper-slide-frame :nth-child(4) .swiper-item {
  244. background: #a3e0c2;
  245. }
  246. .uni-swiper-slide-frame :nth-child(5) .swiper-item {
  247. background: #feb84d;
  248. }
  249. /deep/ uni-swiper {
  250. height: 400upx !important;
  251. }
  252. .nationTitle {
  253. font-size: 26upx;
  254. font-family: PingFangSC-Semibold, PingFang SC;
  255. font-weight: 600;
  256. color: #333333;
  257. line-height: 37upx;
  258. }
  259. .Box_view:active {
  260. background-color: #f1f2f3;
  261. }
  262. .introduceMap-title {
  263. padding: 10upx 15upx;
  264. margin-left: 15upx;
  265. border: 1px solid #0079ef;
  266. }
  267. .nationLable {
  268. font-size: 26upx;
  269. font-family: PingFangSC-Semibold, PingFang SC;
  270. color: #333333;
  271. line-height: 37upx;
  272. }
  273. .recommend-bottom {
  274. width: 488upx;
  275. }
  276. .recommend-bottom-name {
  277. font-size: 35upx;
  278. font-family: PingFangSC-Medium, PingFang SC;
  279. font-weight: 500;
  280. color: #0B0B11;
  281. line-height: 55upx;
  282. margin-top: 30upx;
  283. /* overflow: hidden;
  284. text-overflow:ellipsis;
  285. white-space: nowrap; */
  286. }
  287. .imgage-user {
  288. width: 60upx;
  289. height: 60upx;
  290. overflow: hidden;
  291. border-radius: 60upx;
  292. }
  293. </style>