Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
live
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fb24907a
authored
Nov 29, 2022
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
1e938621
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
248 additions
and
81 deletions
src/api/modules/console.js
src/components/big-view/index.vue
src/setup/qiankun.js
src/utils/index.js
src/views/liveList/components/record.vue
src/views/liveList/console.vue
src/views/liveList/index.vue
src/views/shortVideo/index.vue
src/views/shortVideo/uploadVideo.vue
src/api/modules/console.js
View file @
fb24907
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-24 16:20:21
* @Date: 2022-11-24 16:20:21
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-2
5 09:32:28
* @LastEditTime: 2022-11-2
9 10:23:34
* @FilePath: \live\src\api\modules\console.js
* @FilePath: \live\src\api\modules\console.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -27,6 +27,16 @@ const detailexport = params => {
...
@@ -27,6 +27,16 @@ const detailexport = params => {
sign
:
true
sign
:
true
})
})
}
}
//流量数据-详情列表导出
const
consoleExport
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.livebroadcast.console.export`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
//流量数据-详情列表查询(分页)
//流量数据-详情列表查询(分页)
const
detailpage
=
params
=>
{
const
detailpage
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.livebroadcast.console.detailpage`
params
.
method
=
`scrm.api.shopmall.livebroadcast.console.detailpage`
...
@@ -62,5 +72,6 @@ export default {
...
@@ -62,5 +72,6 @@ export default {
consolePage
,
consolePage
,
consoleInfo
,
consoleInfo
,
detailpage
,
detailpage
,
detailexport
detailexport
,
consoleExport
}
}
src/components/big-view/index.vue
0 → 100644
View file @
fb24907
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-28 10:12:36
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-28 10:25:09
* @FilePath: \live\src\components\big-view\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div
class=
"view-panel"
>
<img
:src=
"dialogSrc"
width=
"100%"
v-if=
"dialogType == 'img'"
/>
<video
width=
"100%"
autoplay
controls
:src=
"dialogSrc"
v-else
></video>
</div>
</
template
>
<
script
>
export
default
{
name
:
'view'
,
data
()
{
return
{
dialogVisibleImg
:
true
}
},
props
:
{
dialogType
:
String
,
dialogSrc
:
String
},
methods
:
{
test
()
{
console
.
log
(
'点击了按钮'
)
this
.
$messenger
.
send
({
message
:
{
from
:
11
,
message
:
'11111'
}
})
}
}
}
</
script
>
src/setup/qiankun.js
View file @
fb24907
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-29 10:19:37
* @FilePath: \live\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
Vue
from
'vue'
import
Vue
from
'vue'
import
{
message
,
messageBox
}
from
'@/plugins/element.js'
import
{
message
,
messageBox
}
from
'@/plugins/element.js'
import
{
fetchConfig
}
from
'@/config'
import
{
fetchConfig
}
from
'@/config'
...
@@ -19,7 +27,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
...
@@ -19,7 +27,7 @@ export async function bootstrap({ history, common, messenger, globalState }) {
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'scrm-base-f90349f8-701a-47a4-858c-85792bb91e09-rop'
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue
.
use
(
GLButton
,
{
permissions
:
globalState
.
permissions
||
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
Vue
.
use
(
GLButton
,
{
permissions
:
globalState
.
permissions
||
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
...
...
src/utils/index.js
View file @
fb24907
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49
* @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-2
5 13:48:47
* @LastEditTime: 2022-11-2
8 11:18:50
* @FilePath: \live\src\utils\index.js
* @FilePath: \live\src\utils\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -38,3 +38,21 @@ export function downloadUrl(url) {
...
@@ -38,3 +38,21 @@ export function downloadUrl(url) {
link
.
click
()
link
.
click
()
document
.
body
.
removeChild
(
link
)
document
.
body
.
removeChild
(
link
)
}
}
export
function
GetDateDiff
(
time1
,
time2
=
new
Date
())
{
let
startTime
=
new
Date
(
time1
)
//开始时间
let
endTime
=
time2
//结束时间
let
date
=
endTime
.
getTime
()
-
startTime
.
getTime
()
//时间差秒
//计算出相差天数
let
days
=
Math
.
floor
(
date
/
(
24
*
3600
*
1000
))
//计算出小时数
let
leave1
=
date
%
(
24
*
3600
*
1000
)
//计算天数后剩余的毫秒数
let
hours
=
Math
.
floor
(
leave1
/
(
3600
*
1000
))
//计算相差分钟数
let
leave2
=
leave1
%
(
3600
*
1000
)
//计算小时数后剩余的毫秒数
let
minutes
=
Math
.
floor
(
leave2
/
(
60
*
1000
))
//计算相差秒数
let
leave3
=
leave2
%
(
60
*
1000
)
//计算分钟数后剩余的毫秒数
let
seconds
=
Math
.
round
(
leave3
/
1000
)
return
days
+
'天'
+
hours
+
'时'
+
minutes
+
'分'
+
seconds
+
'秒'
}
src/views/liveList/components/record.vue
View file @
fb24907
...
@@ -3,8 +3,12 @@
...
@@ -3,8 +3,12 @@
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<div
class=
"live-table-header"
>
<div
class=
"live-table-header"
>
<h2>
短视频列表
</h2>
<h2>
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
@
click=
"detailexport"
>
导出
</el-button>
已累计
<label>
{{
roomNum
}}
</label>
人观看
</h2>
<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=
"status"
slot-scope=
"scope"
>
<div
slot=
"status"
slot-scope=
"scope"
>
...
@@ -20,14 +24,18 @@ import url from '@/assets/empty.png'
...
@@ -20,14 +24,18 @@ import url from '@/assets/empty.png'
import
{
downloadUrl
}
from
'@/utils'
import
{
downloadUrl
}
from
'@/utils'
export
default
{
export
default
{
name
:
'LiveIndex'
,
name
:
'LiveIndex'
,
props
:
{
visitSource
:
String
,
roomNum
:
Number
},
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
size
:
'small'
,
url
:
url
,
url
:
url
,
searchForm
:
{
searchForm
:
{
term
:
''
,
nickname
:
''
,
status
:
''
phone
:
''
,
visitSource
:
''
},
},
tableSearchForm
:
{},
tableSearchForm
:
{},
// 搜索
// 搜索
...
@@ -52,7 +60,7 @@ export default {
...
@@ -52,7 +60,7 @@ export default {
}
}
],
],
// 表格
// 表格
getListApi
:
this
.
$apis
.
live
.
getListApi
,
getListApi
:
this
.
$apis
.
console
.
detailpage
,
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableColumns
:
[
tableColumns
:
[
...
@@ -74,18 +82,16 @@ export default {
...
@@ -74,18 +82,16 @@ export default {
},
},
{
{
label
:
'是否观看'
,
label
:
'是否观看'
,
prop
:
'status'
,
prop
:
'status'
addHtml
:
'status'
},
},
{
{
label
:
'观看时长'
,
label
:
'观看时长'
,
prop
:
'visitDuration'
,
prop
:
'visitDuration'
addHtml
:
'status'
},
},
{
{
label
:
'最后浏览'
,
label
:
'最后浏览'
,
prop
:
'lastVisitTime'
,
prop
:
'lastVisitTime'
,
addHtml
:
'status'
width
:
200
}
}
]
]
},
},
...
@@ -97,12 +103,18 @@ export default {
...
@@ -97,12 +103,18 @@ export default {
methods
:
{
methods
:
{
detailexport
()
{
detailexport
()
{
this
.
$apis
.
console
.
detailexport
({}).
then
(
res
=>
{
const
getParams
=
Object
.
assign
(
this
.
getParams
(),
{
downloadUrl
(
res
)
pageSize
:
1000000
,
currentPage
:
1
})
this
.
$apis
.
console
.
detailexport
(
getParams
).
then
(
res
=>
{
res
&&
downloadUrl
(
res
)
})
})
},
},
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
.
visitSource
=
this
.
visitSource
return
params
return
params
},
},
beforeSearchFn
()
{
beforeSearchFn
()
{
...
@@ -121,10 +133,7 @@ export default {
...
@@ -121,10 +133,7 @@ export default {
},
},
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{}
classifyName
:
''
,
createDate
:
[]
}
this
.
handleSearch
()
this
.
handleSearch
()
}
}
}
}
...
@@ -141,7 +150,13 @@ export default {
...
@@ -141,7 +150,13 @@ export default {
.live-table-header
{
.live-table-header
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
margin-bottom
:
20px
;
align-items
:
center
;
margin-bottom
:
10px
;
color
:
#333333
;
font-size
:
16px
;
label
{
color
:
#5850ff
;
}
}
}
}
}
</
style
>
</
style
>
src/views/liveList/console.vue
View file @
fb24907
...
@@ -3,12 +3,14 @@
...
@@ -3,12 +3,14 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"look-container"
>
<div
class=
"look-container"
>
<div
class=
"look-left"
>
<div
class=
"look-left"
>
<div
class=
"look-left-b"
></div>
<div
class=
"look-left-b"
>
<img
:src=
"room.liveVideoCover"
/>
</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>
<div
class=
"look-desc"
>
开播时间:
{{
room
.
startTimeStr
}}
</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"
>
直播已结束
{{
room
.
na
me
}}
</div>
<div
class=
"look-status"
>
直播已结束
{{
endTi
me
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"look-right"
>
<div
class=
"look-right"
>
...
@@ -35,22 +37,22 @@
...
@@ -35,22 +37,22 @@
</div>
</div>
<div
class=
"data-desc"
>
<div
class=
"data-desc"
>
<span>
峰值在线人数
</span>
<span>
峰值在线人数
</span>
<span>
{{
base
.
visitPeakOnlineValue
}}
</span>
<span>
{{
base
Info
.
visitPeakOnlineValue
}}
</span>
</div>
</div>
<div
class=
"data-desc"
>
<div
class=
"data-desc"
>
<span>
观看人数
</span>
<span>
观看人数
</span>
<span>
{{
base
.
visitNumberOfPeople
}}
</span>
<span>
{{
base
Info
.
visitNumberOfPeople
}}
</span>
</div>
</div>
<div
class=
"data-desc data-desc-jump"
>
<div
class=
"data-desc data-desc-jump"
>
<span>
观看次数
</span>
<span>
观看次数
</span>
<span>
<span>
{{
base
.
visitNumberOfTimes
}}
{{
base
Info
.
visitNumberOfTimes
}}
<a
@
click=
"handleLook"
>
查看
</a>
<a
@
click=
"handleLook"
>
查看
</a>
</span>
</span>
</div>
</div>
<div
class=
"data-desc"
>
<div
class=
"data-desc"
>
<span>
平均观看时长
</span>
<span>
平均观看时长
</span>
<span>
{{
base
.
visitAverageTime
}}
</span>
<span>
{{
base
Info
.
visitAverageTime
}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"data-container-right"
>
<div
class=
"data-container-right"
>
...
@@ -60,11 +62,11 @@
...
@@ -60,11 +62,11 @@
</div>
</div>
<div
class=
"data-desc"
>
<div
class=
"data-desc"
>
<span>
评论人数
</span>
<span>
评论人数
</span>
<span>
{{
base
.
interactNumberOfPeople
}}
</span>
<span>
{{
base
Info
.
interactNumberOfPeople
}}
</span>
</div>
</div>
<div
class=
"data-desc"
>
<div
class=
"data-desc"
>
<span>
评论次数
</span>
<span>
评论次数
</span>
<span>
{{
base
.
interactNumberOfTimes
}}
</span>
<span>
{{
base
Info
.
interactNumberOfTimes
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -75,17 +77,17 @@
...
@@ -75,17 +77,17 @@
<div
class=
"container-tabel"
>
<div
class=
"container-tabel"
>
<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=
"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"
>
<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=
"提示
"
:hasFooter=
"false"
:visible
.
sync=
"dialogVisible"
mode=
"big"
>
<GLDialog
width=
"1158px"
:bigTitle=
"room.name
"
:hasFooter=
"false"
:visible
.
sync=
"dialogVisible"
mode=
"big"
>
<record
ref=
"recordForm"
></record>
<record
ref=
"recordForm"
v-if=
"dialogVisible"
:visitSource=
"visitSource"
:roomNum=
"roomNum"
></record>
</GLDialog>
</GLDialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -93,6 +95,7 @@
...
@@ -93,6 +95,7 @@
<
script
>
<
script
>
import
url
from
'@/assets/empty.png'
import
url
from
'@/assets/empty.png'
import
record
from
'./components/record.vue'
import
record
from
'./components/record.vue'
import
{
downloadUrl
,
GetDateDiff
}
from
'@/utils'
export
default
{
export
default
{
name
:
'LiveIndex'
,
name
:
'LiveIndex'
,
components
:
{
components
:
{
...
@@ -100,20 +103,21 @@ export default {
...
@@ -100,20 +103,21 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
roomNum
:
0
,
roomId
:
''
,
endTime
:
''
,
dialogVisible
:
false
,
dialogVisible
:
false
,
visitSource
:
''
,
dialogObj
:
{
dialogObj
:
{
show
:
false
show
:
false
},
},
size
:
'small'
,
size
:
'small'
,
url
:
url
,
url
:
url
,
base
:
{},
base
Info
:
{},
room
:
{},
room
:
{},
searchForm
:
{
tableSearchForm
:
{
id
:
''
},
term
:
''
,
status
:
''
},
// 表格
// 表格
getListApi
:
this
.
$apis
.
live
.
getListApi
,
getListApi
:
this
.
$apis
.
console
.
consolePage
,
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
true
,
tableOption
:
true
,
...
@@ -139,29 +143,62 @@ export default {
...
@@ -139,29 +143,62 @@ export default {
attrs
:
{
attrs
:
{
type
:
'text'
type
:
'text'
},
},
condition
:
row
=>
{
return
row
.
status
==
0
},
listeners
:
{
listeners
:
{
click
:
row
=>
{
click
:
row
=>
{
this
.
$apis
.
live
.
LiveRoomDetailApi
({
id
:
row
.
id
}).
then
(
res
=>
{
this
.
handleLook
(
row
)
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
res
)))
this
.
liveDetail
=
res
this
.
pageClick
()
})
}
}
}
}
}
}
],
],
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'
currentPage
'
,
totalCount
:
'total'
}
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'
pageNum
'
,
totalCount
:
'total'
}
}
}
},
},
mounted
()
{},
created
()
{
this
.
roomId
=
this
.
$route
.
query
.
id
this
.
consoleBasic
(
this
.
roomId
)
this
.
consoleInfo
(
this
.
roomId
)
},
beforeDestroy
()
{
clearInterval
(
this
.
timer
)
},
computed
:
{
getBetween
()
{
const
startTimeStr
=
this
.
room
.
startTimeStr
const
endTimeStr
=
this
.
room
.
endTimeStr
if
(
!
startTimeStr
)
return
const
[
y1
,
d1
]
=
startTimeStr
.
split
(
' '
)
const
[
y2
,
d2
]
=
endTimeStr
.
split
(
' '
)
if
(
y1
==
y2
)
{
return
y1
+
' '
+
d1
.
substring
(
0
,
5
)
+
'-'
+
d2
.
substring
(
0
,
5
)
}
else
{
return
y1
+
' '
+
d1
.
substring
(
0
,
5
)
+
'-'
+
y2
+
' '
+
d2
.
substring
(
0
,
5
)
}
}
},
methods
:
{
methods
:
{
//时间差
getTime
()
{
this
.
endTime
=
GetDateDiff
(
this
.
room
.
endTimeStr
)
},
handleLook
(
row
)
{
this
.
visitSource
=
row
.
visitSource
this
.
roomNum
=
row
.
totalVisitCnt
?
row
.
totalVisitCnt
:
this
.
baseInfo
.
visitNumberOfTimes
this
.
dialogVisible
=
true
},
consoleBasic
(
id
)
{
this
.
$apis
.
console
.
consoleBasic
({
id
}).
then
(
res
=>
{
this
.
baseInfo
=
res
||
{}
})
},
consoleInfo
(
id
)
{
this
.
$apis
.
console
.
consoleInfo
({
id
}).
then
(
res
=>
{
this
.
room
=
res
||
{}
this
.
timer
=
setInterval
(
this
.
getTime
,
1000
)
})
},
detailexport
()
{
detailexport
()
{
this
.
$apis
.
console
.
detailexport
({
}).
then
(
res
=>
{
this
.
$apis
.
console
.
consoleExport
({
id
:
this
.
roomId
,
currentPage
:
1
,
pageSize
:
100000
}).
then
(
res
=>
{
downloadUrl
(
res
)
downloadUrl
(
res
)
})
})
},
},
...
@@ -174,25 +211,13 @@ export default {
...
@@ -174,25 +211,13 @@ export default {
},
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
this
.
tableSearchForm
.
id
=
this
.
roomId
resolve
()
resolve
()
})
})
},
},
setTableFinishFun
()
{
setTableFinishFun
()
{
//接收到的数据为空
//接收到的数据为空
this
.
$refs
.
classifyRef
.
data
.
length
?
(
this
.
$refs
.
classifyRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
classifyRef
.
setTableHeightFun
()
this
.
$refs
.
classifyRef
.
data
.
length
?
(
this
.
$refs
.
classifyRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
classifyRef
.
setTableHeightFun
()
},
handleSearch
()
{
this
.
$refs
.
classifyRef
.
refreshTable
()
},
handleReset
()
{
this
.
searchForm
=
{
classifyName
:
''
,
createDate
:
[]
}
this
.
handleSearch
()
}
}
}
}
}
}
...
@@ -230,8 +255,10 @@ export default {
...
@@ -230,8 +255,10 @@ export default {
.look-left
{
.look-left
{
display
:
flex
;
display
:
flex
;
.look-left-b
{
.look-left-b
{
width
:
260px
;
img
{
height
:
170px
;
width
:
260px
;
height
:
170px
;
}
}
}
.look-left-content
{
.look-left-content
{
margin-left
:
20px
;
margin-left
:
20px
;
...
...
src/views/liveList/index.vue
View file @
fb24907
This diff is collapsed.
Click to expand it.
src/views/shortVideo/index.vue
View file @
fb24907
...
@@ -12,13 +12,22 @@
...
@@ -12,13 +12,22 @@
</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"
>
<span
:class=
"['table-circle', scope.scope.status == 1 ? 'back-
blue
' : 'back-grey']"
></span>
<span
:class=
"['table-circle', scope.scope.status == 1 ? 'back-
green
' : 'back-grey']"
></span>
<span>
{{
scope
.
scope
.
statusStr
||
'--'
}}
</span>
<span>
{{
scope
.
scope
.
statusStr
||
'--'
}}
</span>
</div>
</div>
<div
slot=
"coverUrl"
slot-scope=
"scope"
>
<div
class=
"image-popover"
@
click=
"handleLook(scope.scope)"
>
<img
:src=
"scope.scope.coverUrl"
/>
</div>
</div>
<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=
"3"
></GLTableButton>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</div>
</div>
</GLTable>
</GLTable>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
width=
"30%"
>
<big-view
ref=
"viewForm"
v-if=
"dialogVisibleImg"
:dialogSrc=
"dialogSrc"
:dialogType=
"dialogType"
></big-view>
</el-dialog>
<GLDialog
title=
"提示"
@
onOk=
"handleSure"
@
onCancel=
"dialogVisibleDel = false"
type=
"error"
content=
"是否确认删除短视频?"
:visible
.
sync=
"dialogVisibleDel"
mode=
"small"
></GLDialog>
<GLDialog
title=
"提示"
@
onOk=
"handleSure"
@
onCancel=
"dialogVisibleDel = false"
type=
"error"
content=
"是否确认删除短视频?"
:visible
.
sync=
"dialogVisibleDel"
mode=
"small"
></GLDialog>
</div>
</div>
</div>
</div>
...
@@ -26,13 +35,17 @@
...
@@ -26,13 +35,17 @@
<
script
>
<
script
>
import
url
from
'@/assets/empty.png'
import
url
from
'@/assets/empty.png'
import
bigView
from
'@/components/big-view'
export
default
{
export
default
{
name
:
'LiveIndex'
,
name
:
'LiveIndex'
,
components
:
{
bigView
},
data
()
{
data
()
{
return
{
return
{
dialogVisibleDel
:
false
,
dialogVisibleDel
:
false
,
dialogVisibleImg
:
false
,
dialogType
:
''
,
selectItem
:
''
,
selectItem
:
''
,
size
:
'small'
,
size
:
'small'
,
url
:
url
,
url
:
url
,
...
@@ -47,6 +60,7 @@ export default {
...
@@ -47,6 +60,7 @@ export default {
label
:
''
,
label
:
''
,
name
:
'term'
,
name
:
'term'
,
type
:
'input'
,
type
:
'input'
,
placeholder
:
'请输入关键字'
,
maxlength
:
20
maxlength
:
20
},
},
{
{
...
@@ -72,7 +86,7 @@ export default {
...
@@ -72,7 +86,7 @@ export default {
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'编号'
,
label
:
'编号'
,
prop
:
'
roomNumber
'
prop
:
'
fileId
'
},
},
{
{
label
:
'视频名称'
,
label
:
'视频名称'
,
...
@@ -104,6 +118,14 @@ export default {
...
@@ -104,6 +118,14 @@ export default {
name
:
'预览'
,
name
:
'预览'
,
attrs
:
{
attrs
:
{
type
:
'text'
type
:
'text'
},
condition
:
row
=>
{
return
row
.
status
==
1
},
listeners
:
{
click
:
row
=>
{
this
.
handleView
(
row
)
}
}
}
},
},
{
{
...
@@ -112,6 +134,9 @@ export default {
...
@@ -112,6 +134,9 @@ export default {
attrs
:
{
attrs
:
{
type
:
'text'
type
:
'text'
},
},
condition
:
row
=>
{
return
row
.
status
==
2
||
row
.
status
==
0
},
listeners
:
{
listeners
:
{
click
:
row
=>
{
click
:
row
=>
{
this
.
$router
.
push
(
`/shortVideo/uploadVideo?id=
${
row
.
id
}
`
)
this
.
$router
.
push
(
`/shortVideo/uploadVideo?id=
${
row
.
id
}
`
)
...
@@ -125,7 +150,7 @@ export default {
...
@@ -125,7 +150,7 @@ export default {
type
:
'text'
type
:
'text'
},
},
condition
:
row
=>
{
condition
:
row
=>
{
return
row
.
status
==
0
return
row
.
status
==
0
||
row
.
status
==
1
},
},
listeners
:
{
listeners
:
{
click
:
row
=>
{
click
:
row
=>
{
...
@@ -148,7 +173,16 @@ export default {
...
@@ -148,7 +173,16 @@ export default {
pageClick
()
{
pageClick
()
{
this
.
$router
.
push
(
`/shortVideo/uploadVideo`
)
this
.
$router
.
push
(
`/shortVideo/uploadVideo`
)
},
},
handleView
(
row
)
{
this
.
dialogType
=
'video'
this
.
dialogVisibleImg
=
true
this
.
dialogSrc
=
row
.
mediaUrl
},
handleLook
(
row
)
{
this
.
dialogType
=
'img'
this
.
dialogVisibleImg
=
true
this
.
dialogSrc
=
row
.
coverUrl
},
handleSure
()
{
handleSure
()
{
const
{
id
}
=
this
.
selectItem
const
{
id
}
=
this
.
selectItem
this
.
$apis
.
shortVideo
this
.
$apis
.
shortVideo
...
@@ -208,4 +242,14 @@ export default {
...
@@ -208,4 +242,14 @@ export default {
color
:
#333333
;
color
:
#333333
;
}
}
}
}
.table-circle
{
margin-right
:
5px
;
}
.image-popover
{
cursor
:
pointer
;
img
{
width
:
36px
;
height
:
36px
;
}
}
</
style
>
</
style
>
src/views/shortVideo/uploadVideo.vue
View file @
fb24907
...
@@ -53,9 +53,8 @@
...
@@ -53,9 +53,8 @@
取消
取消
</el-button>
</el-button>
</div>
</div>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
width=
"50%"
>
<el-dialog
class=
"image-dialog"
:visible
.
sync=
"dialogVisibleImg"
width=
"30%"
>
<img
:src=
"dialogSrc"
width=
"100%"
v-if=
"dialogType == 'img'"
/>
<big-view
ref=
"viewForm"
v-if=
"dialogVisibleImg"
:dialogSrc=
"dialogSrc"
:dialogType=
"dialogType"
></big-view>
<video
width=
"100%"
autoplay
controls
:src=
"dialogSrc"
v-else
></video>
</el-dialog>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -64,9 +63,13 @@
...
@@ -64,9 +63,13 @@
import
upload
from
'@/api/uploadApi'
import
upload
from
'@/api/uploadApi'
import
uploadMixin
from
'@/mixins/upload'
import
uploadMixin
from
'@/mixins/upload'
// const upload = new GlsxUpload({ baseURL: 'http://scrm.dev.glsx.com.cn' })
// const upload = new GlsxUpload({ baseURL: 'http://scrm.dev.glsx.com.cn' })
import
bigView
from
'@/components/big-view'
export
default
{
export
default
{
name
:
'uploadVideo'
,
name
:
'uploadVideo'
,
mixins
:
[
uploadMixin
],
mixins
:
[
uploadMixin
],
components
:
{
bigView
},
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
size
:
'small'
,
...
@@ -105,7 +108,6 @@ export default {
...
@@ -105,7 +108,6 @@ export default {
upload
upload
.
uploaded
(
file
)
.
uploaded
(
file
)
.
then
(
res
=>
{
.
then
(
res
=>
{
self
.
loading
=
false
self
.
$refs
[
'uploadForm'
].
clearValidate
(
'mediaUrl'
)
self
.
$refs
[
'uploadForm'
].
clearValidate
(
'mediaUrl'
)
const
videoUrl
=
res
.
video
.
url
const
videoUrl
=
res
.
video
.
url
self
.
$set
(
self
.
uploadForm
,
'mediaUrl'
,
videoUrl
)
self
.
$set
(
self
.
uploadForm
,
'mediaUrl'
,
videoUrl
)
...
@@ -114,6 +116,7 @@ export default {
...
@@ -114,6 +116,7 @@ export default {
self
.
$set
(
self
.
uploadForm
,
'coverUrl'
,
res
)
self
.
$set
(
self
.
uploadForm
,
'coverUrl'
,
res
)
})
})
})
})
self
.
loading
=
false
})
})
.
finally
(
end
=>
{
.
finally
(
end
=>
{
console
.
log
(
end
)
console
.
log
(
end
)
...
@@ -144,15 +147,21 @@ export default {
...
@@ -144,15 +147,21 @@ export default {
handleUp
()
{
handleUp
()
{
this
.
$refs
[
'uploadForm'
].
validate
(
valid
=>
{
this
.
$refs
[
'uploadForm'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
$apis
.
shortVideo
.
tencentcloudmediaUpdate
().
then
(
res
=>
{
this
.
$apis
.
shortVideo
.
tencentcloudmediaUpdate
(
this
.
uploadForm
).
then
(
res
=>
{
this
.
$set
(
this
.
uploadForm
,
'coverUrl'
,
res
)
if
(
res
)
{
this
.
$router
.
push
(
'/shortVideo/index'
)
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
})
}
})
})
}
}
})
})
},
},
mediaDetail
()
{
mediaDetail
()
{
const
{
id
}
=
this
.
uploadForm
const
{
id
}
=
this
.
uploadForm
this
.
$apis
.
shortVideo
.
tencentcloudmediaDetail
(
id
).
then
(
res
=>
{
this
.
$apis
.
shortVideo
.
tencentcloudmediaDetail
(
{
id
}
).
then
(
res
=>
{
this
.
uploadForm
=
res
this
.
uploadForm
=
res
})
})
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment