Merge branch 'master' of git.cloud.tencent.com:joylink/jl-nclient
This commit is contained in:
commit
7edaf938c7
File diff suppressed because it is too large
Load Diff
@ -3,450 +3,442 @@ import { displayTopic } from '@/utils/stomp';
|
||||
import { handleToken } from '@/utils/auth';
|
||||
import router from '@/router';
|
||||
|
||||
//定于仿真socket接口
|
||||
// 定于仿真socket接口
|
||||
export function Jlmap3dSubscribe(worker) {
|
||||
|
||||
let scope = this;
|
||||
this.map = null;
|
||||
|
||||
let webworker = worker;
|
||||
var trainlisttest = null;
|
||||
var sectionlist = null;
|
||||
var signallist = null;
|
||||
var stationstandlist = null;
|
||||
var sectionlist = null;
|
||||
var materials = null;
|
||||
var actions = null;
|
||||
var scenes = null;
|
||||
|
||||
var code = null;
|
||||
|
||||
this.teststomp = new StompClient();
|
||||
this.topic = displayTopic;
|
||||
let header = { group: router.currentRoute.query.group, 'X-Token': handleToken() };
|
||||
|
||||
this.updatamap = function (mapdata, materiallist, nowaction, scene) {
|
||||
//console.log(mapdata);
|
||||
scope.map = mapdata;
|
||||
trainlisttest = this.map.trainlisttest;
|
||||
sectionlist = this.map.sectionlist;
|
||||
signallist = this.map.signallist;
|
||||
stationstandlist = this.map.stationstandlist;
|
||||
sectionlist = this.map.sectionlist;
|
||||
materials = materiallist;
|
||||
scenes = scene;
|
||||
actions = nowaction;
|
||||
}
|
||||
|
||||
this.socketon = function (topic) {
|
||||
try {
|
||||
//console.log("teststomp");
|
||||
scope.teststomp.subscribe(topic, callback, header);
|
||||
} catch (error) {
|
||||
console.error('websocket订阅失败');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.socketoff = function (topic) {
|
||||
scope.teststomp.unsubscribe(topic);
|
||||
}
|
||||
|
||||
// 仿真socket接口回调函数
|
||||
function callback(Response) {
|
||||
//对象化数据
|
||||
let data = JSON.parse(Response.body);
|
||||
//遍历后台数据
|
||||
|
||||
//判断消息类型
|
||||
// if(data.type == "Simulation_TrainPosition"){
|
||||
//
|
||||
//
|
||||
// }
|
||||
if (data.type == "Simulation_DeviceStatus") {
|
||||
|
||||
if (data.body.length < 200) {
|
||||
|
||||
for (let i = data.body.length - 1; i >= 0; i--) {
|
||||
|
||||
if (data.body[i]._type == "Train") {
|
||||
|
||||
//console.log(data.body[i]);
|
||||
//遍历列车对象组
|
||||
//console.log(data.body[i]);
|
||||
if (trainlisttest) {
|
||||
code = data.body[i].code;
|
||||
//剔除不显示的车
|
||||
//找到对应列车
|
||||
|
||||
if (trainlisttest.list[code]) {
|
||||
//车门开关验证
|
||||
// if(data.body[i].directionType == "02"){
|
||||
if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == "01") {
|
||||
//console.log("close");
|
||||
trainlisttest.list[code].doorStatus = "01";
|
||||
for (let an = actions[code].top.length - 1; an >= 0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == "02") {
|
||||
//console.log("open");
|
||||
trainlisttest.list[code].doorStatus = "02";
|
||||
for (let an = actions[code].top.length - 1; an >= 0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
actions[code].top[an].timeScale = 1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}
|
||||
// }else{
|
||||
// if(trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == "01"){
|
||||
// //console.log("close");
|
||||
// trainlisttest.list[code].doorStatus = "01";
|
||||
// for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
// actions[code].down[an].reset();
|
||||
// actions[code].down[an].time = actions[code].top[an]._clip.duration;
|
||||
// actions[code].down[an].timeScale = -1;
|
||||
// actions[code].down[an].play();
|
||||
// }
|
||||
// }else if(trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == "02"){
|
||||
// //console.log("open");
|
||||
// trainlisttest.list[code].doorStatus = "02";
|
||||
// for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
// actions[code].down[an].reset();
|
||||
// actions[code].down[an].time = 0;
|
||||
// actions[code].down[an].timeScale = 1;
|
||||
// actions[code].down[an].play();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//遍历获取所在轨道
|
||||
if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) {
|
||||
trainlisttest.group.add(trainlisttest.list[code]);
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].code) {
|
||||
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].oldoffset = data.body[i].sectionOffsetPercent;
|
||||
trainlisttest.list[code].dispose = false;
|
||||
|
||||
|
||||
if (data.body[i].directionType == "02") {
|
||||
trainlisttest.list[code].status = "02";
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
} else if (data.body[i].directionType == "03") {
|
||||
trainlisttest.list[code].status = "03";
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == true) {
|
||||
trainlisttest.group.remove(trainlisttest.list[code]);
|
||||
trainlisttest.list[code].progress = null;
|
||||
trainlisttest.list[code].dispose = true;
|
||||
|
||||
} else if (trainlisttest.list[code].dispose == data.body[i].dispose && data.body[i].dispose == false) {
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].code) {
|
||||
if (trainlisttest.list[code].nowcode != data.body[i].sectionCode || trainlisttest.list[code].nextcode != data.body[i].nextSectionCode) {
|
||||
trainlisttest.list[code].nowcode = data.body[i].sectionCode;
|
||||
trainlisttest.list[code].nextcode = data.body[i].nextSectionCode;
|
||||
let vexlist = [];
|
||||
let endrotation = null;
|
||||
if (data.body[i].directionType == "02") {//向右
|
||||
if (trainlisttest.list[code].status != data.body[i].directionType) {
|
||||
console.log(trainlisttest.list[code].position);
|
||||
console.log(trainlisttest.list[code].children[5].matrixWorld);
|
||||
trainlisttest.list[code].position.x = trainlisttest.list[code].children[5].matrixWorld.elements[12];
|
||||
trainlisttest.list[code].children[0].position.z = trainlisttest.list[code].children[0].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[1].position.z = trainlisttest.list[code].children[1].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[2].position.z = trainlisttest.list[code].children[2].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[3].position.z = trainlisttest.list[code].children[3].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[4].position.z = trainlisttest.list[code].children[4].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[5].position.z = trainlisttest.list[code].children[5].matrixWorld.elements[14];
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x > sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m = sectionlist.sections.datalist[data.body[i].sectionCode].rail.length - 1; m >= 0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x > trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m = 0; m < sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x > trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x > sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
for (let m = sectionlist.sections.datalist[data.body[i].sectionCode].rail.length - 1; m >= 0; m--) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
} else {
|
||||
for (let m = 0; m < sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].status = "02";
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
|
||||
} else if (data.body[i].directionType == "03") {//向左
|
||||
|
||||
if (trainlisttest.list[code].status != data.body[i].directionType) {
|
||||
trainlisttest.list[code].position.x = trainlisttest.list[code].children[5].matrixWorld.elements[12];
|
||||
trainlisttest.list[code].children[0].position.z = trainlisttest.list[code].children[0].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[1].position.z = trainlisttest.list[code].children[1].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[2].position.z = trainlisttest.list[code].children[2].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[3].position.z = trainlisttest.list[code].children[3].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[4].position.z = trainlisttest.list[code].children[4].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[5].position.z = trainlisttest.list[code].children[5].matrixWorld.elements[14];
|
||||
//
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x < sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m = sectionlist.sections.datalist[data.body[i].sectionCode].rail.length - 1; m >= 0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x < trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m = 0; m < sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x < trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x < sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
for (let m = sectionlist.sections.datalist[data.body[i].sectionCode].rail.length - 1; m >= 0; m--) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
|
||||
} else {
|
||||
for (let m = 0; m < sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].status = "03";
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
|
||||
}
|
||||
|
||||
trainlisttest.list[code].curve = new THREE.CatmullRomCurve3(vexlist);
|
||||
// console.log(trainlisttest.list[code].curve.points);
|
||||
// console.log(data.body[i].speed)
|
||||
// console.log(sectionlist.sections.datalist[data.body[i].sectionCode].distance);
|
||||
trainlisttest.list[code].speeds = data.body[i].speed * 10 / 36 / 11 / sectionlist.sections.datalist[data.body[i].sectionCode].distance;
|
||||
|
||||
trainlisttest.list[code].progress = 0;
|
||||
}
|
||||
// console.log("speed");
|
||||
// console.log(data.body[i].speed);
|
||||
// console.log(trainlisttest.list[code].speed);
|
||||
if (data.body[i].speed != trainlisttest.list[code].speed) {
|
||||
trainlisttest.list[code].speed = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = data.body[i].speed * 10 / 36 / 11 / sectionlist.sections.datalist[data.body[i].sectionCode].distance;
|
||||
// if(trainlisttest.list[code].speeds > 0.1){
|
||||
// console.log(data.body[i]);
|
||||
// console.log(data.body[i].speed)
|
||||
// console.log(sectionlist.sections.datalist[data.body[i].sectionCode].distance);
|
||||
// console.log(trainlisttest.list[code].speeds);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//0xFFFFFF
|
||||
//0xCD0000 红
|
||||
//0xEEEE00 黄
|
||||
//0x32CD32 绿
|
||||
if (data.body[i]._type == "Signal") {
|
||||
|
||||
if (signallist) {
|
||||
code = data.body[i].code;
|
||||
if (data.body[i].lightType == "01") {
|
||||
if (signallist.list[code].mesh.code) {
|
||||
signallist.list[code].mesh.status = data.body[i].status;
|
||||
|
||||
//55
|
||||
//33
|
||||
//77
|
||||
//关闭
|
||||
if (data.body[i].status == "01") {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[0];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
//开放
|
||||
if (data.body[i].status == "02") {
|
||||
|
||||
if (data.body[i].switchLocateType == "01") {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[2];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
if (data.body[i].switchLocateType == "02") {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[1];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//引导
|
||||
if (data.body[i].status == "03") {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[0];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[1];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
//封锁
|
||||
if (data.body[i].status == "04") {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
//故障
|
||||
if (data.body[i].status == "05") {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
} else if (data.body[i].lightType == "01") {
|
||||
if (signallist.list[code].mesh.code) {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (data.body[i]._type == "StationStand") {
|
||||
if (actions) {
|
||||
code = data.body[i].code;
|
||||
if (data.body[i].screenDoorOpenStatus == "02" && actions[code].status == "01") {
|
||||
actions[code].status = "00";
|
||||
}
|
||||
if (data.body[i].screenDoorOpenStatus == "02" && actions[code].status == "00") {
|
||||
actions[code].status = "02";
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = 0;
|
||||
actions[code].action.timeScale = 1;
|
||||
actions[code].action.play();
|
||||
}
|
||||
|
||||
if (data.body[i].screenDoorOpenStatus == "01" && actions[code].status == "02") {
|
||||
actions[code].status = "00";
|
||||
}
|
||||
if (data.body[i].screenDoorOpenStatus == "01" && actions[code].status == "00") {
|
||||
actions[code].status = "01";
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = actions[code].action._clip.duration;
|
||||
actions[code].action.timeScale = -1;
|
||||
actions[code].action.play();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (data.body[i]._type == "Switch") {
|
||||
|
||||
if (sectionlist) {
|
||||
code = data.body[i].code;
|
||||
for (let j = sectionlist.switchs.modellist.length - 1; j >= 0; j--) {
|
||||
if (sectionlist.switchs.modellist[j].code == code) {
|
||||
if (sectionlist.switchs.modellist[j].locateType != data.body[i].locateType) {
|
||||
if (data.body[i].locateType == "02") {
|
||||
sectionlist.switchs.modellist[j].locateType = data.body[i].locateType;
|
||||
actions[sectionlist.switchs.modellist[j].code].reset();
|
||||
actions[sectionlist.switchs.modellist[j].code].time = 0;
|
||||
actions[sectionlist.switchs.modellist[j].code].timeScale = 1;
|
||||
actions[sectionlist.switchs.modellist[j].code].play();
|
||||
|
||||
} else if (data.body[i].locateType == "01") {
|
||||
sectionlist.switchs.modellist[j].locateType = data.body[i].locateType;
|
||||
actions[sectionlist.switchs.modellist[j].code].reset();
|
||||
actions[sectionlist.switchs.modellist[j].code].time = actions[sectionlist.switchs.modellist[j].code]._clip.duration;
|
||||
actions[sectionlist.switchs.modellist[j].code].timeScale = -1;
|
||||
actions[sectionlist.switchs.modellist[j].code].play();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//console.log(sectionlist.group[j].name);
|
||||
j = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else if (data.body.length > 200) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
const scope = this;
|
||||
this.map = null;
|
||||
|
||||
const webworker = worker;
|
||||
var trainlisttest = null;
|
||||
var sectionlist = null;
|
||||
var signallist = null;
|
||||
var stationstandlist = null;
|
||||
var sectionlist = null;
|
||||
var materials = null;
|
||||
var actions = null;
|
||||
var scenes = null;
|
||||
|
||||
var code = null;
|
||||
|
||||
this.teststomp = new StompClient();
|
||||
this.topic = displayTopic;
|
||||
const header = { group: router.currentRoute.query.group, 'X-Token': handleToken() };
|
||||
|
||||
this.updatamap = function (mapdata, materiallist, nowaction, scene) {
|
||||
// console.log(mapdata);
|
||||
scope.map = mapdata;
|
||||
trainlisttest = this.map.trainlisttest;
|
||||
sectionlist = this.map.sectionlist;
|
||||
signallist = this.map.signallist;
|
||||
stationstandlist = this.map.stationstandlist;
|
||||
sectionlist = this.map.sectionlist;
|
||||
materials = materiallist;
|
||||
scenes = scene;
|
||||
actions = nowaction;
|
||||
};
|
||||
|
||||
this.socketon = function (topic) {
|
||||
try {
|
||||
// console.log("teststomp");
|
||||
scope.teststomp.subscribe(topic, callback, header);
|
||||
} catch (error) {
|
||||
console.error('websocket订阅失败');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
this.socketoff = function (topic) {
|
||||
scope.teststomp.unsubscribe(topic);
|
||||
};
|
||||
|
||||
// 仿真socket接口回调函数
|
||||
function callback(Response) {
|
||||
// 对象化数据
|
||||
const data = JSON.parse(Response.body);
|
||||
// 遍历后台数据
|
||||
|
||||
// 判断消息类型
|
||||
// if(data.type == "Simulation_TrainPosition"){
|
||||
//
|
||||
//
|
||||
// }
|
||||
if (data.type == 'Simulation_DeviceStatus') {
|
||||
|
||||
if (data.body.length < 200) {
|
||||
|
||||
for (let i = data.body.length - 1; i >= 0; i--) {
|
||||
|
||||
if (data.body[i]._type == 'Train') {
|
||||
|
||||
// console.log(data.body[i]);
|
||||
// 遍历列车对象组
|
||||
// console.log(data.body[i]);
|
||||
if (trainlisttest) {
|
||||
code = data.body[i].code;
|
||||
// 剔除不显示的车
|
||||
// 找到对应列车
|
||||
|
||||
if (trainlisttest.list[code]) {
|
||||
// 车门开关验证
|
||||
// if(data.body[i].directionType == "02"){
|
||||
if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') {
|
||||
// console.log("close");
|
||||
trainlisttest.list[code].doorStatus = '01';
|
||||
for (let an = actions[code].top.length - 1; an >= 0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') {
|
||||
// console.log("open");
|
||||
trainlisttest.list[code].doorStatus = '02';
|
||||
for (let an = actions[code].top.length - 1; an >= 0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
actions[code].top[an].timeScale = 1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}
|
||||
// }else{
|
||||
// if(trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == "01"){
|
||||
// //console.log("close");
|
||||
// trainlisttest.list[code].doorStatus = "01";
|
||||
// for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
// actions[code].down[an].reset();
|
||||
// actions[code].down[an].time = actions[code].top[an]._clip.duration;
|
||||
// actions[code].down[an].timeScale = -1;
|
||||
// actions[code].down[an].play();
|
||||
// }
|
||||
// }else if(trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == "02"){
|
||||
// //console.log("open");
|
||||
// trainlisttest.list[code].doorStatus = "02";
|
||||
// for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
// actions[code].down[an].reset();
|
||||
// actions[code].down[an].time = 0;
|
||||
// actions[code].down[an].timeScale = 1;
|
||||
// actions[code].down[an].play();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// 遍历获取所在轨道
|
||||
if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) {
|
||||
trainlisttest.group.add(trainlisttest.list[code]);
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].code) {
|
||||
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].oldoffset = data.body[i].sectionOffsetPercent;
|
||||
trainlisttest.list[code].dispose = false;
|
||||
|
||||
if (data.body[i].directionType == '02') {
|
||||
trainlisttest.list[code].status = '02';
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
} else if (data.body[i].directionType == '03') {
|
||||
trainlisttest.list[code].status = '03';
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == true) {
|
||||
trainlisttest.group.remove(trainlisttest.list[code]);
|
||||
trainlisttest.list[code].progress = null;
|
||||
trainlisttest.list[code].dispose = true;
|
||||
|
||||
} else if (trainlisttest.list[code].dispose == data.body[i].dispose && data.body[i].dispose == false) {
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].code) {
|
||||
if (trainlisttest.list[code].nowcode != data.body[i].sectionCode || trainlisttest.list[code].nextcode != data.body[i].nextSectionCode) {
|
||||
trainlisttest.list[code].nowcode = data.body[i].sectionCode;
|
||||
trainlisttest.list[code].nextcode = data.body[i].nextSectionCode;
|
||||
const vexlist = [];
|
||||
const endrotation = null;
|
||||
if (data.body[i].directionType == '02') { // 向右
|
||||
if (trainlisttest.list[code].status != data.body[i].directionType) {
|
||||
console.log(trainlisttest.list[code].position);
|
||||
console.log(trainlisttest.list[code].children[5].matrixWorld);
|
||||
trainlisttest.list[code].position.x = trainlisttest.list[code].children[5].matrixWorld.elements[12];
|
||||
trainlisttest.list[code].children[0].position.z = trainlisttest.list[code].children[0].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[1].position.z = trainlisttest.list[code].children[1].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[2].position.z = trainlisttest.list[code].children[2].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[3].position.z = trainlisttest.list[code].children[3].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[4].position.z = trainlisttest.list[code].children[4].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[5].position.z = trainlisttest.list[code].children[5].matrixWorld.elements[14];
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x > sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m = sectionlist.sections.datalist[data.body[i].sectionCode].rail.length - 1; m >= 0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x > trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m = 0; m < sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x > trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x > sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
for (let m = sectionlist.sections.datalist[data.body[i].sectionCode].rail.length - 1; m >= 0; m--) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
} else {
|
||||
for (let m = 0; m < sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].status = '02';
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
|
||||
} else if (data.body[i].directionType == '03') { // 向左
|
||||
|
||||
if (trainlisttest.list[code].status != data.body[i].directionType) {
|
||||
trainlisttest.list[code].position.x = trainlisttest.list[code].children[5].matrixWorld.elements[12];
|
||||
trainlisttest.list[code].children[0].position.z = trainlisttest.list[code].children[0].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[1].position.z = trainlisttest.list[code].children[1].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[2].position.z = trainlisttest.list[code].children[2].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[3].position.z = trainlisttest.list[code].children[3].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[4].position.z = trainlisttest.list[code].children[4].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].children[5].position.z = trainlisttest.list[code].children[5].matrixWorld.elements[14];
|
||||
//
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x < sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m = sectionlist.sections.datalist[data.body[i].sectionCode].rail.length - 1; m >= 0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x < trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m = 0; m < sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x < trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x < sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
for (let m = sectionlist.sections.datalist[data.body[i].sectionCode].rail.length - 1; m >= 0; m--) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
|
||||
} else {
|
||||
for (let m = 0; m < sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].status = '03';
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
|
||||
}
|
||||
|
||||
trainlisttest.list[code].curve = new THREE.CatmullRomCurve3(vexlist);
|
||||
// console.log(trainlisttest.list[code].curve.points);
|
||||
// console.log(data.body[i].speed)
|
||||
// console.log(sectionlist.sections.datalist[data.body[i].sectionCode].distance);
|
||||
trainlisttest.list[code].speeds = data.body[i].speed * 10 / 36 / 11 / sectionlist.sections.datalist[data.body[i].sectionCode].distance;
|
||||
|
||||
trainlisttest.list[code].progress = 0;
|
||||
}
|
||||
// console.log("speed");
|
||||
// console.log(data.body[i].speed);
|
||||
// console.log(trainlisttest.list[code].speed);
|
||||
if (data.body[i].speed != trainlisttest.list[code].speed) {
|
||||
trainlisttest.list[code].speed = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = data.body[i].speed * 10 / 36 / 11 / sectionlist.sections.datalist[data.body[i].sectionCode].distance;
|
||||
// if(trainlisttest.list[code].speeds > 0.1){
|
||||
// console.log(data.body[i]);
|
||||
// console.log(data.body[i].speed)
|
||||
// console.log(sectionlist.sections.datalist[data.body[i].sectionCode].distance);
|
||||
// console.log(trainlisttest.list[code].speeds);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 0xFFFFFF
|
||||
// 0xCD0000 红
|
||||
// 0xEEEE00 黄
|
||||
// 0x32CD32 绿
|
||||
if (data.body[i]._type == 'Signal') {
|
||||
|
||||
if (signallist) {
|
||||
code = data.body[i].code;
|
||||
if (data.body[i].lightType == '01') {
|
||||
if (signallist.list[code].mesh.code) {
|
||||
signallist.list[code].mesh.status = data.body[i].status;
|
||||
|
||||
// 55
|
||||
// 33
|
||||
// 77
|
||||
// 关闭
|
||||
if (data.body[i].status == '01') {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[0];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
// 开放
|
||||
if (data.body[i].status == '02') {
|
||||
|
||||
if (data.body[i].switchLocateType == '01') {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[2];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
if (data.body[i].switchLocateType == '02') {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[1];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// 引导
|
||||
if (data.body[i].status == '03') {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[0];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[1];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
// 封锁
|
||||
if (data.body[i].status == '04') {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
// 故障
|
||||
if (data.body[i].status == '05') {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (data.body[i].lightType == '01') {
|
||||
if (signallist.list[code].mesh.code) {
|
||||
signallist.list[code].mesh.children[0].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[0].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[1].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[1].material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.children[2].material.map = materials[3];
|
||||
signallist.list[code].mesh.children[2].material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (data.body[i]._type == 'StationStand') {
|
||||
if (actions) {
|
||||
code = data.body[i].code;
|
||||
if (data.body[i].screenDoorOpenStatus == '02' && actions[code].status == '01') {
|
||||
actions[code].status = '00';
|
||||
}
|
||||
if (data.body[i].screenDoorOpenStatus == '02' && actions[code].status == '00') {
|
||||
actions[code].status = '02';
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = 0;
|
||||
actions[code].action.timeScale = 1;
|
||||
actions[code].action.play();
|
||||
}
|
||||
|
||||
if (data.body[i].screenDoorOpenStatus == '01' && actions[code].status == '02') {
|
||||
actions[code].status = '00';
|
||||
}
|
||||
if (data.body[i].screenDoorOpenStatus == '01' && actions[code].status == '00') {
|
||||
actions[code].status = '01';
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = actions[code].action._clip.duration;
|
||||
actions[code].action.timeScale = -1;
|
||||
actions[code].action.play();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (data.body[i]._type == 'Switch') {
|
||||
|
||||
if (sectionlist) {
|
||||
code = data.body[i].code;
|
||||
for (let j = sectionlist.switchs.modellist.length - 1; j >= 0; j--) {
|
||||
if (sectionlist.switchs.modellist[j].code == code) {
|
||||
if (sectionlist.switchs.modellist[j].locateType != data.body[i].locateType) {
|
||||
if (data.body[i].locateType == '02') {
|
||||
sectionlist.switchs.modellist[j].locateType = data.body[i].locateType;
|
||||
actions[sectionlist.switchs.modellist[j].code].reset();
|
||||
actions[sectionlist.switchs.modellist[j].code].time = 0;
|
||||
actions[sectionlist.switchs.modellist[j].code].timeScale = 1;
|
||||
actions[sectionlist.switchs.modellist[j].code].play();
|
||||
|
||||
} else if (data.body[i].locateType == '01') {
|
||||
sectionlist.switchs.modellist[j].locateType = data.body[i].locateType;
|
||||
actions[sectionlist.switchs.modellist[j].code].reset();
|
||||
actions[sectionlist.switchs.modellist[j].code].time = actions[sectionlist.switchs.modellist[j].code]._clip.duration;
|
||||
actions[sectionlist.switchs.modellist[j].code].timeScale = -1;
|
||||
actions[sectionlist.switchs.modellist[j].code].play();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(sectionlist.group[j].name);
|
||||
j = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else if (data.body.length > 200) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@ export default class defaultStyle {
|
||||
this.textFontSize = 10;
|
||||
|
||||
/** 默认字体 族类*/
|
||||
this.textFontFormat = 'consolas';
|
||||
this.fontFamily = 'consolas';
|
||||
|
||||
/** 默认字体颜色*/
|
||||
this.textFontColor = '#C0C0C0';
|
||||
@ -105,9 +105,6 @@ export default class defaultStyle {
|
||||
/** 车次窗高度*/
|
||||
this.trainWindowHeight = 15;
|
||||
|
||||
/** 车次窗颜色*/
|
||||
this.trainWindowColor = '#fff';
|
||||
|
||||
/** 列车文字颜色*/
|
||||
this.trainTextColor = '#ffffff';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
const mapDeviceStyle = {
|
||||
// '01': 'chengdu_04',
|
||||
'02': 'fuzhou_01',
|
||||
// '03': 'bejing_01',
|
||||
'03': 'chengdu_03',
|
||||
'03': 'bejing_01',
|
||||
'04': 'chengdu_03',
|
||||
'05': 'batong_01' // 暂时没有画北京八通线
|
||||
};
|
||||
|
||||
|
@ -5,23 +5,75 @@ class SkinStyle extends defaultStyle {
|
||||
constructor() {
|
||||
super();
|
||||
this[deviceType.Link] = {
|
||||
lineWidthColor: '#FFFFFF', // line 颜色
|
||||
linkWidth: 4.4, // link 宽度
|
||||
linkColor: '#3F3F3F', // link 线条颜色
|
||||
linkTextColor: '#FFFFFF' // link 字体颜色
|
||||
lineWidthColor: '#FFFFFF', // line 颜色
|
||||
linkWidth: 4.4, // link 宽度
|
||||
linkColor: '#3F3F3F', // link 线条颜色
|
||||
linkTextColor: '#FFFFFF' // link 字体颜色
|
||||
};
|
||||
|
||||
this[deviceType.Section] = {
|
||||
text: { // 区段文字属性
|
||||
distance: 2, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontFormat: 'consolas', // 字体族类
|
||||
fontColor: '#C0C0C0', // 字体颜色
|
||||
destinationTextColor: 'yellow', // 目的地颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle', // 文字垂直对齐方式
|
||||
position: 1 // 区段名称位置 1 上面 -1 下面 0 默认
|
||||
text: {
|
||||
position: -1, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 11, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
logicText: {
|
||||
position: -1, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 11, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
standText: {
|
||||
opposite: true, // 对称相反
|
||||
position: 1, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 11, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
reentryText: {
|
||||
opposite: true, // 对称相反
|
||||
position: 1, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 11, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
transferText: {
|
||||
opposite: true, // 对称相反
|
||||
position: 1, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 11, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
destinationText: {
|
||||
position: 1, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 11, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'bold', // 字体粗细
|
||||
fontColor: 'yellow', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
mouseOverStyle: {
|
||||
borderColor: '#fff',
|
||||
@ -57,10 +109,12 @@ class SkinStyle extends defaultStyle {
|
||||
},
|
||||
speedLimit: { // 限速元素
|
||||
width: 1, // 限速线的宽度
|
||||
Distance: 5, // 限速线距离区段距离
|
||||
lineColor: '#FFFF00' // 限速线颜色
|
||||
distance: 5, // 限速线距离区段距离
|
||||
lineColor: '#FFFF00', // 限速线颜色
|
||||
nameShow: false // 名称显示
|
||||
},
|
||||
separator: {
|
||||
z: 1, // 分割符层级
|
||||
width: 1.5, // 分隔符宽度
|
||||
endWidth: 1.5, // 尽头分隔符宽度
|
||||
endColor: '#7F7F7F', // 尽头分隔符颜色
|
||||
@ -78,14 +132,16 @@ class SkinStyle extends defaultStyle {
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 10, // 信号机名称字体大小
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#C0C0C0', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
},
|
||||
lamp: {
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
borderWidth: 0.5, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 5, // 信号机宽度
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
@ -98,20 +154,24 @@ class SkinStyle extends defaultStyle {
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
offset: { x: 4, y: -2 }, // 自动进路偏移量
|
||||
offset: { x: 1, y: -2 }, // 自动进路偏移量
|
||||
routeColor: '#00FF00' // 自动进路
|
||||
},
|
||||
auto: {
|
||||
direction: true, // 自动通过方向
|
||||
offset: { x: 4, y: 0}, // 自动通过偏移量
|
||||
width: 5, // 自动宽度
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00' // 自动触发
|
||||
autoTrigger: '#FFFF00', // 自动触发
|
||||
manualControl: '#FFFF00', // 人工控制
|
||||
outConflict: '#C00808' // 出车冲突
|
||||
},
|
||||
delay: {
|
||||
direction: false, // 延时解锁方向
|
||||
offset: { x: 0, y: -5}, // 延时解锁偏移量
|
||||
fontSize: 9, // 延迟解锁字体大小
|
||||
fontColor: '#FF0000' // 延迟解锁颜色
|
||||
fontColor: '#FF0000', // 延迟解锁颜色
|
||||
fontWeight: 'bold' // 字体粗细
|
||||
},
|
||||
button: {
|
||||
distance: 5, // 信号灯按钮距离区段的距离
|
||||
@ -150,14 +210,14 @@ class SkinStyle extends defaultStyle {
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
direction: 0, // 折返方向
|
||||
position: 0, // 折返方向
|
||||
offset: {x: -16, y: 18}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
direction: 1, // 扣车方向
|
||||
position: 1, // 扣车方向
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
@ -165,12 +225,12 @@ class SkinStyle extends defaultStyle {
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
direction: 1, // 运行时间方向
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: 3}, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
},
|
||||
level: { // 运行等级
|
||||
direction: 1, // 运行等级方向
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 22}, // 运行等级偏移量
|
||||
textColor: '#FFFFFF' // 停站等级字体颜色
|
||||
},
|
||||
@ -231,12 +291,14 @@ class SkinStyle extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
kilometerPosition: 'down' // 公里标位置
|
||||
kilometerPosition: 'down', // 公里标位置
|
||||
fontWeight: 'bold' // 文字错细
|
||||
};
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
distance: 2, // 道岔名称与区段距离
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: {x: -15, y: -10}, // 道岔名称与区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
@ -248,6 +310,15 @@ class SkinStyle extends defaultStyle {
|
||||
core: {
|
||||
legnth: 6 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#870E10', // 道岔单锁定位颜色 (红色)
|
||||
inversionColor: '#870E10', // 道岔单锁反位颜色 (红色)
|
||||
rectShow: false // 道岔单锁 矩形框是否显示
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false // 道岔封锁显示
|
||||
},
|
||||
mouseOverStyle: {
|
||||
borderBackgroundColor: '#22DFDF', // 边框背景色
|
||||
borderColor: '#fff', // 边框颜色
|
||||
@ -258,6 +329,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 灯字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -279,6 +351,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -300,6 +373,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -323,149 +397,166 @@ class SkinStyle extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
trainWindowColor: '#FFF', // 车次窗颜色
|
||||
lineColor: '#FFF', // 车次窗颜色
|
||||
lineDash: [3, 3], // 车次窗虚线间隔
|
||||
trainWindowLineWidth: 1, // 车次窗线宽
|
||||
lineWidth: 1, // 车次窗线宽
|
||||
trainWindowSmooth: 0.01 // 车次窗矩形圆滑程度
|
||||
};
|
||||
|
||||
this[deviceType.Train] = {
|
||||
/** 车身line宽 */
|
||||
trainBodyLineWidth: 0.1,
|
||||
/** 车身鼠标悬浮事件 */
|
||||
trainBodyOnMouseOver: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false},
|
||||
/** 车身鼠标移出事件 */
|
||||
trainBodyOnMouseOut: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false},
|
||||
/** 服务号(表号)前缀 */
|
||||
serviceNumberPrefix: '00',
|
||||
/** 默认服务号(表号) */
|
||||
defaultServiceNumber: 'AA',
|
||||
/** 车次号前缀 */
|
||||
tripNumberPrefix: '000',
|
||||
/** 默认车次号2 */
|
||||
defaultTripNumber: 'DDD',
|
||||
/** 列车车头比车身高出的长度,上下相比车体伸出去的边框*/
|
||||
trainMoreLength: 0,
|
||||
/** 列车车头三角坐标1偏移量 */
|
||||
trainHeadTriangleFirst: { x: 7, y: 1},
|
||||
/** 列车车头三角坐标2偏移量 */
|
||||
trainHeadTriangleSecond: { x: 13, y: 10},
|
||||
/** 列车车头三角坐标3偏移量 */
|
||||
trainHeadTriangleThird: { x: 7, y: 19},
|
||||
/** 列车高度*/
|
||||
trainHeight: 20,
|
||||
/** 列车和车头之间的间距*/
|
||||
trainHeadDistance: 4,
|
||||
/** 列车车头矩形高度 */
|
||||
trainHeadRectHeight: 20,
|
||||
/** 列车长度*/
|
||||
trainWidth: 40,
|
||||
/** 列车竖杠的宽度*/
|
||||
trainConntWidth: 3,
|
||||
/** 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 */
|
||||
changeTrainWidth: false,
|
||||
/** 是否根据nameFormat去动态加载车组号、服务号、车次号、目的地码 */
|
||||
dynamicLoadingDisplay: false,
|
||||
/** 特殊列车类型需设置显示格式 */
|
||||
specialTrainType: [],
|
||||
/** 两边间隔 */
|
||||
lrPadding: 4,
|
||||
/** 上边距离 */
|
||||
upPadding: 4,
|
||||
/** HSDA两边间隔 */
|
||||
lrPaddingHSDA: 3,
|
||||
/** HSDA上边距离 */
|
||||
upPaddingHSDA: 4,
|
||||
/** 列车字号*/
|
||||
trainTextFontSize: 12,
|
||||
/** 目的地状态 01准点 02早点 03晚点 04头码车 */
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#A0522D'},
|
||||
{status: '04', showColor: '#FFFF00'}
|
||||
],
|
||||
/** 默认目的地状态显示颜色 */
|
||||
defaultDestinationColor: '#FFFFFF',
|
||||
/** 目的地状态设置的对应哪个text的颜色 */
|
||||
destinationStatusSetText: 'trainTarget',
|
||||
/** 默认字体 族类*/
|
||||
textFontFormat: 'consolas',
|
||||
/** 列车HDSA字号*/
|
||||
trainHSDATextFontSize: 9,
|
||||
/** 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车 */
|
||||
serverNoType: [
|
||||
{type: '01', showColor: '#FFFFFF'},
|
||||
{type: '02', showColor: '#FFF000'}
|
||||
],
|
||||
/** 默认服务号状态显示颜色 */
|
||||
defaultServerNoColor: '#FFFFFF',
|
||||
/** 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/
|
||||
directionType: [
|
||||
{type: '01', lineLShow: true, lineRShow: true, arrowLShow: false, arrowRShow: false },
|
||||
{type: '02', lineLShow: false, lineRShow: true, arrowLShow: false, arrowRShow: true },
|
||||
{type: '03', lineLShow: true, lineRShow: false, arrowLShow: true, arrowRShow: false }
|
||||
],
|
||||
/** 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 */
|
||||
directionStopType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false},
|
||||
{type: '02', lineLShow: false, lineRShow: true},
|
||||
{type: '03', lineLShow: true, lineRShow: false}
|
||||
],
|
||||
/** 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM
|
||||
* 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM*/
|
||||
runModeStatus: [
|
||||
{status: '01', trainLColor: '#FFFFFF', trainRColor: '#FFFFFF'},
|
||||
{status: '02', trainLColor: '#00FF00', trainRColor: '#00FF00'},
|
||||
{status: '03', trainLColor: '#FFFF00', trainRColor: '#FFFF00'},
|
||||
{status: '04', trainLColor: '#A0522D', trainRColor: '#A0522D'},
|
||||
{status: '05', trainLColor: '#A0522D', trainRColor: '#A0522D'}
|
||||
],
|
||||
/** 设置运行控制状态类型 01正常 02扣车 03停跳 */
|
||||
runControlStatus: [
|
||||
{status: '01', hShow: false, sShow: false},
|
||||
{status: '02', hShow: true, sShow: false},
|
||||
{status: '03', hShow: false, sShow: true}
|
||||
],
|
||||
/** 设置车门状态类型 01关门 02开门 */
|
||||
doorStatus: [
|
||||
{status: '01', dShow: false},
|
||||
{status: '02', dShow: true}
|
||||
],
|
||||
/** 设置通信状态 01正常 02故障 */
|
||||
communicationStatus: [
|
||||
{status: '01', trainColor: '#725A64'},
|
||||
{status: '02', trainColor: '#C0C0C0'}
|
||||
],
|
||||
/** 设置报警状态 01不报警 02报警 */
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
],
|
||||
/** 列车车头矩形填充颜色 */
|
||||
trainHeadFillColor: '#000000',
|
||||
/** 列车车身填充颜色 */
|
||||
trainBodyFillColor: '#725A64',
|
||||
/** textH文本 */
|
||||
textHContent: 'H',
|
||||
/** textS文本 */
|
||||
textSContent: 'S',
|
||||
/** textD文本 */
|
||||
textDContent: 'D',
|
||||
/** textA文本 */
|
||||
textAContent: 'A',
|
||||
/** 是否需创建textHSDA对象 */
|
||||
haveTextHSDA: true,
|
||||
/** 是否需创建arrowText对象 */
|
||||
haveArrowText: true,
|
||||
/** 是否需创建trainBorder对象 */
|
||||
haveTrainBorder: false,
|
||||
/** 列车服务号偏移 */
|
||||
trainServerOffset: { x: 4, y: 4},
|
||||
/** 列车车次号偏移 */
|
||||
trainTargetOffset: { x: 36, y: 4},
|
||||
/** 目的地码文字显示位置 */
|
||||
trainTargetTextAlign: 'right'
|
||||
trainBody: {
|
||||
trainBodyLineWidth: 0.1, // 车身line宽
|
||||
trainBodyOnMouseOver: {
|
||||
train: true,
|
||||
textTrainNumber: false,
|
||||
textTrainServer: false,
|
||||
textTrainTarget: false,
|
||||
textTrainTargetNumber: false
|
||||
}, // 车身鼠标悬浮事件
|
||||
trainBodyOnMouseOut: {
|
||||
train: true,
|
||||
textTrainNumber: false,
|
||||
textTrainServer: false,
|
||||
textTrainTarget: false,
|
||||
textTrainTargetNumber: false
|
||||
}, // 车身鼠标移出事件
|
||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
specialTrainType: [], // 特殊列车类型需设置显示格式
|
||||
lrPadding: 4, // 两边间隔
|
||||
upPadding: 4, // 上边距离
|
||||
trainBodyFillColor: '#725A64', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
trainHSDATextFontSize: 9, // 列车HDSA字号
|
||||
textHContent: 'H', // textH文本
|
||||
textSContent: 'S', // textS文本
|
||||
textDContent: 'D', // textD文本
|
||||
textAContent: 'A'// textA文本
|
||||
},
|
||||
trainNumber: {
|
||||
},
|
||||
trainServer: {
|
||||
serviceNumberPrefix: '00', // 服务号(表号)前缀
|
||||
defaultServiceNumber: 'AA', // 默认服务号(表号)
|
||||
trainServerOffset: { x: 4, y: 4}// 列车服务号偏移
|
||||
},
|
||||
trainTarget: {
|
||||
tripNumberPrefix: '000', // 车次号前缀
|
||||
defaultTripNumber: 'DDD', // 默认车次号2
|
||||
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
|
||||
trainTargetTextAlign: 'right'// 车次号文字显示位置
|
||||
},
|
||||
trainTargetNumber: {
|
||||
trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
|
||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||
trainConntWidth: 3, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000'// 列车车头矩形填充颜色
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
trainHeadDistance: 4, // 列车和车头之间的间距
|
||||
trainWidth: 40, // 列车长度
|
||||
trainTextFontSize: 12, // 列车字号
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false// 是否需创建trainBorder对象
|
||||
},
|
||||
trainStatusStyle: {
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#A0522D'},
|
||||
{status: '04', showColor: '#FFFF00'}
|
||||
], // 目的地状态 01准点 02早点 03晚点 04头码车
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
destinationStatusSetText: 'trainTarget', // 目的地状态设置的对应哪个text的颜色
|
||||
directionType: [
|
||||
{
|
||||
type: '01',
|
||||
lineLShow: true,
|
||||
lineRShow: true,
|
||||
arrowLShow: false,
|
||||
arrowRShow: false
|
||||
},
|
||||
{
|
||||
type: '02',
|
||||
lineLShow: false,
|
||||
lineRShow: true,
|
||||
arrowLShow: false,
|
||||
arrowRShow: true
|
||||
},
|
||||
{
|
||||
type: '03',
|
||||
lineLShow: true,
|
||||
lineRShow: false,
|
||||
arrowLShow: true,
|
||||
arrowRShow: false
|
||||
}
|
||||
], // 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
|
||||
directionStopType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false},
|
||||
{type: '02', lineLShow: false, lineRShow: true},
|
||||
{type: '03', lineLShow: true, lineRShow: false}
|
||||
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
|
||||
runModeStatus: [
|
||||
{
|
||||
status: '01',
|
||||
trainLColor: '#FFFFFF',
|
||||
trainRColor: '#FFFFFF'
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
trainLColor: '#00FF00',
|
||||
trainRColor: '#00FF00'
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
trainLColor: '#FFFF00',
|
||||
trainRColor: '#FFFF00'},
|
||||
{
|
||||
status: '04',
|
||||
trainLColor: '#A0522D',
|
||||
trainRColor: '#A0522D'
|
||||
},
|
||||
{
|
||||
status: '05',
|
||||
trainLColor: '#A0522D',
|
||||
trainRColor: '#A0522D'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM
|
||||
runControlStatus: [
|
||||
{status: '01', hShow: false, sShow: false},
|
||||
{status: '02', hShow: true, sShow: false},
|
||||
{status: '03', hShow: false, sShow: true}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: '01', dShow: false},
|
||||
{status: '02', dShow: true}
|
||||
], // 设置车门状态类型 01关门 02开门
|
||||
communicationStatus: [
|
||||
{status: '01', trainColor: '#725A64'},
|
||||
{status: '02', trainColor: '#C0C0C0'}
|
||||
], // 设置通信状态 01正常 02故障
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
], // 设置报警状态 01不报警 02报警
|
||||
serverNoType: [
|
||||
{type: '01', showColor: '#FFFFFF'},
|
||||
{type: '02', showColor: '#FFF000'}
|
||||
], // 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车
|
||||
defaultServerNoColor: '#FFFFFF' // 默认服务号状态显示颜色
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -12,16 +12,66 @@ class SkinStyle extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Section] = {
|
||||
text: { // 区段文字属性
|
||||
distance: 2, // 文字离区段距离
|
||||
text: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 10, // 文字离区段距离
|
||||
fontSize: 12, // 字体大小
|
||||
fontFormat: 'consolas', // 字体族类
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
destinationTextColor: 'yellow', // 目的地颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle', // 文字垂直对齐方式
|
||||
position: 1 // 区段名称位置 1 上面 -1 下面 0 默认
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
logicText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 12, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
standText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 24, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
reentryText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 36, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
transferText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 36, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
destinationText: {
|
||||
opposite: true, // 对称相反
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 12, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'bold', // 字体粗细
|
||||
fontColor: 'yellow', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
line: {
|
||||
width: 5, // 区段宽度
|
||||
@ -52,14 +102,26 @@ class SkinStyle extends defaultStyle {
|
||||
},
|
||||
speedLimit: { // 限速元素
|
||||
width: 1, // 限速线的宽度
|
||||
Distance: 5, // 限速线距离区段距离
|
||||
lineColor: '#C0C000' // 限速线颜色 (黄色透明光)
|
||||
distance: 5, // 限速线距离区段距离
|
||||
lineColor: '#C0C000', // 限速线颜色 (黄色透明光)
|
||||
nameBackground: '#C0C000', // 限速名称背景颜色
|
||||
nameShow: true, // 名称显示
|
||||
nameNumberColor: '#C00808', // 限速值颜色
|
||||
nameNumberFontSize: 11, // 限速值大小
|
||||
kilometerColor: '#fff', // 公里标颜色
|
||||
kilometerFontSize: 8, // 公里标大小
|
||||
drogueWidth: 19, // 浮标宽度
|
||||
drogueHeight: 12 // 浮标高度
|
||||
},
|
||||
separator: {
|
||||
z: 6, // 分割符层级
|
||||
width: 1.5, // 分隔符宽度
|
||||
endWidth: 1.5, // 尽头分隔符宽度
|
||||
endColor: '#FFFFFF', // 尽头分隔符颜色
|
||||
color: '#FFFFFF' // 区段边界符颜色
|
||||
},
|
||||
shuttleBack: { // 折返进路 (存在此对象 显示折返箭头)
|
||||
distance: 5 // 限速线距离区段距离
|
||||
}
|
||||
};
|
||||
|
||||
@ -73,12 +135,14 @@ class SkinStyle extends defaultStyle {
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 12, // 信号机名称字体大小
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
@ -92,23 +156,25 @@ class SkinStyle extends defaultStyle {
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
offset: { x: -4, y: 0 }, // 自动进路偏移量
|
||||
direction: true, // 自动通过方向
|
||||
offset: { x: 4, y: 0}, // 自动通过偏移量
|
||||
routeColor: '#00FF00' // 自动进路
|
||||
},
|
||||
auto: {
|
||||
direction: false, // 自动通过方向
|
||||
offset: { x: -4, y: 0}, // 自动通过偏移量
|
||||
width: 5, // 自动宽度
|
||||
manualControl: '#FFFF00', // 人工控制
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00', // 自动触发
|
||||
outConflict: '#C00808' // 出车冲突
|
||||
},
|
||||
delay: {
|
||||
direction: true, // 延时解锁方向
|
||||
offset: { x: 15, y: -10}, // 延时解锁偏移量
|
||||
fontSize: 10, // 延迟解锁字体大小
|
||||
fontColor: '#C00808' // 延迟解锁颜色
|
||||
direction: false, // 延时解锁方向
|
||||
offset: { x: -5, y: 0}, // 延时解锁偏移量
|
||||
fontSize: 11, // 延迟解锁字体大小
|
||||
fontColor: '#C00808', // 延迟解锁颜色
|
||||
fontWeight: 'bold' // 字体粗细
|
||||
|
||||
},
|
||||
button: {
|
||||
@ -143,14 +209,14 @@ class SkinStyle extends defaultStyle {
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
direction: 0, // 折返方向
|
||||
position: 0, // 折返方向
|
||||
offset: {x: -16, y: 20}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
direction: -1, // 扣车方向
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: -20}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
@ -158,13 +224,13 @@ class SkinStyle extends defaultStyle {
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
direction: 1, // 运行时间方向
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0' // 停站时间字体颜色
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
direction: -1, // 停跳方向
|
||||
position: -1, // 停跳方向
|
||||
offset: {x: -8, y: 0},
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
@ -172,7 +238,7 @@ class SkinStyle extends defaultStyle {
|
||||
r: 8 // 圆半径大小
|
||||
},
|
||||
level: { // 运行等级
|
||||
direction: 1, // 运行等级方向
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 30}, // 运行等级偏移量
|
||||
textColor: '#FFF000' // 停站等级字体颜色
|
||||
}
|
||||
@ -181,7 +247,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.StationControl] = {
|
||||
text: {
|
||||
distance: 2, // 灯和文字之间的距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontFormat: 'consolas', // 字体格式
|
||||
fontColor: '#ffffff', // 字体颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
@ -191,7 +257,7 @@ class SkinStyle extends defaultStyle {
|
||||
lamp: {
|
||||
count: 4, // 控制模式的个数
|
||||
offset: {x: 0, y: 0}, // 偏移量
|
||||
radiusR: 4, // 控制模式灯的半径
|
||||
radiusR: 6, // 控制模式灯的半径
|
||||
distance: 36, // 控制模式之间灯之间的距离
|
||||
grayColor: '#7F7F7F', // 控制模式灰色
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
@ -225,8 +291,9 @@ class SkinStyle extends defaultStyle {
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
distance: 2, // 道岔名称与区段距离
|
||||
fontSize: 12, // 字体大小
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: {x: 5, y: -10}, // 道岔名称与区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#C00808', // 道岔失去颜色
|
||||
@ -236,12 +303,25 @@ class SkinStyle extends defaultStyle {
|
||||
},
|
||||
core: {
|
||||
legnth: 6 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
inversionColor: '#FFFF00', // 道岔单锁'反位'颜色 (黄色)
|
||||
rectShow: true, // 道岔单锁 矩形框是否显示
|
||||
rectWidth: 18, // 矩形框 宽高
|
||||
rectBorderColor: '#fff' // 矩形边框颜色
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
nameBorderShow: false, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: true, // 道岔封锁显示
|
||||
contentRectColor: 'red' // 道岔封锁边框颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -252,7 +332,8 @@ class SkinStyle extends defaultStyle {
|
||||
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -263,7 +344,8 @@ class SkinStyle extends defaultStyle {
|
||||
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
@ -277,149 +359,195 @@ class SkinStyle extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
trainWindowColor: '#4DD43F', // 车次窗颜色
|
||||
lineColor: '#4DD43F', // 车次窗颜色
|
||||
lineDash: null, // 车次窗虚线间隔
|
||||
trainWindowLineWidth: 1.5, // 车次窗线宽
|
||||
lineWidth: 1, // 车次窗线宽
|
||||
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
|
||||
};
|
||||
|
||||
this[deviceType.Train] = {
|
||||
/** 车身line宽 */
|
||||
trainBodyLineWidth: 0.1,
|
||||
/** 车身鼠标悬浮事件 */
|
||||
trainBodyOnMouseOver: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false},
|
||||
/** 车身鼠标移出事件 */
|
||||
trainBodyOnMouseOut: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false},
|
||||
/** 服务号(表号)前缀 */
|
||||
serviceNumberPrefix: '00',
|
||||
/** 默认服务号(表号) */
|
||||
defaultServiceNumber: 'AA',
|
||||
/** 车次号前缀 */
|
||||
tripNumberPrefix: '000',
|
||||
/** 默认车次号2 */
|
||||
defaultTripNumber: 'DDD',
|
||||
/** 列车车头比车身高出的长度,上下相比车体伸出去的边框*/
|
||||
trainMoreLength: 0,
|
||||
/** 列车车头三角坐标1偏移量 */
|
||||
trainHeadTriangleFirst: { x: 7, y: 1},
|
||||
/** 列车车头三角坐标2偏移量 */
|
||||
trainHeadTriangleSecond: { x: 13, y: 10},
|
||||
/** 列车车头三角坐标3偏移量 */
|
||||
trainHeadTriangleThird: { x: 7, y: 19},
|
||||
/** 列车高度*/
|
||||
trainHeight: 20,
|
||||
/** 列车和车头之间的间距*/
|
||||
trainHeadDistance: 4,
|
||||
/** 列车车头矩形高度 */
|
||||
trainHeadRectHeight: 20,
|
||||
/** 列车长度*/
|
||||
trainWidth: 40,
|
||||
/** 列车竖杠的宽度*/
|
||||
trainConntWidth: 3,
|
||||
/** 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 */
|
||||
changeTrainWidth: false,
|
||||
/** 是否根据nameFormat去动态加载车组号、服务号、车次号、目的地码 */
|
||||
dynamicLoadingDisplay: false,
|
||||
/** 特殊列车类型需设置显示格式 */
|
||||
specialTrainType: [],
|
||||
/** 两边间隔 */
|
||||
lrPadding: 4,
|
||||
/** 上边距离 */
|
||||
upPadding: 4,
|
||||
/** HSDA两边间隔 */
|
||||
lrPaddingHSDA: 3,
|
||||
/** HSDA上边距离 */
|
||||
upPaddingHSDA: 4,
|
||||
/** 列车字号*/
|
||||
trainTextFontSize: 12,
|
||||
/** 目的地状态 01准点 02早点 03晚点 04头码车 */
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#A0522D'},
|
||||
{status: '04', showColor: '#FFFF00'}
|
||||
],
|
||||
/** 默认目的地状态显示颜色 */
|
||||
defaultDestinationColor: '#FFFFFF',
|
||||
/** 目的地状态设置的对应哪个text的颜色 */
|
||||
destinationStatusSetText: 'trainTarget',
|
||||
/** 默认字体 族类*/
|
||||
textFontFormat: 'consolas',
|
||||
/** 列车HDSA字号*/
|
||||
trainHSDATextFontSize: 9,
|
||||
/** 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车 */
|
||||
serverNoType: [
|
||||
{type: '01', showColor: '#FFFFFF'},
|
||||
{type: '02', showColor: '#FFF000'}
|
||||
],
|
||||
/** 默认服务号状态显示颜色 */
|
||||
defaultServerNoColor: '#FFFFFF',
|
||||
/** 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/
|
||||
directionType: [
|
||||
{type: '01', lineLShow: true, lineRShow: true, arrowLShow: false, arrowRShow: false },
|
||||
{type: '02', lineLShow: false, lineRShow: true, arrowLShow: false, arrowRShow: true },
|
||||
{type: '03', lineLShow: true, lineRShow: false, arrowLShow: true, arrowRShow: false }
|
||||
],
|
||||
/** 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 */
|
||||
directionStopType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false},
|
||||
{type: '02', lineLShow: false, lineRShow: true},
|
||||
{type: '03', lineLShow: true, lineRShow: false}
|
||||
],
|
||||
/** 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM
|
||||
* 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM*/
|
||||
runModeStatus: [
|
||||
{status: '01', trainLColor: '#FFFFFF', trainRColor: '#FFFFFF'},
|
||||
{status: '02', trainLColor: '#00FF00', trainRColor: '#00FF00'},
|
||||
{status: '03', trainLColor: '#FFFF00', trainRColor: '#FFFF00'},
|
||||
{status: '04', trainLColor: '#A0522D', trainRColor: '#A0522D'},
|
||||
{status: '05', trainLColor: '#A0522D', trainRColor: '#A0522D'}
|
||||
],
|
||||
/** 设置运行控制状态类型 01正常 02扣车 03停跳 */
|
||||
runControlStatus: [
|
||||
{status: '01', hShow: false, sShow: false},
|
||||
{status: '02', hShow: true, sShow: false},
|
||||
{status: '03', hShow: false, sShow: true}
|
||||
],
|
||||
/** 设置车门状态类型 01关门 02开门 */
|
||||
doorStatus: [
|
||||
{status: '01', dShow: false},
|
||||
{status: '02', dShow: true}
|
||||
],
|
||||
/** 设置通信状态 01正常 02故障 */
|
||||
communicationStatus: [
|
||||
{status: '01', trainColor: '#725A64'},
|
||||
{status: '02', trainColor: '#C0C0C0'}
|
||||
],
|
||||
/** 设置报警状态 01不报警 02报警 */
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
],
|
||||
/** 列车车头矩形填充颜色 */
|
||||
trainHeadFillColor: '#000000',
|
||||
/** 列车车身填充颜色 */
|
||||
trainBodyFillColor: '#725A64',
|
||||
/** textH文本 */
|
||||
textHContent: 'H',
|
||||
/** textS文本 */
|
||||
textSContent: 'S',
|
||||
/** textD文本 */
|
||||
textDContent: 'D',
|
||||
/** textA文本 */
|
||||
textAContent: 'A',
|
||||
/** 是否需创建textHSDA对象 */
|
||||
haveTextHSDA: true,
|
||||
/** 是否需创建arrowText对象 */
|
||||
haveArrowText: true,
|
||||
/** 是否需创建trainBorder对象 */
|
||||
haveTrainBorder: false,
|
||||
/** 列车服务号偏移 */
|
||||
trainServerOffset: { x: 4, y: 4},
|
||||
/** 列车车次号偏移 */
|
||||
trainTargetOffset: { x: 36, y: 4},
|
||||
/** 目的地码文字显示位置 */
|
||||
trainTargetTextAlign: 'right'
|
||||
trainBody: {
|
||||
trainBodyLineWidth: 1, // 车身line宽
|
||||
trainBodyOnMouseOver: {
|
||||
train: true,
|
||||
textTrainNumber: false,
|
||||
textTrainServer: false,
|
||||
textTrainTarget: false,
|
||||
textTrainTargetNumber: false
|
||||
}, // 车身鼠标悬浮事件
|
||||
trainBodyOnMouseOut: {
|
||||
train: true,
|
||||
textTrainNumber: false,
|
||||
textTrainServer: false,
|
||||
textTrainTarget: false,
|
||||
textTrainTargetNumber: false
|
||||
}, // 车身鼠标移出事件
|
||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
specialTrainType: [], // 特殊列车类型需设置显示格式
|
||||
lrPadding: 4, // 两边间隔
|
||||
upPadding: 4, // 上边距离
|
||||
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
||||
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
|
||||
},
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
trainHSDATextFontSize: 9, // 列车HDSA字号
|
||||
textHContent: '扣', // textH文本
|
||||
textSContent: '跳', // textS文本
|
||||
textDContent: '门', // textD文本
|
||||
textAContent: '警' // textA文本
|
||||
},
|
||||
trainNumber: {
|
||||
targetCodePrefix: '000', // 目的地码前缀
|
||||
defaultTargetCode: 'DDD', // 默认目的地码
|
||||
trainTargetTextAlign: 'left', // 目的地码文字显示位置
|
||||
trainNumberOffset: { x: 24, y: 4}// 目的地码偏移量
|
||||
},
|
||||
trainServer: {
|
||||
serviceNumberPrefix: '000', // 服务号(表号)前缀
|
||||
defaultServiceNumber: 'TTT', // 默认服务号(表号)
|
||||
defaultServerNoColor: '#FFFFFF', // 默认服务号状态显示颜色
|
||||
trainServerOffset: { x: 4, y: 4} // 列车服务号偏移
|
||||
},
|
||||
trainTarget: {
|
||||
tripNumberPrefix: '000', // 车次号前缀
|
||||
defaultTripNumber: 'DDD', // 默认车次号2
|
||||
trainTargetOffset: { x: 36, y: 4}, // 列车车次号偏移
|
||||
trainTargetTextAlign: 'right' // 车次号文字显示位置
|
||||
},
|
||||
trainTargetNumber: {
|
||||
trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
|
||||
trainConntWidth: 3, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||
trainHeadRectHeight: 20 // 列车车头矩形高度
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
trainHeadDistance: 4, // 列车和车头之间的间距
|
||||
trainWidth: 48, // 列车长度
|
||||
trainTextFontSize: 12, // 列车字号
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false // 是否需创建trainBorder对象
|
||||
},
|
||||
trainStatusStyle: {
|
||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||
destinationStatusSetText: 'trainTarget', // 目的地状态设置的对应哪个text的颜色
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#A0522D'},
|
||||
{status: '04', showColor: '#FFFF00'}
|
||||
], // 目的地状态 01准点 02早点 03晚点 04头码车
|
||||
serverNoType: [
|
||||
{type: '01', showColor: '#FFFFFF'},
|
||||
{type: '02', showColor: '#FFF000'}
|
||||
], // 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车
|
||||
directionType: [
|
||||
{
|
||||
type: '01',
|
||||
lineLShow: true,
|
||||
lineRShow: true,
|
||||
arrowLShow: false,
|
||||
arrowRShow: false
|
||||
},
|
||||
{
|
||||
type: '02',
|
||||
lineLShow: false,
|
||||
lineRShow: true,
|
||||
arrowLShow: false,
|
||||
arrowRShow: true
|
||||
},
|
||||
{
|
||||
type: '03',
|
||||
lineLShow: true,
|
||||
lineRShow: false,
|
||||
arrowLShow: true,
|
||||
arrowRShow: false
|
||||
}
|
||||
], // 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
|
||||
directionStopType: [
|
||||
{
|
||||
type: '01',
|
||||
lineLShow: false,
|
||||
lineRShow: false
|
||||
},
|
||||
{
|
||||
type: '02',
|
||||
lineLShow: false,
|
||||
lineRShow: true
|
||||
},
|
||||
{
|
||||
type: '03',
|
||||
lineLShow: true,
|
||||
lineRShow: false
|
||||
}
|
||||
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
|
||||
runModeStatus: [
|
||||
{
|
||||
status: '01',
|
||||
trainLColor: '#FFFFFF',
|
||||
trainRColor: '#FFFFFF'
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
trainLColor: '#00FF00',
|
||||
trainRColor: '#00FF00'
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
trainLColor: '#FFFF00',
|
||||
trainRColor: '#FFFF00'
|
||||
},
|
||||
{
|
||||
status: '04',
|
||||
trainLColor: '#A0522D',
|
||||
trainRColor: '#A0522D'
|
||||
},
|
||||
{
|
||||
status: '05',
|
||||
trainLColor: '#A0522D',
|
||||
trainRColor: '#A0522D'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM
|
||||
runControlStatus: [
|
||||
{
|
||||
status: '01',
|
||||
hShow: false,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
hShow: true,
|
||||
sShow: false
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
hShow: false,
|
||||
sShow: true
|
||||
}
|
||||
], // 设置运行控制状态类型 01正常 02扣车 03停跳
|
||||
doorStatus: [
|
||||
{status: '01', dShow: false},
|
||||
{status: '02', dShow: true}
|
||||
], // 设置车门状态类型 01关门 02开门
|
||||
communicationStatus: [
|
||||
{status: '01', trainColor: '#725A64'},
|
||||
{status: '02', trainColor: '#C0C0C0'}
|
||||
], // 设置通信状态 01正常 02故障
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
] // 设置报警状态 01不报警 02报警
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -12,15 +12,66 @@ class SkinStyle extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Section] = {
|
||||
text: { // 区段文字属性
|
||||
distance: 2, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
destinationTextColor: 'yellow', // 目的地颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle', // 文字垂直对齐方式
|
||||
position: 0 // 区段名称位置 1 上行 -1 下面 0 默认
|
||||
text: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 18, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
logicText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 8, // 文字离区段距离
|
||||
fontSize: 8, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
standText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 28, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
reentryText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 28, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
transferText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 28, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
destinationText: {
|
||||
opposite: true, // 对称相反
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 10, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'bold', // 字体粗细
|
||||
fontColor: 'yellow', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
line: {
|
||||
width: 5, // 区段宽度
|
||||
@ -51,10 +102,12 @@ class SkinStyle extends defaultStyle {
|
||||
},
|
||||
speedLimit: { // 限速元素
|
||||
width: 1, // 限速线的宽短
|
||||
Distance: 5, // 限速线距离区段距离
|
||||
lineColor: '#FFFF00' // 限速线颜色
|
||||
distance: 5, // 限速线距离区段距离
|
||||
lineColor: '#FFFF00', // 限速线颜色
|
||||
nameShow: false // 名称显示
|
||||
},
|
||||
separator: {
|
||||
z: 6, // 分割符层级
|
||||
width: 1.2, // 分隔符宽度
|
||||
endWidth: 3.5, // 尽头分隔符宽度
|
||||
endColor: '#3F3F3F', // 尽头分隔符颜色
|
||||
@ -73,13 +126,15 @@ class SkinStyle extends defaultStyle {
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: true, // 信号字体对其方式
|
||||
fontSize: 10, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
checkColor: '#00FF00', // 信号字体
|
||||
nameBorderShow: true // 信号机名字边框显示
|
||||
},
|
||||
lamp: {
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 0.5, // 信号灯边框线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
@ -98,14 +153,18 @@ class SkinStyle extends defaultStyle {
|
||||
auto: {
|
||||
direction: false, // 自动通过方向
|
||||
offset: { x: -4, y: 0}, // 自动通过偏移量
|
||||
width: 5, // 自动宽度
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00' // 自动触发
|
||||
autoTrigger: '#FFFF00', // 自动触发
|
||||
manualControl: '#FFFF00', // 人工控制
|
||||
outConflict: '#C00808' // 出车冲突
|
||||
},
|
||||
delay: {
|
||||
direction: true, // 延时解锁方向
|
||||
offset: { x: 15, y: -10}, // 延时解锁偏移量
|
||||
fontSize: 9, // 延迟解锁字体大小
|
||||
fontColor: '#FF0000' // 延迟解锁颜色
|
||||
fontColor: '#FF0000', // 延迟解锁颜色
|
||||
fontWeight: 'bold' // 字体粗细
|
||||
},
|
||||
button: {
|
||||
distance: 5, // 信号灯按钮距离区段的距离
|
||||
@ -138,14 +197,14 @@ class SkinStyle extends defaultStyle {
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
direction: 0, // 折返方向
|
||||
position: 0, // 折返方向
|
||||
offset: {x: -16, y: 20}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
direction: -1, // 扣车方向
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: -6}, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
@ -153,12 +212,12 @@ class SkinStyle extends defaultStyle {
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
direction: 1, // 运行时间方向
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: 26}, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
},
|
||||
level: { // 运行等级
|
||||
direction: 1, // 运行等级方向
|
||||
position: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 6}, // 运行等级偏移量
|
||||
textColor: '#FFFFFF' // 停站等级字体颜色
|
||||
}
|
||||
@ -211,7 +270,8 @@ class SkinStyle extends defaultStyle {
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
distance: 2, // 道岔名称与区段距离
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: {x: 0, y: 8}, // 道岔名称与区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
@ -222,6 +282,15 @@ class SkinStyle extends defaultStyle {
|
||||
},
|
||||
core: {
|
||||
legnth: 6 // 道岔单边长度
|
||||
},
|
||||
block: { // 道岔封锁配置
|
||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||
contentRectShow: false // 道岔封锁显示
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#870E10', // 道岔单锁定位颜色 (红色)
|
||||
inversionColor: '#870E10', // 道岔单锁反位颜色 (红色)
|
||||
rectShow: false // 道岔单锁 矩形框是否显示
|
||||
}
|
||||
};
|
||||
|
||||
@ -236,134 +305,159 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.LimitControl] = {};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
trainWindowColor: '#4DD43F', // 车次窗颜色
|
||||
lineColor: '#4DD43F', // 车次窗颜色
|
||||
lineDash: null, // 车次窗虚线间隔
|
||||
trainWindowLineWidth: 1.5, // 车次窗线宽
|
||||
lineWidth: 1, // 车次窗线宽
|
||||
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
|
||||
};
|
||||
|
||||
this[deviceType.Train] = {
|
||||
/** 车身line宽 */
|
||||
trainBodyLineWidth: 0,
|
||||
/** 车身鼠标悬浮事件 */
|
||||
trainBodyOnMouseOver: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false},
|
||||
/** 车身鼠标移出事件 */
|
||||
trainBodyOnMouseOut: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false},
|
||||
/** 目的地码前缀*/
|
||||
targetCodePrefix: '000',
|
||||
/** 默认目的地码 */
|
||||
defaultTargetCode: 'AAA',
|
||||
/** 服务号(表号)前缀 */
|
||||
serviceNumberPrefix: '00',
|
||||
/** 默认服务号(表号) */
|
||||
defaultServiceNumber: 'BB',
|
||||
/** 车次号前缀 */
|
||||
tripNumberPrefix: '0000',
|
||||
/** 默认车次号1 */
|
||||
defaultDirectionCode: 'D',
|
||||
/** 默认车次号2 */
|
||||
defaultTripNumber: 'CCC',
|
||||
/** 车组号前缀 */
|
||||
groupNumberPrefix: '000',
|
||||
/** 默认车组号 */
|
||||
defaultGroupNumber: 'EEE',
|
||||
/** 列车车头比车身高出的长度,上下相比车体伸出去的边框*/
|
||||
trainMoreLength: 1,
|
||||
/** 列车车头三角坐标1偏移量 */
|
||||
trainHeadTriangleFirst: { x: 0, y: 0},
|
||||
/** 列车车头三角坐标2偏移量 */
|
||||
trainHeadTriangleSecond: { x: 4, y: 8.5},
|
||||
/** 列车车头三角坐标3偏移量 */
|
||||
trainHeadTriangleThird: { x: 0, y: 15},
|
||||
/** 列车高度*/
|
||||
trainHeight: 17,
|
||||
/** 列车和车头之间的间距*/
|
||||
trainHeadDistance: 2,
|
||||
/** 列车车头矩形高度 */
|
||||
trainHeadRectHeight: 15,
|
||||
/** 列车长度*/
|
||||
trainWidth: 76,
|
||||
/** 列车竖杠的宽度*/
|
||||
trainConntWidth: 4,
|
||||
/** 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 */
|
||||
changeTrainWidth: true,
|
||||
/** 是否根据nameFormat去动态加载车组号、服务号、车次号、目的地码 */
|
||||
dynamicLoadingDisplay: true,
|
||||
/** 特殊列车类型需设置显示格式 */
|
||||
specialTrainType: [{ type: '03', serviceNumber: 'MM', nameFormat: 'serviceNumber:groupNumber'}],
|
||||
/** 两边间隔 */
|
||||
lrPadding: 1,
|
||||
/** 上边距离 */
|
||||
upPadding: 1,
|
||||
/** 列车字号*/
|
||||
trainTextFontSize: 15,
|
||||
/** 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除 */
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#3265FF'},
|
||||
{status: '04', showColor: '#9B4A09'},
|
||||
{status: '05', showColor: '#EF0C08'},
|
||||
{status: '06', showColor: '#FFFFFF'},
|
||||
{status: '07', showColor: '#FFFF00'}
|
||||
],
|
||||
/** 目的地状态设置的对应哪个text的颜色 */
|
||||
destinationStatusSetText: 'trainServer',
|
||||
/** 默认字体 族类*/
|
||||
textFontFormat: '宋体',
|
||||
/** 列车HDSA字号*/
|
||||
trainHSDATextFontSize: 8,
|
||||
/** 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'} */
|
||||
serverNoType: [],
|
||||
/** 运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/
|
||||
directionType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: false },
|
||||
{type: '02', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: true },
|
||||
{type: '03', lineLShow: false, lineRShow: false, arrowLShow: true, arrowRShow: false }
|
||||
],
|
||||
/** 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 */
|
||||
directionStopType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false},
|
||||
{type: '02', lineLShow: false, lineRShow: true},
|
||||
{type: '03', lineLShow: true, lineRShow: false}
|
||||
],
|
||||
/** 列车运行模式对应车头颜色 01信号中断 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM
|
||||
* 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM*/
|
||||
runModeStatus: [
|
||||
{status: '01', trainLColor: '#EF0C08', trainRColor: '#EF0C08'},
|
||||
{status: '02', trainLColor: '#00FF00', trainRColor: '#00FF00'},
|
||||
{status: '03', trainLColor: '#FFFF00', trainRColor: '#FFFF00'},
|
||||
{status: '04', trainLColor: '#EA700D', trainRColor: '#EA700D'},
|
||||
{status: '05', trainLColor: '#A0522D', trainRColor: '#A0522D'}
|
||||
],
|
||||
/** 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}, */
|
||||
runControlStatus: [],
|
||||
/** 设置车门状态类型 eg:{status: '01', dShow: false}, */
|
||||
doorStatus: [],
|
||||
/** 设置通信状态 eg:{status: '01', trainColor:'#725A64'}, */
|
||||
communicationStatus: [],
|
||||
/** 设置报警状态 eg:{status: '01', aShow: false}, */
|
||||
alarmStatus: [],
|
||||
/** 列车车头矩形填充颜色 */
|
||||
trainHeadFillColor: '#EF0C08',
|
||||
/** 列车车身填充颜色 */
|
||||
trainBodyFillColor: '#000000',
|
||||
/** 列车服务号偏移 */
|
||||
trainServerOffset: { x: -1, y: 1},
|
||||
/** 列车车次号偏移 */
|
||||
trainTargetOffset: { x: -1, y: 1},
|
||||
/** 列车显示格式 */
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber',
|
||||
/** 字体大小 */
|
||||
nameFontSize: 10,
|
||||
/** 目的地码文字显示位置 */
|
||||
trainTargetTextAlign: 'left',
|
||||
/** 是否需创建textHSDA对象 */
|
||||
haveTextHSDA: false,
|
||||
/** 是否需创建arrowText对象 */
|
||||
haveArrowText: true,
|
||||
/** 是否需创建trainBorder对象 */
|
||||
haveTrainBorder: false
|
||||
trainBody: {
|
||||
trainBodyLineWidth: 0, // 车身line宽
|
||||
trainBodyOnMouseOver: {
|
||||
train: true,
|
||||
textTrainNumber: false,
|
||||
textTrainServer: false,
|
||||
textTrainTarget: false,
|
||||
textTrainTargetNumber: false
|
||||
}, // 车身鼠标悬浮事件
|
||||
trainBodyOnMouseOut: {
|
||||
train: true,
|
||||
textTrainNumber: false,
|
||||
textTrainServer: false,
|
||||
textTrainTarget: false,
|
||||
textTrainTargetNumber: false
|
||||
}, // 车身鼠标移出事件
|
||||
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
specialTrainType: [
|
||||
{
|
||||
type: '03',
|
||||
serviceNumber: 'MM',
|
||||
nameFormat: 'serviceNumber:groupNumber'
|
||||
}
|
||||
], // 特殊列车类型需设置显示格式
|
||||
lrPadding: 1, // 两边间隔
|
||||
upPadding: 1, // 上边距离
|
||||
trainBodyFillColor: '#000000', // 列车车身填充颜色
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
hsda: {
|
||||
trainHSDATextFontSize: 8// 列车HDSA字号
|
||||
},
|
||||
trainNumber: {
|
||||
targetCodePrefix: '000', // 目的地码前缀
|
||||
defaultTargetCode: 'AAA', // 默认目的地码
|
||||
trainTargetTextAlign: 'left', // 车次号文字显示位置
|
||||
trainNumberOffset: { x: 0, y: 1}// 目的地码偏移量
|
||||
},
|
||||
trainServer: {
|
||||
serviceNumberPrefix: '00', // 服务号(表号)前缀
|
||||
defaultServiceNumber: 'BB', // 默认服务号(表号)
|
||||
trainServerOffset: { x: 16, y: 1}// 列车服务号偏移
|
||||
},
|
||||
trainTarget: {
|
||||
tripNumberPrefix: '0000', // 车次号前缀
|
||||
defaultDirectionCode: 'D', // 默认车次号1
|
||||
defaultTripNumber: 'CCC', // 默认车次号2
|
||||
trainTargetOffset: { x: 26, y: 1}// 列车车次号偏移
|
||||
},
|
||||
trainTargetNumber: {
|
||||
groupNumberPrefix: '000', // 车组号前缀
|
||||
defaultGroupNumber: 'EEE', // 默认车组号
|
||||
trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 4, y: 8.5}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 0, y: 15}, // 列车车头三角坐标3偏移量
|
||||
trainHeadRectHeight: 15, // 列车车头矩形高度
|
||||
trainConntWidth: 4, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#EF0C08'// 列车车头矩形填充颜色
|
||||
},
|
||||
common: {
|
||||
trainHeight: 17, // 列车高度
|
||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||
trainWidth: 76, // 列车长度
|
||||
trainTextFontSize: 15, // 列车字号
|
||||
fontFamily: '宋体', // 默认字体 族类
|
||||
nameFontSize: 10, // 字体大小
|
||||
haveTextHSDA: false, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false// 是否需创建trainBorder对象
|
||||
},
|
||||
trainStatusStyle: {
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#3265FF'},
|
||||
{status: '04', showColor: '#9B4A09'},
|
||||
{status: '05', showColor: '#EF0C08'},
|
||||
{status: '06', showColor: '#FFFFFF'},
|
||||
{status: '07', showColor: '#FFFF00'}
|
||||
], // 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除
|
||||
destinationStatusSetText: 'trainServer', // 目的地状态设置的对应哪个text的颜色
|
||||
directionType: [
|
||||
{
|
||||
type: '01',
|
||||
lineLShow: false,
|
||||
lineRShow: false,
|
||||
arrowLShow: false,
|
||||
arrowRShow: false
|
||||
},
|
||||
{
|
||||
type: '02',
|
||||
lineLShow: false,
|
||||
lineRShow: false,
|
||||
arrowLShow: false,
|
||||
arrowRShow: true
|
||||
},
|
||||
{
|
||||
type: '03',
|
||||
lineLShow: false,
|
||||
lineRShow: false,
|
||||
arrowLShow: true,
|
||||
arrowRShow: false
|
||||
}
|
||||
], // 运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
|
||||
directionStopType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false},
|
||||
{type: '02', lineLShow: false, lineRShow: true},
|
||||
{type: '03', lineLShow: true, lineRShow: false}
|
||||
], // 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行
|
||||
runModeStatus: [
|
||||
{
|
||||
status: '01',
|
||||
trainLColor: '#EF0C08',
|
||||
trainRColor: '#EF0C08'
|
||||
},
|
||||
{
|
||||
status: '02',
|
||||
trainLColor: '#00FF00',
|
||||
trainRColor: '#00FF00'
|
||||
},
|
||||
{
|
||||
status: '03',
|
||||
trainLColor: '#FFFF00',
|
||||
trainRColor: '#FFFF00'
|
||||
},
|
||||
{
|
||||
status: '04',
|
||||
trainLColor: '#EA700D',
|
||||
trainRColor: '#EA700D'
|
||||
},
|
||||
{
|
||||
status: '05',
|
||||
trainLColor: '#A0522D',
|
||||
trainRColor: '#A0522D'
|
||||
}
|
||||
], // 列车运行模式对应车头颜色 01信号中断 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM
|
||||
runControlStatus: [], // 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}
|
||||
doorStatus: [], // 设置车门状态类型 eg:{status: '01', dShow: false}
|
||||
communicationStatus: [], // 设置通信状态 eg:{status: '01', trainColor:'#725A64'}
|
||||
alarmStatus: [], // 设置报警状态 eg:{status: '01', aShow: false}
|
||||
serverNoType: []// 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -234,12 +234,16 @@ class Jlmap {
|
||||
this.$painter.delete(oDevice);
|
||||
} else {
|
||||
const nDevice = Object.assign(oDevice, this.hookHandle(elem));
|
||||
if (nDevice.id == '5888') {
|
||||
console.log(oDevice, nDevice);
|
||||
debugger;
|
||||
}
|
||||
this.$painter.update(nDevice);
|
||||
}
|
||||
});
|
||||
|
||||
// 状态后处理
|
||||
this.postHandle(list);
|
||||
// this.postHandle(list);
|
||||
|
||||
if (this.methods.stateUpdate instanceof Function) { this.methods.stateUpdate(list); }
|
||||
}
|
||||
|
@ -30,8 +30,9 @@ class EventModel {
|
||||
class MouseController extends Eventful {
|
||||
constructor(jmap) {
|
||||
super();
|
||||
this.events = jmap.getEvents();
|
||||
this.$jmap = jmap;
|
||||
this.$zr = jmap.getZr();
|
||||
this.events = jmap.getEvents();
|
||||
this.initHandler(this.$zr);
|
||||
}
|
||||
|
||||
@ -152,37 +153,34 @@ class MouseController extends Eventful {
|
||||
}
|
||||
|
||||
checkEvent(e) {
|
||||
return new EventModel(e);
|
||||
// var oldEm = new EventModel(this.$zr.curEvent || { event: {} });
|
||||
// var newEm = new EventModel(e);
|
||||
// if ([1, 3].includes(e.which)) {
|
||||
// // 查找之前和当前鼠标选中的实例
|
||||
// var oldInstances = (this._viewRepo.__getViewInstancesByDeviceType(oldEm.deviceType) || {})._instances || {};
|
||||
// var newInstances = (this._viewRepo.__getViewInstancesByDeviceType(newEm.deviceType) || {})._instances || {};
|
||||
// var newDevice = newInstances[newEm.deviceCode] || {};
|
||||
// var oldDevice = oldInstances[oldEm.deviceCode] || {};
|
||||
var oldEm = new EventModel(this.$zr.curEvent || { event: {} });
|
||||
var newEm = new EventModel(e);
|
||||
if ([1, 3].includes(e.which)) {
|
||||
// 查找之前和当前鼠标选中的实例
|
||||
var oldDevice = (this.$jmap.getDeviceByCode(oldEm.deviceCode) || {}).instance || {};
|
||||
var newDevice = (this.$jmap.getDeviceByCode(newEm.deviceCode) || {}).instance || {};
|
||||
|
||||
// // 如果之前和当前选中的实例不一致
|
||||
// if (oldDevice.name != newDevice.name) {
|
||||
// // 如果实例有取消选择函数并且被点击,则执行取消选中函数
|
||||
// if (oldDevice && oldDevice.model && oldDevice.mouseleave) {
|
||||
// // 视图数据设置点击标志,同步执行
|
||||
// oldDevice['selected'] = false;
|
||||
// oldDevice['mouseleave'](e);
|
||||
// }
|
||||
// 如果之前和当前选中的实例不一致
|
||||
if (oldDevice != newDevice) {
|
||||
// 如果实例有取消选择函数并且被点击,则执行取消选中函数
|
||||
if (oldDevice.mouseEvent && oldDevice.mouseEvent.mouseout) {
|
||||
// 视图数据设置点击标志,同步执行
|
||||
oldDevice.mouseEvent['down'] = false;
|
||||
oldDevice.mouseEvent['mouseout'](e);
|
||||
}
|
||||
|
||||
// // 如果实例有选中函数并且被点击,则执行选中函数
|
||||
// if (newDevice && newDevice.model && newDevice.mouseenter) {
|
||||
// const model = store.getters['map/getDeviceByCode'](newDevice.name) || {};
|
||||
// Object.assign(model, { _selected: true });
|
||||
// }
|
||||
// }
|
||||
// 如果实例有选中函数并且被点击,则执行选中函数
|
||||
if (e.which == 3 && newDevice.mouseEvent && newDevice.mouseEvent.mouseover) {
|
||||
newDevice.mouseEvent['down'] = true;
|
||||
newDevice.mouseEvent['mouseover'](e);
|
||||
}
|
||||
}
|
||||
|
||||
// // 保存当前实例到全局
|
||||
// this._zr.curEvent = e;
|
||||
// }
|
||||
// 保存当前实例到全局
|
||||
this.$zr.curEvent = e;
|
||||
}
|
||||
|
||||
// return newEm;
|
||||
return newEm;
|
||||
}
|
||||
|
||||
updateDatazoom(zoom) {
|
||||
|
@ -13,10 +13,10 @@ export default class ImageControl extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = model.zIndex || 1;
|
||||
this._create();
|
||||
this.create();
|
||||
}
|
||||
|
||||
_create() {
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.image = new Image({
|
||||
zlevel: this.zlevel,
|
||||
|
@ -5,10 +5,10 @@ export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.down = true;
|
||||
this._create();
|
||||
this.down = false;
|
||||
this.create();
|
||||
}
|
||||
_create() {
|
||||
create() {
|
||||
this.text = new Text({
|
||||
_subType: 'Text',
|
||||
zlevel: this.device.zlevel,
|
||||
@ -19,7 +19,7 @@ export default class EMouse extends Group {
|
||||
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30,
|
||||
fontWeight: 'normal',
|
||||
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
|
||||
fontFamily: this.device.style.LcControl.mouseOverStyle.textFontFormat,
|
||||
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
|
||||
text: this.device.model.name,
|
||||
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
|
||||
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,
|
||||
@ -34,7 +34,9 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseoutText(e) {
|
||||
this.text.hide();
|
||||
if (!this.down) {
|
||||
this.text.hide();
|
||||
}
|
||||
}
|
||||
|
||||
mouseoverArc(e) {
|
||||
@ -44,9 +46,15 @@ export default class EMouse extends Group {
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
mouseoutArc(e) {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
if (!this.down) {
|
||||
this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
this.mouseoutText(e);
|
||||
this.mouseoutArc(e);
|
||||
}
|
||||
}
|
||||
|
@ -38,9 +38,9 @@ export default class LcControl extends Group {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + this.style.LcControl.lamp.radiusR + this.style.LcControl.text.distance,
|
||||
fontWeight: 'normal',
|
||||
fontWeight: this.style.LcControl.text.fontWeight,
|
||||
fontSize: this.style.LcControl.text.fontSize,
|
||||
fontFamily: this.style.textFontFormat,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
@ -57,7 +57,6 @@ export default class LcControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
|
@ -5,10 +5,10 @@ export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.down = true;
|
||||
this._create();
|
||||
this.down = false;
|
||||
this.create();
|
||||
}
|
||||
_create() {
|
||||
create() {
|
||||
this.text = new Text({
|
||||
_subType: 'Text',
|
||||
zlevel: this.device.zlevel,
|
||||
@ -34,7 +34,9 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseoutText(e) {
|
||||
this.text.hide();
|
||||
if (!this.down) {
|
||||
this.text.hide();
|
||||
}
|
||||
}
|
||||
|
||||
mouseoverArc(e) {
|
||||
@ -44,9 +46,15 @@ export default class EMouse extends Group {
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
mouseoutArc(e) {
|
||||
this.device.control.setControlColor(this.device.style.LimitControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
if (!this.down) {
|
||||
this.device.control.setControlColor(this.device.style.LimitControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
this.mouseoutText(e);
|
||||
this.mouseoutArc(e);
|
||||
}
|
||||
}
|
||||
|
@ -38,9 +38,9 @@ export default class LimitControl extends Group {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + this.style.LimitControl.lamp.radiusR + this.style.LimitControl.text.distance,
|
||||
fontWeight: 'normal',
|
||||
fontWeight: this.style.LimitControl.text.fontWeight,
|
||||
fontSize: this.style.LimitControl.text.fontSize,
|
||||
fontFamily: this.style.textFontFormat,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
@ -57,7 +57,6 @@ export default class LimitControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
|
@ -49,7 +49,6 @@ export default class Line2 extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
this.setLineType(model.type);
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,6 @@ class Link extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
tipBasePoint() {
|
||||
|
@ -1,41 +1,42 @@
|
||||
import Path from 'zrender/src/graphic/Path';
|
||||
|
||||
// 成都三号线 折返进路箭头
|
||||
// 成都三号线 折返进路
|
||||
export const EBackArrow = Path.extend({
|
||||
type: 'EBackArrow',
|
||||
shape: {
|
||||
points: null
|
||||
},
|
||||
buildPath: function (ctx, shape) {
|
||||
// console.log(shape, 111);
|
||||
const points = shape.points;
|
||||
var r = Math.abs(points[1][1] - points[2][1]) / 2;
|
||||
var x = Math.abs(points[1][0] + points[2][0]) / 2;
|
||||
var y = Math.abs(points[1][1] + points[2][1]) / 2;
|
||||
ctx.moveTo(points[0][0], points[0][1]);
|
||||
ctx.lineTo(points[1][0], points[1][1]);
|
||||
|
||||
shape.counterclockwise && ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
shape.counterclockwise || ctx.arc(x, y, r, Math.PI / 2, -Math.PI / 2, true);
|
||||
|
||||
ctx.moveTo(points[2][0], points[2][1]);
|
||||
ctx.lineTo(points[3][0], points[3][1]);
|
||||
|
||||
ctx.closePath();
|
||||
|
||||
const points1 = shape.points;
|
||||
var r1 = Math.abs(points1[1][1] - points1[2][1]) / 2;
|
||||
var x1 = Math.abs(points1[1][0] + points1[2][0]) / 2;
|
||||
var y1 = Math.abs(points1[1][1] + points1[2][1]) / 2;
|
||||
ctx.moveTo(points1[0][0], points1[0][1]);
|
||||
ctx.lineTo(points1[1][0], points1[1][1]);
|
||||
|
||||
shape.counterclockwise && ctx.arc(x1, y1, r1, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
shape.counterclockwise || ctx.arc(x1, y1, r1, Math.PI / 2, -Math.PI / 2, true);
|
||||
|
||||
ctx.moveTo(points1[2][0], points1[2][1]);
|
||||
ctx.lineTo(points1[3][0], points1[3][1]);
|
||||
|
||||
ctx.closePath();
|
||||
var r = shape.height;
|
||||
var x = points.x + shape.drict * shape.width / 2;
|
||||
var y = points.y;
|
||||
ctx.moveTo(points.x - shape.drict * shape.width, points.y + shape.height);
|
||||
ctx.lineTo(points.x + shape.drict * shape.width / 2, points.y + shape.height);
|
||||
if (shape.drict) {
|
||||
ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, true);
|
||||
} else {
|
||||
ctx.arc(x, y, r, Math.PI / 2, Math.PI * 3 / 2, false);
|
||||
}
|
||||
ctx.moveTo(points.x + shape.drict * shape.width / 2, points.y - shape.height);
|
||||
ctx.lineTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height);
|
||||
}
|
||||
});
|
||||
|
||||
// 箭头
|
||||
export const EBackArrowTriangle = Path.extend({
|
||||
type: 'EBackArrowTriangle',
|
||||
shape: {
|
||||
points: null
|
||||
},
|
||||
buildPath: function (ctx, shape) {
|
||||
const points = shape.points;
|
||||
ctx.moveTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height - 3);
|
||||
if (shape.drict) {
|
||||
ctx.lineTo(points.x - shape.drict * shape.width, points.y - shape.height);
|
||||
} else {
|
||||
ctx.lineTo(points.x - shape.drict * shape.width, points.y - shape.height);
|
||||
}
|
||||
ctx.lineTo(points.x - shape.drict * (shape.width - 5), points.y - shape.height + 3);
|
||||
}
|
||||
});
|
||||
|
91
src/jmap/shape/Section/ELimitName.js
Normal file
91
src/jmap/shape/Section/ELimitName.js
Normal file
@ -0,0 +1,91 @@
|
||||
// import Path from 'zrender/src/graphic/Path';
|
||||
|
||||
// 成都三号线 临时限速名称显示
|
||||
// export const ELimitName = Path.extend({
|
||||
// type: 'ELimitName',
|
||||
// shape: {
|
||||
// points: null
|
||||
// },
|
||||
// buildPath: function (ctx, shape) {
|
||||
// const points = shape.points;
|
||||
// const y = points.y - 15;
|
||||
// ctx.moveTo(points.x, y);
|
||||
// ctx.lineTo(points.x - shape.drict * shape.style.Section.speedLimit.drogueWidth, y);
|
||||
// ctx.lineTo(points.x - shape.drict * (shape.style.Section.speedLimit.drogueWidth + 5), y - 5);
|
||||
// ctx.lineTo(points.x - shape.drict * shape.style.Section.speedLimit.drogueWidth, y - 10);
|
||||
// ctx.lineTo(points.x, y - 10);
|
||||
// ctx.lineTo(points.x, y);
|
||||
// }
|
||||
// });
|
||||
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
|
||||
export default class ELimitName extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.z;
|
||||
this.create(model);
|
||||
}
|
||||
|
||||
create(model) {
|
||||
const rectW = model.style.Section.speedLimit.drogueWidth;
|
||||
const rectH = model.style.Section.speedLimit.drogueHeight;
|
||||
this.add(new Polygon({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 9,
|
||||
shape: {
|
||||
points: [
|
||||
[model.x, model.y],
|
||||
[model.x - model.drict * rectW, model.y],
|
||||
[model.x - model.drict * (rectW + rectH / 2), model.y - rectH / 2],
|
||||
[model.x - model.drict * rectW, model.y - rectH],
|
||||
[model.x, model.y - rectH]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
fill: model.style.Section.speedLimit.nameBackground
|
||||
}
|
||||
}));
|
||||
|
||||
// 公里标内容
|
||||
this.add(new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 10,
|
||||
style: {
|
||||
x: model.x - model.drict * 2,
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: model.style.Section.speedLimit.nameNumberFontSize,
|
||||
fontFamily: model.style.fontFamily,
|
||||
text: '15',
|
||||
textFill: model.style.Section.speedLimit.nameNumberColor,
|
||||
textAlign: model.drict == -1 ? 'left' : 'right',
|
||||
textPosition: model.style.Section.text.textPosition || 'inside',
|
||||
textVerticalAlign: 'bottom'
|
||||
}
|
||||
}));
|
||||
|
||||
// 公里值
|
||||
this.add(new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 10,
|
||||
style: {
|
||||
x: model.x,
|
||||
y: model.y + 12,
|
||||
fontWeight: 'normal',
|
||||
fontSize: model.style.Section.speedLimit.kilometerFontSize,
|
||||
fontFamily: model.style.fontFamily,
|
||||
text: '17.981km',
|
||||
textFill: model.style.Section.speedLimit.kilometerColor,
|
||||
textAlign: model.drict == -1 ? 'left' : 'right',
|
||||
textPosition: model.style.Section.text.textPosition || 'inside',
|
||||
textVerticalAlign: 'bottom'
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
@ -2,17 +2,18 @@ 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) {
|
||||
constructor(device, code) {
|
||||
super();
|
||||
this.down = false;
|
||||
this.device = device;
|
||||
this.code = code;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
if (this.device.sectionText) {
|
||||
const rect = this.device.sectionText.getBoundingRect();
|
||||
if (this.device.name) {
|
||||
const rect = this.device.name.getBoundingRect();
|
||||
if (!this.device.isSwitchSection) {
|
||||
this.sectionTextBorder = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
@ -60,7 +61,7 @@ class EMouse extends Group {
|
||||
textFill: this.device.style.Section.mouseOverStyle.textShadowColor, // 黄色
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
textFont: 'bold ' + (fontSize + 1) + 'px ' + this.device.style.textFontFormat
|
||||
textFont: 'bold ' + (fontSize + 1) + 'px ' + this.device.style.fontFamily
|
||||
}
|
||||
});
|
||||
this.add(this.sectionTextShadow);
|
||||
@ -84,36 +85,69 @@ class EMouse extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
mouseover(subType) {
|
||||
// 显示车次窗
|
||||
if (this.device.model.isSwitchSection) {
|
||||
if (subType == 'Text') {
|
||||
this.sectionTextShadow && this.sectionTextShadow.show();
|
||||
} else {
|
||||
// 道岔区段
|
||||
const refSwitch = this.device.model.switch.instance;
|
||||
refSwitch && refSwitch.mouseEvent.mouseover();
|
||||
// const refSwitch = Vue.prototype.$jlmap.mapDevice[this.device.model.relSwitchCode].instance;
|
||||
// refSwitch && refSwitch.mouseEvent.mouseover();
|
||||
getInstanceByCode(code) {
|
||||
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
|
||||
}
|
||||
|
||||
mouseover(e) {
|
||||
debugger;
|
||||
if (this.device.model.isSwitchSection && this.device.model.relSwitchCode) {
|
||||
const instance = this.getInstanceByCode(this.device.model.relSwitchCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseover) {
|
||||
instance.mouseEvent.mouseover(e);
|
||||
}
|
||||
} else {
|
||||
this.TextName && this.TextName.show();
|
||||
this.sectionTextBorder && this.sectionTextBorder.show();
|
||||
this.lineBorder && this.lineBorder.show();
|
||||
const instance = this.getInstanceByCode(this.device.model.trainWindowCode);
|
||||
if (instance && instance.mouseEnter) {
|
||||
instance.mouseEnter(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
mouseout() {
|
||||
this.sectionTextShadow && this.sectionTextShadow.hide();
|
||||
if (this.device.model.isSwitchSection) {
|
||||
// 道岔区段
|
||||
const refSwitch = this.device.model.switch.instance;
|
||||
refSwitch && refSwitch.mouseEvent.mouseout();
|
||||
// const refSwitch = Vue.prototype.$jlmap.mapDevice[this.device.model.relSwitchCode].instance;
|
||||
// refSwitch && refSwitch.mouseEvent.mouseout();
|
||||
} else {
|
||||
this.TextName && this.TextName.hide();
|
||||
this.sectionTextBorder && this.sectionTextBorder.hide();
|
||||
this.lineBorder && this.lineBorder.hide();
|
||||
|
||||
mouseout(e) {
|
||||
if (!this.down) {
|
||||
this.sectionTextShadow && this.sectionTextShadow.hide();
|
||||
if (this.device.model.isSwitchSection && this.device.model.relSwitchCode) {
|
||||
const instance = this.getInstanceByCode(this.device.model.relSwitchCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
||||
instance.mouseEvent.mouseout(e);
|
||||
}
|
||||
} else {
|
||||
this.TextName && this.TextName.hide();
|
||||
this.sectionTextBorder && this.sectionTextBorder.hide();
|
||||
this.lineBorder && this.lineBorder.hide();
|
||||
const instance = this.getInstanceByCode(this.device.model.trainWindowCode);
|
||||
if (instance && instance.mouseLeave) {
|
||||
instance.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mouseEnter(e) {
|
||||
this.TextName && this.TextName.show();
|
||||
this.sectionTextBorder && this.sectionTextBorder.show();
|
||||
this.lineBorder && this.lineBorder.show();
|
||||
if (this.device.model.isSwitchSection && this.device.model.relSwitchCode) {
|
||||
const instance = this.getInstanceByCode(this.device.model.relSwitchCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseEnter) {
|
||||
instance.mouseEvent.mouseEnter(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mouseLeave(e) {
|
||||
this.TextName && this.TextName.hide();
|
||||
this.sectionTextBorder && this.sectionTextBorder.hide();
|
||||
this.lineBorder && this.lineBorder.hide();
|
||||
if (this.device.model.isSwitchSection && this.device.model.relSwitchCode) {
|
||||
const instance = this.getInstanceByCode(this.device.model.relSwitchCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseLeave) {
|
||||
instance.mouseEvent.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ export default class ESeparator extends Group {
|
||||
super();
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = model.style.Section.separator.z || 6;
|
||||
this.style = model.style;
|
||||
this.z = 6;
|
||||
this.setType();
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,8 @@ import ELines from './ELines'; // 创建多线条 曲线 (私有)
|
||||
import ESeparator from './ESeparator'; // 分隔符 (私有)
|
||||
import EMouse from './EMouse';
|
||||
import { EAxle } from './EAxle'; // 创建计轴 (私有)
|
||||
import { EBackArrow } from './EBackArrow'; // 折返进路箭头
|
||||
import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路箭头
|
||||
import ELimitName from './ELimitName'; // 成都三号线 限速名称
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
|
||||
/** 区段*/
|
||||
@ -35,7 +36,7 @@ export default class Section extends Group {
|
||||
this.createSection(); // 创建区段
|
||||
this.creatRelease(); // 创建延时释放
|
||||
this.createSeparator(); // 创建分隔符
|
||||
this.createTurnBack(); // 创建成都三号线 折返箭头
|
||||
this.createTurnBack(); // 创建成都三号线 折返箭头
|
||||
if (model.type === '01') {
|
||||
this.createAxles(); // 创建计轴
|
||||
}
|
||||
@ -45,9 +46,10 @@ export default class Section extends Group {
|
||||
createMouseEvent() {
|
||||
// 鼠标事件
|
||||
if (this.style.Section.mouseOverStyle) {
|
||||
this.mouseEvent = new EMouse(this);
|
||||
// console.log(this.model.relSwitchCode);
|
||||
this.mouseEvent = new EMouse(this, this.model.relSwitchCode);
|
||||
this.add(this.mouseEvent);
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e.target._subType); });
|
||||
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
|
||||
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
|
||||
}
|
||||
}
|
||||
@ -70,39 +72,68 @@ export default class Section extends Group {
|
||||
this.add(this.section);
|
||||
}
|
||||
|
||||
// 折返箭头
|
||||
createTurnBack() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
if (model.isReentryTrack && style.Section.shuttleBack) {
|
||||
const radius = 3;
|
||||
model.drict = 1; // 箭头朝向 (是折返轨加一个方向选择) 目前在区段右边
|
||||
const width = style.Section.line.width * 2;
|
||||
const height = style.Section.line.width * 1;
|
||||
const turnBackDistance = style.Section.shuttleBack.distance + radius * 4;
|
||||
|
||||
const points = model.points;
|
||||
let x = -model.drict * model.width * 1.2;
|
||||
let y = -model.turnBackDistance;
|
||||
const points = model.points;
|
||||
let x = -model.drict * width * 1.2;
|
||||
let y = -turnBackDistance;
|
||||
|
||||
if (model.drict < 0) {
|
||||
x += points[0].x;
|
||||
y += points[0].y;
|
||||
} else {
|
||||
x += points[points.length - 1].x;
|
||||
y += points[points.length - 1].y;
|
||||
}
|
||||
|
||||
this.turnBack = new EBackArrow({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 10,
|
||||
shape: {
|
||||
counterclockwise: model.drict == -1,
|
||||
points: [[x - model.drict * (model.width - 1), y + model.height],
|
||||
[x + model.drict * model.width / 2, y + model.height],
|
||||
[x + model.drict * model.width / 2, y - model.height],
|
||||
[x - model.drict * (model.width - 3), y - model.height]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.separator.width,
|
||||
stroke: style.Section.separator.color
|
||||
if (model.drict < 0) {
|
||||
x += points[0].x;
|
||||
y += points[0].y;
|
||||
} else {
|
||||
x += points[points.length - 1].x;
|
||||
y += points[points.length - 1].y;
|
||||
}
|
||||
});
|
||||
this.add(this.turnBack);
|
||||
|
||||
this.turnBack = new EBackArrow({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 10,
|
||||
shape: {
|
||||
drict: model.drict,
|
||||
width: width,
|
||||
height: height,
|
||||
points: {
|
||||
x: x,
|
||||
y: y
|
||||
}
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.separator.width,
|
||||
stroke: style.Section.separator.color,
|
||||
fill: 'rgba(0, 0, 0, 0)'
|
||||
}
|
||||
});
|
||||
this.turnBackriangle = new EBackArrowTriangle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 10,
|
||||
shape: {
|
||||
drict: model.drict,
|
||||
width: width,
|
||||
height: height,
|
||||
points: {
|
||||
x: x,
|
||||
y: y
|
||||
}
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.separator.width,
|
||||
stroke: style.Section.separator.color,
|
||||
fill: style.Section.separator.color
|
||||
}
|
||||
});
|
||||
this.add(this.turnBack);
|
||||
this.add(this.turnBackriangle);
|
||||
}
|
||||
}
|
||||
|
||||
// 创建延时释放 (需要在创建)
|
||||
@ -131,8 +162,8 @@ export default class Section extends Group {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
|
||||
let x = traingle.drictx * (style.Section.speedLimit.Distance) * traingle.getSinRate();
|
||||
let y = traingle.dricty * (style.Section.speedLimit.Distance) * traingle.getCosRate();
|
||||
let x = traingle.drictx * (style.Section.speedLimit.distance) * traingle.getSinRate();
|
||||
let y = traingle.dricty * (style.Section.speedLimit.distance) * traingle.getCosRate();
|
||||
if (x == Infinity) { x = 0; }
|
||||
if (y == Infinity) { y = 0; }
|
||||
if (!this.speedLimitLeft && !this.speedLimitRight) {
|
||||
@ -158,6 +189,28 @@ export default class Section extends Group {
|
||||
isCurve: model.isCurve, // 是否曲线
|
||||
points: model.points
|
||||
});
|
||||
if (style.Section.speedLimit.nameShow) {
|
||||
// 开头 起点位置
|
||||
this.speedLimitNameLeft = new ELimitName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 10,
|
||||
drict: -1,
|
||||
x: model.points[0].x,
|
||||
y: model.points[0].y - 15,
|
||||
style: style
|
||||
});
|
||||
// 终点位置
|
||||
this.speedLimitNameRight = new ELimitName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 10,
|
||||
drict: 1,
|
||||
x: model.points[model.points.length - 1].x,
|
||||
y: model.points[model.points.length - 1].y - 15,
|
||||
style: style
|
||||
});
|
||||
this.add(this.speedLimitNameLeft);
|
||||
this.add(this.speedLimitNameRight);
|
||||
}
|
||||
}
|
||||
this.add(this.speedLimitLeft);
|
||||
this.add(this.speedLimitRight);
|
||||
@ -170,152 +223,167 @@ export default class Section extends Group {
|
||||
|
||||
if (model && style) {
|
||||
// 计算区段坐标位置
|
||||
const x = Math.min(model.points[0].x, model.points[model.points.length - 1].x) + Math.abs(model.points[model.points.length - 1].x - model.points[0].x) / 2 + model.namePosition.x;
|
||||
const y = Math.min(model.points[0].y, model.points[model.points.length - 1].y) + Math.abs(model.points[model.points.length - 1].y - model.points[0].y) / 2 + model.namePosition.y;
|
||||
const x = Math.min(model.points[0].x, model.points[model.points.length - 1].x) + Math.abs(model.points[model.points.length - 1].x - model.points[0].x) / 2;
|
||||
const y = Math.min(model.points[0].y, model.points[model.points.length - 1].y) + Math.abs(model.points[model.points.length - 1].y - model.points[0].y) / 2;
|
||||
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
|
||||
const drict = model.trainPosType != '01' ? 1 : -1;
|
||||
/** 区段名称*/
|
||||
if (model.nameShow) {
|
||||
let tempx = x;
|
||||
let tempy = y;
|
||||
|
||||
if (style.Section.text.position == 1) {
|
||||
tempy = tempy - style.Section.text.fontSize;
|
||||
} else if (style.Section.text.position == -1) {
|
||||
tempy = tempy + style.Section.text.fontSize;
|
||||
} else if (style.Section.text.position == 0) {
|
||||
// 根据列车上下行进行坐标偏移
|
||||
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
|
||||
if (model.trainPosType === '01') {
|
||||
tempy -= (style.Section.line.width * 1.5);
|
||||
if (model.type === '01') {
|
||||
tempy += traingle.getCos(style.Section.text.fontSize * 0.8 + style.Section.text.distance) - style.Section.text.fontSize * 2;
|
||||
}
|
||||
} else {
|
||||
tempy += (style.Section.line.width * 1.5);
|
||||
if (model.type === '01') {
|
||||
tempy -= traingle.getCos(style.Section.text.fontSize * 0.8 + style.Section.text.distance) - style.Section.text.fontSize * 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (model.type !== '03') {
|
||||
// 计算文字和物理区段的距离
|
||||
// 如果不是逻辑区段,让名称和区段保持点距离
|
||||
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
|
||||
if (model.type === '01') {
|
||||
tempx += traingle.getSin(style.Section.text.fontSize * 0.8 + style.Section.text.distance);
|
||||
}
|
||||
}
|
||||
|
||||
// 创建区段名称
|
||||
const fontSize = model.type == '02' ? style.Section.text.fontSize + 2: style.Section.text.fontSize;
|
||||
this.name = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
style: this.style,
|
||||
silent: false,
|
||||
x: tempx,
|
||||
y: tempy,
|
||||
fontWeight: 'normal',
|
||||
fontSize: fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
text: model.name,
|
||||
textFill: style.Section.text.fontColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
textPosition: style.Section.text.textPosition,
|
||||
textVerticalAlign: style.Section.text.textVerticalAlign
|
||||
});
|
||||
if (model.type !== '03') {
|
||||
if (model.type == '02') {
|
||||
const opposite = style.Section.logicText.opposite ? -1: 1;
|
||||
tempx += traingle.getSin(style.Section.logicText.distance);
|
||||
tempy += traingle.getCos(style.Section.logicText.distance) * (style.Section.logicText.position || opposite * drict);
|
||||
this.name = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
style: this.style,
|
||||
silent: false,
|
||||
x: tempx + model.namePosition.x,
|
||||
y: tempy + model.namePosition.y,
|
||||
fontWeight: style.Section.logicText.fontWeight,
|
||||
fontSize: style.Section.logicText.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.Section.logicText.fontColor,
|
||||
textAlign: style.Section.logicText.textAlign,
|
||||
textPosition: style.Section.logicText.textPosition,
|
||||
textVerticalAlign: style.Section.logicText.textVerticalAlign
|
||||
});
|
||||
} else {
|
||||
const opposite = style.Section.text.opposite ? -1: 1;
|
||||
tempx += traingle.getSin(style.Section.text.distance);
|
||||
tempy += traingle.getCos(style.Section.text.distance) * (style.Section.text.position || opposite * drict);
|
||||
this.name = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
style: this.style,
|
||||
silent: false,
|
||||
x: tempx + model.namePosition.x,
|
||||
y: tempy + model.namePosition.y,
|
||||
fontWeight: style.Section.text.fontWeight,
|
||||
fontSize: style.Section.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.Section.text.fontColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
textPosition: style.Section.text.textPosition,
|
||||
textVerticalAlign: style.Section.text.textVerticalAlign
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.name = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
style: this.style,
|
||||
silent: false,
|
||||
x: tempx + model.namePosition.x,
|
||||
y: tempy + model.namePosition.y + style.Section.text.distance * drict,
|
||||
fontWeight: style.Section.text.fontWeight,
|
||||
fontSize: style.Section.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.Section.text.fontColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
textPosition: style.Section.text.textPosition,
|
||||
textVerticalAlign: style.Section.text.textVerticalAlign
|
||||
});
|
||||
}
|
||||
this.add(this.name);
|
||||
}
|
||||
|
||||
/** 站台轨名称*/
|
||||
if (model.isStandTrack && model.standTrackNameShow) {
|
||||
let tempx = x;
|
||||
let tempy = y;
|
||||
|
||||
// 计算文字和物理区段的距离
|
||||
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
|
||||
tempx += traingle.getSin(style.Section.text.distance);
|
||||
tempy += traingle.getCos(style.Section.text.distance);
|
||||
|
||||
// 创建站台轨名称
|
||||
const opposite = style.Section.standText.opposite ? -1: 1;
|
||||
const tempx = x + traingle.getSin(style.Section.standText.distance);
|
||||
const tempy = y + traingle.getCos(style.Section.standText.distance) * (style.Section.standText.position || opposite * drict);
|
||||
this.standTrackText = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
silent: false,
|
||||
x: tempx + model.standTrackNamePosition.x,
|
||||
y: tempy + model.standTrackNamePosition.y,
|
||||
fontWeight: 'bold',
|
||||
fontSize: style.Section.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontWeight: style.Section.standText.fontWeight,
|
||||
fontSize: style.Section.standText.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.standTrackName,
|
||||
textFill: style.Section.text.fontColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
textPosition: style.Section.text.textPosition,
|
||||
style: this.style
|
||||
textFill: style.Section.standText.fontColor,
|
||||
textAlign: style.Section.standText.textAlign,
|
||||
textPosition: style.Section.standText.textPosition,
|
||||
textVerticalAlign: style.Section.standText.textVerticalAlign
|
||||
});
|
||||
// 添加视图
|
||||
this.add(this.standTrackText);
|
||||
}
|
||||
|
||||
/** 折返轨名称*/
|
||||
if (model.isReentryTrack && model.reentryTrackNameShow) {
|
||||
// 创建折返轨名称
|
||||
const opposite = style.Section.reentryText.opposite ? -1: 1;
|
||||
const tempx = x + traingle.getSin(style.Section.reentryText.distance);
|
||||
const tempy = y + traingle.getCos(style.Section.reentryText.distance) * (style.Section.reentryText.position || opposite * drict);
|
||||
this.reentryTrackText = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
x: x + model.reentryTrackNamePosition.x,
|
||||
y: y + model.reentryTrackNamePosition.y + style.Section.text.distance + style.Section.text.fontSize,
|
||||
fontWeight: 'bold',
|
||||
fontSize: style.Section.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
silent: false,
|
||||
x: tempx + model.reentryTrackNamePosition.x,
|
||||
y: tempy + model.reentryTrackNamePosition.y,
|
||||
fontWeight: style.Section.reentryText.fontWeight,
|
||||
fontSize: style.Section.reentryText.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.reentryTrackName,
|
||||
textFill: style.Section.text.fontColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
textPosition: style.Section.text.textPosition,
|
||||
style: this.style
|
||||
textFill: style.Section.reentryText.fontColor,
|
||||
textAlign: style.Section.reentryText.textAlign,
|
||||
textPosition: style.Section.reentryText.textPosition,
|
||||
textVerticalAlign: style.Section.reentryText.textVerticalAlign
|
||||
});
|
||||
// 添加视图
|
||||
this.add(this.reentryTrackText);
|
||||
}
|
||||
|
||||
/** 转换轨名称*/
|
||||
if (model.isTransferTrack && model.transferTrackNameShow) {
|
||||
// 转换轨名称
|
||||
const opposite = style.Section.transferText.opposite ? -1: 1;
|
||||
const tempx = x + traingle.getSin(style.Section.transferText.distance);
|
||||
const tempy = y + traingle.getCos(style.Section.transferText.distance) * (style.Section.transferText.position || opposite * drict);
|
||||
this.transferTrackText = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
x: x + model.transferTrackNamePosition.x,
|
||||
y: y + model.transferTrackNamePosition.y + style.Section.text.distance + style.Section.text.fontSize * 2,
|
||||
fontWeight: 'bold',
|
||||
fontSize: style.Section.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
silent: false,
|
||||
x: tempx + model.transferTrackNamePosition.x,
|
||||
y: tempy + model.transferTrackNamePosition.y,
|
||||
fontWeight: style.Section.transferText.fontWeight,
|
||||
fontSize: style.Section.transferText.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.transferTrackName,
|
||||
textFill: style.Section.text.fontColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
textPosition: style.Section.text.textPosition,
|
||||
style: this.style
|
||||
textFill: style.Section.transferText.fontColor,
|
||||
textAlign: style.Section.transferText.textAlign,
|
||||
textPosition: style.Section.transferText.textPosition,
|
||||
textVerticalAlign: style.Section.transferText.textVerticalAlign
|
||||
});
|
||||
// 添加视图
|
||||
this.add(this.transferTrackText);
|
||||
}
|
||||
|
||||
/** 目的码名称*/
|
||||
if (model.destinationCode && model.destinationCodeShow) {
|
||||
// 转换轨名称
|
||||
const opposite = style.Section.destinationText.opposite ? -1: 1;
|
||||
const tempx = x + traingle.getSin(style.Section.destinationText.distance);
|
||||
const tempy = y + traingle.getCos(style.Section.destinationText.distance) * (style.Section.destinationText.position || opposite * drict);
|
||||
this.destinationText = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
x: x + model.destinationCodePoint.x,
|
||||
y: y + model.destinationCodePoint.y,
|
||||
fontWeight: 'bold',
|
||||
fontSize: style.Section.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
silent: false,
|
||||
x: tempx + model.destinationCodePoint.x,
|
||||
y: tempy + model.destinationCodePoint.y,
|
||||
fontWeight: style.Section.destinationText.fontWeight,
|
||||
fontSize: style.Section.destinationText.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.destinationCode,
|
||||
textFill: style.Section.text.destinationTextColor,
|
||||
textAlign: style.Section.text.textAlign,
|
||||
textPosition: style.Section.text.textPosition,
|
||||
style: this.style
|
||||
textFill: style.Section.destinationText.fontColor,
|
||||
textAlign: style.Section.destinationText.textAlign,
|
||||
textPosition: style.Section.destinationText.textPosition,
|
||||
textVerticalAlign: style.Section.destinationText.textVerticalAlign
|
||||
});
|
||||
// 添加视图
|
||||
this.add(this.destinationText);
|
||||
}
|
||||
}
|
||||
@ -661,7 +729,6 @@ export default class Section extends Group {
|
||||
|
||||
/** 设置状态*/
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
this.recover();
|
||||
switch (model.status) {
|
||||
case '00': /** 未定义*/
|
||||
|
@ -7,7 +7,7 @@ export default class EMouse extends Group {
|
||||
this.device = device;
|
||||
this.zlevel = device.zlevel;
|
||||
this.style = device.style;
|
||||
this.down = true;
|
||||
this.down = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -52,8 +52,13 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
this.nameRect.hide();
|
||||
this.lampRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
if (!this.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,6 +1,6 @@
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import { arrows } from '../utils/ShapePoints';
|
||||
import { arrow } from '../utils/ShapePoints';
|
||||
|
||||
class ESigPass extends Group {
|
||||
constructor(model) {
|
||||
@ -14,15 +14,15 @@ class ESigPass extends Group {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const rotation = model.drict != 1? 0 : Math.PI;
|
||||
const point = arrows(model.x, model.y, style.Signal.signalAutoWidth, style.Signal.lamp.radiusR * 0.8);
|
||||
|
||||
this.isNew = true;
|
||||
this.arrows = new Polygon({
|
||||
this.arrow = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
origin: [model.x, model.y],
|
||||
rotation: rotation,
|
||||
shape: {
|
||||
points: point
|
||||
points: arrow(model.x, model.y, style.Signal.auto.width, style.Signal.lamp.radiusR * 0.8)
|
||||
},
|
||||
style: {
|
||||
stroke: model.stroke,
|
||||
@ -30,20 +30,20 @@ class ESigPass extends Group {
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
this.add(this.arrows);
|
||||
this.add(this.arrow);
|
||||
}
|
||||
}
|
||||
|
||||
// 停止动画
|
||||
animationRecover() {
|
||||
this.create();
|
||||
this.arrows.stopAnimation(false);
|
||||
this.arrow.stopAnimation(false);
|
||||
}
|
||||
|
||||
// 箭头颜色
|
||||
setColor(color) {
|
||||
this.create();
|
||||
this.arrows.setStyle('fill', color);
|
||||
this.arrow.setStyle('fill', color);
|
||||
}
|
||||
|
||||
// 箭头闪烁
|
||||
@ -51,20 +51,20 @@ class ESigPass extends Group {
|
||||
this.create();
|
||||
|
||||
const style = this.model.style;
|
||||
const fill = this.arrows.style.Signal.fill;
|
||||
const fill = this.arrow.style.fill;
|
||||
|
||||
this.arrows.animate(true)
|
||||
.when(1000, { fill: style.backgroundColor, stroke: style.style.backgroundColor })
|
||||
.when(2000, { fill: fill, stroke: style.style.Signal.sidelineColor })
|
||||
.when(3000, { fill: style.style.backgroundColor, stroke: style.style.backgroundColor })
|
||||
.when(4000, { fill: fill, stroke: style.style.Signal.sidelineColor })
|
||||
this.arrow.animateStyle(true)
|
||||
.when(1000, { fill: style.backgroundColor, stroke: style.backgroundColor })
|
||||
.when(2000, { fill: fill, stroke: style.sidelineColor })
|
||||
.when(3000, { fill: style.backgroundColor, stroke: style.backgroundColor })
|
||||
.when(4000, { fill: fill, stroke: style.sidelineColor })
|
||||
.start();
|
||||
}
|
||||
|
||||
// 隐藏
|
||||
hide() {
|
||||
this.create();
|
||||
this.arrows.hide();
|
||||
this.arrow.hide();
|
||||
}
|
||||
|
||||
// 显示
|
||||
|
@ -27,7 +27,7 @@ class ESigLamp extends Group {
|
||||
style: {
|
||||
lineWidth: style.Signal.lamp.borderWidth,
|
||||
fill: style.backgroundColor,
|
||||
stroke: style.Signal.post.standardColor
|
||||
stroke: style.Signal.lamp.borderColor
|
||||
}
|
||||
});
|
||||
|
||||
@ -78,7 +78,11 @@ class ESigLamp extends Group {
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.lamp.setStyle({ stroke: color, fill: color });
|
||||
if (this.model.style.Signal.lamp.borderVariable) {
|
||||
this.lamp.setStyle({ fill: color, stroke: color });
|
||||
} else {
|
||||
this.lamp.setStyle({ fill: color });
|
||||
}
|
||||
}
|
||||
|
||||
setBorderColor(color) {
|
||||
|
@ -17,6 +17,8 @@ class ESigName extends Group {
|
||||
z: model.z,
|
||||
silent: model.silent,
|
||||
style: {
|
||||
textBorderColor: 'red',
|
||||
textBorderWidth: 0,
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
fontWeight: model.fontWeight,
|
||||
|
@ -80,9 +80,9 @@ class Signal extends Group {
|
||||
x: sigNameX,
|
||||
y: sigNameY,
|
||||
text: model.name,
|
||||
fontWeight: 'normal',
|
||||
fontWeight: style.Signal.text.fontWeight,
|
||||
fontSize: style.Signal.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
textFill: style.Signal.text.defaultColor,
|
||||
textAlign: textAlign,
|
||||
textVerticalAlign: textVerticalAlign
|
||||
@ -113,8 +113,8 @@ class Signal extends Group {
|
||||
drict: drict,
|
||||
x: sigAutoX,
|
||||
y: sigAutoY,
|
||||
width: style.Signal.signalAutoWidth,
|
||||
fill: style.Signal.lamp.autoRoute,
|
||||
width: style.Signal.auto.width,
|
||||
fill: style.Signal.auto.autoRoute,
|
||||
lineWidth: 0.6,
|
||||
stroke: style.sidelineColor
|
||||
});
|
||||
@ -129,9 +129,9 @@ class Signal extends Group {
|
||||
style: style,
|
||||
x: sigDelayX,
|
||||
y: sigDelayY,
|
||||
fontWeight: 'bold',
|
||||
fontWeight: style.Signal.delay.fontWeight,
|
||||
fontSize: style.Signal.delay.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: this.model.delayCount || '0',
|
||||
textFill: style.Signal.delay.fontColor,
|
||||
textAlign: drict > 0 ? 'right' : 'left',
|
||||
@ -339,6 +339,10 @@ class Signal extends Group {
|
||||
// this.siglamp.setNameBorder(1)
|
||||
}
|
||||
this.sigName.setColor(this.style.Signal.text.blockColor);
|
||||
if (this.style.Signal.text.nameBorderShow) {
|
||||
this.sigName.setStyle({textBorderWidth: 1});
|
||||
this.sigName.setColor('#fff');
|
||||
}
|
||||
}
|
||||
|
||||
// 功能封锁
|
||||
@ -383,24 +387,22 @@ class Signal extends Group {
|
||||
|
||||
// 设置自动进路模式状态类型
|
||||
setAutoRouteOpen() {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
|
||||
if (this.model.linkageAutoRouteShow) {
|
||||
this.sigAuto.show();
|
||||
} else {
|
||||
this.sigAuto.hide();
|
||||
}
|
||||
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
|
||||
}
|
||||
|
||||
// 信号机进路自动触发模式状态类型
|
||||
setAutoAccessOpen() {
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
|
||||
if (this.model.atsAutoTriggerShow) {
|
||||
this.sigAuto.show();
|
||||
} else {
|
||||
this.sigAuto.hide();
|
||||
}
|
||||
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
|
||||
}
|
||||
|
||||
// 设置自动信号模式状态类型
|
||||
@ -427,13 +429,15 @@ class Signal extends Group {
|
||||
|
||||
// 恢复状态
|
||||
recover() {
|
||||
this.sigName.setStyle({textBorderWidth: 0});
|
||||
this.sigAuto.hide();
|
||||
this.sigRoute.hide();
|
||||
this.sigDelay.hide();
|
||||
this.sigAuto.animationRecover();
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
this.recover();
|
||||
/** 设置状态 (点灯类型)*/
|
||||
switch (model.status) {
|
||||
@ -467,9 +471,8 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
/** 延时解锁*/
|
||||
model.delayType = '02';
|
||||
switch (model.delayType) {
|
||||
case '01': this.setDelayUnlock(); break; // 未延时解锁
|
||||
case '01': break; // 未延时解锁
|
||||
case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁
|
||||
case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁
|
||||
}
|
||||
|
@ -28,9 +28,9 @@ export default class Station extends Group {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
fontWeight: 'bold',
|
||||
fontWeight: model.fontWeight,
|
||||
fontSize: model.nameFont || 18,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
@ -46,9 +46,9 @@ export default class Station extends Group {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + ((parseInt(model.nameFont) + 2) * direction),
|
||||
fontWeight: 'bold',
|
||||
fontWeight: model.fontWeight,
|
||||
fontSize: model.kmPostFont || 18,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.kmPost,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
@ -72,7 +72,6 @@ export default class Station extends Group {
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
getShapeTipPoint() {
|
||||
|
@ -11,7 +11,7 @@ class ESigAuto extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
|
||||
this.arrows = new Polygon({
|
||||
this.arrow = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
@ -23,28 +23,28 @@ class ESigAuto extends Group {
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
this.add(this.arrows);
|
||||
this.add(this.arrow);
|
||||
}
|
||||
|
||||
// 停止动画
|
||||
animationRecover() {
|
||||
this.arrows.stopAnimation(false);
|
||||
this.arrow.stopAnimation(false);
|
||||
}
|
||||
|
||||
// 箭头颜色
|
||||
setColor(color) {
|
||||
this.arrows.setStyle('fill', color);
|
||||
this.arrow.setStyle('fill', color);
|
||||
}
|
||||
|
||||
// 箭头闪烁
|
||||
arrowsAnimation() {
|
||||
const style = this.model.style;
|
||||
const fill = this.arrows.style.Signal.fill;
|
||||
this.arrows.animate(true)
|
||||
.when(1000, { fill: style.backgroundColor, stroke: style.style.backgroundColor })
|
||||
.when(2000, { fill: fill, stroke: style.style.Signal.sidelineColor })
|
||||
.when(3000, { fill: style.style.backgroundColor, stroke: style.style.backgroundColor })
|
||||
.when(4000, { fill: fill, stroke: style.style.Signal.sidelineColor })
|
||||
const fill = this.arrow.style.Signal.fill;
|
||||
this.arrow.animateStyle(true)
|
||||
.when(1000, { fill: style.backgroundColor, stroke: style.backgroundColor })
|
||||
.when(2000, { fill: fill, stroke: style.Signal.sidelineColor })
|
||||
.when(3000, { fill: style.backgroundColor, stroke: style.backgroundColor })
|
||||
.when(4000, { fill: fill, stroke: style.Signal.sidelineColor })
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.down = true;
|
||||
this.down = false;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
@ -54,6 +54,8 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
this.text.hide();
|
||||
if (!this.down) {
|
||||
this.text.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import ESingleControl from './ESingleControl'; // 单个信号灯 (私有)
|
||||
import EArrow from './EArrow';
|
||||
import { arrows } from '../utils/ShapePoints';
|
||||
import { arrow } from '../utils/ShapePoints';
|
||||
import EMouse from './EMouse';
|
||||
|
||||
/** 控制模式*/
|
||||
@ -77,7 +77,7 @@ export default class StationControl extends Group {
|
||||
});
|
||||
// 箭头
|
||||
if (this.style.StationControl.arrow.show) {
|
||||
const point = arrows(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8);
|
||||
const point = arrow(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8);
|
||||
this.arrowsControl = new EArrow({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -105,7 +105,6 @@ export default class StationControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
switch (model.status) {
|
||||
case '00': // 无状态
|
||||
this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
|
@ -30,7 +30,7 @@ export default class StationCounter extends Group {
|
||||
y: model.position.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.val,
|
||||
textFill: style.StationCounter.text.fontColor,
|
||||
textAlign: 'middle',
|
||||
@ -67,7 +67,7 @@ export default class StationCounter extends Group {
|
||||
y: model.position.y + this.rect.width + this.vPadding + style.textFontSize + style.StationCounter.text.distance,
|
||||
fontWeight: 'bold',
|
||||
fontSize: style.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationCounter.text.fontColor,
|
||||
textAlign: 'middle',
|
||||
@ -81,7 +81,6 @@ export default class StationCounter extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
getShapeTipPoint() {
|
||||
|
@ -30,7 +30,7 @@ export default class StationDelayUnlock extends Group {
|
||||
y: model.position.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: model.textFont,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.deviceName + ' ',
|
||||
textFill: style.StationDelayUnlock.text.fontColor,
|
||||
textStrokeWidth: 1,
|
||||
@ -48,7 +48,7 @@ export default class StationDelayUnlock extends Group {
|
||||
y: model.position.y + fontSize + style.StationDelayUnlock.text.distance,
|
||||
fontWeight: 'normal',
|
||||
fontSize: model.textFont,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.remainTime || '',
|
||||
textFill: style.StationDelayUnlock.text.fontColor,
|
||||
textStrokeWidth: 1,
|
||||
@ -95,7 +95,6 @@ export default class StationDelayUnlock extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
switch (model.status) {
|
||||
case '01': this.delayClose(); break; // 关闭
|
||||
case '02': this.delayUnlock(); break; // 延迟解锁
|
||||
|
@ -24,7 +24,7 @@ class EDetain extends Group {
|
||||
text: style.StationStand.detainCar.text,
|
||||
textAlign: model.textAlign,
|
||||
textVerticalAlign: model.textVerticalAlign,
|
||||
fontSize: `${style.StationStand.stand.headFontSize} px ${style.textFontFormat}`,
|
||||
fontSize: `${style.StationStand.stand.headFontSize} px ${style.fontFamily}`,
|
||||
textFill: style.StationStand.detainCar.centerTrainColor,
|
||||
textStroke: style.backgroundColor
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class EJump extends Group {
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: style.StationStand.jump.text,
|
||||
textFill: style.StationStand.jump.textColor,
|
||||
textAlign: model.textAlign,
|
||||
|
@ -22,7 +22,7 @@ class ELevel extends Group {
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.level.textColor,
|
||||
textAlign: 'middle'
|
||||
|
@ -7,7 +7,7 @@ export default class EMouse extends Group {
|
||||
this.device = device;
|
||||
this.zlevel = device.zlevel;
|
||||
this.style = device.style;
|
||||
this.down = true;
|
||||
this.down = false;
|
||||
this.create();
|
||||
}
|
||||
|
||||
@ -32,6 +32,8 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
this.border.hide();
|
||||
if (!this.down) {
|
||||
this.border.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class ETime extends Group {
|
||||
y: model.y,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.StationStand.common.textFontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: style.StationStand.stopTime.textColor,
|
||||
textAlign: 'middle'
|
||||
|
@ -30,18 +30,6 @@ class StationStand extends Group {
|
||||
const style = this.style;
|
||||
const drict = model.doorLocationType == '01' ? 1 : -1;
|
||||
|
||||
/** 屏蔽门*/
|
||||
this.safeDoor = new ESafeDoor({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
width: model.width,
|
||||
height: style.StationStand.safetyDoor.height,
|
||||
show: model.hasDoor
|
||||
});
|
||||
|
||||
/** 列车站台*/
|
||||
const standH = drict > 0 ? style.StationStand.safetyDoor.height : model.height;
|
||||
const standX = model.position.x - model.width / 2;
|
||||
@ -55,109 +43,126 @@ class StationStand extends Group {
|
||||
width: model.width,
|
||||
height: model.height
|
||||
});
|
||||
this.add(this.safeStand);
|
||||
|
||||
/** 站台紧急关闭*/
|
||||
const emergentH = drict > 0 ? style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.height: style.StationStand.standEmergent.mergentR;
|
||||
const emergentX = model.position.x + drict * (style.StationStand.standEmergent.offset.x);
|
||||
const emergentY = model.position.y + drict * (style.StationStand.standEmergent.offset.y + emergentH);
|
||||
this.emergent = new ESafeEmergent({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: emergentX,
|
||||
y: emergentY,
|
||||
r: style.StationStand.standEmergent.mergentR,
|
||||
n: 4
|
||||
});
|
||||
if (model.direction != '03') {
|
||||
/** 屏蔽门*/
|
||||
this.safeDoor = new ESafeDoor({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
width: model.width,
|
||||
height: style.StationStand.safetyDoor.height,
|
||||
show: model.hasDoor
|
||||
});
|
||||
|
||||
/** 站台折返策略*/
|
||||
const reentryD = style.StationStand.reentry.direction ? model.height + 6: -style.StationStand.safetyDoor.distance - style.StationStand.safetyDoor.height;
|
||||
const reentryH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + reentryD;
|
||||
const reentryX = model.position.x - (style.StationStand.reentry.direction || drict) * (style.StationStand.reentry.offset.x - model.width / 2);
|
||||
const reentryY = model.position.y + (style.StationStand.reentry.direction || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH;
|
||||
this.reentry = new EReentry({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: reentryX,
|
||||
y: reentryY,
|
||||
lineWidth: 0,
|
||||
fill: style.StationStand.reentry.noHumanColor
|
||||
});
|
||||
|
||||
const distance = style.StationStand.safetyDoor.height*2 - style.StationStand.stand.headFontSize/2 - 2;
|
||||
|
||||
/** 站台扣车*/
|
||||
const detainD = style.StationStand.detainCar.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
|
||||
const detainH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + detainD;
|
||||
const detainX = model.position.x - (style.StationStand.detainCar.direction || drict) * (style.StationStand.detainCar.offset.x - model.width / 2);
|
||||
const detainY = model.position.y + (style.StationStand.detainCar.direction || drict) * (style.StationStand.detainCar.offset.y) + drict * detainH;
|
||||
this.detain = new EDetain({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: detainX,
|
||||
y: detainY,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
});
|
||||
|
||||
/** 停站时间*/
|
||||
const timeD = style.StationStand.stopTime.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
|
||||
const timeH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + timeD;
|
||||
const timeX = model.position.x - (style.StationStand.stopTime.direction || drict) * (style.StationStand.stopTime.offset.x - model.width / 2);
|
||||
const timeY = model.position.y + (style.StationStand.stopTime.direction || drict) * (style.StationStand.stopTime.offset.y) + drict * timeH;
|
||||
this.time = new ETime({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: timeX,
|
||||
y: timeY,
|
||||
name: model.parkingTime || '30'
|
||||
});
|
||||
/** 运行等级*/
|
||||
const levelD = style.StationStand.level.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
|
||||
const levelH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + levelD;
|
||||
const levelX = model.position.x - (style.StationStand.level.direction || drict) * (style.StationStand.level.offset.x - model.width / 2);
|
||||
const levelY = model.position.y + (style.StationStand.level.direction || drict) * (style.StationStand.level.offset.y) + drict * levelH;
|
||||
this.level = new ELevel({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: levelX,
|
||||
y: levelY,
|
||||
name: model.intervalRunTime || '5'
|
||||
});
|
||||
/** 列车停跳 */
|
||||
if (style.StationStand.common.haveJumpShow) {
|
||||
const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
|
||||
const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD;
|
||||
const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH;
|
||||
const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y - style.StationStand.common.textFontSize / 2) + drict * jumpH;
|
||||
this.jump = new EJump({
|
||||
/** 站台紧急关闭*/
|
||||
const emergentH = drict > 0 ? style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.height: style.StationStand.standEmergent.mergentR;
|
||||
const emergentX = model.position.x + drict * (style.StationStand.standEmergent.offset.x);
|
||||
const emergentY = model.position.y + drict * (style.StationStand.standEmergent.offset.y + emergentH);
|
||||
this.emergent = new ESafeEmergent({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: jumpX,
|
||||
y: jumpY,
|
||||
cx: jumpCX,
|
||||
cy: jumpCY,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
jumpStopStatus: model.jumpStopStatus
|
||||
x: emergentX,
|
||||
y: emergentY,
|
||||
r: style.StationStand.standEmergent.mergentR,
|
||||
n: 4
|
||||
});
|
||||
this.add(this.jump);
|
||||
|
||||
/** 站台折返策略*/
|
||||
const reentryD = style.StationStand.reentry.position ? model.height + 6: -style.StationStand.safetyDoor.distance - style.StationStand.safetyDoor.height;
|
||||
const reentryH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + reentryD;
|
||||
const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2);
|
||||
const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH;
|
||||
this.reentry = new EReentry({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
drict: drict,
|
||||
x: reentryX,
|
||||
y: reentryY,
|
||||
lineWidth: 0,
|
||||
fill: style.StationStand.reentry.noHumanColor
|
||||
});
|
||||
|
||||
const distance = style.StationStand.safetyDoor.height*2 - style.StationStand.stand.headFontSize/2 - 2;
|
||||
|
||||
/** 站台扣车*/
|
||||
const detainD = style.StationStand.detainCar.position ? model.height - distance: -style.StationStand.safetyDoor.height;
|
||||
const detainH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + detainD;
|
||||
const detainX = model.position.x - (style.StationStand.detainCar.position || drict) * (style.StationStand.detainCar.offset.x - model.width / 2);
|
||||
const detainY = model.position.y + (style.StationStand.detainCar.position || drict) * (style.StationStand.detainCar.offset.y) + drict * detainH;
|
||||
this.detain = new EDetain({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: detainX,
|
||||
y: detainY,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
});
|
||||
|
||||
/** 停站时间*/
|
||||
const timeD = style.StationStand.stopTime.position ? model.height - distance: -style.StationStand.safetyDoor.height;
|
||||
const timeH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + timeD;
|
||||
const timeX = model.position.x - (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.x - model.width / 2);
|
||||
const timeY = model.position.y + (style.StationStand.stopTime.position || drict) * (style.StationStand.stopTime.offset.y) + drict * timeH;
|
||||
this.time = new ETime({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: timeX,
|
||||
y: timeY,
|
||||
name: model.parkingTime || '30'
|
||||
});
|
||||
|
||||
/** 运行等级*/
|
||||
const levelD = style.StationStand.level.position ? model.height - distance: -style.StationStand.safetyDoor.height;
|
||||
const levelH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + levelD;
|
||||
const levelX = model.position.x - (style.StationStand.level.position || drict) * (style.StationStand.level.offset.x - model.width / 2);
|
||||
const levelY = model.position.y + (style.StationStand.level.position || drict) * (style.StationStand.level.offset.y) + drict * levelH;
|
||||
this.level = new ELevel({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: levelX,
|
||||
y: levelY,
|
||||
name: model.intervalRunTime || '5'
|
||||
});
|
||||
|
||||
/** 列车停跳 */
|
||||
if (style.StationStand.common.haveJumpShow) {
|
||||
const jumpD = style.StationStand.jump.position ? model.height - distance: -style.StationStand.safetyDoor.height;
|
||||
const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD;
|
||||
const jumpX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y) + drict * jumpH;
|
||||
const jumpCX = model.position.x - (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.x - model.width / 2);
|
||||
const jumpCY = model.position.y + (style.StationStand.jump.position || drict) * (style.StationStand.jump.offset.y - style.StationStand.common.textFontSize / 2) + drict * jumpH;
|
||||
this.jump = new EJump({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
style: style,
|
||||
x: jumpX,
|
||||
y: jumpY,
|
||||
cx: jumpCX,
|
||||
cy: jumpCY,
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top',
|
||||
jumpStopStatus: model.jumpStopStatus
|
||||
});
|
||||
this.add(this.jump);
|
||||
}
|
||||
|
||||
this.add(this.safeDoor);
|
||||
this.add(this.emergent);
|
||||
this.add(this.detain);
|
||||
this.add(this.reentry);
|
||||
this.add(this.time);
|
||||
this.add(this.level);
|
||||
}
|
||||
this.add(this.safeDoor);
|
||||
this.add(this.safeStand);
|
||||
this.add(this.emergent);
|
||||
this.add(this.detain);
|
||||
this.add(this.reentry);
|
||||
this.add(this.time);
|
||||
this.add(this.level);
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
@ -183,14 +188,14 @@ class StationStand extends Group {
|
||||
|
||||
/** 恢复初始状态*/
|
||||
recover() {
|
||||
this.time.hide();
|
||||
this.level.hide();
|
||||
this.detain.hide();
|
||||
this.reentry.hide();
|
||||
this.emergent.hide();
|
||||
this.time && this.time.hide();
|
||||
this.level && this.level.hide();
|
||||
this.detain && this.detain.hide();
|
||||
this.reentry && this.reentry.hide();
|
||||
this.emergent && this.emergent.hide();
|
||||
this.jump && this.jump.hide();
|
||||
if (this.model.visible) { this.safeDoor.hasDoor(false); }
|
||||
this.safeDoor.setColor(this.style.StationStand.safetyDoor.defaultColor);
|
||||
if (this.model.visible) { this.safeDoor && this.safeDoor.hasDoor(false); }
|
||||
this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.defaultColor);
|
||||
}
|
||||
|
||||
/** 空闲*/
|
||||
@ -200,20 +205,20 @@ class StationStand extends Group {
|
||||
|
||||
/** 列车停站*/
|
||||
stop() {
|
||||
this.safeStand.setColor(this.style.StationStand.stand.stopColor);
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.stopColor);
|
||||
}
|
||||
|
||||
/** 指定列车跳站*/
|
||||
designatedJumpStop() {
|
||||
this.safeStand.setColor(this.style.StationStand.stand.designatedJumpStopColor);
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.designatedJumpStopColor);
|
||||
this.jump && this.jump.show();
|
||||
this.jump && this.jump.setStatus(this.model.jumpStopStatus);
|
||||
}
|
||||
|
||||
/** 站台紧急关闭*/
|
||||
emergentClose() {
|
||||
this.safeStand.setColor(this.style.StationStand.stand.spareColor);
|
||||
this.emergent.show();
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.spareColor);
|
||||
this.emergent && this.emergent.show();
|
||||
}
|
||||
|
||||
/** 未设置跳停*/
|
||||
@ -224,88 +229,87 @@ class StationStand extends Group {
|
||||
|
||||
/** 站台跳停*/
|
||||
jumpStop() {
|
||||
this.safeStand.setColor(this.style.StationStand.stand.jumpStopColor);
|
||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.jumpStopColor);
|
||||
this.jump && this.jump.show();
|
||||
this.jump && this.jump.setStatus(this.model.jumpStopStatus);
|
||||
}
|
||||
|
||||
/** 未设置扣车*/
|
||||
unDetainTrain() {
|
||||
this.detain.hide();
|
||||
this.detain && this.detain.hide();
|
||||
}
|
||||
|
||||
/** 车站扣车*/
|
||||
standDetainTrain() {
|
||||
this.detain.show();
|
||||
this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
||||
this.detain && this.detain.show();
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
||||
}
|
||||
|
||||
/** 中心扣车*/
|
||||
centerDetainTrain() {
|
||||
this.detain.show();
|
||||
this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
||||
this.detain && this.detain.show();
|
||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
||||
}
|
||||
|
||||
/** 中心+车站扣车*/
|
||||
standAndCenterDetainTrain() {
|
||||
this.detain.show();
|
||||
this.detain && this.detain.show();
|
||||
}
|
||||
|
||||
/** 人工设置停战时间*/
|
||||
setManuallyArmisticeTime(val) {
|
||||
this.time.show();
|
||||
this.time.setName(val);
|
||||
this.time && this.time.show();
|
||||
this.time && this.time.setName(val);
|
||||
}
|
||||
|
||||
/** 人工设置运行等级*/
|
||||
setManuallyOperationLevel(val) {
|
||||
this.level.show();
|
||||
this.level.setName(val);
|
||||
this.level && this.level.show();
|
||||
this.level && this.level.setName(val);
|
||||
}
|
||||
|
||||
/** 开门*/
|
||||
openDoor() {
|
||||
this.safeDoor.hasDoor(true);
|
||||
this.safeDoor && this.safeDoor.hasDoor(true);
|
||||
}
|
||||
|
||||
/** 关门*/
|
||||
closeDoor() {
|
||||
this.safeDoor.hasDoor(false);
|
||||
this.safeDoor && this.safeDoor.hasDoor(false);
|
||||
}
|
||||
|
||||
/** 屏蔽门正常*/
|
||||
doorNormal() {
|
||||
this.safeDoor.setColor(this.style.StationStand.safetyDoor.defaultColor);
|
||||
this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.defaultColor);
|
||||
}
|
||||
|
||||
/** 屏蔽门故障*/
|
||||
doorFault() {
|
||||
this.safeDoor.setColor(this.style.StationStand.safetyDoor.splitDoorColor);
|
||||
this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.splitDoorColor);
|
||||
}
|
||||
|
||||
/** 屏蔽门切除*/
|
||||
doorSplit() {
|
||||
this.safeDoor.setColor(this.style.StationStand.safetyDoor.splitDoorColor);
|
||||
this.safeDoor && this.safeDoor.setColor(this.style.StationStand.safetyDoor.splitDoorColor);
|
||||
}
|
||||
|
||||
/** 无折返(默认)*/
|
||||
noReentry() {
|
||||
this.reentry.hide();
|
||||
this.reentry && this.reentry.hide();
|
||||
}
|
||||
|
||||
/** 无人折返*/
|
||||
noHumanReentry() {
|
||||
this.reentry.show();
|
||||
this.reentry.setColor(this.style.StationStand.reentry.noHumanColor);
|
||||
this.reentry && this.reentry.show();
|
||||
this.reentry && this.reentry.setColor(this.style.StationStand.reentry.noHumanColor);
|
||||
}
|
||||
/** 自动换端*/
|
||||
autoChangeEnds() {
|
||||
this.reentry.show();
|
||||
this.reentry.setColor(this.style.StationStand.reentry.autoChangeEndsColor);
|
||||
this.reentry && this.reentry.show();
|
||||
this.reentry && this.reentry.setColor(this.style.StationStand.reentry.autoChangeEndsColor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
this.recover();
|
||||
switch (model.status) {
|
||||
case '01': /** 空闲*/
|
||||
@ -397,7 +401,8 @@ class StationStand extends Group {
|
||||
|
||||
getBoundingRect() {
|
||||
const rect = this.safeStand.getBoundingRect();
|
||||
rect.union(this.safeDoor.getBoundingRect());
|
||||
this.safeDoor && rect.union(this.safeDoor.getBoundingRect());
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
21
src/jmap/shape/Switch/ELockRect.js
Normal file
21
src/jmap/shape/Switch/ELockRect.js
Normal file
@ -0,0 +1,21 @@
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
/** 名称元素*/
|
||||
export default function ELockRect(model) {
|
||||
const TextName = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 2,
|
||||
shape: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
width: model.width,
|
||||
height: model.width
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.stroke,
|
||||
fill: model.fill
|
||||
}
|
||||
});
|
||||
return TextName;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
import store from '@/store';
|
||||
class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
@ -12,10 +12,10 @@ class EMouse extends Group {
|
||||
create() {
|
||||
if (this.device.name) {
|
||||
// 创建锁闭框
|
||||
var rect = this.device.name.getBoundingRect();
|
||||
var textWidth = rect.width * 0.8;
|
||||
const rect = this.device.name.getNameText().getBoundingRect();
|
||||
let textWidth = rect.width * 0.8;
|
||||
if (this.device.triangle.drictx !== 1) {
|
||||
rect.x += rect.width;
|
||||
// rect.x += rect.width;
|
||||
textWidth = -textWidth;
|
||||
}
|
||||
|
||||
@ -68,23 +68,46 @@ class EMouse extends Group {
|
||||
this.switchBorder.hide();
|
||||
}
|
||||
|
||||
mouseout() {
|
||||
// const section = Vue.prototype.$jlmap.mapDevice[this.device.model.switchSectionCode].instance;
|
||||
// section && section.setTrainWindowEventShow(false);
|
||||
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
getInstanceByCode(code) {
|
||||
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
|
||||
}
|
||||
|
||||
mouseover() {
|
||||
// 显示车次窗
|
||||
// const section = Vue.prototype.$jlmap.mapDevice[this.device.model.switchSectionCode].instance;
|
||||
// section && section.setTrainWindowEventShow(true);
|
||||
mouseout(e) {
|
||||
if (!this.down) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseLeave) {
|
||||
instance.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mouseover(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
this.device.setLossAction(false);
|
||||
this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
this.device.setTextStyle({
|
||||
textFill: '#000'
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
|
||||
const section = store.getters['map/getDeviceByCode'](this.device.model.sectionACode) || {};
|
||||
const parentSection = store.getters['map/getDeviceByCode'](section.parentCode) || {};
|
||||
const instance = this.getInstanceByCode(parentSection.trainWindowCode);
|
||||
if (instance && instance.mouseEnter) {
|
||||
instance.mouseEnter(e);
|
||||
}
|
||||
}
|
||||
|
||||
mouseEnter(e) {
|
||||
this.switchBorder && this.switchBorder.show();
|
||||
this.device.setLossAction(false);
|
||||
this.device.setSwitchCoreColor(this.device.style.Switch.mouseOverStyle.borderBackgroundColor);
|
||||
@ -93,5 +116,14 @@ class EMouse extends Group {
|
||||
});
|
||||
this.textRect && this.textRect.show();
|
||||
}
|
||||
|
||||
mouseLeave(e) {
|
||||
this.switchBorder && this.switchBorder.hide();
|
||||
this.device.setTextStyle({
|
||||
textFill: this.device.style.backgroundColor
|
||||
});
|
||||
this.textRect && this.textRect.hide();
|
||||
this.device.setState(this.device.model);
|
||||
}
|
||||
}
|
||||
export default EMouse;
|
||||
|
@ -21,11 +21,10 @@ class ESwName extends Group {
|
||||
y: model.nameTextY,
|
||||
fontWeight: style.Switch.text.fontWeight,
|
||||
fontSize: style.Switch.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
// textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: model.triangle.dricty === 1 ? 'top' : 'bottom',
|
||||
textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
||||
textVerticalAlign: 'middle',
|
||||
textFill: style.textFontColor
|
||||
}
|
||||
});
|
||||
@ -49,7 +48,7 @@ class ESwName extends Group {
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
lineDash: [3, 3],
|
||||
// lineDash: [3, 3],
|
||||
stroke: style.Switch.text.borderColor,
|
||||
fill: style.transparentColor
|
||||
}
|
||||
@ -63,7 +62,7 @@ class ESwName extends Group {
|
||||
y: model.arrowTextY,
|
||||
fontSize: style.arrowFontSize,
|
||||
fontWeight: style.Switch.text.fontWeight,
|
||||
fontFamily: style.textFontFormat,
|
||||
fontFamily: style.fontFamily,
|
||||
text: `道岔区段名称: ${model.sectionName}`,
|
||||
textFill: '#000',
|
||||
textAlign: 'letf',
|
||||
|
@ -8,6 +8,7 @@ import ESwName from './ESwName.js';
|
||||
import ESwCore from './ESwCore.js';
|
||||
import ESwLocal from './ESwLocal.js';
|
||||
import ESwLnversion from './ESwLnversion';
|
||||
import ELockRect from './ELockRect';
|
||||
import EMouse from './EMouse';
|
||||
|
||||
export default class Switch extends Group {
|
||||
@ -19,7 +20,8 @@ export default class Switch extends Group {
|
||||
this.style = style;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 6;
|
||||
this._create();
|
||||
this.create();
|
||||
this._createLockRect(); // 创建单锁矩形框显示
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
}
|
||||
@ -34,7 +36,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
_create() {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
@ -121,8 +123,9 @@ export default class Switch extends Group {
|
||||
|
||||
const arrowTextX = model.intersection.x + 10;
|
||||
const arrowTextY = model.intersection.y + 15;
|
||||
const nameTextX = model.namePosition.x + model.intersection.x + this.triangle.drictx * (style.Section.line.width * 3 + style.Switch.text.distance) * this.triangle.getCotRate();
|
||||
const nameTextY = model.namePosition.y + model.intersection.y + this.triangle.dricty * (style.Switch.text.distance);
|
||||
const nameTextX = model.namePosition.x + model.intersection.x + directx * (style.Section.line.width * 3 + style.Switch.text.offset.x) * this.triangle.getCotRate();
|
||||
const nameTextY = model.namePosition.y + model.intersection.y + style.Switch.text.offset.y * (style.Switch.text.position || directy);
|
||||
|
||||
this.name = new ESwName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -144,6 +147,22 @@ export default class Switch extends Group {
|
||||
this.add(this.name);
|
||||
}
|
||||
|
||||
_createLockRect() {
|
||||
const offsetX = this.model.locateType == '01' ? 3 : 0;
|
||||
this.lockRect = new ELockRect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 6,
|
||||
x: this.model.intersection.x - this.style.Switch.monolock.rectWidth / 2 + offsetX,
|
||||
y: this.model.intersection.y - this.style.Switch.monolock.rectWidth / 2,
|
||||
width: this.style.Switch.monolock.rectWidth,
|
||||
lineWidth: 1.8,
|
||||
stroke: this.style.Switch.monolock.rectBorderColor,
|
||||
fill: this.style.transparentColor
|
||||
});
|
||||
this.add(this.lockRect);
|
||||
this.lockRect.hide();
|
||||
}
|
||||
|
||||
/** 名称动画*/
|
||||
nameTextAnimation() {
|
||||
this.name.getNameText().animateStyle(true)
|
||||
@ -183,13 +202,14 @@ export default class Switch extends Group {
|
||||
this.name.getNameText().setStyle(style);
|
||||
}
|
||||
|
||||
/** 设置道岔文字边框颜色 */
|
||||
/** 设置道岔文字边框颜色 (道岔封锁) */
|
||||
setHasTextBorder(width) {
|
||||
this.name.getTextRect().setStyle({lineWidth: width});
|
||||
}
|
||||
|
||||
/** 恢复状态*/
|
||||
recover() {
|
||||
this.lockRect.hide();
|
||||
this.setSwitchCoreColor(this.style.backgroundColor);
|
||||
this.name.getNameText().stopAnimation(false);
|
||||
this.swCore.stopAnimation(false);
|
||||
@ -246,12 +266,27 @@ export default class Switch extends Group {
|
||||
|
||||
/** 单锁*/
|
||||
setMonolock() {
|
||||
this.setTextColor(this.style.Switch.monolockColor);
|
||||
if (this.style.Switch.monolock.rectShow) { // 判断单锁矩形是否显示
|
||||
this.lockRect.show();
|
||||
}
|
||||
switch (this.model.locateType) {
|
||||
case '01': // 定位
|
||||
this.setTextColor(this.style.Switch.monolock.locationColor); // 设置道岔名称颜色
|
||||
break;
|
||||
case '02': // 反位
|
||||
this.setTextColor(this.style.Switch.monolock.inversionColor); // 设置道岔名称颜色
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/** 封锁 */
|
||||
block() {
|
||||
this.setHasTextBorder(1);
|
||||
if (this.style.Switch.block.nameBorderShow) {
|
||||
this.setHasTextBorder(1);
|
||||
} else if (this.style.Switch.block.contentRectShow) {
|
||||
this.lockRect.show();
|
||||
this.lockRect.setStyle({stroke: this.style.Switch.block.contentRectColor});
|
||||
}
|
||||
}
|
||||
|
||||
/** 延时释放*/
|
||||
@ -334,7 +369,6 @@ export default class Switch extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
this.setLocateType(model);
|
||||
switch (model.status) {
|
||||
case '01':
|
||||
|
@ -40,6 +40,5 @@ export default class Text2 extends Group {
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
}
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ export default class TextTrainServer extends Group {
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z+1,
|
||||
style: {
|
||||
x: parseInt(this.model.point.x + this.model.style.Train.trainServerOffset.y),
|
||||
y: parseInt(this.model.point.y + this.model.style.Train.trainServerOffset.y),
|
||||
text: this.model.serviceNumber.substring(this.model.serviceNumber.length - 2),
|
||||
x: parseInt(this.model.point.x + this.model.style.Train.trainServer.trainServerOffset.x),
|
||||
y: parseInt(this.model.point.y + this.model.style.Train.trainServer.trainServerOffset.y),
|
||||
text: this.model.serviceNumber.substring(this.model.serviceNumber.length - this.model.style.Train.trainServer.serviceNumberPrefix.length),
|
||||
textFill: this.model.trainBrownColor,
|
||||
textFont: this.model.textFont,
|
||||
textAlign: 'left',
|
||||
|
@ -12,12 +12,12 @@ export default class TextTrainTarget extends Group {
|
||||
zlevel: this.model.zlevel,
|
||||
z: this.model.z+1,
|
||||
style: {
|
||||
x: parseInt(this.model.point.x + this.model.style.Train.trainTargetOffset.x),
|
||||
y: parseInt(this.model.point.y + this.model.style.Train.trainTargetOffset.y),
|
||||
x: parseInt(this.model.point.x + this.model.style.Train.trainTarget.trainTargetOffset.x),
|
||||
y: parseInt(this.model.point.y + this.model.style.Train.trainTarget.trainTargetOffset.y),
|
||||
text: this.model.tripNumber.substring(this.model.tripNumber.length - 3),
|
||||
textFill: this.model.trainYellowColor,
|
||||
textFont: this.model.textFont,
|
||||
textAlign: this.model.style.Train.trainTargetTextAlign,
|
||||
textAlign: this.model.style.Train.trainTarget.trainTargetTextAlign,
|
||||
textVerticalAlign: 'top',
|
||||
onmouseover: this.model.onmouseover,
|
||||
onmouseout: this.model.onmouseout
|
||||
|
@ -1,6 +1,5 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store';
|
||||
|
||||
export default class Train extends Group {
|
||||
constructor(model) {
|
||||
|
@ -18,8 +18,8 @@ export default class TrainBody extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const textFont = model.fontSize + 'px ' + style.Train.textFontFormat;
|
||||
const TextFontHSDA = style.Train.trainHSDATextFontSize + 'px ' + style.Train.textFontFormat;
|
||||
const textFont = model.fontSize + 'px ' + style.Train.common.fontFamily;
|
||||
const TextFontHSDA = style.Train.hsda.trainHSDATextFontSize + 'px ' + style.Train.common.fontFamily;
|
||||
|
||||
let destinationText = '';
|
||||
switch (model.destinationStatus) {
|
||||
@ -31,7 +31,7 @@ export default class TrainBody extends Group {
|
||||
default: destinationText = '未知'; break;
|
||||
}
|
||||
const textContain = `列车类型: 计划车\n表\0\0\0\0号: ${model.serviceNumber}\n车\0次\0号: ${model.tripNumber}\n目的地号: ${model.targetCode ? model.targetCode : ''}\n车\0组\0号: ${model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${model.sectionModel ? model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${model.runControlStatus == '01' ? '正常' : model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${model.speed || 0} km/h\n列车移动授权距离: ${model.maLen || 0} m`;
|
||||
this.arrowText = style.Train.haveArrowText ? new ArrowText({
|
||||
this.arrowText = style.Train.common.haveArrowText ? new ArrowText({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
x: model.point.x+50,
|
||||
@ -49,24 +49,24 @@ export default class TrainBody extends Group {
|
||||
shape: {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
width: style.Train.trainWidth,
|
||||
height: style.Train.trainHeight
|
||||
width: style.Train.common.trainWidth,
|
||||
height: style.Train.common.trainHeight
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Train.trainBodyLineWidth,
|
||||
lineWidth: style.Train.trainBody.trainBodyLineWidth,
|
||||
stroke: style.trainSidelineColor,
|
||||
fill: style.Train.trainBodyFillColor
|
||||
fill: style.Train.trainBody.trainBodyFillColor
|
||||
},
|
||||
cursor: 'pointer',
|
||||
arrowText: this.arrowText,
|
||||
onmouseover: () => { style.Train.trainBodyOnMouseOver.train?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBodyOnMouseOut.train?this.arrowText.getArrowText().hide():''; }
|
||||
onmouseover: () => { style.Train.trainBody.trainBodyOnMouseOver.train?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBody.trainBodyOnMouseOut.train?this.arrowText.getArrowText().hide():''; }
|
||||
});
|
||||
|
||||
const beginX = (model.point.x + style.Train.lrPadding);
|
||||
const beginY = (model.point.y - style.Train.trainHSDATextFontSize - style.Train.upPaddingHSDA);
|
||||
const margin = (style.Train.trainWidth - style.Train.lrPaddingHSDA * 2) / 4;
|
||||
this.textHSDA = style.Train.haveTextHSDA ? new TextHSDA({
|
||||
const beginX = (model.point.x + style.Train.trainBody.lrPadding);
|
||||
const beginY = (model.point.y - style.Train.hsda.trainHSDATextFontSize - style.Train.hsda.upPaddingHSDA);
|
||||
const margin = (style.Train.common.trainWidth - style.Train.hsda.lrPaddingHSDA * 2) / 4;
|
||||
this.textHSDA = style.Train.common.haveTextHSDA ? new TextHSDA({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
beginX: beginX,
|
||||
@ -79,12 +79,12 @@ export default class TrainBody extends Group {
|
||||
textVerticalAlign: 'top'
|
||||
}) : '';
|
||||
|
||||
let serviceNumber = style.Train.serviceNumberPrefix + (model.serviceNumber || style.Train.defaultServiceNumber) + '';// 服务号(表号)
|
||||
const tripNumber = style.Train.tripNumberPrefix + (style.Train.defaultDirectionCode
|
||||
?(model.directionCode||style.Train.defaultDirectionCode) + (model.tripNumber || style.Train.defaultTripNumber)
|
||||
:model.tripNumber || style.Train.defaultTripNumber) + ''; // 车次号
|
||||
const targetCode = style.Train.targetCodePrefix + (model.targetCode || style.Train.defaultTargetCode) + ''; // 目的地码
|
||||
const groupNumber = style.Train.groupNumberPrefix + (model.groupNumber || style.Train.defaultGroupNumber) + ''; // 车组号
|
||||
let serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || style.Train.trainServer.defaultServiceNumber) + '';// 服务号(表号)
|
||||
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
|
||||
?(model.directionCode||style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
|
||||
:model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
|
||||
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.targetCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码
|
||||
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号
|
||||
|
||||
this.textTrainServer = new TextTrainServer({
|
||||
zlevel: model.zlevel,
|
||||
@ -94,34 +94,34 @@ export default class TrainBody extends Group {
|
||||
serviceNumber: serviceNumber,
|
||||
trainBrownColor: style.trainTextColor,
|
||||
textFont: textFont,
|
||||
onmouseover: () => { style.Train.trainBodyOnMouseOver.textTrainServer?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBodyOnMouseOut.textTrainServer?this.arrowText.getArrowText().hide():''; }
|
||||
onmouseover: () => { style.Train.trainBody.trainBodyOnMouseOver.textTrainServer?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBody.trainBodyOnMouseOut.textTrainServer?this.arrowText.getArrowText().hide():''; }
|
||||
});
|
||||
|
||||
this.textTrainTarget = new TextTrainTarget({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
point: model.point,
|
||||
trainWidth: model.style.Train.trainWidth,
|
||||
trainWidth: model.style.Train.common.trainWidth,
|
||||
style: style,
|
||||
tripNumber: tripNumber,
|
||||
trainYellowColor: style.trainTextColor,
|
||||
textFont: textFont,
|
||||
onmouseover: () => { style.Train.trainBodyOnMouseOver.textTrainTarget?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBodyOnMouseOut.textTrainTarget?this.arrowText.getArrowText().hide():''; }
|
||||
onmouseover: () => { style.Train.trainBody.trainBodyOnMouseOver.textTrainTarget?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBody.trainBodyOnMouseOut.textTrainTarget?this.arrowText.getArrowText().hide():''; }
|
||||
});
|
||||
|
||||
this.textTrainNumber = new TextTrainNumber({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
point: model.point,
|
||||
lrPadding: style.Train.lrPadding,
|
||||
upPadding: style.Train.upPadding,
|
||||
lrPadding: style.Train.trainBody.lrPadding,
|
||||
upPadding: style.Train.trainBody.upPadding,
|
||||
targetCode: targetCode,
|
||||
trainTextColor: style.trainTextColor,
|
||||
textFont: textFont,
|
||||
onmouseover: () => { style.Train.trainBodyOnMouseOver.textTrainNumber?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBodyOnMouseOut.textTrainNumber?this.arrowText.getArrowText().hide():''; }
|
||||
onmouseover: () => { style.Train.trainBody.trainBodyOnMouseOver.textTrainNumber?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBody.trainBodyOnMouseOut.textTrainNumber?this.arrowText.getArrowText().hide():''; }
|
||||
});
|
||||
|
||||
this.textTrainTargetNumber = new TextTrainTargetNumber({
|
||||
@ -133,29 +133,23 @@ export default class TrainBody extends Group {
|
||||
groupNumber: groupNumber,
|
||||
trainTextColor: style.trainTextColor,
|
||||
textFont: textFont,
|
||||
onmouseover: () => { style.Train.trainBodyOnMouseOver.textTrainTargetNumber?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBodyOnMouseOut.textTrainTargetNumber?this.arrowText.getArrowText().hide():''; }
|
||||
onmouseover: () => { style.Train.trainBody.trainBodyOnMouseOver.textTrainTargetNumber?this.arrowText.getArrowText().show():''; },
|
||||
onmouseout: () => { style.Train.trainBody.trainBodyOnMouseOut.textTrainTargetNumber?this.arrowText.getArrowText().hide():''; }
|
||||
});
|
||||
// 根据列车类型设置显示格式
|
||||
if ( style.Train.specialTrainType.length > 0) {
|
||||
style.Train.specialTrainType.some((item) =>{
|
||||
if ( style.Train.trainBody.specialTrainType.length > 0) {
|
||||
style.Train.trainBody.specialTrainType.some((item) =>{
|
||||
if (model.type === item.type) {
|
||||
serviceNumber = item.serviceNumber;
|
||||
style.Train.nameFormat = item.nameFormat;
|
||||
style.Train.trainBody.nameFormat = item.nameFormat;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
if ( style.Train.dynamicLoadingDisplay ) {
|
||||
this.formatChangePosition(model, style);
|
||||
} else {
|
||||
this.add(this.textTrainServer);
|
||||
this.add(this.textTrainTarget);
|
||||
this.add(this.textHSDA);
|
||||
}
|
||||
this.formatChangePosition(model, style);
|
||||
this.add(this.train);
|
||||
this.add(this.arrowText);
|
||||
|
||||
this.add(this.textHSDA);
|
||||
}
|
||||
|
||||
removeTrainDetail() {
|
||||
@ -190,51 +184,23 @@ export default class TrainBody extends Group {
|
||||
this.arrowText.getArrowText().show();
|
||||
}
|
||||
formatChangePosition(model, style) {
|
||||
if (style.Train.trainNameFormat) {
|
||||
const arr = style.Train.trainNameFormat.split(':');
|
||||
if (style.Train.trainBody.trainNameFormat) {
|
||||
const arr = style.Train.trainBody.trainNameFormat.split(':');
|
||||
arr.forEach(ele => {
|
||||
if (ele == 'targetCode') {
|
||||
this.textTrainNumber.setShapeStyle('x', parseInt(model.point.x + style.Train.trainNumber.trainNumberOffset.x));
|
||||
this.add(this.textTrainNumber);
|
||||
} else if (ele == 'serviceNumber') {
|
||||
const show = arr.includes('targetCode');
|
||||
if (show) {
|
||||
this.textTrainServer.setShapeStyle('x', parseInt(model.point.x + (3 * model.fontSize * (2 / 3)) - 3 - style.Train.lrPadding));
|
||||
}
|
||||
this.textTrainServer.setShapeStyle('x', parseInt(model.point.x + style.Train.trainServer.trainServerOffset.x));
|
||||
this.add(this.textTrainServer);
|
||||
} else if (ele == 'tripNumber') {
|
||||
const show = arr.includes('targetCode');
|
||||
const serverNoShow = arr.includes('serviceNumber');
|
||||
if (show) {
|
||||
this.textTrainTarget.setShapeStyle('x', parseInt(model.point.x + (3 * model.fontSize * (2 / 3)) - 3 - style.Train.lrPadding));
|
||||
}
|
||||
if (serverNoShow) {
|
||||
this.textTrainTarget.setShapeStyle('x', parseInt(model.point.x + (2 * model.fontSize * (2 / 3)) - 3 - style.Train.lrPadding));
|
||||
}
|
||||
if (serverNoShow && show) {
|
||||
this.textTrainTarget.setShapeStyle('x', parseInt(model.point.x + (5 * model.fontSize * (2 / 3)) - 6.5 - style.Train.lrPadding));
|
||||
}
|
||||
this.textTrainTarget.setShapeStyle('x', parseInt(model.point.x + style.Train.trainTarget.trainTargetOffset.x));
|
||||
this.add(this.textTrainTarget);
|
||||
} else if (ele == 'groupNumber') {
|
||||
const show = arr.includes('targetCode');
|
||||
const serverNoShow = arr.includes('serviceNumber');
|
||||
if (show) {
|
||||
this.textTrainTargetNumber.setShapeStyle('x', parseInt(model.point.x + (3 * model.fontSize * (2 / 3)) - 3 - style.Train.lrPadding));
|
||||
}
|
||||
if (serverNoShow) {
|
||||
this.textTrainTargetNumber.setShapeStyle('x', parseInt(model.point.x + (2 * model.fontSize * (2 / 3)) - 3 - style.Train.lrPadding));
|
||||
}
|
||||
if (serverNoShow && show) {
|
||||
this.textTrainTargetNumber.setShapeStyle('x', parseInt(model.point.x + (5 * model.fontSize * (2 / 3)) - 6.5 - style.Train.lrPadding));
|
||||
}
|
||||
this.textTrainTargetNumber.setShapeStyle('x', parseInt(model.point.x + style.Train.textTrainTargetNumber.trainTargetNumberOffset.x));
|
||||
this.add(this.textTrainTargetNumber);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.textTrainServer.setShapeStyle('x', parseInt(model.point.x + 27 - style.Train.lrPadding));
|
||||
this.textTrainTarget.setShapeStyle('x', parseInt(model.point.x + 43 - style.Train.lrPadding));
|
||||
this.add(this.textTrainServer);
|
||||
this.add(this.textTrainTarget);
|
||||
this.add(this.textTrainNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,15 +17,15 @@ export default class TrainHead extends Group {
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.point.x - baseMargin * (style.trainConntWidth),
|
||||
x: model.point.x - baseMargin * (style.Train.trainHead.trainConntWidth),
|
||||
y: model.point.y,
|
||||
width: style.trainConntWidth * model.scale,
|
||||
height: style.Train.trainHeadRectHeight
|
||||
width: style.Train.trainHead.trainConntWidth * model.scale,
|
||||
height: style.Train.trainHead.trainHeadRectHeight
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.1,
|
||||
stroke: style.trainSidelineColor,
|
||||
fill: style.Train.trainHeadFillColor
|
||||
fill: style.Train.trainHead.trainHeadFillColor
|
||||
}
|
||||
});
|
||||
this.arrow = new Polygon({
|
||||
@ -33,15 +33,15 @@ export default class TrainHead extends Group {
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: [
|
||||
[model.point.x + model.drect * (style.Train.trainHeadTriangleFirst.x), model.point.y + style.Train.trainHeadTriangleFirst.y],
|
||||
[model.point.x + model.drect * (style.Train.trainHeadTriangleSecond.x), model.point.y + style.Train.trainHeadTriangleSecond.y],
|
||||
[model.point.x + model.drect * (style.Train.trainHeadTriangleThird.x), model.point.y + style.Train.trainHeadTriangleThird.y]
|
||||
[model.point.x + model.drect * (style.Train.trainHead.trainHeadTriangleFirst.x), model.point.y + style.Train.trainHead.trainHeadTriangleFirst.y],
|
||||
[model.point.x + model.drect * (style.Train.trainHead.trainHeadTriangleSecond.x), model.point.y + style.Train.trainHead.trainHeadTriangleSecond.y],
|
||||
[model.point.x + model.drect * (style.Train.trainHead.trainHeadTriangleThird.x), model.point.y + style.Train.trainHead.trainHeadTriangleThird.y]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.1,
|
||||
stroke: style.trainSidelineColor,
|
||||
fill: style.Train.trainHeadFillColor
|
||||
fill: style.Train.trainHead.trainHeadFillColor
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -16,8 +16,8 @@ export default class Train extends Group {
|
||||
this.z = 40;
|
||||
this.size = 0;
|
||||
this.section = null;
|
||||
this.fontSize = style.Train.nameFontSize || style.Train.trainTextFontSize;
|
||||
this.newScale = this.fontSize / style.Train.trainTextFontSize;
|
||||
this.fontSize = style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
|
||||
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
@ -30,16 +30,15 @@ export default class Train extends Group {
|
||||
x: model.trainWindowModel.point.x,
|
||||
y: model.trainWindowModel.point.y
|
||||
};
|
||||
|
||||
switch (model.directionType) {
|
||||
case '01': // 未知方向
|
||||
this.point.x = this.point.x + model.trainWindowModel.width / 2 + Math.abs((style.Train.trainWidth - model.trainWindowModel.width) / 2);
|
||||
this.point.x = this.point.x + model.trainWindowModel.width / 2 + Math.abs((style.Train.common.trainWidth - model.trainWindowModel.width) / 2);
|
||||
break;
|
||||
case '02': // 从左向右
|
||||
this.point.x = this.point.x + model.trainWindowModel.width / 2 - style.Train.trainConntWidth * this.newScale - style.Train.trainWidth;
|
||||
this.point.x = this.point.x + model.trainWindowModel.width / 2 - style.Train.trainHead.trainConntWidth * this.newScale - style.Train.common.trainWidth;
|
||||
break;
|
||||
case '03': // 从右向左
|
||||
this.point.x = this.point.x - model.trainWindowModel.width / 2 + style.Train.trainConntWidth * this.newScale;
|
||||
this.point.x = this.point.x - model.trainWindowModel.width / 2 + style.Train.trainHead.trainConntWidth * this.newScale;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@ -77,7 +76,7 @@ export default class Train extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: this.point.x - style.Train.trainHeadDistance,
|
||||
x: this.point.x - style.Train.common.trainHeadDistance,
|
||||
y: this.point.y
|
||||
},
|
||||
drect: -1,
|
||||
@ -89,7 +88,7 @@ export default class Train extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: this.point.x + style.Train.trainWidth + style.Train.trainHeadDistance,
|
||||
x: this.point.x + style.Train.common.trainWidth + style.Train.common.trainHeadDistance,
|
||||
y: this.point.y
|
||||
},
|
||||
drect: 1,
|
||||
@ -100,7 +99,7 @@ export default class Train extends Group {
|
||||
this.add(this.trainL);
|
||||
this.add(this.trainR);
|
||||
}
|
||||
if (style.Train.haveTrainBorder) {
|
||||
if (style.Train.common.haveTrainBorder) {
|
||||
this.createTrainBorder();
|
||||
}
|
||||
}
|
||||
@ -127,47 +126,47 @@ export default class Train extends Group {
|
||||
|
||||
// 设置服务号状态类型
|
||||
setServerNoType(type) {
|
||||
if (this.style.Train.serverNoType.length>0) {
|
||||
const flag = this.style.Train.serverNoType.some((item) =>{
|
||||
if (this.style.Train.trainStatusStyle.serverNoType.length>0) {
|
||||
const flag = this.style.Train.trainStatusStyle.serverNoType.some((item) =>{
|
||||
if (type === item.type) {
|
||||
this.trainB.setTextTrainServerColor(item.showColor);
|
||||
this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (this.style.Train.defaultServerNoColor && !flag) {
|
||||
this.trainB.setTextTrainServerColor(this.style.Train.defaultServerNoColor);
|
||||
if (this.style.Train.trainStatusStyle.defaultServerNoColor && !flag) {
|
||||
this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultServerNoColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 设置目的地状态
|
||||
setDestinationStatus(status) {
|
||||
if (this.style.Train.destinationStatus.length>0) {
|
||||
const flag = this.style.Train.destinationStatus.some((item) =>{
|
||||
if (this.style.Train.trainStatusStyle.destinationStatus.length>0) {
|
||||
const flag = this.style.Train.trainStatusStyle.destinationStatus.some((item) =>{
|
||||
if (status === item.status) {
|
||||
switch (this.style.Train.destinationStatusSetText) {
|
||||
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
|
||||
case 'trainTarget':
|
||||
this.trainB.setTextTrainTargetColor(item.showColor);
|
||||
this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
|
||||
break;
|
||||
case 'trainServer':
|
||||
this.trainB.setTextTrainServerColor(item.showColor);
|
||||
this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
|
||||
break;
|
||||
default:
|
||||
this.trainB.setTextTrainTargetColor(item.showColor);
|
||||
this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (this.style.Train.defaultDestinationColor && !flag) {
|
||||
switch (this.style.Train.destinationStatusSetText) {
|
||||
if (this.style.Train.trainStatusStyle.defaultDestinationColor && !flag) {
|
||||
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
|
||||
case 'trainTarget':
|
||||
this.trainB.setTextTrainTargetColor(this.style.Train.defaultDestinationColor);
|
||||
this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
|
||||
break;
|
||||
case 'trainServer':
|
||||
this.trainB.setTextTrainServerColor(this.style.Train.defaultDestinationColor);
|
||||
this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
|
||||
break;
|
||||
default:
|
||||
this.trainB.setTextTrainTargetColor(this.style.Train.defaultDestinationColor);
|
||||
this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -175,13 +174,13 @@ export default class Train extends Group {
|
||||
|
||||
// 设置运行方向状态类型
|
||||
setDirectionType(type) {
|
||||
if (this.style.Train.directionType.length > 0) {
|
||||
this.style.Train.directionType.some((item) => {
|
||||
if (this.style.Train.trainStatusStyle.directionType.length > 0) {
|
||||
this.style.Train.trainStatusStyle.directionType.some((item) => {
|
||||
if (type === item.type) {
|
||||
this.trainL.setLineShow(item.lineLShow);
|
||||
this.trainL.setArrowShow(item.arrowLShow);
|
||||
this.trainR.setLineShow(item.lineRShow);
|
||||
this.trainR.setArrowShow(item.arrowRShow);
|
||||
this.trainL && this.trainL.setLineShow(item.lineLShow);
|
||||
this.trainL && this.trainL.setArrowShow(item.arrowLShow);
|
||||
this.trainR && this.trainR.setLineShow(item.lineRShow);
|
||||
this.trainR && this.trainR.setArrowShow(item.arrowRShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -189,11 +188,11 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置列车停止方向类型
|
||||
setDirectionStopType(type) {
|
||||
if (this.style.Train.directionStopType.length > 0) {
|
||||
this.style.Train.directionStopType.some((item) => {
|
||||
if (this.style.Train.trainStatusStyle.directionStopType.length > 0) {
|
||||
this.style.Train.trainStatusStyle.directionStopType.some((item) => {
|
||||
if (type === item.type) {
|
||||
this.trainL.setLineShow(item.lineLShow);
|
||||
this.trainR.setLineShow(item.lineRShow);
|
||||
this.trainL && this.trainL.setLineShow(item.lineLShow);
|
||||
this.trainR && this.trainR.setLineShow(item.lineRShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -213,11 +212,11 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置运行模式
|
||||
setRunMode(status) {
|
||||
if (this.style.Train.runModeStatus.length > 0) {
|
||||
this.style.Train.runModeStatus.some((item) => {
|
||||
if (this.style.Train.trainStatusStyle.runModeStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.runModeStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainL.setColor(item.trainLColor);
|
||||
this.trainR.setColor(item.trainRColor);
|
||||
this.trainL && this.trainL.setColor(item.trainLColor);
|
||||
this.trainR &&this.trainR.setColor(item.trainRColor);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -225,11 +224,11 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置运行控制状态类型
|
||||
setRunControlStatus(status) {
|
||||
if (this.style.Train.runControlStatus.length > 0) {
|
||||
this.style.Train.runControlStatus.some((item) => {
|
||||
if (this.style.Train.trainStatusStyle.runControlStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.runControlStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB.setHShow(item.hShow);
|
||||
this.trainB.setSShow(item.sShow);
|
||||
this.trainB && this.trainB.setHShow(item.hShow);
|
||||
this.trainB && this.trainB.setSShow(item.sShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -237,10 +236,10 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置车门状态类型
|
||||
setDoorStatus(status) {
|
||||
if (this.style.Train.doorStatus.length > 0) {
|
||||
this.style.Train.doorStatus.some((item) => {
|
||||
if (this.style.Train.trainStatusStyle.doorStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.doorStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB.setDShow(item.dShow);
|
||||
this.trainB && this.trainB.setDShow(item.dShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -248,10 +247,10 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置通信状态类型
|
||||
setCommunicationStatus() {
|
||||
if (this.style.Train.communicationStatus.length > 0) {
|
||||
this.style.Train.doorStatus.some((item) => {
|
||||
if (this.style.Train.trainStatusStyle.communicationStatus.length > 0) {
|
||||
this.style.Train.trainStatusStyle.communicationStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB.setTrainColor(item.trainColor);
|
||||
this.trainB && this.trainB.setTrainColor(item.trainColor);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -259,10 +258,10 @@ export default class Train extends Group {
|
||||
}
|
||||
// 设置报警状态
|
||||
setAlarmStatus(status) {
|
||||
if (this.style.Train.alarmStatus.length >0) {
|
||||
this.style.Train.alarmStatus.some((item) => {
|
||||
if (this.style.Train.trainStatusStyle.alarmStatus.length >0) {
|
||||
this.style.Train.trainStatusStyle.alarmStatus.some((item) => {
|
||||
if (status === item.status) {
|
||||
this.trainB.setAShow(item.aShow);
|
||||
this.trainB && this.trainB.setAShow(item.aShow);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -286,25 +285,25 @@ export default class Train extends Group {
|
||||
}
|
||||
// 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
isChangeTrainWidth(model, style) {
|
||||
if (!style.Train.changeTrainWidth) { return; }
|
||||
if (style.Train.trainNameFormat) {
|
||||
const arr = style.Train.trainNameFormat.split(':');
|
||||
if (!style.Train.trainBody.changeTrainWidth) { return; }
|
||||
if (style.Train.trainBody.trainNameFormat) {
|
||||
const arr = style.Train.trainBody.trainNameFormat.split(':');
|
||||
arr.forEach(ele => {
|
||||
switch (ele) {
|
||||
case 'targetCode': {
|
||||
this.size += 3;
|
||||
this.size += style.Train.trainNumber.targetCodePrefix.length || 0;
|
||||
break;
|
||||
}
|
||||
case 'serviceNumber': {
|
||||
this.size += 2;
|
||||
this.size += style.Train.trainServer.serviceNumberPrefix.length || 0;
|
||||
break;
|
||||
}
|
||||
case 'tripNumber': {
|
||||
this.size += 4;
|
||||
this.size += style.Train.trainTarget.tripNumberPrefix.length || 0;
|
||||
break;
|
||||
}
|
||||
case 'groupNumber': {
|
||||
this.size += 3;
|
||||
this.size += style.Train.trainTargetNumber.groupNumberPrefix.length || 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -312,11 +311,10 @@ export default class Train extends Group {
|
||||
} else {
|
||||
this.size = 9;
|
||||
}
|
||||
|
||||
this.style.Train.trainWidth = this.size * this.fontSize * (2 / 3) - 16;
|
||||
this.style.Train.common.trainWidth = this.size * this.fontSize * (2 / 3) -16;
|
||||
}
|
||||
removeTrainDetail() {
|
||||
this.trainB.removeTrainDetail();
|
||||
this.trainB && this.trainB.removeTrainDetail();
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
@ -340,9 +338,9 @@ export default class Train extends Group {
|
||||
}
|
||||
createTrainBorder() {
|
||||
const rect = Object.assign({}, this.getBoundingRect());
|
||||
rect.x -= this.style.Train.trainWidth / 2;
|
||||
rect.x -= this.style.Train.common.trainWidth / 2;
|
||||
rect.y -= 5;
|
||||
rect.width += this.style.Train.trainWidth;
|
||||
rect.width += this.style.Train.common.trainWidth;
|
||||
rect.height += 10;
|
||||
|
||||
this.trainBorder = new Rect({
|
||||
|
@ -11,7 +11,7 @@ class TrainWindow extends Group {
|
||||
this.zlevel = model.zlevel;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.z = 1;
|
||||
this.z = 9;
|
||||
this.prdType = store.state.training.prdType;
|
||||
this.create(model);
|
||||
this.setState(model);
|
||||
@ -40,13 +40,13 @@ class TrainWindow extends Group {
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineDash: this.style.TrainWindow.trainWindowLineDash,
|
||||
lineWidth: this.style.TrainWindow.trainWindowLineWidth,
|
||||
stroke: this.style.TrainWindow.trainWindowColor,
|
||||
lineDash: this.style.TrainWindow.lineDash,
|
||||
lineWidth: this.style.TrainWindow.lineWidth,
|
||||
stroke: this.style.TrainWindow.lineColor,
|
||||
fill: this.style.transparentColor
|
||||
},
|
||||
onmouseover: () => { if (this.prdType) this.setTrainWindowEventShow(true); },
|
||||
onmouseout: () => { if (this.prdType) this.setTrainWindowEventShow(false); }
|
||||
onmouseover: (e) => { this.mouseover(e); },
|
||||
onmouseout: (e) => { this.mouseout(e); }
|
||||
});
|
||||
this.add(this.trainRect);
|
||||
}
|
||||
@ -60,14 +60,49 @@ class TrainWindow extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
this.setTrainWindowEventShow(model.trainWindowShow);
|
||||
this.setVisible(model.trainWindowShow);
|
||||
}
|
||||
setTrainWindowEventShow(show) {
|
||||
const lineWidth = show ? 1 : 0;
|
||||
this.trainRect && this.trainRect.setStyle('lineWidth', lineWidth);
|
||||
|
||||
setVisible(show) {
|
||||
this.trainRect && this.trainRect.setStyle('lineWidth', show ? 1 : 0);
|
||||
|
||||
}
|
||||
|
||||
getInstanceByCode(code) {
|
||||
return (store.getters['map/getDeviceByCode'](code) || {}).instance;
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
if (this.prdType) {
|
||||
this.setVisible(false);
|
||||
const instance = this.getInstanceByCode(this.model.sectionCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
||||
instance.mouseEvent.mouseLeave(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mouseover(e) {
|
||||
if (this.prdType) {
|
||||
this.setVisible(true);
|
||||
const instance = this.getInstanceByCode(this.model.sectionCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseover) {
|
||||
instance.mouseEvent.mouseEnter(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mouseEnter(e) {
|
||||
if (this.prdType) {
|
||||
this.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
mouseLeave(e) {
|
||||
if (this.prdType ) {
|
||||
this.setVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.down = true;
|
||||
this._create();
|
||||
this.down = false;
|
||||
this.create();
|
||||
}
|
||||
_create() {
|
||||
create() {
|
||||
this.text = new Text({
|
||||
_subType: 'Text',
|
||||
zlevel: this.device.zlevel,
|
||||
@ -34,7 +34,9 @@ export default class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseoutText(e) {
|
||||
this.text.hide();
|
||||
if (!this.down) {
|
||||
this.text.hide();
|
||||
}
|
||||
}
|
||||
|
||||
mouseoverArc(e) {
|
||||
@ -44,9 +46,15 @@ export default class EMouse extends Group {
|
||||
this.device.control.setArcBorder(true);
|
||||
}
|
||||
mouseoutArc(e) {
|
||||
this.device.control.setControlColor(this.device.style.ZcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
if (!this.down) {
|
||||
this.device.control.setControlColor(this.device.style.ZcControl.lamp.controlColor);
|
||||
this.device.control.setTextColor('#FFFFFF');
|
||||
this.device.control.setTextBorder(false);
|
||||
this.device.control.setArcBorder(false);
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
this.mouseoutText(e);
|
||||
this.mouseoutArc(e);
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ export default class ZcControl extends Group {
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + this.style.ZcControl.lamp.radiusR + this.style.ZcControl.text.distance,
|
||||
fontWeight: 'normal',
|
||||
fontWeight: this.style.ZcControl.text.fontWeight,
|
||||
fontSize: this.style.ZcControl.text.fontSize,
|
||||
fontFamily: this.style.textFontFormat,
|
||||
fontFamily: this.style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'middle',
|
||||
@ -57,7 +57,6 @@ export default class ZcControl extends Group {
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
this.model = model;
|
||||
}
|
||||
createMouseEvent() {
|
||||
if (this.style.ZcControl.mouseOverStyle) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Path from 'zrender/src/graphic/Path';
|
||||
|
||||
/** 指向箭头坐标*/
|
||||
export function arrows(modelX, modelY, length, radius) {
|
||||
export function arrow(modelX, modelY, length, radius) {
|
||||
return [
|
||||
[modelX - length, modelY],
|
||||
[modelX - length + radius / 1.5, modelY - radius / 1.2],
|
||||
|
@ -1,165 +1,175 @@
|
||||
<template>
|
||||
<el-dialog class="batong-01__systerm view-display" title="设备显示设置" :visible.sync="show" width="240px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button class="commit" :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button class="cancal" :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="batong-01__systerm view-display"
|
||||
title="设备显示设置"
|
||||
:visible.sync="show"
|
||||
width="240px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" class="cancal" @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/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
const deviceList = [];
|
||||
|
||||
//区段边界设置
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
//区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||
elem.borderBorderShow = show;
|
||||
elem.type = deviceType.Section;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
// 区段边界设置
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// 区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1;
|
||||
elem.borderBorderShow = show;
|
||||
elem.type = deviceType.Section;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
//车次窗设置
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
//车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||
elem.type = deviceType.Section;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
// 车次窗设置
|
||||
const trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
// 车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1;
|
||||
elem.type = deviceType.Section;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
//联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
//联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
//ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
})
|
||||
}
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
// 联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
// ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
@ -56,7 +56,7 @@
|
||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
||||
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input v-model="model.time" size="mini" readonly="true"></el-input>
|
||||
<el-input v-model="model.time" size="mini" :readonly="true"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,92 +1,92 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel"></menu-cancel>
|
||||
<template v-if="isShowAll">
|
||||
<menu-bar ref="menuBar" v-show="isShowBar" :selected="selected"></menu-bar>
|
||||
<!-- <menu-tool ref="menuTool" :selected="selected"></menu-tool> -->
|
||||
<!-- <status-bar ref="statusBar" :selected="selected"></status-bar> -->
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<template v-if="isShowAll">
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<!-- <menu-tool ref="menuTool" :selected="selected"></menu-tool> -->
|
||||
<!-- <status-bar ref="statusBar" :selected="selected"></status-bar> -->
|
||||
|
||||
<menu-button ref="menuButton"></menu-button>
|
||||
<menu-station-control ref="menuStationControl" :selected="selected"></menu-station-control>
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected"></menu-station-stand>
|
||||
<menu-switch ref="menuSwitch" :selected="selected"></menu-switch>
|
||||
<menu-signal ref="menuSignal" :selected="selected"></menu-signal>
|
||||
<menu-section ref="menuSection" :selected="selected"></menu-section>
|
||||
<menu-train ref="menuTrain" :selected="selected"></menu-train>
|
||||
<menu-station ref="menuStation" :selected="selected"></menu-station>
|
||||
<menu-limit ref="menuLimit" :selected="selected"></menu-limit>
|
||||
<passive-alarm ref="passiveAlarm"></passive-alarm>
|
||||
<passive-contorl ref="passiveControl"></passive-contorl>
|
||||
<passive-Timeout ref="passiveTimeout"></passive-Timeout>
|
||||
</template>
|
||||
</div>
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-station-control ref="menuStationControl" :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-limit ref="menuLimit" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuLimit from './menuLimit';
|
||||
// import MenuTool from './menuTool';
|
||||
// import StatusBar from './statusBar';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuLimit from './menuLimit';
|
||||
// import MenuTool from './menuTool';
|
||||
// import StatusBar from './statusBar';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
// MenuTool,
|
||||
// StatusBar,
|
||||
MenuButton,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationControl,
|
||||
MenuStationStand,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
MenuLimit,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
]),
|
||||
isShowAll() {
|
||||
return this.$route.params.mode !== 'dp' &&
|
||||
this.$route.params.mode !== 'plan'
|
||||
},
|
||||
isShowBar() {
|
||||
return this.$store.state.training.prdType != '';
|
||||
},
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
// MenuTool,
|
||||
// StatusBar,
|
||||
MenuButton,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationControl,
|
||||
MenuStationStand,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
MenuLimit,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
]),
|
||||
isShowAll() {
|
||||
return this.$route.params.mode !== 'dp' &&
|
||||
this.$route.params.mode !== 'plan';
|
||||
},
|
||||
isShowBar() {
|
||||
return this.$store.state.training.prdType != '';
|
||||
}
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@ -155,7 +155,6 @@
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
@ -204,7 +203,6 @@
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
}
|
||||
@ -369,4 +367,4 @@
|
||||
.beijing-01__systerm .el-dialog .button-group {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,164 +1,177 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm view-display" title="设备显示设置" :visible.sync="show" width="240px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button class="commit" :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button class="cancal" :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 view-display"
|
||||
title="设备显示设置"
|
||||
:visible.sync="show"
|
||||
width="240px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">确定
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" class="cancal" @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/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
const deviceList = [];
|
||||
|
||||
//区段边界设置
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
//区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||
elem.borderBorderShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
// 区段边界设置
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// 区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1;
|
||||
elem._type = deviceType.Section;
|
||||
elem.borderBorderShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
//车次窗设置
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
//车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
// 车次窗设置
|
||||
const trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
// 车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1;
|
||||
elem._type = deviceType.TrainWindow;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
//联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
//联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
//ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
})
|
||||
}
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem._type = deviceType.Signal;
|
||||
// 联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
// ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,304 +1,304 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<station-cmd-control ref="stationCmdControl"></station-cmd-control>
|
||||
<station-human-control-all ref="stationHumanControlAll"></station-human-control-all>
|
||||
<station-set-route-control-all ref="stationSetRouteControlAll"></station-set-route-control-all>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</div>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<station-cmd-control ref="stationCmdControl" />
|
||||
<station-human-control-all ref="stationHumanControlAll" />
|
||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StationCmdControl from './dialog/stationCmdControl';
|
||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll'
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StationCmdControl from './dialog/stationCmdControl';
|
||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StationCmdControl,
|
||||
StationHumanControlAll,
|
||||
StationSetRouteControlAll,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '全站设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
||||
auth: { station: true, center: false },
|
||||
},
|
||||
{
|
||||
label: '全站取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
||||
auth: { station: true, center: false },
|
||||
},
|
||||
{
|
||||
label: '上电解锁',
|
||||
handler: this.powerUnLock,
|
||||
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
||||
auth: { station: true, center: false },
|
||||
},
|
||||
{
|
||||
label: '执行关键操作测试',
|
||||
handler: this.execKeyOperationTest,
|
||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||
auth: { station: true, center: false },
|
||||
}
|
||||
],
|
||||
central: [
|
||||
{
|
||||
label: '所有进路自排关',
|
||||
handler: this.humanControlALL,
|
||||
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
||||
auth: { station: false, center: true },
|
||||
},
|
||||
{
|
||||
label: '所有进路自排开',
|
||||
handler: this.atsAutoControlALL,
|
||||
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
||||
auth: { station: false, center: true },
|
||||
},
|
||||
{
|
||||
label: '执行关键操作测试',
|
||||
handler: this.execKeyOperationTest,
|
||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||
auth: { station: false, center: true },
|
||||
}
|
||||
],
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledState.Station.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||
//编辑模式菜单列表
|
||||
this.menu = menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StationCmdControl,
|
||||
StationHumanControlAll,
|
||||
StationSetRouteControlAll,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '全站设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '全站取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '上电解锁',
|
||||
handler: this.powerUnLock,
|
||||
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '执行关键操作测试',
|
||||
handler: this.execKeyOperationTest,
|
||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||
auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
central: [
|
||||
{
|
||||
label: '所有进路自排关',
|
||||
handler: this.humanControlALL,
|
||||
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '所有进路自排开',
|
||||
handler: this.atsAutoControlALL,
|
||||
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '执行关键操作测试',
|
||||
handler: this.execKeyOperationTest,
|
||||
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||
auth: { station: false, center: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledState.Station.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
}
|
||||
|
||||
if (this.selected.centralized) {
|
||||
//故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce]
|
||||
}
|
||||
}
|
||||
if (this.selected.centralized) {
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
//设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.stoppage.menu.operation
|
||||
};
|
||||
this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.stoppage.menu.operation
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
//取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
||||
};
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.cancelStoppage.menu.operation
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
//全站设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
//全站取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
let operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
//上电解锁
|
||||
powerUnLock() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.powerUnLock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//执行关键操作测试
|
||||
execKeyOperationTest() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
//所有进路自排关
|
||||
humanControlALL() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
},
|
||||
//所有进路自排开
|
||||
atsAutoControlALL() {
|
||||
let operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 全站设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 全站取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 上电解锁
|
||||
powerUnLock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.powerUnLock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 执行关键操作测试
|
||||
execKeyOperationTest() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排关
|
||||
humanControlALL() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排开
|
||||
atsAutoControlALL() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,69 +1,69 @@
|
||||
<template>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
// import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
// import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
|
||||
// import { mouseCancelState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
],
|
||||
menuForce: [
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
components: {
|
||||
PopMenu
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: [
|
||||
],
|
||||
menuForce: [
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
doShow(point) {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
@ -560,10 +561,9 @@ export function trainMenuFiltration(menuObj) {
|
||||
* 离开菜单以及执行完菜单取消选中状态
|
||||
*/
|
||||
export function mouseCancelState(device) {
|
||||
// Object.assign(device, { _selected: false });
|
||||
// const viewInstance = store.state.map.jlmap.getViewInstanceByDevice({ _type: device._type, _code: device.code });
|
||||
// if (viewInstance && viewInstance['mouseleave']) {
|
||||
// viewInstance['selected'] = false;
|
||||
// viewInstance['mouseleave'](store.state.map.jlmap._zr.curEvent);
|
||||
// }
|
||||
const instance = (Vue.prototype.$jlmap.getDeviceByCode(device.code) || {}).instance;
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent['mouseout']) {
|
||||
instance.mouseEvent['down'] = false;
|
||||
instance.mouseEvent['mouseout'](Vue.prototype.$jlmap.$zr.curEvent);
|
||||
}
|
||||
}
|
||||
|
@ -1,102 +1,98 @@
|
||||
<template>
|
||||
<div class="plan-schedule" style="width: 100%">
|
||||
<title-bar ref="titleBar" @back="back"></title-bar>
|
||||
<menu-bar ref="menuBar" :skinStyle="skinStyle" @dispatchDialog="dispatchDialog"></menu-bar>
|
||||
<!-- <menu-tool ref="menuTool" :skinStyle="skinStyle"></menu-tool> -->
|
||||
<schedule ref="schedule" :group="group" :skinStyle="skinStyle" :maxHeight="height" :maxWidth="width"></schedule>
|
||||
<status-bar ref="statusBar" :maxTop="height" @setPosition="setPosition"></status-bar>
|
||||
<div class="plan-schedule" style="width: 100%">
|
||||
<title-bar ref="titleBar" @back="back" />
|
||||
<menu-bar ref="menuBar" :skin-style="skinStyle" @dispatchDialog="dispatchDialog" />
|
||||
<schedule ref="schedule" :group="group" :skin-style="skinStyle" :max-height="height" :max-width="width" />
|
||||
<status-bar ref="statusBar" :max-top="height" @setPosition="setPosition" />
|
||||
|
||||
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog"></manage-plan-list>
|
||||
<create-week-plan ref="createWeekPlan" @reloadTable="reloadTable"></create-week-plan>
|
||||
<create-today-plan ref="createTodayPlan"></create-today-plan>
|
||||
<modifying-plan ref="modifyingPlan" @dispatchDialog="dispatchDialog"></modifying-plan>
|
||||
<add-task ref="addTask"></add-task>
|
||||
<delete-task ref="deleteTask"></delete-task>
|
||||
<modifying-task ref="modifyingTask"></modifying-task>
|
||||
</div>
|
||||
<manage-plan-list ref="managePlanList" @dispatchDialog="dispatchDialog" />
|
||||
<create-week-plan ref="createWeekPlan" @reloadTable="reloadTable" />
|
||||
<create-today-plan ref="createTodayPlan" />
|
||||
<modifying-plan ref="modifyingPlan" @dispatchDialog="dispatchDialog" />
|
||||
<add-task ref="addTask" />
|
||||
<delete-task ref="deleteTask" />
|
||||
<modifying-task ref="modifyingTask" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import TitleBar from './titleBar';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuTool from './menuTool';
|
||||
import StatusBar from './statusBar';
|
||||
import Schedule from './schedule';
|
||||
import ManagePlanList from '../menusPlan/managePlanList'
|
||||
import CreateWeekPlan from '../menusPlan/createWeekPlan';
|
||||
import CreateTodayPlan from '../menusPlan/createTodayPlan';
|
||||
import ModifyingPlan from '../menusPlan/modifyingPlan';
|
||||
import AddTask from '../menusPlan/addTask';
|
||||
import DeleteTask from '../menusPlan/deleteTask'
|
||||
import ModifyingTask from '../menusPlan/modifyingTask';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import TitleBar from './titleBar';
|
||||
import MenuBar from './menuBar';
|
||||
import StatusBar from './statusBar';
|
||||
import Schedule from './schedule';
|
||||
import ManagePlanList from '../menusPlan/managePlanList';
|
||||
import CreateWeekPlan from '../menusPlan/createWeekPlan';
|
||||
import CreateTodayPlan from '../menusPlan/createTodayPlan';
|
||||
import ModifyingPlan from '../menusPlan/modifyingPlan';
|
||||
import AddTask from '../menusPlan/addTask';
|
||||
import DeleteTask from '../menusPlan/deleteTask';
|
||||
import ModifyingTask from '../menusPlan/modifyingTask';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
],
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
TitleBar,
|
||||
MenuBar,
|
||||
MenuTool,
|
||||
StatusBar,
|
||||
Schedule,
|
||||
ManagePlanList,
|
||||
CreateWeekPlan,
|
||||
CreateTodayPlan,
|
||||
ModifyingPlan,
|
||||
AddTask,
|
||||
DeleteTask,
|
||||
ModifyingTask
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
width: 0,
|
||||
height: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
skinStyle() {
|
||||
return this.$route.query.skinStyle || '02';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
this.width = this._clientWidth;
|
||||
this.height = this._clientHeight;
|
||||
},
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.schedule.setPosition();
|
||||
})
|
||||
},
|
||||
dispatchDialog(dialogObj) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs[dialogObj.name]) {
|
||||
this.$refs[dialogObj.name].doShow(dialogObj.params);
|
||||
}
|
||||
})
|
||||
},
|
||||
reloadTable(dialogObj) {
|
||||
if (this.$refs[dialogObj.name]) {
|
||||
this.$refs[dialogObj.name].reloadTable();
|
||||
}
|
||||
},
|
||||
confirm(params) {
|
||||
},
|
||||
back() {
|
||||
this.$emit('back');
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
TitleBar,
|
||||
MenuBar,
|
||||
StatusBar,
|
||||
Schedule,
|
||||
ManagePlanList,
|
||||
CreateWeekPlan,
|
||||
CreateTodayPlan,
|
||||
ModifyingPlan,
|
||||
AddTask,
|
||||
DeleteTask,
|
||||
ModifyingTask
|
||||
},
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
],
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
width: 0,
|
||||
height: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
skinStyle() {
|
||||
return this.$route.query.skinStyle || '02';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
this.width = this._clientWidth;
|
||||
this.height = this._clientHeight;
|
||||
},
|
||||
setPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.schedule.setPosition();
|
||||
});
|
||||
},
|
||||
dispatchDialog(dialogObj) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs[dialogObj.name]) {
|
||||
this.$refs[dialogObj.name].doShow(dialogObj.params);
|
||||
}
|
||||
});
|
||||
},
|
||||
reloadTable(dialogObj) {
|
||||
if (this.$refs[dialogObj.name]) {
|
||||
this.$refs[dialogObj.name].reloadTable();
|
||||
}
|
||||
},
|
||||
confirm(params) {
|
||||
},
|
||||
back() {
|
||||
this.$emit('back');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@ -207,7 +203,6 @@
|
||||
background: #ECE9D8 !important;
|
||||
}
|
||||
|
||||
|
||||
.beijing-01__schedule .el-dialog .el-button {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
@ -244,7 +239,6 @@
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
|
||||
.beijing-01__schedule .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
}
|
||||
@ -410,4 +404,4 @@
|
||||
background: #E9E9E9 !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -56,7 +56,7 @@
|
||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
||||
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input v-model="model.time" size="mini" readonly="true"></el-input>
|
||||
<el-input v-model="model.time" size="mini" :readonly="true"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
@ -1,164 +1,177 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm view-display" title="设备显示设置" :visible.sync="show" width="240px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button class="commit" :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button class="cancal" :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm view-display"
|
||||
title="设备显示设置"
|
||||
:visible.sync="show"
|
||||
width="240px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="deviceLevels">
|
||||
<div>
|
||||
<el-checkbox :label="1">车次窗</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="2">区段边界</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">确定
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" class="cancal" @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/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
export default {
|
||||
name: 'ViewDevice',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: '',
|
||||
deviceLevels: [2, 3, 4, 5]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
//如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setDeviceDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活,而是第一次显示,需要初始化数据
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.deviceLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setDeviceDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
const deviceList = [];
|
||||
|
||||
//区段边界设置
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
//区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||
elem.borderBorderShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
// 区段边界设置
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// 区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1;
|
||||
elem._type = deviceType.Section;
|
||||
elem.borderBorderShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
//车次窗设置
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
//车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
// 车次窗设置
|
||||
const trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
// 车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1;
|
||||
elem._type = deviceType.TrainWindow;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
//联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
//联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
//ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
})
|
||||
}
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem._type = deviceType.Signal;
|
||||
// 联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
// ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,153 +1,167 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="fuzhou-01__systerm route-lock" :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="table" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
|
||||
:height="140">
|
||||
<el-table-column prop="name" label="按钮名称">
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="按钮状态">
|
||||
</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="fuzhou-01__systerm route-lock"
|
||||
: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="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column prop="name" label="按钮名称" />
|
||||
<el-table-column prop="status" label="按钮状态" />
|
||||
</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 NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteLock',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
operate: null,
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '封锁信号按钮'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
//入股不是断点激活,而是第一次显示需要初始化
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
export default {
|
||||
name: 'RouteLock',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
operate: null,
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '封锁信号按钮';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, 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);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
/** status 04:封锁*/
|
||||
let signal = (selected || {}).state;
|
||||
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? '未封锁' : '封锁' }]
|
||||
let timer = setInterval(() => {
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.setCurrentRow(this.tempData[0]);
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
/** status 04:封锁*/
|
||||
const signal = (selected || {}).status;
|
||||
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? '未封锁' : '封锁' }];
|
||||
const timer = setInterval(() => {
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.setCurrentRow(this.tempData[0]);
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.lock.menu.operation
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.lock.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,259 +1,267 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou-01__systerm view-name" title="名称显示设置" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">股道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<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="fuzhou-01__systerm view-name"
|
||||
title="名称显示设置"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-checkbox-group v-model="nameLevels">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="1">信号机名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="2">站台轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox :label="4">折返轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="5">股道名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="7">道岔名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="9">道岔区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="10">目的地名称</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-checkbox :label="11">计轴区段名称</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-checkbox dio :label="12">公里标</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-checkbox-group>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'viewName',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.setNameDisplay();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活显示,而是第一次显示时,需要初始化参数
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: this.nameLevels.sort().join('::')
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
setNameDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.setNameDisplay();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
let show = false;
|
||||
const deviceList = [];
|
||||
|
||||
// 信号机
|
||||
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem._type = deviceType.Signal;
|
||||
elem.nameShow = show;
|
||||
deviceList.push(elem);
|
||||
})
|
||||
}
|
||||
// 信号机
|
||||
show = this.nameLevels.indexOf(1) !== -1;
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem._type = deviceType.Signal;
|
||||
elem.nameShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
// 按钮名称
|
||||
show = this.nameLevels.indexOf(3) !== -1;
|
||||
|
||||
// 道岔
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
elem._type = deviceType.Switch;
|
||||
// 道岔名称
|
||||
show = this.nameLevels.indexOf(7) !== -1;
|
||||
elem.nameShow = show;
|
||||
// 道岔轨名称
|
||||
show = this.nameLevels.indexOf(9) !== -1;
|
||||
elem.switchSectionNameShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
// 道岔
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
elem._type = deviceType.Switch;
|
||||
// 道岔名称
|
||||
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
// 道岔轨名称
|
||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
elem.switchSectionNameShow = show;
|
||||
deviceList.push(elem);
|
||||
})
|
||||
}
|
||||
// 控制模式
|
||||
show = this.nameLevels.indexOf(8) !== -1;
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
elem._type = deviceType.StationControl;
|
||||
// 标识灯名称
|
||||
elem.indicatorShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
elem._type = deviceType.StationControl;
|
||||
// 标识灯名称
|
||||
elem.indicatorShow = show;
|
||||
deviceList.push(elem);
|
||||
})
|
||||
}
|
||||
// 区段
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
elem._type = deviceType.Section;
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
elem.nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
// 计轴区段名称
|
||||
show = this.nameLevels.indexOf(11) !== -1;
|
||||
elem.nameShow = show;
|
||||
} else if (elem.type === '02') {
|
||||
// 股道轨名称
|
||||
show = this.nameLevels.indexOf(5) !== -1;
|
||||
elem.nameShow = show;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
show = this.nameLevels.indexOf(9) !== -1;
|
||||
elem.nameShow = show;
|
||||
}
|
||||
}
|
||||
|
||||
// 区段
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
elem._type = deviceType.Section;
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
elem.nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
// 计轴区段名称
|
||||
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
} else if (elem.type === '02') {
|
||||
// 股道轨名称
|
||||
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
}
|
||||
}
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
show = this.nameLevels.indexOf(2) !== -1;
|
||||
elem.standTrackNameShow = show;
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
elem.standTrackNameShow = show;
|
||||
}
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
show = this.nameLevels.indexOf(4) !== -1;
|
||||
elem.reentryTrackNameShow = show;
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
elem.reentryTrackNameShow = show;
|
||||
}
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
show = this.nameLevels.indexOf(6) !== -1;
|
||||
elem.transferTrackNameShow = show;
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
elem.transferTrackNameShow = show;
|
||||
}
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
deviceList.push(elem);
|
||||
})
|
||||
}
|
||||
// 车站
|
||||
show = this.nameLevels.indexOf(12) !== -1;
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
elem._type = deviceType.Station;
|
||||
// 公里标
|
||||
elem.kmPostShow = show;
|
||||
deviceList.push(elem);
|
||||
|
||||
// 车站
|
||||
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
elem._type = deviceType.Station;
|
||||
// 公里标
|
||||
elem.kmPostShow = show;
|
||||
deviceList.push(elem);
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
this.$store.dispatch('map/updateMapDevices', deviceList);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -97,10 +97,6 @@ export function parser(data, jmap) {
|
||||
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Train, elem));
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.trainWindowList || [], elem => {
|
||||
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.TrainWindow, elem));
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.Line || [], elem => {
|
||||
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Line, elem));
|
||||
}, this);
|
||||
@ -109,31 +105,41 @@ export function parser(data, jmap) {
|
||||
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Text, elem));
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.switchList || [], elem => {
|
||||
const device = deviceFactory(deviceType.Switch, elem);
|
||||
const cnodeSection = mapDevice[device.sectionACode];
|
||||
const lnodeSection = mapDevice[device.sectionBCode];
|
||||
const rnodeSection = mapDevice[device.sectionCCode];
|
||||
zrUtil.each(data.trainWindowList || [], elem => {
|
||||
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.TrainWindow, elem));
|
||||
if (elem.sectionCode) {
|
||||
const section = mapDevice[elem.sectionCode];
|
||||
if (section) {
|
||||
section['trainWindowCode'] = elem.code;
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
|
||||
cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = device;
|
||||
zrUtil.each(data.switchList || [], elem => {
|
||||
mapDevice[elem.code] = propConvert.initPrivateProps(deviceFactory(deviceType.Switch, elem));
|
||||
const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode];
|
||||
const lnodeSection = mapDevice[mapDevice[elem.code].sectionBCode];
|
||||
const rnodeSection = mapDevice[mapDevice[elem.code].sectionCCode];
|
||||
|
||||
cnodeSection['switch'] = lnodeSection['switch'] = rnodeSection['switch'] = mapDevice[elem.code];
|
||||
|
||||
if (cnodeSection && lnodeSection && rnodeSection) {
|
||||
const cnode = mapDevice[cnodeSection.linkCode];
|
||||
if (cnode && cnode.leftFdCode === lnodeSection.linkCode && cnode.leftSdCode === rnodeSection.linkCode) {
|
||||
device.intersection = {
|
||||
mapDevice[elem.code].intersection = {
|
||||
x: cnodeSection.points[0].x,
|
||||
y: cnodeSection.points[0].y
|
||||
};
|
||||
device.skew = {
|
||||
mapDevice[elem.code].skew = {
|
||||
x: rnodeSection.points[rnodeSection.points.length - 2].x,
|
||||
y: rnodeSection.points[rnodeSection.points.length - 2].y
|
||||
};
|
||||
} else if (cnode && cnode.rightFdCode === lnodeSection.linkCode && cnode.rightSdCode === rnodeSection.linkCode) {
|
||||
device.intersection = {
|
||||
mapDevice[elem.code].intersection = {
|
||||
x: cnodeSection.points[cnodeSection.points.length - 1].x,
|
||||
y: cnodeSection.points[cnodeSection.points.length - 1].y
|
||||
};
|
||||
device.skew = {
|
||||
mapDevice[elem.code].skew = {
|
||||
x: rnodeSection.points[1].x,
|
||||
y: rnodeSection.points[1].y
|
||||
};
|
||||
@ -141,16 +147,15 @@ export function parser(data, jmap) {
|
||||
|
||||
const section = mapDevice[cnodeSection.parentCode];
|
||||
if (section) {
|
||||
device.sectionName = section.name;
|
||||
mapDevice[elem.code].sectionName = section.name;
|
||||
section['relSwitchCode'] = elem.code;
|
||||
}
|
||||
|
||||
device['sectionAInstance'] = cnodeSection;
|
||||
device['sectionBInstance'] = lnodeSection;
|
||||
device['sectionCInstance'] = rnodeSection;
|
||||
mapDevice[elem.code]['sectionAInstance'] = cnodeSection;
|
||||
mapDevice[elem.code]['sectionBInstance'] = lnodeSection;
|
||||
mapDevice[elem.code]['sectionCInstance'] = rnodeSection;
|
||||
rnodeSection['layer'] = -1;
|
||||
}
|
||||
|
||||
mapDevice[elem.code] = propConvert.initPrivateProps(device);
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
// {id: "16", trainingType: "03", name: "道岔位置(反)"}
|
||||
export const OperationList = {
|
||||
'01': {
|
||||
list: [],
|
||||
list: []
|
||||
},
|
||||
'02': {
|
||||
list: [
|
||||
@ -37,7 +37,7 @@ export const OperationList = {
|
||||
{ deviceType: '05', orderNum: 4, operateCode: '204', tip: '鼠标左键点击【请求中控】', val: '{2}' },
|
||||
{ deviceType: '05', orderNum: 5, operateCode: '2043', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
|
||||
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -56,7 +56,7 @@ export const OperationList = {
|
||||
{ deviceType: '05', orderNum: 4, operateCode: '202', tip: '鼠标左键点击【请求站控】', val: '{2}' },
|
||||
{ deviceType: '05', orderNum: 5, operateCode: '2023', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
|
||||
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -76,7 +76,7 @@ export const OperationList = {
|
||||
{ deviceType: '05', orderNum: 5, operateCode: '203', tip: '鼠标左键点击【强制站控】', val: '{2}' },
|
||||
{ deviceType: '05', orderNum: 6, operateCode: '2033', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
|
||||
{ deviceType: '05', orderNum: 7, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: 'bar', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: 'bar', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -90,7 +90,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -104,7 +104,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -118,7 +118,7 @@ export const OperationList = {
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '506', tip: '鼠标右键菜单选择【强制取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '506', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '506', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -132,7 +132,7 @@ export const OperationList = {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{11}' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -147,7 +147,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5081', tip: '鼠标右键菜单选择【{14}全线】', val: '{13}' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{13}' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{13}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -161,7 +161,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -175,7 +175,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -189,7 +189,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【查询站台状态】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -205,7 +205,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -222,7 +222,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -240,7 +240,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' },
|
||||
{ deviceType: '06', orderNum: 6, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' },
|
||||
{ deviceType: '06', orderNum: 6, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -256,7 +256,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击,选择【60】', val: '60' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::true' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::true' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::true' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -273,7 +273,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击,选择【60】', val: '60' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::false' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::false' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::false' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -287,7 +287,7 @@ export const OperationList = {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '501', tip: '鼠标右键菜单选择【设置提前发车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -302,7 +302,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【人工折返策略设置】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -320,7 +320,7 @@ export const OperationList = {
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '4026', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4024', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4025', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -334,7 +334,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【区段切除】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -348,7 +348,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【区段激活】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -365,7 +365,7 @@ export const OperationList = {
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '4091', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4093', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4094', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -379,7 +379,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -396,7 +396,7 @@ export const OperationList = {
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '4041', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4043', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4044', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -415,7 +415,7 @@ export const OperationList = {
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '5' },
|
||||
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -433,7 +433,7 @@ export const OperationList = {
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4082', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4083', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '4084', tip: '鼠标左键点击【确认2】按钮', val: '5' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -448,7 +448,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -465,7 +465,7 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1041', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1043', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '02', orderNum: 4, operateCode: '1044', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -479,7 +479,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔区段封闭】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -496,7 +496,7 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1061', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1063', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '02', orderNum: 4, operateCode: '1064', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -510,7 +510,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '107', tip: '鼠标右键菜单选择【道岔转动】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '107', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '107', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -527,7 +527,7 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1091', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1093', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '02', orderNum: 4, operateCode: '1094', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -544,7 +544,7 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1101', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1103', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '02', orderNum: 4, operateCode: '1104', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -558,7 +558,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -572,7 +572,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -591,7 +591,7 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '5' },
|
||||
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -609,7 +609,7 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1142', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 4, operateCode: '1143', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '1144', tip: '鼠标左键点击【确认2】按钮', val: '5' },
|
||||
{ deviceType: '02', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '02', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -626,7 +626,7 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【进路选排】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3012', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3012', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -641,7 +641,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3031', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3031', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -655,7 +655,7 @@ export const OperationList = {
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -669,7 +669,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -687,7 +687,7 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3073', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '04', orderNum: 5, operateCode: '3074', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '04', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '04', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -702,7 +702,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '313', tip: '鼠标右键菜单选择【信号关灯】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '313', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3131', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3131', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -717,7 +717,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -734,7 +734,7 @@ export const OperationList = {
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' },
|
||||
{ deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -749,7 +749,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -764,7 +764,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -778,7 +778,7 @@ export const OperationList = {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制模式】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -792,7 +792,7 @@ export const OperationList = {
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置联锁自动进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -806,7 +806,7 @@ export const OperationList = {
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消联锁自动进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -820,7 +820,7 @@ export const OperationList = {
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '311', tip: '鼠标右键菜单选择【设置联锁自动触发】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -834,9 +834,9 @@ export const OperationList = {
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '312', tip: '鼠标右键菜单选择【取消联锁自动触发】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '312', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '312', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
'03': {
|
||||
@ -849,10 +849,10 @@ export const OperationList = {
|
||||
trainingName: '设置扣车({10}-{12} 站台)',
|
||||
trainingRemark: '设置扣车功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮', },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -863,10 +863,10 @@ export const OperationList = {
|
||||
trainingName: '取消扣车({10}-{12} 站台)',
|
||||
trainingRemark: '取消扣车功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮', },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -877,10 +877,10 @@ export const OperationList = {
|
||||
trainingName: '设置跳停({10}-{12} 站台)',
|
||||
trainingRemark: '设置跳停功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -891,12 +891,12 @@ export const OperationList = {
|
||||
trainingName: '设置跳停({10}-{12} 站台)',
|
||||
trainingRemark: '设置指定001号列车跳停功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5024', tip: '鼠标左键点击' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5022', tip: '请选择001号车', val: '001' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -907,10 +907,10 @@ export const OperationList = {
|
||||
trainingName: '取消跳停({10}-{12} 站台)',
|
||||
trainingRemark: '取消跳停功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -921,12 +921,12 @@ export const OperationList = {
|
||||
trainingName: '取消跳停({10}-{12} 站台)',
|
||||
trainingRemark: '取消指定001号列车跳停功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5034', tip: '鼠标左键点击' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5032', tip: '请选择001号车', val: '001' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -937,10 +937,10 @@ export const OperationList = {
|
||||
trainingName: '查询站台状态({10}-{12} 站台)',
|
||||
trainingRemark: '查询站台状态功能',
|
||||
trainingType: '05',
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
productTypes: ['01,02'], // 产品类型 01 现地 02 行调
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【站台信息】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -955,7 +955,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -971,7 +971,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -988,7 +988,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击,调整为【20】', val: '20' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1004,7 +1004,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【运行时间控制】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1021,7 +1021,7 @@ export const OperationList = {
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【1】', val: '1' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击,选择【115】', val: '115' },
|
||||
{ deviceType: '06', orderNum: 4, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::false' },
|
||||
{ deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::false' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1035,7 +1035,7 @@ export const OperationList = {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '501', tip: '鼠标右键菜单选择【提前发车】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1050,7 +1050,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【变通策略管理】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -1065,7 +1065,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【轨道切除】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1079,7 +1079,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【轨道激活】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1098,7 +1098,7 @@ export const OperationList = {
|
||||
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '15' },
|
||||
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -1113,7 +1113,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【轨道切除】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1127,7 +1127,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【轨道激活】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1166,7 +1166,7 @@ export const OperationList = {
|
||||
{ deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' },
|
||||
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '35' },
|
||||
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -1182,7 +1182,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【排列进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1196,7 +1196,7 @@ export const OperationList = {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1210,7 +1210,7 @@ export const OperationList = {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制状态】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1225,7 +1225,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择【{5}】', val: '{6}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1240,7 +1240,7 @@ export const OperationList = {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路交人工控】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择【{5}】', val: '{6}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1254,7 +1254,7 @@ export const OperationList = {
|
||||
productTypes: ['01,02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -1273,9 +1273,9 @@ export const OperationList = {
|
||||
{ deviceType: '10', orderNum: 3, operateCode: '8003', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '10', orderNum: 4, operateCode: '8004', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '10', orderNum: 5, operateCode: '8005', tip: '鼠标左键点击【关闭】按钮' },
|
||||
{ deviceType: '10', orderNum: 6, operateCode: '8006', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '10', orderNum: 6, operateCode: '8006', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -75,7 +75,7 @@ function queryEffectedModels(map, device, effectedDeviceList) {
|
||||
}
|
||||
}
|
||||
|
||||
function saveMapDeviceDefaultConvert(state) {
|
||||
function saveMapDeviceDefaultRelations(state) {
|
||||
if (state && state.map) {
|
||||
const map = state.map;
|
||||
const deviceMap = Vue.prototype.$jlmap.mapDevice;
|
||||
@ -173,6 +173,10 @@ function saveMapDeviceDefaultConvert(state) {
|
||||
sectionc.isSwitchSection = true;
|
||||
sectionc.relSwitchCode = elem.code;
|
||||
}
|
||||
const sectionp = deviceMap[sectiona.parentCode || sectionb.parentCode || sectionc.parentCode];
|
||||
if (sectionp) {
|
||||
sectionp.relSwitchCode = elem.code;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -498,8 +502,8 @@ const map = {
|
||||
});
|
||||
},
|
||||
|
||||
saveMapDeviceDefaultConvert({ state }) {
|
||||
saveMapDeviceDefaultConvert(state);
|
||||
saveMapDeviceDefaultRelations({ state }) {
|
||||
saveMapDeviceDefaultRelations(state);
|
||||
},
|
||||
|
||||
mapViewLoaded: ({ commit }) => {
|
||||
|
@ -3,388 +3,389 @@ import store from '@/store';
|
||||
|
||||
function handle(state, data) {
|
||||
// console.log(data, 'socket订阅');
|
||||
let msg = data.body;
|
||||
const msg = data.body;
|
||||
switch (data.type) {
|
||||
case 'Order_Pay_Result': { // 订单支付结果消息
|
||||
state.payOrder = msg;
|
||||
} break;
|
||||
case 'JointTraining_Room': { // 综合演练室-房间消息
|
||||
state.jointRoomInfo = msg; // 房间信息
|
||||
} break;
|
||||
case 'JointTraining_User': { // 综合演练室-用户消息
|
||||
handleUserinfo(state, msg); // 分配角色权限消息
|
||||
} break;
|
||||
case 'JointTraining_Chat': { // 综合演练室-群聊消息
|
||||
handleRecordList(state, msg);
|
||||
} break;
|
||||
case 'Simulation_DeviceStatus': { // 仿真-设备状态消息
|
||||
state.equipmentStatus = msg;
|
||||
} break;
|
||||
case 'Simulation_RunFact': { // 仿真-列车实际到发车站消息
|
||||
state.trainStationList = msg;
|
||||
} break;
|
||||
case 'Simulation_Error': { // 仿真-异常消息
|
||||
state.simulationError = msg;
|
||||
} break;
|
||||
case 'Simulation_RunAsPlan_Start': { // 仿真-仿真开始按计划行车消息
|
||||
state.simulationStart = msg;
|
||||
} break;
|
||||
case 'Simulation_Reset': { // 仿真-仿真重置消息 退出计划行车
|
||||
state.simulationReset = msg;
|
||||
} break;
|
||||
case 'Simulation_Conversation': { // 仿真-用户交互消息(聊天/命令)
|
||||
handleSimulationInfo(state, msg);
|
||||
} break;
|
||||
case 'Simulation_PlayBack_Conversation': {// 回放-用户交互消息
|
||||
handleSimulationInfo(state, msg);
|
||||
} break;
|
||||
case 'Simulation_ApplyHandle': { // 请求处理消息
|
||||
handlePushMsgQueue(state, msg);
|
||||
} break;
|
||||
case 'JointTraining_User_Permit': { // 综合演练室-用户获取权限消息
|
||||
state.userPermit = msg;
|
||||
} break;
|
||||
case 'JointTraining_User_RoomKickOut': { // 综合演练室-用户被踢出房间消息
|
||||
state.userRoomKickOut = msg; // 没有给被踢用户发送
|
||||
handleMessageInfo(state, 'userRoomKickOut', msg);
|
||||
} break;
|
||||
case 'JointTraining_User_InRoom': { // 综合演练室-用户从外部进入房间消息
|
||||
state.userInRoom = msg;
|
||||
handleMessageInfo(state, 'userInRoom', msg);
|
||||
} break;
|
||||
case 'JointTraining_User_OutRoom': { // 综合演练室-用户退出房间消息
|
||||
state.userOutRoom = msg;
|
||||
handleMessageInfo(state, 'userOutRoom', msg);
|
||||
} break;
|
||||
case 'JointTraining_User_InSimulation': { // 综合演练室-用户进入仿真消息
|
||||
state.userInSimulation = msg;
|
||||
handleMessageInfoSimulation(state, 'userInSimulation', msg);
|
||||
} break;
|
||||
case 'JointTraining_User_BackRoom': { // 综合演练室-用户从仿真返回房间消息
|
||||
state.userBackRoom = msg;
|
||||
handleMessageInfoSimulation(state, 'userBackRoom', msg);
|
||||
} break;
|
||||
case 'JointTraining_Room_Invite': { // 综合演练室-房间邀请消息
|
||||
state.roomInvite = msg;
|
||||
} break;
|
||||
case 'Big_Screen_Simulation_DeviceStatus': { //大屏仿真状态数据
|
||||
state.equipmentStatus = msg;
|
||||
} break;
|
||||
case 'Big_Screen_Simulation_RunFact': { //大屏仿真运行图状态
|
||||
state.trainStationList = msg;
|
||||
} break;
|
||||
case 'Plan_Simulation_DeviceStatus': { //大屏仿真状态数据
|
||||
state.equipmentStatus = msg;
|
||||
} break;
|
||||
case 'Plan_Simulation_RunFact': { //大屏仿真运行图状态
|
||||
state.trainStationList = msg;
|
||||
} break;
|
||||
case 'Simulation_Permission_Over': { //权限结束
|
||||
state.permissionOver = msg;
|
||||
} break;
|
||||
case 'Simulation_Quest_Finish': { //任务结束标志
|
||||
state.tipOperateCount++;
|
||||
}
|
||||
case 'Order_Pay_Result': // 订单支付结果消息
|
||||
state.payOrder = msg;
|
||||
break;
|
||||
case 'JointTraining_Room': // 综合演练室-房间消息
|
||||
state.jointRoomInfo = msg; // 房间信息
|
||||
break;
|
||||
case 'JointTraining_User': // 综合演练室-用户消息
|
||||
handleUserinfo(state, msg); // 分配角色权限消息
|
||||
break;
|
||||
case 'JointTraining_Chat': // 综合演练室-群聊消息
|
||||
handleRecordList(state, msg);
|
||||
break;
|
||||
case 'Simulation_DeviceStatus': // 仿真-设备状态消息
|
||||
state.equipmentStatus = msg;
|
||||
break;
|
||||
case 'Simulation_RunFact': // 仿真-列车实际到发车站消息
|
||||
state.trainStationList = msg;
|
||||
break;
|
||||
case 'Simulation_Error': // 仿真-异常消息
|
||||
state.simulationError = msg;
|
||||
break;
|
||||
case 'Simulation_RunAsPlan_Start': // 仿真-仿真开始按计划行车消息
|
||||
state.simulationStart = msg;
|
||||
break;
|
||||
case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车
|
||||
state.simulationReset = msg;
|
||||
break;
|
||||
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
||||
handleSimulationInfo(state, msg);
|
||||
break;
|
||||
case 'Simulation_PlayBack_Conversation': // 回放-用户交互消息
|
||||
handleSimulationInfo(state, msg);
|
||||
break;
|
||||
case 'Simulation_ApplyHandle': // 请求处理消息
|
||||
handlePushMsgQueue(state, msg);
|
||||
break;
|
||||
case 'JointTraining_User_Permit': // 综合演练室-用户获取权限消息
|
||||
state.userPermit = msg;
|
||||
break;
|
||||
case 'JointTraining_User_RoomKickOut': // 综合演练室-用户被踢出房间消息
|
||||
state.userRoomKickOut = msg; // 没有给被踢用户发送
|
||||
handleMessageInfo(state, 'userRoomKickOut', msg);
|
||||
break;
|
||||
case 'JointTraining_User_InRoom': // 综合演练室-用户从外部进入房间消息
|
||||
state.userInRoom = msg;
|
||||
handleMessageInfo(state, 'userInRoom', msg);
|
||||
break;
|
||||
case 'JointTraining_User_OutRoom': // 综合演练室-用户退出房间消息
|
||||
state.userOutRoom = msg;
|
||||
handleMessageInfo(state, 'userOutRoom', msg);
|
||||
break;
|
||||
case 'JointTraining_User_InSimulation': // 综合演练室-用户进入仿真消息
|
||||
state.userInSimulation = msg;
|
||||
handleMessageInfoSimulation(state, 'userInSimulation', msg);
|
||||
break;
|
||||
case 'JointTraining_User_BackRoom': // 综合演练室-用户从仿真返回房间消息
|
||||
state.userBackRoom = msg;
|
||||
handleMessageInfoSimulation(state, 'userBackRoom', msg);
|
||||
break;
|
||||
case 'JointTraining_Room_Invite': // 综合演练室-房间邀请消息
|
||||
state.roomInvite = msg;
|
||||
break;
|
||||
case 'Big_Screen_Simulation_DeviceStatus': // 大屏仿真状态数据
|
||||
state.equipmentStatus = msg;
|
||||
break;
|
||||
case 'Big_Screen_Simulation_RunFact': // 大屏仿真运行图状态
|
||||
state.trainStationList = msg;
|
||||
break;
|
||||
case 'Plan_Simulation_DeviceStatus': // 大屏仿真状态数据
|
||||
state.equipmentStatus = msg;
|
||||
break;
|
||||
case 'Plan_Simulation_RunFact': // 大屏仿真运行图状态
|
||||
state.trainStationList = msg;
|
||||
break;
|
||||
case 'Simulation_Permission_Over': // 权限结束
|
||||
state.permissionOver = msg;
|
||||
break;
|
||||
case 'Simulation_Quest_Finish': // 任务结束标志
|
||||
state.tipOperateCount++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 操作聊天信息
|
||||
function handleRecordList(state, data) {
|
||||
let userId = store.state.user.id;
|
||||
let isSelf = false;
|
||||
if (data.member.id == userId) {
|
||||
isSelf = true;
|
||||
}
|
||||
let myDate = new Date();
|
||||
let myDate1 = myDate.toLocaleDateString().replace(/\//g, "-");
|
||||
let param = {
|
||||
join: false,
|
||||
value: data.message,
|
||||
self: isSelf,
|
||||
voice: data.isAudio,
|
||||
src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '',
|
||||
other: !isSelf,
|
||||
userName: data.member.nickName,
|
||||
chatTime: data.chatTime,
|
||||
chatInfo: true,
|
||||
inSimulation: false,
|
||||
inRoom: true,
|
||||
date: +new Date(`${myDate1} ${data.chatTime}`),
|
||||
};
|
||||
state.chatContentList = param;
|
||||
const userId = store.state.user.id;
|
||||
let isSelf = false;
|
||||
if (data.member.id == userId) {
|
||||
isSelf = true;
|
||||
}
|
||||
const myDate = new Date();
|
||||
const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
|
||||
const param = {
|
||||
join: false,
|
||||
value: data.message,
|
||||
self: isSelf,
|
||||
voice: data.isAudio,
|
||||
src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '',
|
||||
other: !isSelf,
|
||||
userName: data.member.nickName,
|
||||
chatTime: data.chatTime,
|
||||
chatInfo: true,
|
||||
inSimulation: false,
|
||||
inRoom: true,
|
||||
date: +new Date(`${myDate1} ${data.chatTime}`)
|
||||
};
|
||||
state.chatContentList = param;
|
||||
}
|
||||
// 仿真内部聊天
|
||||
function handleSimulationInfo(state, data) {
|
||||
let userId = store.state.user.id;
|
||||
let isSelf = false;
|
||||
if (data.member.userId == userId) {
|
||||
isSelf = true;
|
||||
}
|
||||
let role = '';
|
||||
switch (data.member.role) {
|
||||
case '01': {
|
||||
role = '管理员';
|
||||
} break;
|
||||
case '02': {
|
||||
role = '教员';
|
||||
} break;
|
||||
case '03': {
|
||||
role = `调度员`;
|
||||
} break;
|
||||
case '04': {
|
||||
store.state.map.map.stationList.forEach(nor => {
|
||||
if (nor.code == data.member.deviceCode) {
|
||||
role = `${nor.name}`;
|
||||
}
|
||||
});
|
||||
} break;
|
||||
}
|
||||
if (!data.member.userId && data.member.deviceName) {
|
||||
data.member.nickName = data.member.deviceName;
|
||||
}
|
||||
if (!data.targetMember.userId && data.targetMember.deviceName) {
|
||||
data.targetMember.nickName = data.targetMember.deviceName;
|
||||
}
|
||||
let myDate = new Date();
|
||||
let myDate1 = myDate.toLocaleDateString().replace(/\//g, "-");
|
||||
let chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime;
|
||||
let param = {
|
||||
join: false,
|
||||
value: data.message,
|
||||
self: isSelf,
|
||||
voice: data.isAudio,
|
||||
src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '',
|
||||
other: !isSelf,
|
||||
userName: '',
|
||||
id: data.member.id,
|
||||
chatTime: data.chatTime,
|
||||
date: +new Date(`${myDate1} ${chatTime}`),
|
||||
conversationId: data.conversationId,
|
||||
changeVO: data.changeVO || {},
|
||||
targetMember: data.targetMember,
|
||||
member: data.member,
|
||||
group: data.group,
|
||||
};
|
||||
if (data.member.role) {
|
||||
param.userName = `${role}【${data.member.nickName}】`;
|
||||
} else {
|
||||
param.userName = `${data.member.nickName}`;
|
||||
}
|
||||
state.simulationText = param;
|
||||
const userId = store.state.user.id;
|
||||
let isSelf = false;
|
||||
if (data.member.userId == userId) {
|
||||
isSelf = true;
|
||||
}
|
||||
let role = '';
|
||||
switch (data.member.role) {
|
||||
case '01':
|
||||
role = '管理员';
|
||||
break;
|
||||
case '02':
|
||||
role = '教员';
|
||||
break;
|
||||
case '03':
|
||||
role = `调度员`;
|
||||
break;
|
||||
case '04':
|
||||
store.state.map.map.stationList.forEach(nor => {
|
||||
if (nor.code == data.member.deviceCode) {
|
||||
role = `${nor.name}`;
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
if (!data.member.userId && data.member.deviceName) {
|
||||
data.member.nickName = data.member.deviceName;
|
||||
}
|
||||
if (!data.targetMember.userId && data.targetMember.deviceName) {
|
||||
data.targetMember.nickName = data.targetMember.deviceName;
|
||||
}
|
||||
const myDate = new Date();
|
||||
const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
|
||||
const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime;
|
||||
const param = {
|
||||
join: false,
|
||||
value: data.message,
|
||||
self: isSelf,
|
||||
voice: data.isAudio,
|
||||
src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '',
|
||||
other: !isSelf,
|
||||
userName: '',
|
||||
id: data.member.id,
|
||||
chatTime: data.chatTime,
|
||||
date: +new Date(`${myDate1} ${chatTime}`),
|
||||
conversationId: data.conversationId,
|
||||
changeVO: data.changeVO || {},
|
||||
targetMember: data.targetMember,
|
||||
member: data.member,
|
||||
group: data.group
|
||||
};
|
||||
if (data.member.role) {
|
||||
param.userName = `${role}【${data.member.nickName}】`;
|
||||
} else {
|
||||
param.userName = `${data.member.nickName}`;
|
||||
}
|
||||
state.simulationText = param;
|
||||
}
|
||||
function handleUserinfo(state, data) {
|
||||
if (data.length) { // 分配角色信息
|
||||
state.roleInfo = data;
|
||||
}
|
||||
if (data.length) { // 分配角色信息
|
||||
state.roleInfo = data;
|
||||
}
|
||||
}
|
||||
function handleMessageInfo(state, type, data) {
|
||||
let message = {
|
||||
join: true,
|
||||
id: data.id,
|
||||
userName: data.nickName,
|
||||
userRole: data.userRole,
|
||||
name: data.name,
|
||||
roomTip: '',
|
||||
chatInfo: true,
|
||||
inSimulation: data.inSimulation,
|
||||
inRoom: data.inRoom,
|
||||
session: 'session',
|
||||
type: type,
|
||||
oneself: data.id === store.state.user.id,
|
||||
};
|
||||
switch (type) {
|
||||
case 'userInRoom': {
|
||||
message.roomTip = `${data.nickName}进入房间`;
|
||||
} break;
|
||||
case 'userRoomKickOut': {
|
||||
message.roomTip = `${data.nickName}被踢出房间`;
|
||||
} break;
|
||||
case 'userOutRoom': {
|
||||
message.roomTip = `${data.nickName}退出房间`;
|
||||
} break;
|
||||
}
|
||||
state.chatContentList = message;
|
||||
const message = {
|
||||
join: true,
|
||||
id: data.id,
|
||||
userName: data.nickName,
|
||||
userRole: data.userRole,
|
||||
name: data.name,
|
||||
roomTip: '',
|
||||
chatInfo: true,
|
||||
inSimulation: data.inSimulation,
|
||||
inRoom: data.inRoom,
|
||||
session: 'session',
|
||||
type: type,
|
||||
oneself: data.id === store.state.user.id
|
||||
};
|
||||
switch (type) {
|
||||
case 'userInRoom':
|
||||
message.roomTip = `${data.nickName}进入房间`;
|
||||
break;
|
||||
case 'userRoomKickOut':
|
||||
message.roomTip = `${data.nickName}被踢出房间`;
|
||||
break;
|
||||
case 'userOutRoom':
|
||||
message.roomTip = `${data.nickName}退出房间`;
|
||||
break;
|
||||
}
|
||||
state.chatContentList = message;
|
||||
}
|
||||
function handleMessageInfoSimulation(state, type, data) {
|
||||
let message = {
|
||||
join: true,
|
||||
id: data.id,
|
||||
userName: data.nickName,
|
||||
userRole: data.userRole,
|
||||
name: data.name,
|
||||
simulationTip: '',
|
||||
chatInfo: true,
|
||||
inSimulation: data.inSimulation,
|
||||
inRoom: data.inRoom,
|
||||
session: 'session',
|
||||
};
|
||||
switch (type) {
|
||||
case 'userInSimulation': {
|
||||
message.simulationTip = `${data.nickName}进入仿真`;
|
||||
} break;
|
||||
case 'userBackRoom': {
|
||||
message.simulationTip = `${data.nickName}退出仿真`;
|
||||
} break;
|
||||
}
|
||||
state.chatContentSimuList = message;
|
||||
const message = {
|
||||
join: true,
|
||||
id: data.id,
|
||||
userName: data.nickName,
|
||||
userRole: data.userRole,
|
||||
name: data.name,
|
||||
simulationTip: '',
|
||||
chatInfo: true,
|
||||
inSimulation: data.inSimulation,
|
||||
inRoom: data.inRoom,
|
||||
session: 'session'
|
||||
};
|
||||
switch (type) {
|
||||
case 'userInSimulation':
|
||||
message.simulationTip = `${data.nickName}进入仿真`;
|
||||
break;
|
||||
case 'userBackRoom':
|
||||
message.simulationTip = `${data.nickName}退出仿真`;
|
||||
break;
|
||||
}
|
||||
state.chatContentSimuList = message;
|
||||
}
|
||||
function handlePushMsgQueue(state, msg) {
|
||||
if (msg instanceof Array) {
|
||||
state.msgQueue.concat(msg);
|
||||
} else {
|
||||
state.msgQueue.push(msg);
|
||||
}
|
||||
if (msg instanceof Array) {
|
||||
state.msgQueue.concat(msg);
|
||||
} else {
|
||||
state.msgQueue.push(msg);
|
||||
}
|
||||
|
||||
if (!state.msgHead) {
|
||||
state.msgHead = state.msgQueue[0];
|
||||
}
|
||||
if (!state.msgHead) {
|
||||
state.msgHead = state.msgQueue[0];
|
||||
}
|
||||
}
|
||||
|
||||
const socket = {
|
||||
namespaced: true,
|
||||
namespaced: true,
|
||||
|
||||
state: {
|
||||
payOrder: {}, // 支付消息
|
||||
jointRoomInfo: {}, // 受邀请房间信息
|
||||
chatContentList: {}, // 聊天室聊天内容
|
||||
roleInfo: [], // 设置角色信息
|
||||
jointRoomPrepare: false, // 演练房间准备状态
|
||||
equipmentStatus: [], // 仿真-设备状态消息
|
||||
trainStationList: [], // 仿真-列车实际到发车站消息
|
||||
simulationError: '', // 仿真-异常消息
|
||||
simulationStart: '', // 仿真-开始消息
|
||||
simulationReset: '', // 仿真-异常消息
|
||||
simulationText: {}, // 仿真-用户交互消息(聊天/命令)
|
||||
message: {}, // 仿真聊天
|
||||
msgQueue: [], //命令请求列表
|
||||
msgHead: null, //消息头
|
||||
state: {
|
||||
payOrder: {}, // 支付消息
|
||||
jointRoomInfo: {}, // 受邀请房间信息
|
||||
chatContentList: {}, // 聊天室聊天内容
|
||||
roleInfo: [], // 设置角色信息
|
||||
jointRoomPrepare: false, // 演练房间准备状态
|
||||
equipmentStatus: [], // 仿真-设备状态消息
|
||||
trainStationList: [], // 仿真-列车实际到发车站消息
|
||||
simulationError: '', // 仿真-异常消息
|
||||
simulationStart: '', // 仿真-开始消息
|
||||
simulationReset: '', // 仿真-异常消息
|
||||
simulationText: {}, // 仿真-用户交互消息(聊天/命令)
|
||||
message: {}, // 仿真聊天
|
||||
msgQueue: [], // 命令请求列表
|
||||
msgHead: null, // 消息头
|
||||
|
||||
userPermit: {}, // 用户获取权限消息
|
||||
userRoomKickOut: {}, // 用户被踢出房间消息
|
||||
userInRoom: {}, // 用户从外部进入房间消息
|
||||
userOutRoom: {}, // 用户退出房间消息
|
||||
userInSimulation: {}, // 用户进入仿真消息
|
||||
userBackRoom: {}, // 用户从仿真返回房间消息
|
||||
roomInvite: {}, // 用户扫码信息
|
||||
chatContentSimuList: {}, // 进入仿真,离开仿真信息
|
||||
userPermit: {}, // 用户获取权限消息
|
||||
userRoomKickOut: {}, // 用户被踢出房间消息
|
||||
userInRoom: {}, // 用户从外部进入房间消息
|
||||
userOutRoom: {}, // 用户退出房间消息
|
||||
userInSimulation: {}, // 用户进入仿真消息
|
||||
userBackRoom: {}, // 用户从仿真返回房间消息
|
||||
roomInvite: {}, // 用户扫码信息
|
||||
chatContentSimuList: {}, // 进入仿真,离开仿真信息
|
||||
|
||||
permissionOver: {}, // 权限结束
|
||||
permissionOver: {}, // 权限结束
|
||||
|
||||
tipOperateCount: 0 // 任务结束提示消息
|
||||
},
|
||||
tipOperateCount: 0 // 任务结束提示消息
|
||||
},
|
||||
|
||||
getters: {
|
||||
},
|
||||
mutations: {
|
||||
setJointRoomInfo: (state, jointRoomInfo) => {
|
||||
state.jointRoomInfo = jointRoomInfo;
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
mutations: {
|
||||
setJointRoomInfo: (state, jointRoomInfo) => {
|
||||
state.jointRoomInfo = jointRoomInfo;
|
||||
},
|
||||
|
||||
setChatContentList: (state, chatContentList) => {
|
||||
state.chatContentList = chatContentList;
|
||||
},
|
||||
setChatContentList: (state, chatContentList) => {
|
||||
state.chatContentList = chatContentList;
|
||||
},
|
||||
|
||||
setEquipmentStatus: (state, equipmentStatus) => {
|
||||
state.equipmentStatus = equipmentStatus;
|
||||
},
|
||||
setEquipmentStatus: (state, equipmentStatus) => {
|
||||
state.equipmentStatus = equipmentStatus;
|
||||
},
|
||||
|
||||
setTrainStationList: (state, trainStationList) => {
|
||||
state.trainStationList = trainStationList;
|
||||
},
|
||||
setTrainStationList: (state, trainStationList) => {
|
||||
state.trainStationList = trainStationList;
|
||||
},
|
||||
|
||||
setSimulationError: (state, simulationError) => {
|
||||
state.simulationError = simulationError;
|
||||
},
|
||||
setSimulationError: (state, simulationError) => {
|
||||
state.simulationError = simulationError;
|
||||
},
|
||||
|
||||
setSimulationStart: (state, simulationStart) => {
|
||||
state.simulationStart = simulationStart;
|
||||
},
|
||||
setSimulationStart: (state, simulationStart) => {
|
||||
state.simulationStart = simulationStart;
|
||||
},
|
||||
|
||||
setSimulationReset: (state, simulationReset) => {
|
||||
state.simulationReset = simulationReset;
|
||||
},
|
||||
setSimulationReset: (state, simulationReset) => {
|
||||
state.simulationReset = simulationReset;
|
||||
},
|
||||
|
||||
setSimulationTextList: (state, simulationText) => {
|
||||
state.simulationText = simulationText;
|
||||
},
|
||||
setSimulationTextList: (state, simulationText) => {
|
||||
state.simulationText = simulationText;
|
||||
},
|
||||
|
||||
setPayOrder: (state, payOrder) => {
|
||||
state.payOrder = payOrder;
|
||||
},
|
||||
setPayOrder: (state, payOrder) => {
|
||||
state.payOrder = payOrder;
|
||||
},
|
||||
|
||||
shiftMsgQueue: (state) => {
|
||||
state.msgHead = null;
|
||||
state.msgQueue.shift();
|
||||
state.msgHead = state.msgQueue[0];
|
||||
},
|
||||
pushMsgQueue: (state, msg) => {
|
||||
handlePushMsgQueue(state, msg);
|
||||
},
|
||||
shiftMsgQueue: (state) => {
|
||||
state.msgHead = null;
|
||||
state.msgQueue.shift();
|
||||
state.msgHead = state.msgQueue[0];
|
||||
},
|
||||
pushMsgQueue: (state, msg) => {
|
||||
handlePushMsgQueue(state, msg);
|
||||
},
|
||||
|
||||
setRoomInvite: (state, roomInvite) => {
|
||||
state.roomInvite = roomInvite;
|
||||
}
|
||||
},
|
||||
setRoomInvite: (state, roomInvite) => {
|
||||
state.roomInvite = roomInvite;
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
setStomp: ({ state }, res) => {
|
||||
handle(state, res);
|
||||
},
|
||||
actions: {
|
||||
setStomp: ({ state }, res) => {
|
||||
handle(state, res);
|
||||
},
|
||||
|
||||
setChatContentList: ({ commit }, chatContentList) => {
|
||||
commit('setChatContentList', chatContentList);
|
||||
},
|
||||
setChatContentList: ({ commit }, chatContentList) => {
|
||||
commit('setChatContentList', chatContentList);
|
||||
},
|
||||
|
||||
setJointRoomInfo: ({ commit }) => {
|
||||
commit('setJointRoomInfo', {});
|
||||
},
|
||||
setJointRoomInfo: ({ commit }) => {
|
||||
commit('setJointRoomInfo', {});
|
||||
},
|
||||
|
||||
setEquipmentStatus: ({ commit }) => {
|
||||
commit('setEquipmentStatus', []);
|
||||
},
|
||||
setEquipmentStatus: ({ commit }) => {
|
||||
commit('setEquipmentStatus', []);
|
||||
},
|
||||
|
||||
setTrainStationList: ({ commit }) => {
|
||||
commit('setTrainStationList', []);
|
||||
},
|
||||
setTrainStationList: ({ commit }) => {
|
||||
commit('setTrainStationList', []);
|
||||
},
|
||||
|
||||
setSimulationError: ({ commit }) => {
|
||||
commit('setSimulationError', '');
|
||||
},
|
||||
setSimulationError: ({ commit }) => {
|
||||
commit('setSimulationError', '');
|
||||
},
|
||||
|
||||
setSimulationStart: ({ commit }) => {
|
||||
commit('setSimulationStart', '');
|
||||
},
|
||||
setSimulationStart: ({ commit }) => {
|
||||
commit('setSimulationStart', '');
|
||||
},
|
||||
|
||||
setSimulationReset: ({ commit }) => {
|
||||
commit('setSimulationReset', '');
|
||||
},
|
||||
setSimulationReset: ({ commit }) => {
|
||||
commit('setSimulationReset', '');
|
||||
},
|
||||
|
||||
setSimulationTextList: ({ commit }) => {
|
||||
commit('setSimulationTextList', {});
|
||||
},
|
||||
setSimulationTextList: ({ commit }) => {
|
||||
commit('setSimulationTextList', {});
|
||||
},
|
||||
|
||||
setRoomInvite: ({ commit }) => {
|
||||
commit('setRoomInvite', {});
|
||||
},
|
||||
setRoomInvite: ({ commit }) => {
|
||||
commit('setRoomInvite', {});
|
||||
},
|
||||
|
||||
setMessage: ({ state }, data) => {
|
||||
if (!state.message[data.key]) {
|
||||
state.message[data.key] = [];
|
||||
}
|
||||
state.message[data.key].push(data.value);
|
||||
},
|
||||
setMessage: ({ state }, data) => {
|
||||
if (!state.message[data.key]) {
|
||||
state.message[data.key] = [];
|
||||
}
|
||||
state.message[data.key].push(data.value);
|
||||
},
|
||||
|
||||
setPayOrder: ({ commit }) => {
|
||||
commit('setPayOrder', {});
|
||||
},
|
||||
setPayOrder: ({ commit }) => {
|
||||
commit('setPayOrder', {});
|
||||
},
|
||||
|
||||
shiftMsgQueue: ({ commit }) => {
|
||||
commit('shiftMsgQueue');
|
||||
},
|
||||
shiftMsgQueue: ({ commit }) => {
|
||||
commit('shiftMsgQueue');
|
||||
},
|
||||
|
||||
pushMsgQueue: ({ commit }, msg) => {
|
||||
commit('pushMsgQueue', msg);
|
||||
}
|
||||
},
|
||||
pushMsgQueue: ({ commit }, msg) => {
|
||||
commit('pushMsgQueue', msg);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default socket;
|
||||
|
@ -2,7 +2,7 @@
|
||||
export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud'
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9010' // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9010'; // 旭强
|
||||
|
@ -2,10 +2,10 @@ import Vue from 'vue';
|
||||
import StompClient from '@/utils/sock';
|
||||
import store from '@/store';
|
||||
|
||||
export const perpetualTopic = '/user/topic/message'; // 公用topic
|
||||
export const displayTopic = '/user/queue/simulation'; // 其他仿真topic
|
||||
export const perpetualTopic = '/user/topic/message'; // 公用topic
|
||||
export const displayTopic = '/user/queue/simulation'; // 其他仿真topic
|
||||
export const screenTopic = '/user/queue/simulation/bigScreen'; // 大屏仿真
|
||||
export const planTopic = '/user/queue/simulation/plan'; // 测试运行仿真
|
||||
export const planTopic = '/user/queue/simulation/plan'; // 测试运行仿真
|
||||
|
||||
// 建立连接并订阅地址
|
||||
export function creatSubscribe(topic, header) {
|
||||
@ -31,7 +31,7 @@ function callback(Response) {
|
||||
|
||||
// 删除订阅路径
|
||||
export function clearSubscribe(topic) {
|
||||
if (Vue.prototype.$stomp) {
|
||||
Vue.prototype.$stomp.unsubscribe(topic);
|
||||
}
|
||||
}
|
||||
if (Vue.prototype.$stomp) {
|
||||
Vue.prototype.$stomp.unsubscribe(topic);
|
||||
}
|
||||
}
|
||||
|
@ -170,7 +170,7 @@
|
||||
title: '权限分发二维码'
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
this.$emit('InitLoadPage');
|
||||
this.$emit('initLoadPage');
|
||||
this.handleClose();
|
||||
}).catch(error => {
|
||||
this.$messageBox('获取权限分发二维码失败');
|
||||
|
@ -20,8 +20,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<transfer-draft ref="transfer" @QrCodeShow="QrCodeShow" @InitLoadPage="InitLoadPage"></transfer-draft>
|
||||
<distribute-draft ref="distribute" @QrCodeShow="QrCodeShow" @InitLoadPage="InitLoadPage"></distribute-draft>
|
||||
<transfer-draft ref="transfer" @QrCodeShow="QrCodeShow" @initLoadPage="initLoadPage"></transfer-draft>
|
||||
<distribute-draft ref="distribute" @QrCodeShow="QrCodeShow" @initLoadPage="initLoadPage"></distribute-draft>
|
||||
<qr-code ref="qrCode"></qr-code>
|
||||
</div>
|
||||
</template>
|
||||
@ -52,8 +52,8 @@
|
||||
computedName(prop, listType) {
|
||||
return this.$ConstSelect.translate(prop, listType);
|
||||
},
|
||||
InitLoadPage() {
|
||||
this.$emit('InitLoadPage');
|
||||
initLoadPage() {
|
||||
this.$emit('initLoadPage');
|
||||
},
|
||||
dataPostProcessor(data) {
|
||||
let index = 0;
|
||||
|
@ -177,7 +177,7 @@
|
||||
title: '权限转赠二维码'
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
this.$emit('InitLoadPage');
|
||||
this.$emit('initLoadPage');
|
||||
this.handleClose();
|
||||
}).catch(error => {
|
||||
this.$messageBox('获取权限转赠二维码失败');
|
||||
|
@ -67,18 +67,18 @@
|
||||
},
|
||||
watch: {
|
||||
$route(newVal) {
|
||||
this.InitLoadPage();
|
||||
this.initLoadPage();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.InitLoadPage();
|
||||
this.initLoadPage();
|
||||
},
|
||||
methods: {
|
||||
resizeHandler: function () {
|
||||
this.height = this._clientHeight;
|
||||
},
|
||||
//加载课程信息
|
||||
InitLoadPage() {
|
||||
initLoadPage() {
|
||||
let data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
lessonId: this.$route.params.lessonId,
|
||||
|
@ -16,7 +16,7 @@
|
||||
<p class="list-item">
|
||||
<span class="list-label">权限列表:</span>
|
||||
</p>
|
||||
<limit-list :ref="`limit_${item.code}`" :courseModel="courseModel" @InitLoadPage="InitLoadPage">
|
||||
<limit-list :ref="`limit_${item.code}`" :courseModel="courseModel" @initLoadPage="initLoadPage">
|
||||
</limit-list>
|
||||
</el-scrollbar>
|
||||
</el-tab-pane>
|
||||
@ -121,7 +121,7 @@
|
||||
this.loadInitData();
|
||||
},
|
||||
'currentPrdCode': function (code) {
|
||||
this.InitLoadPage({ id: this.mapId, code: code });
|
||||
this.initLoadPage({ id: this.mapId, code: code });
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -176,7 +176,7 @@
|
||||
this.currentPrdCode = tab.name;
|
||||
localStore.set(this.$route.path, this.currentPrdCode);
|
||||
},
|
||||
async InitLoadPage(data) {
|
||||
async initLoadPage(data) {
|
||||
this.loading = true
|
||||
if (data && parseInt(data.id) && data.code) {
|
||||
try {
|
||||
|
@ -1,52 +1,50 @@
|
||||
<template>
|
||||
<div class="run-plan-dialog" v-show="show">
|
||||
<component ref="schedule" v-bind:is="menus" @back="doClose" :group="group"></component>
|
||||
</div>
|
||||
<div v-show="show" class="run-plan-dialog">
|
||||
<component :is="menus" ref="schedule" :group="group" @back="doClose" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { debug } from 'util';
|
||||
|
||||
export default {
|
||||
name: 'RunPlanLoad',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menus: null,
|
||||
show: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '运行图计划工具'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route.query.skinStyle': function (code) {
|
||||
if (code) {
|
||||
this.menus = this.$theme.loadPlanComponent(code);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.menus = this.$theme.loadPlanComponent(this.$route.query.skinStyle);
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.$refs.schedule.setPosition();
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'RunPlanLoad',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menus: null,
|
||||
show: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '运行图计划工具';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route.query.skinStyle': function (code) {
|
||||
if (code) {
|
||||
this.menus = this.$theme.loadPlanComponent(code);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.menus = this.$theme.loadPlanComponent(this.$route.query.skinStyle);
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.$refs.schedule.setPosition();
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
@ -64,4 +62,4 @@ import { debug } from 'util';
|
||||
height: 100%;
|
||||
background: white;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,344 +1,350 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogShow" width="100%" :before-close="doClose"
|
||||
:close-on-click-modal="false" :modal="false" fullscreen>
|
||||
<div :id="runPlanId"></div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="dialogShow"
|
||||
width="100%"
|
||||
:before-close="doClose"
|
||||
:close-on-click-modal="false"
|
||||
:modal="false"
|
||||
fullscreen
|
||||
>
|
||||
<div :id="runPlanId" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { runDiagramGetTime } from '@/api/simulation';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import ChartSetting from '@/views/map/runplan/draft/setting';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { runDiagramGetTime } from '@/api/simulation';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
|
||||
export default {
|
||||
name: 'RunPlanView',
|
||||
mixins: [WindowResizeHandler],
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
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'
|
||||
},
|
||||
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,
|
||||
},
|
||||
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,
|
||||
},
|
||||
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: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('runPlan', [
|
||||
'stations',
|
||||
]),
|
||||
title() {
|
||||
return '运行图预览'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan.planLoadedCount': function () {
|
||||
this.loadChartPage();
|
||||
if (this.dialogShow) {
|
||||
this.loadInitData(this.series);
|
||||
}
|
||||
},
|
||||
'$store.state.runPlan.planUpdateCount': function () {
|
||||
this.updateRunPlanData(this.$store.state.runPlan.updateData);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinStyle);
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.myChart && this.myChart.isDisposed) {
|
||||
this.myChart.dispose();
|
||||
this.myChart = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.loadInitData(this.series);
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
resizeHandler() {
|
||||
this.reSize({ width: this._clientWidth, height: this._clientHeight - 55 });
|
||||
},
|
||||
loadChartPage() {
|
||||
let stations = this.$store.state.runPlan.stations;
|
||||
let 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 {
|
||||
let that = this;
|
||||
//加载echart配置
|
||||
require.config(
|
||||
{
|
||||
paths: {
|
||||
echarts: './js/dist'
|
||||
}
|
||||
}
|
||||
);
|
||||
// 按需加载所需图表,如需动态类型切换功能,别忘了同时加载相应图表
|
||||
require(
|
||||
[
|
||||
'echarts',
|
||||
'echarts/lib/chart/line',
|
||||
],
|
||||
function (ec) {
|
||||
if (that.myChart && that.myChart.isDisposed) {
|
||||
that.myChart.clear();
|
||||
}
|
||||
export default {
|
||||
name: 'RunPlanView',
|
||||
mixins: [WindowResizeHandler],
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
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'
|
||||
},
|
||||
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
|
||||
},
|
||||
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
|
||||
},
|
||||
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: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
]),
|
||||
title() {
|
||||
return '运行图预览';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.runPlan.planLoadedCount': function () {
|
||||
this.loadChartPage();
|
||||
if (this.dialogShow) {
|
||||
this.loadInitData(this.series);
|
||||
}
|
||||
},
|
||||
'$store.state.runPlan.planUpdateCount': function () {
|
||||
this.updateRunPlanData(this.$store.state.runPlan.updateData);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinStyle);
|
||||
this.loadChartPage();
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.myChart && this.myChart.isDisposed) {
|
||||
this.myChart.dispose();
|
||||
this.myChart = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.loadInitData(this.series);
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
resizeHandler() {
|
||||
this.reSize({ width: this._clientWidth, height: this._clientHeight - 55 });
|
||||
},
|
||||
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 {
|
||||
const that = this;
|
||||
// 加载echart配置
|
||||
require.config(
|
||||
{
|
||||
paths: {
|
||||
echarts: './js/dist'
|
||||
}
|
||||
}
|
||||
);
|
||||
// 按需加载所需图表,如需动态类型切换功能,别忘了同时加载相应图表
|
||||
require(
|
||||
[
|
||||
'echarts',
|
||||
'echarts/lib/chart/line'
|
||||
],
|
||||
function (ec) {
|
||||
if (that.myChart && that.myChart.isDisposed) {
|
||||
that.myChart.clear();
|
||||
}
|
||||
|
||||
let startValue = 3600 + that.PlanConvert.TranslationTime;
|
||||
let offsetTime = 3600;
|
||||
runDiagramGetTime(that.group).then(resp => {
|
||||
startValue = resp.data - that.PlanConvert.TranslationTime;
|
||||
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime;
|
||||
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime;
|
||||
that.option.series = series;
|
||||
that.myChart = ec.init(document.getElementById(that.runPlanId));
|
||||
if (that.myChart) {
|
||||
that.myChart.setOption(that.option);
|
||||
that.reSize({ width: document.documentElement.clientWidth, height: document.documentElement.clientHeight - 55 });
|
||||
}
|
||||
resolve(true);
|
||||
})
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
let stations = this.$store.state.runPlan.stations;
|
||||
let planData = this.$store.state.runPlan.planData;
|
||||
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);
|
||||
}
|
||||
})
|
||||
}
|
||||
let startValue = 3600 + that.PlanConvert.TranslationTime;
|
||||
const offsetTime = 3600;
|
||||
runDiagramGetTime(that.group).then(resp => {
|
||||
startValue = resp.data - that.PlanConvert.TranslationTime;
|
||||
that.option.dataZoom[0].startValue = that.option.dataZoom[1].startValue = startValue - offsetTime;
|
||||
that.option.dataZoom[0].endValue = that.option.dataZoom[1].endValue = startValue + offsetTime;
|
||||
that.option.series = series;
|
||||
that.myChart = ec.init(document.getElementById(that.runPlanId));
|
||||
if (that.myChart) {
|
||||
that.myChart.setOption(that.option);
|
||||
that.reSize({ width: document.documentElement.clientWidth, height: document.documentElement.clientHeight - 55 });
|
||||
}
|
||||
resolve(true);
|
||||
});
|
||||
}
|
||||
);
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
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 => {
|
||||
let index = series.indexOf(elem);
|
||||
if (index >= 0) {
|
||||
series.split(index, 1);
|
||||
}
|
||||
})
|
||||
}
|
||||
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() {
|
||||
let 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) {
|
||||
let 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">`,
|
||||
`车站名称: ${station.name}<br>`,
|
||||
`车站公里标: ${station.kmRange} km <br>`,
|
||||
`到站时间: ${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
|
||||
});
|
||||
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">`,
|
||||
`车站名称: ${station.name}<br>`,
|
||||
`车站公里标: ${station.kmRange} km <br>`,
|
||||
`到站时间: ${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(series);
|
||||
},
|
||||
reSize(opt) {
|
||||
if (this.myChart) {
|
||||
this.myChart.resize({ width: opt.width, height: opt.height, silent: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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/ {
|
||||
@ -347,4 +353,4 @@
|
||||
background-color: floralwhite !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -75,12 +75,12 @@ import { mapGetters } from 'vuex';
|
||||
import { getTrainingStepsDetail } from '@/api/jmap/training';
|
||||
import { setGoodsTryUse } from '@/api/management/goods';
|
||||
import { getProductDetail } from '@/api/management/mapprd';
|
||||
import { simulationNotify, bitScreenNotify, runDiagramQuit, loadQuest, getSimulationInfo } from '@/api/simulation';
|
||||
import { runDiagramQuit, loadQuest, getSimulationInfo } from '@/api/simulation';
|
||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { isFullscreen } from '@/utils/screen';
|
||||
// import { isFullscreen } from '@/utils/screen';
|
||||
import { loadMapData } from '@/utils/loaddata';
|
||||
import { handleToken } from '@/utils/auth';
|
||||
// import { handleToken } from '@/utils/auth';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
// 三维
|
||||
@ -448,11 +448,11 @@ export default {
|
||||
}
|
||||
|
||||
if (this.$refs.menuDemon) {
|
||||
this.$refs.menuDemon.InitLoadPage();
|
||||
this.$refs.menuDemon.initLoadPage();
|
||||
}
|
||||
|
||||
if (this.$refs.menuScript) {
|
||||
this.$refs.menuScript.InitLoadPage();
|
||||
this.$refs.menuScript.initLoadPage();
|
||||
}
|
||||
},
|
||||
// 退出脚本
|
||||
|
@ -25,17 +25,15 @@
|
||||
|
||||
<!-- 单人仿真 -->
|
||||
<script>
|
||||
import ChartView from './demon/chartView';
|
||||
// import ChartView from './demon/chartView';
|
||||
import SetTime from './demon/setTime';
|
||||
import TipQuestDetail from './tipQuestDetail';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { Notification } from 'element-ui';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { runDiagramStart, runDiagramOver, setTrainingCbtcInitTime, runDiagramGetTime } from '@/api/simulation';
|
||||
import { OperateMode, PermissionType } from '@/scripts/ConstDic';
|
||||
import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
import { loadMapData } from '@/utils/loaddata';
|
||||
import { runDiagramIsStart, quitQuest } from '@/api/simulation';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
@ -43,7 +41,7 @@ import { EventBus } from '@/scripts/event-bus';
|
||||
export default {
|
||||
name: 'MenuDemon',
|
||||
components: {
|
||||
ChartView,
|
||||
// ChartView,
|
||||
SetTime,
|
||||
TipQuestDetail
|
||||
},
|
||||
@ -83,7 +81,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
this.group && this.InitLoadPage();
|
||||
this.group && this.initLoadPage();
|
||||
},
|
||||
'$store.state.socket.tipOperateCount': function (val) {
|
||||
this.$alert('任务操作成功!', '提示', {
|
||||
@ -100,7 +98,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async InitLoadPage() {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
if (this.try != '0') {
|
||||
this.loadInitData();
|
||||
|
@ -1,106 +1,105 @@
|
||||
<template>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button type="success" @click="selectBeginTime" :disabled="isDisable">按计划行车</el-button>
|
||||
<el-button type="danger" @click="end" :disabled="!isDisable">退出计划</el-button>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
</el-button-group>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start"></set-time>
|
||||
</div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable" @click="end">退出计划</el-button>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
</el-button-group>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SetTime from './demon/setTime';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { Notification } from 'element-ui';
|
||||
import { OperateMode, PermissionType } from '@/scripts/ConstDic';
|
||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramOver, runDiagramStart } from '@/api/simulation';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import SetTime from './demon/setTime';
|
||||
import { Notification } from 'element-ui';
|
||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramOver, runDiagramStart } from '@/api/simulation';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
name: 'MenuPlan',
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
offset: {
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
components: {
|
||||
SetTime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.simulationGroupCount': function () {
|
||||
this.InitLoadPage();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async InitLoadPage() {
|
||||
try {
|
||||
let rest = await runDiagramIsStart(this.group);
|
||||
if (rest && rest.data) {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
} else {
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/over');
|
||||
}
|
||||
await this.loadSystemTime();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async loadSystemTime() {
|
||||
let rest = await runDiagramGetTime(this.group);
|
||||
if (rest && rest.code == 200) {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
||||
}
|
||||
},
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
runDiagramStart(model, this.group).then(res => {
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
|
||||
})
|
||||
}).catch(error => {
|
||||
this.isDisable = false;
|
||||
this.$messageBox('开始计划失败,请返回重试');
|
||||
});
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
runDiagramOver(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('map/clearJlmapTrainView');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
})
|
||||
})
|
||||
}).catch(error => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox('结束计划失败,请返回');
|
||||
})
|
||||
},
|
||||
async back() {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
exitFullscreen();
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'MenuPlan',
|
||||
components: {
|
||||
SetTime
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisable: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.simulationGroupCount': function () {
|
||||
this.initLoadPage();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
const rest = await runDiagramIsStart(this.group);
|
||||
if (rest && rest.data) {
|
||||
this.isDisable = true;
|
||||
this.$store.dispatch('training/simulationStart');
|
||||
} else {
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/over');
|
||||
}
|
||||
await this.loadSystemTime();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
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)}`));
|
||||
}
|
||||
},
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
start(model) {
|
||||
this.isDisable = true;
|
||||
runDiagramStart(model, this.group).then(res => {
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = false;
|
||||
this.$messageBox('开始计划失败,请返回重试');
|
||||
});
|
||||
},
|
||||
end() {
|
||||
this.isDisable = false;
|
||||
runDiagramOver(this.group).then(() => {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
||||
this.$store.dispatch('map/clearJlmapTrainView');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox('结束计划失败,请返回');
|
||||
});
|
||||
},
|
||||
async back() {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
exitFullscreen();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
@ -139,4 +138,4 @@
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -47,7 +47,7 @@
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
this.group && this.InitLoadPage()
|
||||
this.group && this.initLoadPage()
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -57,7 +57,7 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async InitLoadPage() {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
if (this.try != '0') {
|
||||
let data = {
|
||||
|
@ -21,15 +21,15 @@
|
||||
<script>
|
||||
import SetTime from './demon/setTime';
|
||||
import TipScriptRecord from './tipScriptRecord';
|
||||
import { mapGetters } from 'vuex';
|
||||
// import { mapGetters } from 'vuex';
|
||||
import { Notification } from 'element-ui';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { runDiagramStart, runDiagramOver, setTrainingCbtcInitTime, runDiagramGetTime } from '@/api/simulation';
|
||||
import { OperateMode, PermissionType } from '@/scripts/ConstDic';
|
||||
// import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
|
||||
// import { OperateMode, PermissionType } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
import { loadMapData } from '@/utils/loaddata';
|
||||
import { runDiagramIsStart, queryScriptStep } from '@/api/simulation';
|
||||
// import { getCountTime } from '@/utils/index';
|
||||
// import { loadMapData } from '@/utils/loaddata';
|
||||
import { runDiagramIsStart } from '@/api/simulation';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
@ -72,7 +72,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.subscribeCount': function () {
|
||||
this.group && this.InitLoadPage();
|
||||
this.group && this.initLoadPage();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async InitLoadPage() {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
const resp = await runDiagramIsStart(this.group);
|
||||
if (resp && resp.data) {
|
||||
|
@ -27,7 +27,7 @@
|
||||
<el-tab-pane label="权限详情" name="second">
|
||||
<div :style="{ height: height - 230 +'px' }">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
||||
<limit-list ref="limitList" :courseModel="courseModel" @InitLoadPage="loadInitPage"></limit-list>
|
||||
<limit-list ref="limitList" :courseModel="courseModel" @initLoadPage="loadInitPage"></limit-list>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
@ -74,17 +74,17 @@
|
||||
},
|
||||
watch: {
|
||||
$route(newVal) {
|
||||
this.InitLoadPage();
|
||||
this.initLoadPage();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.InitLoadPage();
|
||||
this.initLoadPage();
|
||||
},
|
||||
methods: {
|
||||
resizeHandler: function () {
|
||||
this.height = this._clientHeight;
|
||||
},
|
||||
InitLoadPage() {
|
||||
initLoadPage() {
|
||||
let data = { id: this.$route.query.trainingId };
|
||||
if (parseInt(data.id)) {
|
||||
getTrainingDetail(data).then(res => {
|
||||
|
@ -100,13 +100,13 @@ export default {
|
||||
},
|
||||
created() {
|
||||
EventBus.$on('viewLoading', (loading) => {
|
||||
this.mapViewLoaded(loading);
|
||||
this.mapViewLoaded(loading);
|
||||
});
|
||||
EventBus.$on('viewProgressAt', (percentage) => {
|
||||
this.mapViewProgressAt(percentage);
|
||||
this.mapViewProgressAt(percentage);
|
||||
});
|
||||
EventBus.$on('refresh', () => {
|
||||
this.refresh(this.$store.state.map.map);
|
||||
this.refresh(this.$store.state.map.map);
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
|
@ -145,13 +145,13 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
this.userId = this.$store.state.user.id;
|
||||
await this.InitLoadPage();
|
||||
await this.initLoadPage();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('training/setGroup', '');
|
||||
},
|
||||
methods: {
|
||||
async InitLoadPage() {
|
||||
async initLoadPage() {
|
||||
try {
|
||||
const resp = await runDiagramIsStart(this.group);
|
||||
if (resp && resp.data) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<div class="qrcode-login-main">
|
||||
<a class="qrcode-main">
|
||||
<div class="qrcode-main">
|
||||
<h1 class="login-title">琏课堂</h1>
|
||||
<div @click="loginRefresh">
|
||||
<qrcode-vue
|
||||
@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<span v-else class="sub-title">使用手机微信扫码登录</span>
|
||||
</div>
|
||||
<a class="tip-info">
|
||||
<div class="tip-info">
|
||||
<fieldset>
|
||||
<legend>推荐配置</legend>
|
||||
<span>浏览器:
|
||||
@ -33,8 +33,8 @@
|
||||
<br>
|
||||
<span>屏幕分辨率:1920*1080</span>
|
||||
</fieldset>
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -77,10 +77,10 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.InitLoadPage();
|
||||
this.initLoadPage();
|
||||
},
|
||||
methods: {
|
||||
InitLoadPage() {
|
||||
initLoadPage() {
|
||||
//加载发布课程列表
|
||||
this.LessonList.length = 0;
|
||||
this.UserList.length = 0;
|
||||
|
@ -82,10 +82,10 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.InitLoadPage();
|
||||
this.initLoadPage();
|
||||
},
|
||||
methods: {
|
||||
InitLoadPage() {
|
||||
initLoadPage() {
|
||||
//加载发布课程列表
|
||||
this.LessonList.length = 0;
|
||||
this.UserList.length = 0;
|
||||
|
@ -267,7 +267,7 @@ export default {
|
||||
}
|
||||
|
||||
this.mapSaveing = true;
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultConvert').then(() => {
|
||||
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
|
||||
saveMap(Object.assign(map, { mapId: this.$route.params.mapId })).then(response => {
|
||||
this.$message.success('保存成功');
|
||||
this.mapSaveing = false;
|
||||
|
@ -27,8 +27,8 @@
|
||||
<el-form-item label="延时时间:" prop="unlockTime" disabled="true">
|
||||
<el-input-number v-model="editModel.unlockTime" :min="0" :max="1000" />s
|
||||
</el-form-item>
|
||||
<el-form-item label="字体:" prop="textFontFormat">
|
||||
<el-font v-model="editModel.textFontFormat" />
|
||||
<el-form-item label="字体:" prop="fontFamily">
|
||||
<el-font v-model="editModel.fontFamily" />
|
||||
</el-form-item>
|
||||
<el-form-item label="颜色:" prop="textFontColor">
|
||||
<el-color-picker v-model="editModel.textFontColor" show-alpha :predefine="skins" />
|
||||
@ -100,7 +100,7 @@ export default {
|
||||
unlockTime: 0,
|
||||
stationCode: '',
|
||||
textFontColor: '#FFFFFF',
|
||||
textFontFormat: '',
|
||||
fontFamily: '',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
textFontColor: [
|
||||
{ required: true, message: '请输入字体颜色', trigger: 'change' }
|
||||
],
|
||||
textFontFormat: [
|
||||
fontFamily: [
|
||||
{ required: true, message: '请输入字体格式', trigger: 'change' }
|
||||
],
|
||||
'position.x': [
|
||||
@ -171,7 +171,7 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
if (selected && selected._type.toUpperCase() === 'DelayUnlock'.toUpperCase()) {
|
||||
this.editModel.code = selected.code;
|
||||
this.editModel.textFontFormat = selected.font;
|
||||
this.editModel.fontFamily = selected.font;
|
||||
this.editModel.textFontColor = selected.fontColor;
|
||||
this.editModel.stationCode = selected.stationCode;
|
||||
this.editModel.unlockTime = selected.unlockTime;
|
||||
@ -224,7 +224,7 @@ export default {
|
||||
const model = {
|
||||
_type: 'DelayUnlock',
|
||||
code: this.editModel.code,
|
||||
font: this.editModel.textFontFormat,
|
||||
font: this.editModel.fontFamily,
|
||||
fontColor: this.editModel.textFontColor,
|
||||
unlockTime: this.editModel.unlockTime,
|
||||
stationCode: this.editModel.stationCode,
|
||||
|
@ -302,26 +302,26 @@ export default {
|
||||
{ prop: 'isStandTrack', label: '是否站台轨:', type: 'checkbox', isHidden: !this.isSectionType },
|
||||
{ prop: 'standTrackName', label: '站台轨名称:', type: 'input', isHidden: !this.isstandTrackNameShow },
|
||||
{ prop: 'standTrackNamePosition', label: '站台轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
|
||||
{ prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
||||
{ prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
||||
{ prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
||||
{ prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
||||
] },
|
||||
{ prop: 'relStandCode', label: '站台编码:', type: 'selectHover', optionLabel: 'code&&name', optionValue: 'code', options: this.stationStandList, hover: this.hover, buttonType: 'relStandCode', buttonShowType: this.isButtonType, isHidden: !this.isrelStandCode },
|
||||
{ prop: 'isReentryTrack', label: '是否折返轨:', type: 'checkbox', isHidden: !this.isSectionType },
|
||||
{ prop: 'reentryTrackName', label: '折返轨名称:', type: 'input', isHidden: !this.isreentryTrackName },
|
||||
{ prop: 'reentryTrackNamePosition', label: '折返轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [
|
||||
{ prop: 'reentryTrackNamePosition.x', firstLevel: 'reentryTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
||||
{ prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
||||
{ prop: 'reentryTrackNamePosition.x', firstLevel: 'reentryTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
||||
{ prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
||||
] },
|
||||
{ prop: 'isTransferTrack', label: '是否转换轨:', type: 'checkbox', isHidden: !this.isSectionType },
|
||||
{ prop: 'transferTrackName', label: '转换轨名称:', type: 'input', isHidden: !this.istransferTrackName },
|
||||
{ prop: 'transferTrackNamePosition', label: '转换轨名称偏移量:', type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [
|
||||
{ prop: 'transferTrackNamePosition.x', firstLevel: 'transferTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
||||
{ prop: 'transferTrackNamePosition.y', firstLevel: 'transferTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
||||
{ prop: 'transferTrackNamePosition.x', firstLevel: 'transferTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
||||
{ prop: 'transferTrackNamePosition.y', firstLevel: 'transferTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
||||
] },
|
||||
{ prop: 'destinationCode', label: '目的地码:', type: 'input', isHidden: !this.isdestinationCode },
|
||||
{ prop: 'destinationCodePoint', label: '目的地码坐标:', type: 'coordinate', width: '150px', isHidden: !this.isdestinationCode, children: [
|
||||
{ prop: 'destinationCodePoint.x', firstLevel: 'destinationCodePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
||||
{ prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
||||
{ prop: 'destinationCodePoint.x', firstLevel: 'destinationCodePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
|
||||
{ prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
|
||||
] },
|
||||
{ prop: 'destinationCodeShow', label: '是否显示目的地码:', type: 'checkbox', isHidden: !this.isdestinationCode },
|
||||
{ prop: 'leftStopPointOffset', label: '左向停车点偏移量:', type: 'number', min: 0, isHidden: !this.isStopPointOffset },
|
||||
|
@ -146,7 +146,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.InitLoadPage();
|
||||
this.initLoadPage();
|
||||
},
|
||||
methods: {
|
||||
resizeHandler: function () {
|
||||
@ -162,7 +162,7 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
InitLoadPage() {
|
||||
initLoadPage() {
|
||||
//加载发布课程列表
|
||||
this.display = 1;
|
||||
this.formModel = {
|
||||
|
@ -109,7 +109,7 @@ export default {
|
||||
this.point = { x: em.clientX, y: em.clientY };
|
||||
|
||||
if (em.subType === 'TrainWindow') {
|
||||
em = { _type: deviceType.Trian, _code: em.deviceCode };
|
||||
device = { _type: deviceType.Train, _code: em.deviceCode };
|
||||
this.$store.dispatch('map/setTrainWindowShow', true);
|
||||
} else if (em.deviceCode && !this.isScreen) {
|
||||
device = this.getDeviceByEm(em);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user