Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
621a077e86
@ -110,6 +110,8 @@ import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuBar',
|
||||
@ -141,7 +143,7 @@ export default {
|
||||
valid: true,
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
local: [
|
||||
Local: [
|
||||
{
|
||||
title: '系统',
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
@ -386,7 +388,7 @@ export default {
|
||||
]
|
||||
}
|
||||
],
|
||||
central: [
|
||||
Center: [
|
||||
{
|
||||
title: '系统',
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
@ -699,8 +701,10 @@ export default {
|
||||
return list;
|
||||
},
|
||||
initMenu(menu) {
|
||||
if (this.menu[2]) {
|
||||
this.menu[2].children = this.initStationList();
|
||||
const type = State2SimulationMap[this.$store.state.training.prdType];
|
||||
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode);
|
||||
if (this.menu[3]) {
|
||||
this.menu[3].children = this.initStationList();
|
||||
}
|
||||
this.clickEvent();
|
||||
this.closeMenu(true);
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div v-if="isShowBtn" menuButtonclass="menu menuButton" style="height: 45px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height:45px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
|
||||
<button
|
||||
:id="Signal.arrangementRoute.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
|
@ -105,6 +105,16 @@ export default {
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动进路',
|
||||
handler: this.setAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动进路',
|
||||
handler: this.cancelAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
@ -349,6 +359,22 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置联锁自动进路
|
||||
setAutoInterlock() {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消联锁自动进路
|
||||
cancelAutoInterlock() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
singalPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm cmd-notice"
|
||||
class="fuzhou-01__systerm cmd-notice"
|
||||
title="操作命令提示"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -18,7 +18,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name: 'CmdNotice',
|
||||
data() {
|
||||
@ -40,20 +40,18 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
|
||||
const operate = this.$store.state.training.operate;
|
||||
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
|
||||
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
const newOperate = {
|
||||
type: operate.type,
|
||||
name: station.name
|
||||
};
|
||||
|
||||
if (elem.timeout) {
|
||||
newOperate['msg'] = '请求超时';
|
||||
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
|
||||
this.doShow(newOperate);
|
||||
} else if (!elem.success) {
|
||||
newOperate['msg'] = '请求拒绝';
|
||||
} else if (!elem.agree) {
|
||||
newOperate['msg'] = this.$t('menu.passiveDialog.requestRejection');
|
||||
this.doShow(newOperate);
|
||||
}
|
||||
}
|
||||
@ -83,11 +81,10 @@ export default {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: this.operate.type,
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -96,10 +93,9 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -84,7 +84,7 @@ export default {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -95,7 +95,7 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -60,7 +60,6 @@ class Handler {
|
||||
command = CommandHandler.getCommand(cmdType, wholeParam);
|
||||
if (command && command.isError) {
|
||||
this.operations.pop();
|
||||
store.dispatch('training/setTempStep', null);
|
||||
command = null;
|
||||
} else if (command && command.isOver) {
|
||||
this.clear();
|
||||
|
@ -1,14 +1,10 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import LangStorage from '@/utils/lang';
|
||||
|
||||
import Handler from './Handler.js';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { Message } from 'element-ui';
|
||||
|
||||
class ValidateHandler {
|
||||
vaildate(mode, operate) {
|
||||
switch (mode) {
|
||||
case TrainingMode.EDIT: // 编辑制作模式
|
||||
return this.vaildate_edit(operate);
|
||||
case TrainingMode.PRACTICE: // 练习模式
|
||||
return this.vaildate_tips(operate);
|
||||
case TrainingMode.TEACH: // 教学模式
|
||||
@ -18,22 +14,6 @@ class ValidateHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
vaildate_edit(operate) {
|
||||
let vaild = true;
|
||||
if (Handler.getOperateBreakStatus()) {
|
||||
const tip = LangStorage.getLang() == 'en' ? 'Please enter a hint and click next' : '请输入提示并点击下一步';
|
||||
Message.error(tip);
|
||||
Handler.pop();
|
||||
vaild = false;
|
||||
}
|
||||
|
||||
if (Handler.getTrainingStart()) {
|
||||
store.dispatch('training/setTempStep', operate);
|
||||
}
|
||||
|
||||
return vaild;
|
||||
}
|
||||
|
||||
vaildate_tips(operate) {
|
||||
let valid = true;
|
||||
if (Handler.getTrainingStart()) {
|
||||
|
@ -20,7 +20,6 @@ OperateConverter.prototype = {
|
||||
if (command && command.error) {
|
||||
// 命令错误,可以回退或清空(暂用回退)
|
||||
OperateHandler.operates.pop();
|
||||
store.dispatch('training/setTempStep', null);
|
||||
command = null;
|
||||
} else if (command && command.over) {
|
||||
// 清空操作组
|
||||
|
@ -4,8 +4,6 @@ import OperateConverter from '@/scripts/plugin/OperateConvert2Command';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { getConverter } from '@/scripts/plugin/Converter/manager';
|
||||
import { sendTrainingNextStep } from '@/api/jmap/training';
|
||||
import { Message } from 'element-ui';
|
||||
import LangStorage from '@/utils/lang';
|
||||
|
||||
var OperateHandler = function () {
|
||||
};
|
||||
@ -67,19 +65,7 @@ OperateHandler.prototype = {
|
||||
|
||||
let valid = true;
|
||||
const mode = this.getTrainingMode();
|
||||
if (TrainingMode.EDIT === mode) {
|
||||
// 编辑制作模式
|
||||
if (this.getOperateBreakStatus()) {
|
||||
valid = false;
|
||||
const tip = LangStorage.getLang() == 'en' ? 'Please enter a hint and click next' : '请输入提示并点击下一步';
|
||||
Message.error(tip);
|
||||
this.operates.pop();
|
||||
return valid;
|
||||
}
|
||||
if (this.getTrainingStart()) {
|
||||
store.dispatch('training/setTempStep', operate);
|
||||
}
|
||||
} else if (TrainingMode.TEACH === mode || TrainingMode.PRACTICE === mode) {
|
||||
if (TrainingMode.TEACH === mode || TrainingMode.PRACTICE === mode) {
|
||||
// 教学模式/练习模式
|
||||
if (this.getTrainingStart()) {
|
||||
valid = this.judge(operate);
|
||||
|
@ -21,7 +21,6 @@ const training = {
|
||||
offsetStationCode: '', // 偏移到车站
|
||||
rezoomCount: 0, // 车站变更标识
|
||||
steps: [], // 实训步骤数据
|
||||
tempStep: {}, // 临时步骤数据(编辑模式)
|
||||
order: -1, // 实训进行到第几步
|
||||
orderCount: 0, // 步骤变更标识
|
||||
operateErrMsg: '', // 操作错误提示信息
|
||||
@ -39,9 +38,6 @@ const training = {
|
||||
},
|
||||
|
||||
getters: {
|
||||
tempStep: (state) => {
|
||||
return state.tempStep;
|
||||
},
|
||||
steps: (state) => {
|
||||
return state.steps;
|
||||
},
|
||||
@ -152,10 +148,6 @@ const training = {
|
||||
state.orderCount += 1;
|
||||
}
|
||||
},
|
||||
setTempStep: (state, step) => {
|
||||
state.tempStep = step;
|
||||
},
|
||||
|
||||
setOperateErrMsg: (state, errMsg) => {
|
||||
state.operateErrMsg = errMsg;
|
||||
},
|
||||
@ -508,13 +500,6 @@ const training = {
|
||||
commit('updateMapState', deviceStatus);
|
||||
},
|
||||
|
||||
/**
|
||||
* 设置临时步骤数据
|
||||
*/
|
||||
setTempStep: ({ commit }, step) => {
|
||||
commit('setTempStep', step);
|
||||
},
|
||||
|
||||
/**
|
||||
* 开始教学模式
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user