This commit is contained in:
lVAL 2021-01-25 18:23:32 +08:00
commit 8ecbee01b2
2 changed files with 28 additions and 8 deletions

View File

@ -259,6 +259,13 @@ export default class Section extends Group {
sectionCutOff() {
const lineWidth = this.style.Section.line.width + (this.model.status != '01' ? this.style.Section.line.beyondWidth : 0);
if (this.line) {
if (this.model.relSwitchCode) {
const switchModel = Vue.prototype.$jlmap.mapDevice[this.model.relSwitchCode];
if (switchModel && switchModel.reversePosition && !switchModel.blockade && switchModel.sectionCCode == this.model.code) {
// debugger;
this.line.setZleve(this.z + 8);
}
}
this.line.animateStyle(true, [
{ time: 0, styles: { lineWidth: lineWidth } },
{ time: 1000, styles: { stroke: this.style.backgroundColor } },

View File

@ -152,17 +152,17 @@ export default {
this.$ConstSelect.DirectionCodeList.forEach(elem => {
this.DirectionCodeMap[elem.value] = elem.label;
});
this.stationIntervalData = [];
if (this.$route.query.lineCode) {
getMapStationRunUser(this.$route.query.mapId).then(resp =>{
const list = resp.data.list;
this.stationIntervalData = [];
this.stationIntervalData = list;
this.form.level1 = '';
this.form.level2 = '';
this.form.level3 = '';
this.form.level4 = '';
this.form.level5 = '';
});
}
},
@ -186,16 +186,29 @@ export default {
handleStationTime() {
setStationRunning(this.$route.query.mapId, this.stationIntervalData).then(resp => {
this.$message.success(this.$t('planMonitor.modifying.modifySuccess'));
}).catch(() => {
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed'));
}).catch((error) => {
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed') + ': ' + error.message);
});
},
handleStationDistance() {
updateRunlevelDistance(this.$route.query.mapId).then(resp => {
this.loadInitData();
this.$message.success('更新成功');
}).catch(() => {
this.$messageBox('更新失败');
if (resp.data) {
this.$message.success('更新成功');
const list = resp.data;
const stationIntervalData = [];
this.stationIntervalData.forEach(station=>{
if (list[station.id]) {
const tempStation = Object.assign({}, station);
tempStation.distance = list[station.id];
stationIntervalData.push(tempStation);
}
});
this.stationIntervalData = stationIntervalData;
} else {
this.$messageBox('更新失败:数据为空');
}
}).catch((error) => {
this.$messageBox('更新失败: ' + error.message);
});
},
doShow(params) {