App.vue
4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<template>
<div id="app">
<img alt="Vue logo" src="./assets/logo.png" />
<HelloWorld msg="Welcome to Your Vue.js App" />
<GLExternal url="//localhost:8080/html/employee/index.html" :subscribe="subscribe"></GLExternal>
<GLButton @click="click" id="1-1-1-1" mode="button">232321321</GLButton>
<el-button type="primary">aaa</el-button>
<el-button type="primary" size="small">aaa</el-button>
<el-button type="primary" size="mini">aaa</el-button>
<GLDialog :visible.sync="visible" title="aaaaaaaaa">
<div slot="footer">
<el-button size="small" @click="visible = false">取消</el-button>
<el-button type="primary" size="small">aaa</el-button>
</div>
</GLDialog>
<GLTable ref="liveRoomRef" :tableParams="tableParams" :tableData="tableData">
<span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span>
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)">控制台</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button>
<el-button v-if="scope.scope.liveStatus == '102'" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.liveStatus != '101'" type="text" @click="handleDelete(scope.scope)">删除</el-button>
</span>
</GLTable>
</div>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'App',
components: {
HelloWorld
},
data() {
return {
visible: false,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '最近开播',
prop: 'time',
width: '180',
formatter: cellValue => {
return cellValue.startTime + '-' + cellValue.endTime
}
},
{
label: '直播间名称',
prop: 'name',
line: 1
},
{
label: '房间号',
prop: 'roomId'
},
{
label: '主播',
prop: 'anchorName',
line: 1
},
{
label: '直播间图片',
prop: 'shareImgUrl',
line: 1,
addHtml: 'shareImgUrl'
},
{
label: '直播状态',
prop: 'liveStatus',
width: '80',
formatter: cellValue => {
return 111
}
}
]
},
tableData: [
{
id: 3,
name: '直播测试1',
startTime: '2021-09-23 21:26:44',
endTime: '2021-09-23 21:34:35',
anchorName: 'hexy1996',
shareImgUrl: 'http://qcimg01.glsx.net:7060/group1/M00/00/31/wKgD3mFDEMKAa2T8AAAuTgJxhBQ998.jpg',
roomId: 26,
liveStatus: 103
},
{
id: 5,
name: '直播测试1',
startTime: '2021-09-27 11:00:00',
endTime: '2021-09-27 13:10:00',
anchorName: 'hexy1996',
shareImgUrl: 'http://qcimg01.glsx.net:7060/group1/M00/00/31/wKgD3mFDEMKAa2T8AAAuTgJxhBQ998.jpg',
roomId: 28,
liveStatus: 107
},
{
id: 9,
name: '直播测试1',
startTime: '2021-10-07 12:00:00',
endTime: '2021-10-07 14:00:00',
anchorName: 'hexy1996',
shareImgUrl: 'http://qcimg01.glsx.net:7060/group1/M00/00/31/wKgD3mFDEMKAa2T8AAAuTgJxhBQ998.jpg',
roomId: 32,
liveStatus: 107
},
{
id: 11,
name: '直播间新增1-编辑啦啦啦',
startTime: '2021-10-26 20:00:00',
endTime: '2021-10-26 23:30:08',
anchorName: '啦啦999',
shareImgUrl: 'http://qcimg01.glsx.net:7060/group1/M00/00/3F/wKgD3mF3cs-AeeV8AAA8sjTg54U855.jpg',
roomId: 34,
liveStatus: 107
},
{
id: 12,
name: '新增直播间咯00',
startTime: '2021-10-29 09:13:18',
endTime: '2021-10-29 15:08:19',
anchorName: '啦啦',
shareImgUrl: 'http://qcimg01.glsx.net:7060/group1/M00/00/40/wKgD3mF5BJiAAWQgAABFn4xd9nI261.jpg',
roomId: 37,
liveStatus: 102
}
]
}
},
methods: {
subscribe(child) {
child.call('push', { src: this.src })
child.on('route-to', params => {
this.$history.push(params)
})
},
click() {
this.visible = true
}
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>