增加西安三号线文件

This commit is contained in:
joylink_zyy 2020-05-10 22:20:24 +08:00
parent 4d16abe984
commit 76eeb29014
66 changed files with 17468 additions and 2 deletions

View File

@ -12,7 +12,8 @@ class Theme {
'07': 'haerbin_01', // 哈尔滨培训线路
'08': 'foshan_01',
'09': 'xian_02',
'10': 'xian_01'
'10': 'xian_01',
'11': 'xian_03'
};
this._localShowMode = { // 现地显示模式
'01': 'all', // 成都一 全显
@ -24,7 +25,8 @@ class Theme {
'07': 'ecStation', // 哈尔滨培训线路 集中站显示
'08': 'all', // 佛山有轨线路 全显
'09': 'all',
'10': 'all'
'10': 'all',
'11': 'all'
};
}

View File

@ -0,0 +1,86 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm notice-info"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message,index) in messages">
<div :key="index">{{ message }}</div>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'NoticeInfo',
data() {
return {
dialogShow: false,
messages: [this.$t('tip.commandFailed')],
operate: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('tip.hint');
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = [this.$t('tip.commandFailed')];
if (messages && messages != 'null') {
this.messages.push(messages);
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
};
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,361 @@
<template>
<el-dialog v-dialogDrag class="xian-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
<div class="context">
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import NoticeInfo from './childDialog/noticeInfo';
export default {
name: 'ConfirmControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
return this.$t('menu.accessSetting');
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return this.$t('menu.menuSignal.signalOff');
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
return this.$t('menu.menuSignal.signalReopen');
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return this.$t('menu.cancelTheWay');
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
return this.$t('menu.approachManualControl');
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
return this.$t('menu.accessToATSAutomaticControl');
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
return this.$t('menu.menuStationStand.setRunLevel');
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
return this.$t('menu.stopTime');
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
return this.$t('menu.setSwitchbackStrategy');
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
/** 进路设置*/
return OperationEvent.Signal.arrangementRoute.confirm.domId;
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
return OperationEvent.Signal.reopenSignal.confirm.domId;
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
return OperationEvent.Signal.humanControl.confirm.domId;
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交ATS自动控*/
return OperationEvent.Signal.atsAutoControl.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
/** 设置运行等级*/
return OperationEvent.StationStand.setRunLevel.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
/** 设置停站时间*/
return OperationEvent.StationStand.setStopTime.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
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');
},
commit() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
/** 进路设置*/
this.routeSetting();
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
this.cancelTrainRoute();
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交ATS自动控*/
this.atsAutoControl();
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
/** 设置运行等级*/
this.setRunLevel();
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
/** 停站时间*/
this.setStopTime();
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
this.setBackStrategy();
}
},
//
routeSetting() {
const operate = {
over: true,
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
signalClose() {
const operate = {
over: true,
operation: OperationEvent.Signal.signalClose.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
};
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]);
});
},
//
reopenSignal() {
const operate = {
over: true,
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
};
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]);
});
},
//
cancelTrainRoute() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
humanControl() {
const operate = {
over: true,
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
// ATS
atsAutoControl() {
const operate = {
over: true,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setRunLevel() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setStopTime() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setBackStrategy() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,144 @@
<template>
<el-dialog v-dialogDrag class="xian-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ConfirmControlSpeed',
data() {
return {
dialogShow: false,
loading: false,
operation: '',
message: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
return this.$t('menu.menuSection.sectionSetSpeedLimit');
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
return this.$t('menu.switchSettingSpeedLimit');
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
}
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
return OperationEvent.Section.setSpeed.confirm.domId; //
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
return OperationEvent.Section.cancelSpeed.confirm.domId; //
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
return OperationEvent.Switch.setSpeed.confirm.domId; //
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
return OperationEvent.Switch.cancelSpeed.confirm.domId; //
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.operation = operate.operation;
this.message = operate.message;
}
this.loading = false;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {};
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch(() => {
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,126 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm route-unlock-confirm"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span>{{ $t('menu.in') }}{{ stationName }}{{ signalName }}{{ $t('menu.signalConfirmed') }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'RouteUnlockConfirm',
data() {
return {
dialogShow: false,
loading: false,
signalName: '',
stationName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('menu.signalDeblocking');
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.stationName = '';
this.signalName = '';
if (selected) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loading = false;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
operation: OperationEvent.Signal.unlock.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.route-unlock-confirm .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,180 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm confirm-control"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'ConfirmTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return this.$t('menu.menuTrain.addTrainId');
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return this.$t('menu.menuTrain.editTrainId');
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return this.$t('menu.menuTrain.deleteTrainId');
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return this.$t('menu.menuTrain.moveTrainId');
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return this.$t('menu.menuTrain.switchTrainId');
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return this.$t('menu.menuTrain.editTrainNo');
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
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('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
const operate = {
over: true,
operation: OperationEvent.Train.addTrainId.confirm.operation,
cmdType: CMD.Train.CMD_ADD_TRAIN_ID
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,450 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="xian-01__systerm route-cmd-control"
:title="title"
:visible.sync="show"
width="840px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.signalName')" label-width="100px">
<el-input v-model="signalName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" style="width:120px;" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCmdControl',
components: {
ConfirmSignalUnlock
},
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
signalName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: this.$t('menu.menuSignal.signalDeblock') },
{ code: OperationEvent.Signal.guide.menu.operation, name: this.$t('menu.menuSignal.guideRouteHandle') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.order.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.stop.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
return '办理引导进路';
}
}
return '';
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.selected = selected;
}
this.order = 0;
this.operation = operate.operation;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.dialogShow = true;
this.stpDisabled = true;
this.setMessage(this.$t('tip.releaseTip'));
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
command() {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 第一步带弹框处理*/
this.commandHasPopUp();
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
}
},
commandHasPopUp() {
const operate = {
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
}
}
});
},
commandNoPopUp() {
const operate = {
};
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {
over: true
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
operate.cmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.stop.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.backOperate = operate;
this.setButtonEnable(operate);
if (operate.success) {
this.timeCountCommand = 30;
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.confirmedSuccess') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.cancelSuccess') });
}
}
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,289 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm signal-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="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</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">{{ $t('menu.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'RouteControl',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null,
stationName: '',
signalName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消进路';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return this.$t('menu.menuSignal.reopenTrainSignal');
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
return this.$t('menu.menuSignal.setInterlockAutoRoute');
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
return this.$t('menu.menuSignal.cancelInterlockAutoRoute');
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
return this.$t('menu.menuSignal.setInterlockAutoTrigger');
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger');
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.selected = selected;
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');
},
commit() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
this.cancelTrainRoute();
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
/** 设置联锁自动进路*/
this.setAutoInterlock();
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
/** 取消联锁自动进路*/
this.cancelAutoInterlock();
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
/** 设置联锁自动触发*/
this.setAutoTrigger();
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
/** 取消联锁自动触发*/
this.cancelAutoTrigger();
}
},
//
cancelTrainRoute() {
this.loading = true;
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
});
},
//
signalClose() {
this.loading = true;
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['messages'] = `信号关灯: ${this.selected.name}`;
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
//
reopenSignal() {
this.loading = true;
commitOperate(menuOperate.Signal.reopenSignal, {}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['messages'] = `信号重开: ${this.selected.name}`;
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
//
setAutoInterlock() {
const operate = {
over: true,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoInterlock() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setAutoTrigger() {
const operate = {
over: true,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoTrigger() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
};
this.doClose();
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancel() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>

View File

@ -0,0 +1,164 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="xian-01__systerm route-detail"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>车站</span></el-col>
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>进路列表</span>
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column label="进路">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="控制状态" width="180">
<template slot-scope="scope">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</template>
</el-table-column>
</el-table>
</div>
<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>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
stationName: '',
signalName: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
},
title() {
return '查询进路状态';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
send: true,
operation: OperationEvent.Signal.detail.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>

View File

@ -0,0 +1,335 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="xian-01__systerm route-hand-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="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column label="选择" width="55" style="margin-left:50px; text-align: right;">
<template slot-scope="scope">
<el-checkbox
v-model="changeList[scope.$index]"
style="text-align: center; display: block;"
:disabled="scope.row.disabled"
@change="changeCheck(changeList[scope.$index],scope.row.code)"
/>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
</template>
</el-table-column>
</el-table>
</div>
<el-row>
<el-col :span="22" :offset="1">
<el-checkbox v-model="allSelect" size="small" @change="allSelectChange">全选</el-checkbox>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button
:id="domIdConfirm"
type="primary"
:disabled="commitDisabled"
: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>
</div>
</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 {menuOperate, commitOperate} from '../utils/menuOperate';
export default {
name: 'RouteHandControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operation: null,
selection: [],
stationName: '',
signalName: '',
allSelect: false,
changeList:[],
commitDisabled: true,
disabledLength: 0
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return OperationEvent.Signal.humanControl.choose.domId;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return OperationEvent.Signal.atsAutoControl.choose.domId;
} else {
return '';
}
} else {
return '';
}
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路交人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
} else {
return '';
}
}
},
watch: {
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
this.allSelect = false;
this.changeList = [];
this.commitDisabled = true;
this.selection = [];
this.disabledLength = 0;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
this.changeList.push(false);
elem.disabled = false;
//
if (operate.operation == OperationEvent.Signal.humanControl.menu.operation &&
(elem.atsControl == 0)) {
elem.disabled = true;
this.disabledLength++;
} if (operate.operation == OperationEvent.Signal.atsAutoControl.menu.operation &&
(elem.atsControl != 0)) {
elem.disabled = true;
this.disabledLength++;
}
});
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
changeCheck(check, code) {
if (check) {
this.selection.push(code);
} else {
this.selection.splice(this.selection.indexOf(code), 1);
}
if (this.selection.length >= (this.tempData.length - this.disabledLength) ) {
this.allSelect = true;
} else {
this.allSelect = false;
}
if (this.selection.length > 0) {
this.commitDisabled = false;
} else {
this.commitDisabled = true;
}
const operate = {val:code};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
allSelectChange() {
this.changeList = [];
if (this.allSelect) {
this.tempData.forEach((item, index)=> {
if (!item.disabled) {
this.changeList.push(true);
this.selection.push(item.code);
} else {
this.changeList.push('');
}
});
this.allSelect = true;
if (this.selection.length > 0) {
this.commitDisabled = false;
}
} else {
this.tempData.forEach((item, index) => {
if (!item.disabled) {
this.changeList.push(false);
this.selection.splice(this.selection.indexOf(item.code), 1);
}
});
this.allSelect = false;
this.commitDisabled = true;
}
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
const operate = {
repeat: true,
operation: '',
selection: selection
};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(`请选择一条数据`);
}
},
commit() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.atsAutoControl();
}
},
//
humanControl() {
this.loading = true;
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
});
},
//
atsAutoControl() {
this.loading = true;
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, 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>

View File

@ -0,0 +1,162 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="xian-01__systerm route-lock"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.signalName') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.listOfSignalButtons') }}</span>
<el-table
ref="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column prop="name" :label="this.$t('menu.buttonName')" />
<el-table-column prop="status" :label="this.$t('menu.buttonStatus')" />
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'RouteLock',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
operate: null,
stationName: '',
signalName: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
},
title() {
return this.$t('menu.blockSignalButton');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = [{
code: selected.code,
name: selected.name,
status: selected.blockade ? '封锁' : '未封锁'
}];
const timer = setInterval(() => {
if (this.$refs.table) {
this.$refs.table.setCurrentRow(this.tempData[0]);
clearInterval(timer);
}
}, 300);
}
this.dialogShow = true;
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
commitOperate(menuOperate.Signal.lock, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>

View File

@ -0,0 +1,235 @@
<template>
<el-dialog v-dialogDrag class="xian-01__systerm route-setting" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="8"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="8" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="8" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<el-table ref="table" :data="tempData" border style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px" />
<el-table-column prop="protectedSection" :label="this.$t('menu.protectionSection')" :width="180">
<template slot-scope="scope">
<span>{{ getProtectedSectionName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="canSetting" :label="this.$t('global.status')" :width="100">
<template slot-scope="scope">
<span v-if="scope.row.canSetting">{{ $t('menu.allowSelection') }}</span>
<span v-else>{{ $t('menu.notAllowSelection') }}</span>
</template>
</el-table-column>
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="4">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { deepAssign } from '@/utils/index';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'RouteSelection',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
row: null,
operation: '',
display: true,
stationName: '',
signalName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.$t('menu.menuSignal.routeSelect');
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
if (protect.parentName) {
name = `${protect.parentName}${protect.name}`;
}
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
doShow(operate, selected, tempData) {
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [... this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.row.canSetting = true;
this.restoreBeforeDevices();
const containSectionList = [];
if (row.canSetting) {
//
if (row.routeSectionList && row.routeSectionList.length) {
//
row.routeSectionList.forEach(elem => {
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
section.logicSectionCodeList.forEach(item => {
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
sec.cutOff = true;
containSectionList.push(sec);
});
} else {
section.cutOff = true;
containSectionList.push(section);
}
});
}
this.$store.dispatch('training/updateMapState', [...containSectionList]);
this.beforeSectionList = containSectionList || [];
//
const operate = {
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
},
commit() {
if (this.row && this.row.canSetting) {
this.loading = true;
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode: this.row.code}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, 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>

View File

@ -0,0 +1,418 @@
<template>
<div>
<el-dialog v-dialogDrag class="xian-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item :label="this.$t('global.status')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.sectionName')" label-width="100px">
<el-input v-model="sectionName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table :data="tempData" border style="width: 100%" size="mini" highlight-current-row height="200">
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
{{ $t('menu.release') }}
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
{{ $t('menu.secondConfirm') }}
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SectionCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
sectionName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Section.unlock.menu.operation, name: this.$t('menu.menuSection.sectionUnblock') },
{ code: OperationEvent.Section.fault.menu.operation, name: this.$t('menu.menuSection.sectionFaultUnlock') },
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
return OperationEvent.Section.unlock.order.domId; //
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return OperationEvent.Section.fault.order.domId; //
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
return OperationEvent.Section.axlePreReset.order.domId; //
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
return OperationEvent.Section.unlock.confirm1.domId; //
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return OperationEvent.Section.fault.confirm1.domId; //
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
return OperationEvent.Section.axlePreReset.confirm1.domId; //
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
return OperationEvent.Section.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
return OperationEvent.Section.fault.confirm2.domId;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
return OperationEvent.Section.axlePreReset.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
return OperationEvent.Section.unlock.stop.domId;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
return OperationEvent.Section.fault.stop.domId;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
return OperationEvent.Section.axlePreReset.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
return this.$t('menu.menuSection.sectionUnblock');
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return this.$t('menu.menuSection.sectionFaultUnlock');
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
return this.$t('menu.menuSection.sectionAxisPreReset');
}
}
return '';
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.sectionName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.sectionName += section.name;
}
}
this.sectionName += selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.selected = selected;
}
this.order = 0;
this.operation = operate.operation || '';
this.dialogShow = true;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.setMessage(this.$t('tip.releaseTip'));
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
command() {
if (this.operation == OperationEvent.Section.fault.menu.operation ||
this.operation == OperationEvent.Section.unlock.menu.operation ||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
const operate = {};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.order.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.order.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.confirm1.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_AXIS_PRE_RESET;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
operate.operation = OperationEvent.Section.unlock.stop.operation;
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区段故障解锁*/
operate.operation = OperationEvent.Section.fault.stop.operation;
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
/** 区段计轴预复位*/
operate.operation = OperationEvent.Section.axlePreReset.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,153 @@
<template>
<el-dialog v-dialogDrag class="xian-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="11"><span>车站名称</span></el-col>
<el-col :span="11" :offset="2"><span>区段</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="sectionName" size="small" disabled />
</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">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'SectionControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: '',
stationName: '',
sectionName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
return '区段封锁';
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
return '区段切除';
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
return '区段激活';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.sectionName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.sectionName += section.name;
}
}
this.sectionName += selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
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');
},
commit() {
if (this.operation == OperationEvent.Section.lock.menu.operation) {
this.lock(); //
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
this.split(); //
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
this.active(); //
}
},
//
lock() {
this.sendCommand(menuOperate.Section.lock);
},
//
split() {
this.sendCommand(menuOperate.Section.split);
},
//
active() {
this.sendCommand(menuOperate.Section.active);
},
sendCommand(operate) { //
this.loading = true;
commitOperate(operate, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, 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>

View File

@ -0,0 +1,562 @@
<template>
<div>
<el-dialog v-dialogDrag :z-index="2000" class="xian-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="6">
<el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="nameLabel" label-width="80px">
<el-input v-model="name" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item v-if="!isCancelSpeed" label="限速值" label-width="80px">
<el-select
:id="domIdChoose"
v-model="speed"
size="small"
:disabled="spdDisabled"
@change="speedSelectChange"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table ref="table" class="table" :data="tableData" border style="width: 100%" size="mini" highlight-current-row height="200">
<el-table-column prop="order" :width="50" label="序号" />
<el-table-column prop="date" :width="160" label="时间" />
<el-table-column prop="context" :width="180" label="执行过程" />
<el-table-column prop="result" label="执行结果" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
</div>
</template>
<script>
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
import { now } from '@/utils/date';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SectionCmdSpeed',
components: {
ConfirmControlSpeed
},
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
type: '',
operation: '',
cmdDisabled: [true, true, true],
spdDisabled: false,
stpDisabled: true,
tableData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
maxSpeed: 80,
speedSpace: 5,
stationName: '',
name: '',
speed: ''
};
},
computed: {
nameLabel() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation ||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
return '区段名称';
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '道岔名称';
}
return '';
},
speedList() {
const list = [{ name: '不限速', value: '0' }];
for (var i = 1; i * this.speedSpace <= this.maxSpeed; i++) {
const speed = String(i * this.speedSpace);
list.push({ name: speed, value: speed });
}
return list;
},
typeList() {
return [
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }
];
},
title() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation ||
this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
return '区段设置限速';
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '区段取消限速';
}
return '';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChoose() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.choose.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.choose.domId;
}
return '';
},
domIdCommand() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.order.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.order.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.order.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.order.domId;
}
return '';
},
domIdConfirm1() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.confirm1.domId;
}
return '';
},
domIdConfirm2() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.cancelSpeed.confirm2.domId;
}
return '';
},
domIdStop() {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.stop.domId;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.stop.domId;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.stop.domId;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.stop.domId;
}
return '';
},
domIdClose() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
isCancelSpeed() {
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation || this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
this.spdDisabled = false;
val.forEach((elem, index) => {
//
if (elem == false && index >= 1 || this.isCancelSpeed) {
this.spdDisabled = true;
}
// 1
if (elem == false && index >= 1) {
this.stpDisabled = false;
}
});
},
deep: true
},
'speed': function (val) {
if (val) this.cmdDisabled[0] = false;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected, tempData) {
if (!this.dialogShow) {
this.name = '';
this.stationName = '';
if (selected) {
if (operate.operation == OperationEvent.Section.setSpeed.menu.operation ||
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.name += section.name;
}
}
this.name += selected.name;
}
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation ||
operate.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.name = selected.name;
}
}
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.speed = '';
this.tableData = [];
this.selected = selected;
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [true, true, true];
this.stpDisabled = true;
this.order = 0;
this.type = operate.type;
this.operation = operate.operation;
this.setMessage('请选择限速值后,点击“下达”按钮,下达命令!');
if (this.isCancelSpeed) {
this.speed = `${tempData}`;
this.spdDisabled = true;
this.cmdDisabled = [false, true, true];
}
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
speedSelectChange(val) {
const operate = {
operation: '',
val: val
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.choose.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
}
this.setMessage('请点击“下达”按钮,下达命令!');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
}
});
},
command() {
const operate = {
operation: ''
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.order.operation;
operate.message = `在【${this.name}】区段,区段设置限速${this.speed}km/h确认下达吗`;
if (this.speed == 0) {
operate.message = `在【${this.name}】区段,区段取消限速,确认下达吗?`;
}
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.order.operation;
operate.message = `在【${this.name}】区段,区段取消限速,确认下达吗?`;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.order.operation;
operate.message = `在【${this.name}】区段,道岔设置限速${this.speed}km/h确认下达吗`;
if (this.speed == 0) {
operate.message = `在【${this.name}】区段,道岔区段取消限速,确认下达吗?`;
}
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.order.operation;
operate.message = `在【${this.name}】区段,道岔区段取消限速,确认下达吗?`;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
this.$refs.confirmControlSpeed.doShow(operate, this.selected);
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
});
},
confirm1() {
const operate = {
operation: ''
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm1.operation;
}
this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
});
},
confirm2() {
const operate = {
over: true,
operation: '',
cmdType: '',
param: {
speedLimitValue: this.speed
}
};
//
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
});
},
stop() {
const operate = {
operation: ''
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.stop.operation;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.stop.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.stop.operation;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
getOperate(operate) {
if (operate.step) {
this.setButtonEnable({ step: operate.step });
}
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tableData.push(param);
},
editRecord(param) {
this.tableData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,238 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-run-level"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>车站名称</span></el-col>
<el-col :span="10" :offset="2"><span>站台方向</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<div style="height: 32px;">
<el-radio v-model="standStatus" :label="true" style="line-height: 32px;" disabled>上行方向</el-radio>
<el-radio v-model="standStatus" :label="false" style="line-height: 32px;" disabled>下行方向</el-radio>
</div>
</el-col>
</el-row>
<div class="table">
<span>站台状态</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
<el-table-column prop="name" :width="170" label="折返站" />
<el-table-column prop="station" label="折返站台" />
<el-table-column prop="strategy" label="折返策略">
<template slot-scope="scope">
<el-select
:id="domIdChoose"
v-model="scope.row.strategy"
size="mini"
@change="strategySelectChange"
>
<el-option
v-for="item in strategyList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<el-row class="button-group">
<span v-if="isSelect && tempData.length">{{ $t('menu.switchbackStrategyTip') }}</span>
<span v-if="isConfirm && tempData.length">{{ $t('menu.setSwitchbackStrategyTipPrefix') + tempData[0].name + $t('menu.setSwitchbackStrategyTipSuffix') }}</span>
</el-row>
<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>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mapGetters } from 'vuex';
export default {
name: 'StandBackStrategy',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
strategyList: [
{
value: '01',
label: this.$t('menu.noSwitchback')
},
{
value: '02',
label: this.$t('menu.noOneSwitchback')
},
{
value: '03',
label: this.$t('menu.automaticChange')
},
{
value: '04',
label: this.$t('menu.default')
}
],
stationName: '',
standStatus: '',
selection: [],
isSelect: true,
isConfirm: false,
strategy: ''
};
},
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.StationStand.setBackStrategy.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
},
title() {
return this.$t('menu.setSwitchbackStrategy');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected) {
this.tempData = [];
const station = this.stationList.find(n => n.code == selected.stationCode);
this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' });
},
doShow(operate, selected) {
if (!this.dialogShow) {
this.standStatus = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standStatus = selected.right;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
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;
}
},
strategySelectChange(strategy) {
const operate = {
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
val: `${strategy}`
};
this.strategy = strategy;
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.isConfirm) {
const operate = {
over: true,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
param:{
standReentryStrategy: this.strategy
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
this.doClose();
}
},
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>

View File

@ -0,0 +1,182 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="context">
<span>{{ preContext }}{{ standName }}</span>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
selected: null,
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
return '设置扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) {
return '强制取消扣车';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
return '设置提前发车';
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
return '设置跳停';
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
return '取消跳停';
}
return '';
},
preContext() {
return this.title + ':';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(step, selected) {
if (!this.dialogShow) {
this.standName = '';
if (selected) {
this.standName = selected.name;
}
this.selected = selected;
this.operation = step.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
/** 设置扣车*/
this.setDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
/** 取消扣车*/
this.cancelDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) {
/** 强制取消扣车*/
this.cancelDetainTrainForce();
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
/** 提前发车*/
this.earlyDeparture();
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
/** 设置跳停*/
this.setJumpStop();
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
/** 取消跳停*/
this.cancelJumpStop();
}
},
//
setDetainTrain() {
this.sendCommand(menuOperate.StationStand.setDetainTrain);
},
//
cancelDetainTrain() {
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
},
//
cancelDetainTrainForce() {
this.sendCommand(menuOperate.StationStand.cancelDetainTrainForce);
},
//
earlyDeparture() {
this.sendCommand(menuOperate.StationStand.earlyDeparture);
},
//
setJumpStop() {
this.sendCommand(menuOperate.StationStand.setJumpStop, this.selected.direction);
},
//
cancelJumpStop() {
this.sendCommand(menuOperate.StationStand.cancelJumpStop, this.selected.direction); // , 01: /02:
},
sendCommand(operate, val) { //
this.loading = true;
commitOperate(operate, {}, 2, val).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, 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>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -0,0 +1,238 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-detail"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-tree
:data="treeData"
:lazy="false"
class="tree-height-max"
:default-expand-all="true"
style="background: #f0f0f0;"
>
<div slot-scope="{ node, data }" style="height: 24px; width: 100%;">
<div v-if="data.level == 1" style="line-height: 26px;">{{ data.name }}</div>
<div v-if="data.level == 2" style="background: lightgray; overflow: hidden; height: 100%;">
<div
style="width: 46%;float: left; height: 24px; line-height: 24px; padding-left: 5px; border-right: 1px solid #f0f0f0;"
>
{{ data.name }}</div>
<div style="width: 54%;float: left; height: 24px; line-height: 24px; padding-left: 5px;">
{{ data.value }}</div>
</div>
</div>
</el-tree>
<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 NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
treeData: [
{
children: [
{
name: '车站',
value: '',
level: 2
},
{
name: '站台',
value: '',
level: 2
},
{
name: '停站时间',
value: '',
level: 2
},
{
name: '跳停',
value: '',
level: 2
}
],
name: '站台基本信息',
level: 1
},
{
children: [
{
name: '中心扣车',
value: '',
level: 2
},
{
name: '车站扣车',
value: '',
level: 2
}
],
name: '扣车',
level: 1
},
{
children: [
{
name: '站台',
value: '',
level: 2
}
],
name: '运行等级',
level: 1
}
]
};
},
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.Command.close.confirm.domId : '';
},
title() {
return '站台详细信息';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected) {
this.tempData = [];
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
let stationStand, station;
if (selected.direction == '01') { //
//
if (index != 0) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
} else {
//
if (index != this.stationList.length - 1) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
}
//
this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置';
//
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
//
this.treeData[0].children[2].value = selected.parkingTime == 0 ? '自动' : `${selected.parkingTime}`;
//
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
// if (selected.direction == '01') {
//
// }
if (!stationStand || !station) {
this.treeData[2].children[0].value = `自动`;
} else {
this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `${station.name}${stationStand.name}:人工` : `${station.name}${stationStand.name}:自动`;
}
//
// this.tempData.push({ item: '', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '' });
},
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.treeData[0].children[0].value = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.treeData[0].children[1].value = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.treeData[0].children[0].value = station.name;
}
}
this.loadInitData(selected);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected);
},
commit() {
const operate = {
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
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>

View File

@ -0,0 +1,191 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-detain-train-all"
:title="title"
:visible.sync="show"
width="390px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-radio-group style="padding: 10px 20px; border: 1px double lightgray;width:100%;">
<span class="base-label" style="font-size:14px;">{{ $t('menu.range') }}</span>
<el-row>
<el-radio-group v-model="upDown" style="width:100%;" @change="choose">
<el-col :span="11">
<el-radio :id="upDown ? domIdChoose : ''" :label="true">{{ $t('menu.uplinkBroadly') }}</el-radio>
</el-col>
<el-col :span="11" :offset="1">
<el-radio :id="!upDown ? domIdChoose : ''" :label="false">{{ $t('menu.downlinkBroadly') }}</el-radio>
</el-col>
</el-radio-group>
</el-row>
</el-radio-group>
<div class="table">
<span>扣车站台列表</span>
<el-table
ref="tempData"
:data="tempData"
border
style="width: 100%"
size="mini"
:empty-text="this.$t('menu.allStationsHaveNoDetainTrainStatus')"
height="160"
highlight-current-row
>
<el-table-column prop="stationName" label="车站名称" />
<el-table-column prop="standName" :width="140" label="扣车站台" />
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="disabled" @click="commit">{{ $t('global.confirm') }}
</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.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 NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandDetainTrainAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
upDown: false,
tempData: [],
disabled: true,
operation: ''
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.menu.domId : '';
},
title() {
if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
return this.$t('menu.menuStationStand.cancelDetainTrainAll');
} else {
return this.$t('menu.menuStationStand.cancelJumpStopAll');
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadTableData() {
this.tempData = [];
this.stationStandList.forEach(elem => {
/** status 01: 未扣车*/
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {});
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
if (station && station.visible && stand && stand.centerHoldTrain && elem.right == this.upDown) {
this.tempData.push({ stationName: station.name, standName: elem.name });
}
});
//
if (this.tempData.length > 0) {
this.disabled = false;
}
},
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.upDown = selected.right;
this.loadTableData();
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');
},
choose(upDown) {
this.loadTableData();
const operate = {
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
val: this.upDown
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
param: {
standAllLine: this.upDown ? '01' : '02'
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>

View File

@ -0,0 +1,272 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-run-level"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>{{ $t('menu.stationStandStatus') }}</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
<el-table-column prop="name" :width="210" :label="this.$t('menu.nextPlatform')" />
<el-table-column prop="time" :label="this.$t('menu.intervalRunningTime')">
<template slot-scope="scope">
<el-select :id="domIdChoose" v-model="scope.row.time" size="mini" @change="timeSelectChange">
<el-option
v-for="item in timeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="check" label="一直有效">
<template slot-scope="scope">
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
</template>
</el-table-column>
</el-table>
</div>
<el-row class="button-group">
<span v-if="isSelect && tempData.length">{{ $t('menu.setRunLevelTip') }}</span>
<span v-if="isConfirm && tempData.length">{{ $t('menu.setRunLevelStationTip') + tempData[0].name }}</span>
</el-row>
<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">
{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mapGetters } from 'vuex';
import ConfirmControl from './childDialog/confirmControl';
export default {
name: 'StandRunLevel',
components: {
ConfirmControl
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
maxRunLevel: 300,
stationName: '',
standName: '',
selection: [],
isSelect: true,
isConfirm: false,
time: ''
};
},
computed: {
...mapGetters('map', [
'stationList',
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose.domId : '';
},
domIdCheck() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.check.domId : '';
},
title() {
return this.$t('menu.menuStationStand.setRunLevel');
},
timeList() {
const list = [
{ value: 0, label: this.$t('menu.automatic2') }
// { value: 1, label: '1' }
];
for (var i = 60; i <= this.maxRunLevel; i++) {
list.push({ value: i, label: `${i}` });
}
return list;
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected) {
this.tempData = [];
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
if (selected.direction == '01') { //
//
if (index != 0) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus });
}
} else {
//
if (index != this.stationList.length) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus });
}
}
},
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
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;
}
},
timeSelectChange(time) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString(),
param: {}
};
this.time = time;
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
checkChange(check) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.check.operation,
val: check.toString(),
param: {}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.isConfirm) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
param:{
runLevelTimeForever: !!this.tempData[0].check,
runLevelTime: this.time
},
messages: [
`设置运行等级: ${this.tempData[0].name}-${this.standName},
${this.tempData[0].time == 0 ? '运行时间自动' : `运行时间为${this.tempData[0].time}s`},
有效次数: ${this.tempData[0].check ? '一直有效' : '一次有效'}`]
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
});
} else {
this.doClose();
}
},
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>

View File

@ -0,0 +1,243 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="430px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
<el-col :span="11" :offset="2"><span>{{ $t('menu.platformName') }}</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 60px;">
<span class="base-label">{{ $t('menu.controlMode') }}</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="control" @change="chooseControl">
<el-radio :id="control === '01'? '': domIdChoose1" label="01">{{ $t('menu.automatic2') }}</el-radio>
<el-radio :id="control === '02'? '': domIdChoose1" label="02">{{ $t('menu.artificial') }}</el-radio>
</el-radio-group>
<el-input-number
:id="domIdInput"
v-model="time"
:disabled="disabledInput"
controls-position="right"
:min="0"
size="mini"
style="width: 125px; padding-left:25px"
@change="inputTime"
/><span>&nbsp;{{ $t('global.second') }}</span>
</div>
</div>
<div style="padding: 0px 15px; height: 30px;">
<div style=" position: relative; top:-5px;">
<el-radio-group v-model="direction">
<el-radio :label="true" disabled>上行方向</el-radio>
<el-radio :label="false" disabled>下行方向</el-radio>
</el-radio-group>
</div>
</div>
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-radio :id="!effective? '': domIdChoose2" :label="false">一次有效</el-radio>
<el-radio :id="effective? '': domIdChoose2" :label="true">一直有效</el-radio>
</el-radio-group>
</div>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandStopTime',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
time: 0,
control: '01',
direction: false,
effective: true,
selected: null,
standName: '',
stationName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.menu.domId : '';
},
domIdChoose1() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
},
domIdChoose2() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
},
domIdInput() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
},
disabledInput() {
return this.control === '01'; //
},
disabledTime() {
return this.control === '01'; //
},
title() {
return this.$t('menu.stopTime');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.control = selected.parkingTime ? '02' : '01';
this.time = selected.parkingTime ? selected.parkingTime : 30;
this.direction = selected.right;
this.selected = selected || {};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
chooseControl(control) {
/** 自动时的默认时间*/
if (control == '01') {
this.time = 30;
this.effective = true;
}
const operate = {
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
param: {}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
chooseEffective(effective) {
const operate = {
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
val: `${effective}`,
param: {}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
inputTime(time) {
const operate = {
operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${time}`,
param: {}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
const operate = {
operation: OperationEvent.StationStand.setStopTime.menu.operation,
param: {
parkingTime: this.time == 30 ? 0 : this.time,
parkingAlwaysValid: this.effective
},
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate); //
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
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>

View File

@ -0,0 +1,403 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="xian-01__systerm station-cmd-control"
:title="title"
:visible.sync="show"
width="840px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="11">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled style="width:230px">
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item :label="this.$t('menu.stationName')" label-width="100px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
export default {
name: 'StationCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: this.$t('menu.menuStation.powerUnLock') },
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: this.$t('menu.menuStation.execKeyOperationTest') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.order.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.confirm1.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.confirm2.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
return OperationEvent.Station.powerUnLock.stop.domId;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
return OperationEvent.Station.execKeyOperationTest.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
return this.$t('menu.signalDeblocking');
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
return this.$t('menu.menuStation.execKeyOperationTest');
}
}
return '';
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.stationName = selected.name;
}
this.order = 0;
this.operation = operate.operation;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.dialogShow = true;
this.setMessage(this.$t('tip.releaseTip'));
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
command() {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||
this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
const operate = {};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.order.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm1.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {
over: true
};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
// operate.cmdType = CMD.Station.powerUnLock;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
// operate.cmdType = CMD.Station.execKeyOperationTest;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {};
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.stop.operation;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,123 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm station-human-control-all"
:title="title"
:visible.sync="show"
width="430px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<span>{{ title }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationHumanControlAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('menu.fullConcentrationStationAccessManualControl');
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
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');
},
commit() {
const operate = {
over: true,
operation: OperationEvent.Station.humanControlALL.menu.operation,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>
<style>
.station-human-control-all .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,145 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm station-set-route-control-all"
:title="title"
:visible.sync="show"
width="450px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 0px 10px">
<el-form ref="form" size="small" label-width="110px" label-position="left">
<el-form-item :label="this.$t('menu.concentratedStationName')" prop="stationName">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-form>
<el-radio-group v-model="mode">
<el-row>
<el-radio :label="true">{{ $t('menu.checkConflict') }}</el-radio>
</el-row>
<el-row style="margin-top: 20px">
<el-radio :label="false">{{ $t('menu.notCheckConflict') }}</el-radio>
</el-row>
</el-radio-group>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationSetRouteControlAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: null,
stationName: '',
mode: true
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return this.$t('menu.fullConcentrationStationSettingAccessControlMode');
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.loading = false;
this.operation = operate.operation;
this.stationName = '';
if (selected) {
this.stationName = selected.name;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
over: true,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
val: this.mode,
param: {
CheckConflict: this.mode
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>
<style>
.station-set-route-control-all .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,482 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="xian-01__systerm switch-cmd-control"
:title="title"
:visible.sync="show"
width="840px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item :label="this.$t('menu.type')" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="this.$t('menu.switchName')" label-width="80px">
<el-input v-model="switchName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="3">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
</el-col>
<el-col :span="2" :offset="1">
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchCmdControl',
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
switchName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Switch.unlock.menu.operation, name: this.$t('menu.menuSwitch.switchUnlock') },
{ code: OperationEvent.Switch.unblock.menu.operation, name: this.$t('menu.menuSwitch.switchSectionUnblock') },
{ code: OperationEvent.Switch.fault.menu.operation, name: this.$t('menu.menuSwitch.switchMalfunctionUnlock') },
{ code: OperationEvent.Switch.axlePreReset.menu.operation, name: this.$t('menu.menuSwitch.switchSectionAxisPreReset') }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.order.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.order.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.order.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.order.domId;
}
}
return '';
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.confirm1.domId;
}
}
return '';
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.confirm2.domId;
}
}
return '';
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
return OperationEvent.Switch.unlock.stop.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
return OperationEvent.Switch.unblock.stop.domId;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
return OperationEvent.Switch.fault.stop.domId;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
return OperationEvent.Switch.axlePreReset.stop.domId;
}
}
return '';
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
return '';
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
return '道岔单解';
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '道岔解封';
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
return '道岔故障解锁';
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
return '道岔计轴复位';
}
}
return '';
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
this.selected = selected;
}
this.order = 0;
this.operation = operate.operation;
this.dialogShow = true;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.stpDisabled = true;
this.setMessage(this.$t('tip.releaseTip'));
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
command() {
/** 道岔单解/道岔解封/道岔故障解锁/道岔计轴复位*/
if (this.operation == OperationEvent.Switch.unlock.menu.operation ||
this.operation == OperationEvent.Switch.unblock.menu.operation ||
this.operation == OperationEvent.Switch.fault.menu.operation ||
this.operation == OperationEvent.Switch.axlePreReset.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
} else {
/** 第一步带弹框处理*/
this.commandHasPopUp();
}
},
commandHasPopUp() {
},
commandNoPopUp() {
const operate = {
operation: ''
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.order.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.order.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.order.operation;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
}
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
});
},
confirm1() {
const operate = {
operation: ''
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.confirm1.operation;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
}
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
});
},
confirm2() {
const operate = {
over: true
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_FAULT_UNLOCK;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
});
},
stop() {
const operate = {
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
/** 道岔单解*/
operate.operation = OperationEvent.Switch.unlock.stop.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/** 道岔解封*/
operate.operation = OperationEvent.Switch.unblock.stop.operation;
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/** 道岔故障解锁*/
operate.operation = OperationEvent.Switch.fault.stop.operation;
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
/** 道岔计轴复位*/
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
} else {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
});
},
close() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -0,0 +1,169 @@
<template>
<el-dialog v-dialogDrag class="xian-01__systerm switch-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="11"><span>车站名称</span></el-col>
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="switchName" size="small" disabled />
</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 { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'SwitchControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: '',
stationName: '',
switchName: '',
activeShow: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
return '道岔单锁';
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
return '道岔封锁';
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
return '道岔转动';
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
return '区段切除';
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
return '区段激活';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
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');
},
commit() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
/** 道岔单锁*/
this.lock();
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
/** 道岔封锁*/
this.block();
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
/** 道岔转动*/
this.turnout(this.operation);
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
/** 区段激活*/
this.split();
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
/** 区段激活*/
this.active();
}
},
//
lock() {
this.sendCommand(menuOperate.Switch.lock);
},
//
block() {
this.sendCommand(menuOperate.Switch.block);
},
//
turnout() {
this.sendCommand(menuOperate.Switch.switchTurnout);
},
//
split() {
this.sendCommand(menuOperate.Switch.split);
},
//
active() {
this.sendCommand(menuOperate.Switch.active);
},
sendCommand(operate) { //
this.loading = true;
commitOperate(operate, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, 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>

View File

@ -0,0 +1,472 @@
<template>
<el-dialog v-dialogDrag class="xian-01__systerm train-control" :title="title" :visible.sync="show" width="370px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-form ref="form" size="small" label-width="120px" :model="formModel" :rules="rules">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
<el-select
:id="domIdTrainNumber"
v-model="formModel.groupNumber"
filterable
:disabled="trainNumberIsDisabled"
@change="trainNumberChange"
>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
<el-form-item prop="trainType" label-width="0px">
<el-radio-group
:id="domIdTrainType"
v-model="formModel.trainType"
style="margin-left: 15px;"
@change="trainTypeChange"
>
<el-radio :label="'01'">{{ $t('menu.planTrain') }}</el-radio>
<el-radio :label="'02'">{{ $t('menu.headCodeTrain') }}</el-radio>
<el-radio :label="'03'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" prop="serviceNumber">
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
<el-input
:id="domIdServerNo"
v-model="formModel.serviceNumber"
:disabled="serverNoIsDisabled"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
<el-input
:id="domIdTrainNo"
v-model="formModel.tripNumber"
:disabled="trainNoIsDisabled"
maxlength="4"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="targetCode">
<el-input
:id="domIdTargetCode"
v-model="formModel.targetCode"
:disabled="targetCodeIsDisabled"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '03'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">
<el-select
:id="domIdTrainNumber"
v-model="formModel.category"
filterable
:disabled="true"
>
<el-option
v-for="item in categoryList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="istargetCode" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-train ref="confirmTrain" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import Handler from '@/scripts/cmdPlugin/Handler';
export default {
name: 'TrainControl',
components: {
ConfirmTrain,
NoticeInfo
},
data() {
return {
trainList: [],
categoryList: [
{ name: 'MM', value: '01' }
],
formModel: {
tripNumber: '',
groupNumber: '',
trainType: '01',
serviceNumber: '',
targetCode: '',
category: 'MM'
},
rules: {
groupNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'change' }
],
trainType: [
{ required: true, message: this.$t('rules.selectATrainType'), trigger: 'change' }
],
serviceNumber: [
{ required: true, message: this.$t('rules.enterTheServiceNumber'), trigger: 'blur' }
],
tripNumber: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
targetCode: [
{ required: true, message: this.$t('rules.enterTheTargetCode'), trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false,
direction: 0
};
},
computed: {
...mapGetters('map', [
'map'
]),
trainNoIsDisabled() {
return false;
},
serverNoIsDisabled() {
return true;
},
targetCodeIsDisabled() {
return true;
},
trainNumberIsDisabled() {
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
return true;
}
return '';
},
// trainTypeIsDisabled() {
// if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
// return true;
// }
// return '';
// },
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdTrainNumber() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.trainNumberChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.trainNumberChange.domId;
}
}
return '';
},
domIdTrainNo() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.trainNoChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.trainNoChange.domId;
}
}
return '';
},
domIdTrainType() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.trainTypeChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.trainTypeChange.domId;
}
}
return '';
},
domIdServerNo() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.serverNoChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.serverNoChange.domId;
}
}
return '';
},
domIdTargetCode() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.targetCodeChange.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.targetCodeChange.domId;
}
}
return '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.menu.domId;
}
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
title() {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
return this.$t('menu.menuTrain.addTrainId');
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
return this.$t('menu.menuTrain.editTrainId');
}
return '';
},
istargetCode() {
if (this.formModel.serviceNumber && this.formModel.targetCode) {
return false;
}
return true;
}
},
watch: {
'formModel.tripNumber': function(val) {
if (val.length == 4) {
this.trainNoChange(val);
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: val,
trainType: this.formModel.trainType,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {},
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
const model = this.$store.getters['map/getDeviceByCode'](selected.code);
this.formModel = {
groupNumber: model.groupNumber,
tripNumber: `${model.directionCode}${model.tripNumber}`,
trainType: model.type,
serviceNumber: model.serviceNumber,
targetCode: model.targetCode,
category: 'MM'
};
/** 加载列车数据*/
this.loadInitData(this.map);
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
trainNumberChange(groupNumber) {
const operate = {
val: `${groupNumber}`,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNumberChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNumberChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainTypeChange(trainType) {
const operate = {
val: `${trainType}`,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainTypeChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainTypeChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoChange(tripNumber) {
const operate = {
send: true,
val: tripNumber,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
operate.cmdType = CMD.Train.addTrainId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
operate.cmdType = CMD.Train.editTrainId;
}
Handler.undo(1);
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
if (response.data) {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: response.data.serviceNumber,
targetCode: response.data.targetCode,
category: 'MM'
};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
}
}
});
},
commit() {
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
/** 增加列车识别号*/
this.addTrainId();
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
this.editTrainId();
}
},
//
addTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const model = this.formModel;
const operate = {
send: true,
operation: OperationEvent.Train.addTrainId.menu.operation,
cmdType: CMD.Train.CMD_ADD_TRAIN_ID,
messages: [this.$t('tip.addTrainIdTip')],
val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}`
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmTrain.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
//
editTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
cmdType: CMD.Train.CMD_EDIT_TRAIN_ID,
messages: [this.$t('tip.editTrainIdTip')],
val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmTrain.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,155 @@
<template>
<el-dialog v-dialogDrag class="xian-01__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
<el-select v-model="trainCode" filterable :placeholder="this.$t('menu.train')">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="列车车次:" prop="tripNumber">
<el-select v-model="tripNumber" filterable placeholder="列车车次">
<el-option v-for="no in trainNoList" :key="no" :label="no" :value="no"></el-option>
</el-select>
<div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div>
</el-form-item> -->
<el-form-item :label="this.$t('menu.trainDirection')+this.$t('global.colon')" prop="direction">
<el-select v-model="direction" filterable :placeholder="this.$t('menu.trainDirection')">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div> -->
</el-form-item>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ this.$t('global.confirm') }}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ this.$t('global.cancel') }}</el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
trainList: [],
trainNoList: [],
directionList: [
{
value: '2',
label: this.$t('menu.up')
},
{
value: '1',
label: this.$t('menu.down')
}
],
trainCode: '',
tripNumber: '',
direction: '',
selected: null
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return OperationEvent.Section.newtrain.menu.domId;
},
title() {
return this.$t('menu.settingTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
if (map.trainList.length) {
this.trainList = map.trainList;
} else {
this.$messageBox(this.$t('error.getTrainListFailed'));
}
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
/** 加载列车数据*/
this.loadInitData(this.map);
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.trainCode = '';
this.direction = '';
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
send: true,
operation: OperationEvent.Section.newtrain.menu.operation,
cmdType: CMD.Section.CMD_NEW_TRAIN,
val: '' + this.direction + '::' + this.trainCode
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,167 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="90px" :model="formModel" :rules="rules">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
<el-input :id="domIdTrainNumber" v-model="formModel.groupNumber" @change="trainNumberChange" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { getPublishMapTrainNos } from '@/api/runplan';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainDelete',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
trainNoList: [],
formModel: {
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
domIdTrainNumber() {
return this.dialogShow ? OperationEvent.Train.delTrainId.trainNumberChange.domId : '';
},
title() {
return this.$t('menu.menuTrain.deleteTrainId');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
if (map) {
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
//
if (!this.dialogShow) {
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');
this.$store.dispatch('map/setTrainWindowShow', false);
},
trainNumberChange() {
const operate = {
val: `${this.formModel.groupNumber}`,
operation: OperationEvent.Train.delTrainId.trainNumberChange.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.delTrainId.menu.operation,
cmdType: CMD.Train.CMD_DEL_TRAIN_ID,
val: this.formModel.groupNumber
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,138 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="120px" :model="addModel" :rules="rules">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="120px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainMove',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
tripNumber: ''
},
rules: {
tripNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return this.$t('menu.menuTrain.editTrainNo');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.editTrainNo.menu.operation,
cmdType: CMD.Train.CMD_EDIT_TRAIN_NO
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,201 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="640px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 46%;">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" disabled />
</el-form-item>
</div>
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
>
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandSource">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
<el-input v-model="addModel.trainSource" />
</el-form-item>
</div>
</div>
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
>
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
<el-input v-model="addModel.trainGoal" />
</el-form-item>
</div>
</div>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainMove',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: ''
},
rules: {
tripNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainSource: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
trainGoal: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return this.$t('menu.menuTrain.moveTrainId');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
cmdType: CMD.Train.CMD_MOVE_TRAIN_ID
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,206 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="640px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;"
>
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberSource">
<el-input v-model="addModel.trainNumberSource" />
</el-form-item>
<el-form-item prop="stationStandSource">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
<el-input v-model="addModel.trainSource" />
</el-form-item>
</div>
</div>
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;"
>
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberGoal">
<el-input v-model="addModel.trainNumberGoal" />
</el-form-item>
<el-form-item prop="stationStandGoal">
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
<el-input v-model="addModel.trainGoal" />
</el-form-item>
</div>
</div>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TrainSwitch',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
trainNumberSource: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
trainNumberGoal: ''
},
rules: {
trainNumberSource: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainSource: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
],
trainNumberGoal: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
],
trainGoal: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return this.$t('menu.menuTrain.switchTrainId');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
cmdType: CMD.Train.CMD_MOVE_TRAIN_ID
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,356 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" />
<template v-show="isShowAll">
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" />
<passive-Timeout ref="passiveTimeout" />
</template>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from './passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'Menus',
components: {
MenuBar,
MenuCancel,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
]),
isShowAll() {
return this.$route.params.mode != 'dp' &&
this.$route.params.mode != 'plan' &&
this.$store.state.training.roles != 'BigScreen';
},
isShowBar() {
return this.$store.state.training.prdType;
}
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.xian-01__systerm {
overflow: hidden !important;
}
.xian-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.xian-01__systerm .el-dialog .el-dialog__header {
padding: 5px;
height: 26px;
}
.xian-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.xian-01__systerm .el-dialog .el-dialog__body {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 5px;
padding-right: 5px;
margin: 0px 5px 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.xian-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 4px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.xian-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
-webkit-filter: blur(10px);
filter: blur(10px);
height: 20px;
width: -webkit-fill-available;
background: rgba(128, 128, 128, 0.8);
z-index: -1;
}
.xian-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 4px;
right: 5px;
line-height: 16px;
}
.xian-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.xian-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.xian-01__systerm .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.xian-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.xian-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.xian-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.xian-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.xian-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.xian-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.xian-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.xian-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.xian-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.xian-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.xian-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.xian-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.xian-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.xian-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.xian-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.xian-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.xian-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.xian-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.xian-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.xian-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.xian-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.xian-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.xian-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.xian-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.xian-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.xian-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.xian-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.xian-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.xian-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.xian-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.xian-01__systerm .el-dialog .table {
margin-top: 10px;
}
.xian-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.xian-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,813 @@
<template>
<div id="menuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :id="item.operate.domId" :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li :id="item.operate.domId" :key="i" class="nav-li" @click.stop="selectedClassA(item, i)">
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)">
<li
:id="child.operate.domId"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li
v-if="grandchild.show"
:id="grandchild.operate.domId"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li
v-if="child.show"
:id="child.operate.domId"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
<station-control-convert ref="stationControlConvert" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
<view-device ref="viewDevice" />
<notice-info ref="noticeInfo" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js';
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config.js';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import PasswordBox from './menuDialog/passwordBox';
import ViewTrainId from './menuDialog/viewTrainId';
import ViewName from './menuDialog/viewName';
import ViewDevice from './menuDialog/viewDevice';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuBar',
components: {
NoticeInfo,
StationControlConvert,
PasswordBox,
ViewTrainId,
ViewName,
ViewDevice,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
valid: true,
menu: [],
menuNormal: {
Local: [
{
title: this.$t('menu.menuBar.system'),
operate: OperationEvent.Command.mBar.system,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.view'),
operate: OperationEvent.Command.mBar.check,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.refresh'),
operate: OperationEvent.Command.mBar.fresh,
click: this.refresh,
children: [
]
},
{
title: this.$t('menu.menuBar.display'),
operate: OperationEvent.Command.mBar.view,
children: [
{
title: this.$t('menu.menuBar.setTrainIdDisplay'),
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
},
{
title: this.$t('menu.menuBar.setNameDisplay'),
click: this.setNameDisplay,
operate: OperationEvent.Command.view.setNameDisplay
},
{
title: this.$t('menu.menuBar.setDeviceDisplay'),
click: this.setDeviceDisplay,
operate: OperationEvent.Command.view.setDeviceDisplay
}
]
},
{
title: this.$t('menu.menuBar.stationMapSwitch'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.controlModeSwitch'),
operate: OperationEvent.Command.mBar.remoteControl,
children: [
{
title: this.$t('menu.menuBar.toStationControl'),
click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar
},
{
title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password
},
{
title: this.$t('menu.menuBar.toCentralControl'),
click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar,
froce: true
}
]
},
{
title: this.$t('menu.menuBar.requestOperationArea'),
operate: OperationEvent.Command.mBar.requestZone,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.historyQuery'),
operate: OperationEvent.Command.mBar.historyQuery,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.userManage'),
operate: OperationEvent.Command.mBar.userManage,
children: [
{
title: this.$t('menu.menuBar.userManage'),
click: this.userManage,
operate: OperationEvent.Command.manage.userManage
}
]
},
{
title: this.$t('menu.menuBar.help'),
operate: OperationEvent.Command.mBar.help,
children: [
{
title: this.$t('menu.menuBar.about'),
click: this.about,
operate: OperationEvent.Command.help.about
}
]
}
],
Center: [
{
title: this.$t('menu.menuBar.system'),
operate: OperationEvent.Command.mBar.system,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.view'),
operate: OperationEvent.Command.mBar.check,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.refresh'),
operate: OperationEvent.Command.mBar.fresh,
click: this.refresh,
children: [
]
},
{
title: this.$t('menu.menuBar.display'),
operate: OperationEvent.Command.mBar.view,
children: [
{
title: this.$t('menu.menuBar.setTrainIdDisplay'),
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
},
{
title: this.$t('menu.menuBar.setNameDisplay'),
click: this.setNameDisplay,
operate: OperationEvent.Command.view.setNameDisplay
},
{
title: this.$t('menu.menuBar.setDeviceDisplay'),
click: this.setDeviceDisplay,
operate: OperationEvent.Command.view.setDeviceDisplay
}
]
},
{
title: this.$t('menu.menuBar.stationMapSwitch'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.planCarOperation'),
operate: OperationEvent.Command.mBar.planTrain,
children: [
{
title: this.$t('menu.menuBar.addPlanCar'),
click: this.addPlanTrain,
operate: OperationEvent.Command.planTrain.addPlanTrain
},
{
title: this.$t('menu.menuBar.panPlanCar'),
click: this.translatPlanTrain,
operate: OperationEvent.Command.planTrain.translatPlanTrain
},
{
title: this.$t('menu.menuBar.deletePlanCar'),
click: this.delPlanTrain,
operate: OperationEvent.Command.planTrain.delPlanTrain
}
]
},
{
title: this.$t('menu.menuBar.trainNumberMaintenance'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.controlModeSwitch'),
operate: OperationEvent.Command.mBar.remoteControl,
children: [
{
title: this.$t('menu.menuBar.toStationControl'),
click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar,
froce: true
},
{
title: this.$t('menu.menuBar.forcedStationControl'),
click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password,
froce: true
},
{
title: this.$t('menu.menuBar.toCentralControl'),
click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar
}
]
},
{
title: this.$t('menu.menuBar.requestOperationArea'),
operate: OperationEvent.Command.mBar.requestZone,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.schedulingLog'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.systemAnalysis'),
operate: '',
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.userManage'),
operate: OperationEvent.Command.mBar.userManage,
children: [
{
title: this.$t('menu.menuBar.userManage'),
click: this.userManage,
operate: OperationEvent.Command.manage.userManage
}
]
},
{
title: this.$t('menu.menuBar.historyQuery'),
operate: OperationEvent.Command.mBar.historyQuery,
click: this.undeveloped,
children: [
]
},
{
title: this.$t('menu.menuBar.help'),
operate: OperationEvent.Command.mBar.help,
children: [
{
title: this.$t('menu.menuBar.about'),
click: this.about,
operate: OperationEvent.Command.help.about
}
]
}
]
}
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order',
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
},
'$store.state.training.operatemode': function (mode) {
this.initMenu();
},
'$store.state.training.started': function (val) {
this.closeMenu(true);
},
'$store.state.training.prdType': function () {
this.initMenu();
}
},
mounted() {
this.initMenu();
},
methods: {
initMenu(menu) {
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[State2SimulationMap[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.clickEvent();
this.closeMenu(true);
},
clickEvent() {
const self = this;
window.onclick = function (e) {
if (document.getElementById('menuBar')) {
self.closeMenu(false);
}
};
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu(flag) {
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
}
},
hookClick(item, event) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (item && typeof item.click == 'function') {
item.click(item.operate);
}
},
selectedClassA(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuA(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuA(item, index);
}
},
//
popupMenuA(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
this.clickEvent();
const operate = {
operation: item.operate.operation
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
selectedClassB(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuB(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuB(item, index);
}
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
//
turnToStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
mandatoryStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
});
},
//
conterStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
setTrainIdDisplay(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewTrainId.doShow(operate);
}
});
},
//
setNameDisplay(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewName.doShow(operate);
}
});
},
//
setDeviceDisplay(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewDevice.doShow(operate);
}
});
},
//
addPlanTrain(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAdd.doShow(operate);
}
});
},
//
translatPlanTrain(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainTranstalet.doShow(operate);
}
});
},
//
delPlanTrain(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate);
}
});
},
//
userManage(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.manageUser.doShow(operate);
}
});
},
//
about(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
getLoginResult(operate) {
/** 密码校验*/
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
if (operate.success) {
/** 校验成功*/
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
}
}
},
undeveloped() {
this.doClose();
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 30px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 190px;
$menuItemPadding: 5px;
#menuBar {
z-index: 10;
position: absolute;
width: inherit;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
background: linear-gradient(#FDFDFE, #DEE3F3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray !important;
line-height: $menuItemHeight;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
display: flex;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: block;
float: left;
border-right: 1px inset #CACACA;
width: $width;
}
.menu-li-text .label {
display: block;
float: left;
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -0,0 +1,130 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { Notification } from 'element-ui';
import { mapGetters } from 'vuex';
import { DeviceMenu } from '@/scripts/ConstDic';
import { exitFullscreen } from '@/utils/screen';
export default {
name: 'CancelMenu',
components: {
PopMenu
},
data() {
return {
menu: [],
menuNormal: [],
menuScreen: [
{
label: this.$t('menu.menuCancle.zoomIn'),
handler: this.magnifyMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.zoomOut'),
handler: this.shrinkMap,
disabled: false
},
{
label: this.$t('menu.menuCancle.back'),
handler: this.back,
disabled: false
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menuNormal = [];
this.stationList.forEach(station => {
if (station.code === station.concentrateStationCode) {
const node = {
label: station.name,
children: []
};
this.stationList.forEach(elem => {
if (elem.visible) {
let next = elem;
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
}
if (station.code == next.code) {
node.children.push({
code: elem.code,
label: elem.name,
handler: this.mapLocation
});
}
}
});
this.menuNormal.push(node);
}
});
this.menu = [...this.menuNormal];
},
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();
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.doClose();
}
},
//
magnifyMap() {
this.$store.dispatch('menuOperation/handleMagnifyCount');
},
//
shrinkMap() {
this.$store.dispatch('menuOperation/handleShrinkCount');
},
//
async back() {
history.go(-1);
Notification.closeAll();
exitFullscreen();
}
}
};
</script>

View File

@ -0,0 +1,130 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm two-confirmation"
title="二次确认"
:visible.sync="show"
width="360px"
:before-close="doClose"
:show-close="false"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message, index) in messages">
<div :key="index">{{ message }}</div>
</template>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TwoConfirmation',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: '',
operate: '',
timer: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm() {
if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
return OperationEvent.StationControl.emergencyStationControl.confirm.domId;
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
return OperationEvent.StationControl.requestStationControl.confirm.domId;
} else if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
} else {
return '';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
messages() {
if (this.operate) {
return this.operate.messages;
}
return [];
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = this.operate.operation;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
operation: this.operation
};
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
});
}
}
};
</script>

View File

@ -0,0 +1,172 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm user-add"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input v-model="model.password" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input v-model="model.confirm" type="password" />
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserAdd',
components: {
},
data() {
return {
operate: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'ADD',
jobNumber: '',
userName: '',
password: '',
confirm: ''
},
rules: {
jobNumber: [
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
password: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPasswordAgain'), trigger: 'change' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.addUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.model.password === this.model.confirm) {
this.doClose();
this.$emit('operateUser', this.model);
} else {
this.$messageBox(this.$t('menu.menuChildDialog.passwordInconsistent'));
}
}
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.model; });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,143 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm user-delete"
:title="title"
:visible.sync="show"
width="260px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding-left: 10px; padding-bottom: 10px">
<i class="el-icon-info" />
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="3">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserDelete',
components: {
},
data() {
return {
operate: {},
messages: [],
model: {
type: 'DELETE',
jobNumber: '',
userName: ''
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.deleteUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.messages = operate.messages;
this.model.userName = '';
this.model.jobNumber = '';
if (selected) {
this.model.userName = selected.userName;
this.model.jobNumber = selected.jobNumber;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.model.userName && this.model.jobNumber) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$emit('operateUser', this.model);
}
});
} else {
this.$messageBox(this.$t('menu.menuChildDialog.selectTips'));
}
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,189 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm user-edit"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" disabled />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" disabled />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.originalPassword')" prop="oldPassword">
<el-input v-model="model.oldPassword" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input v-model="model.password" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input v-model="model.confirm" type="password" />
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserEdit',
components: {
},
data() {
return {
operate: {},
selected: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'EDIT',
jobNumber: '',
userName: '',
oldPassword: '',
password: '',
confirm: ''
},
rules: {
jobNumber: [
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
oldPassword: [
{ required: true, message: this.$t('menu.menuChildDialog.inputOriginal'), trigger: 'change' }
],
password: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewAgain'), trigger: 'change' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.userEditPage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.selected = selected;
if (selected) {
this.model.jobNumber = selected.jobNumber;
this.model.userName = selected.userName;
}
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.selected.password !== this.model.oldPassword) {
this.$messageBox(this.$t('menu.menuChildDialog.originalPasswordError'));
} else if (this.model.password !== this.model.confirm) {
this.$messageBox(this.$t('menu.menuChildDialog.passwordError'));
} else if (this.model.oldPassword === this.model.password) {
this.$messageBox(this.$t('menu.menuChildDialog.passwordSame'));
} else {
this.doClose();
this.$emit('operateUser', this.model);
}
}
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,140 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm manage-user"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 70px;">
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">{{ $t('menu.menuDialog.versionName') }}</span>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>{{ $t('menu.menuDialog.confirm') }}</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> {{ $t('menu.menuDialog.copyright') }}</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" :label="$t('menu.menuDialog.moduleName')" width="180" />
<el-table-column prop="version" :label="$t('menu.menuDialog.version')" width="180" />
<el-table-column prop="updateDate" :label="$t('menu.menuDialog.modifyDate')" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: this.$t('menu.menuDialog.mainProgramVersion'),
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.about');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
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');
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,309 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm manage-user"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">{{ $t('menu.menuDialog.userList') }}</span>
<el-row>
<el-col :span="18">
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="450"
center
size="mini"
highlight-current-row
@row-click="chooseUser"
>
<el-table-column prop="jobNumber" :label="$t('menu.menuDialog.jobNumber')" width="120">
<template slot-scope="scope">
<span>{{ scope.row.jobNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="userName" :label="$t('menu.menuDialog.userName')">
<template slot-scope="scope">
<span>{{ scope.row.userName }}</span>
</template>
</el-table-column>
<el-table-column width="20" />
</el-table>
</el-col>
<el-col :span="4">
<el-button :id="domIdFreshUser" style="margin-top: 140px; margin-left: 10px;" @click="freshUser">{{ $t('menu.menuDialog.refresh') }}
</el-button>
<el-button :id="domIdAddUser" style="margin-top: 30px; margin-left: 10px;" @click="addUser">{{ $t('menu.menuDialog.add') }}
</el-button>
<el-button :id="domIdEditUser" style="margin-top: 30px; margin-left: 10px;" @click="editUser">{{ $t('menu.menuDialog.modify') }}
</el-button>
<el-button :id="domIdDelUser" style="margin-top: 30px; margin-left: 10px;" @click="delUser">{{ $t('menu.menuDialog.delete') }}
</el-button>
</el-col>
</el-row>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<user-add ref="userAdd" @operateUser="operateUser" />
<user-edit ref="userEdit" @operateUser="operateUser" />
<user-delete ref="userDelete" @operateUser="operateUser" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
components: {
UserAdd,
UserEdit,
UserDelete
},
data() {
return {
tableData: [],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdAddUser() {
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
},
domIdEditUser() {
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
},
domIdDelUser() {
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
},
domIdFreshUser() {
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
},
domIdChooseUser() {
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.userManage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
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');
},
//
addUser() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.addUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userAdd.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
editUser() {
if (this.selected) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.editUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
delUser() {
if (this.selected) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.delUser.operation,
messages: [`${this.$t('menu.menuDialog.deleteMessageOne')} ${this.selected.userName} ${this.$t('menu.menuDialog.deleteMessageTwo')}`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userDelete.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
freshUser() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.freshUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
//
chooseUser(row) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.chooseUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.selected = row;
}).catch(() => {
this.loading = false;
});
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
},
//
operateUser(data) {
if (data && data.type === 'ADD') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index < 0) {
this.tableData.push({
jobNumber: data.jobNumber,
userName: data.userName,
password: data.password
});
} else {
this.$messageBox(this.$t('menu.menuDialog.addFail'));
}
} else if (data && data.type === 'EDIT') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index >= 0) {
this.tableData[index].password = data.password;
this.tableData[index].userName = data.userName;
} else {
this.$messageBox(this.$t('menu.menuDialog.modifyFail'));
}
} else if (data && data.type === 'DELETE') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index >= 0) {
this.tableData.splice(index, 1);
this.selected = null;
} else {
this.$messageBox(this.$t('menu.menuDialog.deleteFail'));
}
}
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,228 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm password-box"
:title="$t('menu.menuDialog.passwordBox')"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="context" style="overflow:hidden">
<el-form label-width="80px" size="mini">
<el-form-item prop="username">
<span slot="label">{{ $t('menu.menuDialog.userNameLabel') }}</span>
<el-input v-model="model.username" disabled />
</el-form-item>
<el-form-item prop="password">
<span slot="label">{{ $t('menu.menuDialog.password') }}</span>
<el-input v-model="model.password" type="password" />
</el-form-item>
</el-form>
<div class="operate">
<el-button-group v-model="key" class="left" size="mini">
<el-button size="mini" @click="click(1)">1</el-button>
<el-button size="mini" @click="click(2)">2</el-button>
<el-button size="mini" @click="click(3)">3</el-button>
<el-button size="mini" @click="click(4)">4</el-button>
<el-button size="mini" @click="click(5)">5</el-button>
</el-button-group>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="esc">{{ $t('menu.menuDialog.back') }}</el-button>
</el-button-group>
<el-button-group v-model="key" class="left" size="mini">
<el-button size="mini" @click="click(6)">6</el-button>
<el-button size="mini" @click="click(7)">7</el-button>
<el-button size="mini" @click="click(8)">8</el-button>
<el-button size="mini" @click="click(9)">9</el-button>
<el-button size="mini" @click="click(0)">0</el-button>
</el-button-group>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="clr">{{ $t('menu.menuDialog.clear') }}</el-button>
</el-button-group>
</div>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'PasswordBox',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: null,
model: {
username: '',
password: ''
},
key: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(operate) {
this.model.username = '';
this.model.password = '';
this.operate = operate || {};
this.operation = operate.operation;
this.model.username = this.$store.state.user.nickname;
},
doShow(operate) {
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
if (!this.dialogShow) {
this.loadInitData(operate);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
}
if (this.model.password == '123456') {
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setLoginResult', {
operation: operate.operation,
success: valid
});
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setLoginResult', {
operation: operate.operation,
success: false
});
});
} else {
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
}
},
click(key) {
if (!this.model.password) {
this.model.password = '';
}
this.model.password += key;
},
esc() {
if (this.model.password) {
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
}
},
clr() {
this.model.password = '';
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.password-box .el-form {
margin-top: 10px !important;
margin-right: 20px !important;
}
.password-box .el-form-item {
margin-bottom: 5px !important;
}
.password-box .context {
height: 170px !important;
}
.password-box .operate {
margin-top: 10px !important;
padding-bottom: 10px !important;
}
.password-box .left {
margin-left: 10px !important;
}
.password-box .left .el-button {
color: #000;
background: #F0F0F0;
text-align: center;
width: 30px !important;
}
.password-box .right {
color: #000;
margin-left: 10px !important;
background: #F0F0F0;
width: 80px !important;
}
</style>

View File

@ -0,0 +1,472 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm station-control-convert"
:title="$t('menu.menuDialog.controlModeConversion')"
:visible.sync="show"
width="700px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="250"
center
size="mini"
highlight-current-row
>
<el-table-column :id="domIdChoose" prop="check" :label="$t('menu.menuDialog.select')" width="60" style="margin-left:30px">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
</template>
</el-table-column>
<el-table-column prop="operate" :label="$t('menu.menuDialog.operatingArea')" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template>
</el-table-column>
<el-table-column prop="control" :label="$t('menu.menuDialog.controlMode')" width="80">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
</template>
</el-table-column>
<el-table-column prop="status" :label="$t('menu.menuDialog.centerStationCommunicationStatus')" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
</template>
</el-table-column>
<el-table-column prop="result" :label="$t('menu.menuDialog.transferExecutionStatus')">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
</template>
</el-table-column>
</el-table>
<el-row class="button-group">
<el-col :span="10" :offset="3" class="control_button">
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">强制站控</el-button>
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">请求站控</el-button>
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">请求中控</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">{{ $t('menu.menuDialog.close') }}
</el-button>
</el-col>
</el-row>
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import TwoConfirmation from './childDialog/twoConfirmation';
export default {
name: 'StationControlConvert',
components: {
TwoConfirmation
},
data() {
return {
operate: null,
dialogShow: false,
disabledSend: false,
disabledSure: false,
disabledClose: false,
operation: '',
controlProps: {
'Center': '中控',
'Local': '站控'
},
selection: [],
tableData: [],
timer: null,
count: 0,
flagListBit: [],
backOperate: '',
timeout: 61,
counts: 0
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
...mapGetters('training', [
'mode',
'started'
]),
disabledCommit() {
return this.disabledSend || this.disabledSure;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
isFork() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
}
return false;
},
isRequest() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
}
return false;
},
isConter() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
}
return false;
},
domIdChoose() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
return OperationEvent.StationControl.forcedStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
return OperationEvent.StationControl.requestStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
return OperationEvent.StationControl.requestCentralControl.choose.domId;
}
}
return false;
},
domIdConter() {
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
},
domIdFork() {
return this.dialogShow ? OperationEvent.StationControl.forcedStationControl.menu.domId : '';
},
domIdRequest() {
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.menu.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem) {
this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
if (elem.hasOwnProperty('timeout')) {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
} else if (elem.hasOwnProperty('agree')) {
if (elem.agree) {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
} else {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
}
}
this.disabledClose = false;
this.disabledSure = false;
}
},
backOperate: function (operate) {
if (this.dialogShow && operate) {
if (operate.selection && operate.selection.length) {
operate.selection.forEach(elem => {
if (operate.commit) {
this.updateTableValue(elem.code, { result: `${this.$t('menu.menuDialog.senedMessageOne')}${this.timeout} ${this.$t('menu.menuDialog.senedMessageTwo')}` }, false);
} else if (operate.cancel) {
this.updateTableValue(elem.code, { result: '' }, false);
}
});
}
}
},
//
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.loadTableData();
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
updateTableValue(code, result, success) {
this.tableData.forEach((row, index) => {
if (row.code == code) {
for (const prop in result) {
row[prop] = result[prop];
}
if (success) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
row.control = this.controlProps['Local']; // Center: Local:
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
row.control = this.controlProps['Center']; // Center: Local:
}
row.disabled = true;
row.check = false;
}
}
});
},
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.handleChooseChange(selection);
this.selection = selection;
}
},
checkBoxDisabled(row) {
const control = (this.$store.getters['map/getDeviceByCode'](row.code) || {});
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
if (control && control.controlMode == 'Local') { // Center: Local:
return true;
}
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
if (control && control.controlMode == 'Center') { // Center: Local:
return true;
}
}
},
loadTableData() {
this.tableData = [];
if (this.stationList) {
this.stationList.forEach(station => {
if (station.createControlMode) {
this.tableData.push({
code: station.code,
operate: station.name || '',
control: '',
check: false,
disabled: false,
status: '正常',
result: ''
});
}
});
}
},
initTableDataStatus() {
this.tableData.forEach(row => {
row.disabled = this.checkBoxDisabled(row);
row.check = false;
row.result = '';
const control = this.$store.getters['map/getDeviceByCode'](row.code);
if (control) {
row.control = this.controlProps[control.controlMode];
}
});
},
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
this.disabledSure = false;
this.initTableDataStatus();
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
setTimer() {
this.clearTimer();
this.flagListBit = new Array(this.selection.length).fill(true);
this.timer = setInterval(() => {
(this.selection || []).forEach((elem, index) => {
if (this.flagListBit[index]) {
elem['count'] = (elem['count'] || 0) + 1;
elem['count'] > this.timeout && (
this.flagListBit[index] = false,
this.setRequestTimeout(elem)
);
}
});
this.flagListBit.findIndex(elem => { return elem; }) < 0 && this.clearTimer();
}, 1000);
},
clearTimer() {
this.count = 0;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
setRequestTimeout(elem) {
elem['count'] = 0;
this.$store.dispatch('socket/pushMsgQueue',
{ type: 'resp', timeout: 'true', stationControlCode: elem.code }
);
},
handleChooseChange(selection) {
this.selection = selection;
const stationCodeList = selection.map(elem => { return elem.code; });
if (selection && selection.length) {
const operate = {
operation: '',
val: stationCodeList.join('::'),
selection: selection
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
}
this.disabledSure = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.disabledSure = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(this.$t('menu.menuDialog.selectData'));
}
},
requestCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmStationControlTip')],
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection,
param: {
stationCodes: stationCodeList
}
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
forkCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection,
param: {
stationCodes: stationCodeList
}
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
conterCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection,
param: {
stationCodes: stationCodeList
}
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
getOperate(operate) {
this.backOperate = operate;
if (operate.cancel) {
this.disabledSure = this.disabledSend = false;
}
if (operate.commit || operate.timeout) {
this.disabledSend = this.disabledSure = true;
}
this.setTimer();
this.disabledClose = true;
this.counts = 1;
}
}
};
</script>
<style lang="scss" scoped>
.xian-01__systerm .el-dialog .control_button button{
max-width:180px;
width:auto ;
padding-left: 5px ;
padding-right: 5px ;
min-width: 80px;
}
</style>

View File

@ -0,0 +1,179 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item prop="trainNumberLimber">
<span id="frontTrainNumber" slot="label">{{ $t('menu.menuDialog.frontTrainNumber') }}</span>
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
<el-form-item id="groupNumber" :label="$t('menu.menuDialog.addTrainNumber')" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
// trainNumberLimber: [
// { required: true, message: '', trigger: 'blur' }
// ],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.addPlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
#frontTrainNumber,#groupNumber label{
line-height: 100%;
display: inline-block;
}
</style>

View File

@ -0,0 +1,157 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.deletePlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.xian-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,164 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item :label="$t('menu.menuDialog.trainNumber')" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainTranstalet',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
trainNumberLimber: [
{ required: true, message: this.$t('menu.menuDialog.inputFrontNumber'), trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.panPlanCar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,166 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm view-display"
:title="$t('menu.menuDialog.deviceDisplaySettings')"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="deviceLevels">
<div>
<el-checkbox :label="1">{{ $t('menu.menuDialog.trainWindow') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="2">{{ $t('menu.menuDialog.sectionBoundary') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="3">{{ $t('menu.menuDialog.linkageAutoRouteShow') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="4">{{ $t('menu.menuDialog.atsAutoTriggerShow') }}</el-checkbox>
</div>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}
</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" class="cancal" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewDevice',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
deviceLevels: [2, 3, 4, 5]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setDeviceDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
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');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.deviceLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setDeviceDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setDeviceDisplay() {
const deviceList = [];
//
const borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {borderBorderShow }));
});
}
//
const trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
const trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {trainWindowShow }));
});
}
// ATS
const linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1; //
const atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1; // ATS
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -0,0 +1,248 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm view-name"
:title="$t('menu.menuDialog.nameDisplaySetting')"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="nameLevels">
<el-row>
<el-col :span="10">
<el-checkbox :label="1">{{ $t('menu.menuDialog.signalName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="2">{{ $t('menu.menuDialog.standTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="3" disabled>{{ $t('menu.menuDialog.buttonName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="4">{{ $t('menu.menuDialog.reentryTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="5">{{ $t('menu.menuDialog.trackName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="6">{{ $t('menu.menuDialog.transferTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="7">{{ $t('menu.menuDialog.turnoutName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="8">{{ $t('menu.menuDialog.indicatorName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="9">{{ $t('menu.menuDialog.turnoutSectionName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="10">{{ $t('menu.menuDialog.destinationName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="11">{{ $t('menu.menuDialog.axisSectionName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="12">{{ $t('menu.menuDialog.kmPost') }}</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import deviceType from '@/jmap/constant/deviceType';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewName',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setNameDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
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');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.nameLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setNameDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setNameDisplay() {
const deviceList = [];
//
let nameShow = this.nameLevels.indexOf(1) !== -1;
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
});
}
//
nameShow = this.nameLevels.indexOf(7) !== -1; //
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; //
const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameShow, switchSectionNameShow }));
});
}
//
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow }));
});
}
//
nameShow = false;
let standTrackNameShow = false;
let reentryTrackNameShow = false;
let transferTrackNameShow = false;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
elem._type = deviceType.Section;
if (elem.isSwitchSection && elem.parentCode) {
//
nameShow = false;
} else {
if (elem.type === '01') {
//
nameShow = this.nameLevels.indexOf(11) !== -1;
} else if (elem.type === '02') {
//
nameShow = this.nameLevels.indexOf(5) !== -1;
} else if (elem.type === '03') {
//
nameShow = this.nameLevels.indexOf(9) !== -1;
}
}
//
if (elem.isStandTrack) {
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
}
//
if (elem.isReentryTrack) {
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
}
//
if (elem.isTransferTrack) {
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
}
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
});
}
//
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>

View File

@ -0,0 +1,209 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm view-train-id"
:title="$t('menu.menuDialog.trainIDDisplaySetting')"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{ $t('menu.menuDialog.plantrainDisplayMode') }}</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="5">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">{{ $t('menu.menuDialog.headCodeStationDisplayMode') }}</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="6" :offset="4">
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{ $t('menu.menuDialog.fontSize') }}</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">{{ $t('menu.menuDialog.range') }}</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import deviceType from '@/jmap/constant/deviceType';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(() => {
this.loading = false;
});
},
setTrainDispaly() {
const updatlist = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
trainList.forEach(elem => {
updatlist.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameFormat, nameFontSize }));
});
this.$store.dispatch('map/updateMapDevices', updatlist);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
}
return ''; //
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ {
.el-dialog .el-radio__label{
width: 150px ;
white-space: pre-wrap ;
display: inline-block ;
}
.el-radio__input{
vertical-align: top;
}
}
.elrow{
margin-top:4px;
}
</style>

View File

@ -0,0 +1,272 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SectionCmdControl from './dialog/sectionCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
export default {
name: 'SectionMenu',
components: {
PopMenu,
SectionControl,
SectionCmdControl,
SpeedCmdControl,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '区段封锁',
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK
},
{
label: '区段解封',
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
},
{
label: '故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
{
label: '设置限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
},
{
label: '取消限速',
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
}
],
Center: [
{
label: '故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
{
label: '区段切除',
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
},
{
label: '区段激活',
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
{
label: '区段封锁',
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK
},
{
label: '区段解封',
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
},
{
label: '设置限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
},
{
label: '取消限速',
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
}
]
},
menuForce: [
{
label: this.$t('menu.menuSection.setFault'),
handler: this.setStoppage,
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
},
{
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !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();
}
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.stoppage.menu.operation,
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
param: {
sectionCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.cancelStoppage.menu.operation,
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
param: {
sectionCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
fault() {
commitOperate(menuOperate.Section.fault, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
//
split() {
commitOperate(menuOperate.Section.split, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
//
active() {
commitOperate(menuOperate.Section.active, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
//
lock() {
commitOperate(menuOperate.Section.lock, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
commitOperate(menuOperate.Section.unlock, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
//
setSpeed() {
commitOperate(menuOperate.Section.setSpeed, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
commitOperate(menuOperate.Section.cancelSpeed, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -0,0 +1,378 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" />
<route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import RouteControl from './dialog/routeControl';
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 './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from './utils/menuOperate';
export default {
name: 'SignalMenu',
components: {
PopMenu,
RouteControl,
RouteSelection,
RouteLock,
RouteCmdControl,
RouteHandControl,
RouteDetail,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '进路选排',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '进路取消',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '信号封锁',
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: '进路解封',
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '进路引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
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,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
},
{
label: '取消联锁自动触发',
handler: this.cancelAutoTrigger,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
},
{
label: '信号关灯',
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
}
],
Center: [
{
label: '进路选排',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '进路取消',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '信号封锁',
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: '进路解封',
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
{
label: '信号关灯',
handler: this.signalClose,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '进路引导',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: '进路交ATS自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '查询进路状态',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
]
},
menuForce: [
{
label: this.$t('menu.menuSignal.setFault'),
handler: this.setStoppage,
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
},
{
label: this.$t('menu.menuSignal.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
]),
...mapGetters('map', [
'routeList'
]),
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);
} 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();
}
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.stoppage.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
getRouteList(selectType) {
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === selectType.code) {
routes.push(elem);
}
});
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));
}
});
},
//
cancelTrainRoute() {
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
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);
}
});
},
//
unlock() {
commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
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);
}
});
},
//
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);
}
});
},
//
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));
}
});
}
}
};
</script>

View File

@ -0,0 +1,282 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<station-cmd-control ref="stationCmdControl" />
<station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StationCmdControl from './dialog/stationCmdControl';
import StationHumanControlAll from './dialog/stationHumanControlAll';
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationMenu',
components: {
PopMenu,
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '全站设置联锁自动触发',
handler: this.setAutoTrigger,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
},
{
label: '全站取消联锁自动触发',
handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
}
// {
// label: '',
// handler: this.powerUnLock,
// cmdType: CMD.Station.active,
// },
// {
// label: '',
// handler: this.execKeyOperationTest,
// cmdType: CMD.Station.active,
// }
],
Center: [
{
label: '所有进路自排关',
handler: this.humanControlALL,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
},
{
label: '所有进路自排开',
handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
},
{
label: '上电解锁',
handler: this.powerUnLock,
cmdType: CMD.Station.active
}
// {
// label: '',
// handler: this.execKeyOperationTest,
// cmdType: CMD.Station.active,
// auth: { station: false, center: true }
// }
]
},
menuForce: [
{
label: '设置ZC故障',
handler: this.setStoppage,
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
},
{
label: '取消ZC故障',
handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !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.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
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();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.stoppage.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setAutoTrigger() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.setAutoTrigger.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoTrigger() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
powerUnLock() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Station.powerUnLock.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected);
}
});
},
//
execKeyOperationTest() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected);
}
});
},
//
humanControlALL() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Station.humanControlALL.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
}
});
},
//
atsAutoControlALL() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -0,0 +1,324 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" />
<stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" />
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl';
import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime';
import StandDetainTrainAll from './dialog/standDetainTrainAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
export default {
name: 'StationStandMenu',
components: {
PopMenu,
StandControl,
StandDetail,
StandRunLevel,
NoticeInfo,
StandBackStrategy,
StandStopTime,
StandDetainTrainAll
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '设置扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: '强制取消扣车',
handler: this.cancelDetainTrainForce,
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
},
{
label: '查询站台状态',
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
],
Center: [
{
label: '设置扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: '全线取消扣车',
handler: this.cancelDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
},
{
label: '设置跳停',
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
{
label: '设置停站时间',
handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
},
{
label: '设置运行等级',
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
},
{
label: '设置提前发车',
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: '设置折返策略',
handler: this.setBackStrategy,
cmdType:CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
},
{
label: '查询站台状态',
handler: this.detail,
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
}
]
},
menuForce: [
{
label: this.$t('menu.menuStationStand.setFault'),
handler: this.setStoppage,
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
},
{
label: this.$t('menu.menuStationStand.cancelFault'),
handler: this.cancelStoppage,
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !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.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
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();
}
},
//
setStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
setDetainTrain() {
commitOperate(menuOperate.StationStand.setDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrain() {
commitOperate(menuOperate.StationStand.cancelDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrainForce() {
commitOperate(menuOperate.StationStand.cancelDetainTrainForce, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
// 线
cancelDetainTrainAll() {
commitOperate(menuOperate.StationStand.cancelDetainTrainAll, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standDetainTrainAll.doShow(operate, this.selected);
}
});
},
//
setJumpStop() {
commitOperate(menuOperate.StationStand.setJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelJumpStop() {
commitOperate(menuOperate.StationStand.cancelJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setStopTime() {
commitOperate(menuOperate.StationStand.setStopTime, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standStopTime.doShow(operate, this.selected);
}
});
},
//
setRunLevel() {
commitOperate(menuOperate.StationStand.setRunLevel, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standRunLevel.doShow(operate, this.selected);
}
});
},
//
earlyDeparture() {
commitOperate(menuOperate.StationStand.earlyDeparture, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setBackStrategy() {
commitOperate(menuOperate.StationStand.setBackStrategy, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standBackStrategy.doShow(operate, this.selected);
}
});
},
//
detail() {
commitOperate(menuOperate.StationStand.detail, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.standDetail.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -0,0 +1,353 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" />
<switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SwitchControl from './dialog/switchControl';
import SwitchCmdControl from './dialog/switchCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
export default {
name: 'SwitchMenu',
components: {
PopMenu,
SwitchControl,
SwitchCmdControl,
SpeedCmdControl,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
{
label: '道岔单锁',
handler: this.lock,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '道岔单解',
handler: this.unlock,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '道岔封锁',
handler: this.block,
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: '道岔解封',
handler: this.unblock,
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: '道岔转动',
handler: this.switchTurnout,
cmdType:CMD.Switch.CMD_SWITCH_TURN
},
{
label: '故障解锁',
handler: this.fault,
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: '计轴预复位',
handler: this.axlePreReset,
cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
},
{
label: '区段切除',
handler: this.split,
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
label: '区段激活',
handler: this.active,
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
},
{
label: '设置限速',
handler: this.setSpeed,
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
label: '取消限速',
handler: this.cancelSpeed,
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
}
],
Center: [
{
label: '道岔单锁',
handler: this.lock,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '道岔单解',
handler: this.unlock,
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '道岔封锁',
handler: this.block,
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: '道岔解封',
handler: this.unblock,
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: '道岔转动',
handler: this.switchTurnout,
cmdType:CMD.Switch.CMD_SWITCH_TURN
},
{
label: '故障解锁',
handler: this.fault,
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: '区段切除',
handler: this.split,
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
label: '区段激活',
handler: this.active,
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
},
{
label: '设置限速',
handler: this.setSpeed,
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
label: '取消限速',
handler: this.cancelSpeed,
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
}
]
},
menuForce: [
{
label: this.$t('menu.menuSwitch.setFault'),
handler: this.setStoppage,
auth: {
},
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
},
{
label: this.$t('menu.menuSwitch.cancelFault'),
handler: this.cancelStoppage,
auth: {
},
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !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.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
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();
}
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Switch.stoppage.menu.operation,
cmdType: CMD.Switch.CMD_STOPPAGE,
param: {
switchCode: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
param: {
switchCode: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
lock() {
commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
block() {
commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unblock() {
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
switchTurnout() {
commitOperate(menuOperate.Switch.switchTurnout, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
fault() {
commitOperate(menuOperate.Switch.fault, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
axlePreReset() {
commitOperate(menuOperate.Switch.axlePreReset, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
split() {
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
active() {
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
setSpeed() {
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
commitOperate(menuOperate.Switch.cancelSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -0,0 +1,332 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" />
<train-control ref="trainControl" />
<train-delete ref="trainDelete" />
<train-move ref="trainMove" />
<train-switch ref="trainSwitch" />
<train-edit-number ref="trainEditNumber" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import TrainControl from './dialog/trainControl';
import TrainDelete from './dialog/trainDelete';
import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
name: 'MenuTrain',
components: {
PopMenu,
NoticeInfo,
TrainControl,
TrainDelete,
TrainMove,
TrainSwitch,
TrainEditNumber
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [],
Center: [
// {
// label: this.$t('menu.menuTrain.addTrainId'),
// handler: this.addTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.deleteTrainId'),
// handler: this.delTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.editTrainId'),
// handler: this.editTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.editTrainNo'),
// handler: this.editTrainNo,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.moveTrainId'),
// handler: this.moveTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.switchTrainId'),
// handler: this.switchTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// }
]
},
menuForce: [
{
label: this.$t('menu.menuTrain.setCommunicationFault'),
handler: this.setStoppage,
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
},
{
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
handler: this.cancelStoppage,
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
}
],
menuSpeed: [
{
label: this.$t('menu.menuTrain.confirmRunToFrontStation'),
handler: this.limitSpeed,
cmdType:CMD.Train.CMD_TRAIN_MANUAL_LIMIT_DRIVE
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function () {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !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.menuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
}
// this.menu = MenuContextHandler.covert(this.menu);
},
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();
// this.$store.dispatch('map/setTrainWindowShow', false);
}
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.stoppage.menu.operation,
cmdType: CMD.Train.CMD_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.cancelStoppage.menu.operation,
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
limitSpeed() {
const step = {
start: true,
operation: OperationEvent.Train.limitSpeed.menu.operation,
cmdType: CMD.Train.CMD_LIMIT_SPEED,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
addTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.addTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);
}
});
},
//
delTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.delTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(step, this.selected);
}
});
},
//
editTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);
}
});
},
//
editTrainNo() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainNo.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainEditNumber.doShow(step, this.selected);
}
});
},
//
moveTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMove.doShow(step, this.selected);
}
});
},
//
switchTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.switchTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSwitch.doShow(step, this.selected);
}
});
}
}
};
</script>

View File

@ -0,0 +1,218 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm alarm-detail"
:title="level+$t('menu.passiveDialog.alarmDetailInformation')"
:visible.sync="show"
width="760px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form label-width="80px" size="mini">
<el-row>
<el-col :span="8">
<el-form-item :label="$t('menu.passiveDialog.lineName')">
<el-input v-model="model.lineName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('menu.passiveDialog.unitName')">
<el-input v-model="model.unitName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('menu.passiveDialog.moduleName')">
<el-input v-model="model.moduleName" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item :label="$t('menu.passiveDialog.alarmDate')">
<el-date-picker v-model="model.alarmDate" type="datetime" :placeholder="$t('menu.passiveDialog.selectDate')" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item>
<span slot="label">{{ $t('menu.passiveDialog.level') }}</span>
<el-input v-model="model.level" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('menu.passiveDialog.confirmStatus')">
<el-input v-model="model.confirm" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9" class="alarm-type">
<el-form-item>
<span slot="label">{{ $t('menu.passiveDialog.type') }}</span>
<el-input v-model="model.type" disabled />
</el-form-item>
</el-col>
<el-col :span="15" class="alarm-child-type">
<el-form-item :label="$t('menu.passiveDialog.childType')">
<el-input v-model="model.childType" disabled />
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('menu.passiveDialog.timeSummary')">
<el-input v-model="model.timeSummary" disabled />
</el-form-item>
<el-form-item :label="$t('menu.passiveDialog.recommendedOperation')">
<el-input v-model="model.recommendedOperation" disabled />
</el-form-item>
<div class="alarm-detail-description">
<span>{{ $t('menu.passiveDialog.alarmDetailedDescription') }}</span><br>
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" :placeholder="$t('menu.passiveDialog.inputContent')" disabled />
</div>
</el-form>
<el-row class="button-group">
<el-col :span="3" :offset="9">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.confirm') }}</el-button>
</el-col>
<el-col :span="10">
<span style="line-height:26px">{{ $t('menu.passiveDialog.unconfirmedMessageOne') }}{{ level }}{{ $t('menu.passiveDialog.unconfirmedMessageTwo') }}</span>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'AlarmDetail',
data() {
return {
dialogShow: false,
loading: false,
level: 0,
operate: null,
controlProps: {
'01': this.$t('menu.passiveDialog.centralControl'),
'02': this.$t('menu.passiveDialog.stationControl')
},
model: {
lineName: '',
unitName: '',
moduleName: '',
level: '',
confirm: '',
alarmDate: '',
type: '',
childType: '',
timeSummary: '',
recommendedOperation: '',
alarmDetail: ''
}
};
},
computed: {
...mapGetters('map', [
'name'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'resp' && elem.agree) {
if (elem.agree) {
const operate = this.$store.state.training.operate;
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,
currentMode: elem.currentMode
};
this.doShow(newOperate);
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.model = {
lineName: this.name,
unitName: this.operate.name,
moduleName: this.$t('menu.passiveDialog.cmmControlModeConversionMode'),
level: this.$t('menu.passiveDialog.zeroLevelAlarm'),
confirm: this.$t('menu.passiveDialog.confirmStatus'),
alarmDate: new Date(),
type: this.$t('menu.passiveDialog.systemEvent'),
childType: this.$t('menu.passiveDialog.childTypeTips'),
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
recommendedOperation: '',
alarmDetail: `${this.$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${this.$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation')}`
};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
isClose() {
return this.dialogShow;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.alarm-type .el-input {
width: 220px;
}
.alarm-detail-description {
padding-left: 12px;
text-align: left;
}
</style>

View File

@ -0,0 +1,309 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm passive-control"
:title="$t('menu.passiveDialog.controlModeRequest')"
:visible.sync="show"
width="700px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<span class="control-label">{{ `${requestInfo}${$t('menu.passiveDialog.requestAreaControlMode')}` }}</span>
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="250"
center
size="mini"
highlight-current-row
>
<el-table-column prop="operate" :label="$t('menu.passiveDialog.operatingArea')">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template>
</el-table-column>
<el-table-column prop="control" :label="$t('menu.passiveDialog.currentControlMode')" width="120">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span>
</template>
</el-table-column>
<el-table-column prop="target" :label="$t('menu.passiveDialog.requestControlMode')" width="120">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span>
</template>
</el-table-column>
<el-table-column prop="agree" :label="$t('menu.passiveDialog.isAgree')" width="140">
<template slot-scope="scope">
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" />
</template>
</el-table-column>
</el-table>
<span class="control-label">{{ $t('menu.passiveDialog.messageOne') }} {{ count }} {{ $t('menu.passiveDialog.messageTwo') }}</span>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">{{ $t('menu.passiveDialog.agree') }}
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">{{ $t('menu.passiveDialog.refuse') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RequestControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
disabledAgree: false,
disabledRefuse: false,
requestInfo: this.$t('menu.passiveDialog.dispatcherWorkstation'),
controlProps: {
'01': this.$t('menu.passiveDialog.inTheControl'),
'02': this.$t('menu.passiveDialog.stationControl')
},
selection: [],
tableData: [],
timer: null,
timeout: 61,
count: 0,
commandId: ''
};
},
computed: {
targetStatus() {
if (this.$store.state.training.prdType == '01') {
return '01';
}
if (this.$store.state.training.prdType == '02') {
return '02';
}
return '';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
},
domAgree() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
},
domIdRefuse() {
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
}
},
watch: {
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
},
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'req') {
if (elem.stationControlCode) {
this.doShow(elem);
this.commandId = elem.commandId;
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
createTimer() {
this.count = this.timeout;
this.timer = setInterval(() => {
if (this.count <= 0) {
this.doClose();
return;
}
this.count = this.count - 1;
}, 1000);
},
clearTimer() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.agree && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
this.disabledAgree = this.selection.length <= 0;
}
},
updateTableData(code) {
this.tableData = [];
const model = {
code: code,
operate: '',
control: { code: '', name: '' },
target: { code: '', name: '' },
agree: false,
disabled: false
};
const device = this.$store.getters['map/getDeviceByCode'](code);
if (device) {
const control = (device || {}).state;
if (control) {
model.control = { status: control.status, name: this.controlProps[control.status] };
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
}
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
if (station) {
model.operate = station.name || '';
}
}
this.tableData.push(model);
},
doShow(msgHead) {
this.requestInfo = `${msgHead.fromMember.deviceName}`;
if (msgHead.fromMember.nickName) {
this.requestInfo = `${msgHead.fromMember.deviceName}(${msgHead.fromMember.nickName})`;
}
this.dialogShow = true;
this.disabledAgree = true;
this.createTimer();
this.updateTableData(msgHead.stationControlCode);
const operate = {
start: true,
operation: OperationEvent.StationControl.controlResponse.menu.operation
};
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
doClose() {
this.disabledAgree = false;
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.count = 0;
this.dialogShow = false;
this.clearTimer();
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
const codeList = selection.map(elem => { return elem.code; });
const operate = {
operation: OperationEvent.StationControl.controlResponse.choose.operation,
val: codeList.join('::')
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(this.$t('menu.passiveDialog.selectData'));
}
},
agree() {
const operate = {
start: true,
operation: OperationEvent.StationControl.controlResponse.agree.operation,
code: this.tableData[0].code,
val: this.commandId,
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
param: {
ControlMode_Code: this.tableData[0].code,
Reply_Command_Id: this.commandId,
ControlMode_Reply: true
}
};
this.clearTimer();
this.disabledAgree = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
refuse() {
const operate = {
start: true,
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
code: this.tableData[0].code,
val: this.commandId,
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
param: {
ControlMode_Code: this.tableData[0].code,
Reply_Command_Id: this.commandId,
ControlMode_Reply: false
}
};
this.clearTimer();
this.disabledAgree = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.control-label {
line-height: 30px;
font-size: 18px;
}
</style>

View File

@ -0,0 +1,111 @@
<template>
<el-dialog
v-dialogDrag
class="xian-01__systerm cmd-notice"
:title="$t('menu.passiveDialog.operationCommandTips')"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<span>{{ name }}{{ msg }}!</span>
<el-row class="button-group">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.operationConfirm') }}</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'CmdNotice',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
name: '',
msg: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
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 = {
name: station.name
};
if (elem.timeout) {
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
this.doShow(newOperate);
} else if (!elem.agree) {
newOperate['msg'] = this.$t('menu.passiveDialog.requestRejection');
this.doShow(newOperate);
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.name = this.operate.name || '';
this.msg = this.operate.msg || '';
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
isClose() {
return this.dialogShow;
}
}
};
</script>

View File

@ -0,0 +1,25 @@
<template>
<div id="statusDownTrainDetail" />
</template>
<script>
export default {
name: 'StatusDownTrainDetail',
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
};
},
mounted() {
}
};
</script>
<style>
</style>

View File

@ -0,0 +1,26 @@
<template>
<div id="statusUpTrainDetail" />
</template>
<script>
export default {
name: 'StatusUpTrainDetail',
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
};
},
mounted() {
}
};
</script>
<style>
</style>

View File

@ -0,0 +1,570 @@
import store from '@/store/index_APP_TARGET';
import deviceState from '@/jmap/constant/deviceState';
import { OperateMode } from '@/scripts/ConstDic';
export function getCurrentStateObject() {
return store.getters['menuOperation/selected'];
}
/** 系统类型 */
export const State2SimulationMap = {
'01': 'local', // 现地工作站
'02': 'central' // 中心调度工作站
};
export const State2ControlMap = {
'01': 'center', // 中控
'02': 'station', // 站控
'03': 'station'
};
// 控制禁用
export const MenuDisabledState = {
Section: {
// 故障解锁
fault() {
},
// 切除
split() {
const device = getCurrentStateObject();
if (device && device.cutOff != deviceState.Section.cutOff.Default) {
return true;
}
},
// 激活
active() {
const device = getCurrentStateObject();
if (device && device.cutOff == deviceState.Section.cutOff.Default) {
return true;
}
},
// 区段封锁
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Section.status.State06) {
return true;
}
},
// 区段解禁
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Section.status.State06) {
return true;
}
},
// 区段设置限速
setSpeed() {
const device = getCurrentStateObject();
if (device && device.speedUpperLimit != deviceState.Section.speedUpperLimit.Default) {
return true;
}
},
// 区段取消限速
cancelSpeed() {
const device = getCurrentStateObject();
if (device && device.speedUpperLimit == deviceState.Section.speedUpperLimit.Default) {
return true;
}
},
// 新建列车
newTrain() {
},
// 计轴预复位
axlePreReset() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Signal: {
// 进路选排
arrangementRoute() {
},
// 进路取消
cancelTrainRoute() {
},
// 信号封闭
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Signal.status.State05) {
return true;
}
},
// 信号解封
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Signal.status.State05) {
return true;
}
},
// 信号重开
reopenSignal() {
},
// 进路引导
guide() {
},
// 设置联锁自动进路
setAutoInterlock() {
},
// 取消联锁自动进路
cancelAutoInterlock() {
},
// 设置联锁自动触发
setAutoTrigger() {
},
// 取消联锁自动触发
cancelAutoTrigger() {
},
// 关灯
signalClose() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Signal.status.State01) {
return true;
}
},
// 人工控
humanControl() {
},
// ats自动控
atsAutoControl() {
},
// 查询进路状态
detail() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Station: {
// 全站设置联锁自动触发
setAutoTrigger() {
},
// 全站取消联锁自动触发
cancelAutoTrigger() {
},
// 上电解锁
powerUnLock() {
},
// 执行关键操作测试
execKeyOperationTest() {
},
// 所有进路自排开
atsAutoControlALL() {
},
// 所有进路自排关
humanControlALL() {
},
// 设置ZC故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消ZC故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
StationControl: {
// 紧急站控
emergencyStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State03) {
return true;
}
},
// 请求站控
requestStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State02) {
return true;
}
},
// 强行站控
forcedStationControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State02) {
return true;
}
},
// 请求中控
requestCentralControl() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.StationControl.status.State01) {
return true;
}
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
StationStand: {
// 设置扣车
setDetainTrain() {
const device = getCurrentStateObject();
if (store.state.training.prdType == '02') { // 中心行调模式
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
return true;
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State03) {
return true;
}
} else { // 现地模式
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
return true;
} else if (device && device.holdStatus == deviceState.StationStand.holdStatus.State02) {
return true;
}
}
},
// 取消扣车
cancelDetainTrain() {
const device = getCurrentStateObject();
if (store.state.training.prdType == '02') {
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
return false;
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State03) {
return true;
}
} else {
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State04) {
return false;
} else if (device && device.holdStatus != deviceState.StationStand.holdStatus.State02) {
return true;
}
}
},
// 强制取消扣车
cancelDetainTrainForce() {
const device = getCurrentStateObject();
if (device && device.holdStatus == deviceState.StationStand.holdStatus.State01) {
return true;
}
},
// 设置全站扣车
cancelDetainTrainAll() {
},
// 设置运行等级
setRunLevel() {
},
// 设置停站时间
setStopTime() {
},
// 设置跳停
setJumpStop() {
const device = getCurrentStateObject();
if (device && device.jumpStopStatus != deviceState.StationStand.jumpStopStatus.State01) {
return true;
}
},
// 取消跳停
cancelJumpStop() {
const device = getCurrentStateObject();
if (device && device.jumpStopStatus == deviceState.StationStand.jumpStopStatus.State01) {
return true;
}
},
// 提前发车
earlyDeparture() {
},
// 站台详细信息
detail() {
},
// 设置折返策略
setBackStrategy() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Switch: {
// 单锁
lock() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Switch.status.State10) {
return true;
}
},
// 解锁
unlock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Switch.status.State10) {
return true;
}
},
// 封锁
block() {
const device = getCurrentStateObject();
if (device && device.status == deviceState.Switch.status.State14) {
return true;
}
},
// 解封
unblock() {
const device = getCurrentStateObject();
if (device && device.status != deviceState.Switch.status.State14) {
return true;
}
},
// 强扳
switchTurnoutForce() {
},
// 转动
switchTurnout() {
},
// 道岔故障解锁
fault() {
},
// 计轴预复位
axlePreReset() {
},
// 道岔切除
split() {
},
// 道岔激活
active() {
},
// 道岔设置速度
setSpeed() {
// const device = getCurrentStateObject();
},
// 道岔取消速度
cancelSpeed() {
},
// 设置故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
},
Train: {
// 添加列车识别号
addTrainId() {
},
// 删除列车识别号
delTrainId() {
},
// 修改列车识别号
editTrainId() {
},
// 修改车组号
editTrainNo() {
},
// 移动列车识别号
moveTrainId() {
},
// 交换列车识别号
switchTrainId() {
},
// 设置限速
limitSpeed() {
},
// 设置通信故障
setStoppage() {
const device = getCurrentStateObject();
if (device && device.fault) {
return true;
}
},
// 取消通信故障
cancelStoppage() {
const device = getCurrentStateObject();
if (device && !device.fault) {
return true;
}
}
}
};
export function checkOperationValidity() {
if (store.state.training.prdType == '02') {
return true;
}
}
/**
* 将menu的disabled属性使用disabledCallback计算并返回
* @param {Array} menu
*/
export function menuConvert(menu) {
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
if (elem.disabledCallback.constructor === Function) {
elem.disabled = elem.defaultDisabled;
if (!elem.defaultDisabled) {
elem.disabled = elem.disabledCallback();
}
}
});
}
return menu;
}
/**
* 根据产品类型返回对应的menuBar
* @param {*} menuObj
*/
export function menuBarConvert(menu, mode) {
if (menu) {
if (mode === OperateMode.NORMAL) {
menu.forEach(item => {
if (item.type === 'separator') {
item.show = true;
return;
}
item.show = false;
if (!item.click) {
item.click = () => { };
}
if (!item.froce) {
item.show = true;
if (item.children && item.children.length > 0) {
menuBarConvert(item.children, mode);
}
}
});
} else if (mode === OperateMode.ADMIN) {
menu.forEach(item => {
item.show = true;
if (!item.click) {
item.click = () => { };
}
if (item.children && item.children.length > 0) {
menuBarConvert(item.children, mode);
}
});
}
}
return menu || [];
}
/**
* 将menu的show属性过滤返回
* @param {Array} menu
*/
export function menuFiltration(menuObj) {
var selected = getCurrentStateObject();
var control;
var menu = [];
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
}
if (control) {
if (store.state.training.prdType != '') {
const type = State2SimulationMap[store.state.training.prdType];
const status = State2ControlMap[control.status];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
return;
}
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
elem.defaultDisabled = !elem.auth[status];
}
});
}
}
}
return menu;
}
/**
* 将train menu的show属性过滤返回
*/
export function trainMenuFiltration(menuObj) {
var menu = [];
if (store.state.training.prdType != '') {
const type = State2SimulationMap[store.state.training.prdType];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
}
});
}
}
return menu;
}

View File

@ -0,0 +1,302 @@
import store from '@/store/index_APP_TARGET';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// 操作
export const menuOperate = {
Section:{
split:{
// 区段切除
operation: OperationEvent.Section.split.menu.operation,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
},
active:{
// 区段激活
operation: OperationEvent.Section.active.menu.operation,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
lock: {
// 区段封锁
operation: OperationEvent.Section.lock.menu.operation,
cmdType: CMD.Section.CMD_SECTION_BLOCK
},
unlock: {
// 区段解封
operation: OperationEvent.Section.unlock.menu.operation,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
},
alxeEffective:{
// 确认计轴有效
operation: OperationEvent.Section.alxeEffective.menu.operation,
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
},
setSpeed:{
// 设置速度
operation: OperationEvent.Section.setSpeed.menu.operation,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
},
cancelSpeed: {
// 取消限速
operation: OperationEvent.Section.cancelSpeed.menu.operation,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
},
axlePreReset:{
// 区段计轴预复位
operation: OperationEvent.Section.axlePreReset.menu.operation,
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
},
fault:{
// 区段故障解锁
operation: OperationEvent.Section.fault.menu.operation,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
}
},
Signal:{
arrangementRoute:{
// 排列进路
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
cancelTrainRoute:{
// 取消进路
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
lock:{
// 信号封锁
operation:OperationEvent.Signal.lock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
unlock:{
// 信号解封
operation: OperationEvent.Signal.unlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
guide:{
// 进路引导
operation: OperationEvent.Signal.guide.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
reopenSignal:{
// 信号重开
operation: OperationEvent.Signal.reopenSignal.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
signalClose:{
// 信号关灯
operation: OperationEvent.Signal.signalClose.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
},
humanControl:{
// 进路交人工控
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
atsAutoControl:{
// 进路交自动控
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
setAutoInterlock:{
// 设置通过模式
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
cancelAutoInterlock:{
// 取消通过模式
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
detail:{
// 查询进路状态
operation: OperationEvent.Signal.detail.menu.operation
},
cancelGuide:{
// 人工解锁进路(信号机取消引导)
operation: OperationEvent.Signal.cancelGuide.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
},
setAutoTurnBack:{
// 设置自动折返
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
},
cancelAutoTurnBack:{
// 取消自动折返
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
}
},
Switch:{
lock:{
// 道岔单锁
operation: OperationEvent.Switch.lock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
unlock:{
// 道岔解锁
operation: OperationEvent.Switch.unlock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
block: {
// 道岔封锁
operation: OperationEvent.Switch.block.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
},
unblock: {
// 道岔解封
operation: OperationEvent.Switch.unblock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
switchTurnout: {
// 道岔转动
operation: OperationEvent.Switch.turnout.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_TURN
},
fault: {
// 故障解锁
operation: OperationEvent.Switch.fault.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
split:{
// 区段切除
operation: OperationEvent.Switch.split.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
},
active:{
// 区段激活
operation: OperationEvent.Switch.active.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
},
setSpeed:{
// 设置临时限速
operation: OperationEvent.Switch.setSpeed.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
cancelSpeed: {
// 取消临时限速
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
cmdType:CMD.Switch.CMD_CANCEL_SPEED
},
alxeEffective:{
// 确认计轴有效
operation: OperationEvent.Switch.alxeEffective.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
},
axlePreReset:{
// 计轴预复位
operation: OperationEvent.Switch.axlePreReset.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
}
},
StationStand:{
setDetainTrain:{
// 设置扣车
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
cancelDetainTrain:{
// 取消扣车
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
cancelDetainTrainForce: {
// 强制取消扣车
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
},
cancelDetainTrainAll: {
// 全线取消扣车
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
},
setJumpStop:{
// 设置跳停
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
cancelJumpStop:{
// 取消跳停
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
setStopTime:{
// 停站时间控制
operation: OperationEvent.StationStand.setStopTime.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
},
setRunLevel:{
// 运行时间控制
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
},
earlyDeparture:{
// 设置提前发车
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
},
setBackStrategy:{
// 设置折返策略
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
},
detail:{
// 查询站台状态
operation: OperationEvent.StationStand.detail.menu.operation
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
}
},
StationControl:{
requestCentralControl:{
// 请求中控(遥控)
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
},
requestStationControl:{
// 请求站控
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
emergencyStationControl:{
// 紧急站控
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
}
}
};
export function commitOperate(operate, paramList, over, val) {
const step = {
start: true,
operation: operate.operation,
param:{}
};
step.param = paramList;
if (val) {
step['val'] = val;
}
// over 0为首次操作1为中间操作2为最后操作3为直接一次性操作
if (over == 0 || over == 3) {
const codeList = Object.values(paramList);
step.code = codeList[0];
}
if (over != 0 && over != 3) {
delete step.start;
}
if (over == 2 || over == 3) {
step.over = true;
step.cmdType = operate.cmdType;
}
return new Promise(function(resolve, reject) {
store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
resolve({ valid: valid, operate: step });
}).catch(error=>{
reject(error);
});
});
}

View File

@ -0,0 +1,73 @@
import deviceType from '../../constant/deviceType';
class Model {
constructor() {
this.screenLine = 3;
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
lampPositionType: '02',
lampPostType: '02'
};
// 私有字段部分默认初始值
this['private'] = {};
this['private'][deviceType.StationControl] = {
indicatorShow: true // 标识灯名称显示
};
this['private'][deviceType.Station] = {
kmPostShow: true // 公里标显示
};
this['private'][deviceType.Switch] = {
nameShow: true
};
this['private'][deviceType.Section] = {
nameShow: true,
borderBorderShow: true, // 区段边界显示
destinationNameShow: true, // 目的地码名称显示
standTrackNameShow: true, // 站台轨名称显示
reentryTrackNameShow: true, // 折返轨名称显示
transferTrackNameShow: true // 转换轨名称显示
};
this['private'][deviceType.Signal] = {
nameShow: true, // 信号机名称显示
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true
};
}
initPublicProps(model) {
if (model) {
var modelInitial = this.public[model._type];
if (modelInitial) {
for (var prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
initPrivateProps(model) {
if (model) {
var modelInitial = this.private[model._type];
if (modelInitial) {
for (var prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
}
export default new Model();

View File

@ -0,0 +1,849 @@
// 操作规则定义
// {id: "1", trainingType: "01", name: "车站名称"}
// {id: "2", trainingType: "01", name: "车站控制模式编号"}
// {id: "3", trainingType: "02", name: "进路名称"}
// {id: "4", trainingType: "02", name: "进路编号"}
// {id: "5", trainingType: "02", name: "信号机名称"}
// {id: "6", trainingType: "02", name: "信号机编号"}
// {id: "7", trainingType: "03", name: "道岔名称"}
// {id: "17", trainingType: "03", name: "道岔编码"}
// {id: "15", trainingType: "03", name: "道岔位置"}
// {id: "16", trainingType: "03", name: "道岔位置(反)"}
// {id: "21", trainingType: "03", name: "车站名称"}
// {id: "23", trainingType: "03", name: "车站编号"}
// {id: "24", trainingType: "03", name: "道岔计轴区段编号"}
// {id: "25", trainingType: "03", name: "道岔计轴区段名称"}
// {id: "8", trainingType: "04", name: "物理区段名称"}
// {id: "9", trainingType: "04", name: "逻辑区段名称"}
// {id: "18", trainingType: "04", name: "逻辑区段编码"}
// {id: "19", trainingType: "04", name: "区段编号"}
// {id: "20", trainingType: "04", name: "车站名称"}
// {id: "22", trainingType: "04", name: "车站编号"}
// {id: "10", trainingType: "05", name: "车站名称"}
// {id: "11", trainingType: "05", name: "站台行驶方向编号"}
// {id: "12", trainingType: "05", name: "站台行驶方向"}
// {id: "13", trainingType: "05", name: "站台行驶方向编号(反)"}
// {id: "14", trainingType: "05", name: "站台行驶方向(反)"}
export default {
list: [
{
maxDuration: 20,
minDuration: 15,
operateType: '0103',
skinCode: '02',
trainingName: '转为中控({1})',
trainingRemark: '控制权限转换,站控转中控',
trainingType: '01',
productTypes: ['02'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2041', tip: '鼠标左键点击【转为中控】' },
{ deviceType: '05', orderNum: 3, operateCode: '2042', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '204', tip: '鼠标左键点击【请求中控】', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '2043', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0101',
skinCode: '02',
trainingName: '转为站控({1})',
trainingRemark: '控制权限转换,中控转站控',
trainingType: '01',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2021', tip: '鼠标左键点击【转为站控】' },
{ deviceType: '05', orderNum: 3, operateCode: '2022', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '202', tip: '鼠标左键点击【请求站控】', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '2023', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0102',
skinCode: '02',
trainingName: '强制站控({1})',
trainingRemark: '控制权限转换,强制站控',
trainingType: '01',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: '鼠标左键点击顶部菜单栏【控制模式转换】' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2034', tip: '鼠标左键点击【强制站控】' },
{ deviceType: 'bar', orderNum: 3, operateCode: '2035', tip: '鼠标左键输入默认密码【123456】后点击【确定】按钮' },
{ deviceType: '05', orderNum: 4, operateCode: '2032', tip: '鼠标左键选择所需要转换的控制区域【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '203', tip: '鼠标左键点击【强制站控】', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '2033', tip: '鼠标左键点击【确认】按钮', val: '{2}' },
{ deviceType: '05', orderNum: 7, operateCode: '0013', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: 'bar', orderNum: 8, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0501',
skinCode: '02',
trainingName: '站台扣车({10}-{12}站台)',
trainingRemark: '设置扣车功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0502',
skinCode: '02',
trainingName: '站台取消扣车({10}-{12}站台)',
trainingRemark: '设置取消扣车功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0503',
skinCode: '02',
trainingName: '强制取消扣车({10}-{12}站台)',
trainingRemark: '强制取消扣车功能',
trainingType: '05',
productTypes: ['01'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '506', tip: '鼠标右键菜单选择【强制取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '506', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0504',
skinCode: '02',
trainingName: '全线取消扣车({10}-{12}站台)',
trainingRemark: '全线取消扣车功能(默认上行全线/下行全线,不做选择)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0504',
skinCode: '02',
trainingName: '全线取消扣车({10}-{12}站台)',
trainingRemark: '全线取消扣车功能(选择上/下行全线)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: '鼠标右键菜单选择【全线取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '5081', tip: '鼠标右键菜单选择【{14}全线】', val: '{13}' },
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮', val: '{13}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0505',
skinCode: '02',
trainingName: '站台跳停({10}-{12}站台)',
trainingRemark: '设置跳停功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0506',
skinCode: '02',
trainingName: '取消跳停({10}-{12}站台)',
trainingRemark: '设置取消跳停功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType: '0507',
skinCode: '02',
trainingName: '查询站台状态({10}-{12}站台)',
trainingRemark: '查询站台状态功能',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【查询站台状态】' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '02',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(自动, 一直有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' },
{ deviceType: '06', orderNum: 4, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '02',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(人工, 20秒, 一直有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' },
{ deviceType: '06', orderNum: 5, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '02',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(人工, 20秒, 一次有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' },
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' },
{ deviceType: '06', orderNum: 6, operateCode: '5091', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '02',
trainingName: '设置运行等级({10}-{12}站台)',
trainingRemark: '设置运行等级(设置区间运行时间为60一直有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击选择【60】', val: '60' },
{ deviceType: '06', orderNum: 3, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::true' },
{ deviceType: '06', orderNum: 4, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '02',
trainingName: '设置运行等级({10}-{12}站台)',
trainingRemark: '设置运行等级(设置区间运行时间为60一次有效)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: '鼠标左键点击选择【60】', val: '60' },
{ deviceType: '06', orderNum: 3, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '60::false' },
{ deviceType: '06', orderNum: 5, operateCode: '5102', tip: '鼠标左键点击【确认】按钮', val: '60::false' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0510',
skinCode: '02',
trainingName: '设置提前发车({10}-{12}站台)',
trainingRemark: '设置提前发车功能',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '501', tip: '鼠标右键菜单选择【设置提前发车】' },
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0511',
skinCode: '02',
trainingName: '人工折返策略设置({10}-{12}站台)',
trainingRemark: '人工折返策略设置功能',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【人工折返策略设置】' },
{ deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0401',
skinCode: '02',
trainingName: '区段故障解锁({8}{9})',
trainingRemark: '故障解锁功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区段故障解锁】' },
{ deviceType: '03', orderNum: 2, operateCode: '4026', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4024', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4025', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0402',
skinCode: '02',
trainingName: '区段切除({8}{9})',
trainingRemark: '区段切除',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0403',
skinCode: '02',
trainingName: '区段激活({8}{9})',
trainingRemark: '区段激活功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0404',
skinCode: '02',
trainingName: '计轴预复位({8}{9})',
trainingRemark: '计轴预复位功能',
trainingType: '04',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '409', tip: '鼠标右键菜单选择【区段计轴预复位】' },
{ deviceType: '03', orderNum: 2, operateCode: '4091', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4093', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4094', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0405',
skinCode: '02',
trainingName: '区段封锁({8}{9})',
trainingRemark: '区段封锁功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' },
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0406',
skinCode: '02',
trainingName: '区段解封({8}{9})',
trainingRemark: '区段解封功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '404', tip: '鼠标右键菜单选择【区段解封】' },
{ deviceType: '03', orderNum: 2, operateCode: '4041', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4043', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4044', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0407',
skinCode: '02',
trainingName: '区段设置限速({8}{9})',
trainingRemark: '区段设置限速功能限速值5',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【区段设置限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值5】', val: '5' },
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '5' },
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0408',
skinCode: '02',
trainingName: '区段取消限速({8}{9})',
trainingRemark: '区段取消限速功能',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【区段取消限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4081', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4082', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4083', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4084', tip: '鼠标左键点击【确认2】按钮', val: '5' },
{ deviceType: '03', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0301',
skinCode: '02',
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0302',
skinCode: '02',
trainingName: '道岔单解({7})',
trainingRemark: '道岔单解功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
{ deviceType: '02', orderNum: 2, operateCode: '1041', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1043', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1044', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0303',
skinCode: '02',
trainingName: '道岔区段封闭({7})',
trainingRemark: '道岔区段封闭功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔区段封闭】' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0304',
skinCode: '02',
trainingName: '道岔区段解封({7})',
trainingRemark: '道岔区段解封功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔区段解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '1061', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1063', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1064', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
skinCode: '02',
trainingName: '道岔转动({7})',
trainingRemark: '道岔转动功能({15}转{16})',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '107', tip: '鼠标右键菜单选择【道岔转动】' },
{ deviceType: '02', orderNum: 2, operateCode: '107', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 20,
minDuration: 10,
operateType: '0306',
skinCode: '02',
trainingName: '道岔区段故障解锁({7})',
trainingRemark: '道岔区段故障解锁功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【道岔区段故障解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1091', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1093', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1094', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0307',
skinCode: '02',
trainingName: '道岔区段计轴预复位({7})',
trainingRemark: '道岔区段计轴预复位功能',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '110', tip: '鼠标右键菜单选择【道岔区段计轴预复位】' },
{ deviceType: '02', orderNum: 2, operateCode: '1101', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1103', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1104', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0308',
skinCode: '02',
trainingName: '区段切除({7})',
trainingRemark: '区段切除',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0309',
skinCode: '02',
trainingName: '区段激活({7})',
trainingRemark: '区段激活功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0310',
skinCode: '02',
trainingName: '道岔区段设置限速({7})',
trainingRemark: '道岔区段设置限速功能限速值5',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【道岔区段设置限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值5】', val: '5' },
{ deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '5' },
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0311',
skinCode: '02',
trainingName: '道岔区段取消限速({7})',
trainingRemark: '道岔区段取消限速功能',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '114', tip: '鼠标右键菜单选择【道岔区段取消限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1141', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1142', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1143', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '1144', tip: '鼠标左键点击【确认2】按钮', val: '5' },
{ deviceType: '02', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0201',
skinCode: '02',
trainingName: '进路选排({3})',
trainingRemark: '选择排列进路',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【进路选排】' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '3012', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '02',
trainingName: '进路取消({3})',
trainingRemark: '进路取消',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3031', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '02',
trainingName: '进路取消({3})',
trainingRemark: '进路取消',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【进路取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0203',
skinCode: '02',
trainingName: '信号封闭({5})',
trainingRemark: '信号封闭',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0204',
skinCode: '02',
trainingName: '信号解封({5})',
trainingRemark: '信号解封',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '3071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '3073', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '04', orderNum: 5, operateCode: '3074', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '04', orderNum: 6, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0205',
skinCode: '02',
trainingName: '信号关灯({3})',
trainingRemark: '信号关灯',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '313', tip: '鼠标右键菜单选择【信号关灯】' },
{ deviceType: '04', orderNum: 2, operateCode: '313', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3131', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0206',
skinCode: '02',
trainingName: '信号重开({3})',
trainingRemark: '信号重开',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3041', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0207',
skinCode: '02',
trainingName: '引导进路办理({3})',
trainingRemark: '进路办理信号引导',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【引导进路办理】' },
{ deviceType: '04', orderNum: 2, operateCode: '3081', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3083', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '3084', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '04', orderNum: 5, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0208',
skinCode: '02',
trainingName: '自排开({5})',
trainingRemark: '自排开',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【自排开】' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择控制状态为"人工"的进路', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0209',
skinCode: '02',
trainingName: '自排关({5})',
trainingRemark: '自排关',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【自排关】' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择第一条进路', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0210',
skinCode: '02',
trainingName: '查询进路控制状态({5})',
trainingRemark: '查询进路控制状态',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制模式】' },
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0211',
skinCode: '02',
trainingName: '设置联锁自动进路({5})',
trainingRemark: '设置联锁自动进路',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置联锁自动进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0212',
skinCode: '02',
trainingName: '取消联锁自动进路({5})',
trainingRemark: '取消联锁自动进路',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消联锁自动进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0213',
skinCode: '02',
trainingName: '设置联锁自动触发({5})',
trainingRemark: '设置联锁自动触发',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '311', tip: '鼠标右键菜单选择【设置联锁自动触发】' },
{ deviceType: '04', orderNum: 2, operateCode: '311', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0214',
skinCode: '02',
trainingName: '取消联锁自动触发({5})',
trainingRemark: '取消联锁自动触发',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '312', tip: '鼠标右键菜单选择【取消联锁自动触发】' },
{ deviceType: '04', orderNum: 2, operateCode: '312', tip: '鼠标左键点击【确定】按钮' }
]
}
]
};

View File

@ -0,0 +1,820 @@
export default {
list: [
{
maxDuration: 20,
minDuration: 15,
operateType: '0103',
skinCode: '05',
trainingName: 'Switch to central control ({1})',
trainingRemark: 'Control permission conversion, switch station control to central control',
trainingType: '01',
productTypes: ['02'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2041', tip: 'Left click [switch to central control] ' },
{ deviceType: '05', orderNum: 3, operateCode: '2042', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '204', tip: 'Left click [request to central control] ', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '2043', tip: 'Left click [confirm]', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: 'Left click [confirm]' },
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: 'Left click [close] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0101',
skinCode: '05',
trainingName: 'Switch to station control ({1})',
trainingRemark: 'Control permission conversion, Force to station control',
trainingType: '01',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2021', tip: 'Left click [switch to station control' },
{ deviceType: '05', orderNum: 3, operateCode: '2022', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '202', tip: 'Left click [request to station control', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '2023', tip: 'Left click [confirm] ', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '0013', tip: 'Left click [confirm] ' },
{ deviceType: 'bar', orderNum: 7, operateCode: '000', tip: 'Left click [close] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0102',
skinCode: '05',
trainingName: 'Force to station control ({1})',
trainingRemark: 'Control permission conversion,Force to station control',
trainingType: '01',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '0024', tip: 'Left click the menu bar [control mode conversion]on the top' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2034', tip: 'Left click[Force to station control]' },
{ deviceType: 'bar', orderNum: 3, operateCode: '2035', tip: 'Left click to input the password [123456],then left click the [confirm]' },
{ deviceType: '05', orderNum: 4, operateCode: '2032', tip: 'Left click to select the control area to be converted【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 5, operateCode: '203', tip: 'Left click [Foece to station control', val: '{2}' },
{ deviceType: '05', orderNum: 6, operateCode: '2033', tip: 'Left click [confirm] ', val: '{2}' },
{ deviceType: '05', orderNum: 7, operateCode: '0013', tip: 'Left click [confirm] ' },
{ deviceType: 'bar', orderNum: 8, operateCode: '000', tip: 'Left click [close] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0501',
skinCode: '05',
trainingName: 'Detain Train({10}-{12}station)',
trainingRemark: 'Set the detaining function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: 'Right click to select [Detain Train]' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0502',
skinCode: '05',
trainingName: 'Cancel Detaining({10}-{12}The platform)',
trainingRemark: 'Set cancelling detaining function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: 'Right click to select [Cancel Detaining]]' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0503',
skinCode: '05',
trainingName: 'Force Canceling Detaining({10}-{12}The platform)',
trainingRemark: 'Force to cancel train detaining function',
trainingType: '05',
productTypes: ['01'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '506', tip: 'Right click to select [Force Canceling Detaining]' },
{ deviceType: '06', orderNum: 2, operateCode: '506', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0504',
skinCode: '05',
trainingName: 'Cancel train detaining along the whole line({10}-{12}The platform)',
trainingRemark: 'Cancel train detaining along the whole line (default the whole uplink and downlink )',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: 'Right click to select [Cancel train detaining along the whole line]' },
{ deviceType: '06', orderNum: 2, operateCode: '508', tip: 'Left click [confirm] ', val: '{11}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0504',
skinCode: '05',
trainingName: 'Cancel train detaining along the whole line({10}-{12}The platform)',
trainingRemark: 'Cancel train detaining along the whole line (select the uplink or downlink ))',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '508', tip: 'Right click to select [Cancel train detaining along the whole line]' },
{ deviceType: '06', orderNum: 2, operateCode: '5081', tip: 'Right click to select[{14}the whole line', val: '{13}' },
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: 'Left click [confirm]', val: '{13}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0505',
skinCode: '05',
trainingName: 'Skip this station to continue moving({10}-{12}The platform)',
trainingRemark: 'Set the skip to continue moving function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: 'Right click to select [Skip this station to continue moving]' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: 'Left click [confirm]', val: '{11}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0506',
skinCode: '05',
trainingName: 'Cancel skiping({10}-{12}The platform)',
trainingRemark: 'Set cancelling skiping function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: 'Right click to select [Cancel skiping]' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: 'Left click [confirm]', val: '{11}' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType: '0507',
skinCode: '05',
trainingName: 'Query Platform status({10}-{12}The platform)',
trainingRemark: 'Query platform status function',
trainingType: '05',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: 'Right click to select [Query Platform status]' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '05',
trainingName: 'Set the stop time({10}-{12}The platform)',
trainingRemark: 'Set the stop time (auto, permanent validity)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [auto]', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: 'Left click [confirm] ', val: '01::20::true' },
{ deviceType: '06', orderNum: 4, operateCode: '5091', tip: 'Left click [confirm] ', val: '01::20::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '05',
trainingName: 'Set the stop time({10}-{12}The platform)',
trainingRemark: 'Set the stop time (manual, 20 seconds, permanent validity)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [manual]', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: 'Set time [20]', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: 'Left click [confirm] ', val: '02::20::true' },
{ deviceType: '06', orderNum: 5, operateCode: '5091', tip: 'Left click [confirm]', val: '02::20::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0508',
skinCode: '05',
trainingName: 'Set the stop time({10}-{12}The platform)',
trainingRemark: 'Set the stop time (manual, 20 seconds, once valid )',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: 'Right click to select [Set the stop time]' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: 'Left click to select [manual]', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: 'Set time [20]', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: 'Left click to select "once valid ".', val: 'false' },
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: 'Left click [confirm] ', val: '02::20::false' },
{ deviceType: '06', orderNum: 6, operateCode: '5091', tip: 'Left click [confirm] ', val: '02::20::false' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '05',
trainingName: 'Set Operation speed Level({10}-{12}The platform)',
trainingRemark: 'Set Operation speed Level(set the interval running time to 60, permanent validity)',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: 'Right click to select [Set Operation speed Level]' },
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: 'Left click to select [60]', val: '60' },
{ deviceType: '06', orderNum: 3, operateCode: '510', tip: 'Left click [confirm] ', val: '60::true' },
{ deviceType: '06', orderNum: 4, operateCode: '5102', tip: 'Left click [confirm] ', val: '60::true' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0509',
skinCode: '05',
trainingName: 'Set Operation speed Level({10}-{12}The platform)',
trainingRemark: 'Set Operation speed Level (set the interval running time to 60, once valid )',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: 'Right click to select [Set Operation speed Level]' },
{ deviceType: '06', orderNum: 2, operateCode: '5101', tip: 'Left click to select [60]', val: '60' },
{ deviceType: '06', orderNum: 3, operateCode: '5103', tip: 'Left click to cancel [permanent validity].', val: 'false' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: 'Left click [confirm] ', val: '60::false' },
{ deviceType: '06', orderNum: 5, operateCode: '5102', tip: 'Left click [confirm] ', val: '60::false' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0510',
skinCode: '05',
trainingName: 'Set departure in advance({10}-{12}The platform)',
trainingRemark: 'Set departure inadvance function',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '501', tip: 'Right click to select [Set departure in advance]' },
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0511',
skinCode: '05',
trainingName: 'Manual return strategy setting({10}-{12}The platform)',
trainingRemark: 'Manual return strategy setting function',
trainingType: '05',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '511', tip: 'Right click to select [Manual return strategy setting]' },
{ deviceType: '06', orderNum: 2, operateCode: '5111', tip: 'Left click to select [No return]".', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: 'Left click [confirm] ', val: '01' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0401',
skinCode: '05',
trainingName: 'Section fault unlocking({8}{9})',
trainingRemark: 'Fault unlocking',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: 'Right click to select [Section fault unlocking]' },
{ deviceType: '03', orderNum: 2, operateCode: '4026', tip: 'Left click [Execute] ' },
{ deviceType: '03', orderNum: 3, operateCode: '4024', tip: 'Left click [ok 1] ' },
{ deviceType: '03', orderNum: 4, operateCode: '4025', tip: 'Left click [ok 2] ' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0402',
skinCode: '05',
trainingName: 'Section resection({8}{9})',
trainingRemark: 'Section resection',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: 'Right click to select [Section resection]' },
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0403',
skinCode: '05',
trainingName: 'Section activation({8}{9})',
trainingRemark: 'Section activation function',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: 'Right click to select [Section activation]' },
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0404',
skinCode: '05',
trainingName: 'Axis pre-reset({8}{9})',
trainingRemark: 'Axis pre-reset function',
trainingType: '04',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '409', tip: 'Right click to select [Axis pre-reset]' },
{ deviceType: '03', orderNum: 2, operateCode: '4091', tip: 'Left click [Execute]' },
{ deviceType: '03', orderNum: 3, operateCode: '4093', tip: 'Left click [confirm1]' },
{ deviceType: '03', orderNum: 4, operateCode: '4094', tip: 'Left click [confirm2]' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0405',
skinCode: '05',
trainingName: 'Section blockade({8}{9})',
trainingRemark: 'Section blockade function',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: 'Right click to select [Section blockade]' },
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0406',
skinCode: '05',
trainingName: 'Section unblockade({8}{9})',
trainingRemark: 'Section unblockade function',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '404', tip: 'Right click to select [Section unblockade]' },
{ deviceType: '03', orderNum: 2, operateCode: '4041', tip: 'Left click [Execute]' },
{ deviceType: '03', orderNum: 3, operateCode: '4043', tip: 'Left click [confirm1]' },
{ deviceType: '03', orderNum: 4, operateCode: '4044', tip: 'Left click [confirm2]' },
{ deviceType: '03', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0407',
skinCode: '05',
trainingName: 'Set speed limit on the section({8}{9})',
trainingRemark: 'Set speed limit on the section (speed limit value: 5)',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: 'Right click to select [Set speed limit on the section]' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: 'Left click to select [speed limit 5] ', val: '5' },
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: 'Left click [Execute]' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: 'Left click [confirm]' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: 'Left click [confirm1]' },
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: 'Left click [confirm2]', val: '5' },
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0408',
skinCode: '05',
trainingName: 'Cancel speed limit on the section({8}{9})',
trainingRemark: 'Cancel speed limit on the section',
trainingType: '04',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '408', tip: 'Right click to select [Cancel speed limit on the section]' },
{ deviceType: '03', orderNum: 2, operateCode: '4081', tip: 'Left click [Execute]' },
{ deviceType: '03', orderNum: 3, operateCode: '4082', tip: 'Left click [confirm] ' },
{ deviceType: '03', orderNum: 4, operateCode: '4083', tip: 'Left click [confirm1]' },
{ deviceType: '03', orderNum: 5, operateCode: '4084', tip: 'Left click [confirm2]', val: '5' },
{ deviceType: '03', orderNum: 6, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0301',
skinCode: '05',
trainingName: 'Single lock of turnout({7})',
trainingRemark: 'Single lock of turnout',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: 'Right click to select [Single lock of turnout]' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0302',
skinCode: '05',
trainingName: 'Single release of turnout({7})',
trainingRemark: 'Single release of turnout',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: 'Right click to select [Single release of turnout]' },
{ deviceType: '02', orderNum: 2, operateCode: '1041', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1043', tip: 'Left click [confirm1] ' },
{ deviceType: '02', orderNum: 4, operateCode: '1044', tip: 'Left click [confirm2] ' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close] '}
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0303',
skinCode: '05',
trainingName: 'Turnout section closure({7})',
trainingRemark: 'Turnout section closure ',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: 'Right click to select [Turnout section closure]' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0304',
skinCode: '05',
trainingName: 'Turnout section unsealing({7})',
trainingRemark: 'Turnout section unsealing function',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: 'Right click to select [Turnout section unsealing]' },
{ deviceType: '02', orderNum: 2, operateCode: '1061', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1063', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 4, operateCode: '1064', tip: 'Left click [confirm2]' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
skinCode: '05',
trainingName: 'Turnout rotation({7})',
trainingRemark: 'Turnout rotation({15}turn{16})',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '107', tip: 'Right click to select [Turnout rotation]' },
{ deviceType: '02', orderNum: 2, operateCode: '107', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 20,
minDuration: 10,
operateType: '0306',
skinCode: '05',
trainingName: 'Turnout section fault unlocking({7})',
trainingRemark: 'Turnout section fault unlocking function',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: 'Right click to select [Turnout section fault unlocking]' },
{ deviceType: '02', orderNum: 2, operateCode: '1091', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1093', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 4, operateCode: '1094', tip: 'Left click [confirm2]' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0307',
skinCode: '05',
trainingName: 'Turnout section axile pre reset({7})',
trainingRemark: 'Turnout section axile pre reset function',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '110', tip: 'Right click to select [Turnout section axile pre reset]' },
{ deviceType: '02', orderNum: 2, operateCode: '1101', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1103', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 4, operateCode: '1104', tip: 'Left click [confirm2]' },
{ deviceType: '02', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0308',
skinCode: '05',
trainingName: 'Section resection({7})',
trainingRemark: 'Section resection',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: 'Right click to select [Section resection]' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0309',
skinCode: '05',
trainingName: 'Section activation({7})',
trainingRemark: 'Section activation function',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: 'Right click to select [Section activation]' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0310',
skinCode: '05',
trainingName: 'Set speed limit on the turnout section({7})',
trainingRemark: 'Set speed limit on the section (speed limit value: 5)',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: 'Right click to select [Set speed limit on the turnout section]' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: 'Left click to select [speed limit 5] ', val: '5' },
{ deviceType: '02', orderNum: 3, operateCode: '1131', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 4, operateCode: '1132', tip: 'Left click [confirm]' },
{ deviceType: '02', orderNum: 5, operateCode: '1133', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: 'Left click [confirm2]', val: '5' },
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0311',
skinCode: '05',
trainingName: 'Cancel speed limit on the turnout section({7})',
trainingRemark: 'Cancel speed limit on the turnout section',
trainingType: '03',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '114', tip: 'Right click to select [Cancel speed limit on the turnout section]' },
{ deviceType: '02', orderNum: 2, operateCode: '1141', tip: 'Left click [Execute]' },
{ deviceType: '02', orderNum: 3, operateCode: '1142', tip: 'Left click [confirm] ' },
{ deviceType: '02', orderNum: 4, operateCode: '1143', tip: 'Left click [confirm1]' },
{ deviceType: '02', orderNum: 5, operateCode: '1144', tip: 'Left click [confirm2]', val: '5' },
{ deviceType: '02', orderNum: 6, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0201',
skinCode: '05',
trainingName: 'Route selection({3})',
trainingRemark: 'Route selection',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: 'Right click to select [Route selection]' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: 'Left click to select the route name【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: 'Left click [confirm] ' },
{ deviceType: '04', orderNum: 4, operateCode: '3012', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '05',
trainingName: 'Cancel the route({3})',
trainingRemark: 'Cancel the route',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: 'Right click to select [Cancel the route]' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: 'Left click [confirm] ' },
{ deviceType: '04', orderNum: 3, operateCode: '3031', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '05',
trainingName: 'Cancel the route({3})',
trainingRemark: 'Cancel the route',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: 'Right click to select [Cancel the route]' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0203',
skinCode: '05',
trainingName: 'Signal closure({5})',
trainingRemark: 'Signal closure',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: 'Right click to select [Signal closure]' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0204',
skinCode: '05',
trainingName: 'Signal unsealing({5})',
trainingRemark: 'Signal unsealing',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: 'Right click to select [Signal unsealing]' },
{ deviceType: '04', orderNum: 2, operateCode: '3071', tip: 'Left click [Execute]' },
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: 'Left click [confirm]' },
{ deviceType: '04', orderNum: 4, operateCode: '3073', tip: 'Left click [confirm1]' },
{ deviceType: '04', orderNum: 5, operateCode: '3074', tip: 'Left click [confirm2]' },
{ deviceType: '04', orderNum: 6, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0205',
skinCode: '05',
trainingName: 'Signal Off({3})',
trainingRemark: 'Signal Off',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '313', tip: 'Right click to select [Signal Off]' },
{ deviceType: '04', orderNum: 2, operateCode: '313', tip: 'Left click [confirm]' },
{ deviceType: '04', orderNum: 3, operateCode: '3131', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0206',
skinCode: '05',
trainingName: 'Signal reopen({3})',
trainingRemark: 'Signal reopen',
trainingType: '02',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: 'Right click to select [Signal reopen]' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: 'Left click [confirm]' },
{ deviceType: '04', orderNum: 3, operateCode: '3041', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0207',
skinCode: '05',
trainingName: 'Guide route handling({3})',
trainingRemark: 'Guide route handling',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: 'Right click to select [Guide route handling]' },
{ deviceType: '04', orderNum: 2, operateCode: '3081', tip: 'Left click [Execute]' },
{ deviceType: '04', orderNum: 3, operateCode: '3083', tip: 'Left click [confirm1]' },
{ deviceType: '04', orderNum: 4, operateCode: '3084', tip: 'Left click [confirm2]' },
{ deviceType: '04', orderNum: 5, operateCode: '001', tip: 'Left click [close]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0208',
skinCode: '05',
trainingName: 'Start automatic routing({5})',
trainingRemark: 'Start automatic routing',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: 'Right click to select [Start automatic routing]' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: 'Left click to select the route based on the manual control state', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0209',
skinCode: '05',
trainingName: 'Close automatic routing({5})',
trainingRemark: 'Close automatic routing',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: 'Right click to select [Close automatic routing]' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: 'Left click to select the first route', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0210',
skinCode: '05',
trainingName: 'Route control status query({5})',
trainingRemark: 'Query the route control status ',
trainingType: '02',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: 'Right click to select [Route control status query]' },
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: 'Left click [confirm] ' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0211',
skinCode: '05',
trainingName: 'Set Interlock for Auto Routing({5})',
trainingRemark: 'Set Interlock for Auto Routing',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: 'Right click to select [Set Interlock for Auto Routing]' },
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0212',
skinCode: '05',
trainingName: 'Cancel Interlock setting for Auto Routing({5})',
trainingRemark: 'Cancel Interlock setting for Auto Routing',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: 'Right click to select [Cancel Interlock setting for Auto Routing]' },
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0213',
skinCode: '05',
trainingName: 'Set Interlock for Auto Trigger({5})',
trainingRemark: 'Set Interlock for Auto Trigger',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '311', tip: 'Right click to select [Set Interlock for Auto Trigger]' },
{ deviceType: '04', orderNum: 2, operateCode: '311', tip: 'Left click [confirm]' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0214',
skinCode: '05',
trainingName: 'Cancel Interlock setting for Auto Trigger({5})',
trainingRemark: 'Cancel Interlock setting for Auto Trigger',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '312', tip: 'Right click to select[Cancel Interlock setting for Auto Trigger]' },
{ deviceType: '04', orderNum: 2, operateCode: '312', tip: 'Left click [confirm]' }
]
}
]
};

View File

@ -0,0 +1,325 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan';
export default {
/** 边缘高度*/
EdgeHeight: 600,
/** 间隔高度*/
CoordMultiple: 1,
/** 偏移时间*/
TranslationTime: 60 * 60 * 2,
/** excel解析配置*/
ExcelConfig: {
beginRow: 1,
beginCol: 0,
fieldNum: 6,
sepField: '车次号',
columns: {
'停车站名称': { key: 'stationName', formatter: (val) => { return val; } },
'到达时间': { key: 'arriveTime', formatter: (val) => { return val; } },
'出发时间': { key: 'departureTime', formatter: (val) => { return val; } }
}
},
/** 解析exal数据转换为Json后台数据*/
importData(Sheet, JsonData) {
const dataList = convertSheetToList(Sheet, true);
const needList = Object.keys(this.ExcelConfig.columns);
if (dataList && dataList.length) {
for (let colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += this.ExcelConfig.fieldNum + 1) {
let isContinue = true;
let tripObj = { code: '', directionCode: '', arrivalList: [] };
for (let rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
isContinue = false;
const stationObj = {};
for (let index = 0; index < this.ExcelConfig.fieldNum; index += 1) {
if (dataList[colIndex + index]) {
const title = dataList[colIndex + index][0];
const value = dataList[colIndex + index][rowIndex];
if (title && value) {
// 数据列解析
isContinue = true;
const titleStr = `${title}`.trim();
let valueStr = `${value}`.trim();
if (titleStr == this.ExcelConfig.sepField) {
valueStr = `${dataList[colIndex + index - 1][rowIndex]}${valueStr}`;
if (tripObj.code) {
const length = tripObj.arrivalList.length;
if (length == 1) {
tripObj.arrivalList[0]['flag'] = true;
}
if (valueStr != tripObj.code) {
JsonData.push(tripObj);
const strVal = `${value}`.trim();
tripObj = { code: valueStr, directionCode: strVal[0], arrivalList: [] };
}
} else {
const strVal = `${value}`.trim();
tripObj.code = valueStr;
tripObj.directionCode = strVal[0];
}
}
// 取需要的字段
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
stationObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
if (this.ExcelConfig.columns[titleStr].key == 'arriveTime' || this.ExcelConfig.columns[titleStr].key == 'departureTime') {
stationObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(prefixTime(valueStr));
}
}
}
}
}
// 添加字段值
if (Object.keys(stationObj).length) {
if (stationObj.arriveTime) {
tripObj.arrivalList.push(stationObj);
}
}
}
// 添加最后那条没有车次的记录
if (tripObj.code) {
const length = tripObj.arrivalList.length;
if (length) {
tripObj.arrivalList[length - 1]['flag'] = true;
}
JsonData.push(tripObj);
}
}
}
return JsonData;
},
/** 将后台数据解析成图表*/
convertDataToModels(data, stations, kmRangeCoordMap, lineStyle) {
var models = [];
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
/** 按服务遍历数据*/
data.serviceNumberDataList.forEach((service) => {
/** 按车次遍历数据*/
var isBackup = true;
var opt = { name: '', markPointData: [], data: [] };
if (service.tripNumberDataList && service.tripNumberDataList.length) {
service.tripNumberDataList.forEach((train, j) => {
var pointdata = {};
var idx = 0;
var num = 0;
var lastPoint = null;
var nextPoint = null;
/** 如果车次号为空,不显示名称*/
if (train.tripNumber) {
/** 创建标记点名称和坐标*/
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/
opt.markPointData.push(createMartPoint(pointdata));
/** 创建服务号名称*/
opt.name = `${service.serviceNumber}`;
}
/** 计算非折返点车次点坐标集合*/
train.stationTimeList.forEach((elem, index) => {
idx = index;
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
index > 0 && index < train.stationTimeList.length - 1) {
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
}
});
/** 计算折返点车次坐标点集合*/
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber);
const aa = `${train.directionCode}${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true, num), lastPoint.stationCode, aa]);
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.directionCode, true, num), nextPoint.stationCode, aa]);
}
/** 如果是备用车,按车次添加线*/
if (train.backup) {
/** 创建一条完成的服务数据*/
opt.name += j;
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) {
models.push(model);
opt = { name: '', markPointData: [], data: [] };
}
}
isBackup = train.backup;
});
// 不是备用车,按服务添加线
if (!isBackup) {
/** 创建一条完成的服务数据*/
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
if (model) {
models.push(model);
}
}
}
});
return models;
} else {
return [];
}
},
/** 更新数据并解析成图表*/
updateDataToModels(data, stations, kmRangeCoordMap, runPlanData, series, lineStyle) {
if (data && data.length) {
data.forEach(elem => {
/** 判断此条记录的服务号是否存在*/
if (!runPlanData[elem.serviceNumber]) {
/** 创建一个新服务号标记*/
runPlanData[elem.serviceNumber] = {};
/** 不存在此服务号则需要创建一条新的line*/
series.push(createSeriesModel({
zlevel: 1,
name: `run${elem.serviceNumber}`,
data: [],
markPointData: []
}, Object.assign({ color: hexColor.toCreate() }, lineStyle)));
}
/** 添加数据*/
series.forEach(serie => {
/** 找到服务号所在图数据的位置*/
if (serie.name == `run${elem.serviceNumber}`) {
/** 添加车组号记录标记*/
if (!runPlanData[elem.serviceNumber][elem.tripNumber]) {
runPlanData[elem.serviceNumber][elem.tripNumber] = [];
}
runPlanData[elem.serviceNumber][elem.tripNumber].push(elem);
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
return parseInt(a.secondTime) - parseInt(b.secondTime);
});
/** 如果此记录车组号的数据为第一条时,则打上标签*/
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`,
color: lineStyle.color || '#000'
}));
}
/** 计算折返点*/
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false), elem.directionCode];
if (serie.data.length > 0) {
var lastPoint = serie.data[serie.data.length - 1];
if (lastPoint[2] !== nextPoint[2]) {
var num = this.computedReentryNumber(elem.tripNumber);
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2], num), lastPoint[2]]);
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2], num), lastPoint[2]]);
}
}
/** 添加车组号数据到对应的服务图数据中*/
serie.data.push(nextPoint);
/** 保证原始数据排序*/
serie.data.sort((a, b) => {
return parseInt(a[0]) - parseInt(b[0]);
});
}
});
});
}
return series;
},
/** 初始化Y轴*/
initializeYaxis(stations) {
return createMarkLineModels(stations, (elem) => {
return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
},
/** 将后台数据转换为试图序列模型*/
convertStationsToMap(stations) {
var map = {};
if (stations && stations.length) {
stations.forEach((elem) => {
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
});
}
return map;
},
/** 计算y轴最小值*/
computedYaxisMinValue(stations) {
return stations[0].kmRange * this.CoordMultiple;
},
/** 计算y轴最大值*/
computedYaxisMaxValue(stations) {
return stations[stations.length - 1].kmRange * this.CoordMultiple + this.EdgeHeight * 2;
},
/** 格式化y轴数据*/
computedFormatYAxis(stations, params) {
var yText = '0m';
stations.forEach(elem => {
if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) {
yText = Math.floor(elem.kmRange) + 'm';
}
});
return yText;
},
/** 根据是否和上一个车次是否相交,计算下一个车次的折返的高度*/
computedReentryNumber(code) {
return parseInt(code || 1) % 2 ? 1 : 2;
},
/** 根据方向计算y折返偏移量*/
getYvalueByDirectionCode(defaultVlue, directionCode, num) {
if (directionCode === '1') {
defaultVlue -= this.EdgeHeight / 2 * num;
} else if (directionCode === '2') {
defaultVlue += this.EdgeHeight / 2 * num;
}
return defaultVlue;
},
/** 根据elem计算y值*/
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial, num) {
var defaultVlue = 0;
var station = stations.find(it => { return it.code == elem.stationCode; });
if (station) {
defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
if (isSpecial) {
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode, num);
}
}
return defaultVlue;
}
};