Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
4e28468ad9
@ -54,6 +54,17 @@ export function Jl3dSandBoxTest(dom,textUi,skinCode,routegroup,token) {
|
||||
renderer.render( scene, camera );
|
||||
|
||||
controls.update();
|
||||
const dist = camera.position.y;
|
||||
const vFOV = THREE.Math.degToRad(camera.fov);
|
||||
const size = 1 * Math.tan(vFOV / 2) * dist;
|
||||
const scaleFactor = 130;
|
||||
const scale = size / scaleFactor;
|
||||
for(let i=0;i<manager.station.children.length;i++){
|
||||
manager.station.children[i].scale.set(scale,scale,scale);
|
||||
}
|
||||
for(let i=0;i<manager.train.trainGroup.children.length;i++){
|
||||
manager.train.trainGroup.children[i].scale.set(scale,scale,scale);
|
||||
}
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ export function dataManager(scene,textUi,camera,routegroup) {
|
||||
|
||||
let section = new sectionModel(scene);
|
||||
let signal = new signalModel(scene);
|
||||
let station = new THREE.Group();
|
||||
scene.add( station );
|
||||
let train = new trainModel(scene);
|
||||
this.station = new THREE.Group();
|
||||
scene.add( scope.station );
|
||||
this.train = new trainModel(scene);
|
||||
this.topCurve = "";
|
||||
this.downCurve = "";
|
||||
console.log(routegroup);
|
||||
@ -54,10 +54,10 @@ export function dataManager(scene,textUi,camera,routegroup) {
|
||||
console.log(data);
|
||||
return loadMapData(skinCode);
|
||||
}).then(function(data){
|
||||
scope.nowConnect = new sandBoxConnect(scope,routegroup,section,signal,station,train);
|
||||
scope.nowConnect = new sandBoxConnect(scope,routegroup,section,signal,scope.station,scope.train);
|
||||
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
|
||||
raycasterList.push(station);
|
||||
raycasterList.push(train.trainGroup);
|
||||
raycasterList.push(scope.station);
|
||||
raycasterList.push(scope.train.trainGroup);
|
||||
});
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ export function dataManager(scene,textUi,camera,routegroup) {
|
||||
console.log(netdata);
|
||||
section.init(netdata.data.sectionList,netdata.data.switchList,stationData);
|
||||
signal.init(netdata.data.signalList,section.topData,section.downData,scope.topCurve,scope.downCurve,modelmanager.signal);
|
||||
train.init(netdata.data.trainList);
|
||||
scope.train.init(netdata.data.trainList);
|
||||
resolve("loadMap");
|
||||
});
|
||||
});
|
||||
@ -175,35 +175,10 @@ export function dataManager(scene,textUi,camera,routegroup) {
|
||||
curveTop.closed = false;
|
||||
scope.topCurve = curveTop;
|
||||
|
||||
let pointsArray = [];
|
||||
let greenMaterial =new THREE.MeshBasicMaterial({color: 0xffff00,opacity: 0.75});
|
||||
for(var i = 0.00; i <= 1.00; i += 0.005){
|
||||
|
||||
var point = curveTop.getPointAt(i);
|
||||
|
||||
var tangent = curveTop.getTangent(i);
|
||||
var extension1 = new THREE.Vector3(tangent.x*2,0,tangent.z*2);
|
||||
var extension2 = new THREE.Vector3(extension1.x*2,0,extension1.y*2);
|
||||
|
||||
var tangentGeometry = new THREE.Geometry();
|
||||
tangentGeometry.vertices.push(tangent, extension1, extension2);
|
||||
var tangentLine = new THREE.Line(tangentGeometry,greenMaterial);
|
||||
tangentLine.position.set(point.x, point.y, point.z);
|
||||
|
||||
tangentLine.updateMatrixWorld(); // VERY IMPORTANT
|
||||
|
||||
var normal = tangentLine.clone();
|
||||
normal.rotateZ(Math.PI/2);
|
||||
|
||||
var normalLastVertex = normal.geometry.vertices[2].clone();
|
||||
normalLastVertex.applyMatrix4(normal.matrixWorld); //convert to world coords.
|
||||
|
||||
pointsDown.push(normalLastVertex); //for using them out of the loop
|
||||
|
||||
}
|
||||
|
||||
|
||||
var curveDown = new THREE.CatmullRomCurve3(pointsDown );
|
||||
|
||||
var curveDown = new THREE.CatmullRomCurve3(pointsTop );
|
||||
curveDown.curveType = "chordal";
|
||||
curveDown.tension = 0.15;
|
||||
curveDown.closed = false;
|
||||
@ -217,33 +192,33 @@ export function dataManager(scene,textUi,camera,routegroup) {
|
||||
extrudePath : curveTop,
|
||||
};
|
||||
|
||||
var extrudeSettingsDown = {
|
||||
steps : pointsDown.length*2,
|
||||
curveSegments : 1,
|
||||
bevelSegments : 1,
|
||||
bevelEnabled : false,
|
||||
extrudePath : curveDown,
|
||||
};
|
||||
// var extrudeSettingsDown = {
|
||||
// steps : pointsDown.length*2,
|
||||
// curveSegments : 1,
|
||||
// bevelSegments : 1,
|
||||
// bevelEnabled : false,
|
||||
// extrudePath : curveDown,
|
||||
// };
|
||||
|
||||
|
||||
var shapeTop = new THREE.Shape();
|
||||
shapeTop.moveTo( 0,-1 );
|
||||
shapeTop.lineTo( 0,1 );
|
||||
|
||||
var shapeDown = new THREE.Shape();
|
||||
shapeDown.moveTo( 0,-1 );
|
||||
shapeDown.lineTo( 0,1 );
|
||||
// var shapeDown = new THREE.Shape();
|
||||
// shapeDown.moveTo( 0,-1 );
|
||||
// shapeDown.lineTo( 0,1 );
|
||||
|
||||
let materialSection1 = new THREE.MeshPhongMaterial( { color : 0x3366ff } );
|
||||
let materialSection2 = new THREE.MeshPhongMaterial( { color : 0x336600 } );
|
||||
// let materialSection2 = new THREE.MeshPhongMaterial( { color : 0x336600 } );
|
||||
|
||||
var geometryTop = new THREE.ExtrudeBufferGeometry( shapeTop, extrudeSettingsTop );
|
||||
var curveTopMesh = new THREE.Mesh( geometryTop,materialSection1) ;
|
||||
scene.add(curveTopMesh);
|
||||
|
||||
var geometryDown = new THREE.ExtrudeBufferGeometry( shapeDown, extrudeSettingsDown );
|
||||
var curveDownMesh = new THREE.Mesh( geometryDown,materialSection2) ;
|
||||
scene.add(curveDownMesh);
|
||||
// var geometryDown = new THREE.ExtrudeBufferGeometry( shapeDown, extrudeSettingsDown );
|
||||
// var curveDownMesh = new THREE.Mesh( geometryDown,materialSection2) ;
|
||||
// scene.add(curveDownMesh);
|
||||
|
||||
for(let j=0;j<stationListData.stations.length;j++){
|
||||
|
||||
@ -253,10 +228,10 @@ export function dataManager(scene,textUi,camera,routegroup) {
|
||||
let pos = stationListData.stations[j].xy_coords.split(";");
|
||||
|
||||
cube.name = stationListData.stations[j].name;
|
||||
cube.position.set((pos[0] -originX+0.0005)*double,0.2,-(pos[1]-originY+0.0005)*double);
|
||||
cube.position.set((pos[0] -originX)*double,0.2,-(pos[1]-originY)*double);
|
||||
cube.rotation.x = Math.PI/2;
|
||||
// console.log(cube.position);
|
||||
station.add(cube);
|
||||
scope.station.add(cube);
|
||||
|
||||
}
|
||||
resolve("loadJson");
|
||||
|
@ -2,15 +2,20 @@ export function signalModel(scene) {
|
||||
let scope = this;
|
||||
|
||||
this.init = function(signalData,topData,downData,topCurve,downCurve,originMesh){
|
||||
console.log(originMesh);
|
||||
|
||||
for(let i=0;i<signalData.length;i++){
|
||||
if(signalData[i].right == true){
|
||||
for(let j=0;j<topData.length;j++){
|
||||
if(signalData[i].sectionCode == topData[j].code){
|
||||
let newsignal = originMesh.mesh.clone(true);
|
||||
newsignal.up = new THREE.Vector3(0,0,-1);
|
||||
let tangent = topCurve.getTangent(topData[j].rightProgress);
|
||||
let rotenum = newsignal.up.angleTo(tangent);
|
||||
newsignal.rotation.z = rotenum;
|
||||
|
||||
newsignal.position.copy(topCurve.getPoint(topData[j].rightProgress));
|
||||
|
||||
newsignal.position.x +=-2;
|
||||
newsignal.position.z +=-2;
|
||||
scene.add( newsignal );
|
||||
j = topData.length;
|
||||
}
|
||||
@ -20,18 +25,14 @@ export function signalModel(scene) {
|
||||
for(let j=0;j<downData.length;j++){
|
||||
if(signalData[i].sectionCode == downData[j].code){
|
||||
let newsignal = originMesh.mesh.clone(true);
|
||||
newsignal.up = new THREE.Vector3(0,0,1);
|
||||
let tangent = downCurve.getTangent(topData[j].leftProgress);
|
||||
let rotenum = newsignal.up.angleTo(tangent);
|
||||
newsignal.rotation.z = rotenum;
|
||||
|
||||
newsignal.position.copy(downCurve.getPoint(downData[j].leftProgress));
|
||||
|
||||
newsignal.up = new THREE.Vector3(1,0,0);
|
||||
newsignal.axis = new THREE.Vector3();
|
||||
let tangent = downCurve.getTangentAt(downData[j].leftProgress).normalize();
|
||||
newsignal.axis.crossVectors(newsignal.up, tangent).normalize();
|
||||
let radians = Math.acos(newsignal.up.dot(tangent));
|
||||
newsignal.quaternion.setFromAxisAngle(newsignal.axis, radians);
|
||||
|
||||
|
||||
|
||||
newsignal.position.x +=2;
|
||||
newsignal.position.z +=2;
|
||||
scene.add( newsignal );
|
||||
j = downData.length;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ export function trainModel(scene) {
|
||||
|
||||
this.init = function(trainData){
|
||||
for(let i=0;i<trainData.length;i++){
|
||||
var geometry = new THREE.BoxGeometry( 30, 10, 10 );
|
||||
var geometry = new THREE.BoxGeometry( 15, 5, 5 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
|
||||
var trainBox = new THREE.Mesh( geometry, material );
|
||||
trainBox.code = trainData[i].code;
|
||||
@ -15,7 +15,7 @@ export function trainModel(scene) {
|
||||
trainBox.dispose = false;
|
||||
trainBox.up = new THREE.Vector3(1, 0, 0);
|
||||
trainBox.axis = new THREE.Vector3();
|
||||
trainBox.position.y = 5;
|
||||
trainBox.position.y = 2.5;
|
||||
scope.trainlist[trainData[i].groupNumber] = trainBox;
|
||||
}
|
||||
}
|
||||
|
@ -527,6 +527,10 @@ class SkinCode extends defaultStyle {
|
||||
rectBorderColor: 'red', // 矩形边框颜色
|
||||
monolock: false, // 单锁显示
|
||||
block: false // 封锁显示
|
||||
},
|
||||
coverBlock: { // 道岔封锁 遮盖物
|
||||
show: true, // 显示
|
||||
coverBlockColor: '#000080'// 遮挡物颜色
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -559,6 +559,10 @@ class SkinCode extends defaultStyle {
|
||||
rectBorderColor: 'red', // 矩形边框颜色
|
||||
monolock: false, // 单锁显示
|
||||
block: false // 封锁显示
|
||||
},
|
||||
coverBlock: { // 道岔封锁 遮盖物
|
||||
show: true, // 显示
|
||||
coverBlockColor: '#000080'// 遮挡物颜色
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -173,7 +173,7 @@ export default class Section extends Group {
|
||||
/** 封锁 06*/
|
||||
block() {
|
||||
if (this.sectionBlock) {
|
||||
this.sectionBlock.show();
|
||||
this.model.type !== '03' && this.sectionBlock.show();
|
||||
} else {
|
||||
this.line && this.line.setStyle({
|
||||
stroke: this.style.Section.line.blockColor,
|
||||
@ -302,9 +302,9 @@ export default class Section extends Group {
|
||||
model.overlapLock && this.protectiveLock(model.lockRight);
|
||||
/** 空闲锁闭或者叫进路锁闭 */
|
||||
model.routeLock && this.routeLock(model.lockRight);
|
||||
/** 轨道封锁 */
|
||||
model.invalid && this.invalid();
|
||||
/** 计轴故障 */
|
||||
model.invalid && this.invalid();
|
||||
/** 轨道封锁 */
|
||||
model.blockade && this.block();
|
||||
/** 非通信车占用状态 */
|
||||
model.nctOccupied && this.unCommunicationOccupied();
|
||||
|
68
src/jmapNew/shape/Switch/ESwBlock.js
Normal file
68
src/jmapNew/shape/Switch/ESwBlock.js
Normal file
@ -0,0 +1,68 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
||||
|
||||
class ESwBlock extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
this.blockCover = new Polyline({ // 道岔锁闭遮盖物
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 4,
|
||||
z2: 2,
|
||||
shape: {
|
||||
points: model.coverPoints
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.line.width,
|
||||
stroke: '#fff'// style.backgroundColor
|
||||
},
|
||||
cursor: model.cursor,
|
||||
onmouseover: model.onmouseover,
|
||||
onmouseout: model.onmouseout
|
||||
});
|
||||
this.hide();
|
||||
this.add(this.blockCover);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.blockCover.hide();
|
||||
this.blockCover.setStyle({ stroke: this.model.style.backgroundColor });
|
||||
this.stopAnimation(false);
|
||||
}
|
||||
|
||||
show() {
|
||||
this.blockCover.show();
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.blockCover.setStyle({ stroke: color });
|
||||
}
|
||||
|
||||
setStyle(data) {
|
||||
this.blockCover.setStyle(data);
|
||||
}
|
||||
|
||||
stopAnimation(flag) {
|
||||
this.blockCover.stopAnimation(flag);
|
||||
}
|
||||
|
||||
getSection() {
|
||||
return this.blockCover;
|
||||
}
|
||||
|
||||
animateStyle(color1, color2) {
|
||||
this.blockCover.animateStyle(true)
|
||||
.when(0, {stroke: color1})
|
||||
.when(500, {stroke: color2})
|
||||
.when(1000, {stroke: color1}).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default ESwBlock;
|
@ -14,6 +14,7 @@ class ESwLnversion extends Group {
|
||||
this.relocShelter = new Polyline({ // 遮盖B区段范围
|
||||
zlevel: model.zlevel,
|
||||
z: model.z + 4,
|
||||
z2: 1,
|
||||
shape: {
|
||||
points: model.shelterPoints
|
||||
},
|
||||
|
@ -7,6 +7,7 @@ import ESwLocal from './ESwLocal.js';
|
||||
import ESwLnversion from './ESwLnversion';
|
||||
import ELockRect from './ELockRect';
|
||||
import ELockArc from './ELockArc';
|
||||
import ESwBlock from './ESwBlock';
|
||||
import EMouse from './EMouse';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import ETriangle from './ETriangle';
|
||||
@ -134,7 +135,18 @@ export default class Switch extends Group {
|
||||
onmouseover: () => { this.name.getArrowText().show(); },
|
||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||
});
|
||||
|
||||
const coverPoint1 = [sectionAPoint.x - 2 * directxA * (relocShelterLength * sectionBTriangle.getCosRate()), sectionAPoint.y - drictyyA * relocShelterLength * sectionBTriangle.getSinRate()];
|
||||
const coverPoint2 = [sectionAPoint.x, sectionAPoint.y];
|
||||
this.shapeBlockCover = new ESwBlock({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
coverPoints: [coverPoint1, coverPoint2],
|
||||
cursor: 'pointer',
|
||||
triangle: this.triangle,
|
||||
onmouseover: () => { this.name.getArrowText().show(); },
|
||||
onmouseout: () => { this.name.getArrowText().hide(); }
|
||||
});
|
||||
const arrowTextX = model.intersection.x + 10;
|
||||
const arrowTextY = model.intersection.y + 15;
|
||||
const nameTextX = model.namePosition.x + model.intersection.x + directx * (style.Section.line.width * 3 + style.Switch.text.offset.x) * this.triangle.getCotRate();
|
||||
@ -173,6 +185,7 @@ export default class Switch extends Group {
|
||||
this.add(this.shapeModelA);
|
||||
this.add(this.shapeModelB);
|
||||
this.add(this.shapeModelC);
|
||||
this.add(this.shapeBlockCover);
|
||||
this.add(this.name);
|
||||
this.add(this.enabledName);
|
||||
style.Switch.text.show && model.nameShow ? this.name.show() : this.name.hide();
|
||||
@ -262,6 +275,7 @@ export default class Switch extends Group {
|
||||
this.shapeModelC.hide(); // 形状 C
|
||||
this.shapeModelA.hide(); // 形状 A
|
||||
this.shapeModelB.hide(); // 形状 B
|
||||
this.shapeBlockCover.hide(); // 封锁覆盖
|
||||
this.setHasTextBorder(0);
|
||||
this.shapeModelC.attr({
|
||||
z: this.z + 3
|
||||
@ -469,6 +483,10 @@ export default class Switch extends Group {
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor });
|
||||
}
|
||||
}
|
||||
if (this.style.Switch.coverBlock && this.style.Switch.coverBlock.show) {
|
||||
this.shapeBlockCover.show();
|
||||
this.shapeBlockCover.setColor(this.style.Switch.coverBlock.coverBlockColor);
|
||||
}
|
||||
}
|
||||
blockMonolock() {
|
||||
if (this.style.Switch.rectLock.block && this.style.Switch.rectLock.monolock) {
|
||||
|
@ -255,13 +255,6 @@ export default {
|
||||
this.classB = this.tempClassB;
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
if (val == '01' && this.centralizedStationList1.length) {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationList1[0].code);
|
||||
} else {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', '');
|
||||
}
|
||||
},
|
||||
'$store.state.training.centerStationCode': function(code) {
|
||||
if (code) {
|
||||
this.stationCode = code;
|
||||
@ -358,16 +351,12 @@ export default {
|
||||
});
|
||||
this.colsNum = 24 / this.centralizedStationList1.length;
|
||||
if (centralizedStationList.length) {
|
||||
if (this.$store.state.training.centerStationCode) {
|
||||
this.stationCode = this.$store.state.training.centerStationCode;
|
||||
if (this.$store.state.map.showCentralizedStationCode) {
|
||||
this.stationCode = this.$store.state.map.showCentralizedStationCode;
|
||||
} else {
|
||||
this.stationCode = centralizedStationList[0].code;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.stationCode);
|
||||
}
|
||||
},
|
||||
switchShowStation(stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
|
@ -253,13 +253,6 @@ export default {
|
||||
this.classB = this.tempClassB;
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
if (val == '01' && this.centralizedStationList1.length) {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationList1[0].code);
|
||||
} else {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', '');
|
||||
}
|
||||
},
|
||||
'$store.state.training.centerStationCode': function(code) {
|
||||
if (code) {
|
||||
this.stationCode = code;
|
||||
@ -356,16 +349,12 @@ export default {
|
||||
});
|
||||
this.colsNum = 24 / this.centralizedStationList1.length;
|
||||
if (centralizedStationList.length) {
|
||||
if (this.$store.state.training.centerStationCode) {
|
||||
this.stationCode = this.$store.state.training.centerStationCode;
|
||||
if (this.$store.state.map.showCentralizedStationCode) {
|
||||
this.stationCode = this.$store.state.map.showCentralizedStationCode;
|
||||
} else {
|
||||
this.stationCode = centralizedStationList[0].code;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.stationCode);
|
||||
}
|
||||
},
|
||||
switchShowStation(stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="haerbin-01__systerm">
|
||||
<div v-if="isLocal" id="menuButton">
|
||||
<div class="menuButton">
|
||||
<div class="__menuButton">
|
||||
<el-row>
|
||||
<el-col v-if="!trainOperationShow" :span="11">
|
||||
<div v-if="secondConfirm" class="nav-border">
|
||||
@ -34,9 +34,9 @@
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<div v-if="item.name && item.disabled" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand " :id="item.operate.domId" class="fake-button" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" class="fake-button-active" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button" style="cursor: not-allowed;" />
|
||||
<div v-else-if="item.name && !item.securityCommand " :id="item.operate.domId" :class="[item.cmdType? 'fake-button': 'fake-button-disabled', item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" class="fake-button-active" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-black" />
|
||||
</div>
|
||||
</template>
|
||||
</el-row>
|
||||
@ -48,27 +48,12 @@
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': canCommand || secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="canCommand || secondConfirm" @click="command">执行</el-button>
|
||||
<el-button class="fr" style="line-height: 18px; margin-top: 4px;" plain @click="cancle">取消</el-button>
|
||||
</div>
|
||||
<div v-if="!speedShow" class="nav-border-bottom">
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%;border: none;outline: none; height: 56px"
|
||||
size="mini"
|
||||
class="haerbin_table"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
>
|
||||
<el-table-column prop="name" style="margin-left:10px" class-name="abc" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-if="speedShow" class="nav-border-bottom">
|
||||
<div style="height: 56px;width: 100%;background: #fff;overflow-y: scroll;text-align: left;">
|
||||
<div class="speed-value-box" :style="{background: speedLimitValue===15? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(15)">15</div>
|
||||
<div class="speed-value-box" :style="{background: speedLimitValue===25? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(25)">25</div>
|
||||
<div class="speed-value-box" :style="{background: speedLimitValue===40? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(40)">40</div>
|
||||
<div class="speed-value-box" :style="{background: speedLimitValue===60? '#87CEFA': '#FFF'}" @click="setSpeedLimitValue(60)">60</div>
|
||||
<div
|
||||
class="el-print"
|
||||
highlight-current-row
|
||||
>
|
||||
<div v-for="(el,i) in tempData" :key="i" style="margin-left:10px;text-align: left;line-height: 22px">
|
||||
{{ el.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -134,7 +119,8 @@
|
||||
<el-dialog
|
||||
v-else
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm menuButton"
|
||||
class="haerbin-01__systerm __menuButton"
|
||||
style="pointer-events: none"
|
||||
title="Dialog"
|
||||
:visible.sync="dialogVisible"
|
||||
:modal="false"
|
||||
@ -146,7 +132,7 @@
|
||||
<div style="margin-bottom: 30px">
|
||||
<template v-if="secondConfirm">
|
||||
<el-row>
|
||||
<div style="text-align: center">
|
||||
<div style="display: flex;justify-content: space-between;margin: 10px 3px">
|
||||
<el-button :id="cr1ConfrimId" class="fl" :class="{'disabled': cr1Confrim}" style="line-height: 18px; margin-top: 4px;" :disabled="cr1Confrim" plain @click="clickCr1Confirm">CR1</el-button>
|
||||
<el-button :id="cr2ConfirmId" class="fr" :class="{'disabled': !cr1Confrim}" style="line-height: 18px; margin-top: 4px;" :disabled="!cr1Confrim" plain @click="clickCr2Confirm">CR2</el-button>
|
||||
</div>
|
||||
@ -174,9 +160,9 @@
|
||||
<template v-for="(item, index) in centralizedStationList">
|
||||
<div :key="index" class="nav-border-row row-width-box flex-row">
|
||||
<div v-if="item.name && item.disabled" :id="item.operate.domId" class="fake-button-disabled">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && !item.securityCommand " :id="item.operate.domId" class="fake-button" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" class="fake-button-active" :class="item.show? 'active': ''" @click="clickCommand(item)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-disabled" />
|
||||
<div v-else-if="item.name && !item.securityCommand " :id="item.operate.domId" :class="[item.cmdType? 'fake-button': 'fake-button-disabled', item.next && paramIndex == index ? 'active': '']" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else-if="item.name && item.securityCommand" :id="item.operate.domId" class="fake-button-active" @click="clickCommand(item, index)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button-black" />
|
||||
</div>
|
||||
</template>
|
||||
</el-row>
|
||||
@ -224,11 +210,6 @@ export default {
|
||||
securityCommand: '',
|
||||
switchRelevanceSectionList: [], // 道岔关联的区段列表
|
||||
param: {},
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-right': 'none',
|
||||
'padding': 0
|
||||
},
|
||||
selectedObj: null,
|
||||
oldClickObj: null, // 上一次点击对象
|
||||
route: null, // 进路对象
|
||||
@ -237,8 +218,6 @@ export default {
|
||||
guideRoute:null,
|
||||
centralizedStationList: new Array(15).fill({}),
|
||||
ciStationParamList: [],
|
||||
// startVirtual: false,
|
||||
// endVirtual: false,
|
||||
atp:false,
|
||||
ground:false,
|
||||
guide:false,
|
||||
@ -250,7 +229,9 @@ export default {
|
||||
standParamList: [],
|
||||
routeParamList: [],
|
||||
directionRodParamList: [],
|
||||
paramConfirm: false,
|
||||
secondConfirm: false,
|
||||
paramIndex: -1,
|
||||
banIcon: BanIcon,
|
||||
timer: null,
|
||||
trainOperationShow: false,
|
||||
@ -258,7 +239,6 @@ export default {
|
||||
formModelTripNum: '',
|
||||
formModelSectionName: '',
|
||||
formModelNewTrip: '',
|
||||
speedShowCon: false,
|
||||
dialogVisible: false
|
||||
};
|
||||
},
|
||||
@ -276,9 +256,6 @@ export default {
|
||||
cr2ConfirmId() {
|
||||
return OperationEvent.Command.commandHaerbin.confrimCr2.domId;
|
||||
},
|
||||
speedShow() {
|
||||
return (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) && this.speedShowCon;
|
||||
},
|
||||
isLocal() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
}
|
||||
@ -323,7 +300,6 @@ export default {
|
||||
}
|
||||
}
|
||||
this.selectedObj = this.selected;
|
||||
this.speedShowCon = false;
|
||||
if (this.selectedObj._type) {
|
||||
if (this.selectedObj._type == 'Section' && (this.selectedObj.type == '03' || this.selectedObj.type == '04')) { // 道岔区段 道岔计轴区段 都是道岔操作
|
||||
this.selectedObj = this.selectedObj.switch;
|
||||
@ -438,45 +414,6 @@ export default {
|
||||
}
|
||||
return control;
|
||||
},
|
||||
clickCommand(row) {
|
||||
this.clearAllMenuShow();
|
||||
const commandList = ['ATP进路', '取消ATP', '联锁进路', '取消联锁', '引导进路', '取消引导'];
|
||||
const routeList = [this.atpRoute, this.groundRoute, this.guideRoute];
|
||||
const commandIndex = commandList.indexOf(row.name);
|
||||
const currentIndex = Math.floor(commandIndex / 2);
|
||||
const step = {};
|
||||
if (currentIndex >= 0) {
|
||||
this.route = routeList[currentIndex];
|
||||
this.tempData = [];
|
||||
this.tempData.push(this.route);
|
||||
step.param = {
|
||||
routeCode: this.route.code
|
||||
};
|
||||
// if (currentIndex == 2) {
|
||||
// step.param = {
|
||||
// signalCode: this.route.startSignalCode
|
||||
// };
|
||||
// } else {
|
||||
// }
|
||||
}
|
||||
if (this.tempData.length) {
|
||||
row.show = true;
|
||||
this.operate = row.operate.operation;
|
||||
this.cmdType = row.cmdType;
|
||||
this.speedShowCon = true;
|
||||
this.canCommand = false;
|
||||
this.securityCommand = row.securityCommand;
|
||||
step.operation = this.operate;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
clearAllMenuShow() {
|
||||
this.centralizedStationList.forEach(item => {
|
||||
if (item.name) {
|
||||
@ -683,12 +620,13 @@ export default {
|
||||
standCode: this.selectedObj.code
|
||||
};
|
||||
},
|
||||
handleParam() {
|
||||
checkConfirmParam() {
|
||||
if (this.operate == OperationEvent.Signal.cancelTrainRoute.menuButton.operation || this.operate == OperationEvent.Signal.humanTrainRoute.menuButton.operation) {
|
||||
this.param = {
|
||||
signalCode: this.route.startSignalCode
|
||||
};
|
||||
}
|
||||
|
||||
if (this.operate == OperationEvent.Signal.humanControl.menuButton.operation || this.operate == OperationEvent.Signal.atsAutoControl.menuButton.operation) {
|
||||
const routeCodeList = [];
|
||||
this.routeList.forEach(item => {
|
||||
@ -698,6 +636,7 @@ export default {
|
||||
});
|
||||
this.param.routeCodeList = routeCodeList;
|
||||
}
|
||||
|
||||
if (this.cmdType == CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER || this.cmdType == CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER) {
|
||||
if (this.selectedObj.centralized) {
|
||||
this.param = { stationCode: this.selectedObj.code };
|
||||
@ -709,20 +648,66 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) {
|
||||
this.param.speedLimitValue = this.speedLimitValue;
|
||||
this.centralizedStationList = new Array(15).fill({ name: '' });
|
||||
[15, 25, 40, 60].forEach((el, i) => {
|
||||
this.centralizedStationList[i] = {
|
||||
name: `${el} s`,
|
||||
cmdType: this.cmdType,
|
||||
operate: OperationEvent.StationControl.requestStationControl.menu,
|
||||
next: true,
|
||||
value: el
|
||||
};
|
||||
});
|
||||
}
|
||||
},
|
||||
clickCommand(row, index) {
|
||||
this.clearAllMenuShow();
|
||||
this.paramIndex = row.next ? index : -1;
|
||||
|
||||
const commandList = ['ATP进路', '取消ATP', '联锁进路', '取消联锁', '引导进路', '取消引导'];
|
||||
const routeList = [this.atpRoute, this.groundRoute, this.guideRoute];
|
||||
const commandIndex = commandList.indexOf(row.name);
|
||||
const currentIndex = Math.floor(commandIndex / 2);
|
||||
const step = {};
|
||||
|
||||
if (currentIndex >= 0) {
|
||||
this.route = routeList[currentIndex];
|
||||
step.param = { routeCode: this.route.code };
|
||||
}
|
||||
|
||||
if (this.tempData.length) {
|
||||
row.show = true;
|
||||
this.operate = row.operate.operation;
|
||||
this.cmdType = row.cmdType;
|
||||
this.canCommand = false;
|
||||
step.operation = this.operate;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.checkConfirmParam();
|
||||
this.securityCommand = row.securityCommand || row.next;
|
||||
} else if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
command() {
|
||||
this.handleParam();
|
||||
const step = {
|
||||
operation: OperationEvent.Command.commandHaerbin.confirm.operation,
|
||||
param: this.param
|
||||
};
|
||||
|
||||
if (!this.securityCommand) {
|
||||
step.over = true;
|
||||
step.cmdType = this.cmdType;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid && this.securityCommand) {
|
||||
this.secondConfirm = true;
|
||||
@ -732,10 +717,12 @@ export default {
|
||||
}, 15000);
|
||||
} else if (valid) {
|
||||
this.doClose();
|
||||
this.handleClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.doClose();
|
||||
this.handleClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
@ -765,13 +752,16 @@ export default {
|
||||
cmdType: this.cmdType,
|
||||
operation: OperationEvent.Command.commandHaerbin.confrimCr2.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.handleClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.doClose();
|
||||
this.handleClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
@ -954,14 +944,14 @@ export default {
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '强行站控', operate: OperationEvent.StationControl.requestStationControl.menu },
|
||||
{ name: '强行站控', cmdType: '', operate: OperationEvent.StationControl.requestStationControl.menu },
|
||||
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '' },
|
||||
{ name: '关闭索引', operate: OperationEvent.StationControl.requestStationControl.menu }
|
||||
{ name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestStationControl.menu }
|
||||
|
||||
// { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false }
|
||||
] : [
|
||||
@ -1013,10 +1003,14 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-input--mini .el-input__inner{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
/deep/ {
|
||||
.el-input--mini
|
||||
.el-input__inner{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.speed-value-box{
|
||||
height: 18px;
|
||||
padding-left: 20px;
|
||||
@ -1024,6 +1018,13 @@ export default {
|
||||
width: 100%;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.separator {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin: 15px;
|
||||
border-top: 1px solid #000;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
#menuButton{
|
||||
@ -1035,8 +1036,8 @@ export default {
|
||||
background: #FFFFFF;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.nav-border {
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
height: 90px;
|
||||
text-align: center;
|
||||
@ -1086,86 +1087,96 @@ export default {
|
||||
align-items: center;
|
||||
}
|
||||
.fake-button{
|
||||
font-size: 12px;
|
||||
width: 80px;
|
||||
height: 20px;
|
||||
border-radius: 1px !important;
|
||||
border: 1px solid #426688;
|
||||
background: #DDDDDD;
|
||||
color: #000;
|
||||
line-height: 18px;
|
||||
cursor: pointer;
|
||||
&:hover, &.active{
|
||||
background: #CFE8FC;
|
||||
}
|
||||
}
|
||||
|
||||
.fake-button-black {
|
||||
font-size: 12px;
|
||||
width: 80px;
|
||||
height: 20px;
|
||||
border-radius: 1px !important;
|
||||
border: 1px solid #426688;
|
||||
background: #DDDDDD;
|
||||
color: #DDDDDD;
|
||||
line-height: 18px;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.fake-button-active{
|
||||
width: 80px;
|
||||
font-size: 12px;
|
||||
width: 80px;
|
||||
height: 20px;
|
||||
border-radius: 1px !important;
|
||||
line-height: 18px;
|
||||
border: 1px solid #426688;
|
||||
cursor: pointer;
|
||||
background: #77DBF0;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
&:hover, &.active{
|
||||
background: #77DBF0;
|
||||
}
|
||||
&:hover, &.active{
|
||||
background: #CFE8FC;
|
||||
}
|
||||
}
|
||||
|
||||
.fake-button-disabled{
|
||||
font-size: 12px;
|
||||
width: 80px;
|
||||
height: 20px;
|
||||
border-radius: 1px !important;
|
||||
line-height: 18px;
|
||||
border: 1px solid #9B9B9B;
|
||||
cursor: not-allowed;
|
||||
background: #DDDDDD;
|
||||
color: #a0a0a0;
|
||||
cursor: not-allowed;
|
||||
&:hover, &.active{
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
.menuButton .abc:hover{
|
||||
background-color:#2b68c3!important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.menuButton .el-table {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.menuButton .el-table__body tr.current-row .abc{
|
||||
background-color: #2b68c3!important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.menuButton .el-table__row {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.menuButton .el-button {
|
||||
.__menuButton .el-button {
|
||||
background: #DDDDDD;
|
||||
border: 1px solid #000 !important;
|
||||
cursor: pointer;
|
||||
&.disabled {
|
||||
cursor: not-allowed;
|
||||
border: 1px solid #D0CEC5 !important;
|
||||
/*background: #DDDDDD !important;*/
|
||||
color: #a0a0a0!important;
|
||||
}
|
||||
&:hover, &.active{
|
||||
background: #eeeeee;
|
||||
background: #CFE8FC;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog,
|
||||
.el-dialog__wrapper {
|
||||
pointer-events: none;
|
||||
.__menuButton .el-print {
|
||||
font-size: 12px;
|
||||
height: 52px;
|
||||
margin: 0px 20px;
|
||||
border: 1px solid #d1d1d1;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.el-dialog__header,
|
||||
.el-dialog__body {
|
||||
pointer-events: all;
|
||||
.__menuButton {
|
||||
.el-dialog,
|
||||
.el-dialog__wrapper {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
.el-dialog__header,
|
||||
.el-dialog__body {
|
||||
pointer-events: all !important;
|
||||
}
|
||||
}
|
||||
|
||||
.separator {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin: 15px;
|
||||
border-top: 1px solid #000;
|
||||
}
|
||||
|
||||
.color-strip-container{
|
||||
display: flex;
|
||||
|
@ -141,7 +141,7 @@ import axios from 'axios';
|
||||
methods: {
|
||||
changeTrainSelect(mode){
|
||||
if(mode == "isTraining"){
|
||||
// this.isTraining = false;
|
||||
this.isTraining = false;
|
||||
}
|
||||
},
|
||||
currentsel(selVal){
|
||||
|
@ -391,7 +391,6 @@ export default {
|
||||
onSelected(em) {
|
||||
const path = window.location.href;
|
||||
if (path.includes('/practiceDisplay')) {
|
||||
|
||||
if (em.deviceType == 'StationStand') {
|
||||
runPassenger(this.$route.query.group, em.deviceCode).then(netdata => {
|
||||
console.log(netdata);
|
||||
|
@ -96,6 +96,7 @@ export default {
|
||||
// deviceType.Signal,
|
||||
// deviceType.StationStand
|
||||
// ];
|
||||
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
if (em.deviceType === 'StationStand' && lineCode === '01') {
|
||||
const menu = getDeviceMenuByDeviceType(device._type) || [];
|
||||
@ -112,7 +113,8 @@ export default {
|
||||
// }
|
||||
// }
|
||||
}
|
||||
this.selected = device;
|
||||
|
||||
this.selected = { ...device };
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: device, subType: em.subType});
|
||||
this.$store.dispatch('menuOperation/setLeftClickCount');
|
||||
if (this.$route.query.lineCode == '07' || this.$route.query.lineCode == '14') {
|
||||
|
@ -147,7 +147,7 @@ export default {
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
Responder-align: right;
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
line-height: 40px;
|
||||
|
@ -106,7 +106,7 @@ export default {
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
Responder-align: right;
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
line-height: 40px;
|
||||
|
@ -89,9 +89,6 @@ export default {
|
||||
sectionCode: [
|
||||
{ required: true, message: '请关联物理区段', trigger: 'blur' }
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: '请选择关联集中站', trigger: 'blur' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: '请输入应答器坐标x', trigger: 'blur' }
|
||||
],
|
||||
@ -178,7 +175,7 @@ export default {
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
Responder-align: right;
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
line-height: 40px;
|
||||
|
Loading…
Reference in New Issue
Block a user