videoDetail2.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <template>
  2. <div id="videoDetail2">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="24" class="video">
  6. <el-link :underline="false" class="back" @click="back()"><i class="el-icon-arrow-left"></i></el-link>
  7. <el-col :span="24" class="videoone" v-if="videodock.file_path != null || ''">
  8. <video :src="videodock.file_path" autoplay="" controls="controls">
  9. 您的浏览器不支持 video 标签。
  10. </video>
  11. </el-col>
  12. <el-col :span="24" class="videotwo" v-else>
  13. {{ videodock.videointro }}
  14. </el-col>
  15. </el-col>
  16. <el-col :span="24" class="chat">
  17. <van-tabs v-model="chatactive" type="card" animated>
  18. <van-tab title="图文直播">
  19. <textVideo :list="lunboList"></textVideo>
  20. </van-tab>
  21. <van-tab title="公共聊天">
  22. <chat></chat>
  23. </van-tab>
  24. </van-tabs>
  25. </el-col>
  26. <el-col :span="24" class="market">
  27. <van-tabs v-model="marketactive" type="card" animated>
  28. <van-tab title="技术成果">
  29. <el-col :span="24" class="one">
  30. <el-col :span="24" class="list" v-for="(item, index) in achieveList" :key="index">
  31. <p class="textOver">{{ item.name }}</p>
  32. <p class="textOver">领域:{{ item.field }}</p>
  33. <p class="textOver">联系人:{{ item.contacts }}</p>
  34. </el-col>
  35. </el-col>
  36. </van-tab>
  37. <van-tab title="科技需求">
  38. <el-col :span="24" class="one">
  39. <el-col :span="24" class="list" v-for="(item, index) in techolList" :key="index">
  40. <p class="textOver">{{ item.name }}</p>
  41. <p class="textOver">领域:{{ item.field }}</p>
  42. <p class="textOver">联系人:{{ item.contacts }}</p>
  43. </el-col>
  44. </el-col>
  45. </van-tab>
  46. <van-tab title="专家智库">
  47. <el-col :span="24" class="three">
  48. <el-col :span="24" class="expertList" v-for="(item, index) in expertList" :key="index" @click.native="expertBtn(item)">
  49. <el-col :span="5" class="image">
  50. <el-image
  51. :src="item.expertimage"
  52. style="width:70px;height: 70px;border: 1px solid #f1f1f1;"
  53. v-if="item.expertimage != null || undefined"
  54. ></el-image>
  55. <el-image :src="expertimage" style="width:70px;height: 70px;border: 1px solid #f1f1f1;" v-else></el-image>
  56. </el-col>
  57. <el-col :span="19" class="info1">
  58. <el-col :span="24" class="name textOver">
  59. {{ item.name }}
  60. </el-col>
  61. <el-col :span="24" class="txt textOver"> {{ item.zwzc || '暂无' }} </el-col>
  62. <el-col :span="24" class="txt textOver"> {{ item.company || '暂无' }} </el-col>
  63. </el-col>
  64. </el-col>
  65. </el-col>
  66. </van-tab>
  67. </van-tabs>
  68. </el-col>
  69. <el-col :span="24" class="jbxm">
  70. <van-tabs v-model="jbxmactive" type="card" animated>
  71. <van-tab title="嘉宾访谈">
  72. <el-col :span="24" class="jiabinlist">
  73. <el-col :span="24" class="jiabin" v-for="(item, index) in zxzdlist" :key="index">
  74. <el-col :span="5" class="img4">
  75. <img :src="item.picture" style="width: 100%; height: 100%" />
  76. </el-col>
  77. <el-col :span="19" class="info">
  78. <el-col :span="16" class="title">
  79. {{ item.title }}
  80. </el-col>
  81. <el-col :span="8" class="time">
  82. {{ item.publish_time }}
  83. </el-col>
  84. <el-col :span="24" class="con">{{ item.titlejj }}</el-col>
  85. </el-col>
  86. </el-col>
  87. </el-col>
  88. </van-tab>
  89. <van-tab title="项目路演">
  90. <el-col :span="24" class="xmly">
  91. <el-col :span="24" class="xmlylist" v-for="(item, index) in xmlyList" :key="index">
  92. <el-col :span="17" class="name textOver">
  93. {{ item.title }}
  94. </el-col>
  95. <el-col :span="7" class="date">{{ item.publish_time }} </el-col>
  96. <el-col :span="24" class="jianjie">
  97. {{ item.titlejj }}
  98. </el-col>
  99. </el-col>
  100. </el-col>
  101. </van-tab>
  102. </van-tabs>
  103. </el-col>
  104. <el-col :span="24" class="company">
  105. <el-col :span="24" class="name">
  106. <p>主办单位</p>
  107. <p>{{ dockinfo.sponsor }}</p>
  108. </el-col>
  109. <el-col :span="24" class="name">
  110. <p>承办单位</p>
  111. <p>{{ dockinfo.organizer }}</p>
  112. </el-col>
  113. <el-col :span="24" class="name">
  114. <p>技术支持</p>
  115. <p>长春市福瑞科技有限公司</p>
  116. </el-col>
  117. </el-col>
  118. </el-col>
  119. </el-row>
  120. </div>
  121. </template>
  122. <script>
  123. // 图文直播
  124. import textVideo from '@/components/parts/textVideo.vue';
  125. // 公共聊天
  126. import chat from '@/components/parts/chat.vue';
  127. import { mapState, createNamespacedHelpers } from 'vuex';
  128. const { mapActions: dock } = createNamespacedHelpers('dock');
  129. const { mapActions: marketuser } = createNamespacedHelpers('marketuser');
  130. const { mapActions: exportuser } = createNamespacedHelpers('exportuser');
  131. const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
  132. const { mapActions: newsroadshow } = createNamespacedHelpers('newsroadshow');
  133. import moment from 'moment';
  134. export default {
  135. name: 'videoDetail2',
  136. props: {},
  137. components: {
  138. textVideo,
  139. chat,
  140. },
  141. data: function() {
  142. return {
  143. // 展会id
  144. dock_id: '',
  145. // 视频信息
  146. videodock: {},
  147. // 倒计时查询详情
  148. times: 5,
  149. //展会详情
  150. dockinfo: [],
  151. // 聊天
  152. chatactive: 0,
  153. // 图文直播
  154. lunboList: [],
  155. // 科技超市
  156. marketactive: 0,
  157. // 技术成果
  158. achieveList: [],
  159. // 科技需求
  160. techolList: [],
  161. // 专家智库
  162. expertList: [],
  163. expertimage: require('@/assets/222.png'),
  164. // 嘉宾,项目
  165. jbxmactive: 0,
  166. // 嘉宾访谈
  167. zxzdlist: [],
  168. // 项目路演
  169. xmlyList: [],
  170. };
  171. },
  172. async created() {
  173. if (this.id) {
  174. this.$set(this, `dock_id`, this.id);
  175. }
  176. await this.search();
  177. await this.seachLunbo();
  178. },
  179. methods: {
  180. ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
  181. ...exportuser({ expertQuery: 'query' }),
  182. ...marketuser({ operaFetch: 'operaFetch' }),
  183. ...newsguidance({ danceQuery: 'query' }),
  184. ...newsroadshow({ newsroadshowquery: 'query' }),
  185. // 查询
  186. async search() {
  187. //展会详情
  188. let res = await this.dockFetch(this.dock_id);
  189. if (this.$checkRes(res)) this.$set(this, `dockinfo`, res.data);
  190. let czxm = res.data.apply.map(item => item.goodsList);
  191. czxm = _.flattenDeep(czxm);
  192. var czxmNew = czxm.filter(item => item.dockStatus == '1');
  193. //科技需求
  194. var jishuData = czxmNew.filter(item => item.type === '0');
  195. this.$set(this, `techolList`, jishuData);
  196. //技术成果
  197. var chanpinData = czxmNew.filter(item => item.type === '1');
  198. if (chanpinData) this.$set(this, `achieveList`, chanpinData);
  199. // 专家智库
  200. let exportdata = await this.expertQuery({ role: 6 });
  201. if (this.$checkRes(exportdata)) this.$set(this, `expertList`, exportdata.data);
  202. //嘉宾访谈
  203. let jbftData = await this.danceQuery({ dock_id: this.id });
  204. if (this.$checkRes(jbftData)) this.$set(this, `zxzdlist`, jbftData.data);
  205. // 项目路演
  206. let xmly = await this.newsroadshowquery({ dock_id: this.id });
  207. if (this.$checkRes(xmly)) this.$set(this, `xmlyList`, xmly.data);
  208. },
  209. // 查询图文直播
  210. async seachLunbo() {
  211. let res = await this.operaFetch({ dockid: this.id });
  212. for (const val of res.data) {
  213. var date = moment(val.meta.createdAt).format('YYYY-MM-DD hh:mm');
  214. val.date = date;
  215. }
  216. if (this.$checkRes(res)) {
  217. this.$set(this, `lunboList`, res.data);
  218. }
  219. },
  220. //倒计时查询展会视频详情
  221. counttime() {
  222. this.timer = setInterval(() => {
  223. this.times--;
  224. if (this.times === 0) {
  225. this.searchvideo();
  226. this.times = 5;
  227. clearInterval(this.timer);
  228. }
  229. }, 1000);
  230. },
  231. async searchvideo() {
  232. if (this.dock_id) {
  233. let res = await this.dockFetch(this.dock_id);
  234. if (this.$checkRes(res)) {
  235. // 对接会详情
  236. this.$set(this, `videodock`, res.data);
  237. }
  238. }
  239. },
  240. // 专家详情
  241. expertBtn(data) {
  242. this.$router.push({ path: '/market/exportDetail', query: { id: data.id } });
  243. },
  244. // 返回
  245. back() {
  246. this.$router.push({ path: '/live/index' });
  247. },
  248. },
  249. computed: {
  250. ...mapState(['user']),
  251. id() {
  252. return this.$route.query.id;
  253. },
  254. },
  255. watch: {
  256. times: {
  257. immediate: true,
  258. deep: true,
  259. handler(val) {
  260. if (val && val == 5) {
  261. this.counttime();
  262. }
  263. },
  264. },
  265. },
  266. metaInfo() {
  267. return { title: this.$route.meta.title };
  268. },
  269. };
  270. </script>
  271. <style lang="less" scoped>
  272. .main {
  273. // 视频
  274. .video {
  275. height: 215px;
  276. overflow: hidden;
  277. .back {
  278. position: fixed;
  279. z-index: 999;
  280. i {
  281. font-size: 30px;
  282. font-weight: bold;
  283. margin: 5px 0 0px 5px;
  284. color: #409eff;
  285. }
  286. }
  287. .videoone {
  288. height: 215px;
  289. overflow: hidden;
  290. video {
  291. width: 100%;
  292. }
  293. }
  294. .videotwo {
  295. background: url('~@/assets/directBack.png');
  296. background-size: 100% 100%;
  297. height: 215px;
  298. overflow: hidden;
  299. text-align: center;
  300. color: #fff;
  301. font-size: 20px;
  302. padding: 15% 3%;
  303. }
  304. }
  305. // 聊天
  306. .chat {
  307. margin: 15px 0 0 0;
  308. height: 400px;
  309. overflow: hidden;
  310. }
  311. // 科技超市
  312. .market {
  313. margin: 15px 0 0 0;
  314. .one {
  315. max-height: 550px;
  316. overflow-y: auto;
  317. padding: 0 16px;
  318. min-height: 102px;
  319. .list {
  320. border-bottom: 1px dashed #ccc;
  321. padding: 10px 0;
  322. p {
  323. font-size: 16px;
  324. color: #666;
  325. padding: 5px 0 0 0;
  326. }
  327. p:nth-child(1) {
  328. font-size: 18px;
  329. font-weight: bold;
  330. color: #000;
  331. }
  332. }
  333. }
  334. .three {
  335. max-height: 550px;
  336. overflow-y: auto;
  337. padding: 0 16px;
  338. min-height: 92px;
  339. .expertList {
  340. padding: 5px 0px;
  341. border-bottom: 1px dashed #ccc;
  342. overflow: hidden;
  343. white-space: nowrap;
  344. text-overflow: ellipsis;
  345. .name {
  346. font-size: 18px;
  347. font-weight: bolder;
  348. }
  349. .field {
  350. margin-top: 8px;
  351. font-size: 16px;
  352. color: #666;
  353. }
  354. .image {
  355. margin-top: 5px;
  356. .el-image {
  357. border-radius: 90%;
  358. }
  359. }
  360. .info1 {
  361. padding: 6px 0px 1px 20px;
  362. }
  363. }
  364. }
  365. }
  366. // 嘉宾,项目
  367. .jbxm {
  368. margin: 15px 0 0 0;
  369. // height: 500px;
  370. overflow: hidden;
  371. margin-bottom: 20px;
  372. .jiabinlist {
  373. max-height: 450px;
  374. margin-top: 10px;
  375. padding: 0px 16px;
  376. overflow-y: auto;
  377. min-height: 70px;
  378. .jiabin {
  379. height: 70px;
  380. margin-bottom: 6px;
  381. border-bottom: 1px dashed #ccc;
  382. .img4 {
  383. height: 65px;
  384. }
  385. .info {
  386. padding-left: 10px;
  387. .title {
  388. font-size: 18px;
  389. font-weight: bolder;
  390. text-overflow: ellipsis;
  391. font-size: 18px;
  392. font-weight: bolder;
  393. }
  394. .time {
  395. text-align: right;
  396. }
  397. .con {
  398. font-size: 16px;
  399. color: #666;
  400. margin-top: 3px;
  401. display: -webkit-box;
  402. -webkit-box-orient: vertical;
  403. -webkit-line-clamp: 2;
  404. overflow: hidden;
  405. }
  406. }
  407. }
  408. .jiabin:last-child {
  409. margin-bottom: 0px;
  410. }
  411. }
  412. .xmly {
  413. max-height: 450px;
  414. margin-top: 10px;
  415. padding: 0px 16px;
  416. overflow-y: auto;
  417. min-height: 70px;
  418. .xmlylist {
  419. border-bottom: 1px dashed #ccc;
  420. height: 70px;
  421. margin-bottom: 5px;
  422. .name {
  423. font-size: 18px;
  424. font-weight: bold;
  425. }
  426. .date {
  427. font-size: 16px;
  428. text-align: right;
  429. }
  430. .jianjie {
  431. height: 45px;
  432. font-size: 16px;
  433. overflow: hidden;
  434. text-overflow: ellipsis;
  435. -webkit-line-clamp: 2;
  436. word-break: break-all;
  437. display: -webkit-box;
  438. -webkit-box-orient: vertical;
  439. }
  440. }
  441. .xmlylist:last-child {
  442. margin-bottom: 0px;
  443. }
  444. }
  445. }
  446. // 主办方
  447. .company {
  448. margin: 15px 0 0 0;
  449. .name {
  450. margin: 0 0 20px 0;
  451. padding: 0 10px;
  452. p {
  453. text-align: center;
  454. color: #409eff;
  455. }
  456. p:nth-child(1) {
  457. font-family: cursive;
  458. font-size: 30px;
  459. font-weight: bolder;
  460. text-shadow: 5px 5px 2px #ccc;
  461. }
  462. p:nth-child(2) {
  463. padding: 10px 0 0 0;
  464. font-size: 20px;
  465. }
  466. }
  467. }
  468. }
  469. // 标签样式重定义
  470. /deep/.van-tab {
  471. font-size: 16px;
  472. }
  473. /deep/.van-tabs--card > .van-tabs__wrap {
  474. height: 35px;
  475. }
  476. /deep/.van-tabs__nav--card {
  477. height: 35px;
  478. // margin: 0;
  479. }
  480. /deep/.van-tabs__nav--card {
  481. border: 1px solid #409eff;
  482. }
  483. /deep/.van-tabs__nav--card .van-tab {
  484. color: #666;
  485. border-right: 1px solid #409eff;
  486. }
  487. /deep/.van-tabs__nav--card .van-tab.van-tab--active {
  488. background-color: #409eff;
  489. color: #fff;
  490. }
  491. </style>