nationalCommossiomsDetails.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <template>
  2. <view style="margin: 0 20upx;">
  3. <u-navbar :back-text="i18n('Back')" :back-text-style="backStyle"
  4. back-icon-color="#fff" title-color="#fff"
  5. :title="title"
  6. :background="background">
  7. </u-navbar>
  8. <view class="" style="margin-top: 30upx;">
  9. </view>
  10. <view style="background-color: #EEF9FA;padding: 0 10upx;" v-if="$i18n.locale=='zh'" v-html="list.details?list.details.committeeProfileUe:''">
  11. </view>
  12. <view class="" style="background-color: #EEF9FA;padding: 0 10upx;" v-else v-html="activecommittee.committeeProfileUe">
  13. </view>
  14. <view class="" style="min-height: 600upx;background-color: #fff;margin-top: 10upx; padding: 20upx 10upx;border: 1px solid #fff;
  15. box-shadow: 0px -5px 6px rgba(0, 0, 0, 0.16);
  16. opacity: 1;
  17. border-radius: 30px 30px 0px 0px;">
  18. <view class="" style="margin:15upx 0upx;"
  19. v-if="list.data && list.data.chairman || list.data &&list.data.vicePresident
  20. || list.data &&list.data.secretary || list.data &&list.data.member">
  21. <view class="Box_view" style="min-height: 250upx;line-height: 100upx;position: relative;" v-for="(item,index) in list.data.chairman" :class="index==0?'border-top':''" >
  22. <view class="introduceMap-title" v-if="index==0">
  23. <!-- {{committeePostDictsMaps(item.regionDutyDict)}} -->
  24. <text class="border-6DD400"></text>
  25. {{item.regionDuty}}
  26. </view>
  27. <view class="item-top" >
  28. <view class="" style="float: left;
  29. vertical-align: middle;margin:0 25upx 15upx 0;">
  30. <image class="imgage-user" v-if = "!item.spareTwo" src="@/static/img/nationaIntroductionList/user.png" alt="">
  31. <image class="imgage-user" v-else :src="'https://www.geidcp.com//api/file/pub/' + item.spareTwo" alt="">
  32. </view>
  33. <view style="width: 450upx;margin-left: 8upx; overflow: hidden;text-overflow: ellipsis;
  34. white-space: nowrap;
  35. vertical-align: middle;" @click="" @click="toViews(item.entityId)">
  36. <u-icon name="man-add" style="margin-right: 8upx;"></u-icon>
  37. {{$i18n.locale == 'zh'?item.name:item.nameEn}}
  38. </view>
  39. <view v-if="item.country" style="max-width: 450upx; overflow: hidden;text-overflow: ellipsis;
  40. white-space: nowrap;
  41. vertical-align: middle;">
  42. <u-icon name="map" style="margin-right: 8upx;"></u-icon>
  43. ({{item.country}})
  44. <!-- ({{countryDictsMap(item.countryDict)}}) -->
  45. </view>
  46. <view class="">
  47. {{item.personalProfile}}
  48. </view>
  49. </view>
  50. </view>
  51. <u-gap v-if="list.data.chairman.length>0" height="20" bg-color="#F3F4F5" style="width: 750upx !important;margin-top: 30upx;"></u-gap>
  52. <view class="Box_view" style="min-height: 250upx;line-height: 100upx;position: relative;"
  53. v-for="(item,index) in list.data.vicePresident" :class="index==0?'border-top':''" >
  54. <view class="introduceMap-title" v-if="index==0">
  55. <text class="border-6DD400"></text>
  56. {{item.regionDuty}}
  57. <!-- {{committeePostDictsMaps(item.regionDutyDict)}} -->
  58. </view>
  59. <view class="item-top">
  60. <view class="" style="float: left;
  61. vertical-align: middle;margin: 0 25upx 15upx 0;">
  62. <image class="imgage-user" v-if = "!item.spareTwo" src="@/static/img/nationaIntroductionList/user.png" alt="">
  63. <image class="imgage-user" v-else :src="'https://www.geidcp.com//api/file/pub/' + item.spareTwo" alt="">
  64. </view>
  65. <view style="width: 450upx;margin-left: 8upx; overflow: hidden;text-overflow: ellipsis;
  66. white-space: nowrap;
  67. vertical-align: middle;" @click="toViews(item.entityId)">
  68. <u-icon name="man-add" style="margin-right: 8upx;"></u-icon>
  69. {{$i18n.locale == 'zh'?item.name:item.nameEn}}
  70. </view>
  71. <view v-if="item.country" style="max-width: 450upx; overflow: hidden;text-overflow: ellipsis;
  72. white-space: nowrap;
  73. vertical-align: middle;">
  74. <u-icon name="map" style="margin-right: 8upx;"></u-icon>
  75. <!-- ({{countryDictsMap(item.countryDict)}}) -->
  76. ({{item.country}})
  77. </view>
  78. <view class="">
  79. {{item.personalProfile}}
  80. </view>
  81. </view>
  82. </view>
  83. <u-gap v-if="list.data.vicePresident.length>0" height="20" bg-color="#F3F4F5" style="width: 750upx !important;margin-top: 30upx;"></u-gap>
  84. <view class="Box_view" style="min-height: 250upx;line-height: 100upx;position: relative;"
  85. v-for="(item,index) in list.data.secretary" :class="index==0?'border-top':''">
  86. <view class="introduceMap-title" v-if="index==0">
  87. <text class="border-6DD400"></text>
  88. <!-- {{committeePostDictsMaps(item.regionDutyDict)}} -->
  89. {{item.regionDuty}}
  90. </view>
  91. <view class="item-top">
  92. <view class="" style="float: left;
  93. vertical-align: middle;margin: 0 25upx 15upx 0;">
  94. <image class="imgage-user" v-if = "!item.spareTwo" src="@/static/img/nationaIntroductionList/user.png" alt="">
  95. <image class="imgage-user" v-else :src="'https://www.geidcp.com//api/file/pub/' + item.spareTwo" alt="">
  96. </view>
  97. <view style="width: 450upx;margin-left: 8upx; overflow: hidden;text-overflow: ellipsis;
  98. white-space: nowrap;
  99. vertical-align: middle;" @click="toViews(item.entityId)">
  100. <u-icon name="man-add" style="margin-right: 8upx;"></u-icon>
  101. {{$i18n.locale == 'zh'?item.name:item.nameEn}}
  102. </view>
  103. <view v-if="item.country" style="max-width: 450upx; overflow: hidden;text-overflow: ellipsis;
  104. white-space: nowrap;
  105. vertical-align: middle;">
  106. <u-icon name="map" style="margin-right: 8upx;"></u-icon>
  107. <!-- ({{countryDictsMap(item.countryDict)}}) -->
  108. ({{item.country}})
  109. </view>
  110. <view class="">
  111. {{item.personalProfile}}
  112. </view>
  113. </view>
  114. </view>
  115. <u-gap v-if="list.data.secretary.length>0" height="20" bg-color="#F3F4F5" style="width: 750upx !important;margin-top: 30upx;"></u-gap>
  116. <view class="Box_view" style="min-height: 250upx;line-height: 100upx;position: relative;"
  117. v-for="(item,index) in list.data.member" :class="index==0?'border-top':''">
  118. <view class="introduceMap-title" v-if="index==0">
  119. <text class="border-6DD400"></text>
  120. <!-- {{committeePostDictsMaps(item.regionDutyDict)}} -->
  121. {{item.regionDuty}}
  122. </view>
  123. <view class="item-top" >
  124. <view class="" style="float: left;
  125. vertical-align: middle;margin: 0 25upx 15upx 0;">
  126. <image class="imgage-user" v-if = "!item.spareTwo" src="@/static/img/nationaIntroductionList/user.png" alt="">
  127. <image class="imgage-user" v-else :src="'https://www.geidcp.com//api/file/pub/' + item.spareTwo" alt="">
  128. </view>
  129. <view style="width: 450upx;margin-left: 8upx; overflow: hidden;text-overflow: ellipsis;
  130. white-space: nowrap;
  131. vertical-align: middle;" @click="toViews(item.entityId)">
  132. <u-icon name="man-add" style="margin-right: 8upx;"></u-icon>
  133. {{$i18n.locale == 'zh'?item.name:item.nameEn}}
  134. </view>
  135. <view v-if="item.country" style="max-width: 450upx; overflow: hidden;text-overflow: ellipsis;
  136. white-space: nowrap;
  137. vertical-align: middle;">
  138. <u-icon name="map" style="margin-right: 8upx;"></u-icon>
  139. ({{item.country}})
  140. <!-- ({{countryDictsMap(item.countryDict)}}) -->
  141. </view>
  142. <view class="">
  143. {{item.personalProfile}}
  144. </view>
  145. </view>
  146. </view>
  147. <u-gap v-if="list.data.member.length>0" height="20" bg-color="#F3F4F5" style="width: 750upx !important;margin-top: 30upx;"></u-gap>
  148. </view>
  149. <view class="" v-else>
  150. <image src="../../../static/notFound.png" mode="" style="margin: 0 50upx 20upx 50upx;"></image>
  151. <view class="" style="width: 100%;text-align: center;transform: translateY(-60upx);">
  152. {{i18n('NoData')}}
  153. </view>
  154. </view>
  155. </view>
  156. <!-- 推荐活动 -->
  157. <view class="" style="margin: 10upx 0upx;line-height: 65upx;">
  158. <text style="display: inline-block;width: 10upx;height: 30upx;
  159. background-color: #6DD400;vertical-align: middle;margin-right: 10upx;"></text>
  160. {{i18n('RecommendationActivities')}}
  161. <!-- <text style="float: right;color: #1777FE;" @click="toView('/pages/nationalregionalCommissions/nationalregionalInformaions/nationalregionalInformaions')">更多 ></text> -->
  162. </view>
  163. <view class="active" style="width: 100%;position: relative;border-bottom: 1px solid #ccc;padding: 9upx 0;"
  164. v-for="(item,index) in cooperationUnitDynamicList" @click="toView(item)" >
  165. <view class="" style="margin-top: 10upx;margin-right: 20upx;" >
  166. {{item.activityName}}
  167. </view>
  168. <u-icon name="arrow-right" style="position: absolute;right: -10upx;top: 24upx;"></u-icon>
  169. <view class="">
  170. {{formatDate(item.createDate)}}
  171. </view>
  172. </view>
  173. </view>
  174. </template>
  175. <script>
  176. export default {
  177. data() {
  178. return {
  179. committeePostDicts:[],
  180. committeeUnitPostDicts:[],
  181. countryDicts:[],
  182. background:{
  183. backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
  184. },
  185. backStyle:{
  186. color:'#fff'
  187. },
  188. title:this.$i18n.locale == 'zh'?'区域委员会':'Regional Committees',
  189. committee:[],
  190. introduceMap:{},
  191. list:{
  192. },
  193. activecommittee:{},
  194. introduce:[],
  195. cooperationUnitDynamicList:[],
  196. activeId:null,
  197. }
  198. },
  199. created() {
  200. this.getDicts();
  201. },
  202. onLoad(options){
  203. if(this.$i18n.locale=='zh'){
  204. this.list = {};
  205. this.activeId = JSON.parse(decodeURIComponent(options.list)).details;
  206. }else {
  207. this.list = {};
  208. this.activeId = JSON.parse(decodeURIComponent(options.list)).details;
  209. }
  210. },
  211. onShow() {
  212. this.getActiveList();
  213. },
  214. computed:{
  215. },
  216. methods:{
  217. toView(item){
  218. this.$mRouter.push({
  219. route: `/pages/nationalregionalCommissions/nationalregionalInformaions/nationalregionlInformationDetail?id=${item.entityId}`,
  220. });
  221. },
  222. toViews(value){
  223. console.log(value)
  224. // this.$mRouter.push({
  225. // route: `/pages/nationalregionalCommissions/nationalregionalCountryDetails?id=${value}`,
  226. // });
  227. },
  228. getCommitteeList(lable,num,committeeProfileUe,entityId,item){
  229. this.introduceMap={};
  230. this.$set(this.introduceMap,'chairman',[]);//主席
  231. this.$set(this.introduceMap,'vicePresident',[]);// 副主席
  232. this.$set(this.introduceMap,'secretary',[]);// 秘书
  233. this.$set(this.introduceMap,'member',[]);// 委员
  234. if(this.introduce[1].length>0) {
  235. this.introduce[1].forEach(element=>{
  236. console.log(element.regionalCommitteeDict,entityId,'introduce[1]');
  237. if(element.regionalCommitteeDict == entityId){
  238. element.unitProfile = element.unitProfile? element.unitProfile.replace(/<[^>]+>|&[^>]+;/g, ""):'';
  239. this.introduceMap.chairman.push(element);
  240. }
  241. })
  242. }
  243. if(this.introduce[2].length>0) {
  244. this.introduce[2].forEach(element=>{
  245. console.log(element.regionalCommitteeDict,entityId,'introduce[2]');
  246. if(element.regionalCommitteeDict ==entityId){
  247. this.introduceMap.vicePresident.push(element);
  248. }
  249. })
  250. }
  251. if(this.introduce[3].length>0) {
  252. this.introduce[3].forEach(element=>{
  253. console.log(element.regionalCommitteeDict,entityId,'introduce[3]');
  254. if(element.regionalCommitteeDict ==entityId){
  255. this.introduceMap.secretary.push(element);
  256. }
  257. })
  258. }
  259. if(this.introduce[4].length>0) {
  260. this.introduce[4].forEach(element=>{
  261. console.log(element.regionalCommitteeDict,entityId,'introduce[4]');
  262. if(element.regionalCommitteeDict ==entityId){
  263. this.introduceMap.member.push(element);
  264. }
  265. })
  266. }
  267. this.list.data = this.introduceMap;
  268. },
  269. async getActiveList(){
  270. let page={
  271. committeeId:"",
  272. language:this.$i18n.locale.toUpperCase(),
  273. }
  274. const res = await this.$myRequest({
  275. url: '/project/committeeBasisInfos/getCommitteeInfos',
  276. data: page,
  277. })
  278. // 区域委员会
  279. this.committee = res.data.committeeBasisInfosRegion;
  280. this.cooperationUnitDynamicList = res.data.committeeActivityInfos;
  281. this.introduce = res.data.regionList;
  282. let activecommittee = this.committee.filter(item=>{
  283. return item.entityId == this.activeId
  284. })
  285. this.$set(this.list,'details',{});
  286. this.list.details = activecommittee[0];
  287. this.activecommittee = activecommittee[0];
  288. if(this.$i18n.locale=='zh' && this.list.details.committeeName){
  289. this.title = this.list.details.committeeName?this.activecommittee.committeeName:'区域委员会';
  290. }else if(this.$i18n.locale!=='zh' && this.activecommittee.committeeName){
  291. this.title = this.$i18n.locale!=='zh'?this.list.details.committeeName:this.activecommittee.committeeName;
  292. }
  293. this.getCommitteeList(this.list.details.committeeName,this.list.details.id,this.list.details.committeeProfileUe,this.activeId,this.list.details)
  294. },
  295. committeePostDictsMaps(value){
  296. if(this.committeePostDicts.length>0){
  297. const PostDicts= this.committeePostDicts.filter(item=>{
  298. return item.value == value
  299. })
  300. return PostDicts[0].label;
  301. }
  302. },
  303. countryDictsMap(value){
  304. if(this.countryDicts.length>0){
  305. const PostDicts= this.countryDicts.filter(item=>{
  306. return item.value == value
  307. })
  308. return PostDicts[0].label;
  309. }
  310. },
  311. i18n (data) {
  312. return this.$t('common.'+data);
  313. },
  314. async getDicts(){
  315. const res = await this.$myRequest({
  316. url: '/sys/sysDicts',
  317. data: {
  318. type:'COMMITTEE_POST_DICT,COMMITTEE_POST_DICT_EN,COMMITTEE_UNIT_POST_DICT,COMMITTEE_UNIT_POST_DICT_EN,UNIT_COUNTRY_DICT,UNIT_COUNTRY_DICT_EN'
  319. }
  320. });
  321. var data = res.data;
  322. if(data){
  323. if(this.$i18n.locale == 'zh'){
  324. this.committeePostDicts = res.data[0] ||[];
  325. this.committeeUnitPostDicts = res.data[2] ||[];
  326. this.countryDicts = res.data[4] || [];
  327. }else if(this.$i18n.locale == 'en'){
  328. this.committeePostDicts = res.data[1] ||[];
  329. this.committeeUnitPostDicts = res.data[3] ||[];
  330. this.countryDicts = res.data[5] || [];
  331. }
  332. }
  333. },
  334. }
  335. }
  336. </script>
  337. <style>
  338. page {
  339. background-color: #fff;
  340. }
  341. .imgage-user {
  342. width: 180upx;
  343. height: 180upx;
  344. overflow: hidden;
  345. border-radius: 50%;
  346. }
  347. .item-top {
  348. margin-top: 10upx;
  349. }
  350. .introduceMap-title {
  351. margin: 20upx 0;
  352. padding: 15upx 0;
  353. background-color: #EEF9FA;
  354. color: #0F545A;
  355. font-weight: 600;
  356. font-size: 30upx;
  357. }
  358. .border-6DD400 {
  359. display: inline-block;
  360. width: 16upx;
  361. height: 40upx;
  362. background: #6DD400;
  363. opacity: 1;
  364. vertical-align: middle;
  365. margin: 0 10upx;
  366. }
  367. .active:active {
  368. background-color: #079ef;
  369. }
  370. </style>