列车调整
This commit is contained in:
parent
aa7ad1edac
commit
c4b35b3493
@ -10,7 +10,7 @@ function getHost(): string {
|
|||||||
// return '192.168.3.47:9091';
|
// return '192.168.3.47:9091';
|
||||||
// return '192.168.3.37:9091';
|
// return '192.168.3.37:9091';
|
||||||
//return '192.168.33.207:9091'; // 张骞
|
//return '192.168.33.207:9091'; // 张骞
|
||||||
return '192.168.33.93:9091';
|
// return '192.168.33.93:9091';
|
||||||
// return '192.168.3.37:9091'; //卫志宏
|
// return '192.168.3.37:9091'; //卫志宏
|
||||||
// return 'test.joylink.club/bjrtsts-service'; // 测试
|
// return 'test.joylink.club/bjrtsts-service'; // 测试
|
||||||
return '192.168.33.233:9091';
|
return '192.168.33.233:9091';
|
||||||
@ -26,7 +26,7 @@ export function getHttpBase() {
|
|||||||
|
|
||||||
export function getWebsocketUrl() {
|
export function getWebsocketUrl() {
|
||||||
let protocol = 'ws';
|
let protocol = 'ws';
|
||||||
let host = '192.168.33.93';
|
let host = '192.168.33.233';
|
||||||
// let host = 'test.joylink.club';
|
// let host = 'test.joylink.club';
|
||||||
let port = '8083';
|
let port = '8083';
|
||||||
let url = `${protocol}://${host}:${port}`;
|
let url = `${protocol}://${host}:${port}`;
|
||||||
@ -40,6 +40,9 @@ export function getWebsocketUrl() {
|
|||||||
host = 'joylink.club/bjrtsts-server';
|
host = 'joylink.club/bjrtsts-server';
|
||||||
port = '';
|
port = '';
|
||||||
url = `${protocol}://${host}`;
|
url = `${protocol}://${host}`;
|
||||||
|
} else if (process.env.URL_ENV == 'local_test') {
|
||||||
|
host = '192.168.33.233';
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${url}/mqtt`;
|
return `${url}/mqtt`;
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,6 @@ export class TrainHead extends Container {
|
|||||||
arrowPoint = aP;
|
arrowPoint = aP;
|
||||||
}
|
}
|
||||||
this.pause.visible = true;
|
this.pause.visible = true;
|
||||||
console.log(states.trainActiveDirection, this.train.code, states.driftTo);
|
|
||||||
if (states.trainActiveDirection !== 0) {
|
if (states.trainActiveDirection !== 0) {
|
||||||
let lineIsLeft;
|
let lineIsLeft;
|
||||||
if (states.driftTo === (states.trainActiveDirection === 1)) {
|
if (states.driftTo === (states.trainActiveDirection === 1)) {
|
||||||
@ -568,10 +567,18 @@ export class Train extends JlGraphic {
|
|||||||
}
|
}
|
||||||
allLength = getKmDistance(pKm, oKm);
|
allLength = getKmDistance(pKm, oKm);
|
||||||
const portP = points[points.length - 1];
|
const portP = points[points.length - 1];
|
||||||
if (this.states.driftTo) {
|
if (portP.x === 0) {
|
||||||
this.arrowIsLeft = 0 < portP.x;
|
if (this.states.driftTo) {
|
||||||
|
this.arrowIsLeft = 0 < portP.y;
|
||||||
|
} else {
|
||||||
|
this.arrowIsLeft = 0 > portP.y;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.arrowIsLeft = portP.x < 0;
|
if (this.states.driftTo) {
|
||||||
|
this.arrowIsLeft = 0 < portP.x;
|
||||||
|
} else {
|
||||||
|
this.arrowIsLeft = portP.x < 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dev = this.queryStore.queryById<Section>(this.states.headDeviceId);
|
dev = this.queryStore.queryById<Section>(this.states.headDeviceId);
|
||||||
@ -611,7 +618,11 @@ export class Train extends JlGraphic {
|
|||||||
allLength = getKmDistance(BKm, AKm);
|
allLength = getKmDistance(BKm, AKm);
|
||||||
const portS = points[0];
|
const portS = points[0];
|
||||||
const portE = points[points.length - 1];
|
const portE = points[points.length - 1];
|
||||||
this.arrowIsLeft = portE.x > portS.x && !this.states.driftTo;
|
if (portE.x === portS.x) {
|
||||||
|
this.arrowIsLeft = portE.y < portS.y && !this.states.driftTo;
|
||||||
|
} else {
|
||||||
|
this.arrowIsLeft = portE.x > portS.x && !this.states.driftTo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.trainbody.doRepaint();
|
this.trainbody.doRepaint();
|
||||||
|
Loading…
Reference in New Issue
Block a user