北京一号线新版信号机操作调整
This commit is contained in:
parent
387746a69b
commit
4dde67b582
@ -1,355 +1,370 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
v-dialogDrag
|
||||||
<div class="context">
|
class="beijing-01__systerm confirm-control"
|
||||||
<template v-for="message in messages">
|
:title="title"
|
||||||
<span>{{message}}</span>
|
:visible.sync="show"
|
||||||
</template>
|
width="360px"
|
||||||
</div>
|
:before-close="doClose"
|
||||||
<el-row justify="center" class="button-group">
|
:z-index="2000"
|
||||||
<el-col :span="10" :offset="2">
|
:modal="false"
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
:close-on-click-modal="false"
|
||||||
</el-col>
|
append-to-body
|
||||||
<el-col :span="8" :offset="4">
|
>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<div class="context">
|
||||||
</el-col>
|
<template v-for="message in messages">
|
||||||
</el-row>
|
<span>{{ message }}</span>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
</template>
|
||||||
</el-dialog>
|
</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>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmControl',
|
name: 'ConfirmControl',
|
||||||
data() {
|
components: {
|
||||||
return {
|
NoticeInfo
|
||||||
dialogShow: false,
|
},
|
||||||
loading: false,
|
data() {
|
||||||
operate: {},
|
return {
|
||||||
messages: '',
|
dialogShow: false,
|
||||||
operation: null
|
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 '进路设置';
|
||||||
|
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
|
return '信号关灯';
|
||||||
|
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
return '信号重开';
|
||||||
|
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
return '取消进路';
|
||||||
|
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
|
return '进路交人工控';
|
||||||
|
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
|
return '进路交ATS自动控';
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||||
|
return '设置运行等级';
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||||
|
return '停站时间';
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||||
|
return '设置折返策略';
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
domIdCancel() {
|
||||||
NoticeInfo
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
computed: {
|
domIdConfirm() {
|
||||||
show() {
|
if (this.dialogShow) {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
|
||||||
return '进路设置';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return '信号重开';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return '取消进路';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
return '进路交人工控';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
return '进路交ATS自动控'
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
|
||||||
return '设置运行等级';
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
|
||||||
return '停站时间';
|
|
||||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
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) {
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
/** 进路设置*/
|
/** 进路设置*/
|
||||||
this.routeSetting();
|
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
this.signalClose();
|
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
/** 信号重开*/
|
/** 信号重开*/
|
||||||
this.reopenSignal();
|
return OperationEvent.Signal.reopenSignal.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
/** 取消进路*/
|
/** 取消进路*/
|
||||||
this.cancelTrainRoute();
|
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
/** 进路交人工控*/
|
/** 进路交人工控*/
|
||||||
this.humanControl();
|
return OperationEvent.Signal.humanControl.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
/** 进路交ATS自动控*/
|
/** 进路交ATS自动控*/
|
||||||
this.atsAutoControl();
|
return OperationEvent.Signal.atsAutoControl.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||||
/** 设置运行等级*/
|
/** 设置运行等级*/
|
||||||
this.setRunLevel();
|
return OperationEvent.StationStand.setRunLevel.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||||
/** 停站时间*/
|
/** 设置停战时间*/
|
||||||
this.setStopTime();
|
return OperationEvent.StationStand.setStopTime.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||||
/** 设置折返策略*/
|
/** 设置折返策略*/
|
||||||
this.setBackStrategy();
|
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
//进路设置
|
|
||||||
routeSetting() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//信号关灯
|
|
||||||
signalClose() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Signal.signalClose.confirm.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//取消进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//进路交人工控
|
|
||||||
humanControl() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//进路交ATS自动控
|
|
||||||
atsAutoControl() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//设置运行等级
|
|
||||||
setRunLevel() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
|
||||||
val: this.operate.val
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//停站时间
|
|
||||||
setStopTime() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
|
||||||
val: this.operate.val,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//设置折返策略
|
|
||||||
setBackStrategy() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
|
||||||
val: this.operate.val,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
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 = {
|
||||||
|
send: true,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Signal.arrangementRoute.confirm.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 信号关灯
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 信号重开
|
||||||
|
reopenSignal() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消进路
|
||||||
|
cancelTrainRoute() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 进路交人工控
|
||||||
|
humanControl() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 进路交ATS自动控
|
||||||
|
atsAutoControl() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 设置运行等级
|
||||||
|
setRunLevel() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||||
|
val: this.operate.val
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 停站时间
|
||||||
|
setStopTime() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||||
|
val: this.operate.val
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 设置折返策略
|
||||||
|
setBackStrategy() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||||
|
val: this.operate.val
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@ -357,4 +372,4 @@
|
|||||||
padding-bottom: 40px !important;
|
padding-bottom: 40px !important;
|
||||||
border: 1px solid lightgray;
|
border: 1px solid lightgray;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,223 +1,214 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm signal-control" :title="title" :visible.sync="show" width="300px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row class="header">
|
class="beijing-01__systerm signal-control"
|
||||||
<el-col :span="11"><span>集中站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="11" :offset="2"><span>信号机</span></el-col>
|
:visible.sync="show"
|
||||||
</el-row>
|
width="300px"
|
||||||
<el-row>
|
:before-close="doClose"
|
||||||
<el-col :span="11">
|
:z-index="2000"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
:modal="false"
|
||||||
</el-col>
|
:close-on-click-modal="false"
|
||||||
<el-col :span="11" :offset="2">
|
>
|
||||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
<el-row class="header">
|
||||||
</el-col>
|
<el-col :span="11"><span>集中站</span></el-col>
|
||||||
</el-row>
|
<el-col :span="11" :offset="2"><span>信号机</span></el-col>
|
||||||
<el-row justify="center" class="button-group">
|
</el-row>
|
||||||
<el-col :span="10" :offset="2">
|
<el-row>
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
<el-col :span="11">
|
||||||
</el-col>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<el-col :span="8" :offset="4">
|
</el-col>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-col :span="11" :offset="2">
|
||||||
</el-col>
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
</el-row>
|
</el-col>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<el-row justify="center" class="button-group">
|
||||||
</el-dialog>
|
<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>
|
||||||
|
<confirm-control ref="confirmControl" />
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteControl',
|
name: 'RouteControl',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
ConfirmControl,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false,
|
||||||
|
selected: null,
|
||||||
|
operation: null,
|
||||||
|
stationName: '',
|
||||||
|
signalName: ''
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
data() {
|
domIdCancel() {
|
||||||
return {
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
domIdConfirm() {
|
||||||
show() {
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? 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 '重开信号';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
title() {
|
||||||
this.$nextTick(() => {
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
this.$store.dispatch('training/tipReload');
|
return '取消列车进路';
|
||||||
})
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
},
|
return '信号关灯';
|
||||||
methods: {
|
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
doShow(operate, selected) {
|
return '重开信号';
|
||||||
this.selected = selected;
|
} else {
|
||||||
if (!this.dialogShow) {
|
return '';
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name
|
|
||||||
let 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');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
if (this.$store.state.training.prdType == '01') {
|
|
||||||
/** 现地工作站*/
|
|
||||||
this.cancelTrainRouteByLocal();
|
|
||||||
} else if (this.$store.state.training.prdType == '02') {
|
|
||||||
/** 行调工作站*/
|
|
||||||
this.cancelTrainRouteByCentral();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//现地工作站取消进路
|
|
||||||
cancelTrainRouteByLocal() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//行调工作站取消进路
|
|
||||||
cancelTrainRouteByCentral() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//信号关灯
|
|
||||||
signalClose() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
|
||||||
messages: [`信号关灯: ${this.signalName}`],
|
|
||||||
}
|
|
||||||
|
|
||||||
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.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//取消
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, selected) {
|
||||||
|
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.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');
|
||||||
|
mouseCancelState(this.selected);
|
||||||
|
},
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 取消列车进路
|
||||||
|
cancelTrainRoute() {
|
||||||
|
this.cancelTrainRouteFunc();
|
||||||
|
// if (this.$store.state.training.prdType == '01') {
|
||||||
|
// /** 现地工作站*/
|
||||||
|
// this.cancelTrainRouteFunc();
|
||||||
|
// } else if (this.$store.state.training.prdType == '02') {
|
||||||
|
// /** 行调工作站*/
|
||||||
|
// this.cancelTrainRouteFunc();
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
cancelTrainRouteFunc() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 信号关灯
|
||||||
|
signalClose() {
|
||||||
|
const operate = {
|
||||||
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
|
messages: [`信号关灯: ${this.signalName}`]
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 信号重开
|
||||||
|
reopenSignal() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: OperationEvent.Signal.reopenSignal.menu.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(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.Signal.type,
|
||||||
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
};
|
||||||
|
</script>
|
||||||
|
@ -1,238 +1,253 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-row class="header">
|
class="beijing-01__systerm stand-stop-time"
|
||||||
<el-col :span="11"><span>集中站</span></el-col>
|
:title="title"
|
||||||
<el-col :span="11" :offset="2"><span>站台名称</span></el-col>
|
:visible.sync="show"
|
||||||
</el-row>
|
width="340px"
|
||||||
<el-row>
|
:before-close="doClose"
|
||||||
<el-col :span="11">
|
:z-index="2000"
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
:modal="false"
|
||||||
</el-col>
|
:close-on-click-modal="false"
|
||||||
<el-col :span="11" :offset="2">
|
>
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
<el-row class="header">
|
||||||
</el-col>
|
<el-col :span="11"><span>集中站</span></el-col>
|
||||||
</el-row>
|
<el-col :span="11" :offset="2"><span>站台名称</span></el-col>
|
||||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;">
|
</el-row>
|
||||||
<span class="base-label" style="left: -9px;">模式</span>
|
<el-row>
|
||||||
<div style=" position: relative; top:-10px;">
|
<el-col :span="11">
|
||||||
<el-radio-group v-model="control" @change='chooseControl' style="width: 40%;float: left;">
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
<div style="margin-bottom: 10px;">
|
</el-col>
|
||||||
<el-radio label="01" :id="control === '01'? '': domIdChoose1">自动</el-radio>
|
<el-col :span="11" :offset="2">
|
||||||
</div>
|
<el-input v-model="standName" size="small" disabled />
|
||||||
<el-radio label="02" :id="control === '02'? '': domIdChoose1">全人工</el-radio>
|
</el-col>
|
||||||
</el-radio-group>
|
</el-row>
|
||||||
<el-input-number v-model="time" @change="inputTime" :disabled="disabledInput" :id="domIdInput"
|
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;">
|
||||||
controls-position="right" :min="0" size="mini"
|
<span class="base-label" style="left: -9px;">模式</span>
|
||||||
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;">
|
<div style=" position: relative; top:-10px;">
|
||||||
</el-input-number>
|
<el-radio-group v-model="control" style="width: 40%;float: left;" @change="chooseControl">
|
||||||
<div style="float: left;margin-top: 22px; margin-left: 5px;">秒</div>
|
<div style="margin-bottom: 10px;">
|
||||||
</div>
|
<el-radio :id="control === '01'? '': domIdChoose1" label="01">自动</el-radio>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
|
<el-radio :id="control === '02'? '': domIdChoose1" label="02">全人工</el-radio>
|
||||||
<span class="base-label" style="left: -9px;">有效次数</span>
|
</el-radio-group>
|
||||||
<div style=" position: relative; top:-10px;">
|
<el-input-number
|
||||||
<el-radio-group v-model="effective" @change="chooseEffective" :disabled="disabledTime">
|
:id="domIdInput"
|
||||||
<el-radio :label="false" :id="effective === false? '': domIdChoose2">一次有效</el-radio>
|
v-model="time"
|
||||||
<el-radio :label="true" :id="effective === true? '': domIdChoose2">一直有效</el-radio>
|
:disabled="disabledInput"
|
||||||
</el-radio-group>
|
controls-position="right"
|
||||||
</div>
|
:min="0"
|
||||||
</div>
|
size="mini"
|
||||||
<el-row justify="center" class="button-group">
|
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;"
|
||||||
<el-col :span="10" :offset="2">
|
@change="inputTime"
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
/>
|
||||||
</el-col>
|
<div style="float: left;margin-top: 22px; margin-left: 5px;">秒</div>
|
||||||
<el-col :span="8" :offset="4">
|
</div>
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
</div>
|
||||||
</el-col>
|
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
|
||||||
</el-row>
|
<span class="base-label" style="left: -9px;">有效次数</span>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<div style=" position: relative; top:-10px;">
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||||
</el-dialog>
|
<el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
|
||||||
|
<el-radio :id="effective === true? '': 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">确定</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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandStopTime',
|
name: 'StandStopTime',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
ConfirmControl,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false,
|
||||||
|
time: 0,
|
||||||
|
control: '01',
|
||||||
|
direction: '01',
|
||||||
|
effective: false,
|
||||||
|
selected: null,
|
||||||
|
standName: '',
|
||||||
|
stationName: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
data() {
|
domIdCancel() {
|
||||||
return {
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
dialogShow: false,
|
},
|
||||||
loading: false,
|
domIdConfirm() {
|
||||||
time: 0,
|
return this.dialogShow ? OperationEvent.StationStand.setStopTime.menu.domId : '';
|
||||||
control: '01',
|
},
|
||||||
direction: '01',
|
domIdChoose1() {
|
||||||
effective: false,
|
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
|
||||||
selected: null,
|
},
|
||||||
standName: '',
|
domIdChoose2() {
|
||||||
stationName: '',
|
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
||||||
|
},
|
||||||
|
domIdInput() {
|
||||||
|
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
|
||||||
|
},
|
||||||
|
disabledUp() {
|
||||||
|
if (this.selected) {
|
||||||
|
return this.selected.direction !== '02';
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
computed: {
|
disabledDown() {
|
||||||
show() {
|
if (this.selected) {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.selected.direction !== '01';
|
||||||
},
|
|
||||||
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 : '';
|
|
||||||
},
|
|
||||||
disabledUp() {
|
|
||||||
if (this.selected) {
|
|
||||||
return this.selected.direction !== '02'
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
disabledDown() {
|
|
||||||
if (this.selected) {
|
|
||||||
return this.selected.direction !== '01'
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
disabledInput() {
|
|
||||||
return this.control === '01'; //如果是自动则不可以设置
|
|
||||||
},
|
|
||||||
disabledTime() {
|
|
||||||
return this.control === '01'; //如果是自动则不可以设置
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '停站时间';
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
mounted() {
|
disabledInput() {
|
||||||
this.$nextTick(() => {
|
return this.control === '01'; // 如果是自动则不可以设置
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
methods: {
|
disabledTime() {
|
||||||
doShow(operate, selected, tempDate) {
|
return this.control === '01'; // 如果是自动则不可以设置
|
||||||
this.selected = selected || {};
|
},
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
title() {
|
||||||
if (!this.dialogShow) {
|
return '停站时间';
|
||||||
this.standName = '';
|
}
|
||||||
this.stationName = '';
|
},
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
mounted() {
|
||||||
this.standName = selected.name;
|
this.$nextTick(() => {
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
this.$store.dispatch('training/tipReload');
|
||||||
if (station) {
|
});
|
||||||
this.stationName = station.name;
|
},
|
||||||
}
|
methods: {
|
||||||
|
doShow(operate, selected, tempDate) {
|
||||||
|
this.selected = 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 = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
|
||||||
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
|
|
||||||
this.effective = tempDate.parkingValidStatus ? true : false;
|
|
||||||
this.direction = selected.direction;
|
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
|
||||||
});
|
this.effective = !!tempDate.parkingValidStatus;
|
||||||
},
|
this.direction = selected.direction;
|
||||||
doClose() {
|
}
|
||||||
this.loading = false;
|
this.dialogShow = true;
|
||||||
this.dialogShow = false;
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
});
|
||||||
},
|
},
|
||||||
chooseControl(control) {
|
doClose() {
|
||||||
/** 自动时的默认时间*/
|
this.loading = false;
|
||||||
if (control == '01') {
|
this.dialogShow = false;
|
||||||
this.inputTime = 15;
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.effective = true;
|
mouseCancelState(this.selected);
|
||||||
}
|
},
|
||||||
|
chooseControl(control) {
|
||||||
let operate = {
|
/** 自动时的默认时间*/
|
||||||
type: MapDeviceType.StationStand.type,
|
if (control == '01') {
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
this.inputTime = 15;
|
||||||
val: `${control}`
|
this.effective = true;
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
chooseEffective(effective) {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
|
||||||
val: `${effective}`
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
inputTime(time) {
|
|
||||||
let operate = {
|
|
||||||
repeat: true,
|
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
|
||||||
val: `${time}`
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
|
||||||
val: [`${this.control}`, this.time, this.effective].join('::'),
|
|
||||||
// messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`]
|
|
||||||
}
|
|
||||||
|
|
||||||
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.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
})
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => { this.doClose(); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.StationStand.type,
|
||||||
|
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
||||||
|
val: `${control}`
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
chooseEffective(effective) {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.StationStand.type,
|
||||||
|
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
||||||
|
val: `${effective}`
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
inputTime(time) {
|
||||||
|
const operate = {
|
||||||
|
repeat: true,
|
||||||
|
type: MapDeviceType.StationStand.type,
|
||||||
|
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||||
|
val: `${time}`
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
const operate = {
|
||||||
|
send: true,
|
||||||
|
type: MapDeviceType.StationStand.type,
|
||||||
|
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||||
|
val: [`${this.control}`, this.time, this.effective].join('::')
|
||||||
|
// messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`]
|
||||||
|
};
|
||||||
|
|
||||||
|
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.confirmControl.doShow(operate);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: MapDeviceType.StationStand.type,
|
||||||
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
};
|
||||||
|
</script>
|
||||||
|
@ -207,15 +207,17 @@ export default {
|
|||||||
setStoppage() {
|
setStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
code: `${this.selected.code}`,
|
||||||
code: this.selected.code,
|
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||||
type: MapDeviceType.Signal.type,
|
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.stoppage.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
@ -229,15 +231,16 @@ export default {
|
|||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||||
label: MapDeviceType.Signal.label,
|
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation
|
param: {
|
||||||
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
} else {
|
} else {
|
||||||
@ -251,14 +254,17 @@ export default {
|
|||||||
arrangementRoute() {
|
arrangementRoute() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
// send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
// type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
// label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
|
param: {
|
||||||
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
var tempData = null;
|
var tempData = null;
|
||||||
@ -276,63 +282,65 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号封锁
|
// // 信号封锁
|
||||||
lock() {
|
// lock() {
|
||||||
const operate = {
|
// const operate = {
|
||||||
start: true,
|
// start: true,
|
||||||
send: true,
|
// send: true,
|
||||||
code: this.selected.code,
|
// code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
// type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
// label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.lock.menu.operation
|
// operation: OperationEvent.Signal.lock.menu.operation
|
||||||
};
|
// };
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
// if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeLock.doShow(operate.operation, this.selected);
|
// this.$refs.routeLock.doShow(operate.operation, this.selected);
|
||||||
}
|
// }
|
||||||
}).catch(() => {
|
// }).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
// 信号解封
|
// // 信号解封
|
||||||
unlock() {
|
// unlock() {
|
||||||
const operate = {
|
// const operate = {
|
||||||
start: true,
|
// start: true,
|
||||||
code: this.selected.code,
|
// code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
// type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
// label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation
|
// operation: OperationEvent.Signal.unlock.menu.operation
|
||||||
};
|
// };
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
// if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
// this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
@ -344,11 +352,12 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
label: MapDeviceType.Signal.label,
|
param: {
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
@ -359,11 +368,14 @@ export default {
|
|||||||
humanControl() {
|
humanControl() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
// send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
// type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
// label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
|
param: {
|
||||||
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -380,11 +392,14 @@ export default {
|
|||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
// send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
// type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
// label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
|
param: {
|
||||||
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -401,11 +416,14 @@ export default {
|
|||||||
detail() {
|
detail() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
// send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Signal.type,
|
// type: MapDeviceType.Signal.type,
|
||||||
label: MapDeviceType.Signal.label,
|
// label: MapDeviceType.Signal.label,
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
operation: OperationEvent.Signal.detail.menu.operation,
|
||||||
|
param: {
|
||||||
|
Signal_Code: `${this.selected.code}`
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
Loading…
Reference in New Issue
Block a user