|
@@ -1,35 +1,18 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
<el-col :span="24" class="main">
|
|
|
- <el-col :span="24" class="info">
|
|
|
- <el-col>
|
|
|
- <el-col :span="24" class="leftTop">
|
|
|
- <span>|</span> <span>{{ menuName }}</span>
|
|
|
- </el-col>
|
|
|
- <el-col class="infoRightList" :span="24" v-for="(item, index) in hangyeList" :key="index">
|
|
|
- <p>
|
|
|
- <span class="textOver" @click="turnTo(item)">{{ item.title }}</span
|
|
|
- ><span class="textOver">
|
|
|
- <el-link :underline="false" :href="`${liveIndex}?id=${item.id}`" target="_blank" class="duijie" v-if="canIn(item)">
|
|
|
- 进入对接会
|
|
|
- </el-link>
|
|
|
- <el-link :underline="false" @click="apply(item.id)" class="duijie" v-if="canJoin(item)"> 申请对接会 </el-link></span
|
|
|
- >
|
|
|
- </p>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col class="page">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page.sync="currentPage"
|
|
|
- :page-size="pageSize"
|
|
|
- layout="total,prev, pager, next, jumper"
|
|
|
- :total="pageTotal"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- </el-col>
|
|
|
+ <el-col :span="24" class="info" style="padding:10px">
|
|
|
+ <el-tabs>
|
|
|
+ <el-tab-pane label="进行中的对接会" name="0">
|
|
|
+ <list :list="listNow" :total="nowTotal" status="1" @query="searchList"></list>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="近期对接会" name="1">
|
|
|
+ <list :list="listPre" :total="nowTotal" status="0" @query="searchList"></list>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="过往对接会" name="2">
|
|
|
+ <list :list="listNow" :total="nowTotal" status="2" @query="searchList"></list>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
@@ -37,27 +20,33 @@
|
|
|
|
|
|
<script>
|
|
|
import _ from 'lodash';
|
|
|
+import list from './parts/list.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: { list },
|
|
|
data: () => ({
|
|
|
squareImage: require('@/assets/live/square_big.png'),
|
|
|
menuIndex: '0',
|
|
|
menuName: '直播列表',
|
|
|
menuColor: 'rgb(254, 149, 14)',
|
|
|
- currentPage: 1,
|
|
|
- pageTotal: 0,
|
|
|
pageSize: 10,
|
|
|
limit: 10,
|
|
|
hangyeList: [],
|
|
|
+ listPre: [],
|
|
|
+ preTotal: 0,
|
|
|
+ listNow: [],
|
|
|
+ nowTotal: 0,
|
|
|
+ listPast: [],
|
|
|
+ pastTotal: 0,
|
|
|
liveIndex: '',
|
|
|
}),
|
|
|
created() {
|
|
|
- this.searchList();
|
|
|
- this.setIndex();
|
|
|
+ this.searchList({ status: '0' });
|
|
|
+ this.searchList({ status: '1' });
|
|
|
+ this.searchList({ status: '2' });
|
|
|
},
|
|
|
computed: {
|
|
|
pageTitle() {
|
|
@@ -70,22 +59,25 @@ export default {
|
|
|
|
|
|
methods: {
|
|
|
...dock({ dockQuery: 'query' }),
|
|
|
- async searchList({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
- let res = await this.dockQuery({ is_allowed: 1 });
|
|
|
- this.$set(this, `pageTotal`, res.total);
|
|
|
- console.log(res.data);
|
|
|
+ async searchList({ skip = 0, limit = 10, status, ...info } = {}) {
|
|
|
+ let res = await this.dockQuery({ is_allowed: 1, skip, limit, status, ...info });
|
|
|
if (res.errcode === 0) {
|
|
|
- this.$set(this, `hangyeList`, res.data);
|
|
|
+ if (status == '0') {
|
|
|
+ this.$set(this, `preTotal`, res.total);
|
|
|
+ this.$set(this, `listPre`, res.data);
|
|
|
+ } else if (status == '1') {
|
|
|
+ this.$set(this, `nowTotal`, res.total);
|
|
|
+ this.$set(this, `listNow`, res.data);
|
|
|
+ } else {
|
|
|
+ this.$set(this, `pastTotal`, res.total);
|
|
|
+ this.$set(this, `listPast`, res.data);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
|
|
|
async initList({ name, skip = 0, limit = 10, ...info } = {}) {
|
|
|
this.$set(this, `pageTotal`, res.total);
|
|
|
},
|
|
|
- apply(id) {
|
|
|
- this.$router.push({ path: '/live/liveApply', query: { id: id } });
|
|
|
- },
|
|
|
-
|
|
|
handleCurrentChange(val) {
|
|
|
this.limit = 5;
|
|
|
this.initList({ skip: (val - 1) * this.limit, limit: this.limit });
|
|
@@ -94,20 +86,6 @@ export default {
|
|
|
turnTo(item) {
|
|
|
this.$router.push({ path: '/live/hallDetail', query: { id: item.id } });
|
|
|
},
|
|
|
- canIn(data) {
|
|
|
- let nowTime = new Date().getTime();
|
|
|
- let start_time = new Date(data.start_time).getTime();
|
|
|
- return !(start_time >= nowTime && data.status != 2);
|
|
|
- },
|
|
|
- canJoin(data) {
|
|
|
- let nowTime = new Date().getTime();
|
|
|
- let join_end = new Date(data.join_end).getTime();
|
|
|
- return join_end < nowTime && data.status != 2;
|
|
|
- },
|
|
|
- setIndex() {
|
|
|
- let index = (process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER) + '/static/liveIndex.html';
|
|
|
- this.$set(this, `liveIndex`, index);
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -176,116 +154,8 @@ export default {
|
|
|
font-weight: 600;
|
|
|
color: #22529a;
|
|
|
}
|
|
|
-.infoLeftList {
|
|
|
- float: left;
|
|
|
- width: 95%;
|
|
|
- border-bottom: 1px dashed #ccc;
|
|
|
- padding: 10px 0 10px 10px;
|
|
|
- height: 87px;
|
|
|
- margin: 0 0 0 5px;
|
|
|
-}
|
|
|
-
|
|
|
-.infoLeftList:hover p:last-child span:first-child {
|
|
|
- -webkit-transform: translateY(-3px);
|
|
|
- -ms-transform: translateY(-3px);
|
|
|
- transform: translateY(-3px);
|
|
|
- -webkit-box-shadow: 0 0 6px #999;
|
|
|
- box-shadow: 0 0 6px #999;
|
|
|
- -webkit-transition: all 0.5s ease-out;
|
|
|
- transition: all 0.5s ease-out;
|
|
|
- color: #005293;
|
|
|
- cursor: pointer;
|
|
|
-}
|
|
|
-/deep/.infoRightList p span[data-v-64e7ce6c]:first-child {
|
|
|
- display: inline-block;
|
|
|
- width: 78%;
|
|
|
- margin: 0 20px 0 10px;
|
|
|
-}
|
|
|
-
|
|
|
-/deep/.infoRightList p span[data-v-64e7ce6c]:last-child {
|
|
|
- display: inline-block;
|
|
|
- width: 19%;
|
|
|
- text-align: center;
|
|
|
- font-size: 16px;
|
|
|
-}
|
|
|
-
|
|
|
-.infoLeftList p:first-child {
|
|
|
- float: left;
|
|
|
- width: 20%;
|
|
|
- font-size: 15px;
|
|
|
- background: #044b79;
|
|
|
- text-align: center;
|
|
|
- color: #fff;
|
|
|
- font-weight: bold;
|
|
|
- padding: 4px 0px;
|
|
|
- margin: 0 0 0 5px;
|
|
|
-}
|
|
|
-.infoLeftList p:last-child {
|
|
|
- float: right;
|
|
|
- width: 70%;
|
|
|
- padding: 0 0 0 10px;
|
|
|
-}
|
|
|
-.infoLeftList p:last-child span:first-child {
|
|
|
- float: left;
|
|
|
- width: 90%;
|
|
|
- font-size: 18px;
|
|
|
-}
|
|
|
-.infoLeftList p:last-child span:last-child {
|
|
|
- float: left;
|
|
|
- width: 90%;
|
|
|
- font-size: 16px;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- -webkit-line-clamp: 2;
|
|
|
- word-break: break-all;
|
|
|
- display: -webkit-box;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- margin: 5px 0 0 0;
|
|
|
- color: #666;
|
|
|
-}
|
|
|
.page {
|
|
|
text-align: center;
|
|
|
margin: 10px 0;
|
|
|
}
|
|
|
-.infoRightList {
|
|
|
- float: left;
|
|
|
- width: 95%;
|
|
|
- padding: 7px 0;
|
|
|
- margin: 0 0 0 5px;
|
|
|
-}
|
|
|
-
|
|
|
-.infoRightList:hover p span:first-child {
|
|
|
- -webkit-transform: translateY(-3px);
|
|
|
- -ms-transform: translateY(-3px);
|
|
|
- transform: translateY(-3px);
|
|
|
- -webkit-box-shadow: 0 0 6px #999;
|
|
|
- box-shadow: 0 0 6px #999;
|
|
|
- -webkit-transition: all 0.5s ease-out;
|
|
|
- transition: all 0.5s ease-out;
|
|
|
- color: #005293;
|
|
|
- cursor: pointer;
|
|
|
-}
|
|
|
-.infoRightList p {
|
|
|
- font-size: 18px;
|
|
|
-}
|
|
|
-.infoRightList p span:first-child {
|
|
|
- display: inline-block;
|
|
|
- width: 60%;
|
|
|
- margin: 0 20px 0 10px;
|
|
|
-}
|
|
|
-.infoRightList p span:last-child {
|
|
|
- display: inline-block;
|
|
|
- padding: 0 0 0 149px;
|
|
|
- text-align: center;
|
|
|
- font-size: 16px;
|
|
|
-}
|
|
|
-.duijie {
|
|
|
- padding: 10px 15px 10px 15px;
|
|
|
- margin: 10px 0 0 10px;
|
|
|
- color: #ff8500;
|
|
|
-}
|
|
|
-
|
|
|
-.duijie:hover {
|
|
|
- color: #0279d5;
|
|
|
-}
|
|
|
</style>
|