Merge branch 'test' of git.code.tencent.com:lian-cbtc/jl-client into test

This commit is contained in:
Yuan 2022-09-26 18:32:34 +08:00
commit 94d56cff1d
21 changed files with 763 additions and 2334 deletions

View File

@ -89,14 +89,8 @@ export default {
} }
}); });
window.addEventListener('storage', e => { window.addEventListener('storage', e => {
if (e.key == getUserIdKey('setSceneOperate')) { if (this.$route.path.includes('trainingDesign') || this.$route.path.includes('trainingPreview')) {
if (this.$route.path.includes('trainingDesign')) { if (e.key == getUserIdKey('nextNew')) {
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')) {
const operate = JSON.parse(e.newValue); const operate = JSON.parse(e.newValue);
this.$store.dispatch('training/nextNew', operate); this.$store.dispatch('training/nextNew', operate);
} }

View File

@ -299,6 +299,15 @@ class Iscs {
this.$painter.update(this.iscsDevice[psdCode]); 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 { } else {
const oDevice = this.iscsDevice[code]; const oDevice = this.iscsDevice[code];
if (oDevice && elem.dispose) { if (oDevice && elem.dispose) {

View File

@ -62,7 +62,7 @@ import checkSell from '@/assets/iscs_picture/check_sell.png';
import checkSell2 from '@/assets/iscs_picture/check_sell2.png'; import checkSell2 from '@/assets/iscs_picture/check_sell2.png';
import checkSell2Lv from '@/assets/iscs_picture/check_sell2_lv.png'; import checkSell2Lv from '@/assets/iscs_picture/check_sell2_lv.png';
import checkSell2Hong from '@/assets/iscs_picture/check_sell2_hong.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 bgShowRoom from '@/assets/iscs_picture/bg-showroom.jpg';
import bgStand from '@/assets/iscs_picture/bg-stand.jpg'; import bgStand from '@/assets/iscs_picture/bg-stand.jpg';
import bgFasPlatformA from '@/assets/iscs_picture/fas_platform_a_bg.png'; import bgFasPlatformA from '@/assets/iscs_picture/fas_platform_a_bg.png';
@ -146,6 +146,8 @@ const pictureObj = {
checkArrowRightLv, checkArrowRightLv,
checkArrowRightHong, checkArrowRightHong,
checkArrowDouble, checkArrowDouble,
checkArrowDoubleLv,
checkArrowDoubleHong,
checkFlowCumulative, checkFlowCumulative,
checkSell, checkSell,
checkSell2, checkSell2,
@ -190,6 +192,7 @@ export default class Picture extends Group {
this._function = device.model.function; this._function = device.model.function;
this.z = device.model.z; this.z = device.model.z;
this.create(); this.create();
this.setState(this.model);
if (this.model.groupId) { if (this.model.groupId) {
this.createMouseEvent(); this.createMouseEvent();
} }
@ -232,6 +235,11 @@ export default class Picture extends Group {
this.model.point.x += dx; this.model.point.x += dx;
this.model.point.y += dy; this.model.point.y += dy;
} }
setState(model) {
if (model.picture) {
this.imageButton && this.imageButton.setStyle({image: pictureObj[model.picture]});
}
}
getBoundingRect() { getBoundingRect() {
const rect = this.imageButton.getBoundingRect().clone(); const rect = this.imageButton.getBoundingRect().clone();
rect.x = rect.x + this.model.point.x; rect.x = rect.x + this.model.point.x;

View File

@ -166,7 +166,8 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
let teststomp = new StompClient(); let teststomp = new StompClient();
// let topic = '/user/topic/simulation/assistant/'+group; // 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}; let header = {'X-Token': token};
try { try {
teststomp.subscribe(topic, callback, header); teststomp.subscribe(topic, callback, header);

View File

@ -102,7 +102,8 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
let teststomp = new StompClient(); let teststomp = new StompClient();
// let topic = '/user/topic/simulation/assistant/'+group; // 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}; let header = {'X-Token': token};
try { try {
// console.log("teststomp"); // console.log("teststomp");

View File

@ -177,7 +177,8 @@ export function jl3dFaultDeviceVr(dom,group,skinCode) {
let connectmsg = { let connectmsg = {
type:'init', type:'init',
baseurl:store.state.user.baseUrl, 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(), token:getToken(),
}; };
vrwebworker.postMessage(connectmsg); vrwebworker.postMessage(connectmsg);

View File

@ -175,7 +175,8 @@ export function Jl3dOtherVR(dom,group,skinCode) {
let connectmsg = { let connectmsg = {
type:'init', type:'init',
baseurl:store.state.user.baseUrl, 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(), token:getToken(),
}; };
otherVrViewWorker.postMessage(connectmsg); otherVrViewWorker.postMessage(connectmsg);

View File

@ -171,7 +171,8 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) {
let connectmsg = { let connectmsg = {
type:'init', type:'init',
baseurl:store.state.user.baseUrl, 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(), token:getToken(),
}; };
vrwebworker.postMessage(connectmsg); vrwebworker.postMessage(connectmsg);

View File

@ -41,7 +41,8 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
var datatype = '00'; var datatype = '00';
this.teststomp = new StompClient(); 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 header = {'X-Token': getToken() };
let connectmsg = { let connectmsg = {
type:'init', type:'init',

View File

@ -7,7 +7,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
const scope = this; const scope = this;
this.teststomp = new StompClient(); 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 header = {'X-Token': getToken() };
socketon(topic); socketon(topic);

View File

@ -42,7 +42,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
var datatype = '00'; var datatype = '00';
this.teststomp = new StompClient(); 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 header = {'X-Token': getToken() };
let connectmsg = { let connectmsg = {
type:'init', type:'init',

View File

@ -7,7 +7,8 @@ export function silumationConnect(deviceaction,toptrain,downtrain,routegroup,pas
const scope = this; const scope = this;
this.teststomp = new StompClient(); this.teststomp = new StompClient();
let start = true; 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 header = {'X-Token': getToken() };
// scope.socketon(topic); // scope.socketon(topic);

View File

@ -7,7 +7,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe
const scope = this; const scope = this;
this.teststomp = new StompClient(); this.teststomp = new StompClient();
let start = true; 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 header = {'X-Token': getToken() };
socketon(topic); socketon(topic);

View File

@ -7,7 +7,8 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
const scope = this; const scope = this;
this.teststomp = new StompClient(); 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 header = {'X-Token': getToken() };
let restart = false; let restart = false;
socketon(topic); socketon(topic);

View File

@ -8,7 +8,8 @@ export function sandBoxConnect(manager,routegroup,section,signal,station,train )
let scope = this; let scope = this;
this.teststomp = new StompClient(); this.teststomp = new StompClient();
let start = true; 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 header = {'X-Token': getToken() };
let topswitch = false; let topswitch = false;
let downswitch = false; let downswitch = false;

View File

@ -126,7 +126,6 @@ const training = {
}, },
setSceneOperate: ({commit}, sceneOperate) => { setSceneOperate: ({commit}, sceneOperate) => {
commit('setSceneOperate', sceneOperate); commit('setSceneOperate', sceneOperate);
setLocalStorage('setSceneOperate', JSON.stringify(sceneOperate));
}, },
handleCheckNewTrainingResult:({commit, state}, valid) => { handleCheckNewTrainingResult:({commit, state}, valid) => {
const stepList = JSON.parse(state.trainingDetail.stepJson); const stepList = JSON.parse(state.trainingDetail.stepJson);

View File

@ -519,6 +519,18 @@ export default {
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT'); this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
this.stationRoleShow(deviceCode); this.stationRoleShow(deviceCode);
break; 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': case 'DEPOT_DISPATCHER':
this.$store.dispatch('training/setPrdType', '09'); this.$store.dispatch('training/setPrdType', '09');
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER'); this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');

File diff suppressed because it is too large Load Diff

View File

@ -4,22 +4,22 @@
<div v-if="lineCode == '07'" id="jlReal3d" class="jlReal3d"> <div v-if="lineCode == '07'" id="jlReal3d" class="jlReal3d">
<div class="realCctv1"> <div class="realCctv1">
<video id="myvideo0" class="video-js"> <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> </video>
</div> </div>
<div class="realCctv2"> <div class="realCctv2">
<video id="myvideo1" class="video-js"> <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> </video>
</div> </div>
<div class="realCctv3"> <div class="realCctv3">
<video id="myvideo2" class="video-js"> <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> </video>
</div> </div>
<div class="realCctv4"> <div class="realCctv4">
<video id="myvideo3" class="video-js"> <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> </video>
</div> </div>
</div> </div>
@ -46,136 +46,164 @@
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue' import Vue from 'vue';
import Video from 'video.js' import Video from 'video.js';
import 'video.js/dist/video-js.css' import 'video.js/dist/video-js.css';
import { Jl3dpassflow } from '@/jlmap3d/jl3dpassflow/jl3dpassflownew.js' import { Jl3dpassflow } from '@/jlmap3d/jl3dpassflow/jl3dpassflownew.js';
import { ProjectIcon, loginInfo } from '@/scripts/ProjectConfig' import { ProjectIcon, loginInfo } from '@/scripts/ProjectConfig';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js' import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
export default { export default {
name: 'Passflow', name: 'Passflow',
components: { components: {
// VideoPlayer // 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() { data() {
return this.$route.query.lineCode 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: {
watch: { code() {
'$store.state.app.windowSizeCount': function () { return this.$route.query.code;
this.videoList.forEach((videoPlay, index) => { },
console.log('??') lineCode() {
document.querySelector('.myvideo' + index + '-dimensions').style.width = window.innerWidth / 4 + 'px' return this.$route.query.lineCode;
document.querySelector('.myvideo' + index + '-dimensions').style.height = window.innerHeight / 2 + 'px' }
// videoPlay.width_ = window.innerWidth / 4; },
// videoPlay.height_ = window.innerHeight / 2; 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() {}, beforeDestroy() {},
methods: { methods: {
init: function () { init: function () {
// let mapdata = this.$store.state.socket.device; // let mapdata = this.$store.state.socket.device;
let dom = document.getElementById('jl3d') const dom = document.getElementById('jl3d');
this.jl3d = new Jl3dpassflow(dom, this.$route.query.mapid, this.$route.query.group, 'normal') this.jl3d = new Jl3dpassflow(dom, this.$route.query.mapid, this.$route.query.group, 'normal');
}, },
switchrender() { switchrender() {
if (this.renderswitch == true) { if (this.renderswitch == true) {
this.rendermode = '退出监控' this.rendermode = '退出监控';
this.renderswitch = false this.renderswitch = false;
this.jl3d.switchviews('freeview') this.jl3d.switchviews('freeview');
} else { } else {
this.rendermode = '监控视角' this.rendermode = '监控视角';
this.renderswitch = true this.renderswitch = true;
this.jl3d.switchviews('4views') this.jl3d.switchviews('4views');
} }
}, },
switch4view() { switch4view() {
this.jl3d.switchviews('4views') this.jl3d.switchviews('4views');
}, },
switch2view() { switch2view() {
this.jl3d.switchviews('2views') this.jl3d.switchviews('2views');
}, },
switchauto() { switchauto() {
this.jl3d.switchviews('freeview') this.jl3d.switchviews('freeview');
}, },
updatestationlist(list) { updatestationlist(list) {
// console.log(list); // console.log(list);
this.value = list[0].name this.value = list[0].name;
this.stationlist = list this.stationlist = list;
}, },
currentsel(selVal) { currentsel(selVal) {
this.jl3d.changestation(selVal) this.jl3d.changestation(selVal);
// let oldgroupnum = this.groupnum; // let oldgroupnum = this.groupnum;
// this.value = selVal; // this.value = selVal;
}, },
back() { back() {
window.close() window.close();
}, }
}, }
} };
</script> </script>
<style scoped> <style scoped>
/* #jl3d { /* #jl3d {

View File

@ -49,7 +49,37 @@ export default {
hls: { hls: {
withCredentials: true 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); this.videoList.push(videoPlay);
} }
}, },

View File

@ -558,7 +558,7 @@ export default {
this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING'); this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING');
} else if (role.type == '车站助理') { } else if (role.type == '车站助理') {
prdType = ''; prdType = '01';
role.type = 'STATION_ASSISTANT'; role.type = 'STATION_ASSISTANT';
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT'); this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
} else if (role.type == '车站站长') { } else if (role.type == '车站站长') {