Commit e214bf12 by 杨明

fixed

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