调整宁波线路自动折返 计轴复位操作
This commit is contained in:
parent
11b2ee8130
commit
4203c30e30
@ -484,7 +484,7 @@ class SkinCode extends defaultStyle {
|
||||
lamp: {
|
||||
fill: 'rgba(0,0,0,0)', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
||||
controlColor: 'red' // 控制灯颜色 (灰色)
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -104,9 +104,16 @@ export default class Automactic extends Group {
|
||||
this.add(this.text);
|
||||
}
|
||||
|
||||
recover() {
|
||||
this.control.setStyle({ fill: this.style.AutoTurnBack.lamp.controlColor });
|
||||
}
|
||||
handleSignal() {
|
||||
this.control.setStyle({ fill: 'green' });
|
||||
}
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
// model.show && this.handleSignal();
|
||||
this.recover();
|
||||
model.green && this.handleSignal();
|
||||
}
|
||||
|
||||
createMouseEvent() {
|
||||
|
@ -40,7 +40,8 @@ export default class AxleReset extends Group {
|
||||
r: this.style.AxleReset.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
stroke: '##b5b3b3',
|
||||
lineWidth: 1.5,
|
||||
fill: this.style.AxleReset.lamp.controlColor
|
||||
}
|
||||
});
|
||||
|
@ -362,7 +362,7 @@ class Signal extends Group {
|
||||
|
||||
// 引导
|
||||
guid() {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01') {
|
||||
this.lamps[1].show();
|
||||
}
|
||||
if (this.count == 2 && !this.model.lightType && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号
|
||||
@ -480,7 +480,7 @@ class Signal extends Group {
|
||||
if (this.style.Signal.lamp.guidName == 'chengdu_03') {
|
||||
this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth });
|
||||
}
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) {
|
||||
if (this.style.Signal.lamp.guidName == 'ningbo_01') {
|
||||
this.lamps[1].hide();
|
||||
}
|
||||
}
|
||||
|
157
src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue
Normal file
157
src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue
Normal file
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm section-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="24">
|
||||
<span style="margin-right: 10px;">区段:</span>
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="sectionCode"
|
||||
filterable
|
||||
size="mini"
|
||||
@change="sectionSelectChange"
|
||||
>
|
||||
<el-option v-for="(option,index) in switchAndPhySicalSectionList" :key="index" :label="option.name" :value="option.name" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
sectionCode: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
switchAndPhySicalSectionList() {
|
||||
let list = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01' || elem.type === '03'; });
|
||||
}
|
||||
return list;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.AxleReset.SetAxleReset.choose.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
return '计轴复位';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.sectionCode = '';
|
||||
this.operation = operate.operation || '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
sectionSelectChange() {
|
||||
const operate = {
|
||||
operation: OperationEvent.AxleReset.SetAxleReset.choose.operation,
|
||||
val: this.sectionCode
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET,
|
||||
param: {
|
||||
sectionCode: this.sectionCode
|
||||
}
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -4,6 +4,7 @@
|
||||
<template v-show="isShowAll">
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<!-- <menu-button ref="menuButton" /> -->
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-station-control ref="menuStationControl" :selected="selected" />>
|
||||
@ -25,6 +26,7 @@ import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
// import MenuButton from './menuButton';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
@ -43,6 +45,7 @@ export default {
|
||||
components: {
|
||||
MenuBar,
|
||||
// MenuButton,
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
|
108
src/jmapNew/theme/ningbo_01/menus/menuAxleReset.vue
Normal file
108
src/jmapNew/theme/ningbo_01/menus/menuAxleReset.vue
Normal file
@ -0,0 +1,108 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-alxe-reset ref="sectionAlxeReset" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionAlxeReset from './dialog/sectionAlxeReset';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionAlxeReset
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '计轴复位',
|
||||
handler: this.handleAxleReset,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.AxleReset) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置计轴复位
|
||||
handleAxleReset() {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.AxleReset.SetAxleReset.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionAlxeReset.doShow(operate);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -105,6 +105,7 @@ export const DeviceMenu = {
|
||||
TrainWindow: '09',
|
||||
LimitControl: '10',
|
||||
AutoTurnBack: '11',
|
||||
AxleReset: '12',
|
||||
|
||||
Map: '100',
|
||||
PrdCategory: '101',
|
||||
|
@ -1946,6 +1946,23 @@ export const OperationEvent = {
|
||||
}
|
||||
},
|
||||
|
||||
AxleReset: {
|
||||
SetAxleReset: {
|
||||
menu: {
|
||||
operation: '1000',
|
||||
domId: '_Tips-Axle-Reset-Menu'
|
||||
},
|
||||
choose: {
|
||||
operation: '10001',
|
||||
domId: '_Tips-Axle-Reset-Choose-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '10002',
|
||||
domId: '_Tips-Axle-Reset-confirm-Menu'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 混合指令
|
||||
MixinCommand: {
|
||||
/** 控制模式操作 */
|
||||
|
Loading…
Reference in New Issue
Block a user