调整右键菜单获取

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) { getStationControl(selected) {
let control; let control;
if (selected._type == 'StationStand') { if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode); control = store.getters['map/getDeviceStationCodeByStationCode'](selected.deviceStationCode);
} else if (selected._type == 'Station') { } else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code); control = store.getters['map/getDeviceStationCodeByStationCode'](selected.code);
} else { } else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode); control = store.getters['map/getDeviceStationCodeByStationCode'](selected.deviceStationCode);
} }
return control; return control;
} }

View File

@ -229,7 +229,6 @@ export default {
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType }; const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
schedulingNotify(data).then(resp => { 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 }; 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) { if (this.drawWay) {
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
} else { } else {

View File

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