球机管理测试和配置由model遮罩更改为router change page方式

merge-requests/1/head
张鑫 5 years ago
parent d947d9305b
commit b6c07fd766

@ -62,7 +62,7 @@ export default {
parents = this.$router.options.routes[0].children.filter(ele => {
if (
this.userInfo.permissionList.some(item => {
return item.rights === ele.name && ele.name.indexOf("center") < 0 && item.rights === ele.name && ele.name.indexOf("ioTable") < 0 && item.rights === ele.name && ele.name.indexOf("realTimeMonitoringModel") < 0 && item.rights === ele.name && ele.name.indexOf("plcStatus") < 0;
return item.rights === ele.name && ele.name.indexOf("center") < 0 && item.rights === ele.name && ele.name.indexOf("ioTable") < 0 && item.rights === ele.name && ele.name.indexOf("realTimeMonitoringModel") < 0 && item.rights === ele.name && ele.name.indexOf("plcStatus") < 0 && item.rights === ele.name && ele.name.indexOf("cameraManageModel") < 0;
})
) {
return ele;
@ -83,7 +83,7 @@ export default {
recursionRoute(parents);
}else {
parents = this.$router.options.routes[0].children.filter(item => {
return !item.name.startsWith("center") && !item.name.startsWith("ioTable") && !item.name.startsWith("realTimeMonitoringModel") && !item.name.startsWith("plcStatus");
return !item.name.startsWith("center") && !item.name.startsWith("ioTable") && !item.name.startsWith("realTimeMonitoringModel") && !item.name.startsWith("plcStatus") && !item.name.startsWith("cameraManageModel");
});
}
this.routes = parents;

@ -29,7 +29,7 @@ instance.interceptors.response.use((response) => {
const res = response.data;
// 对响应数据做点什么
if (res.code !== 200 && res.code!==0) {
console.log(res);
// console.log(res);
Vue.prototype.$message.error(res.message);
// 未认证
if (res.code === 401) {

@ -43,7 +43,6 @@ const routes = [{
path: 'realTimeMonitoring/model',
name: 'realTimeMonitoringModel',
meta: {
icon: 'desktop',
name: '实时视频流(全屏)'
},
component: () => import('@/views/realTimeMonitoring/model'),
@ -122,6 +121,14 @@ const routes = [{
},
component: () => import('@/views/cameraManage/index')
},
{
path: 'cameraManage/model',
name: 'cameraManageModel',
meta: {
name: '球机管理测试or配置'
},
component: () => import('@/views/cameraManage/model')
},
{
path: 'productSpecManage',
name: 'productSpecManage',

@ -119,10 +119,22 @@ export default {
});
},
showModel(type,data){
this.visible = true
console.log(type)
if (type == 'test') {
this.$router.push({
name: 'cameraManageModel',
query: {modelType: type, modelData: data}
})
} else if (type == 'config') {
this.$router.push({
name: 'cameraManageModel',
query: {modelType: type, modelData: data}
})
} else {
this.visible = true
this.modelType = type
this.modelData = data
}
},
submit(visible){
this.visible = visible

@ -1,9 +1,9 @@
<template>
<div>
<div class="button-box">
<a-button type="primary" class="add" @click="back">
<a-button type="primary" class="return" @click="back">
返回
</a-button>
<div class="button-box">
<a-button type="primary" class="add" @click="showModel('add','')">
新增
</a-button>
@ -199,8 +199,18 @@ export default {
display: flex;
align-items: center;
justify-content: center;
.add {
margin-right: 20px;
}
}
.return {
position: absolute;
top: 0;
left: 150px;
display: flex;
align-items: center;
justify-content: center;
}
</style>

@ -138,20 +138,23 @@
<img :src="rightUrl" alt="" @mousedown="rightStart" @mouseup="rightStop">
</div>
<div class="direction-item">
<img :src="leftDownUrl" alt="" @mousedown="leftDownStart" @mouseup="leftDownStop">
<img :src="leftDownUrl" alt="" @mousedown="leftDownStart"
@mouseup="leftDownStop">
<img :src="downUrl" alt="" @mousedown="downStart" @mouseup="downStop">
<img :src="rightDownUrl" alt="" @mousedown="rightDownStart" @mouseup="rightDownStop">
<img :src="rightDownUrl" alt="" @mousedown="rightDownStart"
@mouseup="rightDownStop">
</div>
</div>
<div class="config-table">
<h2>球机配置</h2>
<a-table
:columns="columns"
:row-key="record => record.name"
:data-source="configData"
@change="getConfigIoList"
class="config-table"
bordered
:pagination="false"
:scroll="{y: 450 }"
:scroll="{y:335}"
>
<span slot="name" slot-scope="text,record">
<a-button type="link" @click="toPtz(record)">{{text}}</a-button>
@ -205,6 +208,7 @@
</span>
</a-table>
</div>
</a-modal>
</template>
@ -271,14 +275,6 @@ export default {
rtsp:newVal.rtsp
})
})
}else if (newVal.id && this.type=='test'){
this.id = newVal.id
this.mdata = newVal
console.log(newVal)
this.$nextTick(()=>{ //this.$nextTick
console.log(newVal.rtsp)
this.getTestVideo(newVal.rtsp)
})
}else if (newVal.id && this.type=='config'){
this.id = newVal.id
this.mdata = newVal
@ -325,6 +321,20 @@ export default {
},
mounted() {
console.log('mounted执行了')
if (this.$route.query.modelType == 'test') {
this.isShow = true
this.id = this.$route.query.modelData.id
this.type = this.$route.query.modelType
this.mdata = this.$route.query.modelData
this.getTestVideo(this.$route.query.modelData.rtsp)
} else if (this.$route.query.modelType == 'config') {
this.isShow = true
this.id = this.$route.query.modelData.id
this.type = this.$route.query.modelType
this.mdata = this.$route.query.modelData
this.getConfigVideo(this.$route.query.modelData.rtsp)
this.getConfigIoList()
}
},
methods: {
handleOk() {
@ -368,9 +378,11 @@ export default {
console.log('Clicked cancel button');
this.$emit('close', false, {})
if(this.type=='test') {
this.$router.go(-1);
var vlc = document.getElementById('video-test');
vlc.playlist.items.clear()
}else if(this.type=='config') {
this.$router.go(-1);
var vlc = document.getElementById('video-config');
vlc.playlist.items.clear()
}
@ -893,6 +905,13 @@ export default {
width: 800px;
height: 450px;
overflow: hidden;
h2 {
padding: 15px;
font-size: 20px;
background: #fafafa;
margin: 0;
}
}
}
.vxgplayer{

Loading…
Cancel
Save