shoolDetail.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <template>
  2. <div id="shoolDetail">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="24" class="one">
  6. <div class="w_1200">
  7. <el-col :span="20" class="left">
  8. <el-col :span="24" class="leftone">
  9. <span>科技成果展洽会</span>
  10. <span>欢迎您</span>
  11. </el-col>
  12. <el-col :span="24" class="lefttwo">
  13. SCIENTIFIC AND TECHNOLOGICAL ACHIEVEEMENTS EXHIBITION
  14. </el-col>
  15. </el-col>
  16. <el-col :span="4" class="right">
  17. <el-link :underline="false">帮助中心</el-link>
  18. </el-col>
  19. </div>
  20. </el-col>
  21. <el-col :span="24" class="two">
  22. <div class="w_1200">
  23. <el-col :span="24" class="twotop">
  24. <el-col :span="18" class="left">
  25. <p>{{ dockInfo.title }}</p>
  26. <el-image :src="two1"></el-image>
  27. </el-col>
  28. <el-col :span="6" class="right">
  29. <el-image :src="two2"></el-image>
  30. <p>{{ dockInfo.start_time }}</p>
  31. <p>距离展会结束还有</p>
  32. <p>{{ djs }}</p>
  33. </el-col>
  34. </el-col>
  35. <el-col :span="24" class="twocen">
  36. <el-col :span="15" class="left"> <span>主办单位:</span>{{ dockInfo.sponsor }} </el-col>
  37. <el-col :span="8" class="right">
  38. <el-button class="btn1" @click="$router.push({ path: '/halltwo/directTwo', query: { id: dockInfo.id } })">返回展会进行页</el-button>
  39. <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { dock_id: dockInfo.id } })">进入展会总结页</el-button>
  40. </el-col>
  41. </el-col>
  42. </div>
  43. </el-col>
  44. <el-col :span="24" class="three">
  45. <div class="w_1200">
  46. <el-col :span="24" class="threeinfo">
  47. <p class="title">高校院所</p>
  48. <el-col :span="24" class="detail">
  49. <p>{{ schoolList.content }}</p>
  50. <p v-if="schoolList.name == '吉林大学' || schoolList.name == '长春理工大学'">附件</p>
  51. </el-col>
  52. </el-col>
  53. </div>
  54. </el-col>
  55. <el-col :span="24" class="four">
  56. <div class="w_1200">
  57. <ywlx></ywlx>
  58. </div>
  59. </el-col>
  60. </el-col>
  61. <div class="pz_down">
  62. <live-foot></live-foot>
  63. </div>
  64. </el-row>
  65. </div>
  66. </template>
  67. <script>
  68. import ywlx from './parts/ywlx.vue';
  69. import liveFoot from '@/layout/live/foot.vue';
  70. import { mapState, createNamespacedHelpers } from 'vuex';
  71. const { mapActions: dock } = createNamespacedHelpers('dock');
  72. import { schoolList } from '@/util/school.js';
  73. var moment = require('moment');
  74. export default {
  75. metaInfo() {
  76. return { title: this.$route.meta.title };
  77. },
  78. name: 'shoolDetail',
  79. props: {},
  80. components: {
  81. liveFoot,
  82. ywlx,
  83. },
  84. data: function() {
  85. return {
  86. two1: require('@a/sy_04.png'),
  87. two2: require('@a/dock2.png'),
  88. // 展會詳情
  89. dockInfo: {},
  90. // 指导单位
  91. erweima: require('@a/二维码.jpg'),
  92. // 倒计时
  93. djs: '',
  94. schoolList: schoolList,
  95. };
  96. },
  97. async created() {
  98. await this.searchInfo();
  99. },
  100. methods: {
  101. ...dock({ dockQuery: 'query', dockFetch: 'fetch', goodsquery: 'goodsquery' }),
  102. async searchInfo() {
  103. // 查询展会详情
  104. if (this.dock_id) {
  105. let res = await this.dockFetch(this.dock_id);
  106. if (this.$checkRes(res)) {
  107. this.$set(this, `dockInfo`, res.data);
  108. }
  109. // 倒计时
  110. this.timer = setInterval(() => {
  111. this.setTime(res.data.start_time);
  112. }, 1000);
  113. }
  114. if (this.name) {
  115. let list = this.schoolList.find(i => i.name == this.name);
  116. // console.log(list);
  117. this.schoolList = list;
  118. }
  119. },
  120. // 倒计时
  121. setTime(end) {
  122. let now = moment().format('YYYY-MM-DD HH:mm:ss');
  123. // let now = moment().format('2020-11-20 08:00:00');
  124. if (end == now) {
  125. clearInterval(this.timer);
  126. this.$set(this, `djs`, '展会开始');
  127. } else {
  128. let sec = moment(end).diff(now, 'seconds');
  129. let day = _.floor(sec / 60 / 60 / 24);
  130. let hour = _.floor(Math.abs(day * 24 - sec / 60 / 60));
  131. let dayhour = day * 24;
  132. let minute = _.floor(Math.abs(day * 24 * 60 + hour * 60 - sec / 60));
  133. let second = _.floor(Math.abs(day * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 - sec));
  134. let str = `${hour + dayhour}小时${minute}分${second}秒`;
  135. this.$set(this, `djs`, str);
  136. }
  137. },
  138. },
  139. computed: {
  140. ...mapState(['user']),
  141. dock_id() {
  142. return this.$route.query.dock_id;
  143. },
  144. name() {
  145. return this.$route.query.name;
  146. },
  147. },
  148. };
  149. </script>
  150. <style lang="less" scoped>
  151. .main {
  152. .one {
  153. height: 100px;
  154. .left {
  155. height: 100px;
  156. .leftone {
  157. margin: 15px 0 0 0;
  158. span:nth-child(1) {
  159. font-size: 35px;
  160. color: #535353;
  161. font-weight: bold;
  162. font-family: cursive;
  163. }
  164. span:nth-child(2) {
  165. font-size: 15px;
  166. padding: 0 10px;
  167. color: #535353;
  168. }
  169. }
  170. .lefttwo {
  171. font-size: 12px;
  172. color: #535353;
  173. }
  174. }
  175. .right {
  176. height: 100px;
  177. line-height: 100px;
  178. text-align: right;
  179. }
  180. }
  181. .two {
  182. height: 610px;
  183. background: url('~@/assets/bj1.jpg');
  184. padding: 20px 0;
  185. .twotop {
  186. margin: 0 0 10px 0;
  187. .left {
  188. height: 357px;
  189. margin: 0 10px 0 0;
  190. background: url('~@/assets/dock1.png');
  191. p {
  192. float: left;
  193. width: 79%;
  194. font-size: 43px;
  195. color: #fff;
  196. font-weight: bold;
  197. padding: 13% 0 0 20px;
  198. }
  199. .el-image {
  200. float: left;
  201. width: 153px;
  202. height: 94px;
  203. margin: 4% 0 0 0;
  204. }
  205. }
  206. .right {
  207. background-color: #ffffff;
  208. width: 24%;
  209. height: 357px;
  210. text-align: center;
  211. padding: 0 10px;
  212. .el-image {
  213. width: 120px;
  214. height: 48px;
  215. margin: 50px 0 0px 0;
  216. }
  217. p:nth-child(2) {
  218. font-size: 18px;
  219. margin: 30px 0 5px 0;
  220. }
  221. p:nth-child(3) {
  222. font-size: 22px;
  223. font-weight: bold;
  224. margin-bottom: 30px;
  225. }
  226. p:nth-child(4) {
  227. background: #f5f5f5;
  228. padding: 20px 0px;
  229. border-radius: 5px;
  230. font-size: 30px;
  231. }
  232. }
  233. .right:hover {
  234. cursor: pointer;
  235. p:nth-child(3) {
  236. color: #535353;
  237. }
  238. }
  239. }
  240. .twocen {
  241. height: 130px;
  242. overflow: hidden;
  243. line-height: 130px;
  244. background-color: #fff;
  245. margin: 0 0 35px 0;
  246. .left {
  247. font-size: 18px;
  248. margin: 0 0 0 30px;
  249. span {
  250. font-size: 22px;
  251. font-weight: bold;
  252. }
  253. }
  254. .right {
  255. .btn1 {
  256. font-size: 16px;
  257. color: #fff;
  258. background: red;
  259. border: none;
  260. font-weight: bold;
  261. }
  262. .btn2 {
  263. font-size: 16px;
  264. color: #ff0000;
  265. border: 1px solid #ff0000;
  266. font-weight: bold;
  267. }
  268. }
  269. }
  270. }
  271. .three {
  272. min-height: 500px;
  273. overflow: hidden;
  274. position: relative;
  275. top: -50px;
  276. z-index: 999;
  277. .threeinfo {
  278. min-height: 500px;
  279. overflow: hidden;
  280. background-color: #fff;
  281. box-shadow: 0 5px 15px rgba(33, 82, 203, 0.35);
  282. border-bottom: 1px solid rgba(33, 82, 203, 0.35);
  283. padding: 30px;
  284. .title {
  285. font-family: '微软雅黑';
  286. font-weight: 400;
  287. font-size: 26px;
  288. }
  289. .detail {
  290. font-size: 18px;
  291. line-height: 26px;
  292. color: #070707;
  293. margin: 50px 0 40px 0;
  294. min-height: 300px;
  295. p {
  296. text-indent: 2em;
  297. }
  298. }
  299. }
  300. }
  301. .four {
  302. border-top: 2px solid #305798;
  303. height: 250px;
  304. .info {
  305. .left {
  306. h1 {
  307. padding: 15px 0;
  308. font-weight: bold;
  309. color: #4d4d4d;
  310. }
  311. p {
  312. font-size: 16px;
  313. color: #4d4d4d;
  314. padding: 5px 0;
  315. }
  316. }
  317. .right {
  318. text-align: center;
  319. }
  320. }
  321. }
  322. }
  323. </style>