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