Merge branch 'test'
This commit is contained in:
commit
27b95c22fa
@ -258,7 +258,7 @@ export function getRealDevices(group) {
|
||||
}
|
||||
|
||||
// 获取房间真实设备连接关系
|
||||
export function getRealDevicesNew(group) {
|
||||
export function getRealDevicesInRoom(group) {
|
||||
return request({
|
||||
url: `/api/jointTraining/room/${group}/realDevice/connect`,
|
||||
method: 'get'
|
||||
@ -266,7 +266,7 @@ export function getRealDevicesNew(group) {
|
||||
}
|
||||
|
||||
// 更新真实设备的连接关系
|
||||
export function updateRealDevicesNew(group, data) {
|
||||
export function updateRealDevices(group, data) {
|
||||
return request({
|
||||
url: `/api/jointTraining/room/${group}/realDevice`,
|
||||
method: 'put',
|
||||
|
248
src/api/jointTraining.js
Normal file
248
src/api/jointTraining.js
Normal file
@ -0,0 +1,248 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 文字聊天 发送文字
|
||||
export function chatWithTextNew(data, group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/chatWithText?group=${group}`,
|
||||
method: 'post',
|
||||
data: {
|
||||
message: data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 生成分发二维码
|
||||
export function getJoinTrainCodeNew(data, group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/qrCode?group=${group}`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 创建房间
|
||||
export function postCreateRoomNew(data) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 检查房间存在
|
||||
export function checkRoomExistNew(params) {
|
||||
return request({
|
||||
url: `/api/simulationRoom`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 获取房间详情
|
||||
export function postRoomDetailNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/${group}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 销毁房间
|
||||
export function deljointTrainRoomNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room`,
|
||||
method: 'delete',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 查询有权限房间列表
|
||||
export function getjointTrainListNew(params) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/list`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
// 加入房间
|
||||
export function getjointTrainingNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/join`,
|
||||
method: 'put',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 设置人员角色
|
||||
export function putUserRolesNew(data, group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/user/role?group=${group}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 获取房间里的用户列表
|
||||
export function getJointTrainRoomUserListNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/${group}/user/list`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 离开房间接口
|
||||
export function putJointTrainingExitNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/exit`,
|
||||
method: 'put',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 开始联合演练
|
||||
export function startJointTrainingNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/simulation`,
|
||||
method: 'post',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取个人信息
|
||||
export function getUserRolesNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/user/role`,
|
||||
method: 'get',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 返回房间
|
||||
export function putJointTrainingStateNew() {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/back`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
||||
// 踢出用户
|
||||
export function putJointTrainingUserkickedNew(userId, group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/user`,
|
||||
method: 'put',
|
||||
params: {
|
||||
userId: userId,
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 管理员结束所有人的仿真
|
||||
export function putJointTrainingSimulationNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/simulation/all`,
|
||||
method: 'put',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 结束仿真返回房间
|
||||
export function putJointTrainingSimulationUserNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/simulation/user/exit`,
|
||||
method: 'put',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 进入仿真
|
||||
export function putJointTrainingSimulationEntranceNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/simulation/user/entrance`,
|
||||
method: 'put',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 权限获取(房间权限)
|
||||
*/
|
||||
export function getPermissionJointNew(group) {
|
||||
return request({
|
||||
url: '/api/v1/jointTraining/qrCode',
|
||||
method: 'get',
|
||||
params: {
|
||||
group: group
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加或更新真实设备和仿真对象连接
|
||||
export function setRealDeviceNew(group, data) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/realDevice?group=${group}`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除真实设备和仿真对象连接
|
||||
export function delRealDeviceNew(id, group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/realDevice/${id}`,
|
||||
method: 'delete',
|
||||
params: { group: group }
|
||||
});
|
||||
}
|
||||
|
||||
// 获取真实设备列表
|
||||
export function getRealDevicesNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/${group}/devices`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取房间真实设备连接关系
|
||||
export function getRealDevicesInRoomNew(group) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/${group}/realDevice/connect`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 更新真实设备的连接关系
|
||||
export function updateRealDevicesNew(group, data) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/${group}/realDevice`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 真实设备是否被其他仿真使用
|
||||
export function realDeviceIsUsedNew(group, projectCode) {
|
||||
return request({
|
||||
url: `/api/v1/jointTraining/room/${group}/realDeviceUsed`,
|
||||
method: 'get',
|
||||
params: {
|
||||
projectCode: projectCode
|
||||
}
|
||||
});
|
||||
}
|
@ -610,5 +610,6 @@ export default {
|
||||
physicalSectionName: 'Physical section name',
|
||||
routePhysicalSectionData: 'Route physical section data',
|
||||
routeSideDefenseSwitch: 'Route side defense switch',
|
||||
switchID: 'Switch ID'
|
||||
switchID: 'Switch ID',
|
||||
lineColor: 'Line Color'
|
||||
};
|
||||
|
@ -596,7 +596,7 @@ export default {
|
||||
reentrySection2: '折返区段2',
|
||||
setPriority: '设置优先级',
|
||||
associatedStationList: '关联站台列表:',
|
||||
whetherAutoRoute: '是否自定进路',
|
||||
whetherAutoRoute: '是否自动进路',
|
||||
hostileData: '敌对数据',
|
||||
routeContinuesToProtectSectorData: '进路延续保护区段数据',
|
||||
physicalSectionID: '物理区段ID',
|
||||
@ -605,5 +605,6 @@ export default {
|
||||
routeSideDefenseSwitch: '进路侧防道岔',
|
||||
switchID: '道岔ID',
|
||||
normalPosition: '定位',
|
||||
reversePosition: '反位'
|
||||
reversePosition: '反位',
|
||||
lineColor: '线条颜色'
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ var Staticmodel = {
|
||||
deviceType: "stationstand",
|
||||
type: "low",
|
||||
picUrl: "",
|
||||
assetUrl: "https://joylink.club/oss/wx/stationstand/stationstand.FBX"
|
||||
assetUrl: "../../static/model/device/stationstand.FBX"
|
||||
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
|
||||
//../../static/model/device/stationstand.FBX
|
||||
|
||||
|
@ -72,6 +72,7 @@ export function Jl3ddevice(dom,group,token) {
|
||||
|
||||
let teststomp = new StompClient();
|
||||
let topic = '/user/topic/simulation/assistant/'+group;
|
||||
// let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
let header = {'X-Token': token};
|
||||
try {
|
||||
// console.log("teststomp");
|
||||
@ -82,6 +83,7 @@ export function Jl3ddevice(dom,group,token) {
|
||||
|
||||
function callback(Response) {
|
||||
let data = JSON.parse(Response.body);
|
||||
console.log(data);
|
||||
if(scope.nowcode != data.body.code){
|
||||
scope.nowcode = data.body.code;
|
||||
scope.selectmodel(data);
|
||||
|
347
src/jlmap3d/jl3ddevice/jl3ddeviceNew.js
Normal file
347
src/jlmap3d/jl3ddevice/jl3ddeviceNew.js
Normal file
@ -0,0 +1,347 @@
|
||||
import { Staticmodel } from '@/jlmap3d/jl3ddevice/config.js';
|
||||
//loader
|
||||
import { FBXLoader } from '@/jlmap3d/main/loaders/FBXLoader';
|
||||
import { OrbitControls } from '@/jlmap3d/main/control/OrbitControls';
|
||||
|
||||
import { ModelManager } from '@/jlmap3d/jl3ddevice/loader.js';
|
||||
import { Signallightload } from '@/jlmap3d/jl3ddevice/component/signallight.js';
|
||||
|
||||
import StompClient from '@/utils/sock';
|
||||
|
||||
var clock = new THREE.Clock();
|
||||
export function Jl3ddeviceNew(dom,group,token) {
|
||||
var scope = this;
|
||||
|
||||
this.dom = dom;
|
||||
this.nowcode = null;
|
||||
this.animateswitch = false;
|
||||
this.signallights = [];
|
||||
Signallightload(this.signallights);
|
||||
this.mixers = [];
|
||||
this.showmodel = null;
|
||||
//初始化webgl渲染
|
||||
this.renderer = new THREE.WebGLRenderer({ antialias: true });
|
||||
|
||||
this.renderer.setClearColor(new THREE.Color(0x000000));
|
||||
this.renderer.setSize(dom.offsetWidth, dom.offsetHeight);
|
||||
this.renderer.shadowMap.enabled = true;
|
||||
this.renderer.shadowMap.type = THREE.PCFSoftShadowMap;
|
||||
this.dom.appendChild(this.renderer.domElement);
|
||||
|
||||
//定义相机
|
||||
|
||||
this.camera = new THREE.PerspectiveCamera(70, dom.offsetWidth / dom.offsetHeight, 0.01, 120);
|
||||
this.camera.position.set(0, 20, 30);
|
||||
this.camera.aspect = dom.offsetWidth / dom.offsetHeight;
|
||||
this.camera.updateProjectionMatrix();
|
||||
//定义场景(渲染容器)
|
||||
this.scene = new THREE.Scene();
|
||||
this.scene.background = new THREE.Color(0xa0a0a0);
|
||||
|
||||
var mesh = new THREE.Mesh(new THREE.PlaneBufferGeometry(200, 200), new THREE.MeshPhongMaterial({ color: 0x999999, depthWrite: false }));
|
||||
mesh.rotation.x = - Math.PI / 2;
|
||||
mesh.receiveShadow = true;
|
||||
this.scene.add(mesh);
|
||||
|
||||
var grid = new THREE.GridHelper(200, 20, 0x000000, 0x000000);
|
||||
grid.material.opacity = 0.2;
|
||||
grid.material.transparent = true;
|
||||
this.scene.add(grid);
|
||||
|
||||
|
||||
//定义全局光
|
||||
let ambientLight = new THREE.AmbientLight(0xffffff, 1.3);
|
||||
this.scene.add(ambientLight);
|
||||
|
||||
|
||||
var spotLight = new THREE.SpotLight(0xffffff);
|
||||
spotLight.position.set(-50, 60, 15);
|
||||
spotLight.castShadow = true;
|
||||
spotLight.shadow.mapSize.width = 1024;
|
||||
spotLight.shadow.mapSize.height = 1024;
|
||||
this.scene.add(spotLight);
|
||||
|
||||
|
||||
|
||||
this.controls = new THREE.OrbitControls(this.camera, dom);
|
||||
this.controls.maxPolarAngle = Math.PI / 2;
|
||||
this.controls.minPolarangle = Math.PI / 5;
|
||||
this.controls.maxDistance = 80;
|
||||
this.controls.update();
|
||||
this.selectmodel = null;
|
||||
|
||||
let teststomp = new StompClient();
|
||||
// let topic = '/user/topic/simulation/assistant/'+group;
|
||||
let topic = '/user/queue/simulation/jl3d/'+group;
|
||||
let header = {'X-Token': token};
|
||||
try {
|
||||
// console.log("teststomp");
|
||||
teststomp.subscribe(topic, callback, header);
|
||||
} catch (error) {
|
||||
console.error('websocket订阅失败');
|
||||
}
|
||||
|
||||
function callback(Response) {
|
||||
let data = JSON.parse(Response.body);
|
||||
|
||||
// if(scope.nowcode != data.body.code){
|
||||
// scope.nowcode = data.body.code;
|
||||
// scope.selectmodel(data);
|
||||
// }else{
|
||||
if(data.type == "DeviceCtrl_3D"){
|
||||
// console.log(data.body);
|
||||
if(data.body.code == scope.nowcode){
|
||||
scope.updateaction(data.body);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
window.onresize = function () {
|
||||
scope.camera.aspect = scope.dom.offsetWidth / scope.dom.offsetHeight;
|
||||
scope.camera.updateProjectionMatrix();
|
||||
scope.renderer.setSize(scope.dom.offsetWidth, scope.dom.offsetHeight);
|
||||
}
|
||||
|
||||
this.anime = null;
|
||||
|
||||
this.modelmanager = new ModelManager();
|
||||
this.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
||||
animate();
|
||||
})
|
||||
|
||||
//循环渲染函数
|
||||
function animate() {
|
||||
|
||||
scope.anime = requestAnimationFrame(animate);
|
||||
scope.renderer.render(scope.scene, scope.camera);
|
||||
scope.controls.update();
|
||||
//scope.camera.lookAt(plane);
|
||||
//
|
||||
let delta = clock.getDelta();
|
||||
if (scope.mixers) {
|
||||
for (let i = 0; i < scope.mixers.length; i++) {
|
||||
if (scope.mixers[i]) {
|
||||
scope.mixers[i].update(delta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.selectmodel = function (data) {
|
||||
if (scope.showmodel) {
|
||||
|
||||
if (scope.showmodel.code != data.code) {
|
||||
scope.scene.remove(scope.showmodel);
|
||||
scope.showmodel = null
|
||||
scope.nowcode = data.code;
|
||||
if (data._type == "Switch") {
|
||||
// scope.modelmanager.switchmodel.locateType = data.body.locateType;
|
||||
scope.modelmanager.switchmodel.code = data.code;
|
||||
scope.showmodel = scope.modelmanager.switchmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
}
|
||||
if (data._type == "Signal") {
|
||||
scope.modelmanager.signalmodel.code = data.code;
|
||||
scope.showmodel = scope.modelmanager.signalmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
}
|
||||
|
||||
if (data._type == "Psd") {
|
||||
|
||||
scope.modelmanager.standmodel.code = data.code;
|
||||
scope.showmodel = scope.modelmanager.standmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
}
|
||||
|
||||
scope.showmodel.code = data.code;
|
||||
initstatus(data);
|
||||
}
|
||||
} else {
|
||||
scope.nowcode = data.code;
|
||||
|
||||
if (data._type == "Switch") {
|
||||
scope.modelmanager.switchmodel.normalPosition = "0";
|
||||
scope.showmodel = scope.modelmanager.switchmodel.mesh;
|
||||
// scope.scene.add(scope.showmodel);
|
||||
if (data.normalPosition == "0") {
|
||||
scope.modelmanager.switchmodel.normalPosition = "0";
|
||||
scope.modelmanager.switchmodel.action.reset();
|
||||
scope.modelmanager.switchmodel.action.time = 0;
|
||||
scope.modelmanager.switchmodel.action.timeScale = -1;
|
||||
scope.modelmanager.switchmodel.action.play();
|
||||
|
||||
} else if (data.normalPosition == "1") {
|
||||
scope.modelmanager.switchmodel.normalPosition = "1";
|
||||
scope.modelmanager.switchmodel.action.reset();
|
||||
scope.modelmanager.switchmodel.action.time = scope.modelmanager.switchmodel.action._clip.duration;
|
||||
scope.modelmanager.switchmodel.action.timeScale = 1;
|
||||
scope.modelmanager.switchmodel.action.play();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (data._type == "Signal") {
|
||||
scope.showmodel = scope.modelmanager.signalmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
}
|
||||
|
||||
if (data._type == "Psd") {;
|
||||
scope.showmodel = scope.modelmanager.standmodel.mesh;
|
||||
scope.scene.add(scope.showmodel);
|
||||
}
|
||||
initstatus(data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.updateaction = function (data) {
|
||||
|
||||
if (data.type == "SWITCH") {
|
||||
if (data.normal == "0") {
|
||||
scope.modelmanager.switchmodel.normalPosition = "0";
|
||||
scope.modelmanager.switchmodel.action.reset();
|
||||
scope.modelmanager.switchmodel.action.time = 0;
|
||||
scope.modelmanager.switchmodel.action.timeScale = -1;
|
||||
scope.modelmanager.switchmodel.action.play();
|
||||
|
||||
} else if (data.normal == "1") {
|
||||
scope.modelmanager.switchmodel.normalPosition = "1";
|
||||
scope.modelmanager.switchmodel.action.reset();
|
||||
scope.modelmanager.switchmodel.action.time = scope.modelmanager.switchmodel.action._clip.duration;
|
||||
scope.modelmanager.switchmodel.action.timeScale = 1;
|
||||
scope.modelmanager.switchmodel.action.play();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (data.type == "SIGNAL") {//从上往下红绿黄
|
||||
if(data.red == 1){
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["red"];
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true;
|
||||
}else{
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true;
|
||||
}
|
||||
if(data.yellow == 1){
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["yellow"];
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true;
|
||||
}else{
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true;
|
||||
}
|
||||
if(data.green == 1){
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["green"];
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true;
|
||||
}else{
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (data.type == "PSD") {
|
||||
if (data.code == scope.nowcode) {
|
||||
if (data.open == "1" ) {
|
||||
scope.modelmanager.standmodel.screenDoorOpenStatus = "0";
|
||||
|
||||
scope.modelmanager.standmodel.action.reset();
|
||||
scope.modelmanager.standmodel.action.time = 0;
|
||||
scope.modelmanager.standmodel.action.timeScale = 1;
|
||||
scope.modelmanager.standmodel.action.play();
|
||||
}
|
||||
|
||||
if (data.open == "0" ) {
|
||||
scope.modelmanager.standmodel.screenDoorOpenStatus = "1";
|
||||
|
||||
scope.modelmanager.standmodel.action.reset();
|
||||
scope.modelmanager.standmodel.action.time = scope.modelmanager.standmodel.action._clip.duration;
|
||||
scope.modelmanager.standmodel.action.timeScale = -1;
|
||||
scope.modelmanager.standmodel.action.play();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// scope.showmodel.
|
||||
}
|
||||
|
||||
function initstatus(data) {
|
||||
|
||||
if (data._type == "Switch") {
|
||||
if (data.normalPosition == "0") {
|
||||
scope.modelmanager.switchmodel.normalPosition = "0";
|
||||
scope.modelmanager.switchmodel.action.reset();
|
||||
scope.modelmanager.switchmodel.action.time = 0;
|
||||
scope.modelmanager.switchmodel.action.timeScale = -1;
|
||||
scope.modelmanager.switchmodel.action.play();
|
||||
} else if (data.normalPosition == "1") {
|
||||
scope.modelmanager.switchmodel.normalPosition = "1";
|
||||
scope.modelmanager.switchmodel.action.reset();
|
||||
scope.modelmanager.switchmodel.action.time = scope.modelmanager.switchmodel.action._clip.duration;
|
||||
scope.modelmanager.switchmodel.action.timeScale = 1;
|
||||
scope.modelmanager.switchmodel.action.play();
|
||||
}
|
||||
}
|
||||
|
||||
if (data._type == "Signal") {
|
||||
if(data.logicLight == 0){
|
||||
if(data.redOpen == 1){
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["red"];
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true;
|
||||
}else{
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true;
|
||||
}
|
||||
if(data.yellowOpen == 1){
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["yellow"];
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true;
|
||||
}else{
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true;
|
||||
}
|
||||
if(data.greenOpen == 1){
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["green"];
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true;
|
||||
}else{
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true;
|
||||
}
|
||||
}else{
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[0].material.map.needsUpdate = true;
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[1].material.map.needsUpdate = true;
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map = scope.signallights["black"];
|
||||
scope.modelmanager.signalmodel.mesh.children[2].material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (data._type == "Psd") {
|
||||
if (data.screenDoorOpenStatus == "0") {
|
||||
scope.modelmanager.standmodel.screenDoorOpenStatus = "0";
|
||||
|
||||
scope.modelmanager.standmodel.action.reset();
|
||||
scope.modelmanager.standmodel.action.time = scope.modelmanager.standmodel.action._clip.duration;
|
||||
scope.modelmanager.standmodel.action.timeScale = 1;
|
||||
scope.modelmanager.standmodel.action.play();
|
||||
}
|
||||
|
||||
if (data.screenDoorOpenStatus == "1") {
|
||||
scope.modelmanager.standmodel.screenDoorOpenStatus = "1";
|
||||
|
||||
scope.modelmanager.standmodel.action.reset();
|
||||
scope.modelmanager.standmodel.action.time = 0;
|
||||
scope.modelmanager.standmodel.action.timeScale = -1;
|
||||
scope.modelmanager.standmodel.action.play();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -234,8 +234,8 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
// getPublish3dMapDetail(mapId).then(netdata => {
|
||||
// DriverLoad(data, scope, netdata.data, sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails, camera, controls3, scene,mixers,storemod);
|
||||
// });
|
||||
let stats = new Stats();
|
||||
dom.appendChild( stats.dom );
|
||||
// let stats = new Stats();
|
||||
// dom.appendChild( stats.dom );
|
||||
// 开启渲染
|
||||
animate();
|
||||
startWorker();
|
||||
@ -258,7 +258,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
//相机按键位移
|
||||
// controls3.update();
|
||||
|
||||
stats.update();
|
||||
// stats.update();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import { OrbitControls } from '@/jlmap3d/main/control/OrbitControls';
|
||||
import { ModelManager } from '@/jlmap3d/jl3dpassflow/loader.js';
|
||||
import { SkeletonUtils } from '@/jlmap3d/main/utils/SkeletonUtils.js';
|
||||
import StompClient from '@/utils/sock';
|
||||
|
||||
import { Loading } from 'element-ui';
|
||||
var clock = new THREE.Clock();
|
||||
let scene,camerass,renderer;
|
||||
let rendermode = 0;
|
||||
@ -90,7 +90,7 @@ var views = [
|
||||
width: 0.5,
|
||||
height: 0.5,
|
||||
background: new THREE.Color( 0.5, 0.5, 0.7 ),
|
||||
eye: [ 3.7, 150, 20 ],
|
||||
eye: [ 3.7, 17, 26 ],
|
||||
up: [3.7, 10 ,16 ],
|
||||
fov: 30
|
||||
},
|
||||
@ -146,7 +146,7 @@ export function Jl3dpassflow(dom) {
|
||||
//定义相机
|
||||
|
||||
camerass = new THREE.PerspectiveCamera(70, dom.offsetWidth / dom.offsetHeight, 0.01, 1000);
|
||||
camerass.position.set(0, 200, 30);
|
||||
camerass.position.set(0, 80, 40);
|
||||
camerass.aspect = dom.offsetWidth / dom.offsetHeight;
|
||||
camerass.updateProjectionMatrix();
|
||||
|
||||
@ -195,6 +195,7 @@ export function Jl3dpassflow(dom) {
|
||||
this.controls.maxPolarAngle = Math.PI / 2;
|
||||
this.controls.minPolarangle = Math.PI / 5;
|
||||
this.controls.maxDistance = 800;
|
||||
this.controls.screenSpacePanning = true;
|
||||
this.controls.update();
|
||||
this.selectmodel = null;
|
||||
|
||||
@ -211,6 +212,7 @@ export function Jl3dpassflow(dom) {
|
||||
this.anime = null;
|
||||
|
||||
this.modelmanager = new ModelManager();
|
||||
let loadingInstance = Loading.service({ fullscreen: true });
|
||||
this.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
||||
// console.log(scope.modelmanager);
|
||||
initstationanimation(scope.modelmanager.station.mesh);
|
||||
@ -226,6 +228,7 @@ export function Jl3dpassflow(dom) {
|
||||
originanima2 = originhuman2.animations[ 0 ];
|
||||
originhuman1.remove(originhuman1.children[2]);
|
||||
scene.add(rungroup);
|
||||
loadingInstance.close();
|
||||
animate();
|
||||
})
|
||||
|
||||
|
@ -56,6 +56,7 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||
//定义镜头操作
|
||||
let controls = new THREE.OrbitControls(camera);
|
||||
controls.maxPolarAngle = Math.PI/2;
|
||||
controls.screenSpacePanning = true;
|
||||
//controls.minPolarAngle = Math.PI/8;
|
||||
controls.maxDistance = 2000;
|
||||
//模型加载器
|
||||
@ -101,7 +102,6 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||
getPublishMapDetail(skinCode).then(data => {
|
||||
let mapnetdata = data.data;
|
||||
getPublish3dMapDetail(skinCode).then(netdata => {
|
||||
console.log(netdata);
|
||||
let assetsdata = JSON.parse(netdata.data.sections);
|
||||
if(assetsdata.link){
|
||||
scope.datatype = "old";
|
||||
@ -121,8 +121,8 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||
});
|
||||
});
|
||||
//
|
||||
let stats = new Stats();
|
||||
dom.appendChild( stats.dom );
|
||||
// let stats = new Stats();
|
||||
// dom.appendChild( stats.dom );
|
||||
|
||||
// var timer = setInterval(function() {
|
||||
// if(trainlisttest){
|
||||
@ -177,7 +177,7 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||
//检测动画构造器播放动画
|
||||
|
||||
// }
|
||||
stats.update();
|
||||
// stats.update();
|
||||
}
|
||||
|
||||
function startWorker(webwork){
|
||||
|
@ -115,9 +115,6 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
console.log("scene+++++++++++++++++++++++++++++++++");
|
||||
console.log(sceneload);
|
||||
// // mapdata = jlmap3ddata;
|
||||
backdata.loaderdata(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails);
|
||||
scope.Subscribe.updatamap(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails,scope.materiallist,scope.actions,scope.sceneload);
|
||||
|
@ -236,7 +236,8 @@ class SkinCode extends defaultStyle {
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#ffff00' // 点亮灯颜色
|
||||
},
|
||||
OutFrame: {
|
||||
|
||||
@ -255,7 +256,8 @@ class SkinCode extends defaultStyle {
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#FF0000' // 点亮灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
@ -462,7 +464,6 @@ class SkinCode extends defaultStyle {
|
||||
textColor: '#000000'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.ZcControl] = {
|
||||
// 是否显示
|
||||
visible: true,
|
||||
|
@ -312,7 +312,8 @@ class SkinCode extends defaultStyle {
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#ffff00' // 点亮灯颜色
|
||||
},
|
||||
OutFrame: {
|
||||
|
||||
@ -465,6 +466,22 @@ class SkinCode extends defaultStyle {
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
}
|
||||
};
|
||||
/** 引导总锁 */
|
||||
this[deviceType.GuideLock] = {
|
||||
// 是否显示
|
||||
displayCondition: '03', // 显示条件 prdType
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#FF0000' // 点亮灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.TrainWindow] = {
|
||||
lineColor: '#4DD43F', // 车次窗颜色
|
||||
lineDash: null, // 车次窗虚线间隔
|
||||
|
@ -405,7 +405,114 @@ class SkinCode extends defaultStyle {
|
||||
controlColor: '#FFFF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.PowerSupply] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.Maintain] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.NoOneReturn] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11,
|
||||
fontWeight: 'normal',
|
||||
distance: 5
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#FFFFFF'
|
||||
}
|
||||
};
|
||||
this[deviceType.AtsControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.ChainControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.IntersiteControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.CenterCommunication] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.LeuControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.LocalControl] = {
|
||||
displayCondition: '03', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
@ -489,7 +596,8 @@ class SkinCode extends defaultStyle {
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#ffff00' // 点亮灯颜色
|
||||
},
|
||||
OutFrame: {
|
||||
|
||||
@ -508,7 +616,8 @@ class SkinCode extends defaultStyle {
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#FF0000' // 点亮灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -295,12 +295,29 @@ class SkinCode extends defaultStyle {
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#ffff00' // 点亮灯颜色
|
||||
},
|
||||
OutFrame: {
|
||||
|
||||
}
|
||||
};
|
||||
/** 引导总锁 */
|
||||
this[deviceType.GuideLock] = {
|
||||
// 是否显示
|
||||
displayCondition: '03', // 显示条件 prdType
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#FF0000' // 点亮灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.Station] = {
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
|
@ -87,6 +87,7 @@ class SkinCode extends defaultStyle {
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
line: {
|
||||
isActiveShow: true, // 哈尔滨点击元素显示
|
||||
width: 5, // 区段宽度
|
||||
beyondWidth: 1, // 区段宽超出宽度
|
||||
invadeColor: '#EF0C08', // 区段侵入颜色
|
||||
@ -140,7 +141,7 @@ class SkinCode extends defaultStyle {
|
||||
standardShow: true, // 灯柱显示
|
||||
standardLength: 4, // 高柱长度
|
||||
standardHeight: 5, // 灯柱高度
|
||||
standardColor: '#3149C3', // 灯柱颜色
|
||||
standardColor: '#FF0000', // 灯柱颜色
|
||||
standardWidth: 4 // 灯柱宽度
|
||||
},
|
||||
text: {
|
||||
@ -149,18 +150,20 @@ class SkinCode extends defaultStyle {
|
||||
isAlignCenter: true, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
defaultColor: '#00CE00', // 信号灯字体默认色
|
||||
blockColor: '#ffffff', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00', // 信号字体
|
||||
nameBorderShow: true // 信号机名字边框显示
|
||||
ArtificialRouteColor: '#FFFFFF', // ATS关自排 设定颜色
|
||||
AutoRouteColor: '#D8D800', // 联锁自动进路颜色
|
||||
nameBorderShow: false // 信号机名字边框显示
|
||||
},
|
||||
lamp: {
|
||||
bgShow: true, // 是否被选中
|
||||
logicDisplayNone: true, // 逻辑点灯斜线不显示
|
||||
guidName: 'defult', // 默认引导类型
|
||||
guidName: 'haerbin_01', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
borderWidth: 0, // 信号灯边框线宽度
|
||||
borderColor: '#FF0000', // 信号灯边框线颜色 (虚拟信号机)
|
||||
radiusR: 4, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
@ -168,7 +171,7 @@ class SkinCode extends defaultStyle {
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
blueColor: '#000080' // 信号灯蓝色
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
@ -310,12 +313,29 @@ class SkinCode extends defaultStyle {
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#ffff00' // 点亮灯颜色
|
||||
},
|
||||
OutFrame: {
|
||||
|
||||
}
|
||||
};
|
||||
/** 引导总锁 */
|
||||
this[deviceType.GuideLock] = {
|
||||
// 是否显示
|
||||
displayCondition: '03', // 显示条件 prdType
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#FF0000' // 点亮灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.Station] = {
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
|
@ -230,13 +230,29 @@ class SkinCode extends defaultStyle {
|
||||
stroke: '#FFFFFF', // 框的颜色
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#ffff00' // 点亮灯颜色
|
||||
},
|
||||
OutFrame: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/** 引导总锁 */
|
||||
this[deviceType.GuideLock] = {
|
||||
// 是否显示
|
||||
displayCondition: '03', // 显示条件 prdType
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||
lightUpColor: '#FF0000' // 点亮灯颜色
|
||||
}
|
||||
};
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 10, // 站台默认字体大小
|
||||
|
@ -145,5 +145,50 @@ deviceRender[deviceType.GuideLock] = {
|
||||
_type: deviceType.GuideLock,
|
||||
zlevel: 1
|
||||
};
|
||||
/** AtsControl ATS通信表示灯 */
|
||||
deviceRender[deviceType.AtsControl] = {
|
||||
_type: deviceType.AtsControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** CenterCommunication 中心通信表示灯 */
|
||||
deviceRender[deviceType.CenterCommunication] = {
|
||||
_type: deviceType.AtsControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** ChainControl 连锁主备状态表示灯 */
|
||||
deviceRender[deviceType.ChainControl] = {
|
||||
_type: deviceType.ChainControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** IntersiteControl 站间通信表示灯 */
|
||||
deviceRender[deviceType.IntersiteControl] = {
|
||||
_type: deviceType.IntersiteControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** LeuControl LEU通信表示灯 */
|
||||
deviceRender[deviceType.LeuControl] = {
|
||||
_type: deviceType.LeuControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** LocalControl 现地主备状态表示灯 */
|
||||
deviceRender[deviceType.LocalControl] = {
|
||||
_type: deviceType.LocalControl,
|
||||
zlevel: 1
|
||||
};
|
||||
/** Maintain 维护工作站表示灯 */
|
||||
deviceRender[deviceType.Maintain] = {
|
||||
_type: deviceType.Maintain,
|
||||
zlevel: 1
|
||||
};
|
||||
/** PowerSupply 电源状态表示灯 */
|
||||
deviceRender[deviceType.PowerSupply] = {
|
||||
_type: deviceType.PowerSupply,
|
||||
zlevel: 1
|
||||
};
|
||||
/** NoOneReturn 无人折返状态表示灯 */
|
||||
deviceRender[deviceType.NoOneReturn] = {
|
||||
_type: deviceType.NoOneReturn,
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
export default deviceRender;
|
||||
|
@ -22,7 +22,16 @@ const deviceType = {
|
||||
Line: 'Line',
|
||||
Text: 'Text',
|
||||
CheckBox: 'CheckBox',
|
||||
AutomaticRoute:'AutomaticRoute'
|
||||
AutomaticRoute:'AutomaticRoute',
|
||||
AtsControl: 'AtsControl',
|
||||
CenterCommunication: 'CenterCommunication',
|
||||
ChainControl: 'ChainControl',
|
||||
IntersiteControl: 'IntersiteControl',
|
||||
LeuControl: 'LeuControl',
|
||||
LocalControl: 'LocalControl',
|
||||
Maintain: 'Maintain',
|
||||
PowerSupply: 'PowerSupply',
|
||||
NoOneReturn: 'NoOneReturn'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
@ -132,6 +132,36 @@ class Status {
|
||||
handleGuideLock(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleResource(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleAtsControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleCenterCommunication(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleChainControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleIntersiteControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleLeuControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleLocalControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleMaintain(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handlePowerSupply(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleNoOneReturn(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
getStatus() {
|
||||
return this.statusObj;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ class Jlmap {
|
||||
return defaultStateDict;
|
||||
}
|
||||
|
||||
setMap(map, mapDevice, routeData) {
|
||||
setMap(map, mapDevice, logicData) {
|
||||
// 保存皮肤类型
|
||||
if (map.skinVO) {
|
||||
this.lineCode = map.skinVO.code;
|
||||
@ -100,7 +100,7 @@ class Jlmap {
|
||||
// 解析后的数据
|
||||
this.mapDevice = mapDevice;
|
||||
// 进路数据
|
||||
this.routeData = routeData;
|
||||
this.logicData = logicData;
|
||||
// 加载对应皮肤
|
||||
this.style = this.loadStyle(this.lineCode);
|
||||
|
||||
@ -323,6 +323,13 @@ class Jlmap {
|
||||
});
|
||||
}
|
||||
}
|
||||
updatePrdType(val, list) {
|
||||
this.showConfig.prdType = val;
|
||||
(list || []).forEach(item => {
|
||||
this.hookHandle(item, this.showConfig);
|
||||
this.$painter.update(item);
|
||||
});
|
||||
}
|
||||
update(list) {
|
||||
this.setUpdateMapDevice(list || []); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
|
||||
(list || []).forEach(elem => {
|
||||
@ -330,7 +337,7 @@ class Jlmap {
|
||||
const type = elem._type;
|
||||
if (elem.deviceType === 'ROUTE') { // 处理进路数据状态
|
||||
store.dispatch('map/updateRouteState', elem);
|
||||
const route = this.routeData[code];
|
||||
const route = this.logicData.routeData[code];
|
||||
if (route.automaticRouteCode) {
|
||||
const automaticRoute = this.mapDevice[route.automaticRouteCode];
|
||||
const automaticRouteStatus = {fleetMode: elem.fleetMode};
|
||||
@ -343,6 +350,26 @@ class Jlmap {
|
||||
if (this.hookHandle(signalDevice, signalStatus)) {
|
||||
this.$painter.update(signalDevice);
|
||||
}
|
||||
} else if (elem.deviceType === 'CYCLE') {
|
||||
store.dispatch('map/updateAutoReentryState', elem);
|
||||
const autoReentryData = this.logicData.autoReentryData[code];
|
||||
const cycleButton = this.mapDevice[autoReentryData.cycleButtonCode];
|
||||
const cycleButtonStatus = {setUp: elem.setUp};
|
||||
if (cycleButton && this.hookHandle(cycleButton, cycleButtonStatus)) {
|
||||
this.$painter.update(cycleButton);
|
||||
}
|
||||
} else if (elem.deviceType === 'STATION') {
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
const guideLock = this.mapDevice[oDevice.guideLockCode];
|
||||
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};
|
||||
if (guideLock && this.hookHandle(guideLock, guideLockStatus)) {
|
||||
this.$painter.update(guideLock);
|
||||
}
|
||||
if (elem.dispose) {
|
||||
this.$painter.delete(oDevice);
|
||||
} else {
|
||||
this.$painter.update(oDevice);
|
||||
}
|
||||
} else {
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
if (elem.dispose) {
|
||||
|
@ -108,12 +108,12 @@ export default class Automactic extends Group {
|
||||
this.control && this.control.setStyle({ fill: this.style.AutoTurnBack.lamp.controlColor });
|
||||
}
|
||||
handleSignal() {
|
||||
this.control.setStyle({ fill: 'green' });
|
||||
this.control.setStyle({ fill: this.style.AutoTurnBack.lamp.lightUpColor });
|
||||
}
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
this.recover();
|
||||
model.green && this.handleSignal();
|
||||
model.setUp && this.handleSignal();
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
|
@ -86,10 +86,17 @@ export default class GuideLock extends Group {
|
||||
this.add(this.control);
|
||||
this.add(this.text);
|
||||
}
|
||||
|
||||
recover() {
|
||||
this.control && this.control.setStyle({ fill: this.style.GuideLock.lamp.controlColor });
|
||||
}
|
||||
handleSignal() {
|
||||
this.control.setStyle({ fill: this.style.GuideLock.lamp.lightUpColor });
|
||||
}
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
this.recover();
|
||||
model.totalGuideLock && this.handleSignal();
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
|
@ -28,7 +28,7 @@ export default class Line2 extends Group {
|
||||
for (let i = 0; i < (model.points.length - 1); i++) {
|
||||
this.add(new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.isLogic ? this.z : this.z + 1,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x1: model.points[i].x,
|
||||
y1: model.points[i].y,
|
||||
@ -37,7 +37,7 @@ export default class Line2 extends Group {
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: style.Line.lineColor
|
||||
stroke: model.lineColor || style.Line.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
53
src/jmapNew/shape/SaidLamp/EMouse.js
Normal file
53
src/jmapNew/shape/SaidLamp/EMouse.js
Normal file
@ -0,0 +1,53 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
|
||||
export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
this.text = new Text({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z + 1,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: this.device.model.position.x,
|
||||
y: this.device.model.position.y + this.device.deviceStyle.lamp.radiusR + this.device.deviceStyle.text.distance - 30,
|
||||
fontWeight: 'normal',
|
||||
fontSize: this.device.deviceStyle.mouseOverStyle.fontSize,
|
||||
fontFamily: this.device.deviceStyle.mouseOverStyle.fontFamily,
|
||||
text: this.device.model.name,
|
||||
textFill: this.device.deviceStyle.mouseOverStyle.fontColor,
|
||||
textAlign: this.device.deviceStyle.mouseOverStyle.textAlign,
|
||||
textVerticalAlign: this.device.deviceStyle.mouseOverStyle.textVerticalAlign
|
||||
}
|
||||
});
|
||||
this.add(this.text);
|
||||
this.text.hide();
|
||||
}
|
||||
mouseover(e) {
|
||||
if (e.target && e.target._subType == 'Text') {
|
||||
this.text.show();
|
||||
} else {
|
||||
this.device.control.setControlColor(this.device.deviceStyle.mouseOverStyle.arcColor);
|
||||
this.device.control.setTextColor(this.device.deviceStyle.mouseOverStyle.textColor);
|
||||
this.device.control.setTextBorder(true);
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
if (e.target && e.target._subType == 'Text') {
|
||||
this.text.hide();
|
||||
} else {
|
||||
this.device.control.setControlColor(this.device.deviceStyle.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
103
src/jmapNew/shape/SaidLamp/index.js
Normal file
103
src/jmapNew/shape/SaidLamp/index.js
Normal file
@ -0,0 +1,103 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import EControl from '../element/EControl';
|
||||
import EMouse from './EMouse';
|
||||
import {isShowThePrdType} from '../../utils/handlePath';
|
||||
|
||||
export default class AtsControl extends Group {
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this.z = 20;
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.deviceStyle = style[model._type];
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, this.deviceStyle.displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
}
|
||||
if (model.previewOrMapDraw) {
|
||||
this.setShowMode();
|
||||
}
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.control = new EControl({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
arc: {
|
||||
shape: {
|
||||
cx: model.position.x,
|
||||
cy: model.position.y,
|
||||
r: this.deviceStyle.lamp.radiusR
|
||||
},
|
||||
subType: 'Control',
|
||||
lineWidth: 0,
|
||||
fill: this.deviceStyle.lamp.controlColor
|
||||
},
|
||||
text: {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + this.deviceStyle.lamp.radiusR + this.deviceStyle.text.distance,
|
||||
fontWeight: this.deviceStyle.text.fontWeight,
|
||||
fontSize: this.deviceStyle.text.fontSize,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
},
|
||||
style: this.style
|
||||
});
|
||||
|
||||
this.add(this.control);
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
if (this.deviceStyle.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
getShapeTipPoint() {
|
||||
if (this.control) {
|
||||
var distance = 2;
|
||||
var rect = this.control.getBoundingRect();
|
||||
return {
|
||||
x: rect.x + rect.width / 2,
|
||||
y: rect.y - distance
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.deviceStyle.displayCondition;
|
||||
if (showConditions === '01' || showMode === showConditions) {
|
||||
this.control && this.control.show();
|
||||
} else {
|
||||
this.control && this.control.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.control && this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.control && this.control.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -15,6 +15,12 @@ export default class ELines extends Group {
|
||||
create(model) {
|
||||
/** 创建区段*/
|
||||
if (model && model.points.length > 1) {
|
||||
let stroke;
|
||||
stroke = model.style.Section.line.spareColor;
|
||||
if (model.style.Section.line.isActiveShow) {
|
||||
stroke = '#2EBFBF';
|
||||
}
|
||||
|
||||
if (model.isCurve) {
|
||||
const shape = {};
|
||||
for (let i = 1; i < (model.points.length - 1); i++) {
|
||||
@ -30,12 +36,12 @@ export default class ELines extends Group {
|
||||
isLine: true,
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: this.z + 1,
|
||||
z: this.z + 2,
|
||||
culling: true,
|
||||
shape: shape,
|
||||
style: {
|
||||
lineWidth: model.style.Section.line.width,
|
||||
stroke: model.style.Section.line.spareColor,
|
||||
stroke: stroke,
|
||||
fillOpacity: 0
|
||||
}
|
||||
});
|
||||
@ -55,7 +61,7 @@ export default class ELines extends Group {
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Section.line.width,
|
||||
stroke: model.style.Section.line.spareColor
|
||||
stroke: stroke
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
// import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
class EMouse extends Group {
|
||||
constructor(device, code) {
|
||||
@ -11,6 +10,7 @@ class EMouse extends Group {
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
// 名称的包围框
|
||||
if (this.device.name) {
|
||||
const rect = this.device.name.getBoundingRect();
|
||||
if (!this.device.isSwitchSection) {
|
||||
@ -66,6 +66,7 @@ class EMouse extends Group {
|
||||
this.add(this.sectionTextShadow);
|
||||
this.sectionTextShadow.hide();
|
||||
}
|
||||
// 区段包围框
|
||||
if (this.device.section) {
|
||||
const rect = this.device.section.getBoundingRect();
|
||||
this.lineBorder = new Rect({
|
||||
|
@ -30,7 +30,6 @@ export default class Section extends Group {
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
this.checkIsDrawMap();
|
||||
}
|
||||
|
||||
create() {
|
||||
@ -52,16 +51,6 @@ export default class Section extends Group {
|
||||
// }
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
// 鼠标事件
|
||||
if (this.style.Section.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this, this.model.relSwitchCode);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
|
||||
/** 创建区段*/
|
||||
createSection() {
|
||||
const model = this.model;
|
||||
@ -69,7 +58,8 @@ export default class Section extends Group {
|
||||
// 创建区段
|
||||
this.section = new ELines({
|
||||
zlevel: this.zlevel,
|
||||
z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层
|
||||
// z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层
|
||||
z: this.z, // 逻辑区段层级降低一层
|
||||
isSwitchSection: model.switchSection,
|
||||
isCurve: model.curve,
|
||||
points: model.type == '04' ? [model.namePosition, model.namePosition] : model.points,
|
||||
@ -87,6 +77,19 @@ export default class Section extends Group {
|
||||
|
||||
this.add(this.section);
|
||||
this.add(this.sectionBlock);
|
||||
|
||||
if (this.style.Section.line.isActiveShow) { // 哈尔滨线路点击背景色
|
||||
this.lineBorder = new ELines({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z - 1, // 逻辑区段层级降低一层
|
||||
isSwitchSection: model.switchSection,
|
||||
isCurve: model.curve,
|
||||
points: model.type == '04' ? [model.namePosition, model.namePosition] : model.points,
|
||||
style: style
|
||||
});
|
||||
this.add(this.lineBorder);
|
||||
this.lineBorder.setStyle({ lineWidth: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
// 折返箭头
|
||||
@ -571,18 +574,9 @@ export default class Section extends Group {
|
||||
});
|
||||
}
|
||||
|
||||
setModelTypeLevel() { // 给含有逻辑区段的 section 层级加一
|
||||
if (this.model.type == '01' && this.model.logicSectionCodeList && this.model.logicSectionCodeList.length > 0) {
|
||||
this.section.setZleve(this.z + 2);
|
||||
}
|
||||
}
|
||||
|
||||
/** 设置区段恢复默认状态*/
|
||||
recover() {
|
||||
if (this.section) {
|
||||
if (this.model.type == '01') {
|
||||
this.section.setZleve(this.z);
|
||||
}
|
||||
this.section.stopAnimation(true);
|
||||
this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段
|
||||
this.section.setStyle({
|
||||
@ -629,7 +623,6 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.communicationOccupiedColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -640,7 +633,6 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -651,7 +643,6 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.routeLockColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -671,7 +662,6 @@ export default class Section extends Group {
|
||||
{ time: 2000, styles: { stroke: this.style.Section.line.blockColor } }
|
||||
]);
|
||||
}
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
|
||||
/** 故障锁定状态 05*/
|
||||
@ -712,7 +702,6 @@ export default class Section extends Group {
|
||||
stroke: this.style.Section.line.protectiveLockColor,
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -762,7 +751,6 @@ export default class Section extends Group {
|
||||
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||
{ time: 2000, styles: { lineWidth: lineWidth } }
|
||||
]);
|
||||
this.setModelTypeLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@ -813,16 +801,9 @@ export default class Section extends Group {
|
||||
sectionC && sectionC.instance && sectionC.instance.setState(sectionC, true);
|
||||
}
|
||||
}
|
||||
let numFlag = 0;
|
||||
model.logicSectionNum.forEach(item => {
|
||||
numFlag += item;
|
||||
});
|
||||
if (numFlag) {
|
||||
return;
|
||||
}
|
||||
// 顺序代表优先级
|
||||
/** 道岔保护区段锁闭 */
|
||||
{ model.overlapLock && this.protectiveLock(); }
|
||||
model.overlapLock && this.protectiveLock();
|
||||
/** 空闲锁闭或者叫进路锁闭 */
|
||||
model.routeLock && this.routeLock();
|
||||
/** 轨道封锁 */
|
||||
@ -870,12 +851,32 @@ export default class Section extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
createMouseEvent() { // 鼠标事件
|
||||
if (this.style.Section.mouseOverStyle) { // 只有北京线路才会有鼠标事件
|
||||
this.mouseEvent = new EMouse(this, this.model.relSwitchCode);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
const path = window.location.href;
|
||||
if (path.includes('/map/draw')) {
|
||||
this.on('mouseout', () => { !this.selectedType && !this.selected && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor }); });
|
||||
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' }); });
|
||||
}
|
||||
}
|
||||
|
||||
drawSelected(selected) {
|
||||
this.selected = selected;
|
||||
if (selected) {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' });
|
||||
if (this.style.Section.line.isActiveShow) {
|
||||
this.lineBorder && this.lineBorder.setStyle({ lineWidth: this.style.Section.line.width + 3 });
|
||||
} else {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' });
|
||||
}
|
||||
} else {
|
||||
!this.selectedType && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor });
|
||||
this.lineBorder && this.lineBorder.setStyle({ lineWidth: 0 });
|
||||
// !this.selectedType && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor });
|
||||
!this.selectedType && this.setState(this.model);
|
||||
}
|
||||
}
|
||||
drawBatchSelected(selected, type) {
|
||||
@ -890,14 +891,6 @@ export default class Section extends Group {
|
||||
this.selectedType = type;
|
||||
}
|
||||
|
||||
checkIsDrawMap() {
|
||||
const path = window.location.href;
|
||||
if (path.includes('/map/draw')) {
|
||||
this.on('mouseout', () => { !this.selectedType && !this.selected && this.section && this.section.setStyle({ stroke: this.style.Section.line.spareColor }); });
|
||||
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({ stroke: '#fbfbfb' }); });
|
||||
}
|
||||
}
|
||||
|
||||
mouseout() {
|
||||
this.drawSelected(false);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ class ELowButton extends Group {
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const style = this.model.style;
|
||||
this.button = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
|
@ -2,62 +2,62 @@ import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.zlevel = device.zlevel;
|
||||
this.style = device.style;
|
||||
this.create();
|
||||
}
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.zlevel = device.zlevel;
|
||||
this.style = device.style;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
this.lampRect = new Rect({
|
||||
silent: true,
|
||||
zlevel: this.zlevel,
|
||||
z: 6,
|
||||
shape: this.device.getBoundingRect(),
|
||||
style: {
|
||||
lineDash: this.style.Signal.mouseOverStyle.borderLineDash,
|
||||
stroke: this.style.Signal.mouseOverStyle.borderLineColor,
|
||||
fill: this.style.transparentColor
|
||||
}
|
||||
});
|
||||
create() {
|
||||
this.lampRect = new Rect({
|
||||
silent: true,
|
||||
zlevel: this.zlevel,
|
||||
z: 6,
|
||||
shape: this.device.getBoundingRect(),
|
||||
style: {
|
||||
lineDash: this.style.Signal.mouseOverStyle.borderLineDash,
|
||||
stroke: this.style.Signal.mouseOverStyle.borderLineColor,
|
||||
fill: this.style.transparentColor
|
||||
}
|
||||
});
|
||||
|
||||
this.nameRect = new Rect({
|
||||
silent: true,
|
||||
zlevel: this.zlevel,
|
||||
z: 5,
|
||||
shape: this.device.sigName.getBoundingRect(),
|
||||
style: {
|
||||
lineDash: this.style.Signal.mouseOverStyle.borderLineDash,
|
||||
stroke: this.style.Signal.mouseOverStyle.borderLineColor,
|
||||
fill: this.style.Signal.mouseOverStyle.nameBackgroundColor
|
||||
}
|
||||
});
|
||||
this.nameRect = new Rect({
|
||||
silent: true,
|
||||
zlevel: this.zlevel,
|
||||
z: 5,
|
||||
shape: this.device.sigName.getBoundingRect(),
|
||||
style: {
|
||||
lineDash: this.style.Signal.mouseOverStyle.borderLineDash,
|
||||
stroke: this.style.Signal.mouseOverStyle.borderLineColor,
|
||||
fill: this.style.Signal.mouseOverStyle.nameBackgroundColor
|
||||
}
|
||||
});
|
||||
|
||||
this.lampRect.hide();
|
||||
this.nameRect.hide();
|
||||
this.add(this.lampRect);
|
||||
this.add(this.nameRect);
|
||||
}
|
||||
this.lampRect.hide();
|
||||
this.nameRect.hide();
|
||||
this.add(this.lampRect);
|
||||
this.add(this.nameRect);
|
||||
}
|
||||
|
||||
mouseover(e) {
|
||||
this.nameRect.show();
|
||||
this.lampRect.show();
|
||||
this.device.lamps.forEach(elem => {
|
||||
elem.setBorderColor(this.style.Signal.mouseOverStyle.lampBorderLineColor);
|
||||
});
|
||||
this.device.sigName && this.device.sigName.setColor(this.style.backgroundColor);
|
||||
}
|
||||
mouseover(e) {
|
||||
this.nameRect.show();
|
||||
this.lampRect.show();
|
||||
this.device.lamps.forEach(elem => {
|
||||
elem.setBorderColor(this.style.Signal.mouseOverStyle.lampBorderLineColor);
|
||||
});
|
||||
this.device.sigName && this.device.sigName.setColor(this.style.backgroundColor);
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
this.nameRect.hide();
|
||||
this.lampRect.hide();
|
||||
this.device.lamps.forEach(elem => {
|
||||
elem.setBorderColor(this.style.Signal.lamp.borderColor);
|
||||
});
|
||||
this.device.setState(this.device.model);
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
this.nameRect.hide();
|
||||
this.lampRect.hide();
|
||||
this.device.lamps.forEach(elem => {
|
||||
elem.setBorderColor(this.style.Signal.lamp.borderColor);
|
||||
});
|
||||
this.device.setState(this.device.model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,113 +0,0 @@
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
|
||||
class ESigButton extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.isNew = false;
|
||||
}
|
||||
|
||||
create() {
|
||||
if (!this.isNew) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const padding = 1;
|
||||
const r = style.Signal.lamp.radiusR * 0.8;
|
||||
|
||||
this.isNew = true;
|
||||
this.sigNormalButtom = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
_subType: 'SignalButton',
|
||||
_val: '1',
|
||||
shape: {
|
||||
x: model.x - style.Signal.lamp.radiusR,
|
||||
y: model.y - r + r * model.posit,
|
||||
width: style.Signal.lamp.radiusR * 2,
|
||||
height: style.Signal.lamp.radiusR * 2
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.2,
|
||||
stroke: style.Signal.button.borderDashColor,
|
||||
fill: style.Signal.button.buttonColor
|
||||
}
|
||||
});
|
||||
|
||||
this.sigNormalButtomDown = new Polyline({
|
||||
_subType: 'SignalButton',
|
||||
_val: '1',
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
silent: true,
|
||||
shape: { points: [
|
||||
[model.x - padding + r, this.sigNormalButtom.shape.y + padding],
|
||||
[model.x + padding - r, this.sigNormalButtom.shape.y + padding],
|
||||
[model.x + padding - r, this.sigNormalButtom.shape.y + padding * 2 + r]
|
||||
] },
|
||||
style: {
|
||||
lineWidth: 0.8,
|
||||
stroke: style.backgroundColor
|
||||
}
|
||||
});
|
||||
|
||||
this.sigReentryButton = new Circle({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
_subType: 'SignalButton',
|
||||
_val: '2', // 折返按钮
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y - 5 / 2 * r * model.posit,
|
||||
r: style.Signal.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.2,
|
||||
stroke: style.Signal.button.borderDashColor,
|
||||
fill: style.Signal.button.buttonColor
|
||||
}
|
||||
});
|
||||
|
||||
this.sigReentryButtonDown = new Arc({
|
||||
_subType: 'SignalButton',
|
||||
_val: '2', // 折返按钮
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
silent: true,
|
||||
shape: {
|
||||
cx: this.sigReentryButton.shape.cx,
|
||||
cy: this.sigReentryButton.shape.cy,
|
||||
r: this.sigReentryButton.shape.r - padding,
|
||||
startAngle: Math.PI * 8 / 5,
|
||||
endAngle: Math.PI * 4 / 5,
|
||||
clockwise: false
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.8,
|
||||
stroke: style.backgroundColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.sigNormalButtom);
|
||||
this.add(this.sigReentryButton);
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.create();
|
||||
this.sigNormalButtom.hide();
|
||||
this.sigReentryButton.hide();
|
||||
}
|
||||
|
||||
show() {
|
||||
this.create();
|
||||
this.sigNormalButtom.show();
|
||||
this.sigReentryButton.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default ESigButton;
|
@ -11,7 +11,7 @@ class ESigPost extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
||||
// 竖杆
|
||||
this.ver = new Polyline({
|
||||
_subType: 'SignalLamp',
|
||||
_val: '3',
|
||||
@ -28,7 +28,7 @@ class ESigPost extends Group {
|
||||
stroke: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
|
||||
// 横杆
|
||||
this.hor = new Polyline({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
@ -53,6 +53,13 @@ class ESigPost extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
if (color) {
|
||||
this.ver && this.ver.setStyle({ stroke: color });
|
||||
this.hor && this.hor.setStyle({ stroke: color });
|
||||
}
|
||||
}
|
||||
|
||||
getLampPosition(type) {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
|
@ -1,17 +1,14 @@
|
||||
/*
|
||||
* 信号机
|
||||
*/
|
||||
|
||||
import ESigPost from './ESigPost';
|
||||
import ESigLamp from './ESigLamp';
|
||||
import ESigAuto from './ESigAuto';
|
||||
import ESigRoute from './ESigRoute';
|
||||
import ESigButton from './ESigButton';
|
||||
import ESigDelay from './ESigDelay';
|
||||
import ESigName from './ESigName';
|
||||
import EMouse from './EMouse';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import EVirtualSignal from './EVirtualSignal';
|
||||
import ELowButton from './ELowButton';
|
||||
@ -39,10 +36,10 @@ class Signal extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
const drict = this.model.right ? 1 : -1; // 朝向 左:右
|
||||
const posit = this.model.positionType == '01' ? -1 : 1; // 位置 上:下
|
||||
const drict = this.model.right ? 1 : -1; // 朝向 左:右
|
||||
const posit = this.model.positionType == '01' ? -1 : 1; // 位置 上:下
|
||||
|
||||
// 信号机高柱矮柱
|
||||
// 信号机高柱矮柱 (信号机底座)
|
||||
this.sigPost = new ESigPost({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -56,7 +53,7 @@ class Signal extends Group {
|
||||
// 信号灯
|
||||
const endPoint = this.sigPost.getLampPosition(model.lampPostType);
|
||||
this.lamps = [];
|
||||
if (style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) {
|
||||
if ((style.Signal.lamp.guidName == 'ningbo_01' || style.Signal.lamp.guidName == 'haerbin_01') && this.count == 1) {
|
||||
this.count = 2;
|
||||
}
|
||||
for (let i = 0; i < this.count; i++) {
|
||||
@ -74,18 +71,6 @@ class Signal extends Group {
|
||||
this.lamps.push(lamp);
|
||||
}
|
||||
|
||||
// 虚拟信号机显示
|
||||
this.virtualSignal = new EVirtualSignal({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: endPoint.x,
|
||||
y: endPoint.y,
|
||||
originX: model.position.x,
|
||||
originY: model.position.y
|
||||
});
|
||||
|
||||
// 信号机名称
|
||||
const sigNameX = model.position.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x;
|
||||
const sigNameY = model.position.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance);
|
||||
@ -111,7 +96,7 @@ class Signal extends Group {
|
||||
// 北京一号线,宁波一号线 自动进路状态
|
||||
// const signalRouteH=;
|
||||
|
||||
// 自动进路
|
||||
// 自动进路 △
|
||||
const sigRouteH = style.Signal.route.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigRouteX = endPoint.x + (style.Signal.route.offset.x + sigRouteH) * drict;
|
||||
const sigRouteY = endPoint.y + (style.Signal.route.offset.y);
|
||||
@ -124,7 +109,7 @@ class Signal extends Group {
|
||||
drict: drict
|
||||
});
|
||||
|
||||
// 自动通过
|
||||
// 自动通过 →
|
||||
const sigAutoH = style.Signal.auto.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigAutoX = endPoint.x + (style.Signal.auto.offset.x + sigAutoH) * drict;
|
||||
const sigAutoY = endPoint.y + (style.Signal.auto.offset.y);
|
||||
@ -161,17 +146,6 @@ class Signal extends Group {
|
||||
textVerticalAlign: 'middle'
|
||||
});
|
||||
|
||||
// 信号灯按钮
|
||||
this.sigButton = new ESigButton({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
posit: posit,
|
||||
show: model.buttonShow,
|
||||
x: model.buttonPosition.x,
|
||||
y: model.buttonPosition.y - posit * (style.Signal.button.distance + style.Signal.lamp.radiusR * 2)
|
||||
});
|
||||
|
||||
if (isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
|
||||
// 北京一号线现地 信号机点击按钮
|
||||
const lowButtonH = this.count * style.Signal.lamp.radiusR * 2;
|
||||
@ -192,11 +166,21 @@ class Signal extends Group {
|
||||
this.add(this.sigDelay);
|
||||
|
||||
if (this.model.virtual) {
|
||||
// 虚拟信号机显示
|
||||
this.virtualSignal = new EVirtualSignal({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: endPoint.x,
|
||||
y: endPoint.y,
|
||||
originX: model.position.x,
|
||||
originY: model.position.y
|
||||
});
|
||||
this.add(this.virtualSignal); // 虚拟信号机 (哈尔滨线路)
|
||||
} else {
|
||||
this.lamps.forEach(lamp => { this.add(lamp); });
|
||||
}
|
||||
// this.add(this.sigButton);
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -227,119 +211,46 @@ class Signal extends Group {
|
||||
|
||||
// 关闭
|
||||
close() {
|
||||
if (this.count == 2 && !this.model.lightType) { // 双灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
if (this.count == 2) { // 双灯
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
|
||||
} else if (this.count == 1) { // 单灯
|
||||
if (this.model.useType == '05' && this.lamps[0]) { // 调车信号机
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType) { // 双灯 逻辑点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 1 && !this.model.lightType) { // 单灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType) { // 单灯 逻辑点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1) {
|
||||
if (this.lamps[0]) {
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
|
||||
/* count 1单灯 2双灯 正向开放*/
|
||||
openPositive() {
|
||||
if (this.count == 2 && !this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 1 && !this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
// if (this.count == 2) {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); // 设置黑色
|
||||
// } else if (this.count == 1) {
|
||||
// this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
// }
|
||||
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.greenColor);
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
this.sigPost.setColor('#00FF00');
|
||||
if (this.model.logicLight) {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* count 1单灯 2双灯 lightType 逻辑点灯 true,物理点灯 false */
|
||||
/* count 1单灯 2双灯 侧向开放 */
|
||||
openLateral() {
|
||||
if (this.count == 2 && !this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 1 && !this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
// 出站信号机/阻隔信号机
|
||||
if (['02', '06'].includes(this.model.useType)) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
// if (this.count == 2) {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
|
||||
// } else if (this.count == 1) {
|
||||
// this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
// }
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
this.sigPost.setColor('#00FF00');
|
||||
if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -362,20 +273,16 @@ class Signal extends Group {
|
||||
|
||||
// 引导
|
||||
guid() {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01') {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01' || this.style.Signal.lamp.guidName == 'haerbin_01') {
|
||||
this.lamps[1].show();
|
||||
}
|
||||
if (this.count == 2 && !this.model.lightType && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 1 && !this.model.lightType && this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStop(false);
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
this.sigPost.setColor('#00FF00');
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 允许引导信号
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
} else if (this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStyle({ fill: this.style.Signal.lamp.yellowColor, stroke: this.style.Signal.lamp.redColor, lineWidth: 2.5 });
|
||||
}
|
||||
}
|
||||
@ -384,7 +291,9 @@ class Signal extends Group {
|
||||
block() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setNameBorder(1)
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') { // 设置底座颜色
|
||||
this.sigPost.setColor('#000080');
|
||||
}
|
||||
this.sigName.setColor(this.style.Signal.text.blockColor);
|
||||
if (this.style.Signal.text.nameBorderShow) {
|
||||
@ -397,7 +306,6 @@ class Signal extends Group {
|
||||
functionBlock() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setRectBlockByIndex(1, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -411,26 +319,22 @@ class Signal extends Group {
|
||||
|
||||
// 故障
|
||||
fault() {
|
||||
if (this.count == 2 && !this.model.lightType) { // 双灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
if (this.count == 2) {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
}
|
||||
|
||||
// 逻辑点灯
|
||||
logicalLight() {
|
||||
if (this.style.Signal.lamp.guidName != 'haerbin_01') { // 哈尔滨不显示 X
|
||||
this.lamps.forEach(lamp => { lamp.setStop(true); });
|
||||
}
|
||||
}
|
||||
|
||||
// 物理点灯
|
||||
logicalLight() {
|
||||
this.lamps.forEach(lamp => { lamp.setStop(false); });
|
||||
}
|
||||
|
||||
// 逻辑点灯
|
||||
physicsLight() {
|
||||
this.lamps.forEach(lamp => { lamp.setStop(true); });
|
||||
this.lamps.forEach(lamp => { lamp.setStop(false); });
|
||||
}
|
||||
|
||||
// 设置人工进路显示状态 (人工控显示黄色三角)
|
||||
@ -439,6 +343,9 @@ class Signal extends Group {
|
||||
this.sigRoute.show();
|
||||
this.sigRoute.setStyle({ fill: this.style.Signal.auto.manualControl });
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') {
|
||||
this.sigName.setColor(this.style.Signal.text.ArtificialRouteColor);
|
||||
}
|
||||
}
|
||||
|
||||
// 设置自动进路模式状态类型
|
||||
@ -450,6 +357,10 @@ class Signal extends Group {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
|
||||
this.sigAuto.show();
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'haerbin_01') {
|
||||
this.sigName.setColor(this.style.Signal.text.AutoRouteColor);
|
||||
this.setAutoClose();
|
||||
}
|
||||
}
|
||||
|
||||
// 信号机进路自动触发模式状态类型
|
||||
@ -482,10 +393,11 @@ class Signal extends Group {
|
||||
this.sigAuto.animationRecover();
|
||||
this.sigRoute.hide();
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
this.sigPost.setColor(this.style.Signal.post.standardColor); // 设置底座默认颜色
|
||||
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01') {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01' || this.style.Signal.lamp.guidName == 'haerbin_01') {
|
||||
this.lamps[1].hide();
|
||||
}
|
||||
}
|
||||
@ -499,45 +411,29 @@ class Signal extends Group {
|
||||
} else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
|
||||
this.setLowButtonRecover();
|
||||
}
|
||||
/** 设置灯的颜色 */
|
||||
if (model.greenOpen) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (model.redOpen) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
} else if (model.yellowOpen) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
}
|
||||
|
||||
/** 信号机进路按钮显示 */
|
||||
model.isRouteSignal && this.setLowButtonShow();
|
||||
/** 信号机封锁 */
|
||||
model.blockade && this.block();
|
||||
// model.linkageAutoRouteShow = 1;
|
||||
/** 设置点灯类型*/
|
||||
if (model.lightType) {
|
||||
this.logicalLight(); // 设置逻辑点灯
|
||||
} else {
|
||||
this.physicsLight(); // 设置物理点灯
|
||||
}
|
||||
model.guid && this.guid(); // 引导信号显示
|
||||
/** 设置灯的颜色 */
|
||||
// model.redOpen = 1;
|
||||
// model.yellowOpen = 0;
|
||||
// model.greenOpen = 0;
|
||||
model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(); // 信号关闭
|
||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(); // 信号正向开放
|
||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(); // 信号侧向开放
|
||||
/** 进路交人工控或自动控 */
|
||||
!model.atsControl && this.setArtificialRouteClose();
|
||||
// 联锁自动进路通过
|
||||
model.fleetMode && this.setAutoRouteOpen();
|
||||
// 设置点灯类型 必须在最后设置不能放前面 logicLight 0 物理点灯 1 逻辑点灯
|
||||
if (model.logicLight) {
|
||||
this.logicalLight(); // 设置逻辑点灯
|
||||
} else {
|
||||
this.physicsLight(); // 设置物理点灯
|
||||
}
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
@ -548,15 +444,10 @@ class Signal extends Group {
|
||||
return rect;
|
||||
}
|
||||
|
||||
getShapeTipPoint(opts) {
|
||||
var rect = new BoundingRect(0, 0, 0, 0);
|
||||
getShapeTipPoint(opts) { // 判断第一步 或 第二部步骤 获取元素包围框
|
||||
var drict = this.model.right ? 1 : -1; // 朝向 右:左
|
||||
var offsetY = this.model.positionType == '01' ? this.style.Signal.text.fontSize : 0; // 位置 上:下
|
||||
if (opts.val == '1' || opts.val == '2') {
|
||||
rect = this.sigButton.getBoundingRect();
|
||||
} else {
|
||||
rect = this.sigPost.getBoundingRect();
|
||||
}
|
||||
const rect = this.sigPost.getBoundingRect();
|
||||
|
||||
return {
|
||||
x: rect.x + drict * this.style.Signal.post.standardWidth,
|
||||
|
@ -293,6 +293,7 @@ export default class Station extends Group {
|
||||
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getShapeTipPoint() {
|
||||
|
@ -21,6 +21,7 @@ import AutoTurnBack from './Automactic/index.js';
|
||||
import OutFrame from './OutFrame/index.js';
|
||||
import CheckBox from './checkBox/checkBox.js';
|
||||
import AutomaticRoute from './AutomacticRoute/index.js';
|
||||
import AtsControl from './SaidLamp/index.js';
|
||||
|
||||
/** 图库*/
|
||||
const mapShape = {};
|
||||
@ -46,6 +47,15 @@ mapShape[deviceType.AxleReset] = AxleReset;
|
||||
mapShape[deviceType.GuideLock] = GuideLock;
|
||||
mapShape[deviceType.CheckBox] = CheckBox;
|
||||
mapShape[deviceType.AutomaticRoute] = AutomaticRoute;
|
||||
mapShape[deviceType.AtsControl] = AtsControl;
|
||||
mapShape[deviceType.CenterCommunication] = AtsControl;
|
||||
mapShape[deviceType.ChainControl] = AtsControl;
|
||||
mapShape[deviceType.IntersiteControl] = AtsControl;
|
||||
mapShape[deviceType.LeuControl] = AtsControl;
|
||||
mapShape[deviceType.LocalControl] = AtsControl;
|
||||
mapShape[deviceType.Maintain] = AtsControl;
|
||||
mapShape[deviceType.PowerSupply] = AtsControl;
|
||||
mapShape[deviceType.NoOneReturn] = AtsControl;
|
||||
|
||||
function shapefactory(device, jmap) {
|
||||
const type = device._type;
|
||||
|
@ -36,13 +36,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
@ -127,64 +127,35 @@ export default {
|
||||
},
|
||||
// 取消列车进路
|
||||
cancelTrainRoute() {
|
||||
this.cancelTrainRouteFunc();
|
||||
},
|
||||
cancelTrainRouteFunc() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
messages: [`信号关灯: ${this.signalName}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.confirmControl.doShow(data.operate);
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消
|
||||
|
@ -1,53 +1,69 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="beijing-01__systerm route-detail" :title="title" :visible.sync="show" width="340px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>车站</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>进路列表</span>
|
||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
|
||||
:height="140">
|
||||
<el-table-column label="进路">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="控制状态" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm route-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>车站</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>进路列表</span>
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column label="进路">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="控制状态" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
@ -61,8 +77,8 @@ export default {
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
}
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -78,24 +94,24 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '查询进路状态'
|
||||
return '查询进路状态';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
//如果不是因为断点激活则需要,初始化菜单初始值
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -115,11 +131,10 @@ export default {
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -134,10 +149,9 @@ export default {
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -148,5 +162,5 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -80,7 +80,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
@ -278,47 +278,24 @@ export default {
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||
param:{
|
||||
routeCodeList:this.selection
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||
param:{
|
||||
routeCodeList:this.selection
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -61,11 +61,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
@ -210,7 +210,6 @@ export default {
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
@ -225,34 +224,20 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
||||
param: {
|
||||
routeCode: this.row.code
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -45,10 +45,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
@ -75,12 +76,14 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
this.radio = '2';
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
this.radio = '1';
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return '区故解';
|
||||
@ -157,48 +160,24 @@ export default {
|
||||
},
|
||||
// 区故解
|
||||
faultUnlock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.fault);
|
||||
},
|
||||
// 计轴预复位
|
||||
axlePreReset() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.axlePreReset);
|
||||
},
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.split);
|
||||
},
|
||||
// 轨道区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.active);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -207,18 +186,14 @@ export default {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,78 +1,104 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="beijing-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
||||
:value="option.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="nameLabel" label-width="80px">
|
||||
<el-input v-model="name" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限速值" label-width="80px">
|
||||
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled"
|
||||
@change="speedSelectChange">
|
||||
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table class="table" ref="table" :data="tableData" border style="width: 100%" size="mini"
|
||||
highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="50" label="序号">
|
||||
</el-table-column>
|
||||
<el-table-column prop="date" :width="160" label="时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="context" :width="180" label="执行过程">
|
||||
</el-table-column>
|
||||
<el-table-column prop="result" label="执行结果">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="notice">{{message}}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate"></confirm-control-speed>
|
||||
</div>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm section-cmd-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="nameLabel" label-width="80px">
|
||||
<el-input v-model="name" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限速值" label-width="80px">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="speed"
|
||||
size="small"
|
||||
:disabled="spdDisabled"
|
||||
@change="speedSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
class="table"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="50" label="序号" />
|
||||
<el-table-column prop="date" :width="160" label="时间" />
|
||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||
<el-table-column prop="result" label="执行结果" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
@ -107,7 +133,7 @@ export default {
|
||||
stationName: '',
|
||||
name: '',
|
||||
speed: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
nameLabel() {
|
||||
@ -117,14 +143,14 @@ export default {
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
return '道岔名称';
|
||||
}else{
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
speedList() {
|
||||
let list = [{ name: '不限速', value: '-1' }];
|
||||
const list = [{ name: '不限速', value: '-1' }];
|
||||
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||
let speed = String(i * this.speedSpace);
|
||||
const speed = String(i * this.speedSpace);
|
||||
list.push({ name: speed, value: speed });
|
||||
}
|
||||
return list;
|
||||
@ -134,8 +160,8 @@ export default {
|
||||
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
|
||||
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
|
||||
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
|
||||
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' },
|
||||
]
|
||||
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }
|
||||
];
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
@ -264,9 +290,9 @@ export default {
|
||||
}
|
||||
},
|
||||
isCancelSpeed() {
|
||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation
|
||||
|| this.operation == OperationEvent.Switch.cancelSpeed.menu.operation
|
||||
},
|
||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
@ -294,7 +320,7 @@ export default {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
@ -310,7 +336,7 @@ export default {
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000)
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
@ -326,20 +352,20 @@ export default {
|
||||
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.name += section.name
|
||||
this.name += section.name;
|
||||
}
|
||||
}
|
||||
this.name += selected.name
|
||||
this.name += selected.name;
|
||||
}
|
||||
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.name = selected.name
|
||||
this.name = selected.name;
|
||||
}
|
||||
}
|
||||
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -373,17 +399,17 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
speedSelectChange(val) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
val: val,
|
||||
}
|
||||
val: val
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.choose.operation
|
||||
operate.operation = OperationEvent.Section.setSpeed.choose.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.choose.operation
|
||||
operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||
@ -392,12 +418,12 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
command() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
}
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -429,12 +455,12 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
}
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -464,17 +490,17 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
over:true,
|
||||
type: this.type,
|
||||
val: this.speed,
|
||||
param: {
|
||||
speedLimitValue: `${this.speed}`
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -509,12 +535,12 @@ export default {
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
}
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -541,13 +567,13 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
close() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -581,8 +607,8 @@ export default {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -1,41 +1,58 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-run-level" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationName" size="mini" disabled></el-input>
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationStrategy" size="mini" disabled></el-input>
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
|
||||
<el-table ref="table" :data="strategyList" border :cell-style="tableStyle" style="width: 100%; margin-top:10px"
|
||||
size="mini" @row-click="clickEvent" height="120" highlight-current-row :show-header="false">
|
||||
<el-table-column prop="label" :id="domIdChoose" style="margin-left:30px">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||
确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl"></confirm-control>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-run-level"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationName" size="mini" disabled />
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationStrategy" size="mini" disabled />
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="strategyList"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%; margin-top:10px"
|
||||
size="mini"
|
||||
height="120"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="label" style="margin-left:30px" />
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||
确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
@ -65,7 +82,7 @@ export default {
|
||||
{
|
||||
value: '04',
|
||||
label: '关闭'
|
||||
},
|
||||
}
|
||||
],
|
||||
stationName: '',
|
||||
stationStrategy: '',
|
||||
@ -73,13 +90,13 @@ export default {
|
||||
isConfirm: false,
|
||||
strategy: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -100,17 +117,17 @@ export default {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
let stationList = [...this.stationList];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode)
|
||||
const stationList = [...this.stationList];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
this.$nextTick(() => {
|
||||
this.$refs.table.setCurrentRow(null);
|
||||
})
|
||||
});
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
this.selected = selected;
|
||||
@ -125,7 +142,7 @@ export default {
|
||||
if (item.value == opts.reentryStrategy) {
|
||||
this.stationStrategy = item.label;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
@ -138,7 +155,7 @@ export default {
|
||||
},
|
||||
clickEvent(row, column, event) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation
|
||||
};
|
||||
this.strategy = row.value;
|
||||
this.isConfirm = true;
|
||||
@ -146,7 +163,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
@ -155,10 +172,10 @@ export default {
|
||||
if (row.check && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = selection.length ? false : true;
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.selection = selection;
|
||||
}
|
||||
@ -171,25 +188,13 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
const operate = {
|
||||
over:true,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
param:{
|
||||
standReentryStrategy: this.strategy
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
||||
@ -197,7 +202,7 @@ export default {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -209,5 +214,5 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -110,10 +110,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
@ -142,7 +143,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
upRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||
@ -252,65 +253,25 @@ export default {
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.setDetainTrain);
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
|
||||
},
|
||||
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
};
|
||||
|
||||
this.sendCommand(menuOperate.StationStand.earlyDeparture);
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -103,9 +103,10 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
@ -163,7 +164,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
return '跳停';
|
||||
@ -243,65 +244,29 @@ export default {
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
// let val = this.model.val1;
|
||||
// if (this.model.val2) {
|
||||
// val = this.model.val2 + '::' + this.model.tripNumber;
|
||||
// }
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
param:{
|
||||
trainGroupNumber:this.model.tripNumber
|
||||
}
|
||||
// val: this.selected.direction //站台的上下行方向, 01:下行 /02:上行
|
||||
// val: val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
// let val = this.model.val1;
|
||||
// if (this.model.val2) {
|
||||
// val = this.model.val2 + '::' + this.model.tripNumber;
|
||||
// }
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
param:{
|
||||
trainGroupNumber:this.model.tripNumber
|
||||
}
|
||||
// val: val // 站台的上下行方向, 01:下行 /02:上行
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
|
@ -89,7 +89,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
@ -311,27 +311,13 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||
param: {
|
||||
runLevelTime: this.time,
|
||||
runLevelTimeForever: !!this.tempData[0].check
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
||||
|
@ -69,7 +69,7 @@
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandStopTime',
|
||||
@ -210,28 +210,13 @@ export default {
|
||||
// });
|
||||
// },
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||
param: {
|
||||
parkingTime: this.control == '01' ? -1 : 1,
|
||||
parkingAlwaysValid: this.effective == '1'
|
||||
}
|
||||
// messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -55,9 +55,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
// import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
@ -87,7 +89,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
@ -158,34 +160,18 @@ export default {
|
||||
},
|
||||
// 道岔单解
|
||||
unlock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.unlock);
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.split);
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Switch.active);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Switch.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
@ -200,15 +186,12 @@ export default {
|
||||
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (model.setting) {
|
||||
if (model.totalGuideLock) {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK;
|
||||
} else {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK;
|
||||
@ -396,7 +396,8 @@ export default {
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.functionButton.button.operation : {
|
||||
if (model && model._type == 'AutoTurnBack' && !model.setting) {
|
||||
|
||||
if (model && model._type == 'AutoTurnBack' && !model.setUp) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
@ -417,7 +418,8 @@ export default {
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.totalCancel.button.operation: {
|
||||
if (model && model._type == 'AutoTurnBack' && model.setting) {
|
||||
debugger;
|
||||
if (model && model._type == 'AutoTurnBack' && model.setUp) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
|
@ -1,120 +1,132 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm two-confirmation" title="二次确认" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span> {{message}}</span><br>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:show-close="false"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span> {{ message }}</span><br>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
operate: '',
|
||||
timer: null
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
operate: '',
|
||||
timer: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.emergencyStationControl.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
|
||||
return OperationEvent.StationControl.emergencyStationControl.confirm.domId;
|
||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
return OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
messages() {
|
||||
if (this.operate) {
|
||||
return this.operate.messages;
|
||||
}
|
||||
return []
|
||||
messages() {
|
||||
if (this.operate) {
|
||||
return this.operate.messages;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.operation = this.operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
return [];
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, message) {
|
||||
this.operate = operate || {};
|
||||
this.operate.messages = [];
|
||||
this.operate.messages.push(message);
|
||||
this.operation = this.operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
val: this.operate.val,
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
|
||||
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.emergencyStationControl.confirm.operation;
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation:this.operation
|
||||
};
|
||||
// debugger;
|
||||
// if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
// operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
// } else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
// operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
// } else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
|
||||
// operate.operation = OperationEvent.StationControl.emergencyStationControl.confirm.operation;
|
||||
// }
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
|
||||
this.doClose();
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -1,231 +1,206 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm station-control" title="控制模式转换" :visible.sync="show" width="400px"
|
||||
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<el-row> 集中站 </el-row>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<el-select v-model="stationCode" filterable placeholder="请选择" style="width: 100%;" :id="domIdChooseStation"
|
||||
@change="handleChooseChangeStation">
|
||||
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-row>
|
||||
<el-radio-group v-model="stationType" :id="domIdChooseControl">
|
||||
<el-row style="padding-bottom: 10px" v-for="item in Object.keys(controlProps)" :key="item">
|
||||
<el-radio :label="item" @change="handleChooseChangeControl">
|
||||
{{controlProps[item]}}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel" style="margin-left: 200px">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<two-confirmation ref="twoConfirmation"></two-confirmation>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
title="控制模式转换"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row> 集中站 </el-row>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<el-select
|
||||
:id="domIdChooseStation"
|
||||
v-model="stationCode"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%;"
|
||||
@change="handleChooseChangeStation"
|
||||
>
|
||||
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-row>
|
||||
<el-radio-group :id="domIdChooseControl" v-model="stationType">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px">
|
||||
<el-radio :label="item" @change="handleChooseChangeControl">
|
||||
{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<two-confirmation ref="twoConfirmation" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
import { mapGetters } from 'vuex';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationControl',
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
stationType: '01',
|
||||
stationCode: '',
|
||||
controlProps: {
|
||||
'03': '紧急站控',
|
||||
'02': '站控',
|
||||
'01': '遥控',
|
||||
},
|
||||
export default {
|
||||
name: 'StationControl',
|
||||
components: {
|
||||
TwoConfirmation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
stationType: '01',
|
||||
stationCode: '',
|
||||
controlProps: {
|
||||
'03': '紧急站控',
|
||||
'02': '站控',
|
||||
'01': '遥控'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
components: {
|
||||
TwoConfirmation
|
||||
domIdChooseControl() {
|
||||
return this.dialogShow ? OperationEvent.Command.order.choose.domId : '';
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChooseControl() {
|
||||
return this.dialogShow ? OperationEvent.Command.order.choose.domId : '';
|
||||
},
|
||||
domIdChooseStation() {
|
||||
return this.dialogShow ? OperationEvent.Command.order.choose1.domId : '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.stationType == '01') {
|
||||
return OperationEvent.StationControl.requestCentralControl.menu.domId;
|
||||
} else if (this.stationType == '02') {
|
||||
return OperationEvent.StationControl.requestStationControl.menu.domId;
|
||||
} else if (this.stationType == '03') {
|
||||
return OperationEvent.StationControl.emergencyStationControl.menu.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
domIdChooseStation() {
|
||||
return this.dialogShow ? OperationEvent.Command.order.choose1.domId : '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
handleChooseChangeStation() {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.Command.order.choose1.operation,
|
||||
val: this.stationCode,
|
||||
}
|
||||
|
||||
// if (this.stationType == '01') {
|
||||
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose1.operation
|
||||
// } else if (this.stationType == '02') {
|
||||
// operate.operation = OperationEvent.StationControl.requestStationControl.choose1.operation
|
||||
// } else if (this.stationType == '03') {
|
||||
// operate.operation = OperationEvent.StationControl.emergencyStationControl.choose1.operation
|
||||
// }
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
handleChooseChangeControl() {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.Command.order.choose.operation,
|
||||
val: this.stationCode,
|
||||
}
|
||||
|
||||
// if (this.stationType == '01') {
|
||||
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation
|
||||
// } else if (this.stationType == '02') {
|
||||
// operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation
|
||||
// } else if (this.stationType == '03') {
|
||||
// operate.operation = OperationEvent.StationControl.emergencyStationControl.choose.operation
|
||||
// }
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.stationType == '01') {
|
||||
// 请求遥控
|
||||
this.conterCommit();
|
||||
return OperationEvent.StationControl.requestCentralControl.menu.domId;
|
||||
} else if (this.stationType == '02') {
|
||||
// 请求站控
|
||||
this.requestCommit();
|
||||
return OperationEvent.StationControl.requestStationControl.menu.domId;
|
||||
} else if (this.stationType == '03') {
|
||||
// 紧急站控
|
||||
this.emergencyCommit();
|
||||
return OperationEvent.StationControl.emergencyStationControl.menu.domId;
|
||||
}
|
||||
},
|
||||
// 请求遥控
|
||||
conterCommit() {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
|
||||
val: `${this.stationCode}::`,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
// 请求站控
|
||||
requestCommit() {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
|
||||
val: `${this.stationCode}::`,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
})
|
||||
},
|
||||
// 紧急站控
|
||||
emergencyCommit() {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
|
||||
val: `${this.stationCode}::`,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.twoConfirmation.doShow(operate);
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChooseChangeStation() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.order.choose1.operation
|
||||
};
|
||||
|
||||
// if (this.stationType == '01') {
|
||||
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose1.operation
|
||||
// } else if (this.stationType == '02') {
|
||||
// operate.operation = OperationEvent.StationControl.requestStationControl.choose1.operation
|
||||
// } else if (this.stationType == '03') {
|
||||
// operate.operation = OperationEvent.StationControl.emergencyStationControl.choose1.operation
|
||||
// }
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChooseChangeControl() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.order.choose.operation
|
||||
};
|
||||
|
||||
// if (this.stationType == '01') {
|
||||
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation
|
||||
// } else if (this.stationType == '02') {
|
||||
// operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation
|
||||
// } else if (this.stationType == '03') {
|
||||
// operate.operation = OperationEvent.StationControl.emergencyStationControl.choose.operation
|
||||
// }
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.stationType == '01') {
|
||||
// 请求遥控
|
||||
this.conterCommit();
|
||||
} else if (this.stationType == '02') {
|
||||
// 请求站控
|
||||
this.requestCommit();
|
||||
} else if (this.stationType == '03') {
|
||||
// 紧急站控
|
||||
this.emergencyCommit();
|
||||
}
|
||||
},
|
||||
// 请求遥控
|
||||
conterCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCode:this.stationCode}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由站控转为中控:');
|
||||
});
|
||||
},
|
||||
// 请求站控
|
||||
requestCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCode:this.stationCode}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:');
|
||||
});
|
||||
},
|
||||
// 紧急站控
|
||||
emergencyCommit() {
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCode:this.stationCode}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
@ -234,4 +209,4 @@
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -20,6 +20,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -172,18 +173,8 @@ export default {
|
||||
// },
|
||||
// 故障解锁
|
||||
faultUnlock(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
param: {
|
||||
sectionCode: selectType.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, data.selected);
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
@ -196,104 +187,37 @@ export default {
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
param: {
|
||||
sectionCode: selectType.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, selectType);
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
// axlePreReset() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
// param: {
|
||||
// sectionCode: `${this.selected.code}`
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// this.commitOperate(menuOperate.Section.axlePreReset, {sectionCode:this.selected.code},0).then((data)=>{
|
||||
// this.$refs.sectionCmdControl.doShow(data.operate, this.selected);
|
||||
// });
|
||||
// },
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -294,7 +295,6 @@ export default {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -332,279 +332,105 @@ export default {
|
||||
},
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
// param: {
|
||||
// signalCode: `${this.selected.code}`
|
||||
// }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, routes);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
});
|
||||
},
|
||||
// 现地设置进路
|
||||
setRoute(route) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
param: {
|
||||
routeCode: route.code
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, [], 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 现地取消进路
|
||||
cancelTrainRouteByLow(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
param: {
|
||||
signalCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地总人解
|
||||
humanTrainRoute(selectType) {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
step.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
this.$refs.password.doShow(step);
|
||||
}
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then((data)=>{
|
||||
data.operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
this.$refs.password.doShow(data.operate);
|
||||
});
|
||||
},
|
||||
// 现地信号重开操作
|
||||
reopenSignalByRoute(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
param: {
|
||||
signalCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 现地信号关灯
|
||||
signalCloseByLow(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
param: {
|
||||
signalCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, routes);
|
||||
}
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, routes);
|
||||
}
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
singalPassModel(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
param: {
|
||||
signalCode:selectType.code
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消通过模式
|
||||
singalCancelPassModel(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
param: {
|
||||
signalCode:selectType.code
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeDetail.doShow(step, this.selected, routes);
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
|
@ -27,6 +27,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -242,75 +243,28 @@ export default {
|
||||
},
|
||||
// 现地设置扣车
|
||||
setDetainTrainByLow(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
param:{
|
||||
standCode:selectType.code
|
||||
},
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
/** 取消扣车 */
|
||||
cancleDetainTrainByLow(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
param:{
|
||||
standCode:selectType.code
|
||||
},
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
param:{
|
||||
standCode:this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
param:{
|
||||
standCode:this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 强制取消扣车
|
||||
@ -331,131 +285,44 @@ export default {
|
||||
// },
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
param:{
|
||||
standCode:this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
param:{
|
||||
standCode:this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
setStopTime() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
param:{
|
||||
standCode:this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const tempData = [];
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standStopTime.doShow(operate, this.selected, tempData);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standStopTime.doShow(data.operate, this.selected, []);
|
||||
});
|
||||
},
|
||||
// 运行时间控制
|
||||
setRunLevel() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
param:{
|
||||
standCode:this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const tempData = [];
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected, tempData);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standRunLevel.doShow(data.operate, this.selected, []);
|
||||
});
|
||||
},
|
||||
// 设置提前发车
|
||||
earlyDeparture() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
param:{
|
||||
standCode:this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
param:{
|
||||
standCode:this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const tempData = [];
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standBackStrategy.doShow(operate, this.selected, tempData);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standBackStrategy.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
const tempData = [];
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.standDetail.doShow(operate, this.selected, tempData);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.standDetail.doShow(data.operate, this.selected, []);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -237,167 +238,63 @@ export default {
|
||||
},
|
||||
// 道岔单锁
|
||||
lock(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
param: {
|
||||
switchCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
param: {
|
||||
switchCode: selectType.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, selectType);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 现地道岔强扳
|
||||
switchTurnoutForce(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
param:{
|
||||
switchCode:selectType.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, selectType);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
param: {
|
||||
switchCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 单操到反位
|
||||
reverse(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
param: {
|
||||
switchCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 设置临时限速
|
||||
setSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
228
src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js
Normal file
228
src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js
Normal file
@ -0,0 +1,228 @@
|
||||
import store from '@/store';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
axlePreReset:{
|
||||
// 区段计轴预复位
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
},
|
||||
fault:{
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
arrangementRoute:{
|
||||
// 排列进路
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
cancelTrainRoute:{
|
||||
// 取消进路
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
humanTrainRoute:{
|
||||
// 总人解
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||
cmdType:CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
},
|
||||
reopenSignal:{
|
||||
// 信号重开
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
signalClose:{
|
||||
// 信号关灯
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
humanControl:{
|
||||
// 进路交人工控
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
atsAutoControl:{
|
||||
// 进路交自动控
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
setAutoInterlock:{
|
||||
// 设置通过模式
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
cancelAutoInterlock:{
|
||||
// 取消通过模式
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
detail:{
|
||||
// 查询进路状态
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
// 道岔单锁
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
unlock:{
|
||||
// 道岔解锁
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
turnoutForce:{
|
||||
// 道岔强扳
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||
},
|
||||
locate:{
|
||||
// 单操到定位
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
reverse:{
|
||||
// 单操到反位
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置临时限速
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
}
|
||||
|
||||
},
|
||||
StationStand:{
|
||||
setDetainTrain:{
|
||||
// 设置扣车
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrain:{
|
||||
// 取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
setJumpStop:{
|
||||
// 设置跳停
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
cancelJumpStop:{
|
||||
// 取消跳停
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
setStopTime:{
|
||||
// 停站时间控制
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
setRunLevel:{
|
||||
// 运行时间控制
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
earlyDeparture:{
|
||||
// 设置提前发车
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
setBackStrategy:{
|
||||
// 设置折返策略
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
detail:{
|
||||
// 查询站台状态
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
requestCentralControl:{
|
||||
// 请求中控(遥控)
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
},
|
||||
requestStationControl:{
|
||||
// 请求站控
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
emergencyStationControl:{
|
||||
// 紧急站控
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
if (over == 2 || over == 3) {
|
||||
step.over = true;
|
||||
step.cmdType = operate.cmdType;
|
||||
}
|
||||
return new Promise(function(resolve, reject) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
resolve({operate:step});
|
||||
}
|
||||
}).catch(error=>{
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
@ -11,54 +11,54 @@
|
||||
:close-on-click-modal="false"
|
||||
center
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="50px" :model="addModel" :rules="rules">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<el-row style="margin-bottom: 0; height: 40px">
|
||||
<el-col :span="3">
|
||||
<el-form-item label="Number" prop="number">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="设备编号" prop="number">
|
||||
<el-input v-model="addModel.number" style="width: 50px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="Type" prop="type">
|
||||
<el-form-item label="设备类型" prop="type">
|
||||
<el-input v-model="addModel.type" style="width: 30px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label-width="100px" label="Control Point" prop="controlPoint">
|
||||
<el-col :span="10">
|
||||
<el-form-item label-width="100px" label="控制点" prop="controlPoint">
|
||||
<el-input v-model="addModel.controlPoint" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="Device" prop="device">
|
||||
<el-form-item label="设备ID" prop="device">
|
||||
<el-input v-model="addModel.device" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<hr style="height:1px;border:none;border-top:1px solid #406B6C;width: 892px;position: absolute; left: 3px;margin-top: 0">
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="Tag" prop="tag">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="标签" prop="tag">
|
||||
<el-input v-model="addModel.tag" style="width: 80px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="Expires on" prop="startTime" label-width="80px">
|
||||
<el-form-item label="日期" prop="startTime" label-width="80px">
|
||||
<el-input v-model="addModel.startTime" style="width: 50px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="at" prop="endTime">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="时间" prop="endTime">
|
||||
<el-input v-model="addModel.endTime" style="width: 30px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<div style="border-width: 1px; border-style:double;border-color: #335658 #99C1C3 #99C1C3 #335658; height: 32px;">
|
||||
<span class="base-label">Inhibits</span>
|
||||
<span class="base-label">设备限制类型</span>
|
||||
<el-form-item prop="inhibits" style="top: 0;position:absolute;">
|
||||
<el-checkbox-group v-model="addModel.inhibits">
|
||||
<el-checkbox label="Control inhibit" />
|
||||
<el-checkbox label="Alarm inhibit" />
|
||||
<el-checkbox label="Out of service" />
|
||||
<el-checkbox label="控制禁止" />
|
||||
<el-checkbox label="报警禁止" />
|
||||
<el-checkbox label="设备停用" />
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@ -66,48 +66,48 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="Reason" prop="reason">
|
||||
<el-input v-model="addModel.reason" />
|
||||
<el-form-item label="原因" prop="reason">
|
||||
<el-input v-model="addModel.reason" placeholder="自动释放" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="Notes" prop="notes" label-width="0">
|
||||
<el-input v-model="addModel.notes" type="textarea" :rows="5" />
|
||||
<el-form-item label="注释" prop="notes" label-width="0">
|
||||
<el-input v-model="addModel.notes" type="textarea" :rows="5" placeholder="说明更改状态和相应程序的说明" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="Created By" prop="creator" label-width="86px">
|
||||
<el-form-item label="创建人" prop="creator" label-width="86px">
|
||||
<el-input v-model="addModel.creator" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="on" prop="createStartTime">
|
||||
<el-form-item label="日期" prop="createStartTime">
|
||||
<el-input v-model="addModel.createStartTime" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="at" prop="createEndTime">
|
||||
<el-form-item label="时间" prop="createEndTime">
|
||||
<el-input v-model="addModel.createEndTime" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="Modified By" prop="modifier" label-width="86px">
|
||||
<el-form-item label="修改人" prop="modifier" label-width="86px">
|
||||
<el-input v-model="addModel.modifier" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="on" prop="modifyStartTime">
|
||||
<el-form-item label="日期" prop="modifyStartTime">
|
||||
<el-input v-model="addModel.modifyStartTime" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="at" prop="modifyEndTime">
|
||||
<el-form-item label="时间" prop="modifyEndTime">
|
||||
<el-input v-model="addModel.modifyEndTime" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -115,17 +115,17 @@
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="error" label-width="0">
|
||||
<el-input v-model="addModel.error" type="textarea" :rows="3" />
|
||||
<el-input v-model="addModel.error" type="textarea" :rows="3" placeholder="下一步前请更改提示的错误" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">Ok</el-button>
|
||||
<el-button type="primary" :loading="loading">Apply</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
|
||||
<el-button>Help</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||
<el-button type="primary" :loading="loading">应用</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
@ -183,7 +183,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return 'Device Tag';
|
||||
return '设备标签';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -14,14 +14,14 @@
|
||||
<el-form ref="form" size="small" label-width="50px" :model="addModel" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="20" :offset="4">
|
||||
<el-form-item label-width="80px" label="Location" prop="location">
|
||||
<el-form-item label-width="80px" label="位置" prop="location">
|
||||
<el-input v-model="addModel.location" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="height: 40px;">
|
||||
<el-col :span="20" :offset="4">
|
||||
<el-form-item label-width="80px" label="Track" prop="track">
|
||||
<el-form-item label-width="80px" label="轨道" prop="track">
|
||||
<el-input v-model="addModel.track" style="width: 60px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -30,14 +30,14 @@
|
||||
<el-row style="margin-top: 20px; margin-bottom: 20px">
|
||||
<el-col :span="2" :offset="4">
|
||||
<div style="text-align: center; color: #000;">
|
||||
<span>Vehicle Regulation</span>
|
||||
<span>列车规则</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-form-item label-width="0" prop="mode">
|
||||
<el-radio-group v-model="addModel.radio" style="position: absolute; left: 120px;">
|
||||
<el-radio label="1">Use Default Dwell</el-radio>
|
||||
<el-radio label="2">Use Min/Max Range</el-radio>
|
||||
<el-radio label="1">默认停站方式</el-radio>
|
||||
<el-radio label="2">最小最大范围方式</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -45,7 +45,7 @@
|
||||
<hr style="height:1px;border:none;border-top:1px solid #555555;width: 696px; position: absolute;left: 2px; margin-top: 0">
|
||||
<el-row style="margin-top: 30px; height: 40px;">
|
||||
<el-col :span="20" :offset="4">
|
||||
<el-form-item label-width="140px" label="Default Dwell Time" prop="defaultDwellTime">
|
||||
<el-form-item label-width="140px" label="默认停站时间" prop="defaultDwellTime">
|
||||
<el-input v-model="addModel.defaultDwellTime" style="width: 50px; position: absolute;left: 40px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -53,14 +53,14 @@
|
||||
<hr style="height:1px;border:none;border-top:1px solid #555555;width: 696px; position: absolute;left: 2px; margin-top: 0">
|
||||
<el-row>
|
||||
<el-col :span="20" :offset="4">
|
||||
<el-form-item label-width="140px" label="Minimum Dwell" prop="minimumDwell">
|
||||
<el-form-item label-width="140px" label="最小停站时间" prop="minimumDwell">
|
||||
<el-input v-model="addModel.minimumDwell" style="width: 50px;position: absolute;left: 40px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="20" :offset="4">
|
||||
<el-form-item label-width="140px" label="Maximum Dwell" prop="maximumDwell">
|
||||
<el-form-item label-width="140px" label="最大停站时间" prop="maximumDwell">
|
||||
<el-input v-model="addModel.maximumDwell" style="width: 50px;position: absolute;left: 40px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -73,9 +73,9 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12" :offset="7">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">OK</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
|
||||
<el-button>Help</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
||||
},
|
||||
title() {
|
||||
return 'Platform Dwell';
|
||||
return '站台停站';
|
||||
},
|
||||
speedList() {
|
||||
const list = [];
|
||||
|
@ -14,33 +14,33 @@
|
||||
<el-form ref="form" size="small" label-width="50px" :model="addModel" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="Number" prop="number">
|
||||
<el-form-item label="序号" prop="number">
|
||||
<el-input v-model="addModel.number" style="width: 50px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="Start Track Line" prop="startTrackLine" label-width="120px">
|
||||
<el-form-item label="起始区段" prop="startTrackLine" label-width="120px">
|
||||
<el-select v-model="addModel.startTrackLine" popper-class="chengdou-01__select-option" style="width: 230px;" placeholder="">
|
||||
<el-option label="CMC TEST TRACK" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label-width="100px" label="Start Point" prop="startPoint">
|
||||
<el-form-item label-width="100px" label="始端信号机" prop="startPoint">
|
||||
<el-input v-model="addModel.startPoint" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11" :offset="3">
|
||||
<el-form-item label="End Track Line" prop="endTrackLine" label-width="120px">
|
||||
<el-form-item label="End Track Line" prop="终止区段" label-width="120px">
|
||||
<el-select v-model="addModel.endTrackLine" popper-class="chengdou-01__select-option" style="width: 230px;" placeholder="">
|
||||
<el-option label="CMC TEST TRACK" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label-width="100px" label="End Point" prop="endPoint">
|
||||
<el-form-item label-width="100px" label="终端信号机" prop="endPoint">
|
||||
<el-input v-model="addModel.endPoint" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -49,13 +49,13 @@
|
||||
<el-col :span="3">
|
||||
<el-form-item prop="zone" label-width="0">
|
||||
<el-checkbox-group v-model="addModel.zone">
|
||||
<el-checkbox label="Wrok Zone" />
|
||||
<el-checkbox label="Zone Closure" />
|
||||
<el-checkbox label="工作空间" />
|
||||
<el-checkbox label="关闭空间" />
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="Speed Limit(mph)" label-width="150px" prop="speed">
|
||||
<el-form-item label="限速(mph)" label-width="150px" prop="speed">
|
||||
<el-select v-model="addModel.speed" popper-class="chengdou-01__select-option" style="width: 70px" placeholder="">
|
||||
<el-option v-for="item in speedList" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
@ -63,37 +63,37 @@
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-form-item props="modes" label-width="0">
|
||||
<el-transfer v-model="addModel.modes" style="height: 180px;" :titles="['Allowed Modes', 'Prohibited Modes']" :data="transferData" />
|
||||
<el-transfer v-model="addModel.modes" style="height: 180px;" :titles="['允许模式', '禁止模式']" :data="transferData" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="Reason" prop="reason">
|
||||
<el-form-item label="原因" prop="reason">
|
||||
<el-input v-model="addModel.reason" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="Notes" prop="notes" label-width="0">
|
||||
<el-form-item label="注释" prop="notes" label-width="0">
|
||||
<el-input v-model="addModel.notes" type="textarea" :rows="5" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="Created By" prop="creator" label-width="86px">
|
||||
<el-form-item label="创建人" prop="creator" label-width="86px">
|
||||
<el-input v-model="addModel.creator" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="on" prop="createStartTime">
|
||||
<el-form-item label="日期" prop="createStartTime">
|
||||
<el-input v-model="addModel.createStartTime" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-form-item label="at" prop="createEndTime">
|
||||
<el-form-item label="时间" prop="createEndTime">
|
||||
<el-input v-model="addModel.createEndTime" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -101,17 +101,17 @@
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item prop="error" label-width="0">
|
||||
<el-input v-model="addModel.error" type="textarea" :rows="3" />
|
||||
<el-input v-model="addModel.error" type="textarea" :rows="3" placeholder="请确认或取消所建请求" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12" :offset="7">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">Request</el-button>
|
||||
<el-button type="primary" :loading="loading">Confirm</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
|
||||
<el-button @click="cancel">Close</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">请求</el-button>
|
||||
<el-button type="primary" :loading="loading">确认</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
<el-button @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return 'Temporary Speed Restriction';
|
||||
return '临时限速';
|
||||
},
|
||||
speedList() {
|
||||
const list = [];
|
||||
|
@ -76,6 +76,11 @@ export default {
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '创建速度限制',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -15,29 +15,29 @@
|
||||
<el-col :span="8" :offset="8"><div style="text-align: center">EUROPA - PLATFORM 2</div></el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :span="8"><div style="text-align: center;">Field Devices</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">Control Requests</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">Field Indications</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">现场设备</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">控制请求</div></el-col>
|
||||
<el-col :span="8"><div style="text-align: center;">现场指示</div></el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-col :span="8">
|
||||
<div style="border: 1px solid #6F3700; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('platform')">Platform</span></div>
|
||||
<div style="border: 1px solid #6F3700; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('platform')">站台</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div style="border-top: 1px solid #6F3700; border-bottom: 1px solid #6F3700; height: 50px; text-align: center">
|
||||
<span @click="clickEvent('inService')">IN SERVICE</span><br><span @click="clickEvent('adjustDwell')">Adjust Dwell</span>
|
||||
<span @click="clickEvent('inService')">在服</span><br><span @click="clickEvent('adjustDwell')">调整停留时间</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div style="border: 1px solid #6F3700; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('notCommunicating')">Not Communicating</span></div>
|
||||
<div style="border: 1px solid #6F3700; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('notCommunicating')">无通信</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div style="border: 1px solid #6F3700; border-top: 0; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('stoppingProfile')">Stopping Profile</span></div>
|
||||
<div style="border: 1px solid #6F3700; border-top: 0; height: 50px; text-align: center;"><span style="line-height: 50px" @click="clickEvent('stoppingProfile')">停战配置文件</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div style="border-bottom: 1px solid #6F3700; height: 50px; text-align: center;"><span @click="clickEvent('northbound')">Northbound</span><br><span @click="clickEvent('southbound')">Southbound</span></div>
|
||||
<div style="border-bottom: 1px solid #6F3700; height: 50px; text-align: center;"><span @click="clickEvent('northbound')">向北</span><br><span @click="clickEvent('southbound')">向南</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div style="border: 1px solid #6F3700; border-top: 0; height: 50px; text-align: center;" />
|
||||
|
@ -38,17 +38,17 @@ export default {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: 'Platform Dwell ADJUST DWELL', // 设置停站时间
|
||||
label: '站台停站调整', // 设置停站时间
|
||||
handler: this.setStopTime,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
label: 'Platform Dwell',
|
||||
label: '站台停站',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: 'Help',
|
||||
label: '帮助',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
}
|
||||
|
@ -25,7 +25,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { runDiagramGetTime } from '@/api/simulation';
|
||||
import DataTable from '../menusPlan/components/dataTable';
|
||||
import echarts from 'echarts';
|
||||
|
||||
|
@ -1,72 +1,81 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm notice-info" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{message}}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
@ -169,6 +169,7 @@ export default {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation
|
||||
};
|
||||
this.$emit('checkCancel');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
|
@ -103,7 +103,7 @@
|
||||
<center><b>除</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="checkCancel" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
@ -148,7 +148,8 @@ export default {
|
||||
'routeData',
|
||||
'signalList',
|
||||
'autoReentryList',
|
||||
'autoReentryData'
|
||||
'autoReentryData',
|
||||
''
|
||||
]),
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
@ -184,10 +185,6 @@ export default {
|
||||
return CMD.Switch.CMD_SWITCH_NORMAL_POSITION;
|
||||
case this.Switch.reverse.button.operation: // 道岔反位
|
||||
return CMD.Switch.CMD_SWITCH_REVERSE_POSITION;
|
||||
case this.MixinCommand.block.button.operation: // 封锁
|
||||
return {};
|
||||
case this.MixinCommand.unblock.button.operation: // 解封
|
||||
return {};
|
||||
case this.Signal.atsAutoControl.button.operation: // 自动控
|
||||
return CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING;
|
||||
case this.Signal.humanControl.button.operation: // 人工控
|
||||
@ -198,7 +195,7 @@ export default {
|
||||
return CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
case this.Signal.arrangementRoute.button.operation: // 排列进路
|
||||
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
case this.Signal.guide.button.operation: // 引导进路
|
||||
case this.Signal.guide.button.operation: // 办理引导
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
case this.Signal.reopenSignal.button.operation:
|
||||
return CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
@ -230,14 +227,18 @@ export default {
|
||||
};
|
||||
this.trainingOperation(operate);
|
||||
},
|
||||
checkCancel() {
|
||||
Handler.clear(); // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
},
|
||||
// 执行操作
|
||||
trainingOperation(operate) {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
resetPosition() {
|
||||
@ -277,7 +278,7 @@ export default {
|
||||
type: 'mbm',
|
||||
operation: operation
|
||||
};
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Switch.unlock.button.operation, this.MixinCommand.unblock.button.operation];
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Switch.unlock.button.operation, this.MixinCommand.unblock.button.operation, this.Station.guideLock.button.operation];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
@ -330,17 +331,27 @@ export default {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||
operate.param = {signalCode: deviceList[0].code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', newOperate).then(({ valid, response }) => {});
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error);
|
||||
});
|
||||
}
|
||||
} else if (deviceList.length === 2) {
|
||||
let flag = false;
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
operate.param = {routeCode: item.code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||
flag = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
if (!flag) {
|
||||
this.deviceList = [];
|
||||
this.$refs.noticeInfo.doShow(operate, '未找到选择进路!');
|
||||
}
|
||||
}
|
||||
},
|
||||
handelFunctionButton(model, subType) {
|
||||
@ -364,9 +375,9 @@ export default {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
|
||||
operate.param = {signalCode: route.startSignalCode};
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.deviceList = [];
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
handelTotalCancel(model, subType) {
|
||||
@ -378,10 +389,16 @@ export default {
|
||||
};
|
||||
if (model._type === 'Signal') {
|
||||
const autoReentry = getAutoReentryBySignalCode(model.code, this.routeList, this.autoReentryList);
|
||||
const autoReentryRel = this.autoReentryData[autoReentry.code];
|
||||
if (autoReentryRel.open) {
|
||||
let autoReentrySet = '';
|
||||
autoReentry.forEach(item => {
|
||||
const autoReentryRel = this.autoReentryData[item.code];
|
||||
if (autoReentryRel.setUp) {
|
||||
autoReentrySet = autoReentryRel;
|
||||
}
|
||||
});
|
||||
if (autoReentrySet) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK;
|
||||
operate.param = {cycleCode: model.cycleCode, cancelRoute: true};
|
||||
operate.param = {cycleCode: autoReentrySet.code, cancelRoute: true};
|
||||
} else {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
|
||||
operate.param = {signalCode: model.code};
|
||||
@ -394,9 +411,9 @@ export default {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO;
|
||||
operate.param = {signalCode: route.startSignalCode};
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.deviceList = [];
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
handleGuideRoute(deviceList) {
|
||||
@ -418,6 +435,8 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
} else {
|
||||
const operate = {
|
||||
@ -433,6 +452,8 @@ export default {
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
}
|
||||
} else if (deviceList.length === 2) {
|
||||
@ -442,36 +463,39 @@ export default {
|
||||
cmdType: this.cmdType,
|
||||
param: ''
|
||||
};
|
||||
let flag = false;
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
|
||||
operate.param = {routeCode: item.code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||
flag = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
if (!flag) {
|
||||
this.deviceList = [];
|
||||
this.$refs.noticeInfo.doShow(operate, '未找到选择进路!');
|
||||
}
|
||||
}
|
||||
},
|
||||
handleTotalHumanSolution(model) {
|
||||
let route = '';
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode === model.code) {
|
||||
route = item;
|
||||
}
|
||||
});
|
||||
const operate = {
|
||||
send: true,
|
||||
operation: this.$store.state.menuOperation.buttonOperation
|
||||
};
|
||||
if (this.routeData[route.code].settingGuide) {
|
||||
operate.cmdType = CMD;
|
||||
if (model.yellowOpen && model.redOpen) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_GUIDE;
|
||||
operate.param = {signalCode: model.code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {});
|
||||
} else {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
operate.param = {signalCode: model.code};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -490,8 +514,8 @@ export default {
|
||||
});
|
||||
operate.param = {signalCode: model.code, routeCodeList: routeCodeList};
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
handelSwitchOperate(model) {
|
||||
@ -501,8 +525,8 @@ export default {
|
||||
cmdType: this.cmdType,
|
||||
param: { switchCode: model.code}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
handelBlockOrUnblock(model) {
|
||||
@ -526,8 +550,24 @@ export default {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
operate.param = {signalCode: model.code};
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
handelGuideLock(model) {
|
||||
const operate = {
|
||||
send: true,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: '',
|
||||
param: {stationCode: model.stationCode}
|
||||
};
|
||||
if (model.totalGuideLock) {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK;
|
||||
} else {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
selectedChange() {
|
||||
@ -554,15 +594,11 @@ export default {
|
||||
this.handelSwitchOperate(model);
|
||||
} else if (buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) {
|
||||
this.handelBlockOrUnblock(model);
|
||||
} else if (buttonOperation === this.Station.guideLock.button.operation) {
|
||||
this.handelGuideLock(model);
|
||||
} else {
|
||||
const operate = this.handelOperate(model);
|
||||
if (this.cmdTypeList.indexOf(model._type) >= 0) {
|
||||
this.deviceList = [];
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {});
|
||||
} else {
|
||||
Handler.clear(); // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
Handler.clear(); // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
} else {
|
||||
Handler.clear(); // 清空操作组
|
||||
|
@ -2,14 +2,14 @@
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<template v-show="isShowAll">
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-bar v-if="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-button v-show="isShowBar" ref="menuButton" :selected="selected" />
|
||||
<menu-button v-if="isShowBar" ref="menuButton" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
|
@ -131,6 +131,13 @@ export default {
|
||||
this.classA = this.tempClassA;
|
||||
this.classB = this.tempClassB;
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
if (val == '01' && this.centralizedStationList1.length) {
|
||||
this.switchShowStation(this.centralizedStationList1[0].code);
|
||||
} else {
|
||||
this.switchShowStation('');
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -155,8 +162,11 @@ export default {
|
||||
}
|
||||
});
|
||||
this.colsNum = 24 / this.centralizedStationList1.length;
|
||||
if (centralizedStationList.length) {
|
||||
this.stationCode = centralizedStationList[0].code;
|
||||
}
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
centralizedStationList.length && this.switchShowStation(centralizedStationList[0].code);
|
||||
this.switchShowStation(this.stationCode);
|
||||
}
|
||||
},
|
||||
switchShowStation(stationCode) {
|
||||
@ -215,7 +225,7 @@ export default {
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$width: 30px;
|
||||
$height: 60px;
|
||||
$height: 90px;
|
||||
$menuPadding: 10px;
|
||||
$menuItemHeight: 30px;
|
||||
$menuItemWidth: 190px;
|
||||
|
@ -76,6 +76,7 @@ export default {
|
||||
canCommand: true,
|
||||
operate: '',
|
||||
cmdType: '',
|
||||
switchRelevanceSectionList: [], // 道岔关联的区段列表
|
||||
param: {},
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
@ -91,7 +92,12 @@ export default {
|
||||
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menu.operation, show: false },
|
||||
{ name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menu.operation, show: false },
|
||||
{ name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menu.operation, show: false },
|
||||
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menu.operation, show: false }
|
||||
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menu.operation, show: false },
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu.operation, show: false },
|
||||
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu.operation, show: false },
|
||||
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu.operation, show: false },
|
||||
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu.operation, show: false },
|
||||
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu.operation, show: false }
|
||||
],
|
||||
signalParamList: [
|
||||
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menu.operation, show: false },
|
||||
@ -136,9 +142,6 @@ export default {
|
||||
switch (this.selected._type) {
|
||||
case 'Switch':
|
||||
this.handleSwicthMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
case 'Signal':
|
||||
if (this.oldClickObj && this.oldClickObj.code != this.selected.code) {
|
||||
@ -149,16 +152,13 @@ export default {
|
||||
break;
|
||||
case 'Section':
|
||||
this.handleSectionMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
case 'Station':
|
||||
this.handleStationMenu();
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
break;
|
||||
// case 'Station':
|
||||
// this.handleStationMenu();
|
||||
// this.deviceHighLight(this.oldDevice, false);
|
||||
// this.deviceHighLight(this.selected, true);
|
||||
// this.oldDevice = this.selected;
|
||||
// break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -204,6 +204,18 @@ export default {
|
||||
});
|
||||
},
|
||||
handleSwicthMenu() { // 转换底部道岔菜单栏
|
||||
// 获取道岔相关区段显示高亮
|
||||
const section = this.$store.getters['map/getDeviceByCode'](this.selected.sectionParentCode);
|
||||
const sectionA = this.$store.getters['map/getDeviceByCode'](this.selected.sectionACode); // 获取道岔相关的道岔计轴区段
|
||||
const sectionB = this.$store.getters['map/getDeviceByCode'](this.selected.sectionBCode);
|
||||
const sectionC = this.$store.getters['map/getDeviceByCode'](this.selected.sectionCCode);
|
||||
this.switchRelevanceSectionList = [sectionA, sectionB, sectionC];
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.switchRelevanceSectionList.forEach(model => {
|
||||
this.deviceHighLight(model, true);
|
||||
});
|
||||
this.oldDevice = section;
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.swicthParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
@ -211,7 +223,9 @@ export default {
|
||||
this.tempData = [];
|
||||
this.tempData.push(this.selected);
|
||||
this.param = {
|
||||
switchCode: this.selected.code
|
||||
switchCode: this.selected.code,
|
||||
sectionCode: section.code,
|
||||
speedLimitValue: 5
|
||||
};
|
||||
},
|
||||
handleSingalMenu() {
|
||||
@ -261,6 +275,10 @@ export default {
|
||||
}
|
||||
},
|
||||
handleSectionMenu() {
|
||||
this.deviceHighLight(this.oldDevice, false);
|
||||
this.deviceHighLight(this.selected, true);
|
||||
this.oldDevice = this.selected;
|
||||
|
||||
this.centralizedStationList = new Array(15).fill({});
|
||||
this.sectionParamList.forEach((swicth, index) => {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
@ -308,7 +326,7 @@ export default {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.deviceHighLight(this.selected, false); // 当前选中
|
||||
this.deviceHighLight(this.oldDevice, false); // 当前选中
|
||||
this.operate = ''; // 清空指令
|
||||
this.cmdType = '';
|
||||
if (this.oldClickObj) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header" style="line-height: 44px;">
|
||||
{{message}}
|
||||
{{ message }}
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
@ -58,10 +58,10 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ?OperationEvent.Signal.humanTrainRoute.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Signal.cancelGuide.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
return '人解进路';
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
return '办理引导进路';
|
||||
@ -91,18 +91,18 @@ export default {
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operate == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||
this.humanTrainRoute();
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
this.cancelGuide();
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
this.guide();
|
||||
}
|
||||
},
|
||||
// 人解进路 / 取消进路引导
|
||||
humanTrainRoute() {
|
||||
cancelGuide() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operate,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
|
@ -77,9 +77,9 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路',
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
@ -492,12 +492,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 人工解锁进路
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
humanTrainRoute() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
|
@ -125,6 +125,7 @@ export function parser(data, skinCode, showConfig) {
|
||||
|
||||
zrUtil.each(data.totalGuideLockButtonVOList || [], elem => { // 引导总锁列表
|
||||
mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig);
|
||||
mapDevice[elem.stationCode].guideLockCode = elem.code; // 保证处理车站列表在处理引导总锁列表之前
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.automaticRouteButtonList || [], elem => { // 自动进路列表
|
||||
@ -135,6 +136,38 @@ export function parser(data, skinCode, showConfig) {
|
||||
mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.indicatorLightList || [], elem => {
|
||||
switch (elem.type) {
|
||||
case 'AtsControl':
|
||||
mapDevice[elem.code] = createDevice(deviceType.AtsControl, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'CenterCommunication':
|
||||
mapDevice[elem.code] = createDevice(deviceType.CenterCommunication, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'ChainControl':
|
||||
mapDevice[elem.code] = createDevice(deviceType.ChainControl, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'IntersiteControl':
|
||||
mapDevice[elem.code] = createDevice(deviceType.IntersiteControl, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'LeuControl':
|
||||
mapDevice[elem.code] = createDevice(deviceType.LeuControl, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'LocalControl':
|
||||
mapDevice[elem.code] = createDevice(deviceType.LocalControl, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'Maintain':
|
||||
mapDevice[elem.code] = createDevice(deviceType.Maintain, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'PowerSupply':
|
||||
mapDevice[elem.code] = createDevice(deviceType.PowerSupply, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'NoOneReturn':
|
||||
mapDevice[elem.code] = createDevice(deviceType.NoOneReturn, elem, propConvert, showConfig);
|
||||
break;
|
||||
}
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.trainWindowList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert, showConfig);
|
||||
if (elem.sectionCode) {
|
||||
@ -176,6 +209,7 @@ export function parser(data, skinCode, showConfig) {
|
||||
const section = mapDevice[cnodeSection.parentCode];
|
||||
if (section) {
|
||||
mapDevice[elem.code].sectionName = section.name;
|
||||
mapDevice[elem.code].sectionParentCode = section.code;
|
||||
section['relSwitchCode'] = elem.code;
|
||||
}
|
||||
|
||||
@ -230,6 +264,15 @@ export function updateMapData(state, model) {
|
||||
case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break;
|
||||
case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break;
|
||||
case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break;
|
||||
case deviceType.AtsControl: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.CenterCommunication: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.ChainControl: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.IntersiteControl: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.LeuControl: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.LocalControl: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.Maintain: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.PowerSupply: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.NoOneReturn: updateForList(model, state, 'indicatorLightList'); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,9 +57,10 @@ export default {
|
||||
},
|
||||
{
|
||||
name: 'global.caseShow',
|
||||
handle: this.goToCaseShow,
|
||||
// handle: this.goToCaseShow,
|
||||
isHelp:true,
|
||||
style:'padding-right:0px;'
|
||||
style:'padding-right:0px;',
|
||||
hidden:getSessionStorage('project').endsWith('hyd')
|
||||
},
|
||||
{
|
||||
name: 'global.scan',
|
||||
@ -105,7 +106,7 @@ export default {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isShown() {
|
||||
return getSessionStorage('project') == 'login' || getSessionStorage('project') == 'design';
|
||||
return getSessionStorage('project') == 'login' || getSessionStorage('project') == 'design' || getSessionStorage('project').endsWith('gzb') || getSessionStorage('project').endsWith('xty');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="$t('global.chooseRoom')" :visible.sync="dialogShow" width="30%" center>
|
||||
<el-input v-model="input" :placeholder="$t('global.inputRoomNumber')" />
|
||||
<el-checkbox v-model="isNewMap">是否新版地图房间</el-checkbox>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button v-loading="loading" :disabled="!input.length" type="primary" @click="comit">{{ $t('global.confirm') }}</el-button>
|
||||
@ -10,6 +11,7 @@
|
||||
|
||||
<script>
|
||||
import { getPermissionJoint } from '@/api/chat';
|
||||
import { getPermissionJointNew } from '@/api/jointTraining';
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
@ -17,7 +19,8 @@ export default {
|
||||
return {
|
||||
input: '',
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
loading: false,
|
||||
isNewMap: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -35,7 +38,11 @@ export default {
|
||||
async comit() {
|
||||
try {
|
||||
this.loading = true;
|
||||
await getPermissionJoint(`${this.input}`);
|
||||
if (this.isNewMap) {
|
||||
await getPermissionJointNew(`${this.input}`);
|
||||
} else {
|
||||
await getPermissionJoint(`${this.input}`);
|
||||
}
|
||||
this.dialogShow = false;
|
||||
} catch (error) {
|
||||
this.$messageBox(`${this.$t('error.scanningError')}:${error.message}`);
|
||||
|
@ -20,6 +20,7 @@ const DesignDisplay = () => import('@/views/display/designIndex');
|
||||
|
||||
const TrainRoom = () => import('@/views/trainRoom/index');
|
||||
const JointTraining = () => import('@/views/jointTraining/index');
|
||||
const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index');
|
||||
|
||||
const Error401 = () => import('@/views/error-page/401');
|
||||
const Errpr404 = () => import('@/views/error-page/404');
|
||||
@ -550,7 +551,7 @@ export const asyncRouter = [
|
||||
},
|
||||
{
|
||||
path: '/jointTrainingNew',
|
||||
component: JointTraining,
|
||||
component: JointTrainingNew,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
@ -972,7 +973,8 @@ export const asyncRouter = [
|
||||
path: '/iscs',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.iscsSystem'
|
||||
i18n: 'router.iscsSystem',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -76,8 +76,12 @@ export default {
|
||||
CMD_SIGNAL_CLOSE_SIGNAL: {value:'Signal_Close_Signal', label: '信号关灯'},
|
||||
/** 信号重开 */
|
||||
CMD_SIGNAL_REOPEN_SIGNAL: {value:'Signal_Reopen_Signal', label: '信号重开'},
|
||||
/** 引导进路 */
|
||||
CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Route_Guide', label: '引导进路'},
|
||||
/** 办理引导 */
|
||||
CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Set_Guide', label: '办理引导'},
|
||||
/** 取消引导同时取消进路 */
|
||||
CMD_SIGNAL_CANCEL_GUIDE: {value:'Signal_Cancel_Guide', label: '取消引导&进路'},
|
||||
/** 取消引导 */
|
||||
CMD_SIGNAL_CLOSE_GUIDE: {value: 'Signal_Close_Guide', label: '取消引导'},
|
||||
/** 进路自排开 */
|
||||
CMD_SIGNAL_OPEN_AUTO_SETTING: {value:'Signal_Open_Auto_Setting', label: '进路自排开'},
|
||||
/** 进路自排关 */
|
||||
|
@ -892,7 +892,22 @@ export const OperationEvent = {
|
||||
operation: '317',
|
||||
domId: '_Tips-Signal-SingalPassModel-Menu'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 取消信号机引导
|
||||
cancelGuide: {
|
||||
button: {
|
||||
operation: '3180',
|
||||
domId: '_Tips-Signal-cancelGuide-Mbm{TOP}'
|
||||
},
|
||||
menu: {
|
||||
operation: '318',
|
||||
domId: '_Tips-Signal-cancelGuide-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3181',
|
||||
domId: '_Tips-Signal-cancelGuide-Confirm'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// 物理区段操作
|
||||
|
@ -361,6 +361,13 @@ const map = {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
indicatorLightList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.indicatorLightList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
automaticRouteButtonList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.automaticRouteButtonList || [];
|
||||
@ -676,6 +683,9 @@ const map = {
|
||||
autoReentryList.forEach(data => {
|
||||
state.autoReentryData[data.code] = data;
|
||||
});
|
||||
state.map.cycleButtonList && state.map.cycleButtonList.forEach(item => {
|
||||
state.autoReentryData[item.cycleCode].cycleButtonCode = item.code;
|
||||
});
|
||||
state.autoReentryList = autoReentryList;
|
||||
},
|
||||
setSignalApproachSectionData: (state, signalApproachSectionList) => {
|
||||
@ -687,6 +697,9 @@ const map = {
|
||||
updateRouteState: (state, status) => {
|
||||
state.routeData[status.code] = deepAssign(state.routeData[status.code], status);
|
||||
},
|
||||
updateAutoReentryState: (state, status) => {
|
||||
state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status);
|
||||
},
|
||||
setMapVersion:(state, version) => {
|
||||
state.version = version;
|
||||
}
|
||||
@ -727,6 +740,9 @@ const map = {
|
||||
updateRouteState: ({ commit }, status) => { // 设置进路数据状态
|
||||
commit('updateRouteState', status);
|
||||
},
|
||||
updateAutoReentryState: ({ commit }, status) => {
|
||||
commit('updateAutoReentryState', status);
|
||||
},
|
||||
getRouteDataListByCode: ({ state, commit }, code) => { // 获取进路数据
|
||||
return new Promise((resolve) => {
|
||||
const list = [];
|
||||
|
@ -13,7 +13,7 @@ const runPlan = {
|
||||
width: 800, // 运行图canvas 容器 宽度
|
||||
height: 600, // 运行图canvas 容器 高度
|
||||
refreshCount: 0, // 刷新页面重新加载
|
||||
setInitialPlanData: {} // 运行图原始数据
|
||||
initialPlanData: {} // 运行图原始数据
|
||||
},
|
||||
getters: {
|
||||
stations: (state) => {
|
||||
|
@ -2,7 +2,7 @@ import store from '@/store';
|
||||
import { Notification } from 'element-ui';
|
||||
|
||||
function handle(state, data) {
|
||||
console.log(data, 'socket订阅');
|
||||
// console.log(data, 'socket订阅');
|
||||
const msg = data.body;
|
||||
const path = window.location.href;
|
||||
switch (data.type) {
|
||||
|
@ -10,7 +10,7 @@ export function getBaseUrl() {
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛automaticRouteButtonList
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
@ -14,17 +14,19 @@ export async function getMapListByProject(drawWay) {
|
||||
}
|
||||
|
||||
export function getAutoReentryBySignalCode(signalCode, routeList, autoReentryList) { // 根据折返进路的始端信号机去找
|
||||
let route = '';
|
||||
let autoReentry = '';
|
||||
const route = [];
|
||||
const autoReentry = [];
|
||||
routeList.forEach(item => {
|
||||
if (item.startSignalCode === signalCode && item.turnBack) {
|
||||
route = item;
|
||||
route.push(item);
|
||||
}
|
||||
});
|
||||
autoReentryList.forEach(item => {
|
||||
if (item.turnBackRouteCode === route.code || item.turnBackRoute2Code === route.code) {
|
||||
autoReentry = item;
|
||||
}
|
||||
route.forEach(it => {
|
||||
if (item.turnBackRouteCode === it.code || item.turnBackRoute2Code === it.code) {
|
||||
autoReentry.push(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
return autoReentry;
|
||||
}
|
||||
|
@ -40,6 +40,7 @@
|
||||
|
||||
<script>
|
||||
import { getjointTrainList, getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat';
|
||||
import { getjointTrainListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew } from '@/api/jointTraining';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
@ -93,7 +94,10 @@ export default {
|
||||
this.loading = false;
|
||||
const project = getSessionStorage('project');
|
||||
const res = await getjointTrainList({projectCode:ProjectCode[project]});
|
||||
this.trainingList = res.data || [];
|
||||
const resp = await getjointTrainListNew({projectCode: ProjectCode[project]});
|
||||
const oldMapRoomList = res.data || [];
|
||||
const newMapRoomList = resp.data || [];
|
||||
this.trainingList = [...oldMapRoomList, ...newMapRoomList];
|
||||
this.$nextTick(() => {
|
||||
var training = this.trainingList[0] || {};
|
||||
if (training) {
|
||||
@ -115,15 +119,25 @@ export default {
|
||||
async handleJoin() {
|
||||
try {
|
||||
this.loading = true;
|
||||
await getjointTraining(this.group);
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const drawWay = rest.data.drawWay;
|
||||
if (drawWay) {
|
||||
await getjointTrainingNew(this.group);
|
||||
} else {
|
||||
await getjointTraining(this.group);
|
||||
}
|
||||
if (this.state == '02') {
|
||||
launchFullscreen();
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group };
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group, drawWay: drawWay };
|
||||
if (drawWay) {
|
||||
await putJointTrainingSimulationEntranceNew(this.group);
|
||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||
} else {
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
}
|
||||
} else if (this.state == '01') {
|
||||
const query = { group: this.group };
|
||||
const query = { group: this.group, drawWay: drawWay };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
} catch (e) {
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat';
|
||||
import { getjointTrainingNew, putJointTrainingSimulationEntranceNew} from '@/api/jointTraining';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
|
||||
@ -59,18 +60,27 @@ export default {
|
||||
async handleJoin() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const drawWay = rest.data.drawWay;
|
||||
if (this.state == '02') {
|
||||
launchFullscreen();
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group };
|
||||
if (drawWay) {
|
||||
await putJointTrainingSimulationEntranceNew(this.group);
|
||||
} else {
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
}
|
||||
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group, drawWay: drawWay };
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
} else if (this.state == '01') {
|
||||
const query = { group: this.group };
|
||||
const query = { group: this.group, drawWay: drawWay };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
this.dialogShow = false;
|
||||
await getjointTraining(this.group);
|
||||
if (rest.drawWay) {
|
||||
await getjointTrainingNew(this.group);
|
||||
} else {
|
||||
await getjointTraining(this.group);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
|
@ -28,7 +28,8 @@ import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { postCreateRoom, getjointTraining, checkRoomExist } from '@/api/chat';
|
||||
import { postCreateRoom, getjointTraining } from '@/api/chat';
|
||||
import { postCreateRoomNew, getjointTrainingNew, checkRoomExistNew } from '@/api/jointTraining';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { simulationNotify, schedulingNotify, createSimulationNew } from '@/api/simulation';
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
@ -158,7 +159,7 @@ export default {
|
||||
async getJointTrainingList() {
|
||||
try {
|
||||
if (this.mapId) {
|
||||
const res = await checkRoomExist({ mapId: this.mapId });
|
||||
const res = await checkRoomExistNew({mapId: this.mapId});
|
||||
this.jointGroup = res.data;
|
||||
this.jointShow = false;
|
||||
if (res.data) {
|
||||
@ -171,7 +172,11 @@ export default {
|
||||
},
|
||||
async joinRoom() {
|
||||
this.disabled = true;
|
||||
await getjointTraining(this.jointGroup);
|
||||
if (this.drawWay) {
|
||||
await getjointTrainingNew(this.jointGroup);
|
||||
} else {
|
||||
await getjointTraining(this.jointGroup);
|
||||
}
|
||||
this.$store.dispatch('socket/setInRoom', true);
|
||||
const query = { lineCode: this.courseModel.lineCode, group: this.jointGroup, drawWay: this.drawWay};
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
@ -183,7 +188,12 @@ export default {
|
||||
mapId: Number(this.mapId),
|
||||
prdType: this.courseModel.prdType
|
||||
};
|
||||
const res = await postCreateRoom(param);
|
||||
let res = '';
|
||||
if (this.drawWay) {
|
||||
res = postCreateRoomNew(param);
|
||||
} else {
|
||||
res = await postCreateRoom(param);
|
||||
}
|
||||
if (res && res.code == 200) {
|
||||
const query = { lineCode: this.courseModel.lineCode, group: res.data, drawWay: this.drawWay };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
|
@ -13,6 +13,7 @@ import { parser } from '@/ibp/utils/parser';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { putJointTrainingSimulationUser } from '@/api/chat';
|
||||
import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
|
||||
import { handlerIbpEvent } from '@/api/simulation';
|
||||
import { IbpOperation } from '@/scripts/ConstDic';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
@ -59,6 +60,9 @@ export default {
|
||||
]),
|
||||
ibpId() {
|
||||
return ['ibp', (Math.random().toFixed(5)) * 100000].join('_');
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -237,10 +241,17 @@ export default {
|
||||
back() {
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
putJointTrainingSimulationUser(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } });
|
||||
exitFullscreen();
|
||||
});
|
||||
if (this.drawWay) {
|
||||
putJointTrainingSimulationUserNew(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } });
|
||||
exitFullscreen();
|
||||
});
|
||||
} else {
|
||||
putJointTrainingSimulationUser(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } });
|
||||
exitFullscreen();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
ibpDestroy() {
|
||||
|
@ -39,7 +39,7 @@
|
||||
<div v-if="scope.$index == 9" class="table-9-top">状态比较</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="province" width="120">
|
||||
<el-table-column prop="code" width="120">
|
||||
<template slot="header">
|
||||
<div style="width: 100%">模式</div>
|
||||
<div style="width: 100%">编号</div>
|
||||
@ -47,31 +47,31 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="大系统模式表">
|
||||
<el-table-column label="新风机">
|
||||
<el-table-column prop="province" label="FAF-1" width="120" />
|
||||
<el-table-column prop="city" label="FAF-2" width="120" />
|
||||
<el-table-column prop="faf1" label="FAF-1" width="120" />
|
||||
<el-table-column prop="faf2" label="FAF-2" width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column label="组合式空调器">
|
||||
<el-table-column prop="province" label="AHU-1" width="120" />
|
||||
<el-table-column prop="city" label="AHU-2" width="120" />
|
||||
<el-table-column prop="ahu1" label="AHU-1" width="120" />
|
||||
<el-table-column prop="ahu2" label="AHU-2" width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column label="回排风机">
|
||||
<el-table-column prop="province" label="RAF/SEF-1" width="120" />
|
||||
<el-table-column prop="city" label="RAF/SEF-2" width="120" />
|
||||
<el-table-column prop="raf1" label="RAF/SEF-1" width="120" />
|
||||
<el-table-column prop="raf2" label="RAF/SEF-2" width="120" />
|
||||
</el-table-column>
|
||||
<el-table-column label="风机1">
|
||||
<el-table-column prop="province" label="MD-1" width="120" />
|
||||
<el-table-column prop="province" label="MD-2" width="120" />
|
||||
<el-table-column prop="province" label="MD-3" width="120" />
|
||||
<el-table-column prop="province" label="MD-4" width="120" />
|
||||
<el-table-column prop="province" label="MD-5" width="120" />
|
||||
<el-table-column prop="province" label="MD-6" width="120" />
|
||||
<el-table-column prop="province" label="MD-7" width="120" />
|
||||
<el-table-column prop="province" label="MD-8" width="120" />
|
||||
<el-table-column prop="province" label="MD-9" width="120" />
|
||||
<el-table-column prop="province" label="MD-10" width="120" />
|
||||
<el-table-column prop="province" label="MD-11" width="120" />
|
||||
<el-table-column prop="province" label="MD-12" width="120" />
|
||||
<el-table-column prop="province" label="MD-13" width="120" />
|
||||
<el-table-column prop="md1" label="MD-1" width="120" />
|
||||
<el-table-column prop="md1" label="MD-2" width="120" />
|
||||
<el-table-column prop="md1" label="MD-3" width="120" />
|
||||
<el-table-column prop="md1" label="MD-4" width="120" />
|
||||
<el-table-column prop="md1" label="MD-5" width="120" />
|
||||
<el-table-column prop="md1" label="MD-6" width="120" />
|
||||
<el-table-column prop="md1" label="MD-7" width="120" />
|
||||
<el-table-column prop="md1" label="MD-8" width="120" />
|
||||
<el-table-column prop="md1" label="MD-9" width="120" />
|
||||
<el-table-column prop="md1" label="MD-10" width="120" />
|
||||
<el-table-column prop="md1" label="MD-11" width="120" />
|
||||
<el-table-column prop="md1" label="MD-12" width="120" />
|
||||
<el-table-column prop="md1" label="MD-13" width="120" />
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -107,65 +107,95 @@ export default {
|
||||
tableTitleStyle: 'text-align: center; height: 28px; padding: 0;background: #45607B;',
|
||||
rowStyle: 'text-align: center;height: 28px; padding: 0; background: #45607B;',
|
||||
tableData: [{
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '101',
|
||||
faf1: '打开',
|
||||
faf2: '打开',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '关闭'
|
||||
}, {
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '102',
|
||||
faf1: '打开',
|
||||
faf2: '打开',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '打开'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '103',
|
||||
faf1: '打开',
|
||||
faf2: '打开',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '关闭'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '104',
|
||||
faf1: '打开',
|
||||
faf2: '关闭',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '打开'
|
||||
}, {
|
||||
date: '2016-05-08',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '105',
|
||||
faf1: '打开',
|
||||
faf2: '打开',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '关闭'
|
||||
}, {
|
||||
date: '2016-05-06',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '106',
|
||||
faf1: '打开',
|
||||
faf2: '关闭',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '打开'
|
||||
}, {
|
||||
date: '2016-05-07',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '107',
|
||||
faf1: '打开',
|
||||
faf2: '打开',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '打开'
|
||||
}, {
|
||||
date: '2016-05-07',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '108',
|
||||
faf1: '打开',
|
||||
faf2: '关闭',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '打开'
|
||||
}, {
|
||||
date: '2016-05-07',
|
||||
name: '王小虎',
|
||||
province: '上海',
|
||||
city: '普陀区',
|
||||
zip: 200333
|
||||
code: '',
|
||||
faf1: '打开',
|
||||
faf2: '打开',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '打开'
|
||||
}, {
|
||||
date: '',
|
||||
name: '',
|
||||
province: '',
|
||||
city: '',
|
||||
zip: ''
|
||||
code: '',
|
||||
faf1: '打开',
|
||||
faf2: '打开',
|
||||
ahu1: '打开',
|
||||
ahu2: '打开',
|
||||
raf1: '打开',
|
||||
raf2: '打开',
|
||||
md1: '打开'
|
||||
}]
|
||||
};
|
||||
},
|
||||
|
@ -1,82 +1,93 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="position: absolute; left: 48%; top: 15%;font-size: 20px;color: #9EEBEF;">语音广播</div>
|
||||
<div class="area-selection">
|
||||
<el-row><div style="margin-top: 10px;margin-bottom: 5px; color: #9EEBEF;">特定区域</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedAll">全线</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('站厅')">全站厅</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('上行站台')">全上行站台</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('下行站台')">全下行站台</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('办公区')">全办公区</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('出入口')">全出入口</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('换乘通道')">全换乘通道</div></el-row>
|
||||
</div>
|
||||
<div class="broadcast-form">
|
||||
<div :key="i" v-for="(item,i) in verticalHeader" :style="{width: tableWidth+'px'}" class="iscs-pa-table">
|
||||
<div class="left-header">{{ item.name }}</div>
|
||||
<div style="position: relative; left: 5%;">
|
||||
<div :key="j" v-for="(it, j) in stationList" class="table-grid">
|
||||
<div v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it)">
|
||||
<div style="cursor: default;">{{ it }}</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="pa-table-content" @click="clickArea(i,j)">
|
||||
<div class="pa-table-content-inside" :style="{background: selectedAreaList.includes(i + '-' + j)? '#2EFF74':'#CDCDCD'}" />
|
||||
<div style="margin: 20px auto 0;text-align: center;font-size: 20px;color: #9EEBEF;">语音广播</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div class="area-selection">
|
||||
<el-row><div style="margin-top: 10px;margin-bottom: 5px; color: #9EEBEF;">特定区域</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedAll">全线</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('站厅')">全站厅</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('上行站台')">全上行站台</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('下行站台')">全下行站台</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('办公区')">全办公区</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('出入口')">全出入口</div></el-row>
|
||||
<el-row><div class="area-selection-button" @click="selectedBatch('换乘通道')">全换乘通道</div></el-row>
|
||||
</div>
|
||||
<div class="broadcast-form">
|
||||
<div style="width: 120px; height: 300px; float: left; position: absolute; top: 20px;">
|
||||
<div v-for="(item,i) in verticalHeader" :key="i" :style="{top: i * 31.5 +'px'}" class="left-header">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="float: left; overflow-x: auto; width: 100%; height: 314px;">
|
||||
<div v-for="(item,i) in verticalHeader" :key="i" :style="{width: tableWidth+'px'}" class="iscs-pa-table">
|
||||
<div style="position: relative; left: 80px;">
|
||||
<div v-for="(it, j) in stationList" :key="j" class="table-grid">
|
||||
<div v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it)">
|
||||
<div style="cursor: default;">{{ it }}</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="pa-table-content" @click="clickArea(i,j)">
|
||||
<div class="pa-table-content-inside" :style="{background: selectedAreaList.includes(i + '-' + j)? '#2EFF74':'#CDCDCD'}" />
|
||||
</div>
|
||||
<div style="display: inline-block;margin-left: 5px;height: 18px;line-height: 18px;transform: translateY(-25%);color: #192780;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: inline-block;margin-left: 5px;height: 18px;line-height: 18px;transform: translateY(-25%);color: #192780;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right; width: 11%; margin-right: 1%;margin-top: 63px;">
|
||||
<div class="broadcast-mode">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">实时广播</div></el-col>
|
||||
<el-col :span="12"><div class="broadcast-mode-button">广播</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="broadcast-operations">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;padding-top: 30px">预备<br>广播</div></el-col>
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button" @click="selectedVideoMode('common')">
|
||||
<div class="pa-check-box" :style="{background: videoMode==='common'?'#2EFF74':'#CDCDCD'}" />
|
||||
<div style="position: relative; left: 5px;display: inline-block;">普通预录</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="broadcast-mode-button" @click="selectedVideoMode('emergency')">
|
||||
<div class="pa-check-box" :style="{background: videoMode==='emergency'?'#2EFF74':'#CDCDCD'}" />
|
||||
<div style="position: relative; left: 5px;display: inline-block; color: #f00;">紧急预录</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="padding-bottom: 10px">
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button" @click="showBroadcastContent">广播内容</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button">广播停止</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="background-music">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">背景音乐</div></el-col>
|
||||
</el-row>
|
||||
<el-row style="padding-bottom: 10px">
|
||||
<el-col :span="12"><div class="broadcast-mode-button">播放音乐</div></el-col>
|
||||
<el-col :span="12"><div class="broadcast-mode-button">停止音乐</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="broadcast-mode">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">实时广播</div></el-col>
|
||||
<el-col :span="12"><div class="broadcast-mode-button">广播</div></el-col>
|
||||
</el-row>
|
||||
<div>
|
||||
<div class="pa-grey-box" />
|
||||
<div class="pa-statements">
|
||||
<state-table />
|
||||
</div>
|
||||
</div>
|
||||
<div class="broadcast-operations">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;padding-top: 30px">预备<br>广播</div></el-col>
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button" @click="selectedVideoMode('common')">
|
||||
<div class="pa-check-box" :style="{background: videoMode==='common'?'#2EFF74':'#CDCDCD'}" />
|
||||
<div style="position: relative; left: 5px;display: inline-block;">普通预录</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="broadcast-mode-button" @click="selectedVideoMode('emergency')">
|
||||
<div class="pa-check-box" :style="{background: videoMode==='emergency'?'#2EFF74':'#CDCDCD'}" />
|
||||
<div style="position: relative; left: 5px;display: inline-block; color: #f00;">紧急预录</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="padding-bottom: 10px">
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button" @click="showBroadcastContent">广播内容</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button">广播停止</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="background-music">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">背景音乐</div></el-col>
|
||||
</el-row>
|
||||
<el-row style="padding-bottom: 10px">
|
||||
<el-col :span="12"><div class="broadcast-mode-button">播放音乐</div></el-col>
|
||||
<el-col :span="12"><div class="broadcast-mode-button">停止音乐</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="pa-grey-box" />
|
||||
<div class="pa-statements">
|
||||
<state-table />
|
||||
</div>
|
||||
<voice-broadcast ref="voiceBroadcast" />
|
||||
<voice-broadcast ref="voiceBroadcast" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import MusicIcon from '@/assets/iscs_icon/music_icon.png';
|
||||
import StateTable from './stateTable';
|
||||
import VoiceBroadcast from './voiceBroadcast';
|
||||
@ -100,7 +111,7 @@ export default {
|
||||
],
|
||||
musicIcon: MusicIcon,
|
||||
selectedAreaList: [],
|
||||
stationList: ['会展中心站', '世纪大道站', '交通大学站', '市图书馆站', '中心医院站', '未来路站', '火车站', '人民广场站', '体育中心站'],
|
||||
stationList: [],
|
||||
videoMode: 'common'
|
||||
};
|
||||
},
|
||||
@ -109,6 +120,18 @@ export default {
|
||||
return this.stationList.length * 120 + 80;
|
||||
}
|
||||
},
|
||||
async created () {
|
||||
// 请求当前线路车站列表
|
||||
const res = await getByGroupStationList(this.$route.query.group);
|
||||
if (res.code == 200) {
|
||||
this.stationList = [];
|
||||
res.data.forEach(station => {
|
||||
if (!station.depot) {
|
||||
this.stationList.push(station.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickArea(i, j) {
|
||||
if (this.selectedAreaList.includes(i + '-' + j)) {
|
||||
@ -210,9 +233,9 @@ export default {
|
||||
border-right: 3px solid #fff;
|
||||
border-bottom: 3px solid #fff;
|
||||
width: 5%;
|
||||
position: absolute;
|
||||
top: 200px;
|
||||
left: 1%;
|
||||
float: left;
|
||||
margin-top: 63px;
|
||||
margin-left: 1%;
|
||||
}
|
||||
.area-selection-button{
|
||||
width: 90%;
|
||||
@ -242,12 +265,13 @@ export default {
|
||||
border-right: 3px solid #fff;
|
||||
border-bottom: 3px solid #fff;
|
||||
width: 80%;
|
||||
height: 40%;
|
||||
top: 200px;
|
||||
position: absolute;
|
||||
left: 7%;
|
||||
height: 340px;
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
margin-top: 63px;
|
||||
overflow-x: auto;
|
||||
padding-top: 20px;
|
||||
position: relative;
|
||||
}
|
||||
.table-grid{
|
||||
width: 120px;
|
||||
@ -258,14 +282,15 @@ export default {
|
||||
}
|
||||
.left-header{
|
||||
width: 120px;
|
||||
height: 30px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
padding-left: 20px;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
color: #A2E8EB;
|
||||
position:fixed;
|
||||
left: 7.15%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #45607B;
|
||||
z-index: 10;
|
||||
}
|
||||
@ -309,11 +334,12 @@ export default {
|
||||
border-bottom: 2px solid #898888;
|
||||
}
|
||||
.pa-grey-box{
|
||||
position: absolute;
|
||||
left: 4%;
|
||||
top: 64%;
|
||||
width: 81%;
|
||||
height: 30%;
|
||||
float: left;
|
||||
margin-left: 5%;
|
||||
margin-top: 10px;
|
||||
top: 500px;
|
||||
width: 78%;
|
||||
height: 240px;
|
||||
background: #DDDDDD;
|
||||
border-top: 3px solid #898888;
|
||||
border-left: 3px solid #898888;
|
||||
@ -321,24 +347,21 @@ export default {
|
||||
border-bottom: 3px solid #fff;
|
||||
}
|
||||
.pa-statements{
|
||||
position: absolute;
|
||||
left: 86%;
|
||||
top: 64%;
|
||||
width: 13%;
|
||||
float: right;
|
||||
margin-right: 1%;
|
||||
margin-top: 50px;
|
||||
width: 15%;
|
||||
height: 30%;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
}
|
||||
.broadcast-mode{
|
||||
position: absolute;
|
||||
left: 88%;
|
||||
top: 25%;
|
||||
border-top: 3px solid #898888;
|
||||
border-left: 3px solid #898888;
|
||||
border-right: 3px solid #fff;
|
||||
border-bottom: 3px solid #fff;
|
||||
width: 11%;
|
||||
font-size: 12px;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
.broadcast-mode-button{
|
||||
height: 30px;
|
||||
@ -364,16 +387,13 @@ export default {
|
||||
}
|
||||
}
|
||||
.broadcast-operations{
|
||||
position: absolute;
|
||||
left: 88%;
|
||||
top: 32%;
|
||||
border-top: 3px solid #898888;
|
||||
border-left: 3px solid #898888;
|
||||
border-right: 3px solid #fff;
|
||||
border-bottom: 3px solid #fff;
|
||||
width: 11%;
|
||||
font-size: 12px;
|
||||
background: #778899;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
.pa-check-box{
|
||||
position: relative;
|
||||
@ -388,14 +408,10 @@ export default {
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
.background-music{
|
||||
position: absolute;
|
||||
left: 88%;
|
||||
top: 48%;
|
||||
border-top: 3px solid #898888;
|
||||
border-left: 3px solid #898888;
|
||||
border-right: 3px solid #fff;
|
||||
border-bottom: 3px solid #fff;
|
||||
width: 11%;
|
||||
font-size: 12px;
|
||||
background: #778899;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="height: 100%; overflow-y: auto;">
|
||||
<center-home v-if="currentSystem === 'center'" />
|
||||
<station-home v-else-if="currentSystem === 'local'" />
|
||||
</div>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div style="width: 100%; height: 100%;">
|
||||
<div :id="iscsId" v-loading="loading" :style="{ width: widthCanvas +'px', height: canvasHeight +'px' }" class="iscs-canvas" />
|
||||
<!-- <el-button v-if="showBackButton" class="iscs-button" type="primary" @click="back">{{ $t('global.back') }}</el-button> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -12,7 +11,6 @@ import { parser } from '@/iscs/utils/parser';
|
||||
import iscsData from '@/iscs/constant/iscsData';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { putJointTrainingSimulationUser } from '@/api/chat';
|
||||
import { handlerIscsEvent } from '@/api/simulation';
|
||||
import { IscsOperation } from '@/scripts/ConstDic';
|
||||
|
||||
@ -176,15 +174,6 @@ export default {
|
||||
// this.$iscs && this.$iscs.resize({ width: this.width, height: this.height });
|
||||
});
|
||||
},
|
||||
back() {
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
putJointTrainingSimulationUser(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } });
|
||||
exitFullscreen();
|
||||
});
|
||||
});
|
||||
},
|
||||
iscsDestroy() {
|
||||
if (this.$iscs) {
|
||||
this.$iscs.dispose();
|
||||
|
@ -11,7 +11,7 @@
|
||||
<emergency-release v-else-if="mode === 'EmergencyRelease'" />
|
||||
<controlBAS v-else-if="mode === 'controlBAS'" />
|
||||
<controlPermissionBAS v-else-if="mode === 'controlPermissionBAS'" />
|
||||
<mainScreenPA v-else-if="mode === 'mainScreenPA'" />
|
||||
<!-- <mainScreenPA v-else-if="mode === 'mainScreenPA'" /> -->
|
||||
<radioListeningPA v-else-if="mode === 'radioListeningPA'" />
|
||||
<timePreviewPA v-else-if="mode === 'timePreviewPA'" />
|
||||
<controlCCTV v-else-if="mode === 'controlCCTV'" />
|
||||
@ -39,7 +39,7 @@ import StationNetwork from './pis/stationNetwork';
|
||||
import EmergencyRelease from './pis/emergencyRelease';
|
||||
import controlBAS from './bas/controlBAS';
|
||||
import controlPermissionBAS from './bas/controlPermissionBAS';
|
||||
import mainScreenPA from './pa/mainScreenPA';
|
||||
// import mainScreenPA from './pa/mainScreenPA';
|
||||
import radioListeningPA from './pa/radioListeningPA';
|
||||
import timePreviewPA from './pa/timePreviewPA';
|
||||
import controlCCTV from './cctv/controlCCTV';
|
||||
@ -66,7 +66,7 @@ export default {
|
||||
EmergencyRelease,
|
||||
controlBAS,
|
||||
controlPermissionBAS,
|
||||
mainScreenPA,
|
||||
// mainScreenPA,
|
||||
radioListeningPA,
|
||||
timePreviewPA,
|
||||
controlCCTV,
|
||||
|
@ -84,6 +84,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import InfoBroadcast from './infoBroadcast';
|
||||
export default {
|
||||
name:'MainScreen',
|
||||
@ -92,92 +93,31 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
stationList:[
|
||||
{
|
||||
stationName:'会展中心站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
},
|
||||
{
|
||||
stationName:'世纪大道站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
},
|
||||
{
|
||||
stationName:'交通大学站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
},
|
||||
{
|
||||
stationName:'市图书馆站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
},
|
||||
{
|
||||
stationName:'中心医院站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
},
|
||||
{
|
||||
stationName:'未来路站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
},
|
||||
{
|
||||
stationName:'火车站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
},
|
||||
{
|
||||
stationName:'人民广场站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
},
|
||||
{
|
||||
stationName:'体育中心站',
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
}
|
||||
],
|
||||
stationList:[],
|
||||
selectedAreaList: []
|
||||
};
|
||||
},
|
||||
async created () {
|
||||
// 请求当前线路车站列表
|
||||
const res = await getByGroupStationList(this.$route.query.group);
|
||||
if (res.code == 200) {
|
||||
this.stationList = [];
|
||||
res.data.forEach(station => {
|
||||
if (!station.depot) {
|
||||
const param = {
|
||||
stationName: station.name,
|
||||
children:[
|
||||
{status:'none'}, {status:'default'},
|
||||
{status:'default'}, {status:'default'},
|
||||
{status:'none'}, {status:'none'},
|
||||
{status:'none'}, {status:'default'}
|
||||
]
|
||||
};
|
||||
this.stationList.push(param);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
showInfoBrroadcast() {
|
||||
this.$refs.infoBroadcast.doShow();
|
||||
@ -318,7 +258,7 @@ border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px s
|
||||
vertical-align: top;
|
||||
}
|
||||
.screen_status_active::after{content:'';border-top: 2px solid #a6a2a6;border-left: 2px solid #a5aca5;border-right: 2px solid #ececec;border-bottom: 2px solid #e4e4e4;background: #00ff00;min-width: 10px;height: 10px;display: inline-block;vertical-align: top;}
|
||||
.screen_left_text_group{width:180px;padding: 0px 10px 10px 10px;font-size: 14px;color: #9de4e8;display: inline-block;}
|
||||
.screen_left_text_group{width:210px;padding: 0px 10px 10px 10px;font-size: 14px;color: #9de4e8;display: inline-block;}
|
||||
.each_data_info{margin-top:10px;height:20px;}
|
||||
.screen_right_group{display: inline-block;vertical-align: top;font-size:0;overflow-x: auto;min-height:100%;}
|
||||
.each_station_info{width:130px;display: inline-block;vertical-align:top;padding-right: 10px;}
|
||||
|
@ -13,6 +13,7 @@ import iscsData from '@/iscs/constant/iscsData';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { putJointTrainingSimulationUser } from '@/api/chat';
|
||||
import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
|
||||
import { handlerIscsEvent } from '@/api/simulation';
|
||||
import { IscsOperation } from '@/scripts/ConstDic';
|
||||
|
||||
@ -57,6 +58,9 @@ export default {
|
||||
iscsId() {
|
||||
return ['iscs', (Math.random().toFixed(5)) * 100000].join('_');
|
||||
},
|
||||
drawWay() {
|
||||
return this.$route.query.drawWay;
|
||||
},
|
||||
width() {
|
||||
return this.$store.state.config.width;
|
||||
},
|
||||
@ -171,10 +175,17 @@ export default {
|
||||
back() {
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
putJointTrainingSimulationUser(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } });
|
||||
exitFullscreen();
|
||||
});
|
||||
if (this.drawWay) {
|
||||
putJointTrainingSimulationUserNew(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode, drawWay: this.drawWay } });
|
||||
exitFullscreen();
|
||||
});
|
||||
} else {
|
||||
putJointTrainingSimulationUser(this.group).then(() => {
|
||||
this.$router.replace({ path: `/trainroom`, query: { group: this.group, lineCode:this.$route.query.lineCode } });
|
||||
exitFullscreen();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
iscsDestroy() {
|
||||
|
@ -6,7 +6,7 @@
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import { Jl3ddevice } from '@/jlmap3d/jl3ddevice/jl3ddevice.js';
|
||||
|
||||
import { Jl3ddeviceNew } from '@/jlmap3d/jl3ddevice/jl3ddeviceNew.js';
|
||||
|
||||
export default {
|
||||
name: 'devicemodel',
|
||||
@ -16,17 +16,32 @@
|
||||
data() {
|
||||
return {
|
||||
jl3d: null,
|
||||
psdlist:this.$store.state.map.map.psdList,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.socket.device.code': {
|
||||
// handler: function (newVal, oldVal) {
|
||||
// if (newVal != oldVal) {
|
||||
// this.jl3d.selectmodel(this.$store.state.socket.device);
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
'$store.state.menuOperation.selectedCount': {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
if(this.$store.state.menuOperation.selected._type){
|
||||
if(this.$store.state.menuOperation.selected._type == "StationStand"){
|
||||
let standcode = this.$store.state.menuOperation.selected.code;
|
||||
for(let i=0,leni=this.psdlist.length;i<leni;i++){
|
||||
if(standcode == this.psdlist[i].standCode){
|
||||
this.jl3d.selectmodel(Vue.prototype.$jlmap.mapDevice[this.psdlist[i].code]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
this.jl3d.selectmodel(this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
|
||||
// this.jl3d.selectmodel(this.$store.state.socket.device);
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
// '$store.state.socket.device': {
|
||||
// deep: true,
|
||||
// handler: function (newVal, oldVal) {
|
||||
@ -51,20 +66,30 @@
|
||||
let code = this.$route.query.code;
|
||||
let group = this.$route.query.group;
|
||||
let header = this.$route.query.token;
|
||||
console.log(this.$store.state.menuOperation);
|
||||
console.log(this.$store.state.map.map.linkList);
|
||||
if(this.$store.state.map.map.linkList){
|
||||
this.initolddata(group,header);
|
||||
}else{
|
||||
this.initnewdata(group,header);
|
||||
}
|
||||
// if (group) {
|
||||
// this.init(group,header);
|
||||
// // this.subscribe(code,group,header);
|
||||
// }
|
||||
this.init(group,header);
|
||||
},
|
||||
beforeDestroy() {
|
||||
},
|
||||
methods: {
|
||||
init: function (group,header) {
|
||||
initolddata: function (group,header) {
|
||||
// let mapdata = this.$store.state.socket.device;
|
||||
let dom = document.getElementById('jl3d');
|
||||
this.jl3d = new Jl3ddevice(dom,group,header);
|
||||
},
|
||||
initnewdata: function (group,header){
|
||||
let dom = document.getElementById('jl3d');
|
||||
this.jl3d = new Jl3ddeviceNew(dom,group,header);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -83,7 +83,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRealDevicesNew, updateRealDevicesNew, realDeviceIsUsed } from '@/api/chat';
|
||||
import { getRealDevicesInRoom, updateRealDevices, realDeviceIsUsed } from '@/api/chat';
|
||||
import { hasDoorStationList } from '@/api/jmap/map';
|
||||
import {getAllDeviceInProject} from '@/api/project';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -179,7 +179,7 @@ export default {
|
||||
this.projectCode = getSessionStorage('project').toUpperCase();
|
||||
this.getDoorList(this.$route.query.mapId, this.stationList);
|
||||
getAllDeviceInProject({projectCode: this.projectCode, group:this.$route.query.group}).then(resp => {
|
||||
getRealDevicesNew(this.$route.query.group).then(res => {
|
||||
getRealDevicesInRoom(this.$route.query.group).then(res => {
|
||||
resp.data.forEach((it, index) => {
|
||||
this.options.push({
|
||||
deviceCode: '',
|
||||
@ -235,7 +235,7 @@ export default {
|
||||
paramsList.push(item);
|
||||
}
|
||||
});
|
||||
updateRealDevicesNew(this.$route.query.group, paramsList).then(res => {
|
||||
updateRealDevices(this.$route.query.group, paramsList).then(res => {
|
||||
this.$message.success(this.$t('tip.updateRealDeviceConnectionSuccess'));
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
|
@ -1,110 +1,79 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
v-dialogLoading="dialogLoading"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="100%"
|
||||
:before-close="doClose"
|
||||
:close-on-click-modal="false"
|
||||
:modal="false"
|
||||
fullscreen
|
||||
>
|
||||
<div :id="runPlanId" v-loading="loading" />
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
v-dialogLoading="dialogLoading"
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="100%"
|
||||
:before-close="doClose"
|
||||
:close-on-click-modal="false"
|
||||
:modal="false"
|
||||
fullscreen
|
||||
>
|
||||
<div :id="runPlanId" v-loading="loading" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import echarts from 'echarts';
|
||||
import {toTimeStamp, formatDuring} from '@/utils/date';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import echarts from 'echarts';
|
||||
import {toTimeStamp, formatDuring} from '@/utils/date';
|
||||
|
||||
// 运行图预览
|
||||
export default {
|
||||
name: 'RunPlanView',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: true,
|
||||
runPlanId: 'run-plan-view',
|
||||
myChart: null,
|
||||
PlanConvert: {},
|
||||
series: [],
|
||||
option: {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'center'
|
||||
// 运行图预览
|
||||
export default {
|
||||
name: 'RunPlanView',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: true,
|
||||
runPlanId: 'run-plan-view',
|
||||
myChart: null,
|
||||
PlanConvert: {},
|
||||
series: [],
|
||||
option: {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'center'
|
||||
},
|
||||
grid: {
|
||||
top: '30px',
|
||||
left: '120px',
|
||||
right: '40px',
|
||||
bottom: '80px',
|
||||
containLabel: true,
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
toolbox: {
|
||||
// right: '20px',
|
||||
// feature: {
|
||||
// dataZoom: {
|
||||
// yAxisIndex: 'none'
|
||||
// },
|
||||
// restore: {},
|
||||
// saveAsImage: {}
|
||||
// }
|
||||
},
|
||||
tooltip: {
|
||||
axisPointer: {
|
||||
trigger: 'item',
|
||||
type: 'cross'
|
||||
},
|
||||
grid: {
|
||||
top: '30px',
|
||||
left: '120px',
|
||||
right: '40px',
|
||||
bottom: '80px',
|
||||
containLabel: true,
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
toolbox: {
|
||||
// right: '20px',
|
||||
// feature: {
|
||||
// dataZoom: {
|
||||
// yAxisIndex: 'none'
|
||||
// },
|
||||
// restore: {},
|
||||
// saveAsImage: {}
|
||||
// }
|
||||
},
|
||||
tooltip: {
|
||||
axisPointer: {
|
||||
trigger: 'item',
|
||||
type: 'cross'
|
||||
},
|
||||
formatter: this.axisTooltip,
|
||||
borderWidth: 1
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 2,
|
||||
color: '#d14a61'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: this.xAxisLableFormat,
|
||||
textStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
},
|
||||
axisPointer: {
|
||||
snap: true,
|
||||
label: {
|
||||
formatter: this.xAxisPointFormat,
|
||||
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
formatter: this.axisTooltip,
|
||||
borderWidth: 1
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
@ -113,255 +82,286 @@
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 'auto',
|
||||
formatter: this.yAxisLableFormat
|
||||
},
|
||||
axisPointer: {
|
||||
xAxisIndex: 'all',
|
||||
label: {
|
||||
formatter: this.yAxisPointFormat,
|
||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||
color: 'white'
|
||||
formatter: this.xAxisLableFormat,
|
||||
textStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
},
|
||||
min: 0,
|
||||
max: 0
|
||||
},
|
||||
// graphic: {
|
||||
// type: 'line',
|
||||
// progressive: true
|
||||
// },
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside'
|
||||
},
|
||||
{
|
||||
fiterMode: 'filter',
|
||||
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||
handleSize: '80%',
|
||||
handleStyle: {
|
||||
color: '#fff',
|
||||
shadowBlur: 3,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||
shadowOffsetX: 2,
|
||||
shadowOffsetY: 2
|
||||
},
|
||||
bottom: '25px'
|
||||
axisPointer: {
|
||||
snap: true,
|
||||
label: {
|
||||
formatter: this.xAxisPointFormat,
|
||||
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
absoluteTime: 2 * 3600,
|
||||
indexKmRangeMap: {},
|
||||
runPlanData: {},
|
||||
dialogLoading: false,
|
||||
initialPlanData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
]),
|
||||
title() {
|
||||
return this.$t('display.runPlan.previewRunDiagram');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan.planLoadedCount': async function () {
|
||||
try {
|
||||
await this.loadChartPage();
|
||||
if (this.dialogShow) {
|
||||
await this.loadInitData(this.series);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
],
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 2,
|
||||
color: '#d14a61'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 'auto',
|
||||
formatter: this.yAxisLableFormat
|
||||
},
|
||||
axisPointer: {
|
||||
xAxisIndex: 'all',
|
||||
label: {
|
||||
formatter: this.yAxisPointFormat,
|
||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
min: 0,
|
||||
max: 0
|
||||
},
|
||||
// graphic: {
|
||||
// type: 'line',
|
||||
// progressive: true
|
||||
// },
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside'
|
||||
},
|
||||
{
|
||||
fiterMode: 'filter',
|
||||
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||
handleSize: '80%',
|
||||
handleStyle: {
|
||||
color: '#fff',
|
||||
shadowBlur: 3,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||
shadowOffsetX: 2,
|
||||
shadowOffsetY: 2
|
||||
},
|
||||
bottom: '25px'
|
||||
}
|
||||
]
|
||||
},
|
||||
absoluteTime: 2 * 3600,
|
||||
indexKmRangeMap: {},
|
||||
runPlanData: {},
|
||||
dialogLoading: false,
|
||||
initialPlanData: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
]),
|
||||
title() {
|
||||
return this.$t('display.runPlan.previewRunDiagram');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan.planLoadedCount': async function () {
|
||||
try {
|
||||
await this.loadChartPage();
|
||||
if (this.dialogShow) {
|
||||
await this.loadInitData(this.series);
|
||||
}
|
||||
},
|
||||
'$store.state.runPlan.planUpdateCount': function () {
|
||||
this.updateRunPlanData(this.$store.state.runPlan.updateData);
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
this.reSize({ width: this.$store.state.app.width, height: this.$store.state.app.height - 55 });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getPublishMapInfo(this.$route.query.mapId).then(res=>{
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(res.data.lineCode);
|
||||
this.initialPlanData = this.$store.state.runPlan.planData;
|
||||
this.loadChartPage();
|
||||
'$store.state.runPlan.planUpdateCount': function () {
|
||||
this.updateRunPlanData(this.$store.state.runPlan.updateData);
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() {
|
||||
this.reSize({ width: this.$store.state.app.width, height: this.$store.state.app.height - 55 });
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getPublishMapInfo(this.$route.query.mapId).then(res=>{
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(res.data.lineCode);
|
||||
this.initialPlanData = this.$store.state.runPlan.planData;
|
||||
this.loadChartPage();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.myChart && this.myChart.isDisposed) {
|
||||
this.myChart.dispose();
|
||||
this.myChart = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doShow() {
|
||||
try {
|
||||
this.dialogLoading = true;
|
||||
this.dialogShow = true;
|
||||
this.loadInitData(this.series);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
this.dialogLoading = false;
|
||||
}
|
||||
},
|
||||
async doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async loadChartPage() {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
this.series = [];
|
||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||
this.pushModels(this.series, [this.PlanConvert.initializeYaxis(stations)]);
|
||||
this.pushModels(this.series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { width: 1, color: '#000' }));
|
||||
},
|
||||
async loadInitData(series) {
|
||||
this.myChart && this.myChart.showLoading();
|
||||
await this.xAxisInit();
|
||||
await this.yAxisInit();
|
||||
await this.loadInitChart(series);
|
||||
this.myChart && this.myChart.hideLoading();
|
||||
},
|
||||
loadInitChart(series) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
if (this.myChart && this.myChart.isDisposed) {
|
||||
this.myChart.clear();
|
||||
}
|
||||
let startValue = 3600 + this.PlanConvert.TranslationTime;
|
||||
const offsetTime = 3600;
|
||||
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
|
||||
startValue = initTime - this.PlanConvert.TranslationTime;
|
||||
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
|
||||
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
|
||||
this.option.series = series;
|
||||
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||
if (this.myChart) {
|
||||
this.myChart.setOption(this.option);
|
||||
this.reSize({ width: document.documentElement.clientWidth - 10, height: document.documentElement.clientHeight - 55 });
|
||||
this.myChart.on('click', this.mouseClick);
|
||||
}
|
||||
resolve(true);
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.myChart && this.myChart.isDisposed) {
|
||||
this.myChart.dispose();
|
||||
this.myChart = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doShow() {
|
||||
try {
|
||||
this.dialogLoading = true;
|
||||
this.dialogShow = true;
|
||||
this.loadInitData(this.series);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
this.dialogLoading = false;
|
||||
}
|
||||
},
|
||||
async doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async loadChartPage() {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
this.series = [];
|
||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||
this.pushModels(this.series, [this.PlanConvert.initializeYaxis(stations)]);
|
||||
this.pushModels(this.series, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { width: 1, color: '#000' }));
|
||||
},
|
||||
async loadInitData(series) {
|
||||
this.myChart && this.myChart.showLoading();
|
||||
await this.xAxisInit();
|
||||
await this.yAxisInit();
|
||||
await this.loadInitChart(series);
|
||||
this.myChart && this.myChart.hideLoading();
|
||||
},
|
||||
loadInitChart(series) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
if (this.myChart && this.myChart.isDisposed) {
|
||||
this.myChart.clear();
|
||||
}
|
||||
let startValue = 3600 + this.PlanConvert.TranslationTime;
|
||||
const offsetTime = 3600;
|
||||
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
|
||||
startValue = initTime - this.PlanConvert.TranslationTime;
|
||||
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = startValue - offsetTime;
|
||||
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = startValue + offsetTime;
|
||||
this.option.series = series;
|
||||
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||
if (this.myChart) {
|
||||
this.myChart.setOption(this.option);
|
||||
this.reSize({ width: document.documentElement.clientWidth -10, height: document.documentElement.clientHeight - 55 });
|
||||
this.myChart.on('click', this.mouseClick);
|
||||
}
|
||||
resolve(true);
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
if (data[0] && initialPlanData[data[0].serviceNumber]) {
|
||||
Object.keys(initialPlanData[data[0].serviceNumber].trainMap).forEach(item => {
|
||||
if (initialPlanData[data[0].serviceNumber].trainMap[item + ''].tripNumber == data[0].tripNumber) {
|
||||
data[0].directionCode = initialPlanData[data[0].serviceNumber].trainMap[item + ''].directionCode;
|
||||
}
|
||||
});
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
if (data[0] && initialPlanData[data[0].serviceNumber]) {
|
||||
Object.keys(initialPlanData[data[0].serviceNumber].trainMap).forEach(item => {
|
||||
if (initialPlanData[data[0].serviceNumber].trainMap[item+''].tripNumber == data[0].tripNumber) {
|
||||
data[0].directionCode = initialPlanData[data[0].serviceNumber].trainMap[item + ''].directionCode;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (data[0]) {
|
||||
data[0].secondTime = data[0].second;
|
||||
}
|
||||
this.series = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||
planData, this.series, { color: '#FF00DE', width: 0.5 }
|
||||
);
|
||||
this.myChart && this.myChart.setOption({ series: this.series });
|
||||
},
|
||||
pushModels(series, models) {
|
||||
if (models && models.length) {
|
||||
models.forEach(elem => {
|
||||
if (elem) {
|
||||
series.push(elem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return series;
|
||||
},
|
||||
popModels(series, models) {
|
||||
if (models && models.length) {
|
||||
models.forEach(elem => {
|
||||
const index = series.indexOf(elem);
|
||||
if (index >= 0) {
|
||||
series.split(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return series;
|
||||
},
|
||||
xAxisPointFormat(params) {
|
||||
return timeFormat(params.value);
|
||||
},
|
||||
yAxisPointFormat(params) {
|
||||
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
||||
},
|
||||
xAxisLableFormat(value, index) {
|
||||
if (value % 60 === 0) {
|
||||
return timeFormat(value);
|
||||
}
|
||||
},
|
||||
yAxisLableFormat(value, index) {
|
||||
return '';
|
||||
},
|
||||
xAxisInit() {
|
||||
const list = [];
|
||||
for (var time = this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
||||
list.push(time);
|
||||
}
|
||||
this.option.xAxis[0].data = list;
|
||||
},
|
||||
yAxisInit() {
|
||||
if (Object.keys(this.PlanConvert).length) {
|
||||
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||
}
|
||||
},
|
||||
axisTooltip(param) {
|
||||
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
||||
return [
|
||||
`Point Data <hr size=1 style="margin: 3px 0">`,
|
||||
`${this.$t('display.runPlan.stationName')}: ${station.name}<br>`,
|
||||
`${this.$t('display.runPlan.stationMark')}: ${station.kmRange} km <br>`,
|
||||
`${this.$t('display.runPlan.arrivalTime')}: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||
].join('');
|
||||
},
|
||||
settingExac(data) {
|
||||
this.absoluteTime = Math.abs(parseInt(data.endValue) - parseInt(data.startValue)) / 1000;
|
||||
this.myChart && this.myChart.setOption({
|
||||
xAxis: this.option.xAxis,
|
||||
yAxis: this.option.yAxis
|
||||
}
|
||||
if (data[0]) {
|
||||
data[0].secondTime = data[0].second;
|
||||
}
|
||||
this.series = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||
planData, this.series, { color: '#FF00DE', width: 0.5 }
|
||||
);
|
||||
this.myChart && this.myChart.setOption({ series: this.series });
|
||||
},
|
||||
pushModels(series, models) {
|
||||
if (models && models.length) {
|
||||
models.forEach(elem => {
|
||||
if (elem) {
|
||||
series.push(elem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.myChart && this.myChart.dispatchAction({
|
||||
type: 'dataZoom',
|
||||
dataZoomIndex: [0, 1],
|
||||
startValue: parseInt(data.startValue / 1000),
|
||||
endValue: parseInt(data.endValue / 1000)
|
||||
return series;
|
||||
},
|
||||
popModels(series, models) {
|
||||
if (models && models.length) {
|
||||
models.forEach(elem => {
|
||||
const index = series.indexOf(elem);
|
||||
if (index >= 0) {
|
||||
series.split(index, 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
run(start) {
|
||||
this.myChart && this.myChart.dispatchAction({
|
||||
type: 'dataZoom',
|
||||
dataZoomIndex: [0, 1],
|
||||
startValue: parseInt(start - this.absoluteTime / 2),
|
||||
endValue: parseInt(start + this.absoluteTime / 2)
|
||||
});
|
||||
this.loadInitData(this.series);
|
||||
},
|
||||
reSize(opt) {
|
||||
if (this.myChart) {
|
||||
this.myChart.resize({ width: opt.width, height: opt.height, silent: false });
|
||||
}
|
||||
}
|
||||
|
||||
return series;
|
||||
},
|
||||
xAxisPointFormat(params) {
|
||||
return timeFormat(params.value);
|
||||
},
|
||||
yAxisPointFormat(params) {
|
||||
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
||||
},
|
||||
xAxisLableFormat(value, index) {
|
||||
if (value % 60 === 0) {
|
||||
return timeFormat(value);
|
||||
}
|
||||
},
|
||||
yAxisLableFormat(value, index) {
|
||||
return '';
|
||||
},
|
||||
xAxisInit() {
|
||||
const list = [];
|
||||
for (var time = this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
||||
list.push(time);
|
||||
}
|
||||
this.option.xAxis[0].data = list;
|
||||
},
|
||||
yAxisInit() {
|
||||
if (Object.keys(this.PlanConvert).length) {
|
||||
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||
}
|
||||
},
|
||||
axisTooltip(param) {
|
||||
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
||||
return [
|
||||
`Point Data <hr size=1 style="margin: 3px 0">`,
|
||||
`${this.$t('display.runPlan.stationName')}: ${station.name}<br>`,
|
||||
`${this.$t('display.runPlan.stationMark')}: ${station.kmRange} km <br>`,
|
||||
`${this.$t('display.runPlan.arrivalTime')}: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||
].join('');
|
||||
},
|
||||
settingExac(data) {
|
||||
this.absoluteTime = Math.abs(parseInt(data.endValue) - parseInt(data.startValue)) / 1000;
|
||||
this.myChart && this.myChart.setOption({
|
||||
xAxis: this.option.xAxis,
|
||||
yAxis: this.option.yAxis
|
||||
});
|
||||
|
||||
this.myChart && this.myChart.dispatchAction({
|
||||
type: 'dataZoom',
|
||||
dataZoomIndex: [0, 1],
|
||||
startValue: parseInt(data.startValue / 1000),
|
||||
endValue: parseInt(data.endValue / 1000)
|
||||
});
|
||||
},
|
||||
run(start) {
|
||||
this.myChart && this.myChart.dispatchAction({
|
||||
type: 'dataZoom',
|
||||
dataZoomIndex: [0, 1],
|
||||
startValue: parseInt(start - this.absoluteTime / 2),
|
||||
endValue: parseInt(start + this.absoluteTime / 2)
|
||||
});
|
||||
this.loadInitData(this.series);
|
||||
},
|
||||
reSize(opt) {
|
||||
if (this.myChart) {
|
||||
this.myChart.resize({ width: opt.width, height: opt.height, silent: false });
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
/deep/ {
|
||||
|
@ -180,6 +180,9 @@ export default {
|
||||
'$store.state.config.menuBarLoadedCount': function (val) {
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
||||
this.mapBox = document.getElementsByTagName('canvas');
|
||||
@ -272,16 +275,9 @@ export default {
|
||||
}
|
||||
if (this.mapBoxP) {
|
||||
if (this.mouseNumTime >= 8) {
|
||||
this.mapBoxP.style.cursor = 'none';
|
||||
// for (let i = 0; i < this.mapBox.length; i++) {
|
||||
// console.log(this.mapBox);
|
||||
// this.mapBox[i].style.cursor = 'none';
|
||||
// }
|
||||
this.mapBoxP.style.cursor = 'none'; // canvas 单个绘图层级只设置一层就好
|
||||
} else {
|
||||
this.mapBoxP.style.cursor = '';
|
||||
// for (let i = 0; i < this.mapBox.length; i++) {
|
||||
// this.mapBox[i].style.cursor = '';
|
||||
// }
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
|
@ -5,7 +5,7 @@
|
||||
<span v-if="countTime" class="display-score">{{ $t('display.demon.trialTime') }} {{ countTime }}</span>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="display-draft" :class="{'display-type-hb': $route.query.lineCode == '07'&& $route.query.prdType=='01'}">
|
||||
<div class="display-draft" :class="{'display-type-hb': $route.query.lineCode == '07'&& $store.state.training.prdType=='01'}">
|
||||
<el-button-group>
|
||||
<el-button v-if="isShowScheduling" type="primary" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
||||
<el-button type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<script>
|
||||
import SetTime from './demon/setTime';
|
||||
import { Notification } from 'element-ui';
|
||||
import { ranAsPlan, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
|
||||
import { ranAsPlan, runDiagramOver } from '@/api/simulation';
|
||||
// import { timeFormat } from '@/utils/date';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
@ -152,10 +152,7 @@ export default {
|
||||
});
|
||||
},
|
||||
async loadSystemTime() {
|
||||
// const rest = await runDiagramGetTime(this.group);
|
||||
// if (rest && rest.code == 200) {
|
||||
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -132,6 +132,9 @@ export default {
|
||||
},
|
||||
$route() {
|
||||
this.mapViewLoaded(true);
|
||||
},
|
||||
'$store.training.state.prdType': function (val) {
|
||||
this.changePrdType(val);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -170,7 +173,7 @@ export default {
|
||||
if (path.indexOf('map/draw') !== -1 || path.indexOf('mapPreviewNew') !== -1) {
|
||||
this.previewOrMapDraw = true;
|
||||
}
|
||||
const prdType = this.$route.query.prdType;
|
||||
const prdType = this.$store.state.training.prdType;
|
||||
Vue.prototype.$theme = new Theme();
|
||||
Vue.prototype.$jlmap = new Jlmap({
|
||||
dom: document.getElementById(this.canvasId),
|
||||
@ -324,7 +327,7 @@ export default {
|
||||
},
|
||||
// 设置新的地图数据
|
||||
setMap(map) {
|
||||
this.$jlmap.setMap(map, this.$store.state.map.mapDevice, this.$store.state.map.routeData);
|
||||
this.$jlmap.setMap(map, this.$store.state.map.mapDevice, {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
|
||||
},
|
||||
// 刷新地图数据
|
||||
refresh(map) {
|
||||
@ -344,6 +347,17 @@ export default {
|
||||
};
|
||||
this.$store.dispatch('map/setMousemove');
|
||||
},
|
||||
// 综合演练切换现地行调模式
|
||||
changePrdType(val) {
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
});
|
||||
this.$jlmap.updatePrdType(val, nameList);
|
||||
},
|
||||
// 切换现地行调显示界面(绘图和预览页面下)
|
||||
setShowMode(showMode) {
|
||||
if (this.showMode !== showMode) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user