Commit 4e4b9bc0 by 前端

Merge branch 'ym_v3.2.0' into 'v3.2.0'

fixed

See merge request !29
2 parents 9b09e8a4 5fa8a704
......@@ -5,9 +5,9 @@
<div class="live-table-header">
<h2>
已累计
<label>{{ roomNum }}</label>
<label>{{ peopleNum }}</label>
人观看&nbsp;&nbsp;
<label>{{ visitNumberOfPeople || peopleNum }}</label>
<label>{{ roomNum }}</label>
次观看
</h2>
<el-button :size="size" type="primary" plain @click="detailexport">导出</el-button>
......@@ -29,7 +29,6 @@ import { downloadUrl } from '@/utils'
export default {
name: 'LiveIndex',
props: {
visitSource: String,
roomNum: Number,
peopleNum: {
type: Number,
......@@ -38,7 +37,6 @@ export default {
},
data() {
return {
visitNumberOfPeople: 0,
size: 'small',
url: url,
searchForm: {
......@@ -105,15 +103,6 @@ export default {
}
},
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() {
const getParams = Object.assign(this.getParams(), {
......@@ -127,7 +116,6 @@ export default {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.id = this.$route.query.id
params.visitSource = this.visitSource
return params
},
beforeSearchFn() {
......
......@@ -11,7 +11,8 @@
<div class="look-desc">开播时间:{{ getBetween }}</div>
<div class="look-desc">房间号:{{ room.id }}</div>
<div class="look-status" v-if="endStatus == 'end'">直播已结束{{ endTime }}</div>
<div class="look-status" v-if="endStatus == 'start'">直播倒计时{{ endTime }}</div>
<div class="look-status" v-if="endStatus == 'start'">正在直播{{ endTime }}</div>
<div class="look-status" v-if="endStatus == 'wait'">直播倒计时{{ endTime }}</div>
</div>
</div>
<div class="look-right">
......@@ -81,14 +82,14 @@
<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">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="1"></GLTableButton>
</div>
</div> -->
</GLTable>
</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" :peopleNum="peopleNum"></record>
<record ref="recordForm" v-if="dialogVisible" :roomNum="roomNum" :peopleNum="peopleNum"></record>
</GLDialog>
</div>
</template>
......@@ -102,11 +103,6 @@ export default {
components: {
record
},
provide() {
return {
elFormItem: this.roomNum
}
},
data() {
return {
endStatus: '',
......@@ -128,7 +124,7 @@ export default {
getListApi: this.$apis.console.consolePage,
tableParams: {
listName: 'list',
tableOption: true,
tableOption: false,
tableColumns: [
{
label: '访问来源',
......@@ -190,16 +186,20 @@ export default {
if (this.room.actualEndTime) {
this.endTime = GetDateDiff(this.room.actualEndTime)
this.endStatus = 'end'
clearInterval(this.timer)
}
if (new Date(this.room.startTimeStr).getTime() < new Date().getTime() && !this.room.actualEndTime) {
this.endTime = GetDateDiff(this.room.startTimeStr, new Date())
this.endStatus = 'start'
}
if (new Date(this.room.startTimeStr).getTime() > new Date().getTime()) {
this.endTime = GetDateDiff(new Date(), this.room.startTimeStr)
this.endStatus = 'start'
this.endStatus = 'wait'
}
},
handleLook(row) {
this.visitSource = row.visitSource
this.roomNum = row.totalVisitCnt ? row.totalVisitCnt : this.baseInfo.visitNumberOfTimes
this.peopleNum = row.totalVisitCnt ? 0 : this.baseInfo.visitNumberOfPeople
handleLook() {
this.roomNum = this.baseInfo.visitNumberOfTimes
this.peopleNum = this.baseInfo.visitNumberOfPeople
this.dialogVisible = true
},
consoleBasic(id) {
......@@ -211,6 +211,7 @@ export default {
this.$apis.console.consoleInfo({ id }).then(res => {
this.room = res || {}
this.timer = setInterval(this.getTime, 1000)
this.getTime()
})
},
detailexport() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!