videoDetail2.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  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. 技术成果
  30. </van-tab>
  31. <van-tab title="科技需求">
  32. 科技需求
  33. </van-tab>
  34. <van-tab title="专家智库">
  35. 专家智库
  36. </van-tab>
  37. </van-tabs>
  38. </el-col>
  39. <el-col :span="24" class="jbxm">
  40. <van-tabs v-model="jbxmactive" type="card" animated>
  41. <van-tab title="嘉宾访谈">
  42. <el-col :span="24" class="jiabinlist">
  43. <el-col :span="24" class="jiabin" v-for="(item, index) in zxzdlist" :key="index">
  44. <el-col :span="5" class="img4">
  45. <img :src="item.picture" style="width: 100%; height: 100%" />
  46. </el-col>
  47. <el-col :span="19" class="info">
  48. <el-col :span="16" class="title">
  49. {{ item.title }}
  50. </el-col>
  51. <el-col :span="8" class="time">
  52. {{ item.publish_time }}
  53. </el-col>
  54. <el-col :span="24" class="con">{{ item.titlejj }}</el-col>
  55. </el-col>
  56. </el-col>
  57. </el-col>
  58. </van-tab>
  59. <van-tab title="项目路演">
  60. <el-col :span="24" class="xmly">
  61. <el-col :span="24" class="xmlylist" v-for="(item, index) in xmlyList" :key="index">
  62. <el-col :span="17" class="name textOver">
  63. {{ item.title }}
  64. </el-col>
  65. <el-col :span="7" class="date">{{ item.publish_time }} </el-col>
  66. <el-col :span="24" class="jianjie">
  67. {{ item.titlejj }}
  68. </el-col>
  69. </el-col>
  70. </el-col>
  71. </van-tab>
  72. </van-tabs>
  73. </el-col>
  74. <el-col :span="24" class="company">
  75. <el-col :span="24" class="name">
  76. <p>主办单位</p>
  77. <p>{{ dockinfo.sponsor }}</p>
  78. </el-col>
  79. <el-col :span="24" class="name">
  80. <p>承办单位</p>
  81. <p>{{ dockinfo.organizer }}</p>
  82. </el-col>
  83. <el-col :span="24" class="name">
  84. <p>技术支持</p>
  85. <p>长春市福瑞科技有限公司</p>
  86. </el-col>
  87. </el-col>
  88. </el-col>
  89. </el-row>
  90. </div>
  91. </template>
  92. <script>
  93. // 图文直播
  94. import textVideo from '@/components/parts/textVideo.vue';
  95. // 公共聊天
  96. import chat from '@/components/parts/chat.vue';
  97. import { mapState, createNamespacedHelpers } from 'vuex';
  98. const { mapActions: dock } = createNamespacedHelpers('dock');
  99. const { mapActions: marketuser } = createNamespacedHelpers('marketuser');
  100. const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
  101. const { mapActions: newsroadshow } = createNamespacedHelpers('newsroadshow');
  102. import moment from 'moment';
  103. export default {
  104. name: 'videoDetail2',
  105. props: {},
  106. components: {
  107. textVideo,
  108. chat,
  109. },
  110. data: function() {
  111. return {
  112. // 展会id
  113. dock_id: '',
  114. // 视频信息
  115. videodock: {},
  116. // 倒计时查询详情
  117. times: 5,
  118. //展会详情
  119. dockinfo: [],
  120. // 聊天
  121. chatactive: 1,
  122. // 图文直播
  123. lunboList: [],
  124. // 科技超市
  125. marketactive: 0,
  126. // 嘉宾,项目
  127. jbxmactive: 0,
  128. // 嘉宾访谈
  129. zxzdlist: [],
  130. // 项目路演
  131. xmlyList: [],
  132. };
  133. },
  134. async created() {
  135. if (this.id) {
  136. this.$set(this, `dock_id`, this.id);
  137. }
  138. await this.search();
  139. await this.seachLunbo();
  140. },
  141. methods: {
  142. ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
  143. ...marketuser({ operaFetch: 'operaFetch' }),
  144. ...newsguidance({ danceQuery: 'query' }),
  145. ...newsroadshow({ newsroadshowquery: 'query' }),
  146. // 查询
  147. async search() {
  148. //展会详情
  149. let res = await this.dockFetch(this.dock_id);
  150. if (this.$checkRes(res)) this.$set(this, `dockinfo`, res.data);
  151. //嘉宾访谈
  152. let jbftData = await this.danceQuery({ dock_id: this.id, role: 6, limit: 6 });
  153. if (this.$checkRes(jbftData)) this.$set(this, `zxzdlist`, jbftData.data);
  154. // 项目路演
  155. let xmly = await this.newsroadshowquery({ dock_id: this.id });
  156. if (this.$checkRes(xmly)) this.$set(this, `xmlyList`, xmly.data);
  157. },
  158. // 查询图文直播
  159. // 查询图文直播
  160. async seachLunbo() {
  161. let res = await this.operaFetch({ dockid: this.id });
  162. for (const val of res.data) {
  163. var date = moment(val.meta.createdAt).format('YYYY-MM-DD hh:mm');
  164. val.date = date;
  165. }
  166. if (this.$checkRes(res)) {
  167. this.$set(this, `lunboList`, res.data);
  168. }
  169. },
  170. //倒计时查询展会视频详情
  171. counttime() {
  172. this.timer = setInterval(() => {
  173. this.times--;
  174. if (this.times === 0) {
  175. this.searchvideo();
  176. this.times = 5;
  177. clearInterval(this.timer);
  178. }
  179. }, 1000);
  180. },
  181. async searchvideo() {
  182. if (this.dock_id) {
  183. let res = await this.dockFetch(this.dock_id);
  184. if (this.$checkRes(res)) {
  185. // 对接会详情
  186. this.$set(this, `videodock`, res.data);
  187. }
  188. }
  189. },
  190. // 返回
  191. back() {
  192. this.$router.push({ path: '/live/index' });
  193. },
  194. },
  195. computed: {
  196. ...mapState(['user']),
  197. id() {
  198. return this.$route.query.id;
  199. },
  200. },
  201. watch: {
  202. times: {
  203. immediate: true,
  204. deep: true,
  205. handler(val) {
  206. if (val && val == 5) {
  207. this.counttime();
  208. }
  209. },
  210. },
  211. },
  212. metaInfo() {
  213. return { title: this.$route.meta.title };
  214. },
  215. };
  216. </script>
  217. <style lang="less" scoped>
  218. .main {
  219. // 视频
  220. .video {
  221. height: 215px;
  222. overflow: hidden;
  223. .back {
  224. position: fixed;
  225. i {
  226. font-size: 30px;
  227. font-weight: bold;
  228. margin: 5px 0 0px 5px;
  229. color: #409eff;
  230. }
  231. }
  232. .videoone {
  233. height: 215px;
  234. overflow: hidden;
  235. video {
  236. width: 100%;
  237. }
  238. }
  239. .videotwo {
  240. background: url('~@/assets/directBack.png');
  241. background-size: 100% 100%;
  242. height: 215px;
  243. overflow: hidden;
  244. text-align: center;
  245. color: #fff;
  246. font-size: 20px;
  247. padding: 15% 3%;
  248. }
  249. }
  250. // 聊天
  251. .chat {
  252. margin: 15px 0 0 0;
  253. height: 400px;
  254. overflow: hidden;
  255. // border: 1px solid red;
  256. }
  257. // 科技超市
  258. .market {
  259. margin: 15px 0 0 0;
  260. }
  261. // 嘉宾,项目
  262. .jbxm {
  263. margin: 15px 0 0 0;
  264. height: 500px;
  265. overflow: hidden;
  266. margin-bottom: 20px;
  267. .jiabinlist {
  268. height: 450px;
  269. margin-top: 10px;
  270. padding: 0px 16px;
  271. overflow-y: auto;
  272. .jiabin {
  273. height: 70px;
  274. margin-bottom: 6px;
  275. .img4 {
  276. height: 70px;
  277. }
  278. .info {
  279. padding-left: 10px;
  280. .title {
  281. font-size: 18px;
  282. font-weight: bolder;
  283. text-overflow: ellipsis;
  284. font-size: 18px;
  285. font-weight: bolder;
  286. }
  287. .time {
  288. text-align: right;
  289. }
  290. .con {
  291. font-size: 16px;
  292. color: #666;
  293. margin-top: 3px;
  294. display: -webkit-box;
  295. -webkit-box-orient: vertical;
  296. -webkit-line-clamp: 2;
  297. overflow: hidden;
  298. }
  299. }
  300. }
  301. .jiabin:last-child {
  302. margin-bottom: 0px;
  303. }
  304. }
  305. .xmly {
  306. height: 450px;
  307. margin-top: 10px;
  308. padding: 0px 16px;
  309. overflow-y: auto;
  310. .xmlylist {
  311. border-bottom: 1px dashed #ccc;
  312. height: 70px;
  313. margin-bottom: 5px;
  314. .name {
  315. font-size: 18px;
  316. font-weight: bold;
  317. }
  318. .date {
  319. font-size: 16px;
  320. text-align: right;
  321. }
  322. .jianjie {
  323. height: 45px;
  324. font-size: 16px;
  325. overflow: hidden;
  326. text-overflow: ellipsis;
  327. -webkit-line-clamp: 2;
  328. word-break: break-all;
  329. display: -webkit-box;
  330. -webkit-box-orient: vertical;
  331. }
  332. }
  333. }
  334. }
  335. // 主办方
  336. .company {
  337. .name {
  338. margin: 0 0 20px 0;
  339. padding: 0 10px;
  340. p {
  341. text-align: center;
  342. color: #409eff;
  343. }
  344. p:nth-child(1) {
  345. font-family: cursive;
  346. font-size: 35px;
  347. font-weight: bolder;
  348. text-shadow: 5px 5px 2px #ccc;
  349. }
  350. p:nth-child(2) {
  351. padding: 10px 0 0 0;
  352. font-size: 20px;
  353. }
  354. }
  355. }
  356. }
  357. // 标签样式重定义
  358. /deep/.van-tab {
  359. font-size: 18px;
  360. }
  361. /deep/.van-tabs--card > .van-tabs__wrap {
  362. height: 40px;
  363. }
  364. /deep/.van-tabs__nav--card {
  365. height: 40px;
  366. // margin: 0;
  367. }
  368. /deep/.van-tabs__nav--card {
  369. border: 1px solid #409eff;
  370. }
  371. /deep/.van-tabs__nav--card .van-tab {
  372. color: #666;
  373. border-right: 1px solid #409eff;
  374. }
  375. /deep/.van-tabs__nav--card .van-tab.van-tab--active {
  376. background-color: #409eff;
  377. color: #fff;
  378. }
  379. </style>