Merge branch 'test' of git.code.tencent.com:lian-cbtc/jl-client into test
This commit is contained in:
commit
94d56cff1d
10
src/App.vue
10
src/App.vue
@ -89,14 +89,8 @@ export default {
|
||||
}
|
||||
});
|
||||
window.addEventListener('storage', e => {
|
||||
if (e.key == getUserIdKey('setSceneOperate')) {
|
||||
if (this.$route.path.includes('trainingDesign')) {
|
||||
const operate = JSON.parse(e.newValue);
|
||||
this.$store.dispatch('trainingNew/setSceneOperate', operate);
|
||||
}
|
||||
}
|
||||
if (e.key == getUserIdKey('nextNew')) {
|
||||
if (this.$route.path.includes('trainingDesign') || this.$route.path.includes('trainingPreview')) {
|
||||
if (this.$route.path.includes('trainingDesign') || this.$route.path.includes('trainingPreview')) {
|
||||
if (e.key == getUserIdKey('nextNew')) {
|
||||
const operate = JSON.parse(e.newValue);
|
||||
this.$store.dispatch('training/nextNew', operate);
|
||||
}
|
||||
|
@ -299,6 +299,15 @@ class Iscs {
|
||||
this.$painter.update(this.iscsDevice[psdCode]);
|
||||
}
|
||||
});
|
||||
} else if (elem.deviceType === 'men') {
|
||||
const checkArrowDoubleCodeList = ['IscsPicture_2', 'IscsPicture_8', 'IscsPicture_27', 'IscsPicture_33'];
|
||||
const checkArrowLeftCodeList = ['IscsPicture_3', 'IscsPicture_4', 'IscsPicture_5', 'IscsPicture_6', 'IscsPicture_7', 'IscsPicture_28', 'IscsPicture_29',
|
||||
'IscsPicture_30', 'IscsPicture_31', 'IscsPicture_34', 'IscsPicture_35', 'IscsPicture_36', 'IscsPicture_37'];
|
||||
const checkArrowRightCodeList = ['IscsPicture_10', 'IscsPicture_11', 'IscsPicture_12', 'IscsPicture_13', 'IscsPicture_14'];
|
||||
[...checkArrowDoubleCodeList, ...checkArrowLeftCodeList, ...checkArrowRightCodeList].forEach(checkCode => {
|
||||
this.iscsDevice[checkCode].model.picture = elem.picture;
|
||||
this.$painter.update(this.iscsDevice[checkCode]);
|
||||
});
|
||||
} else {
|
||||
const oDevice = this.iscsDevice[code];
|
||||
if (oDevice && elem.dispose) {
|
||||
|
@ -62,7 +62,7 @@ import checkSell from '@/assets/iscs_picture/check_sell.png';
|
||||
import checkSell2 from '@/assets/iscs_picture/check_sell2.png';
|
||||
import checkSell2Lv from '@/assets/iscs_picture/check_sell2_lv.png';
|
||||
import checkSell2Hong from '@/assets/iscs_picture/check_sell2_hong.png';
|
||||
import checkSell3 from '@/assets/iscs_picture/check_sell3.png';
|
||||
// import checkSell3 from '@/assets/iscs_picture/check_sell3.png';
|
||||
import bgShowRoom from '@/assets/iscs_picture/bg-showroom.jpg';
|
||||
import bgStand from '@/assets/iscs_picture/bg-stand.jpg';
|
||||
import bgFasPlatformA from '@/assets/iscs_picture/fas_platform_a_bg.png';
|
||||
@ -146,6 +146,8 @@ const pictureObj = {
|
||||
checkArrowRightLv,
|
||||
checkArrowRightHong,
|
||||
checkArrowDouble,
|
||||
checkArrowDoubleLv,
|
||||
checkArrowDoubleHong,
|
||||
checkFlowCumulative,
|
||||
checkSell,
|
||||
checkSell2,
|
||||
@ -190,6 +192,7 @@ export default class Picture extends Group {
|
||||
this._function = device.model.function;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
this.setState(this.model);
|
||||
if (this.model.groupId) {
|
||||
this.createMouseEvent();
|
||||
}
|
||||
@ -232,6 +235,11 @@ export default class Picture extends Group {
|
||||
this.model.point.x += dx;
|
||||
this.model.point.y += dy;
|
||||
}
|
||||
setState(model) {
|
||||
if (model.picture) {
|
||||
this.imageButton && this.imageButton.setStyle({image: pictureObj[model.picture]});
|
||||
}
|
||||
}
|
||||
getBoundingRect() {
|
||||
const rect = this.imageButton.getBoundingRect().clone();
|
||||
rect.x = rect.x + this.model.point.x;
|
||||
|
@ -166,7 +166,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
|
||||
|
||||
let teststomp = new StompClient();
|
||||
// let topic = '/user/topic/simulation/assistant/'+group;
|
||||
let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
let topic = '/user/queue/simulation/'+group+'/jl3d';
|
||||
let header = {'X-Token': token};
|
||||
try {
|
||||
teststomp.subscribe(topic, callback, header);
|
||||
|
@ -102,7 +102,8 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
||||
|
||||
let teststomp = new StompClient();
|
||||
// let topic = '/user/topic/simulation/assistant/'+group;
|
||||
let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
let topic = '/user/queue/simulation/'+ group +'/jl3d';
|
||||
let header = {'X-Token': token};
|
||||
try {
|
||||
// console.log("teststomp");
|
||||
|
@ -177,7 +177,8 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
baseurl:store.state.user.baseUrl,
|
||||
topic:'/user/queue/simulation/jl3d/'+group,
|
||||
// topic:'/user/queue/simulation/jl3d/'+group,
|
||||
topic : '/user/queue/simulation/'+ group +'/jl3d',
|
||||
token:getToken(),
|
||||
};
|
||||
vrwebworker.postMessage(connectmsg);
|
||||
|
@ -175,7 +175,8 @@ export function Jl3dOtherVR(dom,group,skinCode) {
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
baseurl:store.state.user.baseUrl,
|
||||
topic:'/user/queue/simulation/jl3d/'+group,
|
||||
// topic:'/user/queue/simulation/jl3d/'+group,
|
||||
topic : '/user/queue/simulation/'+ group +'/jl3d',
|
||||
token:getToken(),
|
||||
};
|
||||
otherVrViewWorker.postMessage(connectmsg);
|
||||
|
@ -171,7 +171,8 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
baseurl:store.state.user.baseUrl,
|
||||
topic:'/user/queue/simulation/jl3d/'+group,
|
||||
// topic:'/user/queue/simulation/jl3d/'+group,
|
||||
topic : '/user/queue/simulation/'+ group +'/jl3d',
|
||||
token:getToken(),
|
||||
};
|
||||
vrwebworker.postMessage(connectmsg);
|
||||
|
@ -41,7 +41,8 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
|
||||
var datatype = '00';
|
||||
this.teststomp = new StompClient();
|
||||
this.topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// this.topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
this.topic = '/user/queue/simulation/'+routegroup+'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
|
@ -7,7 +7,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
|
||||
socketon(topic);
|
||||
|
@ -42,7 +42,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
|
||||
var datatype = '00';
|
||||
this.teststomp = new StompClient();
|
||||
this.topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// this.topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
this.topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
let connectmsg = {
|
||||
type:'init',
|
||||
|
@ -7,7 +7,8 @@ export function silumationConnect(deviceaction,toptrain,downtrain,routegroup,pas
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
let start = true;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
// scope.socketon(topic);
|
||||
|
||||
|
@ -7,7 +7,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
let start = true;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
socketon(topic);
|
||||
|
||||
|
@ -7,7 +7,8 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
|
||||
const scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;//
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;//
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
let restart = false;
|
||||
socketon(topic);
|
||||
|
@ -8,7 +8,8 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train )
|
||||
let scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
let start = true;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d';
|
||||
let header = {'X-Token': getToken() };
|
||||
let topswitch = false;
|
||||
let downswitch = false;
|
||||
|
@ -126,7 +126,6 @@ const training = {
|
||||
},
|
||||
setSceneOperate: ({commit}, sceneOperate) => {
|
||||
commit('setSceneOperate', sceneOperate);
|
||||
setLocalStorage('setSceneOperate', JSON.stringify(sceneOperate));
|
||||
},
|
||||
handleCheckNewTrainingResult:({commit, state}, valid) => {
|
||||
const stepList = JSON.parse(state.trainingDetail.stepJson);
|
||||
|
@ -519,6 +519,18 @@ export default {
|
||||
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
||||
this.stationRoleShow(deviceCode);
|
||||
break;
|
||||
case 'STATION_SIGNALER': // 车站信号员
|
||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SIGNALER');
|
||||
this.stationRoleShow(deviceCode);
|
||||
break;
|
||||
case 'STATION_SWITCH_MAN': // 车站扳道员
|
||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
|
||||
this.stationRoleShow(deviceCode);
|
||||
break;
|
||||
case 'DEPOT_DISPATCHER':
|
||||
this.$store.dispatch('training/setPrdType', '09');
|
||||
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,22 +4,22 @@
|
||||
<div v-if="lineCode == '07'" id="jlReal3d" class="jlReal3d">
|
||||
<div class="realCctv1">
|
||||
<video id="myvideo0" class="video-js">
|
||||
<source src="http://160.20.60.15/hls/cctv1.m3u8" type="application/x-mpegURL" />
|
||||
<source src="http://160.20.60.15/hls/cctv2.m3u8" type="application/x-mpegURL">
|
||||
</video>
|
||||
</div>
|
||||
<div class="realCctv2">
|
||||
<video id="myvideo1" class="video-js">
|
||||
<source src="http://160.20.60.15/hls/cctv2.m3u8" type="application/x-mpegURL" />
|
||||
<source src="http://160.20.60.15/hls/cctv2.m3u8" type="application/x-mpegURL">
|
||||
</video>
|
||||
</div>
|
||||
<div class="realCctv3">
|
||||
<video id="myvideo2" class="video-js">
|
||||
<source src="http://160.20.60.15/hls/cctv3.m3u8" type="application/x-mpegURL" />
|
||||
<source src="http://160.20.60.15/hls/cctv3.m3u8" type="application/x-mpegURL">
|
||||
</video>
|
||||
</div>
|
||||
<div class="realCctv4">
|
||||
<video id="myvideo3" class="video-js">
|
||||
<source src="http://160.20.60.15/hls/cctv4.m3u8" type="application/x-mpegURL" />
|
||||
<source src="http://160.20.60.15/hls/cctv4.m3u8" type="application/x-mpegURL">
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
@ -46,136 +46,164 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import Video from 'video.js'
|
||||
import 'video.js/dist/video-js.css'
|
||||
import { Jl3dpassflow } from '@/jlmap3d/jl3dpassflow/jl3dpassflownew.js'
|
||||
import { ProjectIcon, loginInfo } from '@/scripts/ProjectConfig'
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'
|
||||
import Vue from 'vue';
|
||||
import Video from 'video.js';
|
||||
import 'video.js/dist/video-js.css';
|
||||
import { Jl3dpassflow } from '@/jlmap3d/jl3dpassflow/jl3dpassflownew.js';
|
||||
import { ProjectIcon, loginInfo } from '@/scripts/ProjectConfig';
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
export default {
|
||||
name: 'Passflow',
|
||||
components: {
|
||||
name: 'Passflow',
|
||||
components: {
|
||||
// VideoPlayer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
localStatic: JL3D_LOCAL_STATIC,
|
||||
jl3d: null,
|
||||
rendermode: '监控视角',
|
||||
renderswitch: false,
|
||||
stationlist: [],
|
||||
value: '',
|
||||
isCctv: true,
|
||||
videoList: [],
|
||||
// playerOptionList:[
|
||||
// http://hls.cntv.lxdns.com/asp/hls/main/0303000a/3/default/978a64ddd3a1caa85ae70a23414e6540/main.m3u8
|
||||
// // http://160.20.60.15/hls/cctv1.m3u8
|
||||
// {sources: [{ type:'application/x-mpegURL', src: 'http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8'}]},
|
||||
// {sources: [{ type:'application/x-mpegURL', src: 'http://192.168.3.6/hls/vlc.m3u8'}]},
|
||||
// {sources: [{ type:'application/x-mpegURL', src: 'http://192.168.3.6/hls/vlc.m3u8'}]},
|
||||
// {sources: [{ type:'application/x-mpegURL', src: 'http://192.168.3.6/hls/vlc.m3u8'}]}
|
||||
// ],
|
||||
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts', 'hlsdrts', 'designhlsdrts'],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
code() {
|
||||
return this.$route.query.code
|
||||
},
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode
|
||||
data() {
|
||||
return {
|
||||
localStatic: JL3D_LOCAL_STATIC,
|
||||
jl3d: null,
|
||||
rendermode: '监控视角',
|
||||
renderswitch: false,
|
||||
stationlist: [],
|
||||
value: '',
|
||||
isCctv: true,
|
||||
videoList: [],
|
||||
// playerOptionList:[
|
||||
// http://hls.cntv.lxdns.com/asp/hls/main/0303000a/3/default/978a64ddd3a1caa85ae70a23414e6540/main.m3u8
|
||||
// // http://160.20.60.15/hls/cctv1.m3u8
|
||||
// {sources: [{ type:'application/x-mpegURL', src: 'http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8'}]},
|
||||
// {sources: [{ type:'application/x-mpegURL', src: 'http://192.168.3.6/hls/vlc.m3u8'}]},
|
||||
// {sources: [{ type:'application/x-mpegURL', src: 'http://192.168.3.6/hls/vlc.m3u8'}]},
|
||||
// {sources: [{ type:'application/x-mpegURL', src: 'http://192.168.3.6/hls/vlc.m3u8'}]}
|
||||
// ],
|
||||
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts', 'hlsdrts', 'designhlsdrts']
|
||||
};
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$store.state.app.windowSizeCount': function () {
|
||||
this.videoList.forEach((videoPlay, index) => {
|
||||
console.log('??')
|
||||
document.querySelector('.myvideo' + index + '-dimensions').style.width = window.innerWidth / 4 + 'px'
|
||||
document.querySelector('.myvideo' + index + '-dimensions').style.height = window.innerHeight / 2 + 'px'
|
||||
// videoPlay.width_ = window.innerWidth / 4;
|
||||
// videoPlay.height_ = window.innerHeight / 2;
|
||||
})
|
||||
computed: {
|
||||
code() {
|
||||
return this.$route.query.code;
|
||||
},
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.app.windowSizeCount': function () {
|
||||
this.videoList.forEach((videoPlay, index) => {
|
||||
console.log('??');
|
||||
document.querySelector('.myvideo' + index + '-dimensions').style.width = window.innerWidth / 4 + 'px';
|
||||
document.querySelector('.myvideo' + index + '-dimensions').style.height = window.innerHeight / 2 + 'px';
|
||||
// videoPlay.width_ = window.innerWidth / 4;
|
||||
// videoPlay.height_ = window.innerHeight / 2;
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.loadingProjectList.includes(this.$route.query.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
}
|
||||
document.querySelector("link[rel*='icon']").href =
|
||||
loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
|
||||
},
|
||||
mounted() {
|
||||
if (this.lineCode == '07') {
|
||||
for (var i = 0; i < 4; i++) {
|
||||
const videoPlay = new Video(
|
||||
'myvideo' + i,
|
||||
{
|
||||
controls: false,
|
||||
autoplay: 'muted',
|
||||
loop: true,
|
||||
preload: 'auto',
|
||||
width: window.innerWidth / 4 + 'px',
|
||||
height: window.innerHeight / 2 + 'px',
|
||||
hls: {
|
||||
withCredentials: true
|
||||
}
|
||||
},
|
||||
function () {
|
||||
console.log('videojs播放器初始化成功');
|
||||
this.on('loadedmetadata', function() {
|
||||
console.log('loadedmetadata');
|
||||
// 加载到元数据后开始播放视频
|
||||
// startVideo();
|
||||
var lastTime = -1;
|
||||
// var tryTimes = 0;
|
||||
let isVideoBreak = null;
|
||||
clearInterval(isVideoBreak);
|
||||
isVideoBreak = setInterval(function() {
|
||||
var currentTime = videoPlay.currentTime();
|
||||
console.log('currentTime' + currentTime + 'lastTime' + lastTime);
|
||||
if (currentTime == lastTime) {
|
||||
videoPlay.currentTime(currentTime + 10000);
|
||||
videoPlay.play();
|
||||
// // 尝试5次播放后,如仍未播放成功提示刷新
|
||||
// if (++tryTimes > 5) {
|
||||
// alert('您的网速有点慢,刷新下试试');
|
||||
// tryTimes = 0;
|
||||
// }
|
||||
} else {
|
||||
lastTime = currentTime;
|
||||
// tryTimes = 0;
|
||||
}
|
||||
}, 3000);
|
||||
});
|
||||
this.on('play', function() {
|
||||
console.log('play');
|
||||
});
|
||||
}
|
||||
);
|
||||
this.videoList.push(videoPlay);
|
||||
}
|
||||
}
|
||||
this.init();
|
||||
window.updatestationlist = this.updatestationlist;
|
||||
if (this.$route.query.type == 'CCTV') {
|
||||
this.isCctv = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.loadingProjectList.includes(this.$route.query.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations')
|
||||
}
|
||||
document.querySelector("link[rel*='icon']").href =
|
||||
loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]
|
||||
},
|
||||
mounted() {
|
||||
if (this.lineCode == '07') {
|
||||
for (var i = 0; i < 4; i++) {
|
||||
const videoPlay = new Video(
|
||||
'myvideo' + i,
|
||||
{
|
||||
controls: false,
|
||||
autoplay: 'muted',
|
||||
loop: true,
|
||||
preload: 'auto',
|
||||
width: window.innerWidth / 4 + 'px',
|
||||
height: window.innerHeight / 2 + 'px',
|
||||
hls: {
|
||||
withCredentials: true,
|
||||
},
|
||||
},
|
||||
function () {
|
||||
console.log('videojs播放器初始化成功')
|
||||
}
|
||||
)
|
||||
this.videoList.push(videoPlay)
|
||||
}
|
||||
}
|
||||
this.init()
|
||||
window.updatestationlist = this.updatestationlist
|
||||
if (this.$route.query.type == 'CCTV') {
|
||||
this.isCctv = false
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {},
|
||||
methods: {
|
||||
init: function () {
|
||||
// let mapdata = this.$store.state.socket.device;
|
||||
let dom = document.getElementById('jl3d')
|
||||
this.jl3d = new Jl3dpassflow(dom, this.$route.query.mapid, this.$route.query.group, 'normal')
|
||||
},
|
||||
switchrender() {
|
||||
if (this.renderswitch == true) {
|
||||
this.rendermode = '退出监控'
|
||||
this.renderswitch = false
|
||||
this.jl3d.switchviews('freeview')
|
||||
} else {
|
||||
this.rendermode = '监控视角'
|
||||
this.renderswitch = true
|
||||
this.jl3d.switchviews('4views')
|
||||
}
|
||||
},
|
||||
switch4view() {
|
||||
this.jl3d.switchviews('4views')
|
||||
},
|
||||
switch2view() {
|
||||
this.jl3d.switchviews('2views')
|
||||
},
|
||||
switchauto() {
|
||||
this.jl3d.switchviews('freeview')
|
||||
},
|
||||
updatestationlist(list) {
|
||||
// console.log(list);
|
||||
this.value = list[0].name
|
||||
this.stationlist = list
|
||||
},
|
||||
currentsel(selVal) {
|
||||
this.jl3d.changestation(selVal)
|
||||
// let oldgroupnum = this.groupnum;
|
||||
// this.value = selVal;
|
||||
},
|
||||
back() {
|
||||
window.close()
|
||||
},
|
||||
},
|
||||
}
|
||||
beforeDestroy() {},
|
||||
methods: {
|
||||
init: function () {
|
||||
// let mapdata = this.$store.state.socket.device;
|
||||
const dom = document.getElementById('jl3d');
|
||||
this.jl3d = new Jl3dpassflow(dom, this.$route.query.mapid, this.$route.query.group, 'normal');
|
||||
},
|
||||
switchrender() {
|
||||
if (this.renderswitch == true) {
|
||||
this.rendermode = '退出监控';
|
||||
this.renderswitch = false;
|
||||
this.jl3d.switchviews('freeview');
|
||||
} else {
|
||||
this.rendermode = '监控视角';
|
||||
this.renderswitch = true;
|
||||
this.jl3d.switchviews('4views');
|
||||
}
|
||||
},
|
||||
switch4view() {
|
||||
this.jl3d.switchviews('4views');
|
||||
},
|
||||
switch2view() {
|
||||
this.jl3d.switchviews('2views');
|
||||
},
|
||||
switchauto() {
|
||||
this.jl3d.switchviews('freeview');
|
||||
},
|
||||
updatestationlist(list) {
|
||||
// console.log(list);
|
||||
this.value = list[0].name;
|
||||
this.stationlist = list;
|
||||
},
|
||||
currentsel(selVal) {
|
||||
this.jl3d.changestation(selVal);
|
||||
// let oldgroupnum = this.groupnum;
|
||||
// this.value = selVal;
|
||||
},
|
||||
back() {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/* #jl3d {
|
||||
|
@ -49,7 +49,37 @@ export default {
|
||||
hls: {
|
||||
withCredentials: true
|
||||
}
|
||||
}, function () { console.log('videojs播放器初始化成功'); });
|
||||
}, function () {
|
||||
console.log('videojs播放器初始化成功');
|
||||
this.on('loadedmetadata', function() {
|
||||
console.log('loadedmetadata');
|
||||
// 加载到元数据后开始播放视频
|
||||
// startVideo();
|
||||
var lastTime = -1;
|
||||
// var tryTimes = 0;
|
||||
let isVideoBreak = null;
|
||||
clearInterval(isVideoBreak);
|
||||
isVideoBreak = setInterval(function() {
|
||||
var currentTime = videoPlay.currentTime();
|
||||
console.log('currentTime' + currentTime + 'lastTime' + lastTime);
|
||||
if (currentTime == lastTime) {
|
||||
videoPlay.currentTime(currentTime + 10000);
|
||||
videoPlay.play();
|
||||
// // 尝试5次播放后,如仍未播放成功提示刷新
|
||||
// if (++tryTimes > 5) {
|
||||
// alert('您的网速有点慢,刷新下试试');
|
||||
// tryTimes = 0;
|
||||
// }
|
||||
} else {
|
||||
lastTime = currentTime;
|
||||
// tryTimes = 0;
|
||||
}
|
||||
}, 3000);
|
||||
});
|
||||
this.on('play', function() {
|
||||
console.log('play');
|
||||
});
|
||||
});
|
||||
this.videoList.push(videoPlay);
|
||||
}
|
||||
},
|
||||
|
@ -558,7 +558,7 @@ export default {
|
||||
this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING');
|
||||
|
||||
} else if (role.type == '车站助理') {
|
||||
prdType = '';
|
||||
prdType = '01';
|
||||
role.type = 'STATION_ASSISTANT';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
||||
} else if (role.type == '车站站长') {
|
||||
|
Loading…
Reference in New Issue
Block a user