调整宁波线路区段计算提示位置逻辑

This commit is contained in:
zyy 2020-07-02 09:35:41 +08:00
parent 649704d3ee
commit 901dad45ee
2 changed files with 10 additions and 7 deletions

View File

@ -815,14 +815,14 @@ export default class Section extends Group {
/** 计算提示位置*/
getShapeTipPoint() {
let rect = this.getBoundingRect();
let distance = this.style.Section.line.width / 2;
const distance = this.style.Section.line.width / 2;
if (this.section) {
rect = this.section.getBoundingRect();
if (this.model.type !== '02' && this.model.nameShow) {
if (this.model.trainPosType == '01') {
distance = distance + this.style.Section.text.distance + this.style.Section.text.fontSize;
}
}
// if (this.model.type !== '02' && this.model.nameShow) {
// if (this.model.trainPosType == '01') {
// distance = distance + this.style.Section.text.distance + this.style.Section.text.fontSize;
// }
// }
}
return {
x: rect.x + rect.width / 2,

View File

@ -237,7 +237,10 @@ export default {
},
//
setSpeed() {
const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code;
let sectionCode = this.selected.code;
if (this.selected.type == '02' || this.selected.type == '03') {
sectionCode = this.selected.parentCode;
}
commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.speedLimitControl.doShow(operate, this.selected);