Commit cfa3425a authored by zhanglw's avatar zhanglw

修复0522测试反馈若干问题

parent 9aebbfd4
...@@ -4,8 +4,13 @@ ENV = 'development' ...@@ -4,8 +4,13 @@ ENV = 'development'
#VUE_APP_BASE_API = 'http://39.164.225.220:5002' #VUE_APP_BASE_API = 'http://39.164.225.220:5002'
#VUE_APP_LOCAL_API = 'http://39.164.225.220:5002' #VUE_APP_LOCAL_API = 'http://39.164.225.220:5002'
VUE_APP_BASE_API = 'http://192.168.3.23:9092'
VUE_APP_LOCAL_API = 'http://192.168.3.23:9092' #VUE_APP_BASE_API = 'http://192.168.3.23:9092'
#VUE_APP_LOCAL_API = 'http://192.168.3.23:9092'
VUE_APP_BASE_API = 'http://192.168.3.216:9092'
VUE_APP_LOCAL_API = 'http://192.168.3.216:9092'
VUE_APP_LOCAL_API2 = 'http://8.143.203.103:9091/' VUE_APP_LOCAL_API2 = 'http://8.143.203.103:9091/'
VUE_APP_WS_API = 'ws://8.143.203.103:9092/webSocket' VUE_APP_WS_API = 'ws://8.143.203.103:9092/webSocket'
......
<html> <html>
<head> <head>
<script src="./adapter.min.js" ></script> <script src="./adapter.min.js"></script>
<script src="./webrtcstreamer.js" ></script> <script src="./webrtcstreamer.js"></script>
<script>
var webRtcServer = null;
window.onload = function() {
webRtcServer = new WebRtcStreamer("video","http://192.168.3.38:8041");
webRtcServer.connect("rtsp://admin:gemho10-7@192.168.0.54:554/h264/ch1/main/av_stream");
}
window.onbeforeunload = function() { webRtcServer.disconnect(); }
</script>
</head> </head>
<body> <body>
<div style="width: 100%;height: 100%;"> <div style="width: 100%;height: 100%;">
<video id="video" autoplay/> <video id="video" controls style="width: 100%;height: 100%;">
您的浏览器不支持:HTML5 video.
</video>
</div> </div>
<script>
var webRtcServer = null;
window.onload = function () {
webRtcServer = new WebRtcStreamer("video", "http://192.168.3.38:8041");
webRtcServer.connect("rtsp://admin:gemho10-7@192.168.0.54:554/h264/ch1/main/av_stream");
}
window.onbeforeunload = function () {
webRtcServer.disconnect();
}
</script>
</body> </body>
</html> </html>
...@@ -257,10 +257,12 @@ function CRUD(options) { ...@@ -257,10 +257,12 @@ function CRUD(options) {
return return
} }
crud.status.add = CRUD.STATUS.PROCESSING crud.status.add = CRUD.STATUS.PROCESSING
crud.crudMethod.add(crud.form).then(() => { crud.crudMethod.add(crud.form).then((res) => {
crud.status.add = CRUD.STATUS.NORMAL crud.status.add = CRUD.STATUS.NORMAL
crud.resetForm() crud.resetForm()
crud.addSuccessNotify() if(!res.status){
crud.addSuccessNotify()
}
callVmHook(crud, CRUD.HOOK.afterSubmit) callVmHook(crud, CRUD.HOOK.afterSubmit)
crud.toQuery() crud.toQuery()
}).catch(() => { }).catch(() => {
...@@ -276,11 +278,13 @@ function CRUD(options) { ...@@ -276,11 +278,13 @@ function CRUD(options) {
return return
} }
crud.status.edit = CRUD.STATUS.PROCESSING crud.status.edit = CRUD.STATUS.PROCESSING
crud.crudMethod.edit(crud.form).then(() => { crud.crudMethod.edit(crud.form).then((res) => {
crud.status.edit = CRUD.STATUS.NORMAL crud.status.edit = CRUD.STATUS.NORMAL
crud.getDataStatus(crud.getDataId(crud.form)).edit = CRUD.STATUS.NORMAL crud.getDataStatus(crud.getDataId(crud.form)).edit = CRUD.STATUS.NORMAL
crud.editSuccessNotify()
crud.resetForm() crud.resetForm()
if(!res.status){
crud.editSuccessNotify()
}
callVmHook(crud, CRUD.HOOK.afterSubmit) callVmHook(crud, CRUD.HOOK.afterSubmit)
crud.refresh() crud.refresh()
}).catch(() => { }).catch(() => {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<label class="el-form-item-label" style="font-weight: 500;">车牌号</label> <label class="el-form-item-label" style="font-weight: 500;">车牌号</label>
<el-input v-model="query.carNumber" clearable size="small" placeholder="请输入车牌号" style="width:180px;"/> <el-input v-model="query.carNumber" clearable size="small" placeholder="请输入车牌号" style="width:180px;"/>
<label class="el-form-item-label" style="font-weight: 500;">司机姓名</label> <label class="el-form-item-label" style="font-weight: 500;">司机姓名</label>
<el-input v-model="query.carNumber" clearable size="small" placeholder="请输入姓名" style="width:180px;"/> <el-input v-model="query.driver" clearable size="small" placeholder="请输入姓名" style="width:180px;"/>
<label class="el-form-item-label" style="font-weight: 500;">报警类型</label> <label class="el-form-item-label" style="font-weight: 500;">报警类型</label>
<el-select v-model="query.alarmType" placeholder="请选择"> <el-select v-model="query.alarmType" placeholder="请选择">
<el-option v-for="item in stuOpts" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item in stuOpts" :key="item.value" :label="item.label" :value="item.value"></el-option>
......
...@@ -359,7 +359,16 @@ export default { ...@@ -359,7 +359,16 @@ export default {
query1.flag = 2; query1.flag = 2;
HttpReq.truckDispatching.personRecordingAdd(query1).then((res) => { HttpReq.truckDispatching.personRecordingAdd(query1).then((res) => {
if(res.code == 200){ if(res.code == 200){
this.$notify({
title: '添加成功!',
type: 'success',
duration: 2500
});
this.form.toAddVisible = false;
this.queryAdd = {};
this.formAdd = {};
this.checkDataListAdd = [];
this.loadData();
}else{ }else{
this.$notify({ this.$notify({
title: res.msg, title: res.msg,
...@@ -369,19 +378,6 @@ export default { ...@@ -369,19 +378,6 @@ export default {
} }
}).catch(function(error) { }); }).catch(function(error) { });
}) })
this.$notify({
title: '添加成功!',
type: 'success',
duration: 2500
});
this.loadDataAdd();
this.loadData();
this.form.toAddVisible = false;
this.queryAdd = {};
this.formAdd = {};
this.checkDataListAdd = [];
}, },
//调度状态更改 //调度状态更改
flagChange(row){ flagChange(row){
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<el-table-column prop="time" label="报警时间" align="center"></el-table-column> <el-table-column prop="time" label="报警时间" align="center"></el-table-column>
<el-table-column label="报警类型" align="center"> <el-table-column label="报警类型" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-show="scope.row.alarmtype===1">人员求</span> <span v-show="scope.row.alarmtype===1">人员求</span>
<span v-show="scope.row.alarmtype===2">电子围栏</span> <span v-show="scope.row.alarmtype===2">电子围栏</span>
<span v-show="scope.row.alarmtype===3">电池欠压</span> <span v-show="scope.row.alarmtype===3">电池欠压</span>
</template> </template>
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
graphicLayer: null, graphicLayer: null,
stuOpts: [ stuOpts: [
{label: '全部', value: undefined}, {label: '全部', value: undefined},
{label: '人员求', value: 1}, {label: '人员求', value: 1},
{label: '电子围栏', value: 2}, {label: '电子围栏', value: 2},
{label: '电池欠压', value: 3}, {label: '电池欠压', value: 3},
], ],
......
...@@ -443,7 +443,8 @@ export default { ...@@ -443,7 +443,8 @@ export default {
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if(res.body && res.body.api_url && res.body.play_url){ if(res.body && res.body.api_url && res.body.play_url){
this.videoRtcPlayer = new JSWebrtc.Player(res.body.api_url, res.body.play_url, { setTimeout(()=>{
this.videoRtcPlayer = new JSWebrtc.Player(res.body.api_url, res.body.play_url, {
video: document.getElementById("remoteVideo"), video: document.getElementById("remoteVideo"),
autoplay: true, autoplay: true,
onPlay: () => { onPlay: () => {
...@@ -454,6 +455,7 @@ export default { ...@@ -454,6 +455,7 @@ export default {
this.videoRtcPlayer.destroy(); this.videoRtcPlayer.destroy();
} }
}); });
},1000);
}else{ }else{
this.$message({ this.$message({
message: '链接失败!'+res.body.msg message: '链接失败!'+res.body.msg
...@@ -467,18 +469,20 @@ export default { ...@@ -467,18 +469,20 @@ export default {
this.videoDia = true; this.videoDia = true;
this.$nextTick(() => { this.$nextTick(() => {
if(!this.videoPlayer){ if(!this.videoPlayer){
this.videoPlayer = videojs('videoRealtime', { setTimeout(()=>{
fluid: true, this.videoPlayer = videojs('videoRealtime', {
bigPlayButton: false, fluid: true,
textTrackDisplay: false, bigPlayButton: false,
sources: [{ src:url, type: tp||"video/mp4" }], textTrackDisplay: false,
posterImage: true, sources: [{ src:url, type: tp||"video/mp4" }],
errorDisplay: false, posterImage: true,
controlBar: true errorDisplay: false,
}, ()=> { controlBar: true
console.log('video ready!') }, ()=> {
this.videoPlayer.play(); console.log('video ready!')
}) this.videoPlayer.play();
})
},1000);
}else{ }else{
let data = { src:url, type: tp||"video/mp4" } let data = { src:url, type: tp||"video/mp4" }
this.videoPlayer.pause(); this.videoPlayer.pause();
......
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