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