This commit is contained in:
zyy 2020-11-24 17:35:27 +08:00
commit e249c344eb
51 changed files with 176 additions and 1600 deletions

View File

@ -2,10 +2,15 @@ import request from '@/utils/request';
import { getBaseUrl } from '@/utils/baseUrl';
// const baseconfig = require('../../../vue.config.js');
const publicPath = process.env.VUE_APP_PRO == 'local' ? '' : '/cbtc';
// console.log(publicPath);
const BASE_API = getBaseUrl();
export const JL3D_LOCAL_STATIC = "/cbtc/static";
export const JL3D_LOCAL_STATIC = publicPath+"/static";
// console.log(JL3D_LOCAL_STATIC);
let uploadurl = null;
let asseturl = null;
@ -21,8 +26,8 @@ if(BASE_API == "https://test.joylink.club/jlcloud"){
}else{
// uploadurl = "https://joylink.club/jlfile";
// asseturl = "https://joylink.club/oss/joylink";
uploadurl = JL3D_LOCAL_STATIC;
asseturl = JL3D_LOCAL_STATIC;
uploadurl = "";
asseturl = "";
}
const BASE_UPLOAD_API = uploadurl;
export const BASE_ASSET_API = asseturl;

View File

@ -1,37 +1,5 @@
import request from '@/utils/request';
/** 发送步骤数据*/
export function sendTrainingNextStep(data, group) {
return request({
url: `/api/training/${data.trainingId}/nextStep`,
method: 'post',
data: data.operate,
params: {
group
}
});
}
/** 查询实训列表 0*/
export function pageQueryTraining(params) {
return request({
url: `/api/training/pagedQuery`,
method: 'get',
params: params
});
}
export function sendCommand(group, command) {
return request({
url: `/api/training/deviceChange?group=${group}`,
method: 'put',
data: {
param: command.val,
type: command.type,
code: command.code,
operation: command.operation
}
});
}
// 发送新的指令
export function sendCommandNew(group, commandDefinitionId, command) {
return request({

View File

@ -362,7 +362,7 @@ export function postDailyRunPlanLoadGenerate(id) {
// 加载通用排班计划
export function postSchedulingCommonGenerate(mapId) {
return request({
url: `/api/scheduling/common/generate?mapId=${mapId}`,
url: `/api/v1/scheduling/generate/common?mapId=${mapId}`,
method: 'post'
});
}

View File

@ -1,12 +1,5 @@
import request from '@/utils/request';
export function generateSchedulingAgain(group) {
return request({
url: `/api/scheduling/${group}/rebuild`,
method: 'delete'
});
}
/** 查询某天的派班计划 */
export function querySechedulingNew (group, params) {
return request({

View File

@ -31,14 +31,6 @@ export function deleteFailureRule(id) {
});
}
/** 退出仿真系统*/
export function runDiagramQuit(group) {
return request({
url: `/api/simulation/${group}/quit`,
method: 'put'
});
}
/** 实训系统(新版地图) */
export function trainingNotifyNew({ trainingId }) {
return request({
@ -57,7 +49,7 @@ export function examNotifyNew({ examId }) {
/** 获取用户实训列表*/
export function getSimulationList(data) {
return request({
url: `/api/simulation/stats`,
url: `/api/stats/simulation`,
method: 'get',
params: data
});
@ -66,7 +58,7 @@ export function getSimulationList(data) {
/** 添加用户仿真数据*/
export function postSimulationStats(data) {
return request({
url: `/api/simulation/stats`,
url: `/api/stats/simulation`,
method: 'post',
data: data
});
@ -75,7 +67,7 @@ export function postSimulationStats(data) {
/** 更新用户仿真数据*/
export function putSimulationStats(data) {
return request({
url: `/api/simulation/${data.id}/stats`,
url: `/api/stats/${data.id}`,
method: 'put',
data: data
});
@ -84,7 +76,7 @@ export function putSimulationStats(data) {
/** 删除用户仿真数据*/
export function deleteSimulationStats(statsId) {
return request({
url: `/api/simulation/${statsId}`,
url: `/api/stats/${statsId}`,
method: 'delete'
});
}
@ -236,14 +228,6 @@ export function handlerIbpEvent(group, button, stationCode) {
});
}
/** 预览脚本仿真*/
export function scriptDraftRecordNotify(scriptId) {
return request({
url: `/api/simulation/scriptDraft/${scriptId}`,
method: 'get'
});
}
/** 预览脚本仿真(新版)*/
export function scriptDraftRecordNotifyNew(scriptId) {
return request({

View File

@ -8,7 +8,7 @@ export function PasserRender(mapmode) {
this.state = null;
this.nowrender = null;
this.dom = null;
this.windowWidth = null;
this.windowHeight = null;
@ -20,7 +20,7 @@ export function PasserRender(mapmode) {
let renderer = null;
this.initView = function(dom,scene,camerass){
scope.dom = dom;
scope.windowWidth = dom.offsetWidth ;
scope.windowHeight = dom.offsetHeight;
@ -53,11 +53,12 @@ export function PasserRender(mapmode) {
if(mode == "freeview"){
scope.nowrender = freeViewRender;
}
scope.nowrender.changeRender();
scope.nowrender.changeRender(scope.dom);
}
this.reSize = function(offsetWidth,offsetHeight){
scope.nowrender.reSize(offsetWidth,offsetHeight);
scope.nowrender.changeRender(scope.dom);
}
this.update = function(){

View File

@ -76,9 +76,12 @@ export function FourViewRender() {
}
this.changeRender = function(){
this.changeRender = function(dom){
windowWidth = dom.offsetWidth ;
windowHeight = dom.offsetHeight;
renderer.setSize(windowWidth,windowHeight);
renderer.setClearColor(new THREE.Color(0x000000));
renderer.setSize(windowWidth, windowHeight);
renderer.sortObjects = true;
}

View File

@ -26,13 +26,17 @@ export function FreeViewRender() {
renderer = render;
}
this.changeRender = function(){
this.changeRender = function(dom){
windowWidth = dom.offsetWidth ;
windowHeight = dom.offsetHeight;
camera.aspect = windowWidth / windowHeight;
camera.updateProjectionMatrix();
renderer.setClearColor(new THREE.Color(0x000000));
renderer.setViewport( 0, 0, windowWidth, windowHeight);
renderer.setScissor( 0, 0, windowWidth, windowHeight);
renderer.setSize(windowWidth, windowHeight);
renderer.setSize(windowWidth,windowHeight);
renderer.sortObjects = true;
}

View File

@ -54,7 +54,10 @@ export function TwoViewRender(render) {
renderer = render;
}
this.changeRender = function(){
this.changeRender = function(dom){
windowWidth = dom.offsetWidth ;
windowHeight = dom.offsetHeight;
renderer.setClearColor(new THREE.Color(0x000000));
renderer.setSize(windowWidth, windowHeight);
renderer.sortObjects = true;

View File

@ -59,7 +59,7 @@ let passerWebWork = new Worker(JL3D_LOCAL_STATIC+"/workertest/trafficplan/traffi
//老版本临时ai控制
let olddataai = false;
export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) {
export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
// let stats = new Stats();
// dom.appendChild( stats.dom );
@ -185,7 +185,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) {
});
this.initTrafficStart = function(){
passerStation.initCodeStation(initCode);
scope.humanWaitTop = passerStation.nowStation.toppassers;
scope.humanWaitDown = passerStation.nowStation.downpassers;
scope.humanInSpeed = 0;
@ -194,6 +194,8 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) {
passerAi.initPasser(humanlist,topWaitPassers,downWaitPassers,passerHuman,scope);
updatePasserData(humanlist.children.length,topWaitPassers.children.length,downWaitPassers.children.length,outStationPassers.children.length,passerHuman.speed);
}
this.changestation = function(stationname){
@ -229,7 +231,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) {
this.updateNowLeaveData = function(direct,outNum){
if(direct == "top"){
waitForCreatOutTop = getnum(outNum,17);
console.log(waitForCreatOutTop);
// console.log(waitForCreatOutTop);
for(let i=0;i<waitForCreatOutTop.length;i++){
for(let j=0;j<waitForCreatOutTop[i];j++){
setTimeout(function(){

View File

@ -54,7 +54,7 @@ let passerWebWork = new Worker(JL3D_LOCAL_STATIC+"/workertest/passsimulation/sta
//老版本临时ai控制
let olddataai = false;
export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
// let stats = new Stats();
// dom.appendChild( stats.dom );
@ -158,6 +158,16 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
passerWebWork.postMessage("on");
animate();
},1000);
let checkInitCode = setInterval(function(){
// console.log(scope.trainList[initCode]);
if(scope.trainList[initCode]){
scope.updateNowTrainCode(initCode);
clearInterval(checkInitCode);
}
},1000);
});

View File

@ -159,7 +159,7 @@ export function PasserStation() {
scope.stationMesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowStation.code];
scope.stationMesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
updatestationlist(scope.stationlist);
// updatestationlist(scope.stationlist);
}else{
olddataai = true;
}
@ -168,6 +168,21 @@ export function PasserStation() {
this.loadMaterial = function(netdata3d){
Materialload(scope,JSON.parse(netdata3d.data.assets).stationTextureList[0]);
}
this.initCodeStation = function(initCode){
for(let i=0,leni=scope.stationlist.length;i<leni;i++){
// console.log(scope.stationlist[i]);
if(scope.stationlist[i].downstand == initCode || scope.stationlist[i].topstand == initCode){
scope.nowStation = scope.stationlist[i];
if(scope.stationtexture["stationlist"]){
scope.stationMesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowStation.code];
scope.stationMesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
updatestationlist(scope.stationlist,scope.stationlist[i].name);
i=leni;
}
}
}
//更换场景车站
this.changestation = function(stationname){
for(let i=0,leni=scope.stationlist.length;i<leni;i++){

View File

@ -639,6 +639,7 @@ export function AssetLoader(){
//});
if(asset.type == "train"){
console.log(asset);
let realtrain = new THREE.Group();
let j = object.children.length;
for(j;j>0;j--){
@ -653,6 +654,7 @@ export function AssetLoader(){
}
}
}
console.log(realtrain);
asset.mesh = realtrain;
asset.animations = object.animations[0].tracks;

View File

@ -68,7 +68,7 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
let signaldata = JSON.parse(netdata.signals);
let standsdata = JSON.parse(netdata.stands);
let psddata = data.psdList;
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,-13);
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,0);
assetloader.assetPromiseOver(sceneload)
.then(function(data){

View File

@ -58,7 +58,7 @@ class Jlmap {
this.$options = new Options(deepAssign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
this.$painter = new Painter(this);
this.$painter.updateZrSize({width: this.$zr.getWidth(), height: this.$zr.getHeight()});
this.$painter.updateZrSize({width: this.$zr.getWidth(), height: this.$zr.getHeight(), isUpdate:false});
this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000';
this.optionsHandler = this.setOptions.bind(this);
@ -98,7 +98,6 @@ class Jlmap {
this.$options.offsetX = map.origin ? map.origin.x : 0;
this.$options.offsetY = map.origin ? map.origin.y : 0;
}
// 更新视图大小
this.$painter.updateTransform({ scaleRate: this.$options.scaleRate, offsetX: this.$options.offsetX, offsetY: this.$options.offsetY });
@ -585,6 +584,7 @@ class Jlmap {
resize(opt) {
this.$zr.resize(opt);
opt.isUpdate = false;
this.$painter.updateZrSize(opt);
}
@ -612,7 +612,7 @@ class Jlmap {
this.off(this.events.Pan, this.optionsHandler);
this.off(this.events.Zoom, this.optionsHandler);
this.clear();
// this.clear();
this.$mouseController.dispose();
this.$keyboardController.dispose();

View File

@ -275,7 +275,6 @@ class Painter {
zrUtil.each(Object.values(this.mapInstanceLevel), (level) => {
level && level.removeAll();
}, this);
this.refresh();
}

View File

@ -288,11 +288,8 @@ export default class Section extends Group {
/** 计算提示位置*/
getShapeTipPoint() {
let rect = this.getBoundingRect();
const rect = this.getBoundingRect();
const distance = this.style.Section.line.width / 2;
if (this.line && this.line.getBoundingRect()) {
rect = this.line.getBoundingRect();
}
return {
x: rect.x + rect.width / 2,
y: rect.y + rect.height / 2.7 - distance
@ -301,7 +298,7 @@ export default class Section extends Group {
getBoundingRect() {
if (this.line && this.line.getBoundingRect()) {
return this.line.getBoundingRect().clone();
return this.line.getBoundingRect();
} else if (this.name && this.name.getBoundingRect()) {
return this.name.getBoundingRect();
}

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
@ -18,7 +17,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand';
@ -37,7 +35,6 @@ export default {
components: {
MenuBar,
MenuButton,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,

View File

@ -1,122 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
isScreen() { //
return this.$route.params.mode === 'dp' ||
this.$store.state.training.roles == 'BigScreen';
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
if (this.isScreen) {
this.menu = [...this.menuScreen];
}
// else {
// this.menu = [...this.menuNormal];
// }
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="chengdou-01__menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-request ref="menuRequest" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
@ -19,7 +18,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuRequest from './menuRequest';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';

View File

@ -1,94 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.clickEvent();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
@ -17,7 +16,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand';

View File

@ -1,94 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.clickEvent();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
@ -20,7 +19,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuAxleReset from './menuAxleReset';

View File

@ -1,119 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
isScreen() { //
return this.$route.params.mode === 'dp' ||
this.$store.state.training.roles == 'BigScreen';
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
if (this.isScreen) {
this.menu = [...this.menuScreen];
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
@ -16,7 +15,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
@ -32,7 +30,6 @@ export default {
name: 'Menus',
components: {
MenuBar,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,

View File

@ -1,124 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { Notification } from 'element-ui';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: this.$t('menu.menuCancle.zoomIn'),
handler: this.magnifyMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.zoomOut'),
handler: this.shrinkMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.back'),
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
this.stationList.forEach(station => {
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = {
label: station.name,
children: [{
code: station.code,
label: station.name,
handler: this.mapLocation
}]
};
station.chargeStationCodeList.forEach(item => {
const next = this.$store.getters['map/getDeviceByCode'](item);
node.children.push({
code: next.code,
label: next.name,
handler: this.mapLocation
});
});
this.menuNormal.push(node);
}
});
this.menu = [...this.menuNormal];
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
history.go(-1);
Notification.closeAll();
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" />
@ -17,7 +16,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuTrain from './menuTrain';
import MenuBar from './menuBar';
import MenuButton from './menuButton';
@ -35,7 +33,6 @@ export default {
components: {
MenuBar,
MenuButton,
MenuCancel,
MenuTrain,
MenuSignal,
MenuSwitch,

View File

@ -1,119 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { Notification } from 'element-ui';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: this.$t('menu.menuCancle.zoomIn'),
handler: this.magnifyMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.zoomOut'),
handler: this.shrinkMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.back'),
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
this.stationList.forEach(station => {
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = {
label: station.name,
children: []
};
station.chargeStationCodeList.forEach(item => {
const next = this.$store.getters['map/getDeviceByCode'](item);
node.children.push({
code: next.code,
label: next.name,
handler: this.mapLocation
});
});
this.menuNormal.push(node);
}
});
this.menu = [...this.menuNormal];
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
history.go(-1);
Notification.closeAll();
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
@ -21,7 +20,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuAxleReset from './menuAxleReset';
import MenuAutoTrunRoute from './menuAutoTrunRoute';
@ -44,7 +42,6 @@ export default {
MenuBar,
MenuAxleReset,
MenuAutoTrunRoute,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,

View File

@ -1,119 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
isScreen() { //
return this.$route.params.mode === 'dp' ||
this.$store.state.training.roles == 'BigScreen';
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
if (this.isScreen) {
this.menu = [...this.menuScreen];
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
@ -21,7 +20,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuAxleReset from './menuAxleReset';
import MenuAutoTrunRoute from './menuAutoTrunRoute';
@ -44,7 +42,6 @@ export default {
MenuBar,
MenuAxleReset,
MenuAutoTrunRoute,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,

View File

@ -1,119 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
isScreen() { //
return this.$route.params.mode === 'dp' ||
this.$store.state.training.roles == 'BigScreen';
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
if (this.isScreen) {
this.menu = [...this.menuScreen];
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
@ -22,7 +21,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuAxleReset from './menuAxleReset';
import MenuAutoTrunRoute from './menuAutoTrunRoute';
@ -46,7 +44,6 @@ export default {
MenuBar,
MenuAxleReset,
MenuAutoTrunRoute,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,

View File

@ -1,119 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
import { runDiagramQuit } from '@/api/simulation';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: '放大地图',
handler: this.magnifyMap,
disabled: false
},
{
label: '缩小地图',
handler: this.shrinkMap,
disabled: false
},
{
label: '返回',
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
isScreen() { //
return this.$route.params.mode === 'dp' ||
this.$store.state.training.roles == 'BigScreen';
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
if (this.isScreen) {
this.menu = [...this.menuScreen];
}
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
await runDiagramQuit(this.group);
EventBus.$emit('trainingSubscribeStop');
history.go(-1);
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
@ -17,7 +16,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
@ -34,7 +32,6 @@ export default {
name: 'Menus',
components: {
MenuBar,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,

View File

@ -1,119 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { Notification } from 'element-ui';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: this.$t('menu.menuCancle.zoomIn'),
handler: this.magnifyMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.zoomOut'),
handler: this.shrinkMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.back'),
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
this.stationList.forEach(station => {
if (station.relStationCodeList && station.ciStation && station.relStationCodeList.length) {
const node = {
label: station.name,
children: []
};
station.relStationCodeList.forEach(item => {
const next = this.$store.getters['map/getDeviceByCode'](item);
node.children.push({
code: next.code,
label: next.name,
handler: this.mapLocation
});
});
this.menuNormal.push(node);
}
});
this.menu = [...this.menuNormal];
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
history.go(-1);
Notification.closeAll();
exitFullscreen();
}
}
};
</script>

View File

@ -1,6 +1,5 @@
<template>
<div class="xian-02__menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
<menu-station-control ref="menuStationControl" :selected="selected" />
@ -19,7 +18,6 @@
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuAxleReset from './menuAxleReset';
import MenuAutoTrunRoute from './menuAutoTrunRoute';
@ -41,7 +39,6 @@ export default {
components: {
MenuAxleReset,
MenuAutoTrunRoute,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,

View File

@ -1,259 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" />
<notice-info ref="noticeInfo" pop-class="xian-02__system" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu/index';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import deviceType from '@/jmapNew/constant/deviceType';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'CancelMenu',
components: {
PopMenu,
NoticeInfo
},
data() {
return {
menu: [],
menuNormal: [
{
label: '发送',
handler: this.sendRequestList
},
{
label: '取消',
handler: this.undeveloped
},
{
label: '全部扣车',
children: [
{
label: '正线上全部扣车',
handler: this.undeveloped
}
]
},
{
label: '全部发车',
children: [
{
label: '缓解正线所有列车',
handler: this.undeveloped
}
]
},
{
label: '停止所有列车',
children: [
{
label: '停止正线所有列车',
handler: this.undeveloped
}
]
},
{
label: '车站选择',
children: []
},
{
label: '列车选择',
handler: this.undeveloped
},
{
label: '缩放',
handler: this.undeveloped
},
{
label: '显示控制',
children: [
{
label: '正线及车辆段',
handler: this.undeveloped
},
{
label: '列车信息',
handler: this.undeveloped
}
]
},
{
label: '下一窗口',
handler: this.undeveloped
},
{
label: '上一窗口',
handler: this.undeveloped
},
{
label: '激活所有菜单',
children: [
{
label: '确认',
handler: this.undeveloped
}
]
},
{
label: '恢复激活菜单',
handler: this.undeveloped
},
{
label: '进路模式 - 授权车站',
children: [
{
label: '自动',
handler: this.undeveloped
},
{
label: '人工',
handler: this.undeveloped
}
]
},
{
label: '列车报警确认',
children: [
{
label: '列车完整性报警确认',
handler: this.undeveloped
}
]
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
if (this.menu && this.menu.length > 1) {
this.menu[0].disabled = true;
this.menu[1].disabled = !((this.menu[1] && val));
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
label: station.name,
code: station.code,
handler: this.mapLocation
};
list.push(node);
}
});
return list;
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal[5].children = this.initStationList();
this.menu = this.menuNormal;
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
sendRequestList() {
const requestList = this.$store.state.menuOperation.requestList;
if (requestList && requestList.length > 0) {
this.commitEachCommand(requestList);
}
},
commitEachCommand(requestList) {
const eachCmd = requestList[0];
let operate = '';
if (eachCmd.ciConfirm) {
operate = {
code: eachCmd.device.code,
operation: eachCmd.operation.code,
param: eachCmd.param //
};
const deviceStatus = {code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 1};
if (eachCmd.device._type === deviceType.Signal) {
deviceStatus.isRequestLock = 0;
deviceStatus.isRequestGuide = 0;
}
this.$store.dispatch('training/updateMapState', [deviceStatus]);
} else {
operate = {
send: true,
operation: eachCmd.operation.code,
cmdType: eachCmd.cmdType,
param: eachCmd.param //
};
const deviceStatus = {code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 0};
if (eachCmd.device._type === deviceType.Signal) {
deviceStatus.isRequestLock = 0;
deviceStatus.isRequestGuide = 0;
}
this.$store.dispatch('training/updateMapState', [deviceStatus]);
}
this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code});
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (requestList.length) {
this.commitEachCommand(requestList);
}
} else {
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo.doShow();
});
}
}
};
</script>

View File

@ -13,6 +13,7 @@ class TransformHandle {
}
checkVisible(view) {
// console.log(view);
return createBoundingRect(view).intersect(this.rect);
}
@ -22,7 +23,6 @@ class TransformHandle {
} else {
view.hide();
}
view.dirty();
}
@ -54,7 +54,7 @@ class TransformHandle {
// 更新画布尺寸
updateZrSize(opts) {
this.rect = { x: 0, y: 0, width: opts.width, height: opts.height };
this.revisibleAll();
if (opts.isUpdate) { this.revisibleAll(); }
}
// 遍历group执行回调

View File

@ -65,7 +65,6 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
const PlanMonitorEditUserTool = () => import('@/views/planMonitor/editTool/userindex');
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
const DesignPlatformHome = () => import('@/views/designPlatform/home');
@ -222,11 +221,6 @@ export const publicAsyncRoute = [
component: Jlmap3d,
hidden: true
},
{ // 运行图编辑
path: '/plan/usertool',
component: PlanMonitorEditUserTool,
hidden: true
},
{ // 运行图编辑
path: '/plan/tool',
component: PlanMonitorEditTool,

View File

@ -15,7 +15,7 @@
<script>
import {adminPublishLesson, rejectedLessonRelease, reviewLessonList, reviewScriptList, publishScript, rejectScript, reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan} from '@/api/designPlatform';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { scriptDraftRecordNotify } from '@/api/simulation';
import { scriptDraftRecordNotifyNew } from '@/api/simulation';
import LessonDetail from './detail';
import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/scripts/ConstDic';
@ -508,7 +508,7 @@ export default {
},
scriptPreview(index, row) {
const mapInfo = this.mapList.find(elem=>{ return elem.id == row.mapId; });
scriptDraftRecordNotify(row.id).then(resp => {
scriptDraftRecordNotifyNew(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:mapInfo.lineCode};
this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query });
launchFullscreen();

View File

@ -139,7 +139,7 @@ export default {
methods: {
init: function () {
// let mapdata = this.$store.state.socket.device;
const dom = document.getElementById('jl3d');
let dom = document.getElementById('jl3d');
this.jl3d = new Jl3dpassflow(dom, this.$route.query.mapid, this.$route.query.group, 'normal');
},
switchrender() {

View File

@ -47,6 +47,7 @@ export default {
},
data() {
return {
initCode:null,
localStatic:JL3D_LOCAL_STATIC,
jl3d: null,
rendermode:'监控视角',
@ -81,7 +82,8 @@ export default {
this.group = this.$route.query.group;
this.mapId = this.$route.query.mapId;
this.lineCode = this.$route.query.lineCode;
this.init();
this.initCode = this.$route.query.deviceCode;
this.init(this.initCode);
window.updatestationlist = this.updatestationlist;
if (this.$route.query.type == 'CCTV') {
this.isCctv = false;
@ -91,10 +93,10 @@ export default {
beforeDestroy() {
},
methods: {
init: function () {
init: function (code) {
// let mapdata = this.$store.state.socket.device;
const dom = document.getElementById('jl3d');
this.jl3d = new Jl3dTrafficPlan(dom, this.$route.query.mapid, this.$route.query.group, 'normal');
this.jl3d = new Jl3dTrafficPlan(dom, this.$route.query.mapid, this.$route.query.group, 'normal',code);
},
switchrender() {
if (this.renderswitch == true) {
@ -108,9 +110,14 @@ export default {
}
},
updatestationlist(list) {
updatestationlist(list,nowname) {
// console.log(list);
if(nowname){
this.value = nowname;
}else{
this.value = list[0].name;
}
this.stationlist = list;
},
currentsel(selVal) {

View File

@ -15,6 +15,7 @@
</div>
<div class="trunklist">
<div class="trunk" :class="{active:index==isActive}"
v-model="value"
:style="{'background-image': 'url('+localStatic+trunkAsse+')'}"
v-for="(trunkAsse,index) in trunkAssetList" @click="assetSelect(index)" >
</div>
@ -114,7 +115,7 @@ export default {
},
data() {
return {
initCode:null,
isActive:0,
localStatic:JL3D_LOCAL_STATIC,
openeds:['2','3','4','5','6','7'],
@ -159,8 +160,8 @@ export default {
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
},
mounted() {
this.init();
this.initCode = this.$route.query.deviceCode;
this.init(this.initCode);
this.takelist = this.getnum(this.allPassers,6);
// console.log(this.takelist);
if (this.$route.query.type == 'CCTV') {
@ -173,10 +174,11 @@ export default {
beforeDestroy() {
},
methods: {
init: function () {
init: function (code) {
// let mapdata = this.$store.state.socket.device;
this.value = code;
const dom = document.getElementById('jl3d');
this.jl3d = new Jl3dTrafficTrain(dom, this.$route.query.mapid, this.$route.query.group, 'normal');
this.jl3d = new Jl3dTrafficTrain(dom, this.$route.query.mapid, this.$route.query.group, 'normal',code);
},
assetSelect(index){
// console.log(index);
@ -213,6 +215,7 @@ export default {
// }
// // console.log(this.trainlist);
},
updateTrainCode(selVal) {
// console.log(selVal);
// this.jl3d.changeTrain(selVal);

View File

@ -259,12 +259,8 @@ export default {
}
}).catch(error => {
this.clearData();
if (error.code == 30002) {
this.handleReGenerate(day);
} else {
this.$messageBox(`${error.message}`);
this.loading = false;
}
});
}
},
@ -282,20 +278,6 @@ export default {
this.$messageBox(`${error.message}`);
});
},
handleReGenerate(day) {
generateSchedulingAgain(this.group).then(resp => {
this.loading = false;
this.tableData = this.initTableData(resp.data.planList || []);
this.formModel.id = resp.data.id;
this.formModel.planDate = resp.data.planDate;
this.formModel.runPlanName = resp.data.runPlanName;
this.$message.success(this.$t('display.schedule.regenerateSchedulePlanSuccess'));
}).catch(error => {
this.loading = false;
this.clearData();
this.$messageBox(`${error.message}`);
});
},
handleSave() {
if (this.formModel.planDate) {
saveSchedulingNew(this.group, this.tableData).then(resp => {

View File

@ -5,6 +5,7 @@
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
<!-- 地图错误判断 -->
<template v-if="project === 'bjd'">
<el-button size="small" @click="passengersView">客流视图</el-button>
<el-button v-if="running" size="small" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
</template>
@ -15,8 +16,8 @@
<!-- cctv视图 -->
<el-button v-if="cctvShow && !isContest && project !== 'bjd'" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
<!-- 客流规划视图 -->
<el-button v-if="trafficplanShow && !isContest" size="small" @click="jumpjl3dtrafficplan">{{ jl3dtrafficplan }}</el-button>
<el-button v-if="trafficplanShow && !isContest" size="small" @click="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button>
<!-- <el-button v-if="trafficplanShow && project == 'bjd' && !isContest" size="small" @click="jumpjl3dtrafficplan">{{ jl3dtrafficplan }}</el-button>
<el-button v-if="trafficplanShow && project == 'bjd' && !isContest" size="small" @click="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button> -->
<!-- 故障设备视图 -->
<el-button v-if="jlmap3dFaultShow" size="small" @click="jumpjlmap3dFault">故障设备</el-button>
@ -32,7 +33,6 @@
<el-button v-if="project === 'bjd'" size="small" @click="distribute">权限分发</el-button>
<el-button v-if="isContest || project === 'bjd'" size="small" @click="messageBoardShow">留言板</el-button>
<el-button v-if="isContest || project === 'bjd'" size="small" @click="contectUs">联系方式</el-button>
<el-button v-if="project === 'bjd'" size="small" @click="passengersView">客流视图</el-button>
</el-button-group>
</div>
<Jl3d-Device
@ -213,32 +213,32 @@ export default {
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
jumpjl3dtrafficplan() {
const routeData = this.$router.resolve({
path:'/jlmap3d/trafficplan',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true,
lineCode:this.lineCode
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
jumpjl3dtraffictrain() {
const routeData = this.$router.resolve({
path:'/jlmap3d/traffictrain',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true,
lineCode:this.lineCode
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
// jumpjl3dtrafficplan() {
// const routeData = this.$router.resolve({
// path:'/jlmap3d/trafficplan',
// query:{
// mapid:this.mapId,
// group:this.group,
// project: this.project,
// noPreLogout: true,
// lineCode:this.lineCode
// }
// });
// window.open(routeData.href, '_blank', 'noopener noreferrer');
// },
// jumpjl3dtraffictrain() {
// const routeData = this.$router.resolve({
// path:'/jlmap3d/traffictrain',
// query:{
// mapid:this.mapId,
// group:this.group,
// project: this.project,
// noPreLogout: true,
// lineCode:this.lineCode
// }
// });
// window.open(routeData.href, '_blank', 'noopener noreferrer');
// },
jumpjlmap3dFault() {
const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer',

View File

@ -124,7 +124,7 @@ export default {
beforeDestroy() {
clearSimulation(this.group);
this.$store.dispatch('training/reset');
this.$store.dispatch('map/mapClear');
// this.$store.dispatch('map/mapClear');
},
async mounted() {
this.setWindowSize();

View File

@ -6,8 +6,10 @@
</span>
</div>
<div class="handleShow">
<span v-if="show" class="el-icon-arrow-right" style="cursor:pointer" @click="handleSliderShow(true)">{{ $t('display.lesson.unfold') }}</span>
<span v-else class="el-icon-arrow-left" style="cursor:pointer" @click="handleSliderShow(false)">{{ $t('display.lesson.fold') }}</span>
<!-- {{ $t('display.lesson.unfold') }} -->
<span v-if="show" class="el-icon-arrow-right" style="cursor:pointer" @click="handleSliderShow(true)">实训列表</span>
<!-- {{ $t('display.lesson.fold') }} -->
<span v-else class="el-icon-arrow-left" style="cursor:pointer" @click="handleSliderShow(false)">实训列表</span>
</div>
<div class="slider-tree">
<el-scrollbar wrap-class="scrollbar-wrapper" style="background: #fff;">

View File

@ -222,6 +222,7 @@ export default {
this.$store.dispatch('map/mapClear');
if (this.$jlmap) {
this.$jlmap.dispose();
this.$jlmap = null;
}
},
methods: {
@ -384,7 +385,45 @@ export default {
},
//
onSelected(em) {
console.log(em);
const path = window.location.href;
if (path.includes("/practiceDisplay")){
if(em.deviceType == "StationStand"){
// console.log(em.deviceType );
const routeData = this.$router.resolve({
path:'/jlmap3d/trafficplan',
query:{
mapid:this.$route.query.mapId,
group:this.$route.query.group,
project: this.$route.query.project,
noPreLogout: true,
lineCode:this.$route.query.lineCode,
deviceCode:em.deviceCode,
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
if(em.deviceType == "Train"){
// console.log(em.deviceType );
const routeData = this.$router.resolve({
path:'/jlmap3d/traffictrain',
query:{
mapid:this.$route.query.mapId,
group:this.$route.query.group,
project: this.$route.query.project,
noPreLogout: true,
lineCode:this.$route.query.lineCode,
deviceCode:em.deviceCode,
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
}else{
this.$emit('onSelect', em);
}
},
//
onContextMenu(em) {

View File

@ -13,8 +13,8 @@
<!-- cctv视图 -->
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button>
<!-- 客流规划视图 -->
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dtrafficplan">{{ $t('display.demon.trafficplantext') }}</el-button>
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button>
<el-button v-if="project == 'bjd' && (isShowScheduling || isStationSupervisor)" size="small" @click="jumpjl3dtrafficplan">{{ $t('display.demon.trafficplantext') }}</el-button>
<el-button v-if="project == 'bjd' && (isShowScheduling || isStationSupervisor)" size="small" @click="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button>
<el-button v-if="(isShowScheduling || isStationSupervisor)&&project !== 'bjd'" size="small" @click="jumpjl3dfaultdevice">{{ $t('display.demon.maintainer') }}</el-button>
<!-- <el-button v-if="isAdmin" size="small" @click="otherVrView">VR第三人称视角</el-button> -->