Merge branch 'master' of https://git.qcloud.com/joylink/jl-nclient
This commit is contained in:
commit
d819a27f94
@ -2,7 +2,7 @@ const mapDeviceStyle = {
|
|||||||
// '01': 'chengdu_04',
|
// '01': 'chengdu_04',
|
||||||
'02': 'fuzhou_01',
|
'02': 'fuzhou_01',
|
||||||
'03': 'bejing_01',
|
'03': 'bejing_01',
|
||||||
// '03': 'chengdu_03',
|
'04': 'chengdu_03',
|
||||||
'05': 'batong_01' // 暂时没有画北京八通线
|
'05': 'batong_01' // 暂时没有画北京八通线
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -285,7 +285,8 @@ class SkinStyle extends defaultStyle {
|
|||||||
|
|
||||||
this[deviceType.Switch] = {
|
this[deviceType.Switch] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 道岔名称与区段距离
|
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||||
|
offset: {x: -15, y: -10}, // 道岔名称与区段距离
|
||||||
fontSize: 10, // 字体大小
|
fontSize: 10, // 字体大小
|
||||||
fontWeight: 'normal', // 字体粗细
|
fontWeight: 'normal', // 字体粗细
|
||||||
borderColor: '#FE0000', // 道岔边框颜色
|
borderColor: '#FE0000', // 道岔边框颜色
|
||||||
|
@ -58,6 +58,7 @@ class SkinStyle extends defaultStyle {
|
|||||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||||
},
|
},
|
||||||
destinationText: {
|
destinationText: {
|
||||||
|
opposite: true, // 对称相反
|
||||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||||
distance: 12, // 文字离区段距离
|
distance: 12, // 文字离区段距离
|
||||||
fontSize: 11, // 字体大小
|
fontSize: 11, // 字体大小
|
||||||
@ -281,7 +282,8 @@ class SkinStyle extends defaultStyle {
|
|||||||
|
|
||||||
this[deviceType.Switch] = {
|
this[deviceType.Switch] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 道岔名称与区段距离
|
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||||
|
offset: {x: 5, y: -10}, // 道岔名称与区段距离
|
||||||
fontSize: 11, // 字体大小
|
fontSize: 11, // 字体大小
|
||||||
fontWeight: 'normal', // 字体粗细
|
fontWeight: 'normal', // 字体粗细
|
||||||
borderColor: '#FE0000', // 道岔边框颜色
|
borderColor: '#FE0000', // 道岔边框颜色
|
||||||
|
@ -261,7 +261,8 @@ class SkinStyle extends defaultStyle {
|
|||||||
|
|
||||||
this[deviceType.Switch] = {
|
this[deviceType.Switch] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 道岔名称与区段距离
|
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||||
|
offset: {x: 5, y: 10}, // 道岔名称与区段距离
|
||||||
fontSize: 10, // 字体大小
|
fontSize: 10, // 字体大小
|
||||||
fontWeight: 'normal', // 字体粗细
|
fontWeight: 'normal', // 字体粗细
|
||||||
borderColor: '#FE0000', // 道岔边框颜色
|
borderColor: '#FE0000', // 道岔边框颜色
|
||||||
|
@ -57,7 +57,6 @@ export default class LcControl extends Group {
|
|||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
|
@ -57,7 +57,6 @@ export default class LimitControl extends Group {
|
|||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
|
@ -49,7 +49,6 @@ export default class Line2 extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
this.setLineType(model.type);
|
this.setLineType(model.type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,6 @@ class Link extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tipBasePoint() {
|
tipBasePoint() {
|
||||||
|
@ -224,8 +224,8 @@ export default class Section extends Group {
|
|||||||
// 计算区段坐标位置
|
// 计算区段坐标位置
|
||||||
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 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 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 drict = model.trainPosType != '01' ? 1 : -1;
|
|
||||||
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
|
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
|
||||||
|
const drict = model.trainPosType != '01' ? 1 : -1;
|
||||||
/** 区段名称*/
|
/** 区段名称*/
|
||||||
if (model.nameShow) {
|
if (model.nameShow) {
|
||||||
let tempx = x;
|
let tempx = x;
|
||||||
@ -728,7 +728,7 @@ export default class Section extends Group {
|
|||||||
|
|
||||||
/** 设置状态*/
|
/** 设置状态*/
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
// this.model = model;
|
||||||
this.recover();
|
this.recover();
|
||||||
switch (model.status) {
|
switch (model.status) {
|
||||||
case '00': /** 未定义*/
|
case '00': /** 未定义*/
|
||||||
|
@ -54,6 +54,9 @@ export default class EMouse extends Group {
|
|||||||
mouseout(e) {
|
mouseout(e) {
|
||||||
this.nameRect.hide();
|
this.nameRect.hide();
|
||||||
this.lampRect.hide();
|
this.lampRect.hide();
|
||||||
|
this.device.lamps.forEach(elem => {
|
||||||
|
elem.setBorderColor(this.style.Signal.lamp.borderColor);
|
||||||
|
});
|
||||||
this.device.setState(this.device.model);
|
this.device.setState(this.device.model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class ESigLamp extends Group {
|
|||||||
style: {
|
style: {
|
||||||
lineWidth: style.Signal.lamp.borderWidth,
|
lineWidth: style.Signal.lamp.borderWidth,
|
||||||
fill: style.backgroundColor,
|
fill: style.backgroundColor,
|
||||||
stroke: style.Signal.post.standardColor
|
stroke: style.Signal.lamp.borderColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -433,7 +433,6 @@ class Signal extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
this.recover();
|
this.recover();
|
||||||
/** 设置状态 (点灯类型)*/
|
/** 设置状态 (点灯类型)*/
|
||||||
switch (model.status) {
|
switch (model.status) {
|
||||||
|
@ -72,7 +72,6 @@ export default class Station extends Group {
|
|||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getShapeTipPoint() {
|
getShapeTipPoint() {
|
||||||
|
@ -105,7 +105,6 @@ export default class StationControl extends Group {
|
|||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
switch (model.status) {
|
switch (model.status) {
|
||||||
case '00': // 无状态
|
case '00': // 无状态
|
||||||
this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||||
|
@ -81,7 +81,6 @@ export default class StationCounter extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getShapeTipPoint() {
|
getShapeTipPoint() {
|
||||||
|
@ -95,7 +95,6 @@ export default class StationDelayUnlock extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
switch (model.status) {
|
switch (model.status) {
|
||||||
case '01': this.delayClose(); break; // 关闭
|
case '01': this.delayClose(); break; // 关闭
|
||||||
case '02': this.delayUnlock(); break; // 延迟解锁
|
case '02': this.delayUnlock(); break; // 延迟解锁
|
||||||
|
@ -310,7 +310,6 @@ class StationStand extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
this.recover();
|
this.recover();
|
||||||
switch (model.status) {
|
switch (model.status) {
|
||||||
case '01': /** 空闲*/
|
case '01': /** 空闲*/
|
||||||
|
@ -24,7 +24,7 @@ class ESwName extends Group {
|
|||||||
fontFamily: style.textFontFormat,
|
fontFamily: style.textFontFormat,
|
||||||
text: model.name,
|
text: model.name,
|
||||||
textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
textAlign: model.triangle.drictx === 1 ? 'left' : 'right',
|
||||||
textVerticalAlign: model.triangle.dricty === 1 ? 'top' : 'bottom',
|
textVerticalAlign: 'middle',
|
||||||
textFill: style.textFontColor
|
textFill: style.textFontColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -123,8 +123,9 @@ export default class Switch extends Group {
|
|||||||
|
|
||||||
const arrowTextX = model.intersection.x + 10;
|
const arrowTextX = model.intersection.x + 10;
|
||||||
const arrowTextY = model.intersection.y + 15;
|
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 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 + this.triangle.dricty * (style.Switch.text.distance);
|
const nameTextY = model.namePosition.y + model.intersection.y + style.Switch.text.offset.y * (style.Switch.text.position || directy);
|
||||||
|
|
||||||
this.name = new ESwName({
|
this.name = new ESwName({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
@ -368,7 +369,6 @@ export default class Switch extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
this.setLocateType(model);
|
this.setLocateType(model);
|
||||||
switch (model.status) {
|
switch (model.status) {
|
||||||
case '01':
|
case '01':
|
||||||
|
@ -40,6 +40,5 @@ export default class Text2 extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,6 @@ class TrainWindow extends Group {
|
|||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
this.setTrainWindowEventShow(model.trainWindowShow);
|
this.setTrainWindowEventShow(model.trainWindowShow);
|
||||||
}
|
}
|
||||||
setTrainWindowEventShow(show) {
|
setTrainWindowEventShow(show) {
|
||||||
|
@ -57,7 +57,6 @@ export default class ZcControl extends Group {
|
|||||||
|
|
||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.model = model;
|
|
||||||
}
|
}
|
||||||
createMouseEvent() {
|
createMouseEvent() {
|
||||||
if (this.style.ZcControl.mouseOverStyle) {
|
if (this.style.ZcControl.mouseOverStyle) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
export function getBaseUrl() {
|
export function getBaseUrl() {
|
||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
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 = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.5:9010' // 袁琪
|
// BASE_API = 'http://192.168.3.5:9010' // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9010'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9010'; // 旭强
|
||||||
|
Loading…
Reference in New Issue
Block a user