|
@@ -6,7 +6,6 @@
|
|
|
<title>远程巡店</title>
|
|
|
<script src="js/vue@2.6.11"></script>
|
|
|
<script src="js/uni.webview.1.5.2.js"></script>
|
|
|
-<script src="js/axios.min.js"></script>
|
|
|
<!-- antd ui -->
|
|
|
<script type="text/javascript" charset="utf-8" src="js/moment.min.js"></script>
|
|
|
<script type="text/javascript" charset="utf-8" src="js/moment-with-locales.min.js"></script>
|
|
@@ -46,15 +45,11 @@
|
|
|
<div></div>
|
|
|
<div>
|
|
|
<a-dropdown>
|
|
|
- <a-menu slot="overlay">
|
|
|
- <a-menu-item key="1"> 收银台 </a-menu-item>
|
|
|
- <a-menu-item key="2"> 接车区 </a-menu-item>
|
|
|
- <a-menu-item key="3"> 洗车工位 </a-menu-item>
|
|
|
- <a-menu-item key="4"> 维修工位 </a-menu-item>
|
|
|
- <a-menu-item key="5"> 客户休息区 </a-menu-item>
|
|
|
+ <a-menu selectable slot="overlay" @click="onVideoListClick">
|
|
|
+ <a-menu-item v-for="item in videoList" :key="item.id"> {{item.name}} </a-menu-item>
|
|
|
</a-menu>
|
|
|
<a class="ant-dropdown-link" @click="e => e.preventDefault()">
|
|
|
- 收银台 <a-icon type="down" />
|
|
|
+ {{curVideo&&curVideo.name}} <a-icon type="down" />
|
|
|
</a>
|
|
|
</a-dropdown>
|
|
|
</div>
|
|
@@ -196,6 +191,8 @@
|
|
|
data: {
|
|
|
xdType:'video', // 巡店类型
|
|
|
player: null, // 播放器对象
|
|
|
+ videoList: [], // 播放通道
|
|
|
+ curVideo: null, // 当前播放的视频
|
|
|
showYt: false, // 显示云台控制
|
|
|
showYtbtns: false,
|
|
|
showPz: false,// 显示拍照弹框
|
|
@@ -219,7 +216,6 @@
|
|
|
mounted () {
|
|
|
let _this = this
|
|
|
moment.locale('zh-cn');
|
|
|
- this.videoInit()
|
|
|
// 耗时计算
|
|
|
this.hsID = setInterval(function(){
|
|
|
_this.haoshi()
|
|
@@ -238,11 +234,17 @@
|
|
|
this.isDelItem = false
|
|
|
this.showPz = false
|
|
|
},
|
|
|
- // 设置类型
|
|
|
+ // 设置巡店类型
|
|
|
setTyps(type){
|
|
|
console.log(type)
|
|
|
this.xdType = type
|
|
|
},
|
|
|
+ // 设置视频列表
|
|
|
+ setVideoList(data){
|
|
|
+ this.videoList = JSON.parse(data)
|
|
|
+ this.curVideo = this.videoList[0]
|
|
|
+ this.videoInit()
|
|
|
+ },
|
|
|
// 获取任务详情
|
|
|
getTaskDetail(data){
|
|
|
this.kptj = JSON.parse(data)
|
|
@@ -253,15 +255,28 @@
|
|
|
this.kpItem = JSON.parse(data)
|
|
|
this.zbItem = this.kpItem[this.activeIndex].taskTargetVOList
|
|
|
},
|
|
|
+ // 选择机位
|
|
|
+ onVideoListClick({ key }){
|
|
|
+ let v = this.videoList.find(item=>item.id == key)
|
|
|
+ if(v){
|
|
|
+ this.curVideo = v
|
|
|
+ // 重置播放器
|
|
|
+ this.showYt = false
|
|
|
+ this.showYtbtns = false
|
|
|
+ this.player.dispose()
|
|
|
+ this.videoInit()
|
|
|
+ }
|
|
|
+ },
|
|
|
// 初始化播放器
|
|
|
videoInit(){
|
|
|
- const _this = this
|
|
|
// 设置标题
|
|
|
document.title = '远程巡店'
|
|
|
+ const _this = this
|
|
|
+ const videoSrc = this.curVideo.videoSrc
|
|
|
// 初始化播放器
|
|
|
_this.player = new Aliplayer({
|
|
|
'id': 'player-con',
|
|
|
- 'source': 'https://player.alicdn.com/video/aliyunmedia.mp4',
|
|
|
+ 'source': videoSrc,
|
|
|
'width': '100%',
|
|
|
'height': '240px',
|
|
|
'autoplay': false,
|