Merge remote-tracking branch 'origin/develop' into local-test
local-test分支构建发布到本地服务器 / Build-Publish (push) Successful in 7m24s
Details
local-test分支构建发布到本地服务器 / Build-Publish (push) Successful in 7m24s
Details
This commit is contained in:
commit
17f6234b1f
|
@ -346,14 +346,15 @@ class SkinCode extends defaultStyle {
|
||||||
|
|
||||||
this[deviceType.StationTurnBack] = { // 站后折返
|
this[deviceType.StationTurnBack] = { // 站后折返
|
||||||
lamp: {
|
lamp: {
|
||||||
fill: '#f1f1f1', // 填充色
|
fill: '#ccc', // 填充色
|
||||||
radiusR: 7 // 控制灯大小
|
radiusR: 6,
|
||||||
|
otherFill: '#0F0' // 控制灯大小
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
titleTextShow: false,
|
titleTextShow: false,
|
||||||
fontWeight: 580,
|
fontWeight: 580,
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
distance: 10
|
distance: 5
|
||||||
},
|
},
|
||||||
rect: {
|
rect: {
|
||||||
fill: 'rgba(0,0,0,0)',
|
fill: 'rgba(0,0,0,0)',
|
||||||
|
|
|
@ -166,6 +166,11 @@ export default class StationTurnBack extends Group {
|
||||||
this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor);
|
this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.style.StationTurnBack.lamp.otherFill) {
|
||||||
|
if (name == '自动折返' || name == '固定折返轨1' || name == '固定折返轨1') {
|
||||||
|
this.control && this.control.setStyle({fill: this.style.StationTurnBack.lamp.otherFill});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setAshShow() {
|
setAshShow() {
|
||||||
|
|
|
@ -0,0 +1,174 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="chengdou-03__systerm stand-run-level"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="320px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
|
||||||
|
<div style="margin-bottom: 5px;">
|
||||||
|
<el-input v-model="stationName" size="mini" disabled />
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
|
||||||
|
<div style="margin-bottom: 5px;">
|
||||||
|
<el-input v-model="stationStrategy" size="mini" disabled />
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
:data="strategyList"
|
||||||
|
border
|
||||||
|
:cell-style="tableStyle"
|
||||||
|
style="width: 100%; margin-top:10px"
|
||||||
|
size="mini"
|
||||||
|
height="180"
|
||||||
|
highlight-current-row
|
||||||
|
:show-header="false"
|
||||||
|
@row-click="clickEvent"
|
||||||
|
>
|
||||||
|
<el-table-column :id="domIdChoose" prop="label" style="margin-left:30px" />
|
||||||
|
</el-table>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @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" pop-class="chengdou-03__systerm" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StandBackStrategy',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false,
|
||||||
|
strategyList: [],
|
||||||
|
stationName: '',
|
||||||
|
stationStrategy: '',
|
||||||
|
selection: [],
|
||||||
|
isConfirm: false,
|
||||||
|
strategyId: '',
|
||||||
|
tableStyle: {
|
||||||
|
'border-bottom': 'none'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'stationList'
|
||||||
|
]),
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdCancel() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
return this.dialogShow ? OperationEvent.Station.setBackStrategy.menu.domId : '';
|
||||||
|
},
|
||||||
|
domIdChoose() {
|
||||||
|
return this.dialogShow ? OperationEvent.Station.setBackStrategy.choose.domId : '';
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
return '策略选择';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
if (!this.dialogShow) {
|
||||||
|
const name = selected.optionList.find(ele => ele.id == selected.tbStrategyId).label;
|
||||||
|
this.stationName = selected.name || '';
|
||||||
|
this.stationStrategy = selected.tbStrategyId ? name : '无策略折返'; // 当前默认折返策略
|
||||||
|
this.strategyList = selected.optionList; // 策略列表
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clickEvent(row, column, event) {
|
||||||
|
const operate = {
|
||||||
|
operation: OperationEvent.Station.setBackStrategy.choose.operation
|
||||||
|
};
|
||||||
|
this.strategyId = row.id;
|
||||||
|
this.isConfirm = true;
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
checkTableDataSelction(data) {
|
||||||
|
const selection = [];
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
data.forEach(row => {
|
||||||
|
if (row.check && !row.disabled) {
|
||||||
|
selection.push(row);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.disabledSend = !selection.length;
|
||||||
|
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||||
|
this.selection = selection;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (this.isConfirm) {
|
||||||
|
this.loading = true;
|
||||||
|
commitOperate(menuOperate.StationControl.setBackStrategy, {id: this.strategyId}, 2).then(({valid})=>{
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -8,6 +8,7 @@
|
||||||
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
|
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
|
||||||
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
|
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
|
||||||
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
|
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
|
||||||
|
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="'dispatchWork'" />
|
||||||
|
|
||||||
<passive-alarm ref="passiveAlarm" />
|
<passive-alarm ref="passiveAlarm" />
|
||||||
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
|
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
|
||||||
|
@ -24,6 +25,7 @@ import MenuSwitch from './menuSwitch';
|
||||||
import MenuSection from './menuSection';
|
import MenuSection from './menuSection';
|
||||||
import MenuStation from './menuStation';
|
import MenuStation from './menuStation';
|
||||||
import MenuTrain from './menuTrain';
|
import MenuTrain from './menuTrain';
|
||||||
|
import MenuStationTurnBack from './menuStationTurnBack.vue';
|
||||||
|
|
||||||
import PassiveAlarm from './passiveDialog/alarm';
|
import PassiveAlarm from './passiveDialog/alarm';
|
||||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||||
|
@ -40,7 +42,8 @@ export default {
|
||||||
MenuTrain,
|
MenuTrain,
|
||||||
PassiveAlarm,
|
PassiveAlarm,
|
||||||
PassiveContorl,
|
PassiveContorl,
|
||||||
PassiveTimeout
|
PassiveTimeout,
|
||||||
|
MenuStationTurnBack
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
|
|
|
@ -350,7 +350,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 如果该信号机红灯亮 而且 所属区段左右两侧区段锁闭 执行信号重启操作
|
// 如果该信号机红灯亮 而且 所属区段左右两侧区段锁闭 执行信号重启操作
|
||||||
if (signal.aspect == 'R' && isArrangementRoute) { // 信号重启
|
if (signal.lockedRouteCode) { // 信号重启
|
||||||
operate.over = true;
|
operate.over = true;
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
|
||||||
operate.code = deviceList[0].code;
|
operate.code = deviceList[0].code;
|
||||||
|
@ -396,19 +396,28 @@ export default {
|
||||||
operation: this.$store.state.menuOperation.buttonOperation,
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
param: {}
|
param: {}
|
||||||
};
|
};
|
||||||
if (model._type === 'StationStand' && subType === 'StopJumpLamp') {
|
let controlMode = '';
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
|
||||||
|
if (station) {
|
||||||
|
controlMode = station.controlMode;
|
||||||
|
// if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
|
||||||
|
// controlFlag = true;Interlock
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
const list2 = ['Local', 'Emergency'];
|
||||||
|
if (model._type === 'StationStand' && subType === 'StopJumpLamp' && list2.includes(controlMode)) {
|
||||||
operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
|
operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
|
||||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||||
operate.code = model.code;
|
operate.code = model.code;
|
||||||
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') {
|
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp' && list2.includes(controlMode)) {
|
||||||
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
|
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
|
||||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||||
operate.code = model.code;
|
operate.code = model.code;
|
||||||
} else if (model._type === 'AutoTurnBack' ) {
|
} else if (model._type === 'AutoTurnBack' && controlMode === 'Interlock') {
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
||||||
operate.param = {cycleCode: model.cycleCode};
|
operate.param = {cycleCode: model.cycleCode};
|
||||||
operate.code = model.code;
|
operate.code = model.code;
|
||||||
} else if (model._type === 'AutomaticRoute') {
|
} else if (model._type === 'AutomaticRoute' && controlMode === 'Interlock') {
|
||||||
const route = this.routeData[model.automaticRouteCode];
|
const route = this.routeData[model.automaticRouteCode];
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
|
||||||
operate.param = {signalCode: route.startSignalCode};
|
operate.param = {signalCode: route.startSignalCode};
|
||||||
|
@ -436,13 +445,16 @@ export default {
|
||||||
operate.code = model.code;
|
operate.code = model.code;
|
||||||
break;
|
break;
|
||||||
case 'interconnected':
|
case 'interconnected':
|
||||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL;
|
||||||
delete operate.over;
|
delete operate.over;
|
||||||
operate.subType = 'interconnected';
|
operate.subType = 'interconnected';
|
||||||
operate.param = {stationCodes: [model.code]};
|
operate.param = {stationCodes: [model.code]};
|
||||||
operate.code = model.code;
|
operate.code = model.code;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.info('请检查操作设备或控制权');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
|
||||||
// 判断是否需要 弹窗密码框
|
// 判断是否需要 弹窗密码框
|
||||||
|
@ -705,38 +717,37 @@ export default {
|
||||||
this.handelFunctionButton(model, subType);
|
this.handelFunctionButton(model, subType);
|
||||||
} else {
|
} else {
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
|
||||||
|
const list1 = ['Local', 'Emergency', 'Interlock'];
|
||||||
|
const list2 = ['Local', 'Emergency'];
|
||||||
if (station) {
|
if (station) {
|
||||||
if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
|
|
||||||
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||||
this.deviceList.push(model);
|
this.deviceList.push(model);
|
||||||
if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
|
if (buttonOperation === this.Signal.arrangementRoute.button.operation && list1.includes(station.controlMode)) {
|
||||||
this.arrangementRouteOperation(this.deviceList);
|
this.arrangementRouteOperation(this.deviceList);
|
||||||
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||||
this.handelTotalCancel(model, subType);
|
this.handelTotalCancel(model, subType);
|
||||||
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
|
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation && list1.includes(station.controlMode)) {
|
||||||
this.handleTotalHumanSolution(model);
|
this.handleTotalHumanSolution(model);
|
||||||
} else if (buttonOperation === this.Signal.guide.button.operation) {
|
} else if (buttonOperation === this.Signal.guide.button.operation && list1.includes(station.controlMode)) {
|
||||||
this.handleGuideRoute(this.deviceList);
|
this.handleGuideRoute(this.deviceList);
|
||||||
} else if (buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) {
|
} else if ((buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) && list2.includes(station.controlMode)) {
|
||||||
this.handelControlRoute(model);
|
this.handelControlRoute(model);
|
||||||
} else if (switchOperation.includes(buttonOperation)) {
|
} else if (switchOperation.includes(buttonOperation) && list1.includes(station.controlMode)) {
|
||||||
this.handelSwitchOperate(model);
|
this.handelSwitchOperate(model);
|
||||||
} else if (buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) {
|
} else if ((buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) && list1.includes(station.controlMode)) {
|
||||||
this.handelBlockOrUnblock(model);
|
this.handelBlockOrUnblock(model);
|
||||||
} else if (buttonOperation === this.Station.guideLock.button.operation) {
|
} else if (buttonOperation === this.Station.guideLock.button.operation && station.controlMode === 'Interlock') {
|
||||||
this.handelGuideLock(model);
|
this.handelGuideLock(model);
|
||||||
} else if (buttonOperation === this.Section.fault.button.operation) {
|
} else if (buttonOperation === this.Section.fault.button.operation && list1.includes(station.controlMode)) {
|
||||||
this.handelFaultSection(model);
|
this.handelFaultSection(model);
|
||||||
} else {
|
} else {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
|
this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
|
this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权');
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this.clearOperate();
|
|
||||||
this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
|
<station-back-strategy ref="stationBackStrategy" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PopMenu from '@/components/PopMenu';
|
||||||
|
import StationBackStrategy from './dialog/stationBackStrategy';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'MenuStationTurnBack',
|
||||||
|
components: {
|
||||||
|
PopMenu,
|
||||||
|
StationBackStrategy
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
work: {
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
menu: [],
|
||||||
|
menuNormal: [
|
||||||
|
{
|
||||||
|
label: '设置折返策略',
|
||||||
|
handler: this.setBackStrategy,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||||
|
}
|
||||||
|
],
|
||||||
|
menuForce: [
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('training', [
|
||||||
|
'mode',
|
||||||
|
'operatemode'
|
||||||
|
]),
|
||||||
|
...mapGetters('menuOperation', [
|
||||||
|
'buttonOperation'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationTurnBack) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initMenu() {
|
||||||
|
// 编辑模式菜单列表
|
||||||
|
this.menu = [];
|
||||||
|
this.menuNormal.forEach(menuItem => {
|
||||||
|
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
|
||||||
|
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
|
||||||
|
this.menu.push(menuItem);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 故障模式菜单列表
|
||||||
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
|
this.menu = this.menuForce;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doShow(point) {
|
||||||
|
this.initMenu();
|
||||||
|
if (this.menu && this.menu.length > 0) {
|
||||||
|
this.setBackStrategy();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
|
this.$refs.popMenu.close();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 设置折返策略
|
||||||
|
setBackStrategy() {
|
||||||
|
commitOperate(menuOperate.StationControl.setBackStrategy, {stationCode: this.selected.stationCode}, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.stationBackStrategy.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -1199,7 +1199,13 @@ export default {
|
||||||
deviceCode: ''
|
deviceCode: ''
|
||||||
};
|
};
|
||||||
memberMap[this.generationForm.systemType].push(memberEnvironmentDispatcher);
|
memberMap[this.generationForm.systemType].push(memberEnvironmentDispatcher);
|
||||||
|
const memberScheduling = {
|
||||||
|
id: this.getMemberId(this.generationForm.systemType),
|
||||||
|
name: '',
|
||||||
|
type: 'SCHEDULING',
|
||||||
|
deviceCode: ''
|
||||||
|
};
|
||||||
|
memberMap[this.generationForm.systemType].push(memberScheduling);
|
||||||
}
|
}
|
||||||
this.$message.success('一键生成成功!');
|
this.$message.success('一键生成成功!');
|
||||||
this.resetForm();
|
this.resetForm();
|
||||||
|
|
Loading…
Reference in New Issue