This commit is contained in:
fan 2019-12-30 18:25:22 +08:00
commit e4aa7a2ccf
100 changed files with 12514 additions and 8108 deletions

View File

@ -104,7 +104,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
}, },
title() { title() {
return '进路选排'; return '进路设置';
}, },
commitDisabled() { commitDisabled() {
let disabled = true; let disabled = true;

View File

@ -340,86 +340,6 @@ export default {
} }
}); });
}, },
//
guide() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.guide.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeCmdControl.doShow(operate, this.selected);
}
});
},
//
setAutoInterlock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
cancelAutoInterlock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
setAutoTrigger() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
cancelAutoTrigger() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
// //
signalClose() { signalClose() {
const operate = { const operate = {

View File

@ -1,9 +1,9 @@
<template> <template>
<el-dialog class="ningbo_01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" <el-dialog class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px;border: 1px solid lightgray;"> <div style="padding: 10px 20px;border: 1px solid lightgray;">
<span class="base-label">准备</span> <span class="base-label">准备</span>
<div style="margin-top: 10px"> <div style="margin-top: -10px">
<el-row type="flex" justify="left"> <el-row type="flex" justify="left">
<el-col :span="9">车站</el-col> <el-col :span="9">车站</el-col>
<el-col :span="9">轨道/计轴</el-col> <el-col :span="9">轨道/计轴</el-col>
@ -24,7 +24,7 @@
</div> </div>
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px"> <div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
<span class="base-label">确认</span> <span class="base-label">确认</span>
<div> <div style="margin-top: -10px">
<el-row type="flex" justify="left"> <el-row type="flex" justify="left">
<el-col :span="9">车站</el-col> <el-col :span="9">车站</el-col>
<el-col :span="9">轨道/计轴</el-col> <el-col :span="9">轨道/计轴</el-col>
@ -53,7 +53,7 @@
</el-row> </el-row>
</div> </div>
</div> </div>
<el-row type="flex" justify="left" style="margin-top:20px"> <el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
<el-col :span="6" :offset="1"> 操作倒计时</el-col> <el-col :span="6" :offset="1"> 操作倒计时</el-col>
<el-col :span="16"> <el-col :span="16">
<el-input v-model="model.time" size="mini" :readonly="true"></el-input> <el-input v-model="model.time" size="mini" :readonly="true"></el-input>
@ -137,6 +137,8 @@
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.confirm1.domId; return OperationEvent.Section.alxeEffective.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.confirm1.domId;
} }
} }
}, },
@ -144,6 +146,8 @@
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.confirm2.domId; return OperationEvent.Section.alxeEffective.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.confirm2.domId;
} }
} }
}, },
@ -151,6 +155,8 @@
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.choose1.domId; return OperationEvent.Section.alxeEffective.choose1.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.choose1.domId;
} }
} }
}, },
@ -158,6 +164,8 @@
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.choose2.domId; return OperationEvent.Section.alxeEffective.choose2.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.choose2.domId;
} }
} }
}, },
@ -166,7 +174,8 @@
}, },
title() { title() {
this.earlyDepar = false; this.earlyDepar = false;
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return '确认计轴恢复工作'; return '确认计轴恢复工作';
} }
}, },
@ -275,7 +284,13 @@
this.stepNum = 1; this.stepNum = 1;
let operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Section.alxeEffective.confirm1.operation operation: ''
}
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation
} }
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -296,10 +311,16 @@
let operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Section.alxeEffective.choose1.operation, operation: '',
val: val val: val
} }
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation
}
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}) })
@ -313,10 +334,16 @@
let operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Section.alxeEffective.choose2.operation, operation: '',
val: val val: val
} }
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation
}
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}) })
@ -326,10 +353,16 @@
let operate = { let operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Section.alxeEffective.confirm2.operation, operation: '',
val: this.selected.code val: this.selected.code
} }
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation
}
this.model.status = ''; this.model.status = '';
if (this.model.stationName == this.model.confirmStationName && if (this.model.stationName == this.model.confirmStationName &&
this.model.sectionName == this.model.confirmSectionName) { this.model.sectionName == this.model.confirmSectionName) {
@ -346,7 +379,7 @@
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]); [`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
} }
}).catch(error => { }).catch(error => {
this.loading = false; this.$refs.noticeInfo.doShow(operate);
}) })
} else { } else {
if (this.model.stationName != this.model.confirmStationName) { if (this.model.stationName != this.model.confirmStationName) {
@ -374,7 +407,7 @@
} }
} }
</script> </script>
<style> <style rel="stylesheet/scss" lang="scss" scoped>
.alxe-effective .context { .alxe-effective .context {
height: 80px !important; height: 80px !important;
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="ningbo_01__systerm stand-detain-train" class="ningbo-01__systerm stand-detain-train"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="380px" width="380px"

View File

@ -1,81 +1,71 @@
<template> <template>
<el-dialog <el-dialog class="ningbo-01__systerm notice-info" :title="title" :visible.sync="show" width="360px"
v-dialogDrag :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
class="ningbo_01__systerm notice-info" <div class="context">
:title="title" <template v-for="(message, index) in messages">
:visible.sync="show" <span :key="index">{{message}}</span>
width="360px" </template>
:before-close="doClose" </div>
:z-index="2000" <el-row justify="center" class="button-group">
:modal="false" <el-col :span="10" :offset="8">
:close-on-click-modal="false" <el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
append-to-body </el-col>
> </el-row>
<span class="context"> </el-dialog>
<template v-for="(message, index) in messages">
<span :key="index">{{ message }}</span>
</template>
</span>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</el-dialog>
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'NoticeInfo', name: 'NoticeInfo',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
messages: ['命令下达失败'], messages: ['命令下达失败'],
operate: null operate: null
}; }
}, },
computed: { computed: {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
title() { title() {
return '提示'; return '提示';
}, },
domIdSure() { domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : ''; return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}); })
}, },
methods: { methods: {
doShow(operate, messages) { doShow(operate, messages) {
this.operate = operate || {}; this.operate = operate || {};
this.dialogShow = true; this.dialogShow = true;
this.messages = ['命令下达失败']; this.messages = ['命令下达失败'];
if (messages) { if (messages) {
this.messages = messages; this.messages = messages;
} }
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {
this.doClose(); this.doClose();
}, },
cancel() { cancel() {
this.doClose(); this.doClose();
} }
} }
}; }
</script> </script>
<style> <style>
@ -83,4 +73,4 @@ export default {
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm confirm-control" :title="title" :visible.sync="show" width="360px" <el-dialog class="ningbo-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context"> <div class="context">
<template v-for="(message, index) in messages"> <template v-for="(message, index) in messages">

View File

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

View File

@ -1,123 +1,113 @@
<template> <template>
<el-dialog <el-dialog class="ningbo-01__systerm route-unlock-confirm" :title="title" :visible.sync="show" width="500px"
v-dialogDrag :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
class="ningbo_01__systerm route-unlock-confirm" <div style="height: 60px; padding-left: 20px">
:title="title" <span>{{stationName}}{{signalName}}信号机信号解锁确认下达吗</span>
:visible.sync="show" </div>
width="500px" <el-row justify="center" class="button-group">
:before-close="doClose" <el-col :span="6" :offset="6">
:z-index="2000" <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
:modal="false" </el-col>
:close-on-click-modal="false" <el-col :span="10" :offset="2">
append-to-body <el-button :id="domIdCancel" @click="cancel"> </el-button>
> </el-col>
<div style="height: 60px; padding-left: 20px"> </el-row>
<span>{{ stationName }}{{ signalName }}信号机信号解锁确认下达吗</span> </el-dialog>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'RouteUnlockConfirm', name: 'RouteUnlockConfirm',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
signalName: '', signalName: '',
stationName: '' stationName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '信号解封';
},
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() { computed: {
this.loading = false; show() {
this.dialogShow = false; return this.dialogShow && !this.$store.state.menuOperation.break;
this.$store.dispatch('training/emitTipFresh'); },
title() {
return '信号解封'
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
}
}, },
commit() { mounted() {
const operate = { this.$nextTick(() => {
type: MapDeviceType.Signal.type, this.$store.dispatch('training/tipReload');
operation: OperationEvent.Signal.unlock.confirm.operation })
}; },
methods: {
this.loading = true; doShow(operate, selected) {
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.stationName = ''
this.loading = false; this.signalName = '';
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (selected) {
if (valid) { this.signalName = selected.name;
this.$emit('setOperate', { step: 1, success: true }); let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
this.doClose(); if (station) {
this.stationName = station.name;
}
} }
}).catch((error) => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
});
},
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.dialogShow = true;
if (valid) { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
type: MapDeviceType.Signal.type,
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((error) => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false }); this.$emit('setOperate', { step: 0, success: false });
this.doClose(); this.doClose();
})
},
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
} }
}).catch(error => {
this.doClose(); 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(error => {
this.doClose();
});
}
} }
} }
};
</script> </script>
<style> <style>
@ -125,4 +115,4 @@ export default {
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="340px" <el-dialog class="ningbo-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="height: 60px; padding-left: 20px"> <div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{message}}</span> <span style="font-size: 18px">{{message}}</span>
@ -61,7 +61,7 @@
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }
.ningbo_01__systerm .el-dialog .el-button{ .ningbo-01__systerm .el-dialog .el-button{
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }

View File

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

View File

@ -1,206 +0,0 @@
<template>
<el-dialog class="ningbo_01__systerm" :visible.sync="show" width="360px" :before-close="doClose" :zIndex="2000"
:modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<el-row>
<el-col :span="22" :offset="1">
<el-input placeholder="请使用软键盘输入" v-model="encryptionPassword" size="medium" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row v-if="showMistake">
<el-col :span="22" :offset="1">
<span class="password-error">*密码输入错误请重新输入*</span>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">7</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">8</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">9</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">4</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">5</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">6</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">1</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">2</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">3</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">0</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputClear">C</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="backSpace">&lt-</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'passwordBox',
data() {
return {
/*写死的初始密码*/
correctPassword: '123456',
dialogShow: false,
operation: null,
checkHasInput: false,
/*输入值*/
passwordCheck: '',
/*输入值替换为对应长度的星号*/
encryptionPassword: '',
loading: false,
showMistake: false,
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel: {
get: function () {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
set: function () {
}
},
domIdConfirm: {
get: function () {
return OperationEvent.Command.close.confirm.domId;
},
set: function () {
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.dialogShow = true;
this.checkHasInput = false;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.showMistake = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
};
if (this.passwordCheck === this.correctPassword) {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$emit('checkOver', this.operate.operation);
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo.doShow(operate);
})
} else {
this.showMistake = true;
}
},
/*软键盘输入*/
inputNum(e) {
this.showMistake = false;
this.passwordCheck += e.path[0].innerText;
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
},
/*软键盘清除*/
inputClear() {
this.showMistake = false;
this.passwordCheck = '';
this.encryptionPassword = '';
},
/*软键盘回退*/
backSpace() {
this.showMistake = false;
let password = this.passwordCheck;
if (password !== '') {
this.passwordCheck = password.substring(0, password.length - 1);
this.encryptionPassword = this.passwordCheck;
}
},
cancel() {
let operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation,
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo.doShow(operate);
});
}
}
}
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.password-error {
color: red;
}
</style>

View File

@ -1,94 +1,84 @@
<template> <template>
<el-dialog <el-dialog class="ningbo-01__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
v-dialogDrag :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
class="ningbo_01__systerm popup-alarm" <el-row>
:title="title" <el-col :offset="2">
:visible.sync="show" <span v-for="(message, index) in messages" :key="index">{{message}}</span><br>
width="500px" </el-col>
:before-close="doClose" </el-row>
:z-index="2000" <el-row justify="center" class="button-group">
:modal="false" <el-col :span="10" :offset="8">
:close-on-click-modal="false" <el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
append-to-body </el-col>
> </el-row>
<el-row> </el-dialog>
<el-col :offset="2">
<span v-for="(message, index) in messages" :key="index">{{ message }}</span>
</el-col>
</el-row>
<el-button justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-button>
</el-dialog>
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'PopupAlarm', name: 'Popup-Alarm',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
messages: [], messages: [],
operate: null, operate: null,
operation: '' operation: '',
}; }
}, },
computed: { computed: {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
title() { title() {
return '弹出式告警'; return '弹出式告警';
}, },
domIdSure() { domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : ''; return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}); })
}, },
methods: { methods: {
doShow(operate, messages) { doShow(operate, messages) {
this.operate = operate || {}; this.operate = operate || {};
this.operation = operate.operation; this.operation = operate.operation;
this.dialogShow = true; this.dialogShow = true;
this.messages = messages || []; this.messages = messages || [];
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
// //
this.alxeEffective(); this.alxeEffective();
} }
}, },
alxeEffective() { alxeEffective() {
const operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation operation: OperationEvent.Command.close.alarm.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.doClose(); this.doClose();
} }
}); })
} }
} }
}; }
</script> </script>
<style> <style>
@ -96,4 +86,4 @@ export default {
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }
</style> </style>

View File

@ -0,0 +1,439 @@
<template>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" :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">命令信息</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<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="8">
<el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="信号机名称" 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="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-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
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: '信号解封' },
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
];
},
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;
}
}
},
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;
}
}
},
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;
}
}
},
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;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
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) {
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.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.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
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 = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', 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 = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
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: '执行异常' });
});
},
confirm1() {
const operate = {
type: MapDeviceType.Signal.type
};
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('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', 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 = {
send: true,
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', 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 = {
type: MapDeviceType.Signal.type
};
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: '点击终止', result: '' });
this.$store.dispatch('training/next', 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(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
});
},
close() {
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(error => {
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: '点击下达命令', result: '确认成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
}
}
},
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

@ -1,372 +1,223 @@
<template> <template>
<el-dialog <el-dialog class="ningbo-01__systerm signal-control" :title="title" :visible.sync="show" width="300px"
v-dialogDrag :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
class="ningbo_01__systerm signal-control" <el-row class="header">
:title="title" <el-col :span="11"><span>集中站</span></el-col>
:visible.sync="show" <el-col :span="11" :offset="2"><span>信号机</span></el-col>
width="440px" </el-row>
:before-close="doClose" <el-row>
:z-index="2000" <el-col :span="11">
:modal="false" <el-input v-model="stationName" size="small" disabled></el-input>
:close-on-click-modal="false" </el-col>
> <el-col :span="11" :offset="2">
<el-row> <el-input v-model="signalName" size="small" disabled></el-input>
<el-col :span="2"><span>车站</span></el-col> </el-col>
<el-col :span="6"> </el-row>
<el-input v-model="stationName" size="small" disabled /> <el-row justify="center" class="button-group">
</el-col> <el-col :span="10" :offset="2">
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-col :span="6"> </el-col>
<el-input v-model="signalName" size="small" disabled /> <el-col :span="8" :offset="4">
</el-col> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-row> </el-col>
<el-row justify="center" style="margin-top: 50px"> </el-row>
<el-col :span="11" :offset="13"> <confirm-control ref="confirmControl"></confirm-control>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <notice-info ref="noticeInfo"></notice-info>
<el-button :id="domIdCancel" @click="cancel"> </el-button> </el-dialog>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<password-box ref="password" @checkOver="confirm" />
<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 PasswordBox from './childDialog/passwordInputBox'; import NoticeInfo from './childDialog/childDialog/noticeInfo'
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'RouteControl', name: 'RouteControl',
components: { components: {
ConfirmControl, ConfirmControl,
PasswordBox, NoticeInfo
NoticeInfo },
}, data() {
data() { return {
return { dialogShow: false,
dialogShow: false, loading: false,
loading: false, selected: null,
selected: null, operation: null,
tempdata: [], stationName: '',
operation: null, signalName: ''
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 ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消列车进路';
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
return '总人解';
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return '重开信号';
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
return '信号封锁';
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路收人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
} }
} },
}, computed: {
mounted() { show() {
this.$nextTick(() => { return this.dialogShow && !this.$store.state.menuOperation.break;
this.$store.dispatch('training/tipReload'); },
}); domIdCancel() {
}, return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
methods: { },
doShow(operate, selected, tempdata) { domIdConfirm() {
this.selected = selected; return this.dialogShow ? getDomIdByOperation(this.operation) : '';
this.tempdata = tempdata; },
if (!this.dialogShow) { title() {
this.signalName = ''; if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
this.stationName = ''; return '取消列车进路';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { } else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
this.signalName = selected.name; return '信号关灯';
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); } else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
if (station) { return '重开信号';
this.stationName = station.name; }
}
},
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
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
} }
this.operation = operate.operation;
} }
this.operation = operate.operation; this.dialogShow = true;
} this.$nextTick(function () {
this.dialogShow = true; this.$store.dispatch('training/emitTipFresh');
this.$nextTick(function () { });
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); mouseCancelState(this.selected);
}, },
doClose() { commit() {
this.loading = false; if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
this.dialogShow = false; /** 取消列车进路*/
this.$store.dispatch('training/emitTipFresh'); this.cancelTrainRoute();
mouseCancelState(this.selected); } else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
}, /** 信号关灯*/
commit() { this.signalClose();
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) { } else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 取消列车进路*/ /** 信号重开*/
this.cancelTrainRoute(); this.reopenSignal();
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) { }
/** 总人解*/ },
this.humanTrainRoute(); //
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) { cancelTrainRoute() {
/** 信号重开*/ if (this.$store.state.training.prdType == '01') {
this.reopenSignal(); /** 现地工作站*/
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) { this.cancelTrainRouteByLocal();
/** 信号封锁*/ } else if (this.$store.state.training.prdType == '02') {
this.lock(); /** 行调工作站*/
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) { this.cancelTrainRouteByCentral();
/** 信号解封*/ }
this.unlock(); },
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { //
/** 进路收人工控*/ cancelTrainRouteByLocal() {
this.humanControl(); let operate = {
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) { send: true,
/** 进路交自动控*/ type: MapDeviceType.Signal.type,
this.atsAutoControl(); operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) { }
/** 信号关灯*/
this.signalClose(); 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);
});
} }
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}
},
//
cancelTrainRouteByLocal() {
const 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() {
const 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);
});
},
//
humanTrainRoute() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanTrainRoute.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.password.doShow();
}
}).catch(error => {
});
},
//
reopenSignal() {
const 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);
});
},
//
lock() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.password.doShow();
}
}).catch(error => {
});
},
//
unlock() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.unlock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$refs.password.doShow();
}
}).catch(error => {
});
},
//
humanControl() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation,
val: 'all'
};
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);
});
},
//
atsAutoControl() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
val: 'all'
};
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() {
const 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;
});
},
//
confirm() {
const operate = {
send: true,
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
//
operate.operation = OperationEvent.Signal.humanTrainRoute.menu.confirm;
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
//
operate.operation = OperationEvent.Signal.lock.menu.confirm;
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
//
operate.operation = OperationEvent.Signal.unlock.menu.confirm;
}
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() {
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(error => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} }
} }
}; </script>
</script>

View File

@ -1,47 +1,41 @@
<template> <template>
<div> <div>
<el-dialog class="ningbo_01__systerm route-detail" :title="title" :visible.sync="show" width="460px" <el-dialog class="ningbo-01__systerm route-detail" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<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-row>
<el-col :span="2"><span>车站</span></el-col> <el-col :span="10">
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled></el-input> <el-input v-model="stationName" size="small" disabled></el-input>
</el-col> </el-col>
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col> <el-col :span="10" :offset="2">
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled></el-input> <el-input v-model="signalName" size="small" disabled></el-input>
</el-col> </el-col>
</el-row> </el-row>
<div style="margin-top: 20px"> <div class="table">
<span>进路列表</span>
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row <el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
:height="140"> :height="140">
<el-table-column type="index" label="Id" width="40"> <el-table-column label="进路">
</el-table-column>
<el-table-column label="描述" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.name}}</span> <span>{{scope.row.name}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="方向" width="60"> <el-table-column prop="status" label="控制状态" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.name}}</span> <span v-if="scope.row.controlType == '01'">自动不进行冲突检测</span>
</template>
</el-table-column>
<el-table-column label="完整性">
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="控制">
<template slot-scope="scope">
<span v-if="scope.row.controlType == '01'">自动</span>
<span v-else>人工</span> <span v-else>人工</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="5" :offset="19"> <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-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -121,6 +115,25 @@
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
commit() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.detail.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() { cancel() {
let operate = { let operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,

View File

@ -1,283 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo_01__systerm route-setting"
:title="title"
:visible.sync="show"
width="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-col>
<el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-col>
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table
ref="table"
:data="tempData"
border
:cell-style="tableStyle"
style="width: 99%;"
size="mini"
height="90"
highlight-current-row
@row-click="clickEvent"
>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
<template slot-scope="scope">
{{ controlTypeNameMap[scope.row.controlType] }}
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template></template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 40px">
<el-col :span="12" :offset="12">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<!-- <password ref="password"></password> -->
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
// import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
// import Password from './childDialog/childDialog/password';
export default {
name: 'RouteSelection',
components: {
// ConfirmControl,
NoticeInfo
// Password
},
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
row: null,
operation: '',
display: true,
stationName: '',
signalName: '',
tableStyle: {
'border-bottom': 'none'
},
controlTypeNameMap: {
'01': '折返',
'02': '直通'
}
};
},
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.guide.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
},
title() {
return '办理引导进路';
},
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}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
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.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.guide();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
guide() {
//
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.guide();
if (row.canSetting) {
//
if (row.containSectionList && row.containSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
});
}
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
//
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.choose.operation,
val: row.code
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
},
commit() {
if (this.row && this.row.canSetting) {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
}
},
confirm() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.Signal.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>
.route-table-tip {
position: relative !important;
color: #3C72DF !important;
background: #ECE9D8 !important;
font-size: 12px;
top: -7px;
left: 7px;
}
.route-table-box {
margin-top: 20px !important;
line-height: 10px !important;
border: 2px solid #FFFFFF !important;
border-radius: 5px !important;
z-index: 1;
padding-bottom: 40px;
}
.item-lable {
line-height: 26px !important;
font-size: 13px;
}
</style>

View File

@ -0,0 +1,342 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="ningbo-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 prop="name" label="选择" width="55" style="margin-left:50px; text-align: right;">
<template slot-scope="scope">
<el-checkbox
v-model="scope.row.check"
style="text-align: center; display: block;"
:disabled="scope.row.disabled"
/>
</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>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteHandControl',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operation: null,
selection: [],
stationName: '',
signalName: '',
allSelect: false
};
},
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;
}
}
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路交人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
}
},
commitDisabled() {
let disabled = true;
if (this.selection && this.selection.length) {
disabled = false;
}
return disabled;
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
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;
}
}
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
elem.controlType != '01') {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
elem.controlType == '01') {
elem.disabled = true;
}
});
}
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');
mouseCancelState(this.selected);
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
}
let num = 0;
this.allSelect = false;
this.tempData.forEach(item => {
if (item.check) {
num++;
if (num == this.tempData.length) {
this.allSelect = true;
}
}
});
},
allSelectChange() {
if (this.allSelect) {
this.tempData.forEach(item => {
if (!item.disabled) {
item.check = true;
}
});
} else {
this.tempData.forEach(item => {
if (!item.disabled) {
item.check = false;
}
});
}
},
serializeCodeListWithSeparator(sep) {
const codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
});
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
const operate = {
repeat: true,
type: MapDeviceType.Signal.type,
operation: '',
val: this.serializeCodeListWithSeparator('::'),
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() {
const 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);
});
},
//
atsAutoControl() {
const 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);
});
},
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,157 @@
<template>
<div>
<el-dialog class="ningbo-01__systerm route-lock" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<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-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="signalName" size="small" disabled></el-input>
</el-col>
</el-row>
<div class="table">
<span>信号按钮列表</span>
<el-table ref="table" :data="tempData" border style="width: 100%" size="mini" highlight-current-row
:height="140">
<el-table-column prop="name" label="按钮名称">
</el-table-column>
<el-table-column prop="status" label="按钮状态">
</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"></notice-info>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'RouteLock',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
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 '封锁信号按钮'
}
},
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
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
/** status 04:封锁*/
let signal = (selected || {}).state;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? '未封锁' : '封锁' }]
let 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');
// mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.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.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,52 +1,31 @@
<template> <template>
<el-dialog <el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
v-dialogDrag <el-row class="header">
class="ningbo_01__systerm route-setting" <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="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row> <el-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col> <el-col :span="11">
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled /> <el-input v-model="stationName" size="small" disabled />
</el-col> </el-col>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col> <el-col :span="11" :offset="2">
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled /> <el-input v-model="signalName" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<div class="route-table-box"> <el-row style="margin-top: 10px; line-height: 30px;">
<span class="route-table-tip">进路列表</span> <el-col :span="11"><span>进路列表</span></el-col>
<el-table <el-col :span="11" :offset="2">
ref="table" <el-button class="expand" @click="expandPath">展开进路预览</el-button>
:data="tempData" </el-col>
border </el-row>
:cell-style="tableStyle" <el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row :show-header="false" @row-click="clickEvent">
style="width: 99%;" <el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
size="mini" </el-table>
height="150" <el-row justify="center" class="button-group">
highlight-current-row <el-col :span="8" :offset="4">
@row-click="clickEvent" <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
> </el-col>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" /> <el-col :span="8" :offset="4">
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
<template slot-scope="scope">
{{ controlTypeNameMap[scope.row.controlType] }}
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template></template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 70px">
<el-col :span="12" :offset="12">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -57,214 +36,188 @@
<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 NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'RouteSelection', name: 'RouteSelection',
components: { components: {
// ConfirmControl, NoticeInfo
NoticeInfo },
}, data() {
data() { return {
return { tempData: [],
tempData: [], beforeSectionList: [],
beforeSectionList: [], dialogShow: false,
dialogShow: false, loading: false,
loading: false, selected: null,
selected: null, row: null,
row: null, operation: '',
operation: '', display: true,
display: true, stationName: '',
stationName: '', signalName: '',
signalName: '', tableStyle: {
tableStyle: { 'border-bottom': 'none'
'border-bottom': 'none' }
}, };
controlTypeNameMap: { },
'01': '折返', computed: {
'02': '直通' show() {
} return this.dialogShow && !this.$store.state.menuOperation.break;
}; },
}, domIdCancel() {
computed: { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
show() { },
return this.dialogShow && !this.$store.state.menuOperation.break; domIdChoose() {
}, return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
domIdCancel() { },
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; domIdConfirm() {
}, return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
domIdChoose() { },
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : ''; title() {
}, return '进路设置';
domIdConfirm() { },
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; commitDisabled() {
}, let disabled = true;
title() { if (this.row) {
return '办理进路'; disabled = !this.row.canSetting;
}, }
commitDisabled() { return disabled;
let disabled = true; }
if (this.row) { },
disabled = !this.row.canSetting; mounted() {
} this.$nextTick(() => {
return disabled; this.$store.dispatch('training/tipReload');
} });
}, },
mounted() { methods: {
this.$nextTick(() => { getProtectedSectionName(row) {
this.$store.dispatch('training/tipReload'); let name = '';
}); if (row &&
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList && row.overlapSectionList &&
row.overlapSectionList && row.overlapSectionList &&
row.overlapSectionList.length > 0) { row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0]; const protect = row.overlapSectionList[0];
name = `${protect.name}`; name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode); const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) { if (station) {
name = `${name}(${station.name})`; name = `${name}(${station.name})`;
} }
} }
return name; return name;
}, },
doShow(operate, selected, tempData) { expandPath() {
this.selected = selected; console.log('展开进路预览');
// },
if (!this.dialogShow) { doShow(operate, selected, tempData) {
this.signalName = ''; this.selected = selected;
this.stationName = ''; //
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (!this.dialogShow) {
this.signalName = selected.name; this.signalName = '';
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); this.stationName = '';
if (station) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.stationName = station.name; this.signalName = selected.name;
} const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
} if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || []; this.tempData = tempData || [];
this.operation = operate.operation; this.operation = operate.operation;
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.restoreBeforeDevices(); this.restoreBeforeDevices();
this.$refs.table.setCurrentRow(); this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
restoreBeforeDevices() { restoreBeforeDevices() {
// //
if (this.beforeSectionList && this.beforeSectionList.length) { if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => { this.beforeSectionList.forEach(elem => {
elem.cutOff = false; elem.cutOff = false;
}); });
} }
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]); this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
this.beforeSectionList = []; this.beforeSectionList = [];
}, },
clickEvent(row, event, column) { clickEvent(row, event, column) {
this.row = row; this.row = row;
if (row) { if (row) {
// //
this.restoreBeforeDevices(); this.restoreBeforeDevices();
if (row.canSetting) { if (row.canSetting) {
// //
if (row.containSectionList && row.containSectionList.length) { if (row.containSectionList && row.containSectionList.length) {
// //
row.containSectionList.forEach(elem => { row.containSectionList.forEach(elem => {
elem.cutOff = true; elem.cutOff = true;
}); });
} }
this.$store.dispatch('training/updateMapState', [...row.containSectionList]); this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || []; this.beforeSectionList = row.containSectionList || [];
// //
const operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.choose.operation, operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code val: row.code
}; };
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 });
} }
}); });
} }
} }
}, },
commit() { commit() {
if (this.row && this.row.canSetting) { if (this.row && this.row.canSetting) {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.menu.operation operation: OperationEvent.Signal.arrangementRoute.menu.operation
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
} }
}, },
cancel() { cancel() {
const operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(() => { }).catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
}; };
</script> </script>
<style scoped>
.route-table-tip {
position: relative !important;
color: #3C72DF !important;
background: #ECE9D8 !important;
font-size: 12px;
top: -7px;
left: 7px;
}
.route-table-box {
margin-top: 15px !important;
line-height: 10px !important;
border: 2px solid #FFFFFF !important;
border-radius: 5px !important;
z-index: 1;
}
.item-lable {
line-height: 26px !important;
font-size: 13px;
}
</style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog class="ningbo_01__systerm section-cmd-control" :title="title" :visible.sync="show" width="800px" <el-dialog class="ningbo-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px solid lightgray;"> <div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span> <span class="base-label">命令信息</span>

View File

@ -1,19 +1,33 @@
<template> <template>
<el-dialog class="ningbo_01__systerm section-control" :title="title" :visible.sync="show" width="440px" <el-dialog class="ningbo-01__systerm section-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<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-row>
<el-col :span="3"><span>车站</span></el-col> <el-col :span="11">
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled></el-input> <el-input v-model="stationName" size="small" disabled></el-input>
</el-col> </el-col>
<el-col :span="3" :offset="2"><span>区段</span></el-col> <el-col :span="11" :offset="2">
<el-col :span="6">
<el-input v-model="sectionName" size="small" disabled></el-input> <el-input v-model="sectionName" size="small" disabled></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 10px;">
<el-col :span="11">
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
激活</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio" label="2" :disabled="radio == 1" style="display: block; text-align: center;">
切除</el-radio>
</el-col>
</el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="11" :offset="13"> <el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <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-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -39,6 +53,7 @@
operation: '', operation: '',
stationName: '', stationName: '',
sectionName: '', sectionName: '',
radio: '',
} }
}, },
computed: { computed: {
@ -55,11 +70,11 @@
if (this.operation == OperationEvent.Section.lock.menu.operation) { if (this.operation == OperationEvent.Section.lock.menu.operation) {
return '区段封锁'; return '区段封锁';
} else if (this.operation == OperationEvent.Section.split.menu.operation) { } else if (this.operation == OperationEvent.Section.split.menu.operation) {
this.radio = '2';
return '区段控制'; return '区段控制';
} else if (this.operation == OperationEvent.Section.active.menu.operation) { } else if (this.operation == OperationEvent.Section.active.menu.operation) {
this.radio = '1';
return '区段控制'; return '区段控制';
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return '区故解'
} }
} }
}, },
@ -78,10 +93,10 @@
if (selected.type === '02') { if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) { if (section) {
this.sectionName += section.name this.sectionName += section.name;
} }
} }
this.sectionName += selected.name this.sectionName += `-${selected.name}`;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
@ -111,9 +126,6 @@
} else if (this.operation == OperationEvent.Section.active.menu.operation) { } else if (this.operation == OperationEvent.Section.active.menu.operation) {
/** 轨道区段激活*/ /** 轨道区段激活*/
this.active(); this.active();
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区故解*/
this.fault();
} }
}, },
// //
@ -175,27 +187,7 @@
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
//
fault() {
let operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.fault.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() { cancel() {
let operate = { let operate = {
type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,

View File

@ -1,115 +0,0 @@
<template>
<div>
<el-dialog class="ningbo_01__systerm section-detail" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form ref="form" label-position="left" :model="formModel" label-width="100px">
<el-form-item label="区段名称">
<el-input v-model="formModel.sectionName" disabled></el-input>
</el-form-item>
<el-form-item label="车站名称">
<el-input v-model="formModel.stationName" disabled></el-input>
</el-form-item>
<el-form-item label="公里标(Km)">
<el-input v-model="formModel.kmPost" disabled></el-input>
</el-form-item>
<el-form-item label="长度(Km)">
<el-input v-model="formModel.factLength" disabled></el-input>
</el-form-item>
</el-form>
<el-row justify="center" style="margin-top: 50px">
<el-col :span="7" :offset="17">
<el-button :id="domIdConfirm" @click="commit">确定</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
formModel: {
sectionName: '',
stationName: '',
kmPost: '',
factLength: '',
},
}
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Section.detail.menu.domId : '';
},
title() {
return '无岔区段属性对话框'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
this.formModel.sectionName = selected.name;
this.formModel.factLength = '';
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.formModel.stationName = station.name;
this.formModel.kmPost = station.kmPost;
}
}
}
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() {
let operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.detail.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,554 @@
<template>
<div>
<el-dialog class="ningbo-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<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-option>
</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-input>
</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-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="限速值" label-width="80px">
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled"
@change="speedSelectChange">
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table class="table" ref="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>
<el-table-column prop="date" :width="160" label="时间">
</el-table-column>
<el-table-column prop="context" :width="180" label="执行过程">
</el-table-column>
<el-table-column prop="result" label="执行结果">
</el-table-column>
</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"></confirm-control-speed>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
import { now } from '@/utils/date';
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 '道岔名称';
}
},
speedList() {
let list = [{ name: '不限速', value: '-1' }];
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
let 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.dialogShow) {
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
return '区段设置限速';
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
return '区段取消限速'
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
return '区段设置限速';
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '区段取消限速'
}
}
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChoose() {
if (this.dialogShow) {
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;
}
}
},
domIdCommand() {
if (this.dialogShow) {
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;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
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;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
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;
}
}
},
domIdStop() {
if (this.dialogShow) {
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;
}
}
},
domIdClose() {
if (this.dialogShow) {
return 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') {
let 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) {
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.name = selected.name
}
}
let 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) {
let operate = {
type: this.type,
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/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
}
})
},
command() {
let operate = {
type: this.type,
}
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.order.operation;
operate.message = `在【${this.name}】区段,区段设置限速${this.speed}km/h确认下达吗`;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.order.operation;
operate.message = `在【${this.name}】区段,区段取消限速${this.speed}km/h确认下达吗`;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.order.operation;
operate.message = `在【${this.name}】区段,道岔设置限速${this.speed}km/h确认下达吗`;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.order.operation;
operate.message = `在【${this.name}】区段,道岔取消限速${this.speed}km/h确认下达吗`;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', 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() {
let operate = {
type: this.type,
}
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/next', 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() {
let operate = {
send: true,
type: this.type,
val: this.speed
}
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', 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((error) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
})
},
stop() {
let operate = {
type: this.type,
}
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/next', 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(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
})
},
close() {
let operate = {
type: this.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
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,212 @@
<template>
<el-dialog class="ningbo-01__systerm stand-run-level" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
<div style="margin-bottom: 5px;">
<el-input v-model="stationName" size="mini" disabled></el-input>
</div>
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
<div style="margin-bottom: 5px;">
<el-input v-model="stationStrategy" size="mini" disabled></el-input>
</div>
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
<el-table ref="table" :data="strategyList" border :cell-style="tableStyle" style="width: 100%; margin-top:10px"
size="mini" @row-click="clickEvent" height="120" highlight-current-row :show-header="false">
<el-table-column prop="label" :id="domIdChoose" style="margin-left:30px">
</el-table-column>
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { mapGetters } from 'vuex';
export default {
name: 'StandBackStrategy',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
strategyList: [
{
value: '01',
label: '无折返'
},
{
value: '02',
label: '无人折返'
},
{
value: '03',
label: '自动换端'
},
{
value: '04',
label: '关闭'
},
],
stationName: '',
stationStrategy: '',
selection: [],
isConfirm: false,
strategy: '',
tableStyle: {
'border-bottom': 'none',
}
}
},
computed: {
...mapGetters('map', [
'stationList',
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
},
title() {
return '变通策略管理';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
let stationList = [...this.stationList];
let station = this.stationList.find(n => n.code == selected.stationCode)
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
this.$nextTick(() => {
this.$refs.table.setCurrentRow(null);
})
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
this.stationName = '';
this.stationStrategy = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
this.strategyList.forEach(item => {
if (item.value == opts.reentryStrategy) {
this.stationStrategy = item.label;
}
})
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
clickEvent(row, column, event) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
val: `${row.value}`,
}
this.strategy = row.value;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
checkTableDataSelction(data) {
let selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
}
this.disabledSend = selection.length ? false : true;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.isConfirm) {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
val: `${this.strategy}`
}
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);
})
} else {
this.doClose();
}
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -1,618 +1,327 @@
<template> <template>
<el-dialog class="ningbo_01__systerm stand-detain-train" :title="title" :visible.sync="show" width="400px" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> <el-dialog
<el-row class="header"> v-dialogDrag
<el-col :span="11"> class="ningbo-01__systerm stand-detain-train"
<span>车站</span> :title="title"
<el-input style="width: 110px; margin-left: 10px;" v-model="stationName" size="small" disabled> :visible.sync="show"
</el-input> width="320px"
</el-col> :before-close="doClose"
<el-col :span="11" :offset="1"> :z-index="2000"
<span>站台</span> :modal="false"
<el-input style="width: 110px; margin-left: 10px;" v-model="standName" size="small" disabled></el-input> :close-on-click-modal="false"
</el-col> >
<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="standName" size="small" disabled />
</el-col>
</el-row>
<div v-if="!earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio"
label="1"
:disabled="radio == 2"
style="display: block; text-align: left;"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio"
label="2"
:disabled="radio == 1"
style="display: block; text-align: left;"
>
本站台下行</el-radio>
</el-col>
</el-row> </el-row>
<div v-if="DetainTrain"> </div>
<div <div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 90px;"> <span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span> <el-row style="margin-top: -13px;">
<el-row style="margin-top: -13px;"> <el-col :span="11">
<el-radio-group v-model="radio" @change="choose" :id="domIdDetainCar"> <el-radio
<el-col :span="24"> v-model="radio1"
<el-radio label="01" label="1"
style="display: block; text-align: left; float: left; margin-right: 10px;">本站台 :disabled="radio1 == '2'"
</el-radio> style="display: block; text-align: left;"
<el-radio label="02" v-if="radio1 == 2" >
style="display: block; text-align: left; float: left; margin-right: 10px;">上行全线 扣车</el-radio>
</el-radio> </el-col>
<el-radio label="03" v-if="radio1 == 2" <el-col :span="11" :offset="2">
style="display: block; text-align: left; float: left;">下行全线</el-radio> <el-radio
</el-col> v-model="radio1"
</el-radio-group> label="2"
</el-row> :disabled="radio1 == '1'"
</div> style="display: block; text-align: left;"
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;"> >
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span> 取消扣车</el-radio>
<el-row style="margin-top: -13px;"> </el-col>
<el-col :span="11">
<el-radio v-model="radio1" label="1" :disabled="radio1 == '2'"
style="display: block; text-align: left;">
扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio1" label="2" :disabled="radio1 == '1'" style="display: block; text-align: left;">取消扣车</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="JumpStop">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-col :span="24">
<el-radio-group v-model="radio" @change="chooseJumpStop">
<el-radio label="01" :id="radio == '02' ? domIdChoose : ''"
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;">
站台跳停
</el-radio>
<el-radio label="02" :id="radio == '01' ? domIdChoose : ''"
style="display: block; text-align: left; margin-left: 0; float: left;">
指定列车跳停</el-radio>
<div style="float: left; margin-left: 20px;">
<span>车组号</span>
<el-input v-if="radio1 != 2" style="width: 120px; margin-left: 20px;"
v-model="tripNumber" size="small" :id="domIdJumpStop" @blur="handleTrainNoBlur"
:disabled="radio == '01'">
</el-input>
<el-select v-if="radio1 == 2" style="width: 120px; margin-left: 20px;"
v-model="tripNumber" size="mini" @change="trainNoSelectChange"
:id="domIdCancelJumpStop" :disabled="radio == '01'">
<el-option v-for="option in trainList" :key="option.groupNumber"
:label="option.groupNumber" :value="option.groupNumber">
</el-option>
</el-select>
</div>
</el-radio-group>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="radio1" label="1" :disabled="radio1 == 2"
style="display: block; text-align: left;">
跳停</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="radio1" label="2" :disabled="radio1 == 1"
style="display: block; text-align: left;">
取消跳停</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="RunLevel">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="radio" @change="chooseStopTime">
<el-col :span="24">
<el-radio label="01" :id="radio == '02' ? domIdChoose1 : ''"
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 60px;">
自动
</el-radio>
<el-radio label="02" :id="radio == '01' ? domIdChoose1 : ''"
style="display: block; text-align: left; margin-left: 0; float: left;">
人工</el-radio>
<div style="float: left; margin-left: 20px;">
<span v-if="radio2 != 2">站停时间</span>
<span v-if="radio2 == 2">运行等级</span>
<el-input v-if="radio2 != 2" style="width: 120px; margin-left: 20px;"
v-model="trainStopTime" size="small" :id="domIdStopTime" :disabled="radio == '01'"
@blur="stopTimeBlur">
</el-input>
<el-select v-if="radio2 == 2" style="width: 120px; margin-left: 20px;"
v-model="trainRunlevel" size="mini" @change="trainNoSelectLevel" :id="domIdRunLevel"
:disabled="radio == '01'">
<el-option v-for="option in trainList" :key="option.groupNumber"
:label="option.groupNumber" :value="option.groupNumber">
</el-option>
</el-select>
</div>
</el-col>
</el-radio-group>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="effective" @change="chooseEffective">
<el-col :span="11">
<el-radio label="01" style="display: block; text-align: left;"
:id="effective == '02' ? '': domIdChoose2">
一次有效</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio label="02" style="display: block; text-align: left;"
:id="effective == '01' ? '': domIdChoose2">
一直有效</el-radio>
</el-col>
</el-radio-group>
</el-row>
</div>
</div>
<el-row 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> </el-row>
<notice-info ref="noticeInfo"></notice-info> </div>
</el-dialog> </div>
<div v-if="earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
:id="upRadioId"
v-model="radio2"
label="1"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
:id="downRadioId"
v-model="radio2"
label="2"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台下行</el-radio>
</el-col>
</el-row>
</div>
</div>
<el-row 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 { mapGetters } from 'vuex'; 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 NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'StandDetainTrain', name: 'StandDetainTrain',
components: { components: {
NoticeInfo NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '1',
radio1: '1',
radio2: '1',
earlyDepar: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
data() { domIdCancel() {
return { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '01',
radio1: '1',
radio2: '1',
DetainTrain: false,
JumpStop: false,
RunLevel: false,
trainList: [],
tripNumber: '',
effective: '01',
trainStopTime: 0,
trainRunlevel: '01',
}
}, },
computed: { domIdConfirm() {
...mapGetters('map', [ return this.dialogShow ? getDomIdByOperation(this.operation) : '';
'map' },
]), upRadioId() {
show() { return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
return this.dialogShow && !this.$store.state.menuOperation.break; },
}, downRadioId() {
domIdCancel() { return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; },
}, title() {
domIdConfirm() { this.earlyDepar = false;
return this.dialogShow ? getDomIdByOperation(this.operation) : ''; if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
}, this.radio1 = '1';
domIdDetainCar() { return '扣车';
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrain.choose.domId : ''; } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
}, this.radio1 = '2';
domIdChoose() { return '取消扣车';
if (this.radio1 == '1') { // } else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : ''; this.earlyDepar = true;
} else { // if (this.selected.direction == '01') {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
domIdJumpStop() {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : '';
},
domIdCancelJumpStop() {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : '';
},
domIdChoose1() {
if (this.radio2 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose1.domId : '';
}
},
domIdChoose2() {
if (this.radio2 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose2.domId : '';
}
},
domIdStopTime() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
},
domIdRunLevel() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
},
title() {
this.JumpStop = false;
this.RunLevel = false;
this.DetainTrain = false;
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1';
this.radio = '01';
this.DetainTrain = true;
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.radio1 = '2';
this.radio = '01';
this.DetainTrain = true;
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.JumpStop = true;
this.radio1 = '1'
return '设置跳停';
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.JumpStop = true;
this.radio1 = '2';
return '取消跳停';
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.RunLevel = true;
this.radio2 = '1';
return '设置停站时间';
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.RunLevel = true;
this.radio2 = '2'; this.radio2 = '2';
return '设置站间运行等级'; } else {
this.radio2 = '1';
} }
}, return '提前发车';
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected, tempDate = null) {
this.selected = selected;
if (!this.dialogShow) {
this.tripNumber = '';
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.direction == '01' ? '下行' : '上行';
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.direction == '01' ? '下行' : '上行';
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.radio = selected.direction;
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.trainStopTime = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
this.radio = Number(tempDate.parkingTime) === -1 ? '01' : '02';
this.effective = tempDate.parkingValidStatus ? '01' : '02';
}
this.operation = operate.operation;
this.trainList = this.map.trainList; //
}
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);
},
choose(upDown) {
// code
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
val: `${upDown}`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
handleTrainNoBlur() { //
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
val: `${this.tripNumber}`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
trainNoSelectChange(upDown) { //
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation,
val: `${upDown}`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
chooseJumpStop(upDown) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: '',
val: `${upDown}`,
}
if (this.radio1 == '1') { //
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
} else { //
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
}
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: '',
val: `${effective}`
}
if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
} else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
chooseStopTime(upDown) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: '',
val: `${upDown}`,
}
if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
} else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose1.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
stopTimeBlur() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${this.trainStopTime}`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
trainNoSelectLevel(upDown) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
val: `${upDown}`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
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.setJumpStop.menu.operation) {
this.setJumpStop(); /** 设置跳停*/
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.cancelJumpStop(); /** 取消跳停*/
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.setStopTime(); /** 设置停站时间*/
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.setRunLevel(); /** 设置站间运行等级*/
}
},
//
setDetainTrain() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
cancelDetainTrain() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
val: '',
}
if (this.radio == '02') {
operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
operate.val = '02';
} else if (this.radio == '03'){
operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
operate.val = '01';
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
//
setJumpStop() {
let val = this.radio;
if (this.radio == '02') {
val = this.radio + '::' + this.tripNumber;
}
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
val: 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);
})
},
//
cancelJumpStop() {
let val = this.radio;
if (this.radio == '02') {
val = this.radio + '::' + this.tripNumber;
}
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: val //, 01: /02:
}
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 forver = this.effective == '02' ? true : false;
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
val: [`${this.radio}`, this.trainStopTime, forver].join('::'),
}
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();
})
},
//
setRunLevel() {
let forver = this.effective == '02' ? true : false;
let val = this.radio;
if (this.radio == '02') {
val = `${this.radio}::${this.trainRunlevel}::${forver}`;
}
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
val: 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();
})
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
} }
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
if (station) {
this.stationName = station.name;
}
}
this.radio = '2';
if (this.selected.right) { //
this.radio = '1';
}
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);
},
changeRadio(val) {
const operate = {
type: MapDeviceType.StationStand.type,
operation: '',
val: val
};
if (val == 1) {
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
} else if (val == 2) {
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
});
},
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.earlyDeparture.menu.operation) {
/** 提前发车*/
this.earlyDeparture();
}
},
//
setDetainTrain() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelDetainTrain() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
earlyDeparture() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.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);
});
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
} }
} }
};
</script> </script>
<style> <style>
.stand-detain-train .context { .stand-detain-train .context {
height: 80px !important; height: 80px !important;
} }
</style> </style>

View File

@ -1,219 +1,261 @@
<template> <template>
<el-dialog <el-dialog class="ningbo-01__systerm stand-detail" :title="title" :visible.sync="show" width="400px"
v-dialogDrag :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
class="ningbo_01__systerm stand-detail" <el-tree :data="treeData" :lazy="false" class="tree-height-max" :default-expand-all="true"
:title="title" style="background: #f0f0f0;">
:visible.sync="show" <div slot-scope="{ node, data }" style="height: 24px; width: 100%;">
width="380px" <div v-if="data.level == 1" style="line-height: 26px;">{{ data.name }}</div>
:before-close="doClose" <div v-if="data.level == 2" style="background: lightgray; overflow: hidden; height: 100%;">
:z-index="2000" <div
:modal="false" style="width: 46%;float: left; height: 24px; line-height: 24px; padding-left: 5px; border-right: 1px solid #f0f0f0;">
:close-on-click-modal="false" {{ data.name }}</div>
> <div style="width: 54%;float: left; height: 24px; line-height: 24px; padding-left: 5px;">
<el-row class="header"> {{ data.value }}</div>
<el-col :span="10"> </div>
<span>车站</span> </div>
</el-col> </el-tree>
<el-col :span="10" :offset="2"> <!-- <el-row class="header">
<span>站台</span> <el-col :span="10"><span>车站名称</span></el-col>
</el-col> <el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row> </el-row>
<el-row class="header"> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-input v-model="stationName" size="small" disabled /> <el-input v-model="stationName" size="small" disabled></el-input>
</el-col> </el-col>
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled /> <el-input v-model="standName" size="small" disabled></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="content"> <div class="table">
<el-col :span="6"> <span>站台状态</span>
<span>停站时间</span> <el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
</el-col> <el-table-column prop="item" :width="140" label="项目">
<el-col :span="18"> </el-table-column>
<el-input v-model="modelData.stopTime" size="small" disabled /> <el-table-column prop="status" label="状态">
</el-col> </el-table-column>
</el-row> </el-table>
<el-row class="content"> </div> -->
<el-col :span="6"> <el-row justify="center" class="button-group">
<span>运行等级</span> <el-col :span="10" :offset="2">
</el-col> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-col :span="18"> </el-col>
<el-input v-model="modelData.runLevel" size="small" disabled /> <el-col :span="8" :offset="4">
</el-col> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-row> </el-col>
<el-row class="content"> </el-row>
<el-col :span="6"> <notice-info ref="noticeInfo"></notice-info>
<span>扣车</span> </el-dialog>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.detainCar" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>跳停</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.jumpStop" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="18">
<span style="opacity: 0;">1</span>
</el-col>
<el-col :span="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'StandDetail', name: 'StandDetail',
components: { components: {
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
tempData: [], tempData: [],
stationName: '', stationName: '',
standName: '', standName: '',
strategyMap: { strategyMap: {
'01': '无折返', '01': '无折返',
'02': '无人折返', '02': '无人折返',
'03': '自动换端', '03': '自动换端',
'04': '默认' '04': '默认'
}, },
modelData: { treeData: [
stopTime: '自动', {
runLevel: '自动', children: [
detainCar: '无扣车', {
jumpStop: '无跳停' name: '车站',
} value: '',
}; level: 2,
}, },
computed: { {
...mapGetters('map', [ name: '站台',
'stationList' value: '',
]), level: 2,
show() { },
return this.dialogShow && !this.$store.state.menuOperation.break; {
}, name: '停站时间',
domIdCancel() { value: '',
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; level: 2,
}, },
domIdConfirm() { {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : ''; name: '跳停',
}, value: '',
title() { level: 2,
return '站台信息'; }
} ],
}, name: '站台基本信息',
mounted() { level: 1,
this.$nextTick(() => { },
this.$store.dispatch('training/tipReload'); {
}); children: [
}, {
methods: { name: '中心扣车',
loadInitData(selected, opts) { value: '',
this.tempData = []; level: 2,
},
{
name: '车站扣车',
value: '',
level: 2,
}
],
name: '扣车',
level: 1,
},
{
children: [
{
name: '上行站台',
value: '',
level: 2,
},
{
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, opts) {
this.tempData = [];
// const stationList = this.stationList.slice(); let stationList = this.stationList.slice();
const index = this.stationList.findIndex(n => n.code == selected.stationCode); let index = this.stationList.findIndex(n => n.code == selected.stationCode);
// let stationStand; let stationStand, station;
// let station; if (selected.direction == '01') { //
if (selected.direction == '01') { // //
// if (index != 0) {
if (index != 0) { stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code); station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); }
} } else {
} else { //
// if (index != this.stationList.length - 1) {
if (index != this.stationList.length - 1) { stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code); station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); }
} }
}
this.modelData = { /** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动', // this.tempData.push({ item: '', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '' : '' });
runLevel: opts.intervalRunTime > 0 ? '常速': '自动', // this.tempData.push({ item: '', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '' : '' });
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车', //
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停' this.treeData[1].children[0].value = opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置';
}; //
}, this.treeData[1].children[1].value = opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置';
doShow(operate, selected, opts) { // this.tempData.push({ item: '', status: opts.parkingTime != -1 ? opts.parkingTime : '' });
this.selected = selected; //
if (!this.dialogShow) { this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动';
this.standName = ''; //
this.stationName = ''; this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { if (!stationStand || !station) {
this.standName = selected.direction == '01' ? '下行' : '上行'; this.tempData.push({ item: '运行等级', status: `自动` });
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); } else {
if (station) { this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `${station.name}${stationStand.name}:人工` : `${station.name}${stationStand.name}:自动` });
this.stationName = station.name; }
} // this.tempData.push({ item: '', status: opts.jumpStopStatus != '01' ? '' : '' });
} this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' });
this.loadInitData(selected, opts); },
} doShow(operate, selected, opts) {
this.dialogShow = true; this.selected = selected;
this.$nextTick(function () { if (!this.dialogShow) {
this.$store.dispatch('training/emitTipFresh'); // this.standName = '';
}); // this.stationName = '';
}, this.treeData[0].children[0].value = '';
doClose() { if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.loading = false; // this.standName = selected.name;
this.dialogShow = false; this.treeData[0].children[1].value = selected.name;
this.$store.dispatch('training/emitTipFresh'); let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
mouseCancelState(this.selected); if (station) {
}, // this.stationName = station.name;
commit() { this.treeData[0].children[0].value = station.name;
const operate = { // this.treeData[0].children[1].value = station.runPlanName
type: MapDeviceType.StationStand.type, }
operation: OperationEvent.Command.close.confirm.operation }
}; this.loadInitData(selected, opts);
}
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() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(() => { }).catch(error => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
}); })
}, },
cancel() { cancel() {
const operate = { let operate = {
type: MapDeviceType.StationStand.type, type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation,
}; }
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(() => { }).catch(error => {
this.doClose(); this.doClose();
}); });
} }
} }
};
</script>
<style>
.content {
margin-top: 20px;
} }
</style> </script>

View File

@ -0,0 +1,180 @@
<template>
<el-dialog class="ningbo-01__systerm stand-detain-train-all" :title="title" :visible.sync="show" width="340px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px double lightgray; ">
<span class="base-label">范围</span>
<el-row>
<el-radio-group v-model="upDown" @change="choose">
<el-col :span="10">
<el-radio label="02" :id="upDown == '01' ? domIdChoose : ''">上行全线</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio label="01" :id="upDown == '02' ? domIdChoose : ''">下行全线</el-radio>
</el-col>
</el-radio-group>
</el-row>
</div>
<div class="table">
<span>扣车站台列表中心设置</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" empty-text="所有站台都无扣车状态" height="160" highlight-current-row>
<el-table-column prop="stationName" label="车站名称">
</el-table-column>
<el-table-column prop="standName" :width="140" label="扣车站台">
</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" :disabled="disabled" @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"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'StandDetainTrainAll',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
upDown: '01',
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) {
if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
return '全线取消扣车';
} else {
return '全线取消跳停';
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
loadTableData() {
this.tempData = [];
this.stationStandList.forEach(elem => {
/** status 01: 未扣车*/
let stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).state;
let station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {}).model;
if (station && stand && stand.holdStatus != '01' && Number(elem.direction) === Number(this.upDown)) {
this.tempData.push({ stationName: station.name, standName: elem.name });
}
});
//
if (this.tempData.length > 0) {
this.disabled = false;
}
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.loading = false;
this.upDown = selected.direction;
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');
mouseCancelState(this.selected);
},
choose(upDown) {
//
this.loadTableData();
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
val: `${upDown}`,
}
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.cancelDetainTrainAll.menu.operation,
val: this.upDown,
}
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.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -0,0 +1,353 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px" :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="standName" size="small" disabled />
</el-col>
</el-row>
<el-form label-width="70px" size="mini" style="">
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
</div>
</el-radio-group>
<el-row>
<el-col :span="10">
<el-radio-group :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
</div>
</el-radio-group>
</el-col>
<el-col :span="11" align="top" :offset="2">
<span>车组号</span>
<el-select
:id="selectTrainId"
v-model="model.tripNumber"
style="width: 110px;"
size="mini"
:disabled="!model.val2"
@change="trainNoSelectChange"
>
<el-option
v-for="option in trainList"
:key="option.groupNumber"
:label="option.groupNumber"
:value="option.groupNumber"
/>
</el-select>
</el-col>
</el-row>
</el-row>
</el-form>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
:label="JumpStopSet"
:disabled="radio1 == JumpStopCancel"
style="display: block; text-align: left;"
>
设置</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
:label="JumpStopCancel"
:disabled="radio1 == JumpStopSet"
style="display: block; text-align: left;"
>
取消</el-radio>
</el-col>
</el-row>
</div>
<el-row 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 { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandDetainTrains',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
trainList: [],
radio1: '',
model: {
val1: '',
val2: '',
tripNumber: '',
direction: ''
}
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selectTrainId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
selfStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
}
},
otherStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
},
title() {
return '跳停';
},
upstream() {
return '02'; //
},
downstream() {
return '01'; //
},
JumpStopSet() {
return OperationEvent.StationStand.setJumpStop.menu.operation;
},
JumpStopCancel() {
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
}
},
watch: {
'model.val1'(val) {
if (val) this.model.val2 = '';
},
'model.val2'(val) {
if (val) this.model.val1 = '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.radio1 = '',
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
if (station) {
this.stationName = station.name;
}
}
this.model.direction = '01';
this.model.val1 = '01'; // , 01: /02:
if (this.selected.right) {
this.model.direction = '02';
this.model.val1 = '02';
}
this.radio1 = operate.operation;
this.model.val2 = '';
this.model.tripNumber = '';
/** 加载列车数据*/
this.trainList = this.map.trainList;
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.StationStand.setJumpStop.menu.operation) {
/** 设置跳停*/
this.setJumpStop();
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
/** 取消跳停*/
this.cancelJumpStop();
}
},
//
setJumpStop() {
let val = this.model.val1;
if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber;
}
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
// val: this.selected.direction //, 01: /02:
val: val
};
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);
});
},
//
cancelJumpStop() {
let val = this.model.val1;
if (this.model.val2) {
val = this.model.val2 + '::' + this.model.tripNumber;
}
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
val: val // , 01: /02:
};
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 = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
upAndDownStreamChangeVal1(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
this.model.val2 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
upAndDownStreamChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
this.model.val1 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoSelectChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
this.model.val1 = '';
const operate = {
type: MapDeviceType.StationStand.type,
operation: operation,
val: val
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -0,0 +1,336 @@
<template>
<el-dialog class="ningbo-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<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-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input>
</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="180" label="下一站台">
</el-table-column>
<el-table-column prop="level" label="运行等级">
<template slot-scope="scope">
<el-select v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)"
:id='chooseLevelId'>
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="time" label="区间运行时间">
<template slot-scope="scope">
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange"
:disabled="scope.row.level == 0" :id='domIdChoose'>
<el-option v-for="item in timeList[scope.row.level]" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="check" label="一直有效">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'>
</el-checkbox>
</template>
</el-table-column>
</el-table>
</div>
<!-- <el-row class="button-group">
<span v-if="isSelect && tempData.length">提示: 未选中要设置运行等级的下一站台</span>
<span v-if="isConfirm && tempData.length">提示: 选中要设置运行等级的下一站台为{{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">
确定</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"></confirm-control>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
export default {
name: 'StandRunLevel',
components: {
ConfirmControl
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
maxRunLevel: 300,
stationName: '',
standName: '',
selection: [],
levelList: [
{
value: '0',
label: '自动',
},
{
value: '1',
label: '1',
},
{
value: '2',
label: '2',
},
{
value: '3',
label: '3',
},
{
value: '4',
label: '4',
},
],
isSelect: true,
isConfirm: false,
time: ''
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
computed: {
...mapGetters('map', [
'stationList',
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
chooseLevelId() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseLevel.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 '设置运行等级';
},
timeList() {
let list = {
'0': [{ value: 0, label: '0' }],
'1': [], // 120 - 110
'2': [], // 100 - 90
'3': [], // 80 - 70
'4': [], // 60 - 50
}
for (var i = 110; i <= 120; i++) {
list['1'].push({ value: i, label: `${i}` })
}
for (var i = 90; i <= 100; i++) {
list['2'].push({ value: i, label: `${i}` })
}
for (var i = 70; i <= 80; i++) {
list['3'].push({ value: i, label: `${i}` })
}
for (var i = 50; i <= 60; i++) {
list['4'].push({ value: i, label: `${i}` })
}
return list;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
getLevelByTime(time) {
return Object.keys(this.timeList).findIndex(key => {
return this.timeList[key].findIndex(obj => {
return obj.value === time;
}) >= 0;
}).toString();
},
loadInitData(selected, opts) {
this.tempData = [];
let stationList = this.stationList.slice();
let index = this.stationList.findIndex(n => n.code == selected.stationCode)
if (selected.direction == '01') { //
//
if (index != 0) {
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
}
} else {
//
if (index != this.stationList.length) {
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
}
}
},
doShow(operate, selected, opts) {
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.deviceStationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
checkTableDataSelction(data) {
let selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
}
this.disabledSend = selection.length ? false : true;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
timeSelectChange(time) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString(),
}
this.time = time.toString();
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
levelSelectChange(row) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
val: row.level.toString(),
}
this.time = row.time = this.timeList[row.level][0].value;
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
checkChange(check) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.check.operation,
val: check.toString(),
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
if (this.isConfirm) {
let forver = this.tempData[0].check ? true : false;
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
// operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
// messages: [`${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? `` : `${this.tempData[0].time}s`},${this.tempData[0].check ? '' : ''}`],
val: [this.time, forver].join('::'),
}
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();
})
} else {
this.doClose();
}
},
cancel() {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>

View File

@ -0,0 +1,238 @@
<template>
<el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<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-input>
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input>
</el-col>
</el-row>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;">
<span class="base-label" style="left: -9px;">模式</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="control" @change='chooseControl' style="width: 40%;float: left;">
<div style="margin-bottom: 10px;">
<el-radio label="01" :id="control === '01'? '': domIdChoose1">自动</el-radio>
</div>
<el-radio label="02" :id="control === '02'? '': domIdChoose1">全人工</el-radio>
</el-radio-group>
<el-input-number v-model="time" @change="inputTime" :disabled="disabledInput" :id="domIdInput"
controls-position="right" :min="0" size="mini"
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;">
</el-input-number>
<div style="float: left;margin-top: 22px; margin-left: 5px;"></div>
</div>
</div>
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
<span class="base-label" style="left: -9px;">有效次数</span>
<div style=" position: relative; top:-10px;">
<el-radio-group v-model="effective" @change="chooseEffective" :disabled="disabledTime">
<el-radio :label="false" :id="effective === false? '': domIdChoose2">一次有效</el-radio>
<el-radio :label="true" :id="effective === true? '': domIdChoose2">一直有效</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"></confirm-control>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
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: '01',
effective: false,
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 : '';
},
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 '停站时间';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
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;
let station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
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.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
chooseControl(control) {
/** 自动时的默认时间*/
if (control == '01') {
this.inputTime = 15;
this.effective = true;
}
let 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) {
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(); });
}
}
}
</script>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog class="ningbo_01__systerm station-cmd-control" :title="title" :visible.sync="show" width="800px" <el-dialog class="ningbo-01__systerm station-cmd-control" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px solid lightgray;"> <div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span> <span class="base-label">命令信息</span>

View File

@ -0,0 +1,118 @@
<template>
<el-dialog class="ningbo-01__systerm station-human-control-all" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<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">确定</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"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'StationHumanControlAll',
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '全集中站进路交人工控';
},
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, selected) {
this.selected = selected;
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');
mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.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.Station.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.station-human-control-all .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -0,0 +1,138 @@
<template>
<el-dialog class="ningbo-01__systerm station-set-route-control-all" :title="title" :visible.sync="show"
width="320px" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body
v-dialogDrag>
<div style="padding: 0px 10px">
<el-form size="small" label-width="90px" label-position="left" ref="form">
<el-form-item label="集中站名称:" prop="stationName">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-form-item>
</el-form>
<el-radio-group v-model="mode">
<el-row>
<el-radio :label="true">检查冲突</el-radio>
</el-row>
<el-row style="margin-top: 20px">
<el-radio :label="false">不检查冲突</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">确定</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"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'StationSetRouteControlAll',
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null,
stationName: '',
mode: true,
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '全集中站设置进路控制模式';
},
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) {
this.selected = 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');
mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
val: this.mode
};
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.Station.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.station-set-route-control-all .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog class="ningbo_01__systerm switch-cmd-control" :title="title" :visible.sync="show" width="800px" <el-dialog class="ningbo-01__systerm switch-cmd-control" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 10px 20px; border: 1px solid lightgray;"> <div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span> <span class="base-label">命令信息</span>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm switch-control" :title="title" :visible.sync="show" width="300px" <el-dialog class="ningbo-01__systerm switch-control" :title="title" :visible.sync="show" width="300px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header"> <el-row class="header">
<el-col :span="11"><span>车站名称</span></el-col> <el-col :span="11"><span>车站名称</span></el-col>
@ -22,21 +22,18 @@
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo"></notice-info>
<password-box ref="passwordBox" @checkOver="toSwitchControl"></password-box>
</el-dialog> </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 NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo'
import PasswordBox from './childDialog/passwordInputBox';
export default { export default {
name: 'SwitchControl', name: 'SwitchControl',
components: { components: {
NoticeInfo, NoticeInfo
PasswordBox,
}, },
data() { data() {
return { return {
@ -68,19 +65,9 @@
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) { } else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
return '道岔强扳'; return '道岔强扳';
} else if (this.operation == OperationEvent.Switch.split.menu.operation) { } else if (this.operation == OperationEvent.Switch.split.menu.operation) {
return '区段切除'; return '区段切除'
} else if (this.operation == OperationEvent.Switch.active.menu.operation) { } else if (this.operation == OperationEvent.Switch.active.menu.operation) {
return '区段激活'; return '区段激活'
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
return '单操到定位';
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
return '单操到反位';
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
return '区故解';
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
return '道岔解锁';
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '道岔解封';
} }
} }
}, },
@ -116,13 +103,12 @@
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
commit() { commit() {
//debugger;
if (this.operation == OperationEvent.Switch.lock.menu.operation) { if (this.operation == OperationEvent.Switch.lock.menu.operation) {
/** 道岔单锁*/ /** 道岔单锁*/
this.lock(); this.lock();
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) { } else if (this.operation == OperationEvent.Switch.block.menu.operation) {
/* 道岔解锁*/ /** 道岔封锁*/
this.unlock(); this.block();
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) { } else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
/** 道岔转动*/ /** 道岔转动*/
this.turnout(this.operation); this.turnout(this.operation);
@ -135,21 +121,6 @@
} else if (this.operation == OperationEvent.Switch.active.menu.operation) { } else if (this.operation == OperationEvent.Switch.active.menu.operation) {
/** 区段激活*/ /** 区段激活*/
this.active(); this.active();
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
/*单操到正位*/
this.locate();
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
/*单操到反位*/
this.reverse();
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
/** 道岔封锁*/
this.openPasswordBox(this.operation);
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
/*道岔解封*/
this.openPasswordBox(this.operation);
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
/*区故解*/
this.openPasswordBox(this.operation);
} }
}, },
// //
@ -158,7 +129,7 @@
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.lock.menu.operation, operation: OperationEvent.Switch.lock.menu.operation,
}; }
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -172,54 +143,13 @@
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
//
unlock() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.unlock.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);
});
},
// //
block() { block() {
let operate = { let operate = {
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.block.menu.operation, operation: OperationEvent.Switch.block.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);
});
},
//
unblock() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.unblock.menu.operation,
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -297,105 +227,18 @@
send: true, send: true,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.active.menu.operation, operation: OperationEvent.Switch.active.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);
});
},
//
locate() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.locate.menu.operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = true;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
reverse() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.reverse.menu.operation,
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = true;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
fault() {
let operate = {
send: true,
type: MapDeviceType.Switch.type,
operation: OperationEvent.Switch.fault.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);
});
},
//
openPasswordBox(operation) {
let operate = {
type: MapDeviceType.Switch.type,
operation: operation,
};
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.passwordBox.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
toSwitchControl(operation) {
if (operation === OperationEvent.Switch.fault.menu.operation) {
this.fault();
} else if (operation === OperationEvent.Switch.block.menu.operation) {
this.block();
} else if (operation === OperationEvent.Switch.unblock.menu.operation) {
this.unblock();
} }
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() { cancel() {
let operate = { let operate = {

View File

@ -0,0 +1,176 @@
<template>
<el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<div style="width: 96%;display:flex;flex-dorection:row">
<!-- <el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" disabled></el-input>
</el-form-item> -->
<el-form-item label="车 次 号:" label-width="95px" prop="trainSource">
<el-input v-model="addModel.trainSource" :id="domIdTrainSource" @change="handerTrainSource"></el-input>
</el-form-item>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
},
rules: {
// tripNumber: [
// { required: true, message: '', trigger: 'blur' }
// ],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
// stationStandSource: [
// { required: true, message: '', trigger: 'change' }
// ],
// trainGoal: [
// { required: true, message: '', trigger: 'blur' }
// ],
// stationStandGoal: [
// { required: true, message: '', 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 : '';
},
domIdTrainSource() {
// return this.dialogShow ? OperationEvent.Train.trainSource.menu.domId : '';
return this.dialogShow ? OperationEvent.Train.setPlanTrainId.menu.domId : '';
},
title() {
return '添加计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
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);
mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
// operation: OperationEvent.Train.moveTrainId.menu.operation,
operation: OperationEvent.Train.addPlanTrainId.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);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
},
handerTrainSource() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.trainSource.menu.operation,
val: this.addModel.trainSource
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
}
</script>
<style scoped>
.ningbo-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,155 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm route-create"
:title="title"
:visible.sync="show"
width="580px"
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="列车:" prop="trainCode">
<el-select v-model="trainCode" filterable placeholder="列车">
<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="direction">
<el-select v-model="direction" filterable placeholder="列车方向">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
</el-form-item>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
trainList: [],
trainNoList: [],
directionList: [
{
value: '2',
label: '上行'
},
{
value: '1',
label: '下行'
}
],
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 '设置列车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
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');
mouseCancelState(this.selected);
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.newtrain.menu.operation,
val: '' + this.direction + '::' + this.trainCode
};
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() {
const operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>

View File

@ -0,0 +1,172 @@
<template>
<el-dialog class="ningbo-01__systerm train-define" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车站</el-col>
<el-col :span="11" :offset="1">车次窗</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="12">新车组号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.tripNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainDefine',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
tripNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
},
title() {
return '定义车组号'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
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);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.input.operation,
val: this.addModel.tripNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.tripNumber
}
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.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-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,169 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo-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="addModel" :rules="rules">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</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">确定</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 { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
// import { getPublishMapTrainNos } from '@/api/runplan';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.delTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
title() {
return '删除车组号';
}
},
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) {
this.selected = 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);
mouseCancelState(this.selected);
},
inputGroupNumber() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.input.operation,
val: this.addModel.groupNumber
};
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,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.menu.operation,
val: this.addModel.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 = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,6 +1,27 @@
<template> <template>
<el-dialog class="ningbo_01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> <!-- <el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="640px" :before-close="doClose" :zIndex="2000" -->
<el-dialog class="ningbo-01__systerm train-set-plan" :title="title" :visible.sync="show" width="380px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<div style="overflow: hidden;">
<div style="width: 98%; float: left; padding: 10px 15px; margin: 20px 0px; height: 120px;">
<!-- <span class="base-label">目的</span> -->
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="trainGoal" style="width:280px">
<el-input v-model="addModel.trainGoal"></el-input>
</el-form-item>
</div>
</div>
</div>
</el-form>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
@ -17,25 +38,37 @@
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'TrainAdd', name: 'TrainMove',
components: { components: {
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
addModel: { addModel: {
// trainNo: '',
trainSource: '',
// stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
}, },
rules: { rules: {
// groupNumber: [ // trainNo: [
// { required: true, message: '', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
// ],
// stationStandCode: [
// { required: true, message: '', trigger: 'change' }
// ], // ],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
// stationStandSource: [
// { required: true, message: '', trigger: 'change' }
// ],
trainGoal: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
}, },
operation: null,
dialogShow: false, dialogShow: false,
loading: false, loading: false,
} }
@ -51,10 +84,10 @@
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : ''; return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
}, },
title() { title() {
return '设置限速' return '删除计划车'
} }
}, },
mounted() { mounted() {
@ -63,14 +96,11 @@
}) })
}, },
methods: { methods: {
doShow(operate) { doShow(operate, selected) {
this.operate = operate || {}; //
this.operation = operate.operation;
if (!this.dialogShow) { if (!this.dialogShow) {
this.loading = false;
}
}
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -80,6 +110,7 @@
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
}, },
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
@ -87,7 +118,8 @@
let operate = { let operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation, // operation: OperationEvent.Train.moveTrainId.menu.operation,
operation: OperationEvent.Train.deletePlanTrainId.menu.operation,
} }
this.loading = true; this.loading = true;
@ -95,8 +127,6 @@
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(error => {
this.loading = false; this.loading = false;
@ -124,7 +154,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.ningbo_01__systerm .el-dialog .base-label { .fuzhou_01 .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -0,0 +1,172 @@
<template>
<el-dialog class="ningbo-01__systerm train-edit" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">新车组号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="12">车站</el-col>
<el-col :span="11" :offset="1">车次窗</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainEdit',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '修改计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
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);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.groupNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber
}
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.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-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,151 @@
<template>
<el-dialog class="ningbo-01__systerm train-flag" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车组号:</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber"></el-input>
</el-col>
</el-row>
<el-row style="margin-top: 15px; margin-bottom: 30px">
<el-col :span="24">
<el-radio-group v-model="addModel.type" :disabled="true">
<el-radio label="01">备选项</el-radio>
<el-radio label="02">备选项</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainFlag',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
type: '01',
groupNumber: '',
},
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.editTrainId.menu.domId : '';
},
title() {
return 'ATP切除功能'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
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);
mouseCancelState(this.selected);
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
}
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.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-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,172 @@
<template>
<el-dialog class="ningbo-01__systerm train-move" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车组号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="12">车站</el-col>
<el-col :span="11" :offset="1">车次窗</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainMove',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
},
title() {
return '平移车组号'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
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);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.input.operation,
val: this.addModel.groupNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.groupNumber
}
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.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, 0.3);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,185 @@
<template>
<!-- <el-dialog class="fuzhou_01 stand-stop-time" :title="title" :visible.sync="show" width="640px" :before-close="doClose" :zIndex="2000" -->
<el-dialog class="ningbo-01__systerm train-set-plan" :title="title" :visible.sync="show" width="640px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<!-- <div style="width: 46%;">
<el-form-item label="车 组 号:" label-width="95px" prop="trainNo">
<el-input v-model="addModel.trainNo" disabled></el-input>
</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"></span>
<div style="position: relative; top:-10px;">
<!-- <el-form-item prop="stationStandSource">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="车 次 号:" prop="trainSource">
<el-input v-model="addModel.trainSource"></el-input>
</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">目的</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="trainGoal">
<el-input v-model="addModel.trainGoal"></el-input>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'TrainMove',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
// trainNo: '',
trainSource: '',
// stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
},
rules: {
// trainNo: [
// { required: true, message: '', trigger: 'blur' }
// ],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
// stationStandSource: [
// { required: true, message: '', trigger: 'change' }
// ],
trainGoal: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: '请选择车站', 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 '平移计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
}
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) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
// operation: OperationEvent.Train.moveTrainId.menu.operation,
operation: OperationEvent.Train.moveEventlyTrainId.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);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.fuzhou_01 .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,172 @@
<template>
<el-dialog class="ningbo-01__systerm train-set-head" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车组号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="12">目的地号</el-col>
<el-col :span="11" :offset="1">车次号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.targetCode" :disabled="true"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.tripNumber" :disabled="true"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainSetHead',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
targetCode: '',
tripNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '设置头码车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
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);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.groupNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber
}
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.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-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,156 @@
<template>
<el-dialog class="ningbo-01__systerm train-set-plan" :title="title" :visible.sync="show" width="360px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="12">车组号</el-col>
<el-col :span="11" :offset="1">车次号</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.groupNumber"></el-input>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="addModel.tripNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainSetPlan',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
tripNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '设置计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
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);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.tripNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
}
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.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-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,156 @@
<template>
<el-dialog class="ningbo-01__systerm train-set-work" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="6">车组号:</el-col>
<el-col :span="18">
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default {
name: 'TrainSetWork',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '设置人工车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
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);
mouseCancelState(this.selected);
},
inputGroupNumber() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.tripNumber
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
}
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.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-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

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

View File

@ -86,8 +86,9 @@
</template> </template>
</template> </template>
</div> </div>
<station-control-convert ref="stationControlConvert" /> <station-control ref="stationControl" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" /> <detain-train-contorl ref="detainTrainContorl" />
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
<view-train-id ref="viewTrainId" /> <view-train-id ref="viewTrainId" />
<view-name ref="viewName" /> <view-name ref="viewName" />
<view-device ref="viewDevice" /> <view-device ref="viewDevice" />
@ -97,25 +98,23 @@
<train-delete ref="trainDelete" /> <train-delete ref="trainDelete" />
<manage-user ref="manageUser" /> <manage-user ref="manageUser" />
<help-about ref="helpAbout" /> <help-about ref="helpAbout" />
<set-limit-speed ref="setLimitSpeed" />
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic'; import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
// import { OperateMode } from '@/scripts/ConstDic';
import { menuBarConvert, SystemType } from './utils/menuItemStatus'; import { menuBarConvert, SystemType } from './utils/menuItemStatus';
import StationControlConvert from './menuDialog/stationControlConvert'; import StationControl from './menuDialog/stationControl';
import DetainTrainContorl from './menuDialog/detainTrainContorl';
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
import TrainAdd from './menuDialog/trainAdd'; import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet'; import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete'; import TrainDelete from './menuDialog/trainDelete';
import PasswordBox from './menuDialog/passwordBox';
import ViewTrainId from './menuDialog/viewTrainId'; import ViewTrainId from './menuDialog/viewTrainId';
import ViewName from './menuDialog/viewName'; import ViewName from './menuDialog/viewName';
import ViewDevice from './menuDialog/viewDevice'; import ViewDevice from './menuDialog/viewDevice';
import ManageUser from './menuDialog/manageUser'; import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout'; import HelpAbout from './menuDialog/helpAbout';
import SetLimitSpeed from './menuDialog/setLimitSpeed';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
@ -123,8 +122,9 @@ export default {
name: 'MenuBar', name: 'MenuBar',
components: { components: {
NoticeInfo, NoticeInfo,
StationControlConvert, StationControl,
PasswordBox, DetainTrainContorl,
DetainTrainContorlUpDown,
ViewTrainId, ViewTrainId,
ViewName, ViewName,
ViewDevice, ViewDevice,
@ -132,8 +132,7 @@ export default {
TrainTranstalet, TrainTranstalet,
TrainDelete, TrainDelete,
ManageUser, ManageUser,
HelpAbout, HelpAbout
SetLimitSpeed
}, },
props: { props: {
selected: { selected: {
@ -168,6 +167,18 @@ export default {
{ {
type: 'separator' type: 'separator'
}, },
{
title: '站遥控',
operate: OperationEvent.MixinCommand.remoteControl.mbar,
click: this.stationRemoteControl
},
{
title: '区域选择',
click: this.undeveloped
},
{
type: 'separator'
},
{ {
title: '连接主用中心', title: '连接主用中心',
click: this.undeveloped click: this.undeveloped
@ -185,22 +196,6 @@ export default {
} }
] ]
}, },
{
title: '临时限速',
operate: OperationEvent.Command.mBar.limitSpeed,
children: [
{
title: '设置临时限速',
operate: OperationEvent.Section.setLimitSpeed,
click: this.setLimitSpeed
},
{
title: '取消临时限速',
operate: OperationEvent.Section.cancelSpeed,
click: this.cancleLimitSpeed
}
]
},
{ {
title: '查看', title: '查看',
operate: OperationEvent.Command.mBar.check, operate: OperationEvent.Command.mBar.check,
@ -370,23 +365,27 @@ export default {
}, },
{ {
title: '批处理命令', title: '批处理命令',
operate: '', operate: OperationEvent.Command.mBar.detainControl,
children: [ children: [
{ {
title: '全线扣车', title: '全线扣车',
click: this.undeveloped operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll
}, },
{ {
title: '取消全线扣车', title: '取消全线扣车',
click: this.undeveloped operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll
}, },
{ {
title: '取消上行全线扣车', title: '取消上行全线扣车',
click: this.undeveloped operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll
}, },
{ {
title: '取消下行全线扣车', title: '取消下行全线扣车',
click: this.undeveloped operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll
} }
] ]
}, },
@ -435,6 +434,18 @@ export default {
{ {
type: 'separator' type: 'separator'
}, },
{
title: '站遥控',
operate: OperationEvent.MixinCommand.remoteControl.mbar,
click: this.stationRemoteControl
},
{
title: '区域选择',
click: this.undeveloped
},
{
type: 'separator'
},
{ {
title: '连接主用中心', title: '连接主用中心',
click: this.undeveloped click: this.undeveloped
@ -452,22 +463,6 @@ export default {
} }
] ]
}, },
{
title: '临时限速',
operate: OperationEvent.Command.mBar.limitSpeed,
children: [
{
title: '设置临时限速',
operate: OperationEvent.Section.setLimitSpeed,
click: this.setLimitSpeed
},
{
title: '取消临时限速',
operate: OperationEvent.Section.cancelSpeed,
click: this.cancleLimitSpeed
}
]
},
{ {
title: '查看', title: '查看',
operate: OperationEvent.Command.mBar.check, operate: OperationEvent.Command.mBar.check,
@ -637,23 +632,27 @@ export default {
}, },
{ {
title: '批处理命令', title: '批处理命令',
operate: '', operate: OperationEvent.Command.mBar.detainControl,
children: [ children: [
{ {
title: '全线扣车', title: '全线扣车',
click: this.undeveloped operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll
}, },
{ {
title: '取消全线扣车', title: '取消全线扣车',
click: this.undeveloped operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll
}, },
{ {
title: '取消上行全线扣车', title: '取消上行全线扣车',
click: this.undeveloped operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll
}, },
{ {
title: '取消下行全线扣车', title: '取消下行全线扣车',
click: this.undeveloped operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll
} }
] ]
}, },
@ -755,7 +754,9 @@ export default {
}, },
initMenu(menu) { initMenu(menu) {
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode); this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.menu[2].children = this.initStationList(); if (this.menu[2]) {
this.menu[2].children = this.initStationList();
}
this.clickEvent(); this.clickEvent();
this.closeMenu(true); this.closeMenu(true);
}, },
@ -849,22 +850,23 @@ export default {
this.closeMenu(true); this.closeMenu(true);
} }
}, },
// //
turnToStationControl(order) { stationRemoteControl(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate); this.$refs.stationControl.doShow(operate);
} }
}); });
}, },
// // 线
mandatoryStationControl(order) { setDetainTrainAll(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
@ -873,21 +875,52 @@ export default {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate); this.$refs.detainTrainContorl.doShow(operate);
} }
}); });
}, },
// // 线
conterStationControl(order) { cancelDetainTrainAll(order) {
const operate = { const operate = {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate); this.$refs.detainTrainContorl.doShow(operate);
}
});
},
//
cancelUpDetainTrainAll(order) {
const operate = {
type: 'bar',
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.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
cancelDownDetainTrainAll(order) {
const operate = {
type: 'bar',
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.detainTrainContorlUpDown.doShow(operate);
} }
}); });
}, },
@ -1017,32 +1050,6 @@ export default {
} }
} }
}, },
setLimitSpeed(order) {
const operate = {
type: 'bar',
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.setLimitSpeed.doShow(operate, true);
}
});
},
cancleLimitSpeed(order) {
const operate = {
type: 'bar',
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.setLimitSpeed.doShow(operate, false);
}
});
},
undeveloped() { undeveloped() {
this.doClose(); this.doClose();
this.$alert('实现中......', '提示', { this.$alert('实现中......', '提示', {

View File

@ -0,0 +1,389 @@
<template>
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
<button
:id="Signal.arrangementRoute.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.arrangementRoute.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.cancelTrainRoute.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.cancelTrainRoute.button.operation)"
>
<span style="color: black">
<center>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.humanTrainRoute.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.humanTrainRoute.button.operation)"
>
<span style="color: red">
<center>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.reopenSignal.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.reopenSignal.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.guide.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.guide.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
id="mbm_06"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown('mbm_06')"
>
<span style="color: red">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Switch.locate.button.domId"
:style="{display: 'block', float: 'left', width: width+'px',backgroundColor:buttonUpColor}"
@click="buttonDown(Switch.locate.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Switch.reverse.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Switch.reverse.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Switch.lock.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Switch.lock.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Switch.unlock.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Switch.unlock.button.operation)"
>
<span style="color: red">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Signal.setAutoInterlock.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Signal.setAutoInterlock.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Section.fault.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Section.fault.button.operation)"
>
<span style="color: black">
<center>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
:id="Section.axlePreReset.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown(Section.axlePreReset.button.operation)"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
<button
id="mbm_11"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown('mbm_11')"
>
<span style="color: black">
<center>
<b style="color:deepskyblue"></b>
<b style="color:burlywood"></b>
</center>
<center>
<b style="color: red"></b>
<b style="color:forestgreen"></b>
</center>
</span>
</button>
<button
id="mbm_12"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@click="buttonDown('mbm_12')"
>
<span style="color: black">
<center>
<b></b>
<b></b>
</center>
<center>
<b></b>
<b></b>
</center>
</span>
</button>
</div>
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import OperateHandler from '@/scripts/plugin/OperateHandler';
export default {
name: 'MapButtonMenu',
data() {
return {
point: {
x: -1000,
y: -1000
},
operation: '0',
buttonName: '',
buttonDownColor: '#A8A8A8',
buttonUpColor: '#DCDCDC',
width: 58,
tempData: null,
offset: {}
};
},
computed: {
Switch() {
return OperationEvent.Switch;
},
Section() {
return OperationEvent.Section;
},
Signal() {
return OperationEvent.Signal;
},
isShowBtn() {
return this.$store.state.training.prdType == '01';
}
},
watch: {
'$store.state.config.canvasOffsetCount': function (val) {
this.resetPosition();
},
'$store.state.menuOperation.buttonOperation': function (val, old) {
this.updateButtonShow(val, old);
},
'$store.state.menuOperation.selectedCount': function (val) {
this.selectedChange();
}
},
mounted() {
this.resetPosition();
},
methods: {
resetPosition() {
this.$nextTick(() => {
const canvasOffset = this.$store.state.config.canvasOffset;
this.point = {
x: canvasOffset.x + 20,
y: canvasOffset.y + this.$store.state.config.height - 65
};
this.$store.dispatch('training/tipReload');
});
},
updateButtonShow(val, old) {
if (old) {
//
const domId = getDomIdByOperation(old);
const dom = document.getElementById(domId);
if (dom) {
dom.disabled = false;
dom.style.backgroundColor = this.buttonUpColor;
}
}
if (val) {
//
const domId = getDomIdByOperation(val);
const dom = document.getElementById(domId);
if (dom) {
dom.disabled = true;
dom.style.backgroundColor = this.buttonDownColor;
}
}
},
buttonDown(operation) {
const operate = {
type: 'mbm',
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('training/emitTipFresh');
}
});
},
selectedChange() {
//
if (this.$store.state.menuOperation.buttonOperation) {
const model = this.$store.state.menuOperation.selected;
if (model) {
const deviceType = MapDeviceType[model._type];
const operate = {
send: true,
model: model,
code: model.code,
type: deviceType.type,
operation: this.$store.state.menuOperation.buttonOperation,
tempData: this.tempData
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
if (response) {
this.tempData = response.data;
}
}
});
} else {
OperateHandler.cleanOperates();
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg: #fff;
$hoverBg: #f5f7fa;
.menu {
background-color: $bg;
position: fixed;
border: 1px solid gray;
z-index: 10;
display: block;
.dsp-block {
display: block;
text-align: center;
border-radius: unset;
width: 100%;
}
.dsp-block:hover {
background-color: $hoverBg;
}
}
</style>

View File

@ -55,8 +55,8 @@ export default {
watch: { watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) { '$store.state.menuOperation.buttonOperation': function (val, old) {
if (!this.isScreen && this.menu && this.menu.length > 1) { if (!this.isScreen && this.menu && this.menu.length > 1) {
// this.menu[0].disabled = (this.menu[0] && val) ? true : true; this.menu[0].disabled = true;
// this.menu[1].disabled = !((this.menu[1] && val)); this.menu[1].disabled = !((this.menu[1] && val));
} }
}, },
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
@ -75,21 +75,21 @@ export default {
}; };
}, },
initMenu() { initMenu() {
// this.menuNormal = []; this.menuNormal = [];
// this.stationList.forEach(station => { // this.stationList.forEach(station => {
// if (station.code === station.concentrateStationCode) { // if (station.code === station.concentrateStationCode) {
// let node = { // let node = {
// label: station.name, // label: station.name,
// children: [] // children: []
// } // }
//
// this.stationList.forEach(elem => { // this.stationList.forEach(elem => {
// if (elem.visible) { // if (elem.visible) {
// let next = elem; // let next = elem;
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) { // while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode); // next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
// } // }
//
// if (station.code == next.code) { // if (station.code == next.code) {
// node.children.push({ // node.children.push({
// code: elem.code, // code: elem.code,
@ -99,11 +99,10 @@ export default {
// } // }
// } // }
// }) // })
//
// this.menuNormal.push(node); // this.menuNormal.push(node);
// } // }
// }); // });
if (this.isScreen) { if (this.isScreen) {
this.menu = [...this.menuScreen]; this.menu = [...this.menuScreen];
} }

View File

@ -1,137 +1,120 @@
<template> <template>
<el-dialog <el-dialog class="ningbo-01__systerm two-confirmation" title="二次确认" :visible.sync="show" width="360px"
v-dialogDrag :before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
class="ningbo_01__systerm two-confirmation" append-to-body v-dialogDrag>
title="二次确认" <div class="context">
:visible.sync="show" <template v-for="(message, index) in messages">
width="360px" <span :key="index">{{message}}</span>
:before-close="doClose" </template>
:show-close="false" </div>
:z-index="2000" <el-row class="button-group">
:modal="false" <el-col :span="10" :offset="3">
:close-on-click-modal="false" <el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
append-to-body </el-col>
> <el-col :span="6" :offset="4">
<div class="context"> <el-button :id="domIdCancel" @click="cancel">关闭</el-button>
<template v-for="(message, index) in messages"> </el-col>
<span :key="index">{{ message }}</span> </el-row>
</template> <notice-info ref="noticeInfo"></notice-info>
</div> </el-dialog>
<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> </template>
<script> <script>
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
export default { export default {
name: 'TwoConfirmation', name: 'TwoConfirmation',
components: { data() {
NoticeInfo return {
}, dialogShow: false,
data() { loading: false,
return { operation: '',
dialogShow: false, operate: '',
loading: false, timer: null
operate: '', }
timer: null, },
domIdConfirm: '' components: {
}; NoticeInfo
}, },
computed: { computed: {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdCancel() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : ''; if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
}, return OperationEvent.StationControl.emergencyStationControl.confirm.domId;
messages() { } else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
if (this.operate) { return OperationEvent.StationControl.requestStationControl.confirm.domId;
return this.operate.messages; } else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
} return OperationEvent.StationControl.requestCentralControl.confirm.domId;
return []; }
} },
}, domIdCancel() {
mounted() { return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
this.$nextTick(() => { },
this.$store.dispatch('training/tipReload'); messages() {
}); if (this.operate) {
}, return this.operate.messages;
methods: { }
doShow(operate) { return []
this.domIdConfirm = ''; }
if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) { },
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId; mounted() {
} else if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) { this.$nextTick(() => {
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId; this.$store.dispatch('training/tipReload');
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) { })
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId; },
} 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() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.operate = operate || {}; this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.dialogShow = true; if (valid) {
this.$nextTick(function () { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('training/emitTipFresh'); this.doClose();
}); }
}, })
doClose() { },
this.dialogShow = false; commit() {
this.$store.dispatch('training/emitTipFresh'); let operate = {
}, send: true,
cancel() { type: this.operate.type,
const operate = { val: this.operate.val,
type: this.operate.type, }
operation: OperationEvent.Command.close.confirm.operation
};
this.$emit('setOperate', { selection: this.operate.selection, cancel: true }); if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
this.$store.dispatch('training/next', operate).then(({ valid }) => { operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
if (valid) { } else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
this.doClose(); } else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
} operate.operation = OperationEvent.StationControl.emergencyStationControl.confirm.operation;
}); }
},
commit() {
if (this.operate && this.operate.selection) {
const operate = {
send: true,
type: this.operate.type,
val: this.operate.val,
selection: this.operate.selection
};
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) { this.doClose();
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation; this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) { if (valid) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation; this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) { }
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation; }, 1000).catch((error) => {
} this.$refs.noticeInfo.doShow(operate);
});
this.loading = true; }
this.doClose(); }
this.$emit('setOperate', { selection: this.operate.selection, commit: true }); }
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { </script>
if (valid) {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}, 1000).catch(() => {
this.loading = true;
this.$refs.noticeInfo.doShow(operate);
});
}
}
}
};
</script>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm user-add" :title="title" :visible.sync="show" width="420px" <el-dialog class="ningbo-01__systerm user-add" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; "> <div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form"> <el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
@ -151,7 +151,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.ningbo_01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

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

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm user-edit" :title="title" :visible.sync="show" width="420px" <el-dialog class="ningbo-01__systerm user-edit" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; "> <div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form"> <el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
@ -167,7 +167,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.ningbo_01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -0,0 +1,192 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm station-control"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-radio-group v-model="control" :disabled="true">
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
</el-row>
</el-radio-group>
<el-row type="flex" justify="center" class="button-group">
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
</el-button>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'StationStand',
components: {
NoticeInfo
},
data() {
return {
operate: null,
dialogShow: false,
disabledClose: false,
disabledCommit: false,
control: '01',
controlProps: {
'01': '全线扣车',
'02': '取消全线扣车'
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
...mapGetters('training', [
'mode',
'started'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
return '全线扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
return '取消全线扣车';
}
}
},
domIdCommit() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
// 线
this.control = '01';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
// 线
this.control = '02';
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
//
handleCommit() {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
// 线
this.setDetainTrainAll();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
// 线
this.cancelDetainTrainAll();
}
},
// 线
setDetainTrainAll() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setDetainTrainAll.menu.operation,
val: this.control,
messages: ['确认设置全线扣车!']
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.disabledSure = false;
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
// 线
cancelDetainTrainAll() {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
val: this.control,
messages: ['确认取消全线扣车!']
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.disabledSure = false;
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ .el-radio {
color: #000;
font-weight: bold;
}
</style>

View File

@ -0,0 +1,183 @@
<template>
<el-dialog class="ningbo-01__systerm station-control" :title="title" :visible.sync="show" width="400px"
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<el-radio-group v-model="control" :disabled="true">
<el-row style="padding-bottom: 10px;padding-top:10px" v-for="item in Object.keys(controlProps)" :key="item">
<el-radio :label="item">{{controlProps[item]}}</el-radio>
</el-row>
</el-radio-group>
<el-row type="flex" justify="center" class="button-group">
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel" style="margin-left: 200px">退出
</el-button>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo'
export default {
name: 'StationStand',
components: {
NoticeInfo
},
data() {
return {
operate: null,
dialogShow: false,
disabledClose: false,
disabledCommit: false,
control: '01',
controlProps: {
'01': '取消上行扣车',
'02': '取消下行扣车',
},
}
},
computed: {
...mapGetters('map', [
'stationList'
]),
...mapGetters('training', [
'mode',
'started'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
return '取消上行扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
return '取消下行扣车';
}
}
},
domIdCommit() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
// 线
this.control = '01'
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
// 线
this.control = '02'
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
//
handleCommit() {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
// 线
this.cancelUpDetainTrainAll();
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
// 线
this.cancelDownDetainTrainAll();
}
},
// 线
cancelUpDetainTrainAll() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelUpDetainTrainAll.menu.operation,
val: this.control,
messages: ['确认取消全线上行扣车!'],
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.disabledSure = false;
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
// 线
cancelDetainTrainAll() {
let operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.cancelDownDetainTrainAll.menu.operation,
val: this.control,
messages: ['确认取消全线下行扣车!'],
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.disabledSure = false;
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ .el-radio {
color: #000;
font-weight: bold;
}
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose" <el-dialog class="ningbo-01__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="height: 70px;"> <div style="height: 70px;">
<div style="position: relative; left: 10px;"> <div style="position: relative; left: 10px;">
@ -120,7 +120,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.ningbo_01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm manage-user" :title="title" :visible.sync="show" width="420px" <el-dialog class="ningbo-01__systerm manage-user" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; "> <div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">用户列表</span> <span class="base-label">用户列表</span>
@ -279,7 +279,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.ningbo_01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,221 +0,0 @@
<template>
<el-dialog class="ningbo_01__systerm password-box" title="密码框" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div class="context" style="overflow:hidden">
<el-form label-width="80px" size="mini">
<el-form-item prop="username">
<span slot="label">用户名</span>
<el-input v-model="model.username" disabled></el-input>
</el-form-item>
<el-form-item prop="password">
<span slot="label">&emsp;</span>
<el-input type="password" v-model="model.password"></el-input>
</el-form-item>
</el-form>
<div class="operate">
<el-button-group class="left" v-model="key" 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 class="right" v-model="key" size="mini">
<el-button @click="esc">回退</el-button>
</el-button-group>
<el-button-group class="left" v-model="key" 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 class="right" v-model="key" size="mini">
<el-button @click="clr">清空</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">确定</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"></notice-info>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'PasswordBox',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: null,
model: {
username: '',
password: '',
},
key: ''
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
}
},
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.name;
},
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() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
type: this.operate.type,
}
if (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, ['密码输入错误!']);
}
},
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

@ -1,275 +0,0 @@
<template>
<el-dialog class="ningbo_01__systerm stand-stop-time" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="14">
<div class="card-box">
<span class="tip-label">请求</span>
<el-row style="margin: 5px">
<el-col :span="6" class="item-label">线路选择</el-col>
<el-col :span="6">
<el-select v-model="data.path">
<el-option v-for="item in pathList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="6" class="item-label">限制速度</el-col>
<el-col :span="6">
<el-select v-model="data.speed">
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">起始公里标</el-col>
<el-col :span="6">
<el-input v-model="data.begKmPost"></el-input>
</el-col>
<el-col :span="6" class="item-label">结束公里标</el-col>
<el-col :span="6">
<el-input v-model="data.endKmPost"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">限速区段长度</el-col>
<el-col :span="6">
<el-input v-model="data.length"></el-input>
</el-col>
<el-col :span="3">
<el-button>查看</el-button>
</el-col>
<el-col :span="3">
<el-button>请求</el-button>
</el-col>
</el-row>
</div>
<div class="card-box">
<span class="tip-label">执行</span>
<el-row style="margin: 5px">
<el-col :span="6" class="item-label">线路选择</el-col>
<el-col :span="6">
<el-select v-model="form.path">
<el-option v-for="item in pathList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="6" class="item-label">限制速度</el-col>
<el-col :span="6">
<el-select v-model="form.speed">
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">起始公里标</el-col>
<el-col :span="6">
<el-input v-model="form.begKmPost"></el-input>
</el-col>
<el-col :span="6" class="item-label">结束公里标</el-col>
<el-col :span="6">
<el-input v-model="form.endKmPost"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">限速区段长度</el-col>
<el-col :span="6">
<el-input v-model="form.length"></el-input>
</el-col>
<el-col :span="3">
<el-button>查看</el-button>
</el-col>
<el-col :span="3">
<el-button>请求</el-button>
</el-col>
</el-row>
</div>
<div class="card-box">
<span class="tip-label">操作提示</span>
11111113
</div>
</el-col>
<el-col :span="9" :offset="1">
<div class="card-box">
<span class="tip-label">设备列表</span>
<el-table class="card-table" :data="deviceData" border style="width: 100%" height="300">
<el-table-column prop="stationName" label="站名">
</el-table-column>
<el-table-column prop="deviceCode" label="设备号">
</el-table-column>
<el-table-column prop="deviceName" label="设备名">
</el-table-column>
</el-table>
</div>
</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>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
operation: null,
dialogShow: false,
loading: false,
data: {
path: '',
speed: '',
begKmPost: '',
endKmPost: '',
length: '',
},
form: {
path: '',
speed: '',
begKmPost: '',
endKmPost: '',
length: '',
},
pathList: [
{ name: '上行站线', value: '01' },
{ name: '下行站线', value: '02' }
],
speedList: [
{ name: '10Km/h', value: '10' },
{ name: '15Km/h', value: '15' },
{ name: '20Km/h', value: '20' },
{ name: '25Km/h', value: '25' },
],
deviceData: []
}
},
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 '设置临时限速'
}
},
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) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
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(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.ningbo_01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.card-box {
border: 1px solid #c0c0c0;
margin-bottom: 20px;
}
.card-table {
position: relative;
top: -15px;
}
.tip-label {
position: relative;
left: 5px;
top: -15px;
background: #ECE9D8;
}
.item-label {
text-align: center;
}
</style>

View File

@ -0,0 +1,237 @@
<template>
<el-dialog class="ningbo-01__systerm station-control" title="控制模式转换" :visible.sync="show" width="400px"
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<el-row> 集中站 </el-row>
<el-row style="margin-bottom: 20px">
<el-select v-model="stationCode" filterable placeholder="请选择" style="width: 100%;" :id="domIdChooseStation"
@change="handleChooseChangeStation">
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-row>
<el-radio-group v-model="stationType" :id="domIdChooseControl">
<el-row style="padding-bottom: 10px" v-for="item in Object.keys(controlProps)" :key="item">
<el-radio :label="item" @change="handleChooseChangeControl">
{{controlProps[item]}}</el-radio>
</el-row>
</el-radio-group>
<el-row type="flex" justify="center" class="button-group">
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel" style="margin-left: 200px">退出
</el-button>
</el-row>
<two-confirmation ref="twoConfirmation"></two-confirmation>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import TwoConfirmation from './childDialog/twoConfirmation';
export default {
name: 'StationControl',
data() {
return {
operate: null,
dialogShow: false,
disabledClose: false,
disabledCommit: false,
stationType: '01',
stationCode: '',
controlProps: {
'03': '紧急站控',
'02': '站控',
'01': '遥控',
},
}
},
components: {
TwoConfirmation
},
computed: {
...mapGetters('map', [
'stationList'
]),
...mapGetters('training', [
'mode',
'started'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChooseControl() {
return this.dialogShow ? OperationEvent.Command.order.choose.domId : '';
},
domIdChooseStation() {
return this.dialogShow ? OperationEvent.Command.order.choose1.domId : '';
},
domIdCommit() {
if (this.dialogShow) {
if (this.stationType == '01') {
return OperationEvent.StationControl.requestCentralControl.menu.domId;
} else if (this.stationType == '02') {
return OperationEvent.StationControl.requestStationControl.menu.domId;
} else if (this.stationType == '03') {
return OperationEvent.StationControl.emergencyStationControl.menu.domId;
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
handleChooseChangeStation() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.Command.order.choose1.operation,
val: this.stationCode,
}
// if (this.stationType == '01') {
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose1.operation
// } else if (this.stationType == '02') {
// operate.operation = OperationEvent.StationControl.requestStationControl.choose1.operation
// } else if (this.stationType == '03') {
// operate.operation = OperationEvent.StationControl.emergencyStationControl.choose1.operation
// }
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
handleChooseChangeControl() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.Command.order.choose.operation,
val: this.stationCode,
}
// if (this.stationType == '01') {
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation
// } else if (this.stationType == '02') {
// operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation
// } else if (this.stationType == '03') {
// operate.operation = OperationEvent.StationControl.emergencyStationControl.choose.operation
// }
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
//
handleCommit() {
if (this.stationType == '01') {
//
this.conterCommit();
} else if (this.stationType == '02') {
//
this.requestCommit();
} else if (this.stationType == '03') {
//
this.emergencyCommit();
}
},
//
conterCommit() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
val: `${this.stationCode}::`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
})
},
//
requestCommit() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
val: `${this.stationCode}::`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch((error) => {
})
},
//
emergencyCommit() {
let operate = {
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
val: `${this.stationCode}::`,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
})
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ .el-radio {
color: #000;
font-weight: bold;
}
</style>

View File

@ -1,415 +0,0 @@
<template>
<el-dialog class="ningbo_01__systerm station-control-convert" title="控制模式转换" :visible.sync="show" width="700px"
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<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="check" label="选择" width="60" :id="domIdChoose" style="margin-left:30px">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled"></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="operate" label="操作区域" 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="控制模式" 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="中心-车站通信状态" 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="转换执行状态">
<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">
<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">关闭</el-button>
</el-col>
</el-row>
<two-confirmation ref="twoConfirmation" @setOperate="getOperate"></two-confirmation>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import TwoConfirmation from './childDialog/twoConfirmation';
export default {
name: 'StationControlConvert',
data() {
return {
operate: null,
dialogShow: false,
disabledSend: false,
disabledSure: false,
disabledClose: false,
operation: '',
controlProps: {
'01': '中控',
'02': '站控'
},
selection: [],
tableData: [],
timer: null,
count: 0,
backOperate: '',
timeout: 61,
}
},
components: {
TwoConfirmation
},
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 checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)
}
},
isRequest() {
if (this.dialogShow) {
return checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)
}
},
isConter() {
if (this.dialogShow) {
return checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)
}
},
domIdChoose() {
if (this.dialogShow) {
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
return OperationEvent.StationControl.forcedStationControl.choose.domId
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
return OperationEvent.StationControl.requestStationControl.choose.domId
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
return OperationEvent.StationControl.requestCentralControl.choose.domId
}
}
},
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) {
if (elem.hasOwnProperty('timeout')) {
this.updateTableValue(elem.stationControlCode, { result: `接受转换应答超时` }, false);
} else if (elem.hasOwnProperty('success')) {
if (elem.success) {
this.updateTableValue(elem.stationControlCode, { result: '控制模式转换成功' }, true);
} else {
this.updateTableValue(elem.stationControlCode, { result: `控制模式转换失败` }, 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.timeout}秒后超时.` }, 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 (let prop in result) {
row[prop] = result[prop];
}
if (success) {
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
row.control = this.controlProps['02']; //01: 02:
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
row.control = this.controlProps['01']; //01: 02:
}
row.disabled = true;
row.check = false;
}
}
})
},
checkTableDataSelction(data) {
let selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
}
this.disabledSend = selection.length ? false : true;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
}
},
checkBoxDisabled(row) {
let control = (this.$store.getters('map/getDeviceByCode')(row.code) || {});
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
if (control && control.status == '02') { //01: 02:
return true;
}
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
if (control && control.status == '01') { //01: 02:
return true;
}
}
},
loadTableData() {
this.tableData = [];
this.stationList.forEach(control => {
if (control.centralized) { //
// const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
this.tableData.push({
code: control.code,
operate: control.name || '',
control: '',
check: false,
disabled: false,
status: '正常',
result: ''
});
}
})
},
initTableDataStatus() {
this.tableData.forEach(row => {
row.disabled = this.checkBoxDisabled(row);
row.check = false;
row.result = '';
let control = (this.$store.getters('map/getDeviceByCode')(row.code) || {}).state;
if (control) {
row.control = this.controlProps[control.status];
}
})
},
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() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
cancel() {
let operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
clearTimer() {
this.count = 0;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
serializeCodeListWithSeparator(sep) {
let codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
})
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
let operate = {
type: MapDeviceType.StationControl.type,
operation: '',
val: this.serializeCodeListWithSeparator('::'),
selection: selection
}
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation
}
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.disabledSure = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
} else if (!selection) {
this.$messageBox('请选择一条数据');
}
},
requestCommit() {
let operate = {
type: MapDeviceType.StationControl.type,
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
}
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch((error) => {
this.disabledSure = false;
this.disabledClose = false;
})
},
forkCommit() {
let operate = {
type: MapDeviceType.StationControl.type,
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
}
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('training/next', 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;
this.disabledClose = false;
})
},
conterCommit() { //
let operate = {
type: MapDeviceType.StationControl.type,
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
}
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('training/next', 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;
this.disabledClose = false;
})
},
getOperate(operate) {
this.backOperate = operate;
if (operate.cancel) {
this.disabledClose = false;
this.disabledSure = this.disabledSend = false;
}
if (operate.commit || operate.timeout) {
this.disabledSend = this.disabledSure = true;
this.disabledClose = false;
}
}
}
}
</script>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px" <el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form"> <el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"> <div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
@ -151,7 +151,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.ningbo_01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px" <el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form"> <el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-form-item prop="stationStandCode"> <el-form-item prop="stationStandCode">
@ -138,7 +138,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.ningbo_01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px" <el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form"> <el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber"> <el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="ningbo_01__systerm view-display" class="ningbo-01__systerm view-display"
title="设备显示设置" title="设备显示设置"
:visible.sync="show" :visible.sync="show"
width="240px" width="240px"
@ -93,7 +93,7 @@ export default {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
cancel() { cancel() {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
@ -105,7 +105,7 @@ export default {
}); });
}, },
commit() { commit() {
let operate = { const operate = {
over: true, over: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation, operation: OperationEvent.Command.close.confirm.operation,

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm view-name" title="名称显示设置" :visible.sync="show" width="320px" <el-dialog class="ningbo-01__systerm view-name" title="名称显示设置" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-checkbox-group v-model="nameLevels"> <el-checkbox-group v-model="nameLevels">
<el-row> <el-row>

View File

@ -1,183 +1,192 @@
<template> <template>
<el-dialog class="ningbo_01__systerm view-train-id" title="列车识别号显示设置" :visible.sync="show" width="420px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<div style="padding: 10px 20px; border: 1px double lightgray;"> class="ningbo-01__systerm view-train-id"
<span class="base-label">计划车显示模式</span> title="列车识别号显示设置"
<el-radio-group v-model="planMode"> :visible.sync="show"
<el-row> width="420px"
<el-col :span="10"> :before-close="doClose"
<el-radio :label="1">表号+车次号</el-radio> :z-index="2000"
</el-col> :modal="false"
<el-col :span="10" :offset="4"> :close-on-click-modal="false"
<el-radio :label="2">表号+车组号</el-radio> >
</el-col> <div style="padding: 10px 20px; border: 1px double lightgray;">
</el-row> <span class="base-label">计划车显示模式</span>
<el-row> <el-radio-group v-model="planMode">
<el-col :span="10"> <el-row>
<el-radio :label="3">目的地号+车次号</el-radio> <el-col :span="10">
</el-col> <el-radio :label="1">表号+车次号</el-radio>
<el-col :span="10" :offset="4"> </el-col>
<el-radio :label="4">目的地号+车组号</el-radio> <el-col :span="10" :offset="4">
</el-col> <el-radio :label="2">表号+车组号</el-radio>
</el-row> </el-col>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</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">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</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">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <el-row>
</el-dialog> <el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</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">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</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;">范围16-99</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">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<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, checkOperationIsCurrentOperate } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default { export default {
name: 'ViewTrainId', name: 'ViewTrainId',
data() { components: {
return { NoticeInfo
dialogShow: false, },
loading: false, data() {
operate: null, return {
operation: '', dialogShow: false,
planMode: 5, loading: false,
headMode: 5, operate: null,
fontSize: 16, operation: '',
} planMode: 5,
}, headMode: 5,
components: { fontSize: 16
NoticeInfo };
}, },
computed: { computed: {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : ''; return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.setTrainDispaly(); this.setTrainDispaly();
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
this.operate = operate || {}; this.operate = operate || {};
this.operation = operate.operation; this.operation = operate.operation;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.loading = false; this.loading = false;
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
cancel() { cancel() {
let operate = { const operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}) });
}, },
commit() { commit() {
let operate = { const operate = {
over: true, over: true,
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation, operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::') val: [this.planMode, this.headMode, this.fontSize].join('::')
} };
this.loading = true this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false this.loading = false;
if (valid) { if (valid) {
this.setTrainDispaly(); this.setTrainDispaly();
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(error => {
this.loading = false; this.loading = false;
}) });
}, },
setTrainDispaly() { setTrainDispaly() {
let updatList = []; const updatList = [];
let trainList = this.$store.getters['training/viewTrainList']; const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) { if (trainList && trainList.length > 0) {
let nameFormat = this.trainNameFormatBy(this.planMode); const nameFormat = this.trainNameFormatBy(this.planMode);
let nameFontSize = this.fontSize; const nameFontSize = this.fontSize;
trainList.forEach(elem => { updatList.forEach(elem => {
updatList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); //
}); });
this.$store.dispatch('map/updateMapDevices', updatList); this.$store.dispatch('map/updateMapDevices', updatList);
} }
}, },
trainNameFormatBy(mode) { trainNameFormatBy(mode) {
switch (mode.toString()) { switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; //+ case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; //+ case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; //+ case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; //+ case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; //++ case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; //++ case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
} }
return ''; // return ''; //
} }
} }
} };
</script> </script>

View File

@ -1,118 +1,120 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<cancel-all-limit ref="cancelAllLimit"></cancel-all-limit> <cancel-all-limit ref="cancelAllLimit" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import CancelAllLimit from './dialog/cancelAllLimit'; import CancelAllLimit from './dialog/cancelAllLimit';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'MenuLimit', name: 'MenuLimit',
components: { components: {
PopMenu, PopMenu,
CancelAllLimit, CancelAllLimit
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
} default() {
}, return null;
data() { }
return { }
menu: [{ },
label: '取消全线临时限速', data() {
handler: this.cancelSpeed, return {
disabledCallback: '', menu: [{
auth: { station: true, center: false } label: '取消全线临时限速',
}], handler: this.cancelSpeed,
menuNormal: { disabledCallback: '',
local: [ auth: { station: true, center: false }
{ }],
label: '取消全线临时限速', menuNormal: {
handler: this.cancelSpeed, local: [
disabledCallback: MenuDisabledState.Section.cancelSpeed, {
auth: { station: true, center: false } label: '取消全线临时限速',
} handler: this.cancelSpeed,
], disabledCallback: MenuDisabledState.Section.cancelSpeed,
central: [ auth: { station: true, center: false }
{ }
label: '取消全线临时限速', ],
handler: this.cancelSpeed, central: [
disabledCallback: MenuDisabledState.Section.cancelSpeed, {
auth: { station: false, center: true } label: '取消全线临时限速',
} handler: this.cancelSpeed,
] disabledCallback: MenuDisabledState.Section.cancelSpeed,
}, auth: { station: false, center: true }
} }
}, ]
watch: { }
'$store.state.menuOperation.menuCount': function (val) { };
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) { },
this.doShow(this.$store.state.menuOperation.menuPosition); computed: {
} else { ...mapGetters('training', [
this.doClose(); 'mode',
} 'operatemode'
} ]),
}, ...mapGetters('menuOperation', [
computed: { 'buttonOperation'
...mapGetters('training', [ ])
'mode', },
'operatemode' watch: {
]), '$store.state.menuOperation.menuCount': function (val) {
...mapGetters('menuOperation', [ if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
'buttonOperation' this.doShow(this.$store.state.menuOperation.menuPosition);
]) } else {
}, this.doClose();
methods: { }
clickEvent() { }
let self = this; },
window.onclick = function (e) { methods: {
self.doClose(); clickEvent() {
} const self = this;
}, window.onclick = function (e) {
initMenu() { self.doClose();
// };
if (this.operatemode === OperateMode.ADMIN) { },
this.menu = [...this.menu] initMenu() {
} //
}, if (this.operatemode === OperateMode.ADMIN) {
doShow(point) { this.menu = [...this.menu];
this.clickEvent(); }
this.initMenu(); },
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { doShow(point) {
this.$refs.popMenu.resetShowPosition(point); this.clickEvent();
} this.initMenu();
}, if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
doClose() { this.$refs.popMenu.resetShowPosition(point);
if (this.$refs && this.$refs.popMenu) { }
this.$refs.popMenu.close(); },
} doClose() {
}, if (this.$refs && this.$refs.popMenu) {
// this.$refs.popMenu.close();
cancelSpeed() { }
let operate = { },
start: true, //
send: true, cancelSpeed() {
code: this.selected.code, const operate = {
type: MapDeviceType.LimitControl.type, start: true,
label: MapDeviceType.LimitControl.label, send: true,
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation code: this.selected.code,
}; type: MapDeviceType.LimitControl.type,
this.$store.dispatch('training/next', operate).then(({ valid }) => { label: MapDeviceType.LimitControl.label,
if (valid) { operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); };
this.$refs.cancelAllLimit.doShow(operate, this.selected); this.$store.dispatch('training/next', operate).then(({ valid }) => {
} if (valid) {
}); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}, this.$refs.cancelAllLimit.doShow(operate, this.selected);
} }
} });
</script> }
}
};
</script>

View File

@ -3,10 +3,10 @@
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" /> <section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl" /> <section-cmd-control ref="sectionCmdControl" />
<speed-limit-control ref="speedLimitControl" />
<speed-cmd-control ref="speedCmdControl" /> <speed-cmd-control ref="speedCmdControl" />
<!-- <train-create ref="trainCreate"></train-create> --> <train-create ref="trainCreate" />
<alxe-effective ref="alxeEffective" /> <alxe-effective ref="alxeEffective" />
<section-detail ref="sectionDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
</div> </div>
</template> </template>
@ -15,13 +15,13 @@
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl'; import SectionControl from './dialog/sectionControl';
import SectionCmdControl from './dialog/sectionCmdControl'; import SectionCmdControl from './dialog/sectionCmdControl';
import SectionDetail from './dialog/sectionDetail';
import SpeedCmdControl from './dialog/speedCmdControl'; import SpeedCmdControl from './dialog/speedCmdControl';
// import TrainCreate from './dialog/trainCreate'; import SpeedLimitControl from './dialog/speedLimitControl';
import TrainCreate from './dialog/trainCreate';
import AlxeEffective from './dialog/alxeEffective'; import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
@ -32,15 +32,18 @@ export default {
PopMenu, PopMenu,
SectionControl, SectionControl,
SectionCmdControl, SectionCmdControl,
SectionDetail, SpeedLimitControl,
SpeedCmdControl, SpeedCmdControl,
// TrainCreate, TrainCreate,
AlxeEffective, AlxeEffective,
NoticeInfo NoticeInfo
}, },
props: { props: {
selected: { selected: {
type: Object type: Object,
default() {
return null;
}
} }
}, },
data() { data() {
@ -49,79 +52,88 @@ export default {
menuNormal: { menuNormal: {
local: [ local: [
{ {
label: '区故解', label: '区',
handler: this.fault, handler: this.fault,
disabledCallback: MenuDisabledState.Section.fault, disabledCallback: MenuDisabledState.Section.fault,
auth: { station: true, center: false } auth: { station: true, center: false }
}, },
{ {
label: '属性', label: '区段激活',
handler: this.detail, handler: this.active,
disabledCallback: MenuDisabledState.Section.active,
auth: { station: true, center: false }
},
{
label: '区段切除',
handler: this.split,
disabledCallback: MenuDisabledState.Section.split,
auth: { station: true, center: false }
},
{
label: '区段计轴预复位',
handler: this.axlePreReset,
disabledCallback: MenuDisabledState.Section.axlePreReset,
auth: { station: true, center: false }
},
{
label: '区段封锁',
handler: this.lock,
disabledCallback: MenuDisabledState.Section.lock,
auth: { station: true, center: false }
},
{
label: '区段解封',
handler: this.unlock,
disabledCallback: MenuDisabledState.Section.unlock,
auth: { station: true, center: false }
},
{
label: '区段设置限速',
handler: this.setSpeed,
disabledCallback: MenuDisabledState.Section.setSpeed, disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true } auth: { station: true, center: false }
} }
// {
// label: '',
// handler: this.active,
// disabledCallback: MenuDisabledState.Section.active,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.split,
// disabledCallback: MenuDisabledState.Section.split,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.axlePreReset,
// disabledCallback: MenuDisabledState.Section.axlePreReset,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.lock,
// disabledCallback: MenuDisabledState.Section.lock,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.unlock,
// disabledCallback: MenuDisabledState.Section.unlock,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.setSpeed,
// disabledCallback: MenuDisabledState.Section.setSpeed,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.cancelSpeed,
// disabledCallback: MenuDisabledState.Section.cancelSpeed,
// auth: { station: true, center: false }
// },
// {
// label: '',
// handler: this.alxeEffective,
// disabledCallback: MenuDisabledState.Section.alxeEffective,
// auth: { station: false, center: true }
// },
], ],
central: [ central: [
{ {
label: '区故解', label: '区段跟踪激活',
handler: this.fault, handler: this.active,
disabledCallback: MenuDisabledState.Section.fault, disabledCallback: MenuDisabledState.Section.active,
auth: { station: true, center: false } auth: { station: false, center: true }
}, },
{ {
label: '属性', label: '区段跟踪切除',
handler: this.detail, handler: this.split,
disabledCallback: MenuDisabledState.Section.split,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '确认计轴有效',
handler: this.alxeEffective,
disabledCallback: MenuDisabledState.Section.alxeEffective,
auth: { station: false, center: true }
},
{
type: 'separator'
},
{
label: '设置临时限速',
handler: this.setSpeed,
disabledCallback: MenuDisabledState.Section.setSpeed, disabledCallback: MenuDisabledState.Section.setSpeed,
auth: { station: false, center: true } auth: { station: false, center: true }
} }
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.undeveloped,
// disabledCallback: MenuDisabledState.Section.setSpeed,
// auth: { station: false, center: true }
// }
] ]
}, },
menuTrain: [ menuTrain: [
@ -209,26 +221,10 @@ export default {
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
//
newTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.newtrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
});
},
// //
fault() { fault() {
const operate = { const operate = {
@ -242,22 +238,7 @@ export default {
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.sectionControl.doShow(operate, this.selected); this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
detail() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionDetail.doShow(operate, this.selected);
} }
}); });
}, },
@ -268,119 +249,132 @@ export default {
callback: action => { callback: action => {
} }
}); });
} },
// // //
// split() { split() {
// let operate = { const operate = {
// start: true, start: true,
// code: this.selected.code, code: this.selected.code,
// type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.split.menu.operation operation: OperationEvent.Section.split.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.sectionControl.doShow(operate, this.selected); this.$refs.sectionControl.doShow(operate, this.selected);
// } }
// }); });
// }, },
// alxeEffective() { alxeEffective() {
// let operate = { const operate = {
// start: true, start: true,
// code: this.selected.code, code: this.selected.code,
// type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.alxeEffective.menu.operation operation: OperationEvent.Section.alxeEffective.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.alxeEffective.doShow(operate, this.selected); this.$refs.alxeEffective.doShow(operate, this.selected);
// } }
// }); });
// }, },
// // //
// active() { active() {
// let operate = { const operate = {
// start: true, start: true,
// code: this.selected.code, code: this.selected.code,
// type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.active.menu.operation operation: OperationEvent.Section.active.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.sectionControl.doShow(operate, this.selected); this.$refs.sectionControl.doShow(operate, this.selected);
// } }
// }); });
// }, },
// // //
// axlePreReset() { axlePreReset() {
// let operate = { const operate = {
// start: true, start: true,
// code: this.selected.code, code: this.selected.code,
// type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.axlePreReset.menu.operation operation: OperationEvent.Section.axlePreReset.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.sectionCmdControl.doShow(operate, this.selected); this.$refs.sectionCmdControl.doShow(operate, this.selected);
// } }
// }); });
// }, },
// // //
// lock() { lock() {
// let operate = { const operate = {
// start: true, start: true,
// code: this.selected.code, code: this.selected.code,
// type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.lock.menu.operation operation: OperationEvent.Section.lock.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.sectionControl.doShow(operate, this.selected); this.$refs.sectionControl.doShow(operate, this.selected);
// } }
// }); });
// }, },
// // //
// unlock() { unlock() {
// let operate = { const operate = {
// start: true, start: true,
// code: this.selected.code, code: this.selected.code,
// type: MapDeviceType.Section.type, type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label, label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.unlock.menu.operation operation: OperationEvent.Section.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.sectionCmdControl.doShow(operate, this.selected); this.$refs.sectionCmdControl.doShow(operate, this.selected);
// } }
// }); });
// }, },
// // //
// setSpeed() { setSpeed() {
// let operate = { // let operate = {
// start: true, // start: true,
// code: this.selected.code, // code: this.selected.code,
// type: MapDeviceType.Section.type, // type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label, // label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.setLimitSpeed.menu.operation // operation: OperationEvent.Section.setLimitSpeed.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.speedCmdControl.doShow(operate, this.selected); // this.$refs.speedCmdControl.doShow(operate, this.selected);
// } // }
// }); // });
// }, const operate = {
// // start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.setSpeed.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedLimitControl.doShow(operate, this.selected);
}
});
},
//
// cancelSpeed() { // cancelSpeed() {
// let operate = { // let operate = {
// start: true, // start: true,
@ -398,6 +392,22 @@ export default {
// } // }
// }); // });
// }, // },
//
newTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Section.type,
label: MapDeviceType.Section.label,
operation: OperationEvent.Section.newtrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
});
}
} }
}; };
</script> </script>

View File

@ -2,9 +2,11 @@
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" /> <route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" /> <route-control ref="routeControl" />
<route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" /> <route-detail ref="routeDetail" />
<route-guide ref="routeGuide" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
</div> </div>
</template> </template>
@ -13,8 +15,10 @@
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import RouteControl from './dialog/routeControl'; import RouteControl from './dialog/routeControl';
import RouteSelection from './dialog/routeSelection'; 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 RouteDetail from './dialog/routeDetail';
import RouteGuide from './dialog/routeGuide';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
@ -23,564 +27,394 @@ import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItem
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
components: { components: {
PopMenu, PopMenu,
RouteControl, RouteControl,
RouteSelection, RouteSelection,
RouteDetail, RouteLock,
RouteGuide, RouteCmdControl,
NoticeInfo RouteHandControl,
}, RouteDetail,
props: { NoticeInfo
selected: { },
type: Object, props: {
default() { selected: {
return {}; type: Object,
} default() {
} return null;
}, }
data() { }
return { },
menu: [], data() {
menuNormal: { return {
local: [ menu: [],
{ menuNormal: {
label: '办理进路', local: [
handler: this.arrangementRoute, {
disabledCallback: MenuDisabledState.Signal.arrangementRoute, label: '排列进路',
auth: { station: true, center: false } handler: this.arrangementRoute,
}, disabledCallback: MenuDisabledState.Signal.arrangementRoute,
{ auth: { station: false, center: true }
label: '办理引导进路', },
handler: this.guide, {
disabledCallback: MenuDisabledState.Signal.guide, label: '取消进路',
auth: { station: true, center: false } handler: this.cancelTrainRoute,
}, disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
{ auth: { station: false, center: true }
label: '取消进路', },
handler: this.cancelTrainRoute, {
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, label: '信号重开',
auth: { station: true, center: false } handler: this.reopenSignal,
}, disabledCallback: MenuDisabledState.Signal.reopenSignal,
{ auth: { station: false, center: true }
label: '总人解', },
handler: this.humanTrainRoute, {
disabledCallback: MenuDisabledState.Signal.humanTrainRoute, type: 'separator'
auth: { station: true, center: false } },
}, {
{ label: '进路交人工控',
label: '信号重开', handler: this.humanControl,
handler: this.reopenSignal, disabledCallback: MenuDisabledState.Signal.humanControl,
disabledCallback: MenuDisabledState.Signal.reopenSignal, auth: { station: false, center: true }
auth: { station: true, center: false } },
}, {
{ label: '进路交自动控',
label: '信号封锁', handler: this.atsAutoControl,
handler: this.lock, disabledCallback: MenuDisabledState.Signal.atsAutoControl,
disabledCallback: MenuDisabledState.Signal.lock, auth: { station: false, center: true }
auth: { station: true, center: false } },
}, {
{ label: '查询进路控制状态',
label: '信号解封', handler: this.detail,
handler: this.unlock, disabledCallback: MenuDisabledState.Signal.detail,
disabledCallback: MenuDisabledState.Signal.unlock, auth: { station: true, center: true }
auth: { station: true, center: false } }
}, ],
{ central: [
label: '进路收人工控', {
handler: this.humanControl, label: '设置进路',
disabledCallback: MenuDisabledState.Signal.humanControl, handler: this.arrangementRoute,
auth: { station: false, center: true } disabledCallback: MenuDisabledState.Signal.arrangementRoute,
}, auth: { station: false, center: true }
{ },
label: '进路交自动控', {
handler: this.atsAutoControl, label: '取消列车进路',
disabledCallback: MenuDisabledState.Signal.atsAutoControl, handler: this.cancelTrainRoute,
auth: { station: false, center: true } disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
}, auth: { station: false, center: true }
{ },
label: '查询进路控制状态', {
handler: this.detail, label: '信号重开',
disabledCallback: MenuDisabledState.Signal.detail, handler: this.reopenSignal,
auth: { station: true, center: true } disabledCallback: MenuDisabledState.Signal.reopenSignal,
} auth: { station: false, center: true }
// { },
// label: '', {
// handler: this.setAutoInterlock, type: 'separator'
// disabledCallback: MenuDisabledState.Signal.setAutoInterlock, },
// auth: { station: true, center: false }, {
// }, label: '进路交人工控',
// { handler: this.humanControl,
// label: '', disabledCallback: MenuDisabledState.Signal.humanControl,
// handler: this.cancelAutoInterlock, auth: { station: false, center: true }
// disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock, },
// auth: { station: true, center: false }, {
// }, label: '进路交自动控',
// { handler: this.atsAutoControl,
// label: '', disabledCallback: MenuDisabledState.Signal.atsAutoControl,
// handler: this.setAutoTrigger, auth: { station: false, center: true }
// disabledCallback: MenuDisabledState.Signal.setAutoTrigger, },
// auth: { station: true, center: false }, {
// }, label: '查询进路控制状态',
// { handler: this.detail,
// label: '', disabledCallback: MenuDisabledState.Signal.detail,
// handler: this.cancelAutoTrigger, auth: { station: true, center: true }
// disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger, }
// auth: { station: true, center: false }, ]
// }, },
// { menuForce: [
// label: '', {
// handler: this.signalClose, label: '信号关灯',
// disabledCallback: MenuDisabledState.Signal.signalClose, handler: this.signalClose,
// auth: { station: true, center: false }, disabledCallback: ''
// } },
], {
central: [ label: '设置故障',
{ handler: this.setStoppage,
label: '办理进路', disabledCallback: MenuDisabledState.Signal.setStoppage
handler: this.arrangementRoute, },
disabledCallback: MenuDisabledState.Signal.arrangementRoute, {
auth: { station: true, center: false } label: '取消故障',
}, handler: this.cancelStoppage,
{ disabledCallback: MenuDisabledState.Signal.cancelStoppage
label: '办理引导进路', }
handler: this.guide, ]
disabledCallback: MenuDisabledState.Signal.guide, };
auth: { station: true, center: false } },
}, watch: {
{ '$store.state.menuOperation.menuCount': function (val) {
label: '取消进路', if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
handler: this.cancelTrainRoute, this.doShow(this.$store.state.menuOperation.menuPosition);
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute, } else {
auth: { station: true, center: false } this.doClose();
}, }
{ }
label: '总人解', },
handler: this.humanTrainRoute, computed: {
disabledCallback: MenuDisabledState.Signal.humanTrainRoute, ...mapGetters('training', [
auth: { station: true, center: false } 'mode',
}, 'operatemode'
{ ]),
label: '信号重开', ...mapGetters('menuOperation', [
handler: this.reopenSignal, 'buttonOperation'
disabledCallback: MenuDisabledState.Signal.reopenSignal, ])
auth: { station: true, center: false } },
}, methods: {
{ clickEvent() {
label: '信号封锁', const self = this;
handler: this.lock, window.onclick = function (e) {
disabledCallback: MenuDisabledState.Signal.lock, self.doClose();
auth: { station: true, center: false } };
}, },
{ initMenu() {
label: '信号解封', //
handler: this.unlock, this.menu = menuFiltration(this.menuNormal);
disabledCallback: MenuDisabledState.Signal.unlock, if (this.operatemode === OperateMode.ADMIN) {
auth: { station: true, center: false } this.menu = [...this.menu, ...this.menuForce];
}, }
{
label: '进路收人工控',
handler: this.humanControl,
disabledCallback: MenuDisabledState.Signal.humanControl,
auth: { station: false, center: true }
},
{
label: '进路交自动控',
handler: this.atsAutoControl,
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
auth: { station: false, center: true }
},
{
label: '查询进路控制状态',
handler: this.detail,
disabledCallback: MenuDisabledState.Signal.detail,
auth: { station: true, center: true }
}
]
},
menuForce: [
{
label: '信号关灯',
handler: this.signalClose,
disabledCallback: ''
},
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Signal.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Signal.cancelStoppage
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
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 = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce; this.menu = this.menuForce;
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
}, },
doShow(point) { doShow(point) {
this.clickEvent(); this.clickEvent();
this.initMenu(); this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point); this.$refs.popMenu.resetShowPosition(point);
} }
}, },
doClose() { doClose() {
if (this.$refs && this.$refs.popMenu) { if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
setStoppage() { setStoppage() {
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.stoppage.menu.operation operation: OperationEvent.Signal.stoppage.menu.operation
}; };
mouseCancelState(this.selected); mouseCancelState(this.selected);
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 });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
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.cancelStoppage.menu.operation operation: OperationEvent.Signal.cancelStoppage.menu.operation
}; };
mouseCancelState(this.selected); mouseCancelState(this.selected);
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 });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
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
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', 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;
if (response) { if (response) {
tempData = response.data; tempData = response.data;
} }
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData); this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData);
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
guide() { cancelTrainRoute() {
const operate = { const operate = {
start: true, start: 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.cancelTrainRoute.menu.operation
operation: OperationEvent.Signal.guide.menu.operation };
}; this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { 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);
var tempData = null; }
if (response) { });
tempData = response.data; },
} //
this.$refs.routeGuide.doShow(operate.operation, this.selected, tempData); lock() {
} const operate = {
}); start: true,
}, send: true,
// code: this.selected.code,
cancelTrainRoute() { type: MapDeviceType.Signal.type,
const operate = { label: MapDeviceType.Signal.label,
start: true, operation: OperationEvent.Signal.lock.menu.operation
code: this.selected.code, };
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
humanTrainRoute() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.humanTrainRoute.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
reopenSignal() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.reopenSignal.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
lock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.lock.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.routeControl.doShow(operate, 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.routeControl.doShow(operate, this.selected); this.$refs.routeCmdControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
humanControl() { reopenSignal() {
const operate = { const operate = {
start: true, start: 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.reopenSignal.menu.operation
operation: OperationEvent.Signal.humanControl.menu.operation };
}; this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { if (valid) {
if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
let tempData = null; this.$refs.routeControl.doShow(operate, this.selected);
if (response) { }
tempData = response.data; });
} },
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); //
this.$refs.routeControl.doShow(operate, this.selected, tempData); signalClose() {
} const operate = {
}); start: true,
}, code: this.selected.code,
// type: MapDeviceType.Signal.type,
atsAutoControl() { label: MapDeviceType.Signal.label,
const operate = { operation: OperationEvent.Signal.signalClose.menu.operation
start: true, };
send: true, this.$store.dispatch('training/next', operate).then(({ valid }) => {
code: this.selected.code, if (valid) {
type: MapDeviceType.Signal.type, this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
label: MapDeviceType.Signal.label, this.$refs.routeControl.doShow(operate, this.selected);
operation: OperationEvent.Signal.atsAutoControl.menu.operation }
}; });
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { },
if (valid) { //
let tempData = null; humanControl() {
if (response) { const operate = {
tempData = response.data; start: true,
} send: true,
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); code: this.selected.code,
this.$refs.routeControl.doShow(operate, this.selected, tempData); type: MapDeviceType.Signal.type,
} label: MapDeviceType.Signal.label,
}); operation: OperationEvent.Signal.humanControl.menu.operation
}, };
// // this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
// setAutoInterlock() { if (valid) {
// let operate = { let tempData = null;
// start: true, if (response) {
// code: this.selected.code, tempData = response.data;
// type: MapDeviceType.Signal.type, }
// label: MapDeviceType.Signal.label, this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// operation: OperationEvent.Signal.setAutoInterlock.menu.operation this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
// }; }
// this.$store.dispatch('training/next', operate).then(({ valid }) => { });
// if (valid) { },
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); //
// this.$refs.routeControl.doShow(operate, this.selected); atsAutoControl() {
// } const operate = {
// }); start: true,
// }, send: true,
// // code: this.selected.code,
// cancelAutoInterlock() { type: MapDeviceType.Signal.type,
// let operate = { label: MapDeviceType.Signal.label,
// start: true, operation: OperationEvent.Signal.atsAutoControl.menu.operation
// code: this.selected.code, };
// type: MapDeviceType.Signal.type, this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
// label: MapDeviceType.Signal.label, if (valid) {
// operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation let tempData = null;
// }; if (response) {
// this.$store.dispatch('training/next', operate).then(({ valid }) => { tempData = response.data;
// 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.routeHandControl.doShow(operate, this.selected, tempData);
// } }
// }); });
// }, },
// // //
// setAutoTrigger() { detail() {
// let operate = { const operate = {
// start: true, start: true,
// code: this.selected.code, send: true,
// type: MapDeviceType.Signal.type, code: this.selected.code,
// label: MapDeviceType.Signal.label, type: MapDeviceType.Signal.type,
// operation: OperationEvent.Signal.setAutoTrigger.menu.operation label: MapDeviceType.Signal.label,
// }; operation: OperationEvent.Signal.detail.menu.operation
// this.$store.dispatch('training/next', operate).then(({ valid }) => { };
// if (valid) { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (valid) {
// this.$refs.routeControl.doShow(operate, this.selected); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// } this.$refs.routeDetail.doShow(operate, this.selected, response.data);
// }); }
// }, });
// // }
// cancelAutoTrigger() { }
// let operate = {
// start: true,
// code: this.selected.code,
// type: MapDeviceType.Signal.type,
// label: MapDeviceType.Signal.label,
// operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation
// };
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.routeControl.doShow(operate, this.selected);
// }
// });
// },
// //
// signalClose() {
// let operate = {
// start: true,
// code: this.selected.code,
// type: MapDeviceType.Signal.type,
// label: MapDeviceType.Signal.label,
// operation: OperationEvent.Signal.signalClose.menu.operation
// };
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.routeControl.doShow(operate, this.selected);
// }
// });
// },
//
detail() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Signal.type,
label: MapDeviceType.Signal.label,
operation: OperationEvent.Signal.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeDetail.doShow(operate, this.selected, response.data);
}
});
}
}
}; };
</script> </script>

View File

@ -1,153 +1,307 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo"></notice-info> <station-cmd-control ref="stationCmdControl" />
</div> <station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" />
<notice-info ref="noticeInfo" />
</div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo' import StationCmdControl from './dialog/stationCmdControl';
import { mapGetters } from 'vuex'; import StationHumanControlAll from './dialog/stationHumanControlAll';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { mapGetters } from 'vuex';
import { mouseCancelState } from './utils/menuItemStatus'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
components: { components: {
PopMenu, PopMenu,
NoticeInfo StationCmdControl,
}, StationHumanControlAll,
props: { StationSetRouteControlAll,
selected: { NoticeInfo
type: Object },
} props: {
}, selected: {
data() { type: Object,
return { default() {
menu: [], return null;
menuNormal: { }
local: [ }
], },
central: [ data() {
], return {
}, menu: [],
menuForce: [ menuNormal: {
{ local: [
label: '设置ZC故障', {
handler: this.setStoppage, label: '全站设置联锁自动触发',
disabledCallback: MenuDisabledState.Station.setStoppage handler: this.setAutoTrigger,
}, disabledCallback: MenuDisabledState.Station.setAutoTrigger,
{ auth: { station: true, center: false }
label: '取消ZC故障', },
handler: this.cancelStoppage, {
disabledCallback: MenuDisabledState.Station.cancelStoppage label: '全站取消联锁自动触发',
} handler: this.cancelAutoTrigger,
] disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
} auth: { station: true, center: false }
}, },
watch: { {
'$store.state.menuOperation.menuCount': function (val) { label: '上电解锁',
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) { handler: this.powerUnLock,
this.doShow(this.$store.state.menuOperation.menuPosition); disabledCallback: MenuDisabledState.Station.powerUnLock,
} else { auth: { station: true, center: false }
this.doClose(); },
} {
} label: '执行关键操作测试',
}, handler: this.execKeyOperationTest,
computed: { disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
...mapGetters('training', [ auth: { station: true, center: false }
'mode', }
'operatemode' ],
]), central: [
...mapGetters('menuOperation', [ {
'buttonOperation' label: '所有进路自排关',
]) handler: this.humanControlALL,
}, disabledCallback: MenuDisabledState.Station.humanControlALL,
methods: { auth: { station: false, center: true }
clickEvent() { },
let self = this; {
window.onclick = function (e) { label: '所有进路自排开',
self.doClose(); handler: this.atsAutoControlALL,
} disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
}, auth: { station: false, center: true }
initMenu() { },
this.menu = []; {
if (this.selected.concentrateStationCode == this.selected.code) { label: '执行关键操作测试',
// handler: this.execKeyOperationTest,
this.menu = menuFiltration(this.menuNormal); disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
if (this.operatemode === OperateMode.ADMIN) { auth: { station: false, center: true }
this.menu = [...this.menu, ...this.menuForce] }
} ]
} },
menuForce: [
{
label: '设置ZC故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Station.setStoppage
},
{
label: '取消ZC故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Station.cancelStoppage
}
]
};
},
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();
}
}
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
}
if (this.selected.centralized) { if (this.selected.centralized) {
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce] this.menu = [...this.menuForce];
} }
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
}, },
doShow(point) { doShow(point) {
this.clickEvent(); this.clickEvent();
this.initMenu(); this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point); this.$refs.popMenu.resetShowPosition(point);
} }
}, },
doClose() { doClose() {
if (this.$refs && this.$refs.popMenu) { if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
setStoppage() { setStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Station.type, type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label, label: MapDeviceType.Station.label,
operation: OperationEvent.Station.stoppage.menu.operation operation: OperationEvent.Station.stoppage.menu.operation
}; };
mouseCancelState(this.selected); mouseCancelState(this.selected);
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 });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelStoppage() { cancelStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Station.type, type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label, label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelStoppage.menu.operation operation: OperationEvent.Station.cancelStoppage.menu.operation
}; };
mouseCancelState(this.selected); mouseCancelState(this.selected);
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 });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
} },
} //
} setAutoTrigger() {
</script> const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.setAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', 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,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', 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,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.powerUnLock.menu.operation
};
this.$store.dispatch('training/next', 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,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
};
this.$store.dispatch('training/next', 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,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.menu.operation
};
this.$store.dispatch('training/next', 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,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -1,69 +1,69 @@
<template> <template>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'StationControlMenu', name: 'StationControlMenu',
props: { components: {
selected: { PopMenu
type: Object },
} props: {
}, selected: {
components: { type: Object,
PopMenu default() {
}, return null;
data() { }
return { }
menu: [], },
menuNormal: [ data() {
], return {
menuForce: [ menu: [],
] menuNormal: [
} ],
}, menuForce: [
watch: { ]
'$store.state.menuOperation.menuCount': function (val) { };
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) { },
this.doShow(this.$store.state.menuOperation.menuPosition); computed: {
} else { ...mapGetters('training', [
this.doClose(); 'mode',
} 'operatemode'
} ]),
}, ...mapGetters('menuOperation', [
computed: { 'buttonOperation'
...mapGetters('training', [ ])
'mode', },
'operatemode' watch: {
]), '$store.state.menuOperation.menuCount': function (val) {
...mapGetters('menuOperation', [ if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
'buttonOperation' this.doShow(this.$store.state.menuOperation.menuPosition);
]) } else {
}, this.doClose();
methods: { }
clickEvent() { }
let self = this; },
window.onclick = function (e) { methods: {
self.doClose(); clickEvent() {
} const self = this;
}, window.onclick = function (e) {
doShow(point) { self.doClose();
if (this.$refs && this.$refs.popMenu) { };
this.$refs.popMenu.close(); },
} doShow(point) {
}, if (this.$refs && this.$refs.popMenu) {
doClose() { this.$refs.popMenu.close();
if (this.$refs && this.$refs.popMenu) { }
this.$refs.popMenu.close(); },
} doClose() {
} if (this.$refs && this.$refs.popMenu) {
} this.$refs.popMenu.close();
} }
</script> }
}
};
</script>

View File

@ -1,372 +1,541 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl"></stand-control> <stand-control ref="standControl" />
<stand-detail ref="standDetail"></stand-detail> <stand-jump-stop-control ref="standJumpStopControl" />
<notice-info ref="noticeInfo"></notice-info> <stand-detail ref="standDetail" />
</div> <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> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl'; import StandControl from './dialog/standControl';
import StandDetail from './dialog/standDetail'; import StandJumpStopControl from './dialog/standJumpStopControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import StandBackStrategy from './dialog/standBackStrategy';
import { mapGetters } from 'vuex'; import StandDetail from './dialog/standDetail';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import StandRunLevel from './dialog/standRunLevel';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import StandStopTime from './dialog/standStopTime';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import StandDetainTrainAll from './dialog/standDetainTrainAll';
import { mouseCancelState } from './utils/menuItemStatus'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'StationStandMenu', name: 'StationStandMenu',
components: { components: {
PopMenu, PopMenu,
StandControl, StandControl,
StandDetail, StandJumpStopControl,
NoticeInfo, StandDetail,
}, StandRunLevel,
props: { NoticeInfo,
selected: { StandBackStrategy,
type: Object StandStopTime,
} StandDetainTrainAll
}, },
data() { props: {
return { selected: {
menu: [], type: Object,
menuNormal: { default() {
local: [ return null;
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true },
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true },
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true },
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true },
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true },
},
{
label: '设置站间运行等级',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true },
},
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true },
}
],
central: [
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true },
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true },
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true },
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true },
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true },
},
{
label: '设置站间运行等级',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true },
},
{
label: '属性',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true },
}
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.StationStand.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
}
]
}
},
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() {
let self = this;
window.onclick = function (e) {
self.doClose();
}
},
initMenu() {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce]
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce
}
this.menu = menuConvert(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();
}
},
//
setStoppage() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
cancelStoppage() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
setDetainTrain() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
})
},
//
cancelDetainTrain() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
})
},
//
setJumpStop() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
})
},
//
cancelJumpStop() {
let operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
})
},
//
setStopTime() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setStopTime.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected, tempDate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
setRunLevel() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setRunLevel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected, tempDate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
},
//
detail() {
let operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
} }
} }
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: '设置扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: false }
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true }
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: false }
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '提前发车',
handler: this.earlyDeparture,
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
auth: { station: true, center: true }
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '站台详细信息',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true }
},
{
label: '运行时间控制',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: false, center: false }
},
{
label: '设置提前发车',
handler: this.earlyDeparture,
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
auth: { station: false, center: false }
},
// {
// label: '',
// handler: this.setBackStrategy,
// disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
// auth: { station: false, center: false }
// },
{
label: '查询站台状态',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: false, center: false }
}
],
central: [
{
label: '扣车',
handler: this.setDetainTrain,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true }
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true }
},
{
label: '提前发车',
handler: this.earlyDeparture,
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
auth: { station: true, center: true }
},
{
label: '设置跳停',
handler: this.setJumpStop,
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
auth: { station: true, center: true }
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '设置停站时间',
handler: this.setStopTime,
disabledCallback: MenuDisabledState.StationStand.setStopTime,
auth: { station: true, center: true }
},
{
label: '设置运行等级',
handler: this.setRunLevel,
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
auth: { station: true, center: true }
},
// {
// label: '',
// handler: this.setBackStrategy,
// disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
// auth: { station: true, center: true }
// },
{
type: 'separator'
},
{
label: '区间列车数量限制',
handler: this.setDetainTrainAll,
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
auth: { station: true, center: true }
},
{
label: '取消区间列车数量限制',
handler: this.cancelDetainTrainAll,
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '查看站台信息',
handler: this.detail,
disabledCallback: MenuDisabledState.StationStand.detail,
auth: { station: true, center: true }
}
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.StationStand.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
}
]
};
},
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 = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
this.menu = menuConvert(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();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', 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,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setDetainTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setDetainTrainAll() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrainAll() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrainForce() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setJumpStop() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standJumpStopControl.doShow(operate, this.selected);
}
});
},
//
cancelJumpStop() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standJumpStopControl.doShow(operate, this.selected);
}
});
},
//
setStopTime() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setStopTime.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setRunLevel() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.setRunLevel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
console.log(valid, '----')
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
earlyDeparture() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
// setBackStrategy() {
// const operate = {
// start: true,
// send: true,
// code: this.selected.code,
// type: MapDeviceType.StationStand.type,
// operation: OperationEvent.StationStand.setBackStrategy.menu.operation
// };
// this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
// if (valid) {
// let tempDate = null;
// if (response) {
// tempDate = response.data;
// }
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate);
// }
// }).catch(() => {
// this.$refs.noticeInfo.doShow(operate);
// });
// },
//
detail() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.StationStand.type,
label: MapDeviceType.StationStand.label,
operation: OperationEvent.StationStand.detail.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
let tempDate = null;
if (response) {
tempDate = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
}
} }
</script> };
</script>

View File

@ -1,462 +1,451 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu"></pop-menu> <pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl"></section-control> <section-control ref="sectionControl" />
<switch-control ref="switchControl"></switch-control> <switch-control ref="switchControl" />
<notice-info ref="noticeInfo"></notice-info> <switch-cmd-control ref="switchCmdControl" />
</div> <speed-cmd-control ref="speedCmdControl" />
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
</div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl'; import SectionControl from './dialog/sectionControl';
import SwitchControl from './dialog/switchControl'; import SwitchControl from './dialog/switchControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import SwitchCmdControl from './dialog/switchCmdControl';
import { mapGetters } from 'vuex'; import SpeedCmdControl from './dialog/speedCmdControl';
import { TrainingMode, OperateMode } from '@/scripts/ConstDic'; import SpeedLimitControl from './dialog/speedLimitControl';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import AlxeEffective from './dialog/alxeEffective';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mouseCancelState } from './utils/menuItemStatus'; import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
components: { components: {
PopMenu, PopMenu,
SectionControl, SectionControl,
SwitchControl, SwitchControl,
NoticeInfo SwitchCmdControl,
}, SpeedLimitControl,
props: { SpeedCmdControl,
selected: { AlxeEffective,
type: Object NoticeInfo
} },
}, props: {
data() { selected: {
return { type: Object,
menu: [], default() {
menuNormal: { return null;
local: [ }
{ }
label: '单操到定位', },
handler: this.locate, data() {
disabledCallback: MenuDisabledState.Switch.locate, return {
auth: { station: true, center: true } menu: [],
}, menuNormal: {
{ local: [
label: '单操到反位', {
handler: this.reverse, label: '轨道切除',
disabledCallback: MenuDisabledState.Switch.reverse, handler: this.split,
auth: { station: true, center: true } disabledCallback: MenuDisabledState.Switch.split,
}, auth: { station: true, center: true }
{ },
label: '道岔单锁', {
handler: this.lock, label: '轨道激活',
disabledCallback: MenuDisabledState.Switch.lock, handler: this.active,
auth: { station: true, center: false } disabledCallback: MenuDisabledState.Switch.active,
}, auth: { station: true, center: true }
{ }
label: '道岔解锁', ],
handler: this.unlock, central: [
disabledCallback: MenuDisabledState.Switch.unlock, {
auth: { station: true, center: true } label: '单操到定位',
}, handler: this.locate,
{ disabledCallback: MenuDisabledState.Switch.locate,
label: '道岔封锁', auth: { station: true, center: true }
handler: this.block, },
disabledCallback: MenuDisabledState.Switch.block, {
auth: { station: true, center: true } label: '单操到反位',
}, handler: this.reverse,
{ disabledCallback: MenuDisabledState.Switch.reverse,
label: '道岔解封', auth: { station: true, center: true }
handler: this.unblock, },
disabledCallback: MenuDisabledState.Switch.unblock, {
auth: { station: true, center: true } label: '道岔单锁',
}, handler: this.lock,
{ disabledCallback: MenuDisabledState.Switch.lock,
label: '区故解', auth: { station: true, center: false }
handler: this.fault, },
disabledCallback: MenuDisabledState.Switch.fault, {
auth: { station: true, center: true } label: '道岔单解',
}, handler: this.unlock,
{ disabledCallback: MenuDisabledState.Switch.unlock,
label: '属性', auth: { station: true, center: true }
handler: this.undeveloped, },
disabledCallback: MenuDisabledState.Switch.property, {
auth: { station: true, center: true } label: '道岔封锁',
}, handler: this.block,
], disabledCallback: MenuDisabledState.Switch.block,
central: [ auth: { station: true, center: true }
{ },
label: '单操到定位', {
handler: this.locate, label: '道岔解封',
disabledCallback: MenuDisabledState.Switch.locate, handler: this.unblock,
auth: { station: true, center: true } disabledCallback: MenuDisabledState.Switch.unblock,
}, auth: { station: true, center: true }
{ },
label: '单操到反位', {
handler: this.reverse, label: '区故解',
disabledCallback: MenuDisabledState.Switch.reverse, handler: this.fault,
auth: { station: true, center: true } disabledCallback: MenuDisabledState.Switch.fault,
}, auth: { station: true, center: true }
{ }
label: '道岔单锁', ]
handler: this.lock, },
disabledCallback: MenuDisabledState.Switch.lock, menuForce: [
auth: { station: true, center: false } {
}, label: '设置故障',
{ handler: this.setStoppage,
label: '道岔解锁', disabledCallback: MenuDisabledState.Switch.setStoppage,
handler: this.unlock, auth: {
disabledCallback: MenuDisabledState.Switch.unlock,
auth: { station: true, center: true }
},
{
label: '道岔封锁',
handler: this.block,
disabledCallback: MenuDisabledState.Switch.block,
auth: { station: true, center: true }
},
{
label: '道岔解封',
handler: this.unblock,
disabledCallback: MenuDisabledState.Switch.unblock,
auth: { station: true, center: true }
},
{
label: '区故解',
handler: this.fault,
disabledCallback: MenuDisabledState.Switch.fault,
auth: { station: true, center: true }
},
{
label: '属性',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Switch.property,
auth: { station: true, center: true }
}
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Switch.setStoppage,
auth: {
} }
}, },
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage, handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Switch.cancelStoppage, disabledCallback: MenuDisabledState.Switch.cancelStoppage,
auth: { auth: {
} }
} }
] ]
} };
}, },
watch: { watch: {
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition); this.doShow(this.$store.state.menuOperation.menuPosition);
} else { } else {
this.doClose(); this.doClose();
} }
} }
}, },
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
]) ])
}, },
methods: { methods: {
clickEvent() { clickEvent() {
let self = this; const self = this;
window.onclick = function (e) { window.onclick = function (e) {
self.doClose(); self.doClose();
} };
}, },
initMenu() { initMenu() {
// //
this.menu = menuFiltration(this.menuNormal); this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) { if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce] this.menu = [...this.menu, ...this.menuForce];
} }
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce this.menu = this.menuForce;
} }
this.menu = menuConvert(this.menu); this.menu = menuConvert(this.menu);
}, },
doShow(point) { doShow(point) {
this.clickEvent(); this.clickEvent();
this.initMenu(); this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point); this.$refs.popMenu.resetShowPosition(point);
} }
}, },
doClose() { doClose() {
if (this.$refs && this.$refs.popMenu) { if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
// //
setStoppage() { setStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.stoppage.menu.operation operation: OperationEvent.Switch.stoppage.menu.operation
}; };
mouseCancelState(this.selected); mouseCancelState(this.selected);
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 });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
cancelStoppage() { cancelStoppage() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelStoppage.menu.operation operation: OperationEvent.Switch.cancelStoppage.menu.operation
}; };
mouseCancelState(this.selected); mouseCancelState(this.selected);
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 });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}) });
}, },
// //
lock() { lock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.lock.menu.operation operation: OperationEvent.Switch.lock.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.switchControl.doShow(operate, this.selected); this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
unlock() { unlock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.unlock.menu.operation operation: OperationEvent.Switch.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.switchControl.doShow(operate, this.selected); this.$refs.switchCmdControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
block() { block() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.block.menu.operation operation: OperationEvent.Switch.block.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.switchControl.doShow(operate, this.selected); this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
unblock() { unblock() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.unblock.menu.operation operation: OperationEvent.Switch.unblock.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.switchControl.doShow(operate, this.selected); this.$refs.switchCmdControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
switchTurnoutForce() { switchTurnoutForce() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.turnoutForce.menu.operation operation: OperationEvent.Switch.turnoutForce.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.switchControl.doShow(operate, this.selected); this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
switchTurnout() { switchTurnout() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.turnout.menu.operation operation: OperationEvent.Switch.turnout.menu.operation
}; };
if (operate.operation) { if (operate.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.switchControl.doShow(operate, this.selected); this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
} }
}, },
// //
fault() { fault() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.fault.menu.operation operation: OperationEvent.Switch.fault.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.switchControl.doShow(operate, this.selected); this.$refs.switchCmdControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
cancelSpeed() { cancelSpeed() {
let operate = { const operate = {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.cancelSpeed.menu.operation operation: OperationEvent.Switch.cancelSpeed.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
let tempData = response.data; const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData); this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
} }
}); });
}, },
// //
split() { split() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.split.menu.operation operation: OperationEvent.Switch.split.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.switchControl.doShow(operate, this.selected); this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
active() { active() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.active.menu.operation operation: OperationEvent.Switch.active.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.switchControl.doShow(operate, this.selected); this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
locate() { axlePreReset() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.locate.menu.operation operation: OperationEvent.Switch.axlePreReset.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.switchControl.doShow(operate, this.selected); this.$refs.switchCmdControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
reverse() { setSpeed() {
let operate = { const operate = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
type: MapDeviceType.Switch.type, type: MapDeviceType.Switch.type,
label: MapDeviceType.Switch.label, label: MapDeviceType.Switch.label,
operation: OperationEvent.Switch.reverse.menu.operation operation: OperationEvent.Switch.setSpeed.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.switchControl.doShow(operate, this.selected); this.$refs.speedLimitControl.doShow(operate, this.selected);
} }
}); });
}, },
undeveloped() { //
this.doClose(); alxeEffective() {
this.$alert('实现中......', '提示', { const operate = {
confirmButtonText: '确定', start: true,
callback: action => { code: this.selected.code,
} type: MapDeviceType.Switch.type,
}); label: MapDeviceType.Switch.label,
} operation: OperationEvent.Switch.alxeEffective.menu.operation
} };
} this.$store.dispatch('training/next', operate).then(({ valid }) => {
</script> if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.alxeEffective.doShow(operate, this.selected);
}
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
}
};
</script>

View File

@ -1,149 +1,147 @@
<template> <template>
<div id="menuTool"> <div id="menuTool">
<div class="nav"> <div class="nav">
<div class="tool" v-for="(item,index) in tools" :key="index"> <div v-for="(item,index) in tools" :key="index" class="tool">
<img :src="item.src" :alt="item.title" /> <img :src="item.src" :alt="item.title">
</div> </div>
<img class="logo" :src="logoImg" /> <img class="logo" :src="logoImg">
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2" <system-time v-if="isShowSystemTime" class="time" :time="time" :zoom="2" :width="180" :height="48" :fine="2" :top="6" />
:top="6"></system-time>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { prefixIntrger } from '@/utils/date';
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import SystemTime from '@/views/components/systemTime/index';
import { OperateMode } from '@/scripts/ConstDic'; import logo_ from '@/assets/logo_.png';
import { prefixIntrger } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index';
import logo_ from '@/assets/logo_.png';
export default {
export default { name: 'MenuTool',
name: 'MenuTool', components: {
props: { SystemTime
selected: { },
type: Object props: {
} selected: {
}, type: Object,
components: { default() {
SystemTime return null;
}, }
data() { }
return { },
logoImg: logo_, data() {
time: '00:0000', return {
tools: [ logoImg: logo_,
{ time: '00:0000',
title: '服务器1', tools: [
operate: '', {
src: logo_, title: '服务器1',
click: this.undeveloped, operate: '',
}, src: logo_,
{ click: this.undeveloped
title: '服务器2', },
operate: '', {
src: '', title: '服务器2',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '前置机1', },
operate: '', {
src: '', title: '前置机1',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '前置机2', },
operate: '', {
src: '', title: '前置机2',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '主调', },
operate: '', {
src: '', title: '主调',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '调度台1', },
operate: '', {
src: '', title: '调度台1',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '调度台2', },
operate: '', {
src: '', title: '调度台2',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '调度台3', },
operate: '', {
src: '', title: '调度台3',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '大屏', },
operate: '', {
src: '', title: '大屏',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '维护工作站', },
operate: '', {
src: '', title: '维护工作站',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '运行图显示人工站', },
operate: '', {
src: '', title: '运行图显示人工站',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '跳停', },
operate: '', {
src: '', title: '跳停',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '扣车', },
operate: '', {
src: '', title: '扣车',
click: this.undeveloped, operate: '',
}, src: '',
{ click: this.undeveloped
title: '列车报警', },
operate: '', {
src: logo_, title: '列车报警',
click: this.undeveloped, operate: '',
} src: logo_,
] click: this.undeveloped
} }
}, ]
watch: { };
'$store.state.training.initTime': function (initTime) { },
let date = new Date(initTime); computed: {
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}` isShowSystemTime() {
} return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}, }
computed: { },
isShowSystemTime() { watch: {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode; '$store.state.training.initTime': function (initTime) {
} const date = new Date(initTime);
}, this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
mounted() { }
this.initTools(); },
}, mounted() {
methods: { this.initTools();
initTools() { },
this.tools = []; methods: {
} initTools() {
} this.tools = [];
} }
}
};
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
$top: 30px; $top: 30px;
$width: 50px; $width: 50px;
@ -187,7 +185,6 @@
} }
} }
.time { .time {
position: relative; position: relative;
float: right; float: right;
@ -202,4 +199,4 @@
height: $height - 4; height: $height - 4;
width: $width - 4; width: $width - 4;
} }
</style> </style>

View File

@ -1,14 +1,57 @@
<template> <template>
<div> <div>
1111111 <pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" />
<train-delete ref="trainDelete" />
<train-define ref="trainDefine" />
<train-move ref="trainMove" />
<train-edit ref="trainEdit" />
<train-set-plan ref="trainSetPlan" />
<train-add-plan ref="trainAddPlan" />
<train-move-evently ref="trainMoveEvently" />
<train-delete-plan ref="trainDeletePlan" />
<train-set-head ref="trainSetHead" />
<train-set-work ref="trainSetWork" />
<train-flag ref="trainFlag" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
import TrainDelete from './dialog/trainDelete';
import TrainDefine from './dialog/trainDefine';
import TrainMove from './dialog/trainMove';
import TrainEdit from './dialog/trainEdit';
import TrainSetPlan from './dialog/trainSetPlan';
import TrainAddPlan from './dialog/trainAddPlan';
import TrainMoveEvently from './dialog/trainMoveEvently';
import TrainDeletePlan from './dialog/trainDeletePlan';
import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork';
import TrainFlag from './dialog/trainFlag';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'MenuTrain', name: 'MenuTrain',
components: { components: {
PopMenu,
NoticeInfo,
TrainDelete,
TrainDefine,
TrainMove,
TrainEdit,
TrainSetPlan,
TrainAddPlan,
TrainMoveEvently,
TrainDeletePlan,
TrainSetHead,
TrainSetWork,
TrainFlag
}, },
props: { props: {
selected: { selected: {
@ -22,21 +65,537 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [], local: [
central: [] {
label: '定义车组号',
handler: this.addTrainId,
disabledCallback: MenuDisabledState.Train.addTrainId,
auth: { station: true, center: true }
},
{
label: '删除车组号',
handler: this.delTrainId,
disabledCallback: MenuDisabledState.Train.delTrainId,
auth: { station: true, center: true }
},
{
label: '修改车组号',
handler: this.editTrainId,
disabledCallback: MenuDisabledState.Train.editTrainId,
auth: { station: true, center: true }
},
{
label: '移动车组号',
handler: this.moveTrainId,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '设置计划车',
handler: this.setPlanTrain,
disabledCallback: MenuDisabledState.Train.setPlanTrain,
auth: { station: true, center: true }
},
{
label: '设置头码车',
handler: this.setHeadTrain,
disabledCallback: MenuDisabledState.Train.setHeadTrain,
auth: { station: true, center: true }
},
{
label: '设置人工车',
handler: this.setWorkTrain,
disabledCallback: MenuDisabledState.Train.setWorkTrain,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '添加计划车',
// handler: this.undeveloped,
handler: this.addPlanTrain,
// disabledCallback: MenuDisabledState.Train.moveTrainId,
disabledCallback: MenuDisabledState.Train.addPlanTrain,
auth: { station: true, center: true }
},
{
label: '删除计划车',
// handler: this.undeveloped,
handler: this.deletePlanTrain,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
label: '平移计划车',
// handler: this.undeveloped,
handler: this.moveEventlyTrain,
disabledCallback: MenuDisabledState.Train.moveEventlyTrain,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '标记重点列车',
handler: this.trainToFlag,
disabledCallback: MenuDisabledState.Train.trainToFlag,
auth: { station: true, center: true }
},
{
label: '取消标记重点列车',
handler: this.trainUnFlag,
disabledCallback: MenuDisabledState.Train.trainUnFlag,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '列车信息',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
}
],
central: [
{
label: '定义车组号',
handler: this.addTrainId,
disabledCallback: MenuDisabledState.Train.addTrainId,
auth: { station: true, center: true }
},
{
label: '删除车组号',
handler: this.delTrainId,
disabledCallback: MenuDisabledState.Train.delTrainId,
auth: { station: true, center: true }
},
{
label: '修改车组号',
handler: this.editTrainId,
disabledCallback: MenuDisabledState.Train.editTrainId,
auth: { station: true, center: true }
},
{
label: '移动车组号',
handler: this.moveTrainId,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '设置计划车',
handler: this.setPlanTrain,
disabledCallback: MenuDisabledState.Train.setPlanTrain,
auth: { station: true, center: true }
},
{
label: '设置头码车',
handler: this.setHeadTrain,
disabledCallback: MenuDisabledState.Train.setHeadTrain,
auth: { station: true, center: true }
},
{
label: '设置人工车',
handler: this.setWorkTrain,
disabledCallback: MenuDisabledState.Train.setWorkTrain,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '添加计划车',
// handler: this.undeveloped,
handler: this.addPlanTrain,
// disabledCallback: MenuDisabledState.Train.moveTrainId,
disabledCallback: MenuDisabledState.Train.addPlanTrain,
auth: { station: true, center: true }
},
{
label: '删除计划车',
// handler: this.undeveloped,
handler: this.deletePlanTrain,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
label: '平移计划车',
// handler: this.undeveloped,
handler: this.moveEventlyTrain,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '标记重点列车',
handler: this.trainToFlag,
disabledCallback: MenuDisabledState.Train.trainToFlag,
auth: { station: true, center: true }
},
{
label: '取消标记重点列车',
handler: this.trainUnFlag,
disabledCallback: MenuDisabledState.Train.trainUnFlag,
auth: { station: true, center: true }
},
{
type: 'separator'
},
{
label: '列车信息',
handler: this.undeveloped,
disabledCallback: MenuDisabledState.Train.moveTrainId,
auth: { station: true, center: true }
}
]
}, },
menuForce: [], menuForce: [
menuSpeed: [] {
label: '设置通信故障',
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Train.setStoppage
},
{
label: '取消通信故障',
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Train.cancelStoppage
}
],
menuSpeed: [
{
label: '确认运行至前方站',
handler: this.limitSpeed,
disabledCallback: MenuDisabledState.Train.limitSpeed
}
]
}; };
}, },
computed: { computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
}, },
watch: { 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: { methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
//
this.menu = trainMenuFiltration(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 = menuConvert(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 operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', 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,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
limitSpeed() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.limitSpeed.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
addTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.addTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDefine.doShow(operate, this.selected);
}
});
},
//
delTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.delTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate, this.selected);
}
});
},
//
moveTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.moveTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMove.doShow(operate, this.selected);
}
});
},
//
editTrainId() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainEdit.doShow(operate, this.selected);
}
});
},
//
setPlanTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSetPlan.doShow(operate, this.selected);
}
});
},
//
addPlanTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.addPlanTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(operate, this.selected);
}
});
},
//
moveEventlyTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.moveEventlyTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMoveEvently.doShow(operate, this.selected);
}
});
},
//
deletePlanTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.deletePlanTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDeletePlan.doShow(operate, this.selected);
}
});
},
//
setHeadTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSetHead.doShow(operate, this.selected);
}
});
},
//
setWorkTrain() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSetWork.doShow(operate, this.selected);
}
});
},
//
trainToFlag() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainFlag.doShow(operate, this.selected);
}
});
},
//
trainUnFlag() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Train.type,
label: MapDeviceType.Train.label,
operation: OperationEvent.Train.editTrainId.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainFlag.doShow(operate, this.selected);
}
});
}
} }
}; };
</script> </script>

View File

@ -1,204 +1,207 @@
<template> <template>
<el-dialog v-dialogDrag class="ningbo_01__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <el-dialog class="ningbo-01__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px"
<el-form label-width="80px" size="mini"> :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row> <el-form label-width="80px" size="mini">
<el-col :span="8"> <el-row>
<el-form-item label="线路名称"> <el-col :span="8">
<el-input v-model="model.lineName" disabled /> <el-form-item label="线路名称">
</el-form-item> <el-input v-model="model.lineName" disabled></el-input>
</el-col> </el-form-item>
<el-col :span="8"> </el-col>
<el-form-item label="单位名称"> <el-col :span="8">
<el-input v-model="model.unitName" disabled /> <el-form-item label="单位名称">
</el-form-item> <el-input v-model="model.unitName" disabled></el-input>
</el-col> </el-form-item>
<el-col :span="8"> </el-col>
<el-form-item label="模块名称"> <el-col :span="8">
<el-input v-model="model.moduleName" disabled /> <el-form-item label="模块名称">
</el-form-item> <el-input v-model="model.moduleName" disabled></el-input>
</el-col> </el-form-item>
</el-row> </el-col>
<el-row> </el-row>
<el-col :span="9"> <el-row>
<el-form-item label="报警时间"> <el-col :span="9">
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled /> <el-form-item label="报警时间">
</el-form-item> <el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
</el-col> </el-date-picker>
<el-col :span="7"> </el-form-item>
<el-form-item> </el-col>
<span slot="label">&emsp;</span> <el-col :span="7">
<el-input v-model="model.level" disabled /> <el-form-item>
</el-form-item> <span slot="label">&emsp;</span>
</el-col> <el-input v-model="model.level" disabled></el-input>
<el-col :span="8"> </el-form-item>
<el-form-item label="确认状态"> </el-col>
<el-input v-model="model.confirm" disabled /> <el-col :span="8">
</el-form-item> <el-form-item label="确认状态">
</el-col> <el-input v-model="model.confirm" disabled></el-input>
</el-row> </el-form-item>
<el-row> </el-col>
<el-col :span="9" class="alarm-type"> </el-row>
<el-form-item> <el-row>
<span slot="label">&emsp;&emsp;</span> <el-col :span="9" class="alarm-type">
<el-input v-model="model.type" disabled /> <el-form-item>
</el-form-item> <span slot="label">&emsp;&emsp;</span>
</el-col> <el-input v-model="model.type" disabled></el-input>
<el-col :span="15" class="alarm-child-type"> </el-form-item>
<el-form-item label="子类型"> </el-col>
<el-input v-model="model.childType" disabled /> <el-col :span="15" class="alarm-child-type">
</el-form-item> <el-form-item label="子类型">
</el-col> <el-input v-model="model.childType" disabled></el-input>
</el-row> </el-form-item>
<el-form-item label="时间摘要"> </el-col>
<el-input v-model="model.timeSummary" disabled /> </el-row>
</el-form-item> <el-form-item label="时间摘要">
<el-form-item label="推荐操作"> <el-input v-model="model.timeSummary" disabled></el-input>
<el-input v-model="model.recommendedOperation" disabled /> </el-form-item>
</el-form-item> <el-form-item label="推荐操作">
<div class="alarm-detail-description"> <el-input v-model="model.recommendedOperation" disabled></el-input>
<span> 报警详细描述</span><br> </el-form-item>
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled /> <div class="alarm-detail-description">
</div> <span> 报警详细描述</span><br>
</el-form> <el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
<el-row class="button-group"> </el-input>
<el-col :span="3" :offset="9"> </div>
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button> </el-form>
</el-col> <el-row class="button-group">
<el-col :span="10"> <el-col :span="3" :offset="9">
<span style="line-height:26px">未确认{{ level }}级报警数目1</span> <el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button>
</el-col> </el-col>
</el-row> <el-col :span="10">
<!-- </span> --> <span style="line-height:26px">未确认{{level}}级报警数目1</span>
</el-dialog> </el-col>
</el-row>
</el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'AlarmDetail', name: 'AlarmDetail',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
level: 0, level: 0,
operate: null, operate: null,
controlProps: { controlProps: {
'01': '中控', '01': '中控',
'02': '站控' '02': '站控'
}, },
model: { model: {
lineName: '', lineName: '',
unitName: '', unitName: '',
moduleName: '', moduleName: '',
level: '', level: '',
confirm: '', confirm: '',
alarmDate: '', alarmDate: '',
type: '', type: '',
childType: '', childType: '',
timeSummary: '', timeSummary: '',
recommendedOperation: '', recommendedOperation: '',
alarmDetail: '' alarmDetail: ''
} }
}; }
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'name' 'name',
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : ''; return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
} },
}, },
watch: { watch: {
'$store.state.socket.msgHead': function (elem) { '$store.state.socket.msgHead': function (elem) {
if (elem && elem.hasOwnProperty('success')) { if (elem && elem.hasOwnProperty('success')) {
if (elem.success) { if (elem.success) {
const operate = this.$store.state.training.operate; let operate = this.$store.state.training.operate;
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode); let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode); let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = { let newOperate = {
type: operate.type, type: operate.type,
name: station.name name: station.name,
}; }
this.doShow(newOperate); this.doShow(newOperate);
} }
} }
} },
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}); })
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
this.operate = operate || {}; this.operate = operate || {};
this.model = { this.model = {
lineName: this.name, lineName: this.name,
unitName: this.operate.name, unitName: this.operate.name,
moduleName: 'CMM控制模式转换模式', moduleName: 'CMM控制模式转换模式',
level: '0级告警', level: '0级告警',
confirm: '确认状态', confirm: '确认状态',
alarmDate: new Date(), alarmDate: new Date(),
type: '系统事件', type: '系统事件',
childType: '依据信号设备操作命令设置控制模式', childType: '依据信号设备操作命令设置控制模式',
timeSummary: '控制模式摘要', timeSummary: '控制模式摘要',
recommendedOperation: '', recommendedOperation: '',
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!` alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
}; }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
if (this.dialogShow) { if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue'); this.$store.dispatch('socket/shiftMsgQueue');
} }
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
cancel() { cancel() {
const operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation operation: OperationEvent.Command.close.alarm.operation,
}; }
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}); })
}, },
commit() { commit() {
const operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation operation: OperationEvent.Command.close.alarm.operation,
}; }
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}); })
}, },
isClose() { isClose() {
return this.dialogShow; return this.dialogShow;
} }
} }
}; }
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.alarm-type .el-input { .alarm-type .el-input {
width: 220px; width: 220px;
} }
@ -207,4 +210,4 @@ export default {
padding-left: 12px; padding-left: 12px;
text-align: left; text-align: left;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm passive-control" title="控制模式请求" :visible.sync="show" width="700px" <el-dialog class="ningbo-01__systerm passive-control" title="控制模式请求" :visible.sync="show" width="700px"
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false" :before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag> v-dialogDrag>
<span class="control-label">{{`${requestInfo}请求如下区域的控制模式`}}</span> <span class="control-label">{{`${requestInfo}请求如下区域的控制模式`}}</span>
@ -157,7 +157,7 @@
let device = this.$store.getters['map/getDeviceByCode'](code); let device = this.$store.getters['map/getDeviceByCode'](code);
if (device) { if (device) {
let control = (device || {}).state let control = (device||{}).state;
if (control) { if (control) {
model.control = { status: control.status, name: this.controlProps[control.status] }; model.control = { status: control.status, name: this.controlProps[control.status] };
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] }; model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="ningbo_01__systerm cmd-notice" title="操作命令提示" :visible.sync="show" width="400px" :before-close="doClose" <el-dialog class="ningbo-01__systerm cmd-notice" title="操作命令提示" :visible.sync="show" width="400px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<span>{{name}}{{msg}}!</span> <span>{{name}}{{msg}}!</span>
<el-row class="button-group"> <el-row class="button-group">

View File

@ -1,31 +1,26 @@
<template> <template>
<div id="statusBar"></div> <div id="statusBar" />
</template> </template>
<script> <script>
export default { export default {
name: 'StatusBar', name: 'StatusBar',
props: { props: {
selected: { selected: {
type: Object type: Object,
} default() {
}, return null;
data() { }
return { }
} },
}, data() {
mounted() { return {
} };
} },
mounted() {
}
};
</script> </script>
<style> <style>
#statusBar {
z-index: 1000; </style>
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style>

View File

@ -1,31 +1,26 @@
<template> <template>
<div id="statusDownTrainDetail"></div> <div id="statusDownTrainDetail" />
</template> </template>
<script> <script>
export default { export default {
name: 'StatusDownTrainDetail', name: 'StatusDownTrainDetail',
props: { props: {
selected: { selected: {
type: Object type: Object,
} default() {
}, return null;
data() { }
return { }
} },
}, data() {
mounted() { return {
} };
} },
mounted() {
}
};
</script> </script>
<style> <style>
#statusDownTrainDetail {
z-index: 1000; </style>
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__schedule add-task" class="ningbo-01__schedule add-task"
:title="title" :title="title"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="800px" width="800px"

View File

@ -2,9 +2,9 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
:title="title" :title="title"
class="beijing-01__schedule choose-plan-template" class="ningbo-01__schedule choose-plan-template"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="70%" width="80%"
:before-close="doClose" :before-close="doClose"
:modal="false" :modal="false"
:close-on-click-modal="false" :close-on-click-modal="false"
@ -88,8 +88,8 @@ export default {
}, },
queryFunction(params) { queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) { if (this.$store.state.map && this.$store.state.map.map) {
// params['lineCode'] = this.$store.getters['map/lineCode'];
params['mapId'] = this.$route.query.mapId; params['mapId'] = this.$route.query.mapId;
// params['lineCode'] = this.$store.getters['map/lineCode'];
} }
return runPlanTemplateList(params); return runPlanTemplateList(params);
}, },

View File

@ -69,7 +69,7 @@ export default {
}; };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss"> <style scoped rel="stylesheet/scss" lang="scss" >
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
$height: 20px; $height: 20px;
$width: 20px; $width: 20px;
@ -190,7 +190,7 @@ export default {
background: black; background: black;
width: 2px; width: 2px;
height: 12px; height: 12px;
transform: rotate(0deg); transform: rotate(0deg);
} }
span::after { span::after {

View File

@ -2,7 +2,7 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
:title="title" :title="title"
class="beijing-01__schedule reload-today-plan" class="ningbo-01__schedule reload-today-plan"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="80%" width="80%"
:before-close="doClose" :before-close="doClose"
@ -21,7 +21,7 @@
import { runPlanTemplateList } from '@/api/runplan'; import { runPlanTemplateList } from '@/api/runplan';
import { getStationList } from '@/api/runplan'; import { getStationList } from '@/api/runplan';
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation'; import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
import {getPublishMapInfo} from '@/api/jmap/map'; import { getPublishMapInfo } from '@/api/jmap/map';
export default { export default {
name: 'ReloadTodayPlan', name: 'ReloadTodayPlan',

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__schedule create-week-plan" class="ningbo-01__schedule create-week-plan"
:title="title" :title="title"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="800px" width="800px"

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__schedule delete-task" class="ningbo-01__schedule delete-task"
:title="title" :title="title"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="400px" width="400px"

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__schedule create-week-plan" class="ningbo-01__schedule create-week-plan"
:title="title" :title="title"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="400px" width="400px"

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__schedule manage-plan-list" class="ningbo-01__schedule manage-plan-list"
:title="title" :title="title"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="80%" width="80%"

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__schedule edit-planning-train" class="ningbo-01__schedule edit-planning-train"
:title="title" :title="title"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="800px" width="800px"

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__schedule add-task" class="ningbo-01__schedule add-task"
:title="title" :title="title"
:visible.sync="dialogShow" :visible.sync="dialogShow"
width="1000px" width="1000px"
@ -265,6 +265,7 @@ export default {
this.model.serviceNumber = params.serviceNumber; this.model.serviceNumber = params.serviceNumber;
const editData = this.$store.state.runPlan.editData[params.serviceNumber]; const editData = this.$store.state.runPlan.editData[params.serviceNumber];
if (editData) { if (editData) {
// const tripNumberList = Object.keys(editData.trainMap).sort((a, b) => { return editData.trainMap[a].oldIndex - editData.trainMap[b].oldIndex; });
const trainInfo = editData.trainMap[params.tripNumber]; const trainInfo = editData.trainMap[params.tripNumber];
const lastIndex = trainInfo.stationTimeList.length - 1; const lastIndex = trainInfo.stationTimeList.length - 1;
const taskObj = { const taskObj = {

View File

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

View File

@ -130,11 +130,11 @@ export default {
color: #B4B3B8; color: #B4B3B8;
} }
.beijing-01__schedule { .ningbo-01__schedule {
overflow: hidden !important; overflow: hidden !important;
} }
.beijing-01__schedule .el-dialog { .ningbo-01__schedule .el-dialog {
background: rgba(0, 85, 231, 1); background: rgba(0, 85, 231, 1);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset; box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 2px solid #727375; border: 2px solid #727375;
@ -143,17 +143,17 @@ export default {
font-size: 14px; font-size: 14px;
} }
.beijing-01__schedule .el-dialog .el-dialog__header { .ningbo-01__schedule .el-dialog .el-dialog__header {
height: 30px; height: 30px;
padding: 5px; padding: 5px;
} }
.beijing-01__schedule .el-dialog .el-dialog__footer { .ningbo-01__schedule .el-dialog .el-dialog__footer {
background: #ECE9D8; background: #ECE9D8;
opacity: 1; opacity: 1;
} }
.beijing-01__schedule .el-dialog .el-dialog__body { .ningbo-01__schedule .el-dialog .el-dialog__body {
padding-top: 10px; padding-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
padding-left: 5px; padding-left: 5px;
@ -166,11 +166,11 @@ export default {
opacity: 1; opacity: 1;
} }
.beijing-01__schedule .el-dialog .el-dialog__title { .ningbo-01__schedule .el-dialog .el-dialog__title {
font-size: 16px; font-size: 16px;
} }
.beijing-01__schedule .el-dialog .el-dialog__headerbtn { .ningbo-01__schedule .el-dialog .el-dialog__headerbtn {
background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); background: -webkit-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); background: -o-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); background: -moz-linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
@ -183,23 +183,23 @@ export default {
width: 26px; width: 26px;
} }
.beijing-01__schedule .el-dialog .el-dialog__headerbtn .el-icon-close:before { .ningbo-01__schedule .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px; font-size: 16px;
} }
.beijing-01__schedule .el-dialog .el-dialog__headerbtn .el-dialog__close { .ningbo-01__schedule .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff; color: #fff;
} }
.beijing-01__schedule .el-dialog .el-form { .ningbo-01__schedule .el-dialog .el-form {
background: #ECE9D8 !important; background: #ECE9D8 !important;
} }
.beijing-01__schedule .el-dialog .el-card { .ningbo-01__schedule .el-dialog .el-card {
background: #ECE9D8 !important; background: #ECE9D8 !important;
} }
.beijing-01__schedule .el-dialog .el-button { .ningbo-01__schedule .el-dialog .el-button {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
padding: 0px; padding: 0px;
@ -210,36 +210,36 @@ export default {
background: #ECE9D8; background: #ECE9D8;
} }
.beijing-01__schedule .el-dialog .expand { .ningbo-01__schedule .el-dialog .expand {
width: 120px; width: 120px;
} }
.beijing-01__schedule .el-dialog .el-button:focus span { .ningbo-01__schedule .el-dialog .el-button:focus span {
border: 1px dashed gray; border: 1px dashed gray;
} }
.beijing-01__schedule .el-dialog .el-button:active { .ningbo-01__schedule .el-dialog .el-button:active {
border: 2px inset #E2E2E2; border: 2px inset #E2E2E2;
} }
.beijing-01__schedule .el-dialog .el-button:disabled { .ningbo-01__schedule .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2; border: 2px inset #E2E2E2;
} }
.beijing-01__schedule .el-dialog .el-button:disabled span { .ningbo-01__schedule .el-dialog .el-button:disabled span {
border: 0px; border: 0px;
} }
.beijing-01__schedule .el-dialog .button-group { .ningbo-01__schedule .el-dialog .button-group {
margin: 0px 5px; margin: 0px 5px;
text-align: center !important; text-align: center !important;
} }
.beijing-01__schedule .el-dialog .el-input { .ningbo-01__schedule .el-dialog .el-input {
border: 2px inset #E9E9E9; border: 2px inset #E9E9E9;
} }
.beijing-01__schedule .el-dialog .el-input .el-input__inner { .ningbo-01__schedule .el-dialog .el-input .el-input__inner {
color: #000; color: #000;
background: #fff !important; background: #fff !important;
border: 0px; border: 0px;
@ -247,16 +247,16 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
.beijing-01__schedule .el-dialog .el-input.is-disabled .el-input__inner { .ningbo-01__schedule .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important; background: #F0F0F0 !important;
} }
.beijing-01__schedule .el-dialog .el-textarea { .ningbo-01__schedule .el-dialog .el-textarea {
border: 2px inset #E9E9E9; border: 2px inset #E9E9E9;
border-radius: 0px; border-radius: 0px;
} }
.beijing-01__schedule .el-dialog .el-textarea .el-textarea__inner { .ningbo-01__schedule .el-dialog .el-textarea .el-textarea__inner {
color: #000; color: #000;
background: #fff !important; background: #fff !important;
border: 0px; border: 0px;
@ -264,20 +264,20 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
.beijing-01__schedule .el-dialog .el-textarea.is-disabled .el-textarea__inner { .ningbo-01__schedule .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important; background: #F0F0F0 !important;
} }
.beijing-01__schedule .el-dialog .el-table { .ningbo-01__schedule .el-dialog .el-table {
border: 2px inset #E9E9E9; border: 2px inset #E9E9E9;
color: #000 !important; color: #000 !important;
} }
.beijing-01__schedule .el-dialog .el-table .cell { .ningbo-01__schedule .el-dialog .el-table .cell {
line-height: unset !important; line-height: unset !important;
} }
.beijing-01__schedule .el-dialog .el-table th.is-leaf { .ningbo-01__schedule .el-dialog .el-table th.is-leaf {
background: #ECE9D8 !important; background: #ECE9D8 !important;
border-right: 1px solid #BDBDBD !important; border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important; border-bottom: 1px solid #BDBDBD !important;
@ -286,42 +286,42 @@ export default {
padding: 0px; padding: 0px;
} }
.beijing-01__schedule .el-dialog .el-table tr td { .ningbo-01__schedule .el-dialog .el-table tr td {
height: 20px !important; height: 20px !important;
padding: 0px; padding: 0px;
} }
.beijing-01__schedule .el-dialog .el-table .el-table__empty-text { .ningbo-01__schedule .el-dialog .el-table .el-table__empty-text {
top: 15px !important; top: 15px !important;
} }
.beijing-01__schedule .el-dialog .current-row>td { .ningbo-01__schedule .el-dialog .current-row>td {
background: #316AC5 !important; background: #316AC5 !important;
color: #fff !important; color: #fff !important;
} }
.beijing-01__schedule .el-dialog .el-checkbox__inner { .ningbo-01__schedule .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.beijing-01__schedule .el-dialog .el-checkbox__label { .ningbo-01__schedule .el-dialog .el-checkbox__label {
color: #000 !important; color: #000 !important;
} }
.beijing-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__inner { .ningbo-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important; background: #E6E6E6 !important;
} }
.beijing-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__label { .ningbo-01__schedule .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important; color: #C5C9CC !important;
} }
.beijing-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner { .ningbo-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important; background: #fff !important;
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.beijing-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after { .ningbo-01__schedule .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute; position: absolute;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
@ -334,20 +334,20 @@ export default {
top: 1px; top: 1px;
} }
.beijing-01__schedule .el-dialog .el-radio__inner { .ningbo-01__schedule .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.beijing-01__schedule .el-dialog .el-radio__label { .ningbo-01__schedule .el-dialog .el-radio__label {
color: #000 !important; color: #000 !important;
} }
.beijing-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner { .ningbo-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important; background: #fff !important;
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.beijing-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner::after { .ningbo-01__schedule .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px; width: 4px;
height: 4px; height: 4px;
border-radius: 100%; border-radius: 100%;
@ -357,46 +357,46 @@ export default {
top: 50%; top: 50%;
} }
.beijing-01__schedule .el-dialog .el-radio.is-disabled .el-radio__inner { .ningbo-01__schedule .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important; background: #E6E6E6 !important;
} }
.beijing-01__schedule .el-dialog .el-radio.is-disabled .el-radio__label { .ningbo-01__schedule .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important; color: #C5C9CC !important;
} }
.beijing-01__schedule .el-dialog .base-label { .ningbo-01__schedule .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -15px; left: -15px;
top: -18px; top: -18px;
} }
.beijing-01__schedule .el-dialog .el-form-item label { .ningbo-01__schedule .el-dialog .el-form-item label {
font-weight: normal !important; font-weight: normal !important;
color: #000 !important; color: #000 !important;
} }
.beijing-01__schedule .el-dialog .context { .ningbo-01__schedule .el-dialog .context {
height: 100px; height: 100px;
border: 2px inset #E2E2E2; border: 2px inset #E2E2E2;
overflow-y: scroll; overflow-y: scroll;
} }
.beijing-01__schedule .el-dialog .table { .ningbo-01__schedule .el-dialog .table {
margin-top: 10px; margin-top: 10px;
} }
.beijing-01__schedule .el-dialog .notice { .ningbo-01__schedule .el-dialog .notice {
margin-left: 62px; margin-left: 62px;
line-height: 30px; line-height: 30px;
} }
.beijing-01__schedule .el-dialog .button-group { .ningbo-01__schedule .el-dialog .button-group {
margin-top: 10px; margin-top: 10px;
} }
.beijing-01__schedule .el-dialog .el-tree__empty-block { .ningbo-01__schedule .el-dialog .el-tree__empty-block {
background: #E9E9E9 !important; background: #E9E9E9 !important;
color: #000 !important; color: #000 !important;
} }

View File

@ -344,18 +344,6 @@ export default {
return series; return series;
}, },
popModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
const index = series.indexOf(elem);
if (index >= 0) {
series.split(index, 1);
}
});
}
return series;
},
loadInitChart(series) { loadInitChart(series) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
try { try {
@ -381,6 +369,7 @@ export default {
reject(error); reject(error);
} }
}); });
}, },
xAxisPointFormat(params) { xAxisPointFormat(params) {
return timeFormat(params.value); return timeFormat(params.value);

View File

@ -1,95 +1,102 @@
<template> <template>
<data-table id="PlanStatusBar" ref="dataTable" :height="height-11" :config="stationListConfig" :close="false" <data-table
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}" @touch="touch"></data-table> id="PlanStatusBar"
ref="dataTable"
:height="height-11"
:config="stationListConfig"
:close="false"
:style="{top: maxmini? maxTop-110+'px':maxTop-21+'px'}"
@touch="touch"
/>
</template> </template>
<script> <script>
import DataTable from '../menusPlan/components/dataTable'; import DataTable from '../menusPlan/components/dataTable';
import { formatTime, formatName } from '@/utils/runPlan'; import { formatTime, formatName } from '@/utils/runPlan';
export default { export default {
name: 'PlanStatusBar', name: 'PlanStatusBar',
props: { components: {
maxTop: { DataTable
type: Number, },
required: true props: {
} maxTop: {
}, type: Number,
components: { required: true
DataTable }
}, },
data() { data() {
return { return {
maxmini: true, maxmini: true,
height: 100, height: 100,
stationListConfig: { stationListConfig: {
data: [], data: [],
showClose: true, showClose: true,
highlightCurrentRow: true, highlightCurrentRow: true,
columns: [ columns: [
{ {
prop: 'stationName', prop: 'stationName',
label: '站台', label: '站台',
width: 400 width: 400
}, },
{ {
prop: 'startTime', prop: 'startTime',
label: '到点', label: '到点'
}, },
{ {
prop: 'stopTime', prop: 'stopTime',
label: '停站时间', label: '停站时间'
}, },
{ {
prop: 'endTime', prop: 'endTime',
label: '发点', label: '发点'
}, },
{ {
prop: 'level', prop: 'level',
label: '运行等级' label: '运行等级'
} }
] ]
} }
} };
}, },
watch: { watch: {
'$store.state.runPlan.selected': function (select) { '$store.state.runPlan.selected': function (select) {
this.stationListConfig.data = []; this.stationListConfig.data = [];
let serviceObj = this.$store.state.runPlan.editData[select.serviceNumber]; const serviceObj = this.$store.state.runPlan.editData[select.serviceNumber];
if (serviceObj) { if (serviceObj) {
let trainMap = serviceObj.trainMap; const trainMap = serviceObj.trainMap;
if (trainMap) { if (trainMap) {
let trainObj = trainMap[select.tripNumber]; const trainObj = trainMap[select.tripNumber];
if (trainObj) { if (trainObj) {
let stationTimeList = trainObj.stationTimeList; const stationTimeList = trainObj.stationTimeList;
if (stationTimeList && stationTimeList.length) { if (stationTimeList && stationTimeList.length) {
stationTimeList.forEach((elem, index) => { stationTimeList.forEach((elem, index) => {
let stationObj = { const stationObj = {
stationName: formatName(elem.stationCode), stationName: formatName(elem.stationCode),
startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime), startTime: formatTime(index == 0 ? null : stationTimeList[index - 1].secondTime),
stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime), stopTime: formatTime(index == 0 ? null : elem.secondTime - stationTimeList[index - 1].secondTime),
endTime: formatTime(elem.secondTime), endTime: formatTime(elem.secondTime),
level: '' level: ''
} };
this.stationListConfig.data.push(stationObj); this.stationListConfig.data.push(stationObj);
}); });
} }
} }
} }
} }
} }
}, },
methods: { methods: {
touch(maxmini) { touch(maxmini) {
this.maxmini = maxmini; this.maxmini = maxmini;
this.$emit('setPosition'); this.$emit('setPosition');
} }
} }
} };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
#PlanStatusBar { #PlanStatusBar {
@ -97,4 +104,4 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
} }
</style> </style>