memberInformation.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <template>
  2. <view class="memberInformation">
  3. <u-navbar :back-text="i18n('Back')" :back-text-style="backStyle" :title-width="350"
  4. back-icon-color="#fff" title-color="#fff"
  5. :title="i18n('DisplayofMembers')"
  6. :background="background">
  7. </u-navbar>
  8. <!-- <view class="slot-content" style="background-color: #FFFFFF;">
  9. <scroll-view scroll-y="true" style="height: 200upx;">
  10. <view class="u-text-center u-content-color u-m-t-20 u-m-b-20" v-for="(cate,index) in options2" :key="index">
  11. {{ cate.label }}
  12. </view>
  13. </scroll-view>
  14. </view> -->
  15. <view class="u-demo-area u-flex u-row-center">
  16. <u-dropdown border-bottom inactive-color="#333333" title-size="32">
  17. <u-dropdown-item v-model="regionValue"
  18. :title="region" :options="options1"
  19. @change="changeValue1"></u-dropdown-item>
  20. <u-dropdown-item v-model="categoryValue"
  21. :title="category" :options="options2" height="100vh"
  22. @change="changeValue2"></u-dropdown-item>
  23. </u-dropdown>
  24. </view>
  25. <view class="content-list">
  26. <u-index-list :scrollTop="scrollTop" :sticky="false" :index-list="indexList" :offset-top="88" activeColor="initial">
  27. <view v-for="(item, index) in initDataArray" :key="index">
  28. <u-index-anchor :index="item.letter" />
  29. <view class="listCell" v-for="init in item.data" :key="init.unitId" @tap="memberDetails(init)">
  30. <view v-if="$i18n.locale=='en'">{{ init.memberNameEn }}</view>
  31. <view v-else>{{ init.memberNameZh }}</view>
  32. </view>
  33. </view>
  34. </u-index-list>
  35. </view>
  36. <!-- 会员详情 -->
  37. <u-popup v-model="detailShow" mode="bottom" height="60%" @open="openPopup" @close="closePopup" @touchmove.stop.prevent="moveHandle">
  38. <view class="popupView">
  39. <view class="popupImg" :style="'background-image: url(../../static/img/cooperationNetwork/'+initData.industryDict+'.png);'"></view>
  40. <view class="pop-title">
  41. <text class="title-name">{{$i18n.locale=='zh'?this.member.memberNameZh:this.member.memberNameEn}}</text>
  42. <text class="title-bq" v-if="$i18n.locale=='zh'&&initData.industry">{{initData.industry}}</text>
  43. <text class="title-bq" v-if="$i18n.locale=='en'&&initData.industryDict">{{TagEn[parseInt(initData.industryDict)]}}</text>
  44. </view>
  45. <view class="pop-name">
  46. <text class="bold">{{$t('common.place')}}:</text>
  47. <text>{{countryDictsMap[initData.unitCountryDict]}}{{initData.unitRegion?'-'+initData.unitRegion:''}}</text>
  48. </view>
  49. <view class="pop-name">
  50. <text class="bold">{{$t('common.DateOfEstablishment')}}:</text>
  51. <text>{{initData.setUpDate?initData.setUpDate:''}}</text>
  52. </view>
  53. <view class="pop-name">
  54. <text class="bold">{{$t('common.LegalRepresentative')}}:</text>
  55. <text>{{initData.corporateName?initData.corporateName:''}}</text>
  56. </view>
  57. <view class="pop-name">
  58. <text class="bold">{{$t('common.OfficialWebsite')}}:</text>
  59. <text>{{initData.officialWebsitePath?initData.officialWebsitePath:''}}</text>
  60. </view>
  61. <view class="pop-name">
  62. <text class="bold">{{$t('common.intro')}}:</text>
  63. <text>{{initData.projectPerformance}}</text>
  64. </view>
  65. </view>
  66. <view v-for="(item,index) in initViewData" v-if="initViewData">
  67. <view class="enterprise_style">
  68. <view class="jianjie" v-if="item.typeDict==1">
  69. <text style="display: inline-block;width: 10upx;height: 30upx;
  70. background-color: #6DD400;vertical-align: middle;margin-right: 10upx;"></text>
  71. {{item.title}}
  72. </view>
  73. </view>
  74. <view class="" v-if="item.pictureUrl && item.typeDict=='1' ">
  75. <image :src="websiteUrl + item.pictureUrl" alt="" style="width: 750upx;height: 300upx;"></image>
  76. </view>
  77. <view :style="item.picturePosition == 'left'?'text-indent: 2em;float:right':'float:left'"
  78. class="nomale" v-if="item.typeDict==1" v-html="item.contentHtml">
  79. </view>
  80. <view style="clear:both"></view>
  81. </view>
  82. </u-popup>
  83. <u-back-top :scroll-top="scrollTop2"></u-back-top>
  84. </view>
  85. </template>
  86. <script>
  87. export default {
  88. data() {
  89. return {
  90. background:{
  91. backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
  92. },
  93. backStyle:{
  94. color:'#fff'
  95. },
  96. region: this.$i18n.locale=='zh'? '所在区域': 'region',
  97. category: this.$i18n.locale=='zh'? '所属类别': 'category',
  98. regionValue: null,
  99. categoryValue: null,
  100. options1: [],
  101. options2: [],
  102. scrollTop: -88,
  103. scrollTop2: 0,
  104. backScrollTop: 0,
  105. initDataArray: [],
  106. indexList: [],
  107. initViewData: {},
  108. detailShow: false,
  109. member: [],
  110. initData: {},
  111. TagEn:['Individual Member','Groups','Scientific Institutions','Colleges And Universities','Energy Companies','Equipement Manufactures','Project Contractors','Financial Institutions','Consultation Enterprises','Rigidity Of Enterprise','Media','Logistics Transportation','Others'],
  112. page: {
  113. continentDict: null,
  114. industryDict: null,
  115. initialOrderZh: null,
  116. memberNameEn: null,
  117. memberNameZh: null,
  118. language: this.$i18n.locale.toUpperCase(),
  119. },
  120. countryDicts: [],
  121. countryDictsMap: {},
  122. selectIndexFlag: false
  123. }
  124. },
  125. onLoad(options) {
  126. uni.showLoading({
  127. title: this.$i18n.locale == 'zh'? '加载中...': 'Loading...'
  128. });
  129. if(options.obj) {
  130. this.regionValue = JSON.parse(decodeURIComponent(options.obj)).value;
  131. }else {
  132. this.regionValue = null;
  133. }
  134. if(options.item) {
  135. this.categoryValue = JSON.parse(decodeURIComponent(options.item)).value;
  136. }else {
  137. this.categoryValue = null;
  138. }
  139. this.page.continentDict = this.regionValue;
  140. this.page.industryDict = this.categoryValue;
  141. },
  142. onShow() {
  143. this.getInitData();
  144. this.get();
  145. this.getCountry();
  146. },
  147. onPageScroll(e) {
  148. this.scrollTop = e.scrollTop - 88;
  149. this.scrollTop2 = e.scrollTop;
  150. },
  151. methods: {
  152. moveHandle() {},
  153. i18n (data) {
  154. return this.$t('common.' + data);
  155. },
  156. async getInitData() {
  157. const locale = this.$i18n.locale;
  158. //所属类别
  159. const res = await this.$myRequest({
  160. url: '/sys/sysDicts',
  161. data: {
  162. type: locale == 'zh' ? 'INDUSTRY_DICTS' : 'INDUSTRY_DICTS_EN'
  163. }
  164. });
  165. let both2 = {
  166. value: null,
  167. label: locale == 'zh' ? '全部' : 'All'
  168. };
  169. // console.log(res);
  170. this.options2 = res.data[0];
  171. this.options2.unshift(both2);
  172. let both1 = {
  173. value: null,
  174. label: locale == 'zh' ? '全部' : 'All'
  175. };
  176. const result = await this.$myRequest({
  177. url: '/sys/sysDicts',
  178. data: {
  179. type: locale == 'zh' ? 'CONTINENT_CODE_DICT' : 'CONTINENT_CODE_DICT_EN'
  180. }
  181. });
  182. // console.log(result);
  183. this.options1 = result.data[0];
  184. this.options1.unshift(both1);
  185. },
  186. async get() {
  187. const res = await this.$myRequest({
  188. url: '/personnel/baseMemberInfos/searchByTypeApp',
  189. data: this.page
  190. });
  191. // console.log(res);
  192. let data = res.data;
  193. this.initDataArray = data;
  194. this.indexList = data.map(val => {
  195. return val.letter;
  196. });
  197. uni.hideLoading();
  198. },
  199. changeValue1(value) {
  200. this.page.continentDict = value;
  201. this.get();
  202. },
  203. changeValue2(value) {
  204. this.page.industryDict = value;
  205. this.get();
  206. },
  207. async getCountry() {
  208. const res = await this.$myRequest({
  209. url: '/sys/sysDicts',
  210. data: {
  211. type: this.$i18n.locale=='zh'?'UNIT_COUNTRY_DICT':'unit_country_dict_en'
  212. }
  213. });
  214. // console.log(res.data[0]);
  215. this.countryDicts = res.data[0];
  216. for(var i = 0; i < this.countryDicts.length; i++){
  217. this.countryDictsMap[this.countryDicts[i].value] = this.countryDicts[i].label ? this.countryDicts[i].label : this.countryDicts[i];
  218. }
  219. },
  220. memberDetails(data) {
  221. this.detailShow = true;
  222. this.member = data;
  223. this.getProjectList(data.unitId,data.id);
  224. },
  225. async getProjectList(unitId,id) {
  226. const res = await this.$myRequest({
  227. url: '/project/baseUnitViews/getMemberUnit',
  228. data: {
  229. baseEntityId: unitId,
  230. language: this.$i18n.locale.toUpperCase()
  231. }
  232. });
  233. // console.log(res);
  234. if(res.data) {
  235. this.initData = res.data.baseUnitView || [];
  236. this.initData.unitLabel = this.initData.unitLabel?this.initData.unitLabel.split(','):"";
  237. this.initData.setUpDate = this.formatDate(this.initData.setUpDate,'YYYY');
  238. if(this.$i18n.locale == "zh"){
  239. this.initData.unitCountry = res.data.baseUnitView.unitCountry;
  240. }else if(this.$i18n.locale == "en"){
  241. this.initData.unitCountry = res.data.baseUnitView.unitCountryDict;
  242. }
  243. }else {
  244. this.initData = [];
  245. }
  246. let page = {
  247. language: this.$i18n.locale.toUpperCase(),
  248. businessType: 'introduction_to_members',
  249. businessId: id,
  250. };
  251. const info = await this.$myRequest({
  252. url: '/cms/cmsInformationViews/getInformationList/',
  253. data: page,
  254. });
  255. if(info.data) {
  256. this.initViewData = info.data.allDataList || [];
  257. console.log(info.data.allDataList)
  258. }else {
  259. this.initViewData = [];
  260. }
  261. },
  262. openPopup() {
  263. // disableScroll
  264. // let query=uni.createSelectorQuery();
  265. // let dom=query.select('uni-page-wrapper').boundingClientRect();
  266. // let rectInfo = this.$u.getRect('.memberInformation');
  267. },
  268. closePopup() {
  269. // document.tagName('body')[0].style.overflow = 'auto';
  270. }
  271. }
  272. }
  273. </script>
  274. <style lang="scss" scoped>
  275. uni-page-wrapper {
  276. overflow-y: hidden;
  277. }
  278. /deep/.u-index-bar__sidebar {
  279. z-index: 9;
  280. }
  281. .memberInformation {
  282. background-color: #FFFFFF;
  283. .scroll-list {
  284. /* #ifndef APP-PLUS */
  285. height: calc(100vh - 88px);
  286. /* #endif */
  287. /* #ifdef APP-PLUS */
  288. height: calc(100vh - 44px);
  289. /* #endif */
  290. }
  291. .top-drop {
  292. position: fixed;
  293. /* #ifndef APP-PLUS */
  294. top: calc(44px + env(safe-area-inset-top));
  295. /* #endif */
  296. /* #ifdef APP-PLUS */
  297. top: 0;
  298. /* #endif */
  299. left: 0;
  300. z-index: 99;
  301. width: 100%;
  302. background-color: #FFFFFF;
  303. }
  304. .content-list {
  305. padding: 0 40upx;
  306. .listCell {
  307. display: flex;
  308. box-sizing: border-box;
  309. width: 100%;
  310. overflow: hidden;
  311. color: #333333;
  312. font-size: 32upx;
  313. padding: 20upx 0;
  314. border-bottom: 1px solid #F1F1F1;
  315. uni-view {
  316. font-size: inherit;
  317. }
  318. }
  319. }
  320. .popupView {
  321. padding: 20upx;
  322. height: 100%;
  323. position: relative;
  324. background: rgba(235,242,255,0.1);
  325. .popupImg {
  326. position: absolute;
  327. top: 50%;
  328. left: 50%;
  329. transform: translate(-50%,-50%);
  330. width: 80%;
  331. height: 60%;
  332. background-size: 100% 100%;
  333. z-index: -1;
  334. }
  335. .pop-title {
  336. display: flex;
  337. justify-content: space-between;
  338. .title-name {
  339. font-size: 34upx;
  340. font-weight: 700;
  341. color: #333333;
  342. }
  343. .title-bq {
  344. font-size: 30upx;
  345. background-color: #fef0f0;
  346. border: 1px solid #fde2e2;
  347. color: #f56c6c;
  348. padding: 10upx;
  349. border-radius: 6upx;
  350. }
  351. }
  352. .pop-name {
  353. font-size: 30upx;
  354. color: #333333;
  355. line-height: 50upx;
  356. .bold {
  357. font-weight: bold;
  358. }
  359. }
  360. }
  361. }
  362. </style>