调整右键菜单获取

This commit is contained in:
zyy 2020-01-02 11:08:01 +08:00
parent 5db5bb40f8
commit 764f7c479e
3 changed files with 14 additions and 15 deletions

View File

@ -16,11 +16,11 @@ class MenuContextHandler {
getStationControl(selected) {
let control;
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.deviceStationCode);
}
return control;
}

View File

@ -229,7 +229,6 @@ export default {
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
schedulingNotify(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser };
console.log(this.drawWay, '-------xinban');
if (this.drawWay) {
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
} else {

View File

@ -134,17 +134,17 @@ export default {
}
} else {
getEveryDayRunPlanNew(this.group).then(resp => {
this.$store.dispatch('runPlan/setPlanData', resp.data);
this.viewDisabled = false;
}).catch(error => {
this.$store.dispatch('runPlan/setPlanData', []);
if (error.code == 30001) {
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
} else {
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
}
});
// getEveryDayRunPlanNew(this.group).then(resp => {
// this.$store.dispatch('runPlan/setPlanData', resp.data);
// this.viewDisabled = false;
// }).catch(error => {
// this.$store.dispatch('runPlan/setPlanData', []);
// if (error.code == 30001) {
// this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
// } else {
// this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
// }
// });
}
});
}).catch(() => {