Commit 5d6f0e39 by xuyl

Merge branch 'v3.2.0' of http://192.168.3.233:8090/saas/live into xuyl_dev_v3.2.0

2 parents b3b0243c 8c9354e3
...@@ -6,14 +6,16 @@ ...@@ -6,14 +6,16 @@
<h2> <h2>
已累计 已累计
<label>{{ roomNum }}</label> <label>{{ roomNum }}</label>
人观看 人观看&nbsp;&nbsp;
<label>{{ visitNumberOfPeople || peopleNum }}</label>
次观看
</h2> </h2>
<el-button :size="size" type="primary" plain @click="detailexport">导出</el-button> <el-button :size="size" type="primary" plain @click="detailexport">导出</el-button>
</div> </div>
<GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="nickname" slot-scope="scope"> <div slot="nickname" slot-scope="scope">
<div class="nickname-border"> <div class="nickname-border">
<img :src="scope.scope.coverUrl" /> <img :src="scope.scope.avatar" />
<span>{{ scope.scope.nickname }}</span> <span>{{ scope.scope.nickname }}</span>
</div> </div>
</div> </div>
...@@ -28,16 +30,21 @@ export default { ...@@ -28,16 +30,21 @@ export default {
name: 'LiveIndex', name: 'LiveIndex',
props: { props: {
visitSource: String, visitSource: String,
roomNum: Number roomNum: Number,
peopleNum: {
type: Number,
default: 0
}
}, },
data() { data() {
return { return {
visitNumberOfPeople: 0,
size: 'small', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
nickname: '', nickname: '',
phone: '', phone: '',
visitSource: '' sourceShopName: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
// 搜索 // 搜索
...@@ -56,7 +63,7 @@ export default { ...@@ -56,7 +63,7 @@ export default {
}, },
{ {
label: '来源门店', label: '来源门店',
name: 'visitSource', name: 'sourceShopName',
type: 'input', type: 'input',
maxlength: 20 maxlength: 20
} }
...@@ -84,10 +91,6 @@ export default { ...@@ -84,10 +91,6 @@ export default {
prop: 'sourceShopName' prop: 'sourceShopName'
}, },
{ {
label: '是否观看',
prop: 'status'
},
{
label: '观看时长', label: '观看时长',
prop: 'visitDuration' prop: 'visitDuration'
}, },
...@@ -101,8 +104,15 @@ export default { ...@@ -101,8 +104,15 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' } pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
} }
}, },
inject: ['elFormItem'],
mounted() {}, mounted() {
if (this.visitSource) {
const { id } = this.$route.query
this.$apis.console.consoleBasic({ id, visitSource: this.visitSource }).then(res => {
this.visitNumberOfPeople = (res || {}).visitNumberOfPeople
})
}
},
methods: { methods: {
detailexport() { detailexport() {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="look-container"> <div class="look-container">
<div class="look-left"> <div class="look-left">
<div class="look-left-b"> <div class="look-left-b">
<img :src="room.liveVideoCover" /> <img :src="room.liveVideoCover" v-show="room.liveVideoCover" />
</div> </div>
<div class="look-left-content"> <div class="look-left-content">
<div class="look-title">{{ room.name }}</div> <div class="look-title">{{ room.name }}</div>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
</div> </div>
</div> </div>
<GLDialog width="1158px" :bigTitle="room.name" :hasFooter="false" :visible.sync="dialogVisible" mode="big"> <GLDialog width="1158px" :bigTitle="room.name" :hasFooter="false" :visible.sync="dialogVisible" mode="big">
<record ref="recordForm" v-if="dialogVisible" :visitSource="visitSource" :roomNum="roomNum"></record> <record ref="recordForm" v-if="dialogVisible" :visitSource="visitSource" :roomNum="roomNum" :peopleNum="peopleNum"></record>
</GLDialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -102,10 +102,16 @@ export default { ...@@ -102,10 +102,16 @@ export default {
components: { components: {
record record
}, },
provide() {
return {
elFormItem: this.roomNum
}
},
data() { data() {
return { return {
endStatus: '', endStatus: '',
roomNum: 0, roomNum: 0,
peopleNum: 0,
roomId: '', roomId: '',
endTime: '', endTime: '',
dialogVisible: false, dialogVisible: false,
...@@ -181,8 +187,8 @@ export default { ...@@ -181,8 +187,8 @@ export default {
methods: { methods: {
//时间差 //时间差
getTime() { getTime() {
if (new Date(this.room.endTimeStr).getTime() < new Date().getTime()) { if (this.room.actualEndTime) {
this.endTime = GetDateDiff(this.room.endTimeStr) this.endTime = GetDateDiff(this.room.actualEndTime)
this.endStatus = 'end' this.endStatus = 'end'
} }
if (new Date(this.room.startTimeStr).getTime() > new Date().getTime()) { if (new Date(this.room.startTimeStr).getTime() > new Date().getTime()) {
...@@ -193,6 +199,7 @@ export default { ...@@ -193,6 +199,7 @@ export default {
handleLook(row) { handleLook(row) {
this.visitSource = row.visitSource this.visitSource = row.visitSource
this.roomNum = row.totalVisitCnt ? row.totalVisitCnt : this.baseInfo.visitNumberOfTimes this.roomNum = row.totalVisitCnt ? row.totalVisitCnt : this.baseInfo.visitNumberOfTimes
this.peopleNum = row.totalVisitCnt ? 0 : this.baseInfo.visitNumberOfPeople
this.dialogVisible = true this.dialogVisible = true
}, },
consoleBasic(id) { consoleBasic(id) {
...@@ -264,6 +271,8 @@ export default { ...@@ -264,6 +271,8 @@ export default {
.look-left { .look-left {
display: flex; display: flex;
.look-left-b { .look-left-b {
width: 260px;
height: 170px;
img { img {
width: 260px; width: 260px;
height: 170px; height: 170px;
...@@ -273,11 +282,11 @@ export default { ...@@ -273,11 +282,11 @@ export default {
margin-left: 20px; margin-left: 20px;
.look-title { .look-title {
@include title(); @include title();
margin-bottom: 8px; margin-bottom: 10px;
} }
.look-desc { .look-desc {
@include text(); @include text();
line-height: 20px; line-height: 24px;
} }
.look-status { .look-status {
margin-top: 20px; margin-top: 20px;
...@@ -294,7 +303,7 @@ export default { ...@@ -294,7 +303,7 @@ export default {
display: flex; display: flex;
.look-item { .look-item {
text-align: center; text-align: center;
margin-left: 20px; margin-left: 68px;
&-icon { &-icon {
width: 40px; width: 40px;
height: 40px; height: 40px;
...@@ -304,6 +313,7 @@ export default { ...@@ -304,6 +313,7 @@ export default {
line-height: 24px; line-height: 24px;
} }
&-num { &-num {
line-height: 24px;
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="live-table-header"> <div class="live-table-header">
<h2>短视频列表</h2> <h2>短视频列表</h2>
<el-button :size="size" type="primary" class="el-icon-plus" @click="pageClick">新建短视频</el-button> <el-button :size="size" type="primary" @click="pageClick">新建短视频</el-button>
</div> </div>
<GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="status" slot-scope="scope"> <div slot="status" slot-scope="scope">
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
// 搜索 // 搜索
searchFormData: [ searchFormData: [
{ {
label: '', label: '短视频搜索',
name: 'term', name: 'term',
type: 'input', type: 'input',
placeholder: '请输入关键字', placeholder: '请输入关键字',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!