organizationDetail.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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="title" :custom-back="back">
  7. </u-navbar>
  8. <!-- 头部图像 -->
  9. <view class="banner">
  10. <image class="bannerimg" :src="websiteUrl+detail.spareTwo" mode="widthFix"></image>
  11. </view>
  12. <!-- 主要信息 -->
  13. <view class="maininfo">
  14. <view class="block">
  15. <view class="blockTitle round center">{{detail.language=='EN'?detail.nameEn:detail.name}}</view>
  16. <view class="baseinfo">
  17. <view class="infoitem">
  18. <view class="thumb"></view>
  19. <view class="text">
  20. <view class="label">{{$t('common.place')}} :
  21. {{detail.language=='EN'?detail.countryDict:detail.country}}</view>
  22. </view>
  23. </view>
  24. <view class="infoitem">
  25. <view class="thumb"></view>
  26. <view class="text">
  27. <view class="label">{{$t('common.OfficialEmail')}} : {{detail.officialEmail}}</view>
  28. </view>
  29. </view>
  30. <view class="infoitem">
  31. <view class="thumb"></view>
  32. <view class="text">
  33. <view class="label">{{$t('common.LegalRepresentative')}} : {{detail.corporateName}}</view>
  34. </view>
  35. </view>
  36. <view class="infoitem">
  37. <view class="thumb"></view>
  38. <view class="text">
  39. <view class="label">{{$t('common.DateOfEstablishment')}} : {{formatDate(detail.createDate)}}
  40. </view>
  41. </view>
  42. </view>
  43. <view class="infoitem">
  44. <view class="thumb"></view>
  45. <view class="text">
  46. <view class="label">{{$t('common.OfficialWebsite')}} : {{detail.officialWebsitePath}}</view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 简介默认展开 -->
  52. <view class="block">
  53. <view class="blockTitle" @click="upAndDwon('des','flagDes')">
  54. <text>{{$t('common.Introduction')}}</text>
  55. <u-icon name="arrow-up" color="#aaa" v-if="flagDes"></u-icon>
  56. <u-icon name="arrow-down" color="#aaa" v-if="!flagDes"></u-icon>
  57. </view>
  58. <view class="desText" :class="{line3:flagDes}" v-html="detail.unitProfile"></view>
  59. </view>
  60. <!-- 信息默认关闭 -->
  61. <view class="wrap">
  62. <view class="block blockitem" v-for="(blockitem,blockindex) in infomationList" :key="blockindex">
  63. <view class="blockTitle" @click="upAndDwon('info','flag',blockindex)">
  64. <text class="titleText">{{blockitem.title}}</text>
  65. <u-icon name="arrow-up" color="#aaa" v-if="!blockitem.flag"></u-icon>
  66. <u-icon name="arrow-down" color="#aaa" v-if="blockitem.flag"></u-icon>
  67. </view>
  68. <view class="desText" :class="{line3:!blockitem.flag}">
  69. <rich-text :nodes="blockitem.contentHtml" :margin-left="20"></rich-text>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </template>
  76. <script>
  77. export default {
  78. name: 'CommitteeLayout',
  79. data() {
  80. return {
  81. entityId: '',
  82. title: '',
  83. detail: {},
  84. flagDes: false,
  85. infomationList: []
  86. }
  87. },
  88. onShow() {
  89. this.title = this.$i18n.locale.toUpperCase() == 'ZH' ? '详情' : 'Detail'
  90. setTimeout(() => {
  91. this.getOrganizationDetail();
  92. this.getDataList();
  93. }, 100)
  94. },
  95. onLoad(e) {
  96. this.entityId = e.entityId
  97. },
  98. methods: {
  99. //路由后退一步
  100. back() {
  101. // #ifdef H5
  102. history.back()
  103. // #endif
  104. // #ifndef H5
  105. uni.navigateBack()
  106. // #endif
  107. },
  108. //开关显示更多内容
  109. upAndDwon(type, attr, index) {
  110. if (type == 'des') this[attr] = !this[attr];
  111. else {
  112. this.infomationList[index]['flag'] = !this.infomationList[index]['flag'];
  113. }
  114. },
  115. // 获取机构详情的数据
  116. async getOrganizationDetail() {
  117. let data = {
  118. entityId: this.entityId,
  119. language: this.$i18n.locale.toUpperCase()
  120. }
  121. let res = await this.$myRequest({
  122. url: '/project/committeeShowMessageInfos/getShowMessageInfoDetail',
  123. data: data
  124. })
  125. if (res.status == 200) {
  126. if (res.data) {
  127. let data = res.data
  128. if (data.committeeShowMessageInfo) {
  129. this.detail = data.committeeShowMessageInfo;
  130. }
  131. }
  132. }
  133. },
  134. // 获取列表数据
  135. async getDataList() {
  136. let res = await this.$myRequest({
  137. url: '/cms/cmsInformationViews/getInformationList/',
  138. data: {
  139. 'businessType': 'organizational_structure',
  140. 'businessId': this.entityId,
  141. 'language': this.$i18n.locale.toUpperCase()
  142. }
  143. })
  144. if (res.status == 200) {
  145. let data = res.data;
  146. if (data.allDataList && data.allDataList.length > 0) {
  147. data.allDataList.forEach((item, index) => {
  148. item.flag = false
  149. })
  150. this.infomationList = data.allDataList
  151. } else this.infomationList = []
  152. }
  153. }
  154. }
  155. }
  156. </script>
  157. <style lang="scss" scoped>
  158. .committeeLayout {
  159. .banner {
  160. position: relative;
  161. z-index: 1;
  162. .bannerimg {
  163. display: block;
  164. width: 100%;
  165. }
  166. }
  167. .maininfo {
  168. margin: 16upx auto 0;
  169. background: #fff;
  170. border-radius: 20upx 20upx 0 0;
  171. padding: 20upx;
  172. position: relative;
  173. z-index: 10;
  174. .block {
  175. margin: 16upx 0;
  176. .blockTitle {
  177. height: 80upx;
  178. line-height: 80upx;
  179. background-color: #EFF6FF;
  180. padding: 0 20upx;
  181. color: #0F2F59;
  182. font-size: 30upx;
  183. margin-bottom: 30upx;
  184. position: relative;
  185. overflow: hidden;
  186. text-indent: 20upx;
  187. display: flex;
  188. justify-content: space-between;
  189. align-items: center;
  190. font-weight: 700;
  191. .titleText {
  192. overflow: hidden;
  193. text-overflow: ellipsis;
  194. white-space: nowrap;
  195. height: 80upx;
  196. line-height: 80upx
  197. }
  198. &.round {
  199. border-radius: 20upx 20upx 0 0;
  200. }
  201. &.round.center {
  202. text-indent: 0;
  203. text-align: center;
  204. color: red;
  205. display: block;
  206. color: #0B0B11;
  207. &:after {
  208. display: none;
  209. }
  210. }
  211. .more {
  212. color: #aaa;
  213. font-size: 28upx
  214. }
  215. &:after {
  216. position: absolute;
  217. left: 20upx;
  218. top: 25upx;
  219. content: "";
  220. width: 8upx;
  221. height: 30upx;
  222. background: #0055D4;
  223. }
  224. }
  225. .baseinfo {
  226. .infoitem {
  227. height: 80upx;
  228. display: flex;
  229. align-items: center;
  230. .thumb {
  231. position: relative;
  232. overflow: hidden;
  233. margin-right: 10upx;
  234. }
  235. &:nth-of-type(1) {
  236. .thumb {
  237. width: 36upx;
  238. height: 36upx;
  239. background: url('../../../static/icon/1.png') no-repeat -4upx 0;
  240. background-size: 100%;
  241. }
  242. }
  243. &:nth-of-type(2) {
  244. .thumb {
  245. width: 32upx;
  246. height: 32upx;
  247. background: url('../../../static/icon/3.png') no-repeat 2upx 0;
  248. background-size: 100%;
  249. }
  250. }
  251. &:nth-of-type(3) {
  252. .thumb {
  253. width: 36upx;
  254. height: 36upx;
  255. background: url('../../../static/icon/2.png') no-repeat 0 0;
  256. background-size: 100%;
  257. }
  258. }
  259. &:nth-of-type(4) {
  260. .thumb {
  261. width: 36upx;
  262. height: 36upx;
  263. background: url('../../../static/icon/4.png') no-repeat 0 0;
  264. background-size: 100%;
  265. }
  266. }
  267. &:nth-of-type(5) {
  268. .thumb {
  269. width: 36upx;
  270. height: 36upx;
  271. background: url('../../../static/icon/5.png') no-repeat 0 0;
  272. background-size: 100%;
  273. }
  274. }
  275. }
  276. }
  277. .name {
  278. display: flex;
  279. align-items: center;
  280. overflow: hidden;
  281. text-overflow: ellipsis;
  282. white-space: nowrap;
  283. text-indent: 16upx;
  284. margin: 16upx 0;
  285. .icon {
  286. width: 36upx;
  287. height: 36upx;
  288. display: block;
  289. margin: -9upx 0 0 48upx;
  290. }
  291. }
  292. .desTitle {
  293. position: relative;
  294. overflow: hidden;
  295. padding: 16upx;
  296. text-indent: 30upx;
  297. }
  298. .desText {
  299. padding: 0 0upx;
  300. text-indent: 0em;
  301. &.line3 {
  302. overflow: hidden;
  303. text-overflow: ellipsis;
  304. display: -webkit-box;
  305. -webkit-box-orient: vertical;
  306. -webkit-line-clamp: 3;
  307. display: none;
  308. }
  309. }
  310. }
  311. }
  312. }
  313. </style>