Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
e249c344eb
@ -2,10 +2,15 @@ import request from '@/utils/request';
|
|||||||
|
|
||||||
import { getBaseUrl } from '@/utils/baseUrl';
|
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();
|
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 uploadurl = null;
|
||||||
let asseturl = null;
|
let asseturl = null;
|
||||||
|
|
||||||
@ -21,8 +26,8 @@ if(BASE_API == "https://test.joylink.club/jlcloud"){
|
|||||||
}else{
|
}else{
|
||||||
// uploadurl = "https://joylink.club/jlfile";
|
// uploadurl = "https://joylink.club/jlfile";
|
||||||
// asseturl = "https://joylink.club/oss/joylink";
|
// asseturl = "https://joylink.club/oss/joylink";
|
||||||
uploadurl = JL3D_LOCAL_STATIC;
|
uploadurl = "";
|
||||||
asseturl = JL3D_LOCAL_STATIC;
|
asseturl = "";
|
||||||
}
|
}
|
||||||
const BASE_UPLOAD_API = uploadurl;
|
const BASE_UPLOAD_API = uploadurl;
|
||||||
export const BASE_ASSET_API = asseturl;
|
export const BASE_ASSET_API = asseturl;
|
||||||
|
@ -1,37 +1,5 @@
|
|||||||
import request from '@/utils/request';
|
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) {
|
export function sendCommandNew(group, commandDefinitionId, command) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -362,7 +362,7 @@ export function postDailyRunPlanLoadGenerate(id) {
|
|||||||
// 加载通用排班计划
|
// 加载通用排班计划
|
||||||
export function postSchedulingCommonGenerate(mapId) {
|
export function postSchedulingCommonGenerate(mapId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/scheduling/common/generate?mapId=${mapId}`,
|
url: `/api/v1/scheduling/generate/common?mapId=${mapId}`,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
export function generateSchedulingAgain(group) {
|
|
||||||
return request({
|
|
||||||
url: `/api/scheduling/${group}/rebuild`,
|
|
||||||
method: 'delete'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 查询某天的派班计划 */
|
/** 查询某天的派班计划 */
|
||||||
export function querySechedulingNew (group, params) {
|
export function querySechedulingNew (group, params) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -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 }) {
|
export function trainingNotifyNew({ trainingId }) {
|
||||||
return request({
|
return request({
|
||||||
@ -57,7 +49,7 @@ export function examNotifyNew({ examId }) {
|
|||||||
/** 获取用户实训列表*/
|
/** 获取用户实训列表*/
|
||||||
export function getSimulationList(data) {
|
export function getSimulationList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/simulation/stats`,
|
url: `/api/stats/simulation`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
});
|
});
|
||||||
@ -66,7 +58,7 @@ export function getSimulationList(data) {
|
|||||||
/** 添加用户仿真数据*/
|
/** 添加用户仿真数据*/
|
||||||
export function postSimulationStats(data) {
|
export function postSimulationStats(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/simulation/stats`,
|
url: `/api/stats/simulation`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -75,7 +67,7 @@ export function postSimulationStats(data) {
|
|||||||
/** 更新用户仿真数据*/
|
/** 更新用户仿真数据*/
|
||||||
export function putSimulationStats(data) {
|
export function putSimulationStats(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/simulation/${data.id}/stats`,
|
url: `/api/stats/${data.id}`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -84,7 +76,7 @@ export function putSimulationStats(data) {
|
|||||||
/** 删除用户仿真数据*/
|
/** 删除用户仿真数据*/
|
||||||
export function deleteSimulationStats(statsId) {
|
export function deleteSimulationStats(statsId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/simulation/${statsId}`,
|
url: `/api/stats/${statsId}`,
|
||||||
method: 'delete'
|
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) {
|
export function scriptDraftRecordNotifyNew(scriptId) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -8,7 +8,7 @@ export function PasserRender(mapmode) {
|
|||||||
this.state = null;
|
this.state = null;
|
||||||
|
|
||||||
this.nowrender = null;
|
this.nowrender = null;
|
||||||
|
this.dom = null;
|
||||||
|
|
||||||
this.windowWidth = null;
|
this.windowWidth = null;
|
||||||
this.windowHeight = null;
|
this.windowHeight = null;
|
||||||
@ -20,7 +20,7 @@ export function PasserRender(mapmode) {
|
|||||||
let renderer = null;
|
let renderer = null;
|
||||||
|
|
||||||
this.initView = function(dom,scene,camerass){
|
this.initView = function(dom,scene,camerass){
|
||||||
|
scope.dom = dom;
|
||||||
scope.windowWidth = dom.offsetWidth ;
|
scope.windowWidth = dom.offsetWidth ;
|
||||||
scope.windowHeight = dom.offsetHeight;
|
scope.windowHeight = dom.offsetHeight;
|
||||||
|
|
||||||
@ -53,11 +53,12 @@ export function PasserRender(mapmode) {
|
|||||||
if(mode == "freeview"){
|
if(mode == "freeview"){
|
||||||
scope.nowrender = freeViewRender;
|
scope.nowrender = freeViewRender;
|
||||||
}
|
}
|
||||||
scope.nowrender.changeRender();
|
scope.nowrender.changeRender(scope.dom);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.reSize = function(offsetWidth,offsetHeight){
|
this.reSize = function(offsetWidth,offsetHeight){
|
||||||
scope.nowrender.reSize(offsetWidth,offsetHeight);
|
scope.nowrender.reSize(offsetWidth,offsetHeight);
|
||||||
|
scope.nowrender.changeRender(scope.dom);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.update = function(){
|
this.update = function(){
|
||||||
|
@ -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.setClearColor(new THREE.Color(0x000000));
|
||||||
renderer.setSize(windowWidth, windowHeight);
|
|
||||||
renderer.sortObjects = true;
|
renderer.sortObjects = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,13 +26,17 @@ export function FreeViewRender() {
|
|||||||
renderer = render;
|
renderer = render;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.changeRender = function(){
|
this.changeRender = function(dom){
|
||||||
|
windowWidth = dom.offsetWidth ;
|
||||||
|
windowHeight = dom.offsetHeight;
|
||||||
|
|
||||||
|
|
||||||
camera.aspect = windowWidth / windowHeight;
|
camera.aspect = windowWidth / windowHeight;
|
||||||
camera.updateProjectionMatrix();
|
camera.updateProjectionMatrix();
|
||||||
renderer.setClearColor(new THREE.Color(0x000000));
|
renderer.setClearColor(new THREE.Color(0x000000));
|
||||||
renderer.setViewport( 0, 0, windowWidth, windowHeight);
|
renderer.setViewport( 0, 0, windowWidth, windowHeight);
|
||||||
renderer.setScissor( 0, 0, windowWidth, windowHeight);
|
renderer.setScissor( 0, 0, windowWidth, windowHeight);
|
||||||
renderer.setSize(windowWidth, windowHeight);
|
renderer.setSize(windowWidth,windowHeight);
|
||||||
renderer.sortObjects = true;
|
renderer.sortObjects = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,10 @@ export function TwoViewRender(render) {
|
|||||||
renderer = render;
|
renderer = render;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.changeRender = function(){
|
this.changeRender = function(dom){
|
||||||
|
windowWidth = dom.offsetWidth ;
|
||||||
|
windowHeight = dom.offsetHeight;
|
||||||
|
|
||||||
renderer.setClearColor(new THREE.Color(0x000000));
|
renderer.setClearColor(new THREE.Color(0x000000));
|
||||||
renderer.setSize(windowWidth, windowHeight);
|
renderer.setSize(windowWidth, windowHeight);
|
||||||
renderer.sortObjects = true;
|
renderer.sortObjects = true;
|
||||||
|
@ -59,7 +59,7 @@ let passerWebWork = new Worker(JL3D_LOCAL_STATIC+"/workertest/trafficplan/traffi
|
|||||||
//老版本临时ai控制
|
//老版本临时ai控制
|
||||||
let olddataai = false;
|
let olddataai = false;
|
||||||
|
|
||||||
export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) {
|
export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
|
||||||
|
|
||||||
// let stats = new Stats();
|
// let stats = new Stats();
|
||||||
// dom.appendChild( stats.dom );
|
// dom.appendChild( stats.dom );
|
||||||
@ -185,7 +185,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.initTrafficStart = function(){
|
this.initTrafficStart = function(){
|
||||||
|
passerStation.initCodeStation(initCode);
|
||||||
scope.humanWaitTop = passerStation.nowStation.toppassers;
|
scope.humanWaitTop = passerStation.nowStation.toppassers;
|
||||||
scope.humanWaitDown = passerStation.nowStation.downpassers;
|
scope.humanWaitDown = passerStation.nowStation.downpassers;
|
||||||
scope.humanInSpeed = 0;
|
scope.humanInSpeed = 0;
|
||||||
@ -194,6 +194,8 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) {
|
|||||||
passerAi.initPasser(humanlist,topWaitPassers,downWaitPassers,passerHuman,scope);
|
passerAi.initPasser(humanlist,topWaitPassers,downWaitPassers,passerHuman,scope);
|
||||||
|
|
||||||
updatePasserData(humanlist.children.length,topWaitPassers.children.length,downWaitPassers.children.length,outStationPassers.children.length,passerHuman.speed);
|
updatePasserData(humanlist.children.length,topWaitPassers.children.length,downWaitPassers.children.length,outStationPassers.children.length,passerHuman.speed);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.changestation = function(stationname){
|
this.changestation = function(stationname){
|
||||||
@ -229,7 +231,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap) {
|
|||||||
this.updateNowLeaveData = function(direct,outNum){
|
this.updateNowLeaveData = function(direct,outNum){
|
||||||
if(direct == "top"){
|
if(direct == "top"){
|
||||||
waitForCreatOutTop = getnum(outNum,17);
|
waitForCreatOutTop = getnum(outNum,17);
|
||||||
console.log(waitForCreatOutTop);
|
// console.log(waitForCreatOutTop);
|
||||||
for(let i=0;i<waitForCreatOutTop.length;i++){
|
for(let i=0;i<waitForCreatOutTop.length;i++){
|
||||||
for(let j=0;j<waitForCreatOutTop[i];j++){
|
for(let j=0;j<waitForCreatOutTop[i];j++){
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
@ -54,7 +54,7 @@ let passerWebWork = new Worker(JL3D_LOCAL_STATIC+"/workertest/passsimulation/sta
|
|||||||
//老版本临时ai控制
|
//老版本临时ai控制
|
||||||
let olddataai = false;
|
let olddataai = false;
|
||||||
|
|
||||||
export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
|
export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
|
||||||
|
|
||||||
// let stats = new Stats();
|
// let stats = new Stats();
|
||||||
// dom.appendChild( stats.dom );
|
// dom.appendChild( stats.dom );
|
||||||
@ -158,6 +158,16 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
|
|||||||
passerWebWork.postMessage("on");
|
passerWebWork.postMessage("on");
|
||||||
animate();
|
animate();
|
||||||
},1000);
|
},1000);
|
||||||
|
|
||||||
|
let checkInitCode = setInterval(function(){
|
||||||
|
// console.log(scope.trainList[initCode]);
|
||||||
|
if(scope.trainList[initCode]){
|
||||||
|
|
||||||
|
scope.updateNowTrainCode(initCode);
|
||||||
|
clearInterval(checkInitCode);
|
||||||
|
}
|
||||||
|
},1000);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ export function PasserStation() {
|
|||||||
scope.stationMesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowStation.code];
|
scope.stationMesh.getObjectByName("zhantaiming").material.map = scope.stationtexture[scope.nowStation.code];
|
||||||
scope.stationMesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
scope.stationMesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||||
}
|
}
|
||||||
updatestationlist(scope.stationlist);
|
// updatestationlist(scope.stationlist);
|
||||||
}else{
|
}else{
|
||||||
olddataai = true;
|
olddataai = true;
|
||||||
}
|
}
|
||||||
@ -168,6 +168,21 @@ export function PasserStation() {
|
|||||||
this.loadMaterial = function(netdata3d){
|
this.loadMaterial = function(netdata3d){
|
||||||
Materialload(scope,JSON.parse(netdata3d.data.assets).stationTextureList[0]);
|
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){
|
this.changestation = function(stationname){
|
||||||
for(let i=0,leni=scope.stationlist.length;i<leni;i++){
|
for(let i=0,leni=scope.stationlist.length;i<leni;i++){
|
||||||
|
@ -639,6 +639,7 @@ export function AssetLoader(){
|
|||||||
//});
|
//});
|
||||||
|
|
||||||
if(asset.type == "train"){
|
if(asset.type == "train"){
|
||||||
|
console.log(asset);
|
||||||
let realtrain = new THREE.Group();
|
let realtrain = new THREE.Group();
|
||||||
let j = object.children.length;
|
let j = object.children.length;
|
||||||
for(j;j>0;j--){
|
for(j;j>0;j--){
|
||||||
@ -653,6 +654,7 @@ export function AssetLoader(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(realtrain);
|
||||||
asset.mesh = realtrain;
|
asset.mesh = realtrain;
|
||||||
asset.animations = object.animations[0].tracks;
|
asset.animations = object.animations[0].tracks;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
|
|||||||
let signaldata = JSON.parse(netdata.signals);
|
let signaldata = JSON.parse(netdata.signals);
|
||||||
let standsdata = JSON.parse(netdata.stands);
|
let standsdata = JSON.parse(netdata.stands);
|
||||||
let psddata = data.psdList;
|
let psddata = data.psdList;
|
||||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,-13);
|
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,0);
|
||||||
|
|
||||||
assetloader.assetPromiseOver(sceneload)
|
assetloader.assetPromiseOver(sceneload)
|
||||||
.then(function(data){
|
.then(function(data){
|
||||||
|
@ -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.$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 = 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.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000';
|
||||||
this.optionsHandler = this.setOptions.bind(this);
|
this.optionsHandler = this.setOptions.bind(this);
|
||||||
|
|
||||||
@ -98,7 +98,6 @@ class Jlmap {
|
|||||||
this.$options.offsetX = map.origin ? map.origin.x : 0;
|
this.$options.offsetX = map.origin ? map.origin.x : 0;
|
||||||
this.$options.offsetY = map.origin ? map.origin.y : 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 });
|
this.$painter.updateTransform({ scaleRate: this.$options.scaleRate, offsetX: this.$options.offsetX, offsetY: this.$options.offsetY });
|
||||||
|
|
||||||
@ -585,6 +584,7 @@ class Jlmap {
|
|||||||
|
|
||||||
resize(opt) {
|
resize(opt) {
|
||||||
this.$zr.resize(opt);
|
this.$zr.resize(opt);
|
||||||
|
opt.isUpdate = false;
|
||||||
this.$painter.updateZrSize(opt);
|
this.$painter.updateZrSize(opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ class Jlmap {
|
|||||||
this.off(this.events.Pan, this.optionsHandler);
|
this.off(this.events.Pan, this.optionsHandler);
|
||||||
this.off(this.events.Zoom, this.optionsHandler);
|
this.off(this.events.Zoom, this.optionsHandler);
|
||||||
|
|
||||||
this.clear();
|
// this.clear();
|
||||||
|
|
||||||
this.$mouseController.dispose();
|
this.$mouseController.dispose();
|
||||||
this.$keyboardController.dispose();
|
this.$keyboardController.dispose();
|
||||||
|
@ -275,7 +275,6 @@ class Painter {
|
|||||||
zrUtil.each(Object.values(this.mapInstanceLevel), (level) => {
|
zrUtil.each(Object.values(this.mapInstanceLevel), (level) => {
|
||||||
level && level.removeAll();
|
level && level.removeAll();
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,11 +288,8 @@ export default class Section extends Group {
|
|||||||
|
|
||||||
/** 计算提示位置*/
|
/** 计算提示位置*/
|
||||||
getShapeTipPoint() {
|
getShapeTipPoint() {
|
||||||
let rect = this.getBoundingRect();
|
const rect = this.getBoundingRect();
|
||||||
const distance = this.style.Section.line.width / 2;
|
const distance = this.style.Section.line.width / 2;
|
||||||
if (this.line && this.line.getBoundingRect()) {
|
|
||||||
rect = this.line.getBoundingRect();
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
x: rect.x + rect.width / 2,
|
x: rect.x + rect.width / 2,
|
||||||
y: rect.y + rect.height / 2.7 - distance
|
y: rect.y + rect.height / 2.7 - distance
|
||||||
@ -301,7 +298,7 @@ export default class Section extends Group {
|
|||||||
|
|
||||||
getBoundingRect() {
|
getBoundingRect() {
|
||||||
if (this.line && this.line.getBoundingRect()) {
|
if (this.line && this.line.getBoundingRect()) {
|
||||||
return this.line.getBoundingRect().clone();
|
return this.line.getBoundingRect();
|
||||||
} else if (this.name && this.name.getBoundingRect()) {
|
} else if (this.name && this.name.getBoundingRect()) {
|
||||||
return this.name.getBoundingRect();
|
return this.name.getBoundingRect();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-button ref="menuButton" />
|
<menu-button ref="menuButton" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
@ -18,7 +17,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuButton from './menuButton';
|
import MenuButton from './menuButton';
|
||||||
import MenuStationStand from './menuStationStand';
|
import MenuStationStand from './menuStationStand';
|
||||||
@ -37,7 +35,6 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
MenuButton,
|
MenuButton,
|
||||||
MenuCancel,
|
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
MenuSection,
|
MenuSection,
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="chengdou-01__menus" :style="{width: width + 'px'}">
|
<div class="chengdou-01__menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-request ref="menuRequest" />
|
<menu-request ref="menuRequest" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
@ -19,7 +18,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuRequest from './menuRequest';
|
import MenuRequest from './menuRequest';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuStationStand from './menuStationStand';
|
import MenuStationStand from './menuStationStand';
|
||||||
import MenuSwitch from './menuSwitch';
|
import MenuSwitch from './menuSwitch';
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-button ref="menuButton" />
|
<menu-button ref="menuButton" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
@ -17,7 +16,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuButton from './menuButton';
|
import MenuButton from './menuButton';
|
||||||
import MenuStationStand from './menuStationStand';
|
import MenuStationStand from './menuStationStand';
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-button ref="menuButton" />
|
<menu-button ref="menuButton" />
|
||||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||||
@ -20,7 +19,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuButton from './menuButton';
|
import MenuButton from './menuButton';
|
||||||
import MenuAxleReset from './menuAxleReset';
|
import MenuAxleReset from './menuAxleReset';
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||||
@ -16,7 +15,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuStationStand from './menuStationStand';
|
import MenuStationStand from './menuStationStand';
|
||||||
import MenuSwitch from './menuSwitch';
|
import MenuSwitch from './menuSwitch';
|
||||||
@ -32,7 +30,6 @@ export default {
|
|||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
MenuCancel,
|
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
MenuSection,
|
MenuSection,
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<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-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-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
<menu-train ref="menuTrain" :selected="selected" />
|
<menu-train ref="menuTrain" :selected="selected" />
|
||||||
@ -17,7 +16,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuTrain from './menuTrain';
|
import MenuTrain from './menuTrain';
|
||||||
import MenuBar from './menuBar';
|
import MenuBar from './menuBar';
|
||||||
import MenuButton from './menuButton';
|
import MenuButton from './menuButton';
|
||||||
@ -35,7 +33,6 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
MenuButton,
|
MenuButton,
|
||||||
MenuCancel,
|
|
||||||
MenuTrain,
|
MenuTrain,
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||||
@ -21,7 +20,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuAxleReset from './menuAxleReset';
|
import MenuAxleReset from './menuAxleReset';
|
||||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||||
@ -44,7 +42,6 @@ export default {
|
|||||||
MenuBar,
|
MenuBar,
|
||||||
MenuAxleReset,
|
MenuAxleReset,
|
||||||
MenuAutoTrunRoute,
|
MenuAutoTrunRoute,
|
||||||
MenuCancel,
|
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
MenuSection,
|
MenuSection,
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||||
@ -21,7 +20,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuAxleReset from './menuAxleReset';
|
import MenuAxleReset from './menuAxleReset';
|
||||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||||
@ -44,7 +42,6 @@ export default {
|
|||||||
MenuBar,
|
MenuBar,
|
||||||
MenuAxleReset,
|
MenuAxleReset,
|
||||||
MenuAutoTrunRoute,
|
MenuAutoTrunRoute,
|
||||||
MenuCancel,
|
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
MenuSection,
|
MenuSection,
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||||
@ -22,7 +21,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuAxleReset from './menuAxleReset';
|
import MenuAxleReset from './menuAxleReset';
|
||||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||||
@ -46,7 +44,6 @@ export default {
|
|||||||
MenuBar,
|
MenuBar,
|
||||||
MenuAxleReset,
|
MenuAxleReset,
|
||||||
MenuAutoTrunRoute,
|
MenuAutoTrunRoute,
|
||||||
MenuCancel,
|
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
MenuSection,
|
MenuSection,
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus" :style="{width: width + 'px'}">
|
<div class="menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||||
@ -17,7 +16,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuStationStand from './menuStationStand';
|
import MenuStationStand from './menuStationStand';
|
||||||
import MenuSwitch from './menuSwitch';
|
import MenuSwitch from './menuSwitch';
|
||||||
@ -34,7 +32,6 @@ export default {
|
|||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
MenuCancel,
|
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
MenuSection,
|
MenuSection,
|
||||||
|
@ -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>
|
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
<div class="xian-02__menus" :style="{width: width + 'px'}">
|
||||||
<menu-cancel ref="menuCancel" />
|
|
||||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||||
<menu-station-control ref="menuStationControl" :selected="selected" />
|
<menu-station-control ref="menuStationControl" :selected="selected" />
|
||||||
@ -19,7 +18,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import MenuCancel from './menuCancel';
|
|
||||||
import MenuSignal from './menuSignal';
|
import MenuSignal from './menuSignal';
|
||||||
import MenuAxleReset from './menuAxleReset';
|
import MenuAxleReset from './menuAxleReset';
|
||||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||||
@ -41,7 +39,6 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
MenuAxleReset,
|
MenuAxleReset,
|
||||||
MenuAutoTrunRoute,
|
MenuAutoTrunRoute,
|
||||||
MenuCancel,
|
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
MenuSection,
|
MenuSection,
|
||||||
|
@ -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>
|
|
@ -13,6 +13,7 @@ class TransformHandle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkVisible(view) {
|
checkVisible(view) {
|
||||||
|
// console.log(view);
|
||||||
return createBoundingRect(view).intersect(this.rect);
|
return createBoundingRect(view).intersect(this.rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,7 +23,6 @@ class TransformHandle {
|
|||||||
} else {
|
} else {
|
||||||
view.hide();
|
view.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
view.dirty();
|
view.dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class TransformHandle {
|
|||||||
// 更新画布尺寸
|
// 更新画布尺寸
|
||||||
updateZrSize(opts) {
|
updateZrSize(opts) {
|
||||||
this.rect = { x: 0, y: 0, width: opts.width, height: opts.height };
|
this.rect = { x: 0, y: 0, width: opts.width, height: opts.height };
|
||||||
this.revisibleAll();
|
if (opts.isUpdate) { this.revisibleAll(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 遍历group执行回调
|
// 遍历group执行回调
|
||||||
|
@ -65,7 +65,6 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
|
|||||||
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
||||||
|
|
||||||
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
||||||
const PlanMonitorEditUserTool = () => import('@/views/planMonitor/editTool/userindex');
|
|
||||||
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
||||||
|
|
||||||
const DesignPlatformHome = () => import('@/views/designPlatform/home');
|
const DesignPlatformHome = () => import('@/views/designPlatform/home');
|
||||||
@ -222,11 +221,6 @@ export const publicAsyncRoute = [
|
|||||||
component: Jlmap3d,
|
component: Jlmap3d,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{ // 运行图编辑
|
|
||||||
path: '/plan/usertool',
|
|
||||||
component: PlanMonitorEditUserTool,
|
|
||||||
hidden: true
|
|
||||||
},
|
|
||||||
{ // 运行图编辑
|
{ // 运行图编辑
|
||||||
path: '/plan/tool',
|
path: '/plan/tool',
|
||||||
component: PlanMonitorEditTool,
|
component: PlanMonitorEditTool,
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {adminPublishLesson, rejectedLessonRelease, reviewLessonList, reviewScriptList, publishScript, rejectScript, reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan} from '@/api/designPlatform';
|
import {adminPublishLesson, rejectedLessonRelease, reviewLessonList, reviewScriptList, publishScript, rejectScript, reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan} from '@/api/designPlatform';
|
||||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
import { scriptDraftRecordNotify } from '@/api/simulation';
|
import { scriptDraftRecordNotifyNew } from '@/api/simulation';
|
||||||
import LessonDetail from './detail';
|
import LessonDetail from './detail';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
@ -508,7 +508,7 @@ export default {
|
|||||||
},
|
},
|
||||||
scriptPreview(index, row) {
|
scriptPreview(index, row) {
|
||||||
const mapInfo = this.mapList.find(elem=>{ return elem.id == row.mapId; });
|
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};
|
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 });
|
this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
|
@ -139,7 +139,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init: function () {
|
init: function () {
|
||||||
// let mapdata = this.$store.state.socket.device;
|
// 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');
|
this.jl3d = new Jl3dpassflow(dom, this.$route.query.mapid, this.$route.query.group, 'normal');
|
||||||
},
|
},
|
||||||
switchrender() {
|
switchrender() {
|
||||||
|
@ -47,6 +47,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
initCode:null,
|
||||||
localStatic:JL3D_LOCAL_STATIC,
|
localStatic:JL3D_LOCAL_STATIC,
|
||||||
jl3d: null,
|
jl3d: null,
|
||||||
rendermode:'监控视角',
|
rendermode:'监控视角',
|
||||||
@ -81,7 +82,8 @@ export default {
|
|||||||
this.group = this.$route.query.group;
|
this.group = this.$route.query.group;
|
||||||
this.mapId = this.$route.query.mapId;
|
this.mapId = this.$route.query.mapId;
|
||||||
this.lineCode = this.$route.query.lineCode;
|
this.lineCode = this.$route.query.lineCode;
|
||||||
this.init();
|
this.initCode = this.$route.query.deviceCode;
|
||||||
|
this.init(this.initCode);
|
||||||
window.updatestationlist = this.updatestationlist;
|
window.updatestationlist = this.updatestationlist;
|
||||||
if (this.$route.query.type == 'CCTV') {
|
if (this.$route.query.type == 'CCTV') {
|
||||||
this.isCctv = false;
|
this.isCctv = false;
|
||||||
@ -91,10 +93,10 @@ export default {
|
|||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init: function () {
|
init: function (code) {
|
||||||
// let mapdata = this.$store.state.socket.device;
|
// let mapdata = this.$store.state.socket.device;
|
||||||
const dom = document.getElementById('jl3d');
|
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() {
|
switchrender() {
|
||||||
if (this.renderswitch == true) {
|
if (this.renderswitch == true) {
|
||||||
@ -108,9 +110,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updatestationlist(list) {
|
updatestationlist(list,nowname) {
|
||||||
// console.log(list);
|
// console.log(list);
|
||||||
this.value = list[0].name;
|
if(nowname){
|
||||||
|
this.value = nowname;
|
||||||
|
}else{
|
||||||
|
this.value = list[0].name;
|
||||||
|
}
|
||||||
|
|
||||||
this.stationlist = list;
|
this.stationlist = list;
|
||||||
},
|
},
|
||||||
currentsel(selVal) {
|
currentsel(selVal) {
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="trunklist">
|
<div class="trunklist">
|
||||||
<div class="trunk" :class="{active:index==isActive}"
|
<div class="trunk" :class="{active:index==isActive}"
|
||||||
|
v-model="value"
|
||||||
:style="{'background-image': 'url('+localStatic+trunkAsse+')'}"
|
:style="{'background-image': 'url('+localStatic+trunkAsse+')'}"
|
||||||
v-for="(trunkAsse,index) in trunkAssetList" @click="assetSelect(index)" >
|
v-for="(trunkAsse,index) in trunkAssetList" @click="assetSelect(index)" >
|
||||||
</div>
|
</div>
|
||||||
@ -114,7 +115,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
initCode:null,
|
||||||
isActive:0,
|
isActive:0,
|
||||||
localStatic:JL3D_LOCAL_STATIC,
|
localStatic:JL3D_LOCAL_STATIC,
|
||||||
openeds:['2','3','4','5','6','7'],
|
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];
|
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.initCode = this.$route.query.deviceCode;
|
||||||
this.init();
|
this.init(this.initCode);
|
||||||
this.takelist = this.getnum(this.allPassers,6);
|
this.takelist = this.getnum(this.allPassers,6);
|
||||||
// console.log(this.takelist);
|
// console.log(this.takelist);
|
||||||
if (this.$route.query.type == 'CCTV') {
|
if (this.$route.query.type == 'CCTV') {
|
||||||
@ -173,10 +174,11 @@ export default {
|
|||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init: function () {
|
init: function (code) {
|
||||||
// let mapdata = this.$store.state.socket.device;
|
// let mapdata = this.$store.state.socket.device;
|
||||||
|
this.value = code;
|
||||||
const dom = document.getElementById('jl3d');
|
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){
|
assetSelect(index){
|
||||||
// console.log(index);
|
// console.log(index);
|
||||||
@ -213,6 +215,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// // console.log(this.trainlist);
|
// // console.log(this.trainlist);
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTrainCode(selVal) {
|
updateTrainCode(selVal) {
|
||||||
// console.log(selVal);
|
// console.log(selVal);
|
||||||
// this.jl3d.changeTrain(selVal);
|
// this.jl3d.changeTrain(selVal);
|
||||||
|
@ -259,12 +259,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.clearData();
|
this.clearData();
|
||||||
if (error.code == 30002) {
|
this.$messageBox(`${error.message}`);
|
||||||
this.handleReGenerate(day);
|
this.loading = false;
|
||||||
} else {
|
|
||||||
this.$messageBox(`${error.message}`);
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -282,20 +278,6 @@ export default {
|
|||||||
this.$messageBox(`${error.message}`);
|
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() {
|
handleSave() {
|
||||||
if (this.formModel.planDate) {
|
if (this.formModel.planDate) {
|
||||||
saveSchedulingNew(this.group, this.tableData).then(resp => {
|
saveSchedulingNew(this.group, this.tableData).then(resp => {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
||||||
<!-- 地图错误判断 -->
|
<!-- 地图错误判断 -->
|
||||||
<template v-if="project === 'bjd'">
|
<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" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||||
</template>
|
</template>
|
||||||
@ -15,8 +16,8 @@
|
|||||||
<!-- cctv视图 -->
|
<!-- cctv视图 -->
|
||||||
<el-button v-if="cctvShow && !isContest && project !== 'bjd'" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
<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 && project == 'bjd' && !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="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button> -->
|
||||||
|
|
||||||
<!-- 故障设备视图 -->
|
<!-- 故障设备视图 -->
|
||||||
<el-button v-if="jlmap3dFaultShow" size="small" @click="jumpjlmap3dFault">故障设备</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="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="messageBoardShow">留言板</el-button>
|
||||||
<el-button v-if="isContest || project === 'bjd'" size="small" @click="contectUs">联系方式</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>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<Jl3d-Device
|
<Jl3d-Device
|
||||||
@ -213,32 +213,32 @@ export default {
|
|||||||
});
|
});
|
||||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
},
|
},
|
||||||
jumpjl3dtrafficplan() {
|
// jumpjl3dtrafficplan() {
|
||||||
const routeData = this.$router.resolve({
|
// const routeData = this.$router.resolve({
|
||||||
path:'/jlmap3d/trafficplan',
|
// path:'/jlmap3d/trafficplan',
|
||||||
query:{
|
// query:{
|
||||||
mapid:this.mapId,
|
// mapid:this.mapId,
|
||||||
group:this.group,
|
// group:this.group,
|
||||||
project: this.project,
|
// project: this.project,
|
||||||
noPreLogout: true,
|
// noPreLogout: true,
|
||||||
lineCode:this.lineCode
|
// lineCode:this.lineCode
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
// window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
},
|
// },
|
||||||
jumpjl3dtraffictrain() {
|
// jumpjl3dtraffictrain() {
|
||||||
const routeData = this.$router.resolve({
|
// const routeData = this.$router.resolve({
|
||||||
path:'/jlmap3d/traffictrain',
|
// path:'/jlmap3d/traffictrain',
|
||||||
query:{
|
// query:{
|
||||||
mapid:this.mapId,
|
// mapid:this.mapId,
|
||||||
group:this.group,
|
// group:this.group,
|
||||||
project: this.project,
|
// project: this.project,
|
||||||
noPreLogout: true,
|
// noPreLogout: true,
|
||||||
lineCode:this.lineCode
|
// lineCode:this.lineCode
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
// window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
},
|
// },
|
||||||
jumpjlmap3dFault() {
|
jumpjlmap3dFault() {
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path:'/jlmap3d/maintainer',
|
path:'/jlmap3d/maintainer',
|
||||||
|
@ -124,7 +124,7 @@ export default {
|
|||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearSimulation(this.group);
|
clearSimulation(this.group);
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
this.$store.dispatch('map/mapClear');
|
// this.$store.dispatch('map/mapClear');
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.setWindowSize();
|
this.setWindowSize();
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="handleShow">
|
<div class="handleShow">
|
||||||
<span v-if="show" class="el-icon-arrow-right" style="cursor:pointer" @click="handleSliderShow(true)">{{ $t('display.lesson.unfold') }}</span>
|
<!-- {{ $t('display.lesson.unfold') }} -->
|
||||||
<span v-else class="el-icon-arrow-left" style="cursor:pointer" @click="handleSliderShow(false)">{{ $t('display.lesson.fold') }}</span>
|
<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>
|
||||||
<div class="slider-tree">
|
<div class="slider-tree">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="background: #fff;">
|
<el-scrollbar wrap-class="scrollbar-wrapper" style="background: #fff;">
|
||||||
|
@ -222,6 +222,7 @@ export default {
|
|||||||
this.$store.dispatch('map/mapClear');
|
this.$store.dispatch('map/mapClear');
|
||||||
if (this.$jlmap) {
|
if (this.$jlmap) {
|
||||||
this.$jlmap.dispose();
|
this.$jlmap.dispose();
|
||||||
|
this.$jlmap = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -384,7 +385,45 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击选择事件
|
// 点击选择事件
|
||||||
onSelected(em) {
|
onSelected(em) {
|
||||||
this.$emit('onSelect', 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) {
|
onContextMenu(em) {
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<!-- cctv视图 -->
|
<!-- 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="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="project == 'bjd' && (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="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="(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> -->
|
<!-- <el-button v-if="isAdmin" size="small" @click="otherVrView">VR第三人称视角</el-button> -->
|
||||||
|
Loading…
Reference in New Issue
Block a user