Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
82679405a1
@ -136,6 +136,7 @@ class SkinCode extends defaultStyle {
|
||||
endColor: '#C0C0C0', // 尽头分隔符颜色
|
||||
color: '#000', // 区段边界符颜色
|
||||
halfHeight: 5, // 区段分隔符高度的一半
|
||||
sepical:true, // 特殊类型 道岔C区段 分隔符为横向
|
||||
isLikeT:true // 特殊类型尽头分隔 类似与右躺着的T
|
||||
},
|
||||
trainPosition:{
|
||||
@ -688,7 +689,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
travelSigns: {
|
||||
trainTravelLeftSignsOffset: { x:3, y: 3},
|
||||
trainTravelRightSignsOffset: { x: 62, y: 3}
|
||||
trainTravelRightSignsOffset: { x: 65, y: 3}
|
||||
},
|
||||
delayTime: {
|
||||
trainDelayTimeOffset: { x:5, y: 14}
|
||||
@ -708,14 +709,14 @@ class SkinCode extends defaultStyle {
|
||||
trainServer: {
|
||||
serviceNumberPrefix: '000', // 服务号(表号)前缀
|
||||
defaultServiceNumber: 'BBB', // 默认服务号(表号)
|
||||
trainServerOffset: { x: 33, y: 3 }, // 列车服务号偏移
|
||||
trainServerOffset: { x: 36, y: 3 }, // 列车服务号偏移
|
||||
fontColor: '#00C300'
|
||||
},
|
||||
trainTarget: {
|
||||
tripNumberPrefix: '00', // 车次号前缀
|
||||
defaultDirectionCode: '', // 默认车次号1
|
||||
defaultTripNumber: 'CC', // 默认车次号2
|
||||
trainTargetOffset: { x: 53, y: 3 }, // 列车车次号偏移
|
||||
trainTargetOffset: { x: 56, y: 3 }, // 列车车次号偏移
|
||||
fontColor: '#00C300'
|
||||
},
|
||||
trainTargetNumber: {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import {isShowThePrdType} from '../../utils/handlePath';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
@ -24,36 +23,25 @@ export default class Arrow extends Group {
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.triangle = new Polygon({
|
||||
this.arrow = new Polygon({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
points: [
|
||||
[model.position.x, model.position.y],
|
||||
[model.position.x + model.triangleLength, model.position.y + model.triangleHeight / 2],
|
||||
[model.position.x + model.triangleLength, model.position.y - model.triangleHeight / 2]
|
||||
[model.position.x + model.triangleLength, model.position.y - model.triangleHeight / 2],
|
||||
[model.position.x + model.triangleLength, model.position.y - model.lineWidth / 2],
|
||||
[model.position.x + model.length, model.position.y - model.lineWidth / 2],
|
||||
[model.position.x + model.length, model.position.y + model.lineWidth / 2],
|
||||
[model.position.x + model.triangleLength, model.position.y + model.lineWidth / 2],
|
||||
[model.position.x + model.triangleLength, model.position.y + model.triangleHeight / 2]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
fill: model.color
|
||||
}
|
||||
});
|
||||
this.line = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x1: model.position.x + model.triangleLength,
|
||||
y1: model.position.y,
|
||||
x2: model.position.x + model.length,
|
||||
y2: model.position.y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.lineWidth,
|
||||
stroke: model.color
|
||||
}
|
||||
});
|
||||
this.add(this.triangle);
|
||||
this.add(this.line);
|
||||
this.add(this.arrow);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
@ -64,26 +52,18 @@ export default class Arrow extends Group {
|
||||
const showMode = this.model.showMode;
|
||||
const showConditions = this.model.showConditions;
|
||||
if (!showConditions || showConditions === '01' || showMode === showConditions) {
|
||||
this.eachChild((child) => {
|
||||
child.show();
|
||||
});
|
||||
this.arrow.show();
|
||||
} else {
|
||||
this.eachChild((child) => {
|
||||
child.hide();
|
||||
});
|
||||
this.arrow.hide();
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.eachChild((child) => {
|
||||
child.show();
|
||||
});
|
||||
this.arrow.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
} else {
|
||||
this.eachChild((child) => {
|
||||
child.hide();
|
||||
});
|
||||
this.arrow.hide();
|
||||
this.isShowShape = false;
|
||||
}
|
||||
}
|
||||
|
@ -116,45 +116,26 @@ export default class ESeparator extends Group {
|
||||
let partition = null;
|
||||
if (type === '01') { // 普通分割
|
||||
let points = [];
|
||||
const lineWidth = 0;
|
||||
// const tanRate = modelData.traingle.getTanRate();
|
||||
// if (modelData.type == '03' && tanRate != 0 && tanRate != 1) {
|
||||
// points = [
|
||||
// [modelData.point.x,
|
||||
// modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2],
|
||||
// [modelData.point.x - modelData.drict * (style.Section.separator.halfHeight) / tanRate,
|
||||
// modelData.point.y - modelData.drict * (style.Section.separator.halfHeight) / 2],
|
||||
// [modelData.point.x,
|
||||
// modelData.point.y - modelData.drict * (style.Section.separator.halfHeight) / 2],
|
||||
// [modelData.point.x + modelData.drict * (style.Section.separator.halfHeight) / tanRate,
|
||||
// modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2],
|
||||
// [modelData.point.x,
|
||||
// modelData.point.y + modelData.drict * (style.Section.separator.halfHeight) / 2]
|
||||
// // 待处理
|
||||
// // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2,
|
||||
// // modelData.point.y - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2],
|
||||
// // [modelData.point.x + (style.Section.separator.halfHeight) / modelData.traingle.getCosRate() / 2,
|
||||
// // modelData.point.y - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2],
|
||||
// // [modelData.point.x, modelData.point.y]
|
||||
// // [modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getSinRate(),
|
||||
// // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate()]
|
||||
// // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2,
|
||||
// // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2],
|
||||
// // [modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getSinRate() / 2,
|
||||
// // modelData.point.y + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate() / 2]
|
||||
// ];
|
||||
// console.log(points, '11111111111111111');
|
||||
// lineWidth = 1;
|
||||
// const stroke = style.Section.separator.color;
|
||||
// partition = this.createModel(modelData, points, lineWidth, stroke);
|
||||
// } else {
|
||||
points = [
|
||||
[modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)],
|
||||
[modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)]
|
||||
];
|
||||
// lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width;
|
||||
partition = this.createModel(modelData, points);
|
||||
// }
|
||||
let lineWidth = 0;
|
||||
const tanRate = modelData.traingle.getTanRate();
|
||||
if (style.Section.separator.sepical && modelData.type == '03' && tanRate != 0 && tanRate != 1) {
|
||||
// 转换坐标系计算
|
||||
const dataDirection = modelData.traingle.getRotation() > 0 ? 1 : -1;
|
||||
points = [
|
||||
[modelData.point.x - (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(),
|
||||
modelData.point.y + dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()],
|
||||
[modelData.point.x + (style.Section.separator.halfHeight) * modelData.traingle.getCosRate(),
|
||||
modelData.point.y - dataDirection * (style.Section.separator.halfHeight) * modelData.traingle.getSinRate()]
|
||||
];
|
||||
partition = this.createModel(modelData, points);
|
||||
} else {
|
||||
points = [
|
||||
[modelData.point.x, modelData.point.y - (style.Section.separator.halfHeight)],
|
||||
[modelData.point.x, modelData.point.y + (style.Section.separator.halfHeight)]
|
||||
];
|
||||
lineWidth = modelData.type == '02' ? style.Section.separator.logicWidth : style.Section.separator.width;
|
||||
partition = this.createModel(modelData, points, lineWidth);
|
||||
}
|
||||
} else if (type === '02') { // 单侧分割符
|
||||
const points = [
|
||||
[modelData.point.x + modelData.drict * (style.Section.separator.halfHeight), modelData.point.y - (style.Section.separator.halfHeight * 1.5)],
|
||||
|
@ -79,6 +79,7 @@ class ESigPost extends Group {
|
||||
setColor(color) {
|
||||
if (color) {
|
||||
this.ver && this.ver.setStyle({ stroke: color });
|
||||
this.ver && this.ver.setStyle({ fill: color });
|
||||
this.hor && this.hor.setStyle({ stroke: color });
|
||||
}
|
||||
}
|
||||
|
@ -183,10 +183,8 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog .el-input {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user