committeeLayoutZone.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <template>
  2. <view class="committeeLayout">
  3. <!-- 头部 -->
  4. <u-navbar back-icon-color="#fff" :height="50" :is-back="true" :back-text="$t('common.Back')"
  5. :background="{background:'#1777FE'}" :back-text-style="{color:'#fff'}" :border-bottom="true"
  6. title-color="#fff" title-width="400" :title="detail.committeeName" :custom-back="back">
  7. </u-navbar>
  8. <!-- 介绍 -->
  9. <view class="desText jianjie">
  10. <rich-text :nodes="detail.committeeProfileUe"></rich-text>
  11. </view>
  12. <!-- 主要信息 -->
  13. <view class="maininfo">
  14. <view class="datalist">
  15. <view class="block" v-for="(positem,posindex) in positionList" :key="posindex">
  16. <view class="blockTitle"
  17. :class="{zhuxi:positem.regionDutyDict==='1',fuzhuxi:positem.regionDutyDict==='2',weiyuan:positem.regionDutyDict==='3'}">
  18. {{positem.regionDuty}}
  19. </view>
  20. <view class="weiyuan">
  21. <view class="userThumb">
  22. <image class="userimg" v-if="positem.spareTwo" :src="websiteUrl+positem.spareTwo"></image>
  23. <image class="userimg" v-if="!positem.spareTwo" :src="userImg" mode="widthFix" alt="">
  24. </image>
  25. </view>
  26. <view class="info">
  27. <view class="name">
  28. <image class="icon" src="../../../static/weiyuanuser.png" mode="widthFix"></image>
  29. <text>{{positem.language=='EN'?positem.nameEn:positem.name}}</text>
  30. </view>
  31. <view class="name">
  32. <image class="icon iconp" src="../../../static/weiyuanpos.png" mode="widthFix"></image>
  33. <text>{{positem.country}}</text>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="desTitle">{{positem.language=='EN'?'Profile':'人物简介'}}</view>
  38. <view class="desText">
  39. <rich-text :nodes="positem.personalProfileUe"></rich-text>
  40. <!-- {{positem.personalProfileUe}} -->
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 动态 -->
  46. <view class="maininfo two" v-if="infoList.length>0">
  47. <view class="blockTitle round">{{this.$i18n.locale.toUpperCase()=='EN'?'Dynamics':'动态'}}</view>
  48. <view class="infowrap">
  49. <view class="infoitem" v-for="(infoitem,infoindex) in infoList" :key="infoindex"
  50. @click="showDetail('d',infoitem)">
  51. <view class="label">{{infoitem.activityName}}</view>
  52. <view class="date">{{formatDate(infoitem.activityStartTime)}}</view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. export default {
  60. name: 'CommitteeLayout',
  61. data() {
  62. return {
  63. entityId: '',
  64. detail: {},
  65. userImg: require('../../../static/E2.png'),
  66. positionList: [],
  67. infoList: []
  68. }
  69. },
  70. onLoad(e) {
  71. this.entityId = e.entityId
  72. },
  73. onShow() {
  74. this.detail = uni.getStorageSync('committeeData') ? uni.getStorageSync('committeeData') : false;
  75. },
  76. onUnload() {
  77. uni.removeStorageSync('committeeData')
  78. },
  79. mounted() {
  80. this.getMoreData()
  81. },
  82. methods: {
  83. //路由后退一步
  84. back() {
  85. // #ifdef H5
  86. history.back()
  87. // #endif
  88. // #ifndef H5
  89. uni.navigateBack()
  90. // #endif
  91. },
  92. showDetail(type, item) {
  93. let url;
  94. if (type == 'o') {
  95. console.log(type, item)
  96. url = '/pages/nationalregionalCommissions/nationalregionalInformaions/organizationDetail?entityId=' +
  97. item.entityId
  98. } else {
  99. url =
  100. '/pages/nationalregionalCommissions/nationalregionalInformaions/nationalregionlInformationDetail?id=' +
  101. item.entityId
  102. }
  103. if (url) uni.navigateTo({
  104. url: url
  105. })
  106. },
  107. // 获取详情数据
  108. async getMoreData() {
  109. let res = await this.$myRequest({
  110. url: '/project/committeeBasisInfos/getCommitteeCountryRelationInfoForApp',
  111. data: {
  112. entityId: this.entityId,
  113. language: this.$i18n.locale.toUpperCase()
  114. }
  115. })
  116. if (res.status == 200) {
  117. if (res.data) {
  118. let data = res.data;
  119. // 基本详情
  120. if (data.committeeBasisInfo) {
  121. this.detail = data.committeeBasisInfo
  122. }
  123. // 职位
  124. if (data.committeeShowMessageInfos) {
  125. let posdata = data.committeeShowMessageInfos;
  126. if (Array.isArray(posdata) && posdata.length > 0) {
  127. let zhuxi = [];
  128. let fuzhuxi = [];
  129. let weiyuan = [];
  130. for (let i = 0; i < posdata.length; i++) {
  131. if (posdata[i]['correlationType'] === 'P' && posdata[i]['regionDutyDict'] ===
  132. '1') {
  133. zhuxi.push(posdata[i]);
  134. } else if (posdata[i]['correlationType'] === 'P' && posdata[i][
  135. 'regionDutyDict'] === '2') {
  136. fuzhuxi.push(posdata[i]);
  137. } else {
  138. weiyuan.push(posdata[i]);
  139. }
  140. }
  141. this.positionList = [...zhuxi, ...fuzhuxi, ...weiyuan];
  142. }
  143. }
  144. // 动态
  145. if (data.activityInfos) {
  146. if (Array.isArray(data.activityInfos) && data.activityInfos.length > 0) {
  147. this.infoList = data.activityInfos
  148. }
  149. }
  150. }
  151. }
  152. },
  153. //
  154. }
  155. }
  156. </script>
  157. <style lang="scss" scoped>
  158. .committeeLayout {
  159. .space {
  160. height: 10upx;
  161. width: 100%;
  162. background-color: #F3F4F5;
  163. }
  164. .banner {
  165. position: relative;
  166. overflow: hidden;
  167. z-index: 1;
  168. .bannerimg {
  169. display: block;
  170. width: 100%;
  171. }
  172. }
  173. .maininfo {
  174. margin: 16upx auto 0;
  175. background: #fff;
  176. border-radius: 20upx 20upx 0 0;
  177. padding: 20upx;
  178. position: relative;
  179. z-index: 10;
  180. &.two {
  181. margin: 20upx auto 0;
  182. .blockTitle.round {
  183. margin-bottom: 0;
  184. }
  185. .infoitem {
  186. margin: 10upx 0;
  187. padding: 20upx 0;
  188. border-bottom: 1px solid #eee;
  189. &:last-of-type {
  190. border: none
  191. }
  192. .label {
  193. overflow: hidden;
  194. text-overflow: ellipsis;
  195. white-space: nowrap;
  196. height: 50upx;
  197. line-height: 50upx;
  198. }
  199. .date {
  200. color: #aaa;
  201. }
  202. }
  203. }
  204. .block {
  205. margin: 20upx 0;
  206. .name {
  207. display: flex;
  208. align-items: center;
  209. overflow: hidden;
  210. text-overflow: ellipsis;
  211. white-space: nowrap;
  212. text-indent: 16upx;
  213. margin: 16upx 0;
  214. .icon {
  215. width: 36upx;
  216. height: 36upx;
  217. display: block;
  218. margin: -9upx 0 0 48upx;
  219. }
  220. }
  221. .desTitle {
  222. position: relative;
  223. overflow: hidden;
  224. padding: 16upx;
  225. text-indent: 30upx;
  226. &::after {
  227. content: "";
  228. position: absolute;
  229. left: 20upx;
  230. top: 26upx;
  231. width: 0;
  232. height: 0;
  233. border: 10upx solid #0F2F59;
  234. border-right: none;
  235. border-top: 10upx solid transparent;
  236. border-bottom: 10upx solid transparent;
  237. }
  238. }
  239. .weiyuan {
  240. display: flex;
  241. align-items: center;
  242. padding: 0 20upx;
  243. margin-left: 20upx;
  244. .userThumb {
  245. width: 140upx;
  246. height: 140upx;
  247. border-radius: 50%;
  248. padding: 4upx;
  249. border: 2upx solid #DFF3FB;
  250. position: relative;
  251. overflow: hidden;
  252. .userimg {
  253. display: block;
  254. width: 140upx;
  255. height: 140upx;
  256. border-radius: 50%;
  257. }
  258. }
  259. .info {
  260. .name {
  261. text-indent: 10upx;
  262. display: flex;
  263. align-items: center;
  264. height: 60upx;
  265. line-height: 60upx;
  266. .icon {
  267. width: 32upx;
  268. display: block;
  269. margin: 0 0 0 28upx;
  270. &.iconp {
  271. height: 40upx
  272. }
  273. }
  274. }
  275. }
  276. }
  277. }
  278. .blockTitle {
  279. height: 80upx;
  280. line-height: 80upx;
  281. background-color: #EFF6FF;
  282. padding: 0 20upx;
  283. color: #0B0B11;
  284. font-size: 30upx;
  285. margin-bottom: 30upx;
  286. position: relative;
  287. overflow: hidden;
  288. text-indent: 20upx;
  289. display: flex;
  290. justify-content: space-between;
  291. align-items: center;
  292. font-weight: 700;
  293. &.round {
  294. border-radius: 20upx 20upx 0 0;
  295. }
  296. .more {
  297. color: #999;
  298. font-size: 28upx
  299. }
  300. &.zhuxi {
  301. background-color: #FAEDED;
  302. color: #5A2C0F;
  303. &:after {
  304. position: absolute;
  305. left: 20upx;
  306. top: 25upx;
  307. content: "";
  308. width: 8upx;
  309. height: 30upx;
  310. background: #D45100;
  311. }
  312. }
  313. &.fuzhuxi {
  314. background-color: #FAF2ED;
  315. color: #5A2C0F;
  316. &:after {
  317. position: absolute;
  318. left: 20upx;
  319. top: 25upx;
  320. content: "";
  321. width: 8upx;
  322. height: 30upx;
  323. background: #D45100;
  324. }
  325. }
  326. &.weiyuan {
  327. background-color: #FAEDED;
  328. color: #0F2F59;
  329. &:after {
  330. position: absolute;
  331. left: 20upx;
  332. top: 25upx;
  333. content: "";
  334. width: 8upx;
  335. height: 30upx;
  336. background: #0055D4;
  337. }
  338. }
  339. }
  340. }
  341. .desText {
  342. padding: 0 20upx;
  343. &.line3 {
  344. overflow: hidden;
  345. text-overflow: ellipsis;
  346. display: -webkit-box;
  347. -webkit-box-orient: vertical;
  348. -webkit-line-clamp: 3;
  349. }
  350. &.jianjie {
  351. padding: 40upx 36upx 20upx 36upx;
  352. background: #EEF9FA;
  353. text-indent: 56upx;
  354. }
  355. }
  356. }
  357. </style>