Commit f661c303 authored by xinzhedeai's avatar xinzhedeai

视频监控菜单样式

parent aa566217
...@@ -107,8 +107,9 @@ section .list-item span { ...@@ -107,8 +107,9 @@ section .list-item span {
section .list-item .el-icon-caret-right:before { section .list-item .el-icon-caret-right:before {
content: "\e791"; content: "\e791";
color: #a5a4a4; color: #0a4c59;
font-size: 18px; font-size: 24px;
vertical-align: middle;
} }
/*列表list*/ /*列表list*/
......
...@@ -44,10 +44,11 @@ let jessibucaPlayer = {}; ...@@ -44,10 +44,11 @@ let jessibucaPlayer = {};
request.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; request.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
var gemhoUtil = { var gemhoUtil = {
goToPage: function(url){ // goToPage: function(url){
// window.open(url) // // window.open(url)
location.href = url // // location.href = '/datav/index.html'
}, // // window.open('/datav/index.html')
// },
detailPageMixin: { detailPageMixin: {
data: function() { data: function() {
...@@ -83,7 +84,11 @@ var gemhoUtil = { ...@@ -83,7 +84,11 @@ var gemhoUtil = {
}, },
methods: { methods: {
goPrePage(url) { goPrePage(url) {
history.back() // history.back()
if(url === 'emergency'){
window.open('/datav/index.html')
}
}, },
changeMenu(item) { changeMenu(item) {
localStorage.setItem('bigScreenDetailMenu', item.name) localStorage.setItem('bigScreenDetailMenu', item.name)
......
...@@ -22,12 +22,15 @@ ...@@ -22,12 +22,15 @@
.amap-logo { .amap-logo {
z-index: -10; z-index: -10;
} }
.amap-copyright{
.amap-copyright {
z-index: -10; z-index: -10;
} }
.el-autocomplete-suggestion{
.el-autocomplete-suggestion {
width: 330px !important; width: 330px !important;
} }
.buttons-box { .buttons-box {
width: 100%; width: 100%;
height: 28px; height: 28px;
...@@ -57,7 +60,6 @@ ...@@ -57,7 +60,6 @@
position: absolute; position: absolute;
right: 0; right: 0;
} }
</style> </style>
</head> </head>
...@@ -98,7 +100,8 @@ ...@@ -98,7 +100,8 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.emergency.menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}"> <li v-for="(item, index) in menuObj.emergency.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
...@@ -106,8 +109,20 @@ ...@@ -106,8 +109,20 @@
</div> </div>
<!-- 视频监控列表 --> <!-- 视频监控列表 -->
<div class="relative mt20" style="width: 490px;height: calc(100vh - 170px);"> <div class="relative mt20" style="width: 490px;height: calc(100vh - 170px);">
<section>
<div class="list-wrapper" v-show="showMenu4bianpo">
<div class="list-item" :class="{active: item.cid===currentSensorId}"
v-for="(item, index) in sensorLIst" @click="changeSensor(item,index)"><i
class="el-icon-caret-right"></i><span>{{item.name}}</span></div>
</div>
</section>
</div>
<!-- 视频监控列表 -->
<!-- <div class="relative mt20" style="width: 490px;height: calc(100vh - 170px);">
<div class="relative"> <div class="relative">
<img class="wp100" style="height: 52px;" src="../static/sub-title-1.png" alt=""> <img class="wp100" style="height: 52px;" src="../static/sub-title-1.png" alt="">
<div class="poa-cover"> <div class="poa-cover">
...@@ -120,7 +135,6 @@ ...@@ -120,7 +135,6 @@
style="background: linear-gradient(to bottom, rgba(171,238,255,0), rgba(171,238,255,.2));border-bottom: 1px solid rgba(171,238,255,.5);" style="background: linear-gradient(to bottom, rgba(171,238,255,0), rgba(171,238,255,.2));border-bottom: 1px solid rgba(171,238,255,.5);"
v-for="(item,index) in videos" :key="" index @click="chickVideo(item,index)"> v-for="(item,index) in videos" :key="" index @click="chickVideo(item,index)">
<div class="flex-1 flex-text ml10 mr10 ovh"> <div class="flex-1 flex-text ml10 mr10 ovh">
<!-- <div>{{ (index + 1) < 10 ? '0' + (index + 1) : index + 1 }}</div> -->
<img style="width: 14px;height: 16px;" src="../static/play-icon.png" alt="" <img style="width: 14px;height: 16px;" src="../static/play-icon.png" alt=""
v-if="index == TabCur"> v-if="index == TabCur">
<div class="flex-1 ml25 mr25 ellipsis">{{ item.name }}</div> <div class="flex-1 ml25 mr25 ellipsis">{{ item.name }}</div>
...@@ -130,7 +144,7 @@ ...@@ -130,7 +144,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="flex-1 ml15 flex-text flex-column ovh" style="height: calc(100vh - 110px);"> <div class="flex-1 ml15 flex-text flex-column ovh" style="height: calc(100vh - 110px);">
...@@ -235,6 +249,10 @@ ...@@ -235,6 +249,10 @@
mixins: [gemhoUtil.detailPageMixin], mixins: [gemhoUtil.detailPageMixin],
data() { data() {
return { return {
showMenu4bianpo: true,
sensorLIst: [],
currentSensorId: '',
// video // video
aiWarnCount: 0, aiWarnCount: 0,
videoUrl: null, videoUrl: null,
...@@ -278,6 +296,18 @@ ...@@ -278,6 +296,18 @@
mounted() { mounted() {
this.getData(); this.getData();
this.getSensorList(() => {
});
},
methods: {
changeSensor(item, index) {
this.currentSensorId = item.cid
this.chickVideo(item, index)
},
getSensorList(fn) {
// 视频列表 // 视频列表
Axiosx.get(host + '/api/video-mine/mineId', { Axiosx.get(host + '/api/video-mine/mineId', {
params: { params: {
...@@ -287,15 +317,17 @@ ...@@ -287,15 +317,17 @@
}).then(res => { }).then(res => {
res = res.data.body; res = res.data.body;
this.info = { this.info = {
appKey:res.appKey, appKey: res.appKey,
appSecret:res.appSecret, appSecret: res.appSecret,
}; };
this.videos = res.videoChannelList || []; this.sensorLIst = res.videoChannelList || [];
if (this.sensorLIst.length) {
this.currentSensorId = this.sensorLIst[0].cid
this.createVideo(res.videoChannelList[0]); this.createVideo(res.videoChannelList[0]);
}
}); });
}, },
methods: { createVideo: function (item) {
createVideo: function(item){
this.getAccessToken(this.info.appKey, this.info.appSecret).then(accessToken => { this.getAccessToken(this.info.appKey, this.info.appSecret).then(accessToken => {
var url = this.getUrl(item); var url = this.getUrl(item);
...@@ -305,7 +337,7 @@ ...@@ -305,7 +337,7 @@
this.player = new EZUIKit.EZUIKitPlayer({ this.player = new EZUIKit.EZUIKitPlayer({
autoplay: true, autoplay: true,
id: "video-container", id: "video-container",
accessToken:accessToken, accessToken: accessToken,
url: url, url: url,
template: "standard", // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版; template: "standard", // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
// 视频上方头部控件 // 视频上方头部控件
...@@ -325,24 +357,24 @@ ...@@ -325,24 +357,24 @@
}) })
}, },
getAccessToken(appKey, appSecret){ getAccessToken(appKey, appSecret) {
var dataJson = 'appKey='+appKey+'&appSecret='+appSecret; var dataJson = 'appKey=' + appKey + '&appSecret=' + appSecret;
return request.post("/ys7com", dataJson).then(res=>{ return request.post("/ys7com", dataJson).then(res => {
var data = res.data || {}; var data = res.data || {};
if (data['code'] == '200') { if (data['code'] == '200') {
return data['data']['accessToken'] return data['data']['accessToken']
}else{ } else {
return null return null
} }
}).catch(err=>{ }).catch(err => {
console.log(err); console.log(err);
return err return err
}) })
}, },
getUrl(item){ getUrl(item) {
var captcha = item.captcha ? item.captcha + '@' : ''; var captcha = item.captcha ? item.captcha + '@' : '';
var id = item.id || this.info.id || ''; var id = item.id || this.info.id || '';
return 'ezopen://'+captcha+'open.ys7.com/'+id+'/'+item.channel; return 'ezopen://' + captcha + 'open.ys7.com/' + id + '/' + item.channel;
}, },
chickVideo(video, index) { chickVideo(video, index) {
this.createVideo(video); this.createVideo(video);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment