ExhibitionService2.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. <template>
  2. <div class="autoBox box" style="min-height: 900px;position: relative;">
  3. <div class="crumbs">
  4. <el-breadcrumb separator="/">
  5. <el-breadcrumb-item :to="{ path: 'home' }">{{ $t('common.Home') }}</el-breadcrumb-item>
  6. <el-breadcrumb-item>{{ $t('common.ExhibitionService') }}</el-breadcrumb-item>
  7. </el-breadcrumb>
  8. </div>
  9. <div class="top-pic" v-if="flag">
  10. <div class="ui-little-pic">
  11. <ul class="ui-big-pics">
  12. <li @click="picOne(item)" v-for="(item, index) in exhibitionInfo" :key="index"
  13. :class="[isactive ? styleClass[index] : '']"><span class="ui-big-text">{{ item.name }}</span>
  14. </li>
  15. </ul>
  16. </div>
  17. <div class="ui-big-pic">
  18. <ul>
  19. <li><img :src="picUrl" alt="" class="user-pic"></li>
  20. </ul>
  21. <el-button v-show="$i18n.locale == 'en'" round class="ui-btn" @click="toDetail">View details</el-button>
  22. <el-button v-show="$i18n.locale == 'zh'" round class="ui-btn" @click="toDetail">查看详情</el-button>
  23. </div>
  24. </div>
  25. <div style="margin-top: 20px;margin-left: 10px;" >
  26. <div class="relevanInformation">
  27. <div class="informationTitle informationTitleAfter">
  28. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  29. style="height: 20px;vertical-align: middle;">
  30. {{ $t('common.ExhibitionServiceInfo') }}
  31. </div>
  32. </div>
  33. </div>
  34. <div class="ui-bottom-pic">
  35. <div class="ui-bottom-big-pic" @click="toBig">
  36. <div class="ui-big-pic-left">
  37. <img src="@/assets/img/exhibition/Rectangle 81.png" alt="" class="user-pic" title="点击进入展厅">
  38. </div>
  39. <div class="pic-text-1" v-if="$i18n.locale == 'zh'">全球能源互联网展厅</div>
  40. <div class="pic-text-1" v-if="$i18n.locale == 'en'">Global Energy Internet Exhibition hall</div>
  41. </div>
  42. <div class="ui-bottom-little-pic">
  43. <div class="ui-little-pic-top" @click="toBig">
  44. <div class="ui-little-pic-right-top">
  45. <img src="@/assets/img/exhibition/Rectangle 82.png" alt="" class="user-pic" title="点击进入展厅">
  46. </div>
  47. <div class="pic-text-2" v-if="$i18n.locale == 'zh'">全球共识1</div>
  48. <div class="pic-text-2" v-if="$i18n.locale == 'en'">Global Consensus 1</div>
  49. </div>
  50. <div class="ui-little-pic-bottom" @click="toBig">
  51. <div class="ui-little-pic-right-bottom">
  52. <img src="@/assets/img/exhibition/Rectangle 83.png" alt="" class="user-pic" title="点击进入展厅">
  53. </div>
  54. <div class="pic-text-3" v-if="$i18n.locale == 'zh'">全球共识2</div>
  55. <div class="pic-text-3" v-if="$i18n.locale == 'en'">Global Consensus 2</div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </template>
  61. <script>
  62. import { ExhibitionLists } from '@/api/exhibition'
  63. export default {
  64. name: "exhibitionService2",
  65. data() {
  66. return {
  67. data: {},
  68. exhibitionInfo: [],
  69. firstPicUrl: '',
  70. firstDetail: '',
  71. firstInfo: '',
  72. picUrl: null,
  73. picId: null,
  74. three1: null,
  75. styleClass: [
  76. 'first-class',
  77. 'second-class',
  78. 'third-class',
  79. 'four-class',
  80. 'five-class'
  81. ],
  82. isactive: true,
  83. flag: false,
  84. }
  85. },
  86. mounted() {
  87. this.initDatas()
  88. },
  89. watch: {
  90. '$i18n.locale'() {
  91. this.initDatas();
  92. },
  93. },
  94. methods: {
  95. load() {
  96. console.log('..');
  97. },
  98. picOne(item) {
  99. console.log(item);
  100. this.picUrl = 'api/file/pub/' + item.picture
  101. this.picId = item.id
  102. this.three1 = item.extendThree
  103. },
  104. toDetail() {
  105. let picId = this.picId
  106. let three1 = this.three1
  107. console.log(picId, three1, '参数1');
  108. if (!picId == '') {
  109. this.$router.push({
  110. name: 'exhibitionServiceDetail', params: {
  111. id: picId,
  112. three1: three1
  113. }
  114. });
  115. } else {
  116. let picId = this.firstDetail
  117. let three1 = this.firstInfo
  118. console.log(picId, three1, '参数2');
  119. this.$router.push({
  120. name: 'exhibitionServiceDetail', params: {
  121. id: picId,
  122. three1: three1
  123. }
  124. });
  125. }
  126. },
  127. initDatas() {
  128. let params = {
  129. pageSize: 10,
  130. pageNo: 1,
  131. extendFour: this.$i18n.locale.toUpperCase()
  132. }
  133. ExhibitionLists(params).then((res) => {
  134. // console.log(res);
  135. this.data = res.data
  136. if (res.data.exhibitionManagementLists) {
  137. this.flag = true
  138. } else {
  139. this.flag = false
  140. }
  141. this.exhibitionInfo = res.data.exhibitionManagementLists
  142. this.firstPicUrl = res.data.exhibitionManagementLists[0].picture
  143. this.firstDetail = res.data.exhibitionManagementLists[0].id
  144. this.firstInfo = res.data.exhibitionManagementLists[0].extendThree
  145. // console.log(this.firstPicUrl, '图片地址');
  146. this.picUrl = 'api/file/pub/' + this.firstPicUrl
  147. })
  148. },
  149. toBig() {
  150. window.open('http://tour.quanjingke.com/xiangmu/quanqiunengyuan_vtour_v7/index.html');
  151. }
  152. }
  153. }
  154. </script>
  155. <style lang="less" scoped>
  156. .box {
  157. margin-top: 10px;
  158. background: #fff;
  159. /* height: 500px; */
  160. padding: 20px 0;
  161. .crumbs {
  162. margin-left: 20px;
  163. }
  164. }
  165. .user-pic {
  166. width: 100%;
  167. height: 100%;
  168. }
  169. .top-pic {
  170. display: flex;
  171. justify-content: space-between;
  172. padding: 30px 10px;
  173. .ui-little-pic {
  174. width: 26%;
  175. height: 432px;
  176. overflow: hidden;
  177. .ui-big-pics {
  178. width: 100%;
  179. height: 432px;
  180. overflow: hidden;
  181. }
  182. }
  183. .ui-big-text {
  184. display: inline-block;
  185. color: #fff;
  186. width: 90%;
  187. margin-left: 5%;
  188. height: 80px;
  189. line-height: 80px;
  190. text-align: center;
  191. overflow: hidden;
  192. white-space: nowrap;
  193. text-overflow: ellipsis;
  194. }
  195. .first-class {
  196. display: inline-block;
  197. width: 98%;
  198. height: 80px;
  199. margin-bottom: 8px;
  200. background-image: url('~@/assets/img/bgImg/Group 95.png');
  201. background-size: 100% 100%;
  202. }
  203. .first-class:hover {
  204. display: inline-block;
  205. width: 98%;
  206. height: 80px;
  207. margin-bottom: 8px;
  208. background-image: url('~@/assets/img/bgImg/Group 96.png');
  209. background-size: 100% 100%;
  210. }
  211. .second-class {
  212. display: inline-block;
  213. width: 98%;
  214. height: 80px;
  215. margin-bottom: 8px;
  216. background-image: url('~@/assets/img/bgImg/Group 99.png');
  217. background-size: 100% 100%;
  218. }
  219. .second-class:hover {
  220. display: inline-block;
  221. width: 98%;
  222. height: 80px;
  223. margin-bottom: 8px;
  224. background-image: url('~@/assets/img/bgImg/Group 96.png');
  225. background-size: 100% 100%;
  226. }
  227. .third-class {
  228. display: inline-block;
  229. width: 98%;
  230. height: 80px;
  231. margin-bottom: 8px;
  232. background-image: url('~@/assets/img/bgImg/Group 101.png');
  233. background-size: 100% 100%;
  234. }
  235. .third-class:hover {
  236. display: inline-block;
  237. width: 98%;
  238. height: 80px;
  239. margin-bottom: 8px;
  240. background-image: url('~@/assets/img/bgImg/Group 96.png');
  241. background-size: 100% 100%;
  242. }
  243. .four-class {
  244. display: inline-block;
  245. width: 98%;
  246. height: 80px;
  247. margin-bottom: 8px;
  248. background-image: url('~@/assets/img/bgImg/Group 102.png');
  249. background-size: 100% 100%;
  250. }
  251. .four-class:hover {
  252. display: inline-block;
  253. width: 98%;
  254. height: 80px;
  255. margin-bottom: 8px;
  256. background-image: url('~@/assets/img/bgImg/Group 96.png');
  257. background-size: 100% 100%;
  258. }
  259. .five-class {
  260. display: inline-block;
  261. width: 98%;
  262. height: 80px;
  263. margin-bottom: 8px;
  264. background-image: url('~@/assets/img/bgImg/Group 103.png');
  265. background-size: 100% 100%;
  266. }
  267. .five-class:hover {
  268. display: inline-block;
  269. width: 98%;
  270. height: 80px;
  271. margin-bottom: 8px;
  272. background-image: url('~@/assets/img/bgImg/Group 96.png');
  273. background-size: 100% 100%;
  274. }
  275. .ui-big-pic {
  276. width: 73%;
  277. margin-bottom: 8px;
  278. height: 432px;
  279. overflow: hidden;
  280. }
  281. .ui-btn {
  282. width: 127px;
  283. z-index: 999;
  284. margin-left: 50%;
  285. transform: translateX(-50%) translateY(-338%);
  286. }
  287. .ui-big-pic ul li {
  288. width: 100%;
  289. height: 432px;
  290. }
  291. }
  292. .relevanInformation {
  293. padding: 0;
  294. overflow: hidden;
  295. .informationTitle {
  296. // border-bottom: 1px solid #2C558A;
  297. padding: 0 0 10px 0;
  298. font-weight: 600;
  299. font-size: 20px;
  300. opacity: 0.9;
  301. }
  302. .informationTitleAfter {
  303. position: relative;
  304. }
  305. }
  306. .ui-bottom-pic {
  307. padding: 10px;
  308. display: flex;
  309. justify-content: space-between;
  310. height: 370px;
  311. margin-bottom: 30px;
  312. .ui-bottom-big-pic {
  313. width: 54%;
  314. overflow: hidden;
  315. .ui-big-pic-left {
  316. height: 370px;
  317. width: 100%;
  318. }
  319. .ui-big-pic-left:hover+.pic-text-1 {
  320. transform: translateY(-30px);
  321. transition: 0.8s;
  322. }
  323. .pic-text-1 {
  324. height: 30px;
  325. line-height: 30px;
  326. padding-left: 35px;
  327. color: #fff;
  328. background-color: rgba(119, 118, 118, 0.8);
  329. }
  330. }
  331. .ui-bottom-little-pic {
  332. width: 45%;
  333. .ui-little-pic-top {
  334. height: 180px;
  335. overflow: hidden;
  336. margin-bottom: 10px;
  337. background-color: rgb(99, 184, 184);
  338. .ui-little-pic-right-top {
  339. height: 180px;
  340. }
  341. .ui-little-pic-right-top:hover+.pic-text-2 {
  342. transform: translateY(-30px);
  343. transition: 0.8s;
  344. }
  345. .pic-text-2 {
  346. height: 30px;
  347. line-height: 30px;
  348. padding-left: 35px;
  349. color: #fff;
  350. background-color: rgba(119, 118, 118, 0.8);
  351. }
  352. }
  353. .ui-little-pic-bottom {
  354. height: 180px;
  355. overflow: hidden;
  356. .ui-little-pic-right-bottom {
  357. height: 180px;
  358. }
  359. .ui-little-pic-right-bottom:hover+.pic-text-3 {
  360. transform: translateY(-30px);
  361. transition: 0.8s;
  362. }
  363. .pic-text-3 {
  364. height: 30px;
  365. line-height: 30px;
  366. padding-left: 35px;
  367. color: #fff;
  368. background-color: rgba(119, 118, 118, 0.8);
  369. }
  370. }
  371. }
  372. }
  373. </style>