Commit cfa3425a authored by zhanglw's avatar zhanglw

修复0522测试反馈若干问题

parent 9aebbfd4
......@@ -4,8 +4,13 @@ ENV = 'development'
#VUE_APP_BASE_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_WS_API = 'ws://8.143.203.103:9092/webSocket'
......
<html>
<head>
<script src="./adapter.min.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>
<script src="./adapter.min.js"></script>
<script src="./webrtcstreamer.js"></script>
</head>
<body>
<div style="width: 100%;height: 100%;">
<video id="video" autoplay/>
<video id="video" controls style="width: 100%;height: 100%;">
您的浏览器不支持:HTML5 video.
</video>
</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>
</html>
......@@ -257,10 +257,12 @@ function CRUD(options) {
return
}
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.resetForm()
crud.addSuccessNotify()
if(!res.status){
crud.addSuccessNotify()
}
callVmHook(crud, CRUD.HOOK.afterSubmit)
crud.toQuery()
}).catch(() => {
......@@ -276,11 +278,13 @@ function CRUD(options) {
return
}
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.getDataStatus(crud.getDataId(crud.form)).edit = CRUD.STATUS.NORMAL
crud.editSuccessNotify()
crud.resetForm()
if(!res.status){
crud.editSuccessNotify()
}
callVmHook(crud, CRUD.HOOK.afterSubmit)
crud.refresh()
}).catch(() => {
......
......@@ -8,7 +8,7 @@
<label class="el-form-item-label" style="font-weight: 500;">车牌号</label>
<el-input v-model="query.carNumber" clearable size="small" placeholder="请输入车牌号" style="width:180px;"/>
<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>
<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>
......
......@@ -359,7 +359,16 @@ export default {
query1.flag = 2;
HttpReq.truckDispatching.personRecordingAdd(query1).then((res) => {
if(res.code == 200){
this.$notify({
title: '添加成功!',
type: 'success',
duration: 2500
});
this.form.toAddVisible = false;
this.queryAdd = {};
this.formAdd = {};
this.checkDataListAdd = [];
this.loadData();
}else{
this.$notify({
title: res.msg,
......@@ -369,19 +378,6 @@ export default {
}
}).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){
......
......@@ -49,7 +49,7 @@
<el-table-column prop="time" label="报警时间" align="center"></el-table-column>
<el-table-column label="报警类型" align="center">
<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===3">电池欠压</span>
</template>
......@@ -113,7 +113,7 @@ export default {
graphicLayer: null,
stuOpts: [
{label: '全部', value: undefined},
{label: '人员求', value: 1},
{label: '人员求', value: 1},
{label: '电子围栏', value: 2},
{label: '电池欠压', value: 3},
],
......
......@@ -443,7 +443,8 @@ export default {
}).then((res) => {
if (res.code == 200) {
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"),
autoplay: true,
onPlay: () => {
......@@ -454,6 +455,7 @@ export default {
this.videoRtcPlayer.destroy();
}
});
},1000);
}else{
this.$message({
message: '链接失败!'+res.body.msg
......@@ -467,18 +469,20 @@ export default {
this.videoDia = true;
this.$nextTick(() => {
if(!this.videoPlayer){
this.videoPlayer = videojs('videoRealtime', {
fluid: true,
bigPlayButton: false,
textTrackDisplay: false,
sources: [{ src:url, type: tp||"video/mp4" }],
posterImage: true,
errorDisplay: false,
controlBar: true
}, ()=> {
console.log('video ready!')
this.videoPlayer.play();
})
setTimeout(()=>{
this.videoPlayer = videojs('videoRealtime', {
fluid: true,
bigPlayButton: false,
textTrackDisplay: false,
sources: [{ src:url, type: tp||"video/mp4" }],
posterImage: true,
errorDisplay: false,
controlBar: true
}, ()=> {
console.log('video ready!')
this.videoPlayer.play();
})
},1000);
}else{
let data = { src:url, type: tp||"video/mp4" }
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