佛山有轨电车 代码调整
This commit is contained in:
parent
43eb3c4a39
commit
39e82e52dd
@ -243,6 +243,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { SimulationUserType, OperateMode } from '@/scripts/ConstDic';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
|
||||
export default {
|
||||
@ -284,6 +285,10 @@ export default {
|
||||
this.selectedChange();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.resetMbmButton();
|
||||
// Handler.clear(); // 清空操作组
|
||||
},
|
||||
methods: {
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
@ -305,6 +310,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
resetMbmButton() {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
},
|
||||
buttonDown(operation) {
|
||||
const operate = {
|
||||
operation: operation
|
||||
@ -316,16 +324,22 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
}).catch(res=>{
|
||||
this.resetMbmButton();
|
||||
});
|
||||
},
|
||||
selectedChange() {
|
||||
const model = this.$store.state.menuOperation.selected;
|
||||
if (!model._type) {
|
||||
// Handler.clear();
|
||||
if (this.$store.state.training.roles || (this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.training.operatemode === OperateMode.FAULT)) {
|
||||
//
|
||||
} else {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -210,6 +210,7 @@ export default {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
// this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
@ -223,6 +224,7 @@ export default {
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
// this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
@ -294,6 +294,7 @@ export default {
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
},
|
||||
// 排列进路
|
||||
arrangementRoute() {
|
||||
|
@ -292,6 +292,7 @@ export default {
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
},
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
|
Loading…
Reference in New Issue
Block a user