上饶沙盘 列车操作 问题调整(速度方向会重置)

This commit is contained in:
fan 2021-11-08 15:31:19 +08:00
parent 3ba20ae75c
commit 166ce2d75a
2 changed files with 8 additions and 6 deletions

View File

@ -498,10 +498,10 @@ export function getStandListByRunLineOrTrainCode(group, params) {
});
}
/** 上饶列车控制 */
export function srTrainControl(group, data) {
export function srTrainControl(group, params) {
return request({
url: `/api/sr/${group}/control`,
method: 'put',
data
params
});
}

View File

@ -70,10 +70,12 @@ export default {
this.dialogVisible = false;
},
doShow(val) {
this.groupNumber = val.groupNumber;
this.train = val;
this.right = !!val.right;
this.speed = val.speed;
if (this.dialogVisible && this.groupNumber === val.groupNumber) { return; }
const train = this.$store.getters['map/getDeviceByCode'](val.groupNumber);
this.groupNumber = train.groupNumber;
this.train = train;
this.right = !!train.right;
this.speed = train.speed;
this.dialogVisible = true;
},
changeSpeed(val) {