Merge branch 'test_deplotSimulation' of git.code.tencent.com:lian-cbtc/jl-client into test_deplotSimulation
This commit is contained in:
commit
bafc4d65e7
@ -67,10 +67,10 @@
|
||||
<span class="buttonColor">钮解</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Command.cancel.clearMbm.domId"
|
||||
:id="Signal.cancelTrainRoute.button.domId"
|
||||
class="button_box"
|
||||
:style="{ width: width + 'px', backgroundColor: buttonUpColor }"
|
||||
@click="buttonDown(Command.cancel.clearMbm.operation)"
|
||||
@click="buttonDown(Signal.cancelTrainRoute.button.operation)"
|
||||
>
|
||||
<span class="buttonColor">取消</span>
|
||||
</button>
|
||||
@ -245,14 +245,74 @@ export default {
|
||||
this.$refs.noticeInfo.doShow()
|
||||
})
|
||||
},
|
||||
resetMbmButton() {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null)
|
||||
Handler.clear() // 清空操作组
|
||||
},
|
||||
buttonDown(operation) {
|
||||
// 清空当前的选择的设备
|
||||
this.deviceList = []
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
methods: {
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
// this.promptInfo = '';
|
||||
const domId = OperationHandler.getDomIdByOperation(old)
|
||||
const dom = document.getElementById(domId)
|
||||
if (dom) {
|
||||
dom.disabled = false
|
||||
dom.style.backgroundColor = this.buttonUpColor
|
||||
}
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
const domId = OperationHandler.getDomIdByOperation(val)
|
||||
const dom = document.getElementById(domId)
|
||||
if (dom) {
|
||||
// this.promptInfo = dom.innerText;
|
||||
dom.disabled = true
|
||||
dom.style.backgroundColor = this.buttonDownColor
|
||||
}
|
||||
}
|
||||
},
|
||||
passWordCommit(data) {
|
||||
let operate = {}
|
||||
if (data.overNext) {
|
||||
operate = {
|
||||
over: true,
|
||||
code: data.code,
|
||||
operation: data.operation,
|
||||
cmdType: this.cmdType,
|
||||
param: data.param,
|
||||
}
|
||||
} else if (data.nextCmdType) {
|
||||
operate = {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.nextCmdType,
|
||||
}
|
||||
} else {
|
||||
operate = {
|
||||
operation: data.operateNext,
|
||||
}
|
||||
}
|
||||
this.trainingOperation(operate)
|
||||
},
|
||||
// 执行操作
|
||||
trainingOperation(operate) {
|
||||
this.$store
|
||||
.dispatch('training/nextNew', operate)
|
||||
.then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true })
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
this.$refs.noticeInfo.doShow()
|
||||
})
|
||||
},
|
||||
resetMbmButton() {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null)
|
||||
Handler.clear() // 清空操作组
|
||||
},
|
||||
buttonDown(operation) {
|
||||
// 清空当前的选择的设备
|
||||
this.deviceList = []
|
||||
// if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
operation: operation,
|
||||
}
|
||||
@ -278,19 +338,7 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: operation,
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null)
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true })
|
||||
Handler.clear() // 清空操作组
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -13,21 +13,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteLock from './dialog/routeLock';
|
||||
import RouteCmdControl from './dialog/routeCmdControl';
|
||||
import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import PopMenu from '@/components/PopMenu'
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl'
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'
|
||||
import RouteSelection from './dialog/routeSelection'
|
||||
import RouteLock from './dialog/routeLock'
|
||||
import RouteCmdControl from './dialog/routeCmdControl'
|
||||
import RouteHandControl from './dialog/routeHandControl'
|
||||
import RouteDetail from './dialog/routeDetail'
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum'
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -46,7 +46,7 @@ export default {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
return null
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -206,228 +206,323 @@ export default {
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', ['mode', 'operatemode']),
|
||||
...mapGetters('menuOperation', ['buttonOperation']),
|
||||
...mapGetters('map', ['routeList']),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
return this.$route.query.group
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition)
|
||||
} else {
|
||||
this.doClose();
|
||||
this.doClose()
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Signal') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected)
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal)
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
this.menu = this.menuForce
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
// 信号机封锁
|
||||
case OperationEvent.Signal.lock.button.operation: {
|
||||
commitOperate(menuOperate.Signal.lock, { signalCode: selectType.code }, 3)
|
||||
.then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
// this.$refs.routeLock.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.$refs.noticeInfo.doShow()
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
break;
|
||||
console.error(error)
|
||||
this.$refs.noticeInfo.doShow()
|
||||
})
|
||||
break
|
||||
}
|
||||
case OperationEvent.Signal.lock.unlock.operation: {
|
||||
// 信号机解封
|
||||
case OperationEvent.Signal.unlock.button.operation: {
|
||||
// this.unlock(selectType);
|
||||
commitOperate(menuOperate.Signal.unlock, { signalCode: selectType.code }, 3)
|
||||
.then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
// this.$refs.routeLock.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.$refs.noticeInfo.doShow()
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
break;
|
||||
console.error(error)
|
||||
this.$refs.noticeInfo.doShow()
|
||||
})
|
||||
break
|
||||
}
|
||||
// 取消进路
|
||||
case OperationEvent.Signal.cancelTrainRoute.button.operation: {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, { signalCode: selectType.code }, 3)
|
||||
.then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
// this.$refs.routeLock.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow()
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
this.$refs.noticeInfo.doShow()
|
||||
})
|
||||
break
|
||||
}
|
||||
// 人解进路
|
||||
// 排列进路
|
||||
default: {
|
||||
break;
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
this.initMenu()
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
this.$refs.popMenu.resetShowPosition(point)
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
this.$refs.popMenu.close()
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
const routes = []
|
||||
this.routeList.forEach((elem) => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
routes.push(elem)
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
})
|
||||
return routes
|
||||
},
|
||||
// 排列进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected))
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 信号封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Signal.lock, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeLock.doShow(operate, this.selected);
|
||||
this.$refs.routeLock.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 信号解封
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Signal.unlock, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||
this.$refs.routeCmdControl.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||
this.$refs.routeCmdControl.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 设置联锁自动进路
|
||||
setAutoInterlock() {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
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);
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
commitOperate(menuOperate.Signal.setAutoTrigger, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoTrigger, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 自排关(进路交人工控)
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected))
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 自排关(进路交ATS自动控)
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected))
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected));
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected))
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected)
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeCmdControl.doShow(operate, this.selected)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 设置联锁自动进路
|
||||
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)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
commitOperate(menuOperate.Signal.setAutoTrigger, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoTrigger, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 自排关(进路交人工控)
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected))
|
||||
}
|
||||
})
|
||||
},
|
||||
// 自排关(进路交ATS自动控)
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected))
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, { signalCode: this.selected.code }, 0).then(({ valid, operate }) => {
|
||||
if (valid) {
|
||||
this.$refs.routeDetail.doShow(operate, this.selected, this.getRouteList(this.selected))
|
||||
}
|
||||
})
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected)
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user