Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev_gzb
This commit is contained in:
commit
e4aa7a2ccf
@ -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;
|
||||||
|
@ -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 = {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -1,21 +1,11 @@
|
|||||||
<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"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="360px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<span class="context">
|
|
||||||
<template v-for="(message, index) in messages">
|
<template v-for="(message, index) in messages">
|
||||||
<span :key="index">{{ message }}</span>
|
<span :key="index">{{message}}</span>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="10" :offset="8">
|
<el-col :span="10" :offset="8">
|
||||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||||
@ -25,16 +15,16 @@
|
|||||||
</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() {
|
||||||
@ -50,7 +40,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, messages) {
|
doShow(operate, messages) {
|
||||||
@ -75,7 +65,7 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -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">
|
||||||
|
@ -1,18 +1,8 @@
|
|||||||
<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"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="540px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div style="height: 60px; padding-left: 20px">
|
<div style="height: 60px; padding-left: 20px">
|
||||||
<span style="font-size: 18px">{{ message }}</span>
|
<span style="font-size: 18px">{{message}}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="6" :offset="6">
|
<el-col :span="6" :offset="6">
|
||||||
@ -26,9 +16,9 @@
|
|||||||
</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 {
|
||||||
@ -36,8 +26,8 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
type: '',
|
type: '',
|
||||||
operation: '',
|
operation: '',
|
||||||
message: ''
|
message: '',
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -46,13 +36,13 @@ export default {
|
|||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||||
return '区段设置限速';
|
return "区段设置限速";
|
||||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||||
return '区段取消限速';
|
return "区段取消限速";
|
||||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||||
return '道岔设置限速';
|
return "道岔设置限速";
|
||||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||||
return '道岔取消限速';
|
return "道岔取消限速";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -80,7 +70,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -102,9 +92,9 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
let operate = {
|
||||||
type: this.type
|
type: this.type
|
||||||
};
|
}
|
||||||
|
|
||||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
@ -132,13 +122,13 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$emit('setOperate', { step: 0, success: false });
|
this.$emit('setOperate', { step: 0, success: false });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
let operate = {
|
||||||
type: this.type,
|
type: this.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 }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
@ -152,7 +142,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -1,18 +1,8 @@
|
|||||||
<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"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="500px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div style="height: 60px; padding-left: 20px">
|
<div style="height: 60px; padding-left: 20px">
|
||||||
<span>在{{ stationName }}【{{ signalName }}】信号机,信号解锁,确认下达吗?</span>
|
<span>在{{stationName}}【{{signalName}}】信号机,信号解锁,确认下达吗?</span>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="6" :offset="6">
|
<el-col :span="6" :offset="6">
|
||||||
@ -26,9 +16,9 @@
|
|||||||
</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 {
|
||||||
@ -36,14 +26,14 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
signalName: '',
|
signalName: '',
|
||||||
stationName: ''
|
stationName: ''
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '信号解封';
|
return '信号解封'
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
@ -55,15 +45,15 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.stationName = '';
|
this.stationName = ''
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.signalName = selected.name;
|
this.signalName = selected.name;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -81,10 +71,10 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
let operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||||
};
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -98,13 +88,13 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$emit('setOperate', { step: 0, success: false });
|
this.$emit('setOperate', { step: 0, success: false });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
let 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 }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
@ -117,7 +107,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,9 @@
|
|||||||
<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"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="360px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<template v-for="(message, index) in messages">
|
<template v-for="(message, index) in messages">
|
||||||
<span :key="index">{{ message }}</span>
|
<span :key="index">{{message}}</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -24,19 +14,16 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo"></notice-info>
|
||||||
</el-dialog>
|
</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: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -44,7 +31,10 @@ export default {
|
|||||||
operate: {},
|
operate: {},
|
||||||
messages: '',
|
messages: '',
|
||||||
operation: null
|
operation: null
|
||||||
};
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -62,40 +52,40 @@ export default {
|
|||||||
} 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) {
|
||||||
@ -132,13 +122,13 @@ export default {
|
|||||||
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 }) => {
|
||||||
@ -146,28 +136,28 @@ export default {
|
|||||||
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>
|
||||||
|
@ -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"><-</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>
|
|
@ -1,41 +1,31 @@
|
|||||||
<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"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="500px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :offset="2">
|
<el-col :offset="2">
|
||||||
<span v-for="(message, index) in messages" :key="index">{{ message }}</span>
|
<span v-for="(message, index) in messages" :key="index">{{message}}</span><br>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-button justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="10" :offset="8">
|
<el-col :span="10" :offset="8">
|
||||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-button>
|
</el-row>
|
||||||
</el-dialog>
|
</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() {
|
||||||
@ -51,7 +41,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, messages) {
|
doShow(operate, messages) {
|
||||||
@ -75,20 +65,20 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
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>
|
||||||
|
439
src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue
Normal file
439
src/jmapNew/theme/ningbo_01/menus/dialog/routeCmdControl.vue
Normal 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>
|
@ -1,49 +1,41 @@
|
|||||||
<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"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="2"><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-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
|
<el-col :span="11" :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-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" style="margin-top: 50px">
|
<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>
|
||||||
<confirm-control ref="confirmControl" />
|
<confirm-control ref="confirmControl"></confirm-control>
|
||||||
<password-box ref="password" @checkOver="confirm" />
|
<notice-info ref="noticeInfo"></notice-info>
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</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 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() {
|
||||||
@ -51,12 +43,11 @@ export default {
|
|||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
tempdata: [],
|
|
||||||
operation: null,
|
operation: null,
|
||||||
stationName: '',
|
stationName: '',
|
||||||
signalName: ''
|
signalName: ''
|
||||||
|
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -71,38 +62,27 @@ export default {
|
|||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
return '取消列车进路';
|
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) {
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
return '信号关灯';
|
return '信号关灯';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
return '重开信号';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected, tempdata) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
this.tempdata = tempdata;
|
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.signalName = '';
|
this.signalName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
this.signalName = selected.name;
|
this.signalName = selected.name
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -124,30 +104,15 @@ export default {
|
|||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
/** 取消列车进路*/
|
/** 取消列车进路*/
|
||||||
this.cancelTrainRoute();
|
this.cancelTrainRoute();
|
||||||
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
|
||||||
/** 总人解*/
|
|
||||||
this.humanTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
|
||||||
/** 信号封锁*/
|
|
||||||
this.lock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
|
||||||
/** 信号解封*/
|
|
||||||
this.unlock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
/** 进路收人工控*/
|
|
||||||
this.humanControl();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
/** 进路交自动控*/
|
|
||||||
this.atsAutoControl();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
this.signalClose();
|
this.signalClose();
|
||||||
|
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
/** 信号重开*/
|
||||||
|
this.reopenSignal();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 取消列车进路
|
//取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
if (this.$store.state.training.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
/** 现地工作站*/
|
/** 现地工作站*/
|
||||||
@ -157,13 +122,13 @@ export default {
|
|||||||
this.cancelTrainRouteByCentral();
|
this.cancelTrainRouteByCentral();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 现地工作站取消进路
|
//现地工作站取消进路
|
||||||
cancelTrainRouteByLocal() {
|
cancelTrainRouteByLocal() {
|
||||||
const operate = {
|
let operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||||
};
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -177,13 +142,13 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 行调工作站取消进路
|
//行调工作站取消进路
|
||||||
cancelTrainRouteByCentral() {
|
cancelTrainRouteByCentral() {
|
||||||
const operate = {
|
let operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
};
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -197,117 +162,13 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate);
|
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() {
|
signalClose() {
|
||||||
const operate = {
|
let operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
messages: [`信号关灯: ${this.signalName}`]
|
messages: [`信号关灯: ${this.signalName}`],
|
||||||
};
|
}
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -321,22 +182,12 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 破铅封确认
|
//信号重开
|
||||||
confirm() {
|
reopenSignal() {
|
||||||
const operate = {
|
let operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type
|
type: MapDeviceType.Signal.type,
|
||||||
};
|
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||||
|
|
||||||
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.loading = true;
|
||||||
@ -351,12 +202,12 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消
|
//取消
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
let operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation,
|
||||||
};
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -368,5 +219,5 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
@ -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,
|
||||||
|
@ -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>
|
|
342
src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue
Normal file
342
src/jmapNew/theme/ningbo_01/menus/dialog/routeHandControl.vue
Normal 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>
|
157
src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue
Normal file
157
src/jmapNew/theme/ningbo_01/menus/dialog/routeLock.vue
Normal 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>
|
@ -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"
|
|
||||||
height="150"
|
|
||||||
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>
|
</el-table>
|
||||||
</div>
|
<el-row justify="center" class="button-group">
|
||||||
<el-row justify="center" style="margin-top: 70px">
|
<el-col :span="8" :offset="4">
|
||||||
<el-col :span="12" :offset="12">
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @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>
|
||||||
@ -57,13 +36,11 @@
|
|||||||
<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() {
|
||||||
@ -80,10 +57,6 @@ export default {
|
|||||||
signalName: '',
|
signalName: '',
|
||||||
tableStyle: {
|
tableStyle: {
|
||||||
'border-bottom': 'none'
|
'border-bottom': 'none'
|
||||||
},
|
|
||||||
controlTypeNameMap: {
|
|
||||||
'01': '折返',
|
|
||||||
'02': '直通'
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -101,7 +74,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;
|
||||||
@ -133,6 +106,9 @@ export default {
|
|||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
},
|
},
|
||||||
|
expandPath() {
|
||||||
|
console.log('展开进路预览');
|
||||||
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||||
@ -245,26 +221,3 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</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>
|
|
||||||
|
@ -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>
|
||||||
|
@ -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();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//道岔单锁
|
//道岔单锁
|
||||||
@ -176,26 +188,6 @@
|
|||||||
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,
|
||||||
|
@ -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>
|
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
class="ningbo_01__systerm section-cmd-speed"
|
class="ningbo-01__systerm section-cmd-speed"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="800px"
|
width="800px"
|
||||||
@ -151,7 +151,7 @@
|
|||||||
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
|
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
|
||||||
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表:</span>
|
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表:</span>
|
||||||
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
|
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
|
||||||
<div v-for="(item, index) in equipmentText" :key="index">
|
<div v-for="(item,i) in equipmentText" :key="i">
|
||||||
{{ item.name }}: {{ item.text }}
|
{{ item.name }}: {{ item.text }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -278,7 +278,7 @@
|
|||||||
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
|
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
|
||||||
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表:</span>
|
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表:</span>
|
||||||
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
|
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
|
||||||
<div v-for="(item, index) in equipmentText1" :key="index">
|
<div v-for="(item,i) in equipmentText1" :key="i">
|
||||||
{{ item.name }}: {{ item.text }}
|
{{ item.name }}: {{ item.text }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -391,10 +391,7 @@ export default {
|
|||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
return this.dialogShow ? '公里标输入临时限速' : '';
|
||||||
return '公里标输入临时限速';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -675,19 +672,18 @@ export default {
|
|||||||
switch (ele.switchSectionType) {
|
switch (ele.switchSectionType) {
|
||||||
case '01':
|
case '01':
|
||||||
return `${ele.name}(主), `;
|
return `${ele.name}(主), `;
|
||||||
break;
|
|
||||||
case '02':
|
case '02':
|
||||||
return `${ele.name}(定), `;
|
return `${ele.name}(定), `;
|
||||||
break;
|
|
||||||
case '03':
|
case '03':
|
||||||
return `${ele.name}(反), `;
|
return `${ele.name}(反), `;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else if (ele.parentName) {
|
} else if (ele.parentName) {
|
||||||
return `${ele.parentName}-${ele.name}, `;
|
return `${ele.parentName}-${ele.name}, `;
|
||||||
} else {
|
} else {
|
||||||
return `${ele.name}, `;
|
return `${ele.name}, `;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
CheckSecondEquipment() { // 二次查看设备
|
CheckSecondEquipment() { // 二次查看设备
|
||||||
if (this.secondScetion.speed == this.copyScetion.speed && this.secondScetion.startSection == this.copyScetion.startSection && this.secondScetion.endSection == this.copyScetion.endSection && this.secondScetion.startValue == this.copyScetion.startValue && this.secondScetion.endValue == this.copyScetion.endValue) {
|
if (this.secondScetion.speed == this.copyScetion.speed && this.secondScetion.startSection == this.copyScetion.startSection && this.secondScetion.endSection == this.copyScetion.endSection && this.secondScetion.startValue == this.copyScetion.startValue && this.secondScetion.endValue == this.copyScetion.endValue) {
|
||||||
@ -738,36 +734,36 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case '1': {
|
case '1':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstLimitSpeed.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.firstLimitSpeed.operation;
|
||||||
} break;
|
break;
|
||||||
case '2': {
|
case '2':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartSection.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartSection.operation;
|
||||||
} break;
|
break;
|
||||||
case '3': {
|
case '3':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartvalue.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartvalue.operation;
|
||||||
} break;
|
break;
|
||||||
case '4': {
|
case '4':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndSection.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndSection.operation;
|
||||||
} break;
|
break;
|
||||||
case '5': {
|
case '5':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndvalue.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndvalue.operation;
|
||||||
} break;
|
break;
|
||||||
case '6': {
|
case '6':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondLimitSpeed.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.secondLimitSpeed.operation;
|
||||||
} break;
|
break;
|
||||||
case '7': {
|
case '7':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartSection.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartSection.operation;
|
||||||
} break;
|
break;
|
||||||
case '8': {
|
case '8':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartvalue.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartvalue.operation;
|
||||||
} break;
|
break;
|
||||||
case '9': {
|
case '9':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndSection.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndSection.operation;
|
||||||
} break;
|
break;
|
||||||
case '10': {
|
case '10':
|
||||||
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndvalue.operation;
|
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndvalue.operation;
|
||||||
} break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
554
src/jmapNew/theme/ningbo_01/menus/dialog/speedLimitControl.vue
Normal file
554
src/jmapNew/theme/ningbo_01/menus/dialog/speedLimitControl.vue
Normal 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>
|
212
src/jmapNew/theme/ningbo_01/menus/dialog/standBackStrategy.vue
Normal file
212
src/jmapNew/theme/ningbo_01/menus/dialog/standBackStrategy.vue
Normal 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>
|
@ -1,148 +1,102 @@
|
|||||||
<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
|
||||||
|
v-dialogDrag
|
||||||
|
class="ningbo-01__systerm stand-detain-train"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="320px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="11">
|
<el-col :span="10"><span>集中站</span></el-col>
|
||||||
<span>车站</span>
|
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||||
<el-input style="width: 110px; margin-left: 10px;" v-model="stationName" size="small" disabled>
|
</el-row>
|
||||||
</el-input>
|
<el-row>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="10" :offset="2">
|
||||||
<span>站台</span>
|
<el-input v-model="standName" size="small" disabled />
|
||||||
<el-input style="width: 110px; margin-left: 10px;" v-model="standName" size="small" disabled></el-input>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div v-if="DetainTrain">
|
<div v-if="!earlyDepar">
|
||||||
<div
|
<div style="padding: 15px; margin-bottom: 25px; 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-radio-group v-model="radio" @change="choose" :id="domIdDetainCar">
|
<el-col :span="11">
|
||||||
<el-col :span="24">
|
<el-radio
|
||||||
<el-radio label="01"
|
v-model="radio"
|
||||||
style="display: block; text-align: left; float: left; margin-right: 10px;">本站台
|
label="1"
|
||||||
</el-radio>
|
:disabled="radio == 2"
|
||||||
<el-radio label="02" v-if="radio1 == 2"
|
style="display: block; text-align: left;"
|
||||||
style="display: block; text-align: left; float: left; margin-right: 10px;">上行全线
|
>
|
||||||
</el-radio>
|
本站台上行</el-radio>
|
||||||
<el-radio label="03" v-if="radio1 == 2"
|
</el-col>
|
||||||
style="display: block; text-align: left; float: left;">下行全线</el-radio>
|
<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-col>
|
||||||
</el-radio-group>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
|
<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>
|
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
|
||||||
<el-row style="margin-top: -13px;">
|
<el-row style="margin-top: -13px;">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio v-model="radio1" label="1" :disabled="radio1 == '2'"
|
<el-radio
|
||||||
style="display: block; text-align: left;">
|
v-model="radio1"
|
||||||
|
label="1"
|
||||||
|
:disabled="radio1 == '2'"
|
||||||
|
style="display: block; text-align: left;"
|
||||||
|
>
|
||||||
扣车</el-radio>
|
扣车</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="2">
|
<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-radio
|
||||||
|
v-model="radio1"
|
||||||
|
label="2"
|
||||||
|
:disabled="radio1 == '1'"
|
||||||
|
style="display: block; text-align: left;"
|
||||||
|
>
|
||||||
|
取消扣车</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="JumpStop">
|
<div v-if="earlyDepar">
|
||||||
<div
|
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
|
||||||
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: #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-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-row style="margin-top: -13px;">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio v-model="radio1" label="1" :disabled="radio1 == 2"
|
<el-radio
|
||||||
style="display: block; text-align: left;">
|
:id="upRadioId"
|
||||||
跳停</el-radio>
|
v-model="radio2"
|
||||||
|
label="1"
|
||||||
|
style="display: block; text-align: left;"
|
||||||
|
@change="changeRadio"
|
||||||
|
>
|
||||||
|
本站台上行</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="2">
|
<el-col :span="11" :offset="2">
|
||||||
<el-radio v-model="radio1" label="2" :disabled="radio1 == 1"
|
<el-radio
|
||||||
style="display: block; text-align: left;">
|
:id="downRadioId"
|
||||||
取消跳停</el-radio>
|
v-model="radio2"
|
||||||
|
label="2"
|
||||||
|
style="display: block; text-align: left;"
|
||||||
|
@change="changeRadio"
|
||||||
|
>
|
||||||
|
本站台下行</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</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-row 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>
|
||||||
@ -151,17 +105,16 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</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
|
||||||
@ -174,23 +127,13 @@
|
|||||||
stationName: '',
|
stationName: '',
|
||||||
selected: null,
|
selected: null,
|
||||||
operation: null,
|
operation: null,
|
||||||
radio: '01',
|
radio: '1',
|
||||||
radio1: '1',
|
radio1: '1',
|
||||||
radio2: '1',
|
radio2: '1',
|
||||||
DetainTrain: false,
|
earlyDepar: false
|
||||||
JumpStop: false,
|
};
|
||||||
RunLevel: false,
|
|
||||||
trainList: [],
|
|
||||||
tripNumber: '',
|
|
||||||
effective: '01',
|
|
||||||
trainStopTime: 0,
|
|
||||||
trainRunlevel: '01',
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
|
||||||
'map'
|
|
||||||
]),
|
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
@ -200,106 +143,59 @@
|
|||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
domIdDetainCar() {
|
upRadioId() {
|
||||||
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrain.choose.domId : '';
|
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
downRadioId() {
|
||||||
if (this.radio1 == '1') { // 跳停
|
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
|
||||||
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
|
|
||||||
} else { // 取消跳停
|
|
||||||
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() {
|
title() {
|
||||||
this.JumpStop = false;
|
this.earlyDepar = false;
|
||||||
this.RunLevel = false;
|
|
||||||
this.DetainTrain = false;
|
|
||||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||||
this.radio1 = '1';
|
this.radio1 = '1';
|
||||||
this.radio = '01';
|
|
||||||
this.DetainTrain = true;
|
|
||||||
return '扣车';
|
return '扣车';
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||||
this.radio1 = '2';
|
this.radio1 = '2';
|
||||||
this.radio = '01';
|
|
||||||
this.DetainTrain = true;
|
|
||||||
return '取消扣车';
|
return '取消扣车';
|
||||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||||
this.JumpStop = true;
|
this.earlyDepar = true;
|
||||||
this.radio1 = '1'
|
if (this.selected.direction == '01') {
|
||||||
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 '提前发车';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected, tempDate = null) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.tripNumber = '';
|
|
||||||
this.standName = '';
|
this.standName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
this.standName = selected.direction == '01' ? '下行' : '上行';
|
this.standName = selected.name;
|
||||||
}
|
}
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.direction == '01' ? '下行' : '上行';
|
this.standName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
this.radio = '2';
|
||||||
this.radio = selected.direction;
|
if (this.selected.right) { // 判断站台行驶方向
|
||||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
this.radio = '1';
|
||||||
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.operation = operate.operation;
|
||||||
this.trainList = this.map.trainList; // 加载列车数据
|
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -312,148 +208,45 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
choose(upDown) {
|
changeRadio(val) {
|
||||||
// 取消扣车 请求code码
|
const operate = {
|
||||||
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,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: '',
|
operation: '',
|
||||||
val: `${upDown}`,
|
val: val
|
||||||
}
|
};
|
||||||
if (this.radio1 == '1') { // 跳停选择
|
if (val == 1) {
|
||||||
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
|
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
|
||||||
} else { // 取消跳停选择
|
} else if (val == 2) {
|
||||||
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
|
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.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 });
|
||||||
}
|
}
|
||||||
})
|
}).catch(error => {
|
||||||
},
|
console.log(error);
|
||||||
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() {
|
commit() {
|
||||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||||
this.setDetainTrain(); /** 设置扣车*/
|
/** 设置扣车*/
|
||||||
|
this.setDetainTrain();
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||||
this.cancelDetainTrain(); /** 取消扣车*/
|
/** 取消扣车*/
|
||||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
this.cancelDetainTrain();
|
||||||
this.setJumpStop(); /** 设置跳停*/
|
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
/** 提前发车*/
|
||||||
this.cancelJumpStop(); /** 取消跳停*/
|
this.earlyDeparture();
|
||||||
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
|
|
||||||
this.setStopTime(); /** 设置停站时间*/
|
|
||||||
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
|
|
||||||
this.setRunLevel(); /** 设置站间运行等级*/
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
operation: OperationEvent.StationStand.setDetainTrain.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -462,27 +255,19 @@
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
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.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -491,24 +276,19 @@
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 设置跳停
|
// 提前发车
|
||||||
setJumpStop() {
|
earlyDeparture() {
|
||||||
let val = this.radio;
|
const operate = {
|
||||||
if (this.radio == '02') {
|
|
||||||
val = this.radio + '::' + this.tripNumber;
|
|
||||||
}
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||||
val: val,
|
};
|
||||||
}
|
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -516,100 +296,29 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
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() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
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(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.stand-detain-train .context {
|
.stand-detain-train .context {
|
||||||
|
@ -1,82 +1,59 @@
|
|||||||
<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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-tree>
|
||||||
|
<!-- <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-col :span="10">
|
||||||
<span>车站</span>
|
<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">
|
||||||
<span>站台</span>
|
<el-input v-model="standName" size="small" disabled></el-input>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="header">
|
|
||||||
<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" style="padding: 0 3px;" 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.stopTime" 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.runLevel" 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.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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<div class="table">
|
||||||
|
<span>站台状态</span>
|
||||||
|
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
|
||||||
|
<el-table-column prop="item" :width="140" label="项目">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="status" label="状态">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div> -->
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="18">
|
<el-col :span="10" :offset="2">
|
||||||
<span style="opacity: 0;">1</span>
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="8" :offset="4">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo"></notice-info>
|
||||||
</el-dialog>
|
</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
|
||||||
@ -94,17 +71,71 @@ export default {
|
|||||||
'03': '自动换端',
|
'03': '自动换端',
|
||||||
'04': '默认'
|
'04': '默认'
|
||||||
},
|
},
|
||||||
modelData: {
|
treeData: [
|
||||||
stopTime: '自动',
|
{
|
||||||
runLevel: '自动',
|
children: [
|
||||||
detainCar: '无扣车',
|
{
|
||||||
jumpStop: '无跳停'
|
name: '车站',
|
||||||
|
value: '',
|
||||||
|
level: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '站台',
|
||||||
|
value: '',
|
||||||
|
level: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '停站时间',
|
||||||
|
value: '',
|
||||||
|
level: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '跳停',
|
||||||
|
value: '',
|
||||||
|
level: 2,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
name: '站台基本信息',
|
||||||
|
level: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: '中心扣车',
|
||||||
|
value: '',
|
||||||
|
level: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '车站扣车',
|
||||||
|
value: '',
|
||||||
|
level: 2,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
name: '扣车',
|
||||||
|
level: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: '上行站台',
|
||||||
|
value: '',
|
||||||
|
level: 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '下行站台',
|
||||||
|
value: '',
|
||||||
|
level: 2,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
name: '运行等级',
|
||||||
|
level: 1,
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationList'
|
'stationList',
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -116,53 +147,69 @@ export default {
|
|||||||
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: {
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
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' ? '已设置' : '未设置';
|
||||||
|
// this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' });
|
||||||
|
// 停站时间
|
||||||
|
this.treeData[0].children[2].value = opts.parkingTime != -1 ? opts.parkingTime : '自动';
|
||||||
|
// 跳停
|
||||||
|
this.treeData[0].children[3].value = opts.jumpStopStatus != '01' ? '已设置' : '未设置';
|
||||||
|
if (!stationStand || !station) {
|
||||||
|
this.tempData.push({ item: '运行等级', status: `自动` });
|
||||||
|
} else {
|
||||||
|
this.tempData.push({ item: '运行等级', status: opts.intervalRunTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` });
|
||||||
|
}
|
||||||
|
// this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' });
|
||||||
|
this.tempData.push({ item: '下行折返策略', status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : '默认' });
|
||||||
},
|
},
|
||||||
doShow(operate, selected, opts) {
|
doShow(operate, selected, opts) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.standName = '';
|
// this.standName = '';
|
||||||
this.stationName = '';
|
// this.stationName = '';
|
||||||
|
this.treeData[0].children[0].value = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.direction == '01' ? '下行' : '上行';
|
// this.standName = selected.name;
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
this.treeData[0].children[1].value = selected.name;
|
||||||
|
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
// this.stationName = station.name;
|
||||||
|
this.treeData[0].children[0].value = station.name;
|
||||||
|
// this.treeData[0].children[1].value = station.runPlanName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loadInitData(selected, opts);
|
this.loadInitData(selected, opts);
|
||||||
@ -179,10 +226,10 @@ export default {
|
|||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
let operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.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 }) => {
|
||||||
@ -190,30 +237,25 @@ export default {
|
|||||||
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>
|
180
src/jmapNew/theme/ningbo_01/menus/dialog/standDetainTrainAll.vue
Normal file
180
src/jmapNew/theme/ningbo_01/menus/dialog/standDetainTrainAll.vue
Normal 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>
|
@ -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>
|
336
src/jmapNew/theme/ningbo_01/menus/dialog/standRunLevel.vue
Normal file
336
src/jmapNew/theme/ningbo_01/menus/dialog/standRunLevel.vue
Normal 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>
|
238
src/jmapNew/theme/ningbo_01/menus/dialog/standStopTime.vue
Normal file
238
src/jmapNew/theme/ningbo_01/menus/dialog/standStopTime.vue
Normal 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>
|
@ -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>
|
||||||
|
@ -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>
|
@ -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>
|
@ -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>
|
||||||
|
@ -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,7 +227,7 @@
|
|||||||
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.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -310,93 +240,6 @@
|
|||||||
this.$refs.noticeInfo.doShow(operate);
|
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();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
let operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
|
176
src/jmapNew/theme/ningbo_01/menus/dialog/trainAddPlan.vue
Normal file
176
src/jmapNew/theme/ningbo_01/menus/dialog/trainAddPlan.vue
Normal 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>
|
155
src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue
Normal file
155
src/jmapNew/theme/ningbo_01/menus/dialog/trainCreate.vue
Normal 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>
|
172
src/jmapNew/theme/ningbo_01/menus/dialog/trainDefine.vue
Normal file
172
src/jmapNew/theme/ningbo_01/menus/dialog/trainDefine.vue
Normal 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>
|
169
src/jmapNew/theme/ningbo_01/menus/dialog/trainDelete.vue
Normal file
169
src/jmapNew/theme/ningbo_01/menus/dialog/trainDelete.vue
Normal 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>
|
@ -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">终  端:</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: [
|
trainSource: [
|
||||||
// { required: true, message: '请选择终端', trigger: 'change' }
|
{ 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;
|
172
src/jmapNew/theme/ningbo_01/menus/dialog/trainEdit.vue
Normal file
172
src/jmapNew/theme/ningbo_01/menus/dialog/trainEdit.vue
Normal 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>
|
151
src/jmapNew/theme/ningbo_01/menus/dialog/trainFlag.vue
Normal file
151
src/jmapNew/theme/ningbo_01/menus/dialog/trainFlag.vue
Normal 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>
|
172
src/jmapNew/theme/ningbo_01/menus/dialog/trainMove.vue
Normal file
172
src/jmapNew/theme/ningbo_01/menus/dialog/trainMove.vue
Normal 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>
|
185
src/jmapNew/theme/ningbo_01/menus/dialog/trainMoveEvently.vue
Normal file
185
src/jmapNew/theme/ningbo_01/menus/dialog/trainMoveEvently.vue
Normal 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">车  站:</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">终  端:</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>
|
172
src/jmapNew/theme/ningbo_01/menus/dialog/trainSetHead.vue
Normal file
172
src/jmapNew/theme/ningbo_01/menus/dialog/trainSetHead.vue
Normal 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>
|
156
src/jmapNew/theme/ningbo_01/menus/dialog/trainSetPlan.vue
Normal file
156
src/jmapNew/theme/ningbo_01/menus/dialog/trainSetPlan.vue
Normal 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>
|
156
src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWork.vue
Normal file
156
src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWork.vue
Normal 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>
|
@ -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';
|
||||||
@ -40,6 +40,7 @@ export default {
|
|||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
components: {
|
components: {
|
||||||
MenuBar,
|
MenuBar,
|
||||||
|
MenuButton,
|
||||||
MenuCancel,
|
MenuCancel,
|
||||||
MenuSignal,
|
MenuSignal,
|
||||||
MenuSwitch,
|
MenuSwitch,
|
||||||
@ -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>
|
||||||
|
@ -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);
|
||||||
|
if (this.menu[2]) {
|
||||||
this.menu[2].children = this.initStationList();
|
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('实现中......', '提示', {
|
||||||
|
389
src/jmapNew/theme/ningbo_01/menus/menuButton.vue
Normal file
389
src/jmapNew/theme/ningbo_01/menus/menuButton.vue
Normal 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>
|
@ -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];
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,10 @@
|
|||||||
<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="二次确认"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="360px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:show-close="false"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<template v-for="(message, index) in messages">
|
<template v-for="(message, index) in messages">
|
||||||
<span :key="index">{{ message }}</span>
|
<span :key="index">{{message}}</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
@ -25,32 +15,41 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo"></notice-info>
|
||||||
</el-dialog>
|
</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: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
operation: '',
|
||||||
operate: '',
|
operate: '',
|
||||||
timer: null,
|
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;
|
||||||
},
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
|
||||||
|
return OperationEvent.StationControl.emergencyStationControl.confirm.domId;
|
||||||
|
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
|
return OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||||
|
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
|
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||||
|
}
|
||||||
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||||
},
|
},
|
||||||
@ -58,26 +57,18 @@ export default {
|
|||||||
if (this.operate) {
|
if (this.operate) {
|
||||||
return this.operate.messages;
|
return this.operate.messages;
|
||||||
}
|
}
|
||||||
return [];
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
this.domIdConfirm = '';
|
|
||||||
if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
|
||||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
|
||||||
} else if (checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
|
||||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
|
||||||
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
|
||||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.operate = operate || {};
|
this.operate = operate || {};
|
||||||
|
this.operation = this.operate.operation;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
@ -88,50 +79,42 @@ export default {
|
|||||||
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.confirm.operation
|
operation: OperationEvent.Command.close.confirm.operation,
|
||||||
};
|
}
|
||||||
|
|
||||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
|
||||||
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();
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operate && this.operate.selection) {
|
let operate = {
|
||||||
const operate = {
|
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
val: this.operate.val,
|
val: this.operate.val,
|
||||||
selection: this.operate.selection
|
|
||||||
};
|
|
||||||
|
|
||||||
if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
|
||||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
|
||||||
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
|
||||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
|
||||||
} else if (checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
|
||||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loading = true;
|
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||||
|
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||||
|
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||||
|
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||||
|
} else if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.emergencyStationControl)) {
|
||||||
|
operate.operation = OperationEvent.StationControl.emergencyStationControl.confirm.operation;
|
||||||
|
}
|
||||||
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = false;
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}, 1000).catch(() => {
|
}, 1000).catch((error) => {
|
||||||
this.loading = true;
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
</script>
|
</script>
|
@ -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;
|
||||||
|
@ -1,22 +1,12 @@
|
|||||||
<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"
|
|
||||||
width="260px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<span style="padding-left: 10px; padding-bottom: 10px">
|
|
||||||
<i class="el-icon-info" />
|
|
||||||
<template v-for="(message, index) in messages">
|
<template v-for="(message, index) in messages">
|
||||||
<span :key="index">{{ message }}</span>
|
<span :key="index">{{message}}</span>
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="8" :offset="3">
|
<el-col :span="8" :offset="3">
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
@ -29,10 +19,10 @@
|
|||||||
</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: {
|
||||||
},
|
},
|
||||||
@ -43,12 +33,12 @@ export default {
|
|||||||
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', [
|
||||||
@ -64,17 +54,17 @@ export default {
|
|||||||
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 || {};
|
||||||
@ -100,10 +90,10 @@ export default {
|
|||||||
},
|
},
|
||||||
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 }) => {
|
||||||
@ -112,28 +102,28 @@ export default {
|
|||||||
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;
|
||||||
|
@ -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;
|
||||||
|
@ -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>
|
@ -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>
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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">密 码:</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>
|
|
@ -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>
|
|
237
src/jmapNew/theme/ningbo_01/menus/menuDialog/stationControl.vue
Normal file
237
src/jmapNew/theme/ningbo_01/menus/menuDialog/stationControl.vue
Normal 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>
|
@ -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>
|
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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">
|
||||||
|
@ -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,
|
||||||
|
@ -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>
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
<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
|
||||||
|
class="ningbo-01__systerm view-train-id"
|
||||||
|
title="列车识别号显示设置"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="420px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||||
<span class="base-label">计划车显示模式</span>
|
<span class="base-label">计划车显示模式</span>
|
||||||
<el-radio-group v-model="planMode">
|
<el-radio-group v-model="planMode">
|
||||||
@ -47,7 +56,7 @@
|
|||||||
<span class="base-label">字体大小</span>
|
<span class="base-label">字体大小</span>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
|
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="1">
|
<el-col :span="10" :offset="1">
|
||||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||||
@ -62,16 +71,19 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</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',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -80,11 +92,8 @@
|
|||||||
operation: '',
|
operation: '',
|
||||||
planMode: 5,
|
planMode: 5,
|
||||||
headMode: 5,
|
headMode: 5,
|
||||||
fontSize: 16,
|
fontSize: 16
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -101,14 +110,14 @@
|
|||||||
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;
|
||||||
}
|
}
|
||||||
@ -124,44 +133,44 @@
|
|||||||
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);
|
||||||
@ -169,15 +178,15 @@
|
|||||||
},
|
},
|
||||||
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>
|
@ -1,28 +1,30 @@
|
|||||||
<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() {
|
data() {
|
||||||
@ -50,17 +52,8 @@
|
|||||||
auth: { station: false, center: true }
|
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);
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
@ -71,17 +64,26 @@
|
|||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
methods: {
|
watch: {
|
||||||
clickEvent() {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
let self = this;
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||||
window.onclick = function (e) {
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
self.doClose();
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
clickEvent() {
|
||||||
|
const self = this;
|
||||||
|
window.onclick = function (e) {
|
||||||
|
self.doClose();
|
||||||
|
};
|
||||||
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
//编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu]
|
this.menu = [...this.menu];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
@ -96,9 +98,9 @@
|
|||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//取消速度
|
// 取消速度
|
||||||
cancelSpeed() {
|
cancelSpeed() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -112,7 +114,7 @@
|
|||||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -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,104 +249,104 @@ export default {
|
|||||||
callback: action => {
|
callback: action => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// 切除
|
||||||
|
split() {
|
||||||
|
const operate = {
|
||||||
|
start: true,
|
||||||
|
code: this.selected.code,
|
||||||
|
type: MapDeviceType.Section.type,
|
||||||
|
label: MapDeviceType.Section.label,
|
||||||
|
operation: OperationEvent.Section.split.menu.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
// //切除
|
});
|
||||||
// split() {
|
},
|
||||||
// let operate = {
|
alxeEffective() {
|
||||||
// start: true,
|
const operate = {
|
||||||
// code: this.selected.code,
|
start: true,
|
||||||
// type: MapDeviceType.Section.type,
|
code: this.selected.code,
|
||||||
// label: MapDeviceType.Section.label,
|
type: MapDeviceType.Section.type,
|
||||||
// operation: OperationEvent.Section.split.menu.operation
|
label: MapDeviceType.Section.label,
|
||||||
// };
|
operation: OperationEvent.Section.alxeEffective.menu.operation
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
};
|
||||||
// if (valid) {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
if (valid) {
|
||||||
// this.$refs.sectionControl.doShow(operate, this.selected);
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// }
|
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||||
// });
|
}
|
||||||
// },
|
});
|
||||||
// alxeEffective() {
|
},
|
||||||
// let operate = {
|
// 激活
|
||||||
// start: true,
|
active() {
|
||||||
// code: this.selected.code,
|
const operate = {
|
||||||
// type: MapDeviceType.Section.type,
|
start: true,
|
||||||
// label: MapDeviceType.Section.label,
|
code: this.selected.code,
|
||||||
// operation: OperationEvent.Section.alxeEffective.menu.operation
|
type: MapDeviceType.Section.type,
|
||||||
// };
|
label: MapDeviceType.Section.label,
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
operation: OperationEvent.Section.active.menu.operation
|
||||||
// if (valid) {
|
};
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// this.$refs.alxeEffective.doShow(operate, this.selected);
|
if (valid) {
|
||||||
// }
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// });
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
// },
|
}
|
||||||
// //激活
|
});
|
||||||
// active() {
|
},
|
||||||
// let operate = {
|
// 区段计轴预复位
|
||||||
// start: true,
|
axlePreReset() {
|
||||||
// code: this.selected.code,
|
const operate = {
|
||||||
// type: MapDeviceType.Section.type,
|
start: true,
|
||||||
// label: MapDeviceType.Section.label,
|
code: this.selected.code,
|
||||||
// operation: OperationEvent.Section.active.menu.operation
|
type: MapDeviceType.Section.type,
|
||||||
// };
|
label: MapDeviceType.Section.label,
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
operation: OperationEvent.Section.axlePreReset.menu.operation
|
||||||
// if (valid) {
|
};
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// this.$refs.sectionControl.doShow(operate, this.selected);
|
if (valid) {
|
||||||
// }
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// });
|
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||||
// },
|
}
|
||||||
// //区段计轴预复位
|
});
|
||||||
// axlePreReset() {
|
},
|
||||||
// let operate = {
|
// 区段解锁
|
||||||
// start: true,
|
lock() {
|
||||||
// code: this.selected.code,
|
const operate = {
|
||||||
// type: MapDeviceType.Section.type,
|
start: true,
|
||||||
// label: MapDeviceType.Section.label,
|
code: this.selected.code,
|
||||||
// operation: OperationEvent.Section.axlePreReset.menu.operation
|
type: MapDeviceType.Section.type,
|
||||||
// };
|
label: MapDeviceType.Section.label,
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
operation: OperationEvent.Section.lock.menu.operation
|
||||||
// if (valid) {
|
};
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
if (valid) {
|
||||||
// }
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// });
|
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||||
// },
|
}
|
||||||
// //区段解锁
|
});
|
||||||
// lock() {
|
},
|
||||||
// let operate = {
|
// 区段封锁
|
||||||
// start: true,
|
unlock() {
|
||||||
// code: this.selected.code,
|
const operate = {
|
||||||
// type: MapDeviceType.Section.type,
|
start: true,
|
||||||
// label: MapDeviceType.Section.label,
|
code: this.selected.code,
|
||||||
// operation: OperationEvent.Section.lock.menu.operation
|
type: MapDeviceType.Section.type,
|
||||||
// };
|
label: MapDeviceType.Section.label,
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
operation: OperationEvent.Section.unlock.menu.operation
|
||||||
// if (valid) {
|
};
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
// this.$refs.sectionControl.doShow(operate, this.selected);
|
if (valid) {
|
||||||
// }
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// });
|
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||||
// },
|
}
|
||||||
// //区段封锁
|
});
|
||||||
// unlock() {
|
},
|
||||||
// let operate = {
|
// 设置速度
|
||||||
// start: true,
|
setSpeed() {
|
||||||
// code: this.selected.code,
|
|
||||||
// type: MapDeviceType.Section.type,
|
|
||||||
// label: MapDeviceType.Section.label,
|
|
||||||
// operation: OperationEvent.Section.unlock.menu.operation
|
|
||||||
// };
|
|
||||||
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
// if (valid) {
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// //设置速度
|
|
||||||
// setSpeed() {
|
|
||||||
// let operate = {
|
// let operate = {
|
||||||
// start: true,
|
// start: true,
|
||||||
// code: this.selected.code,
|
// code: this.selected.code,
|
||||||
@ -379,8 +360,21 @@ export default {
|
|||||||
// 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>
|
||||||
|
@ -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';
|
||||||
@ -28,15 +32,17 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
RouteControl,
|
RouteControl,
|
||||||
RouteSelection,
|
RouteSelection,
|
||||||
|
RouteLock,
|
||||||
|
RouteCmdControl,
|
||||||
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
RouteGuide,
|
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {};
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -46,49 +52,28 @@ export default {
|
|||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
local: [
|
||||||
{
|
{
|
||||||
label: '办理进路',
|
label: '排列进路',
|
||||||
handler: this.arrangementRoute,
|
handler: this.arrangementRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||||
auth: { station: true, center: false }
|
auth: { station: false, center: true }
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '办理引导进路',
|
|
||||||
handler: this.guide,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.guide,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消进路',
|
label: '取消进路',
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||||
auth: { station: true, center: false }
|
auth: { station: false, center: true }
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '总人解',
|
|
||||||
handler: this.humanTrainRoute,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.humanTrainRoute,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号重开',
|
label: '信号重开',
|
||||||
handler: this.reopenSignal,
|
handler: this.reopenSignal,
|
||||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||||
auth: { station: true, center: false }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号封锁',
|
type: 'separator'
|
||||||
handler: this.lock,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.lock,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号解封',
|
label: '进路交人工控',
|
||||||
handler: this.unlock,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '进路收人工控',
|
|
||||||
handler: this.humanControl,
|
handler: this.humanControl,
|
||||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
@ -105,82 +90,31 @@ export default {
|
|||||||
disabledCallback: MenuDisabledState.Signal.detail,
|
disabledCallback: MenuDisabledState.Signal.detail,
|
||||||
auth: { station: true, center: true }
|
auth: { station: true, center: true }
|
||||||
}
|
}
|
||||||
// {
|
|
||||||
// label: '设置联锁自动进路',
|
|
||||||
// handler: this.setAutoInterlock,
|
|
||||||
// disabledCallback: MenuDisabledState.Signal.setAutoInterlock,
|
|
||||||
// auth: { station: true, center: false },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '取消联锁自动进路',
|
|
||||||
// handler: this.cancelAutoInterlock,
|
|
||||||
// disabledCallback: MenuDisabledState.Signal.cancelAutoInterlock,
|
|
||||||
// auth: { station: true, center: false },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '设置联锁自动触发',
|
|
||||||
// handler: this.setAutoTrigger,
|
|
||||||
// disabledCallback: MenuDisabledState.Signal.setAutoTrigger,
|
|
||||||
// auth: { station: true, center: false },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '取消联锁自动触发',
|
|
||||||
// handler: this.cancelAutoTrigger,
|
|
||||||
// disabledCallback: MenuDisabledState.Signal.cancelAutoTrigger,
|
|
||||||
// auth: { station: true, center: false },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '信号关灯',
|
|
||||||
// handler: this.signalClose,
|
|
||||||
// disabledCallback: MenuDisabledState.Signal.signalClose,
|
|
||||||
// auth: { station: true, center: false },
|
|
||||||
// }
|
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
{
|
{
|
||||||
label: '办理进路',
|
label: '设置进路',
|
||||||
handler: this.arrangementRoute,
|
handler: this.arrangementRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||||
auth: { station: true, center: false }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '办理引导进路',
|
label: '取消列车进路',
|
||||||
handler: this.guide,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.guide,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '取消进路',
|
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||||
auth: { station: true, center: false }
|
auth: { station: false, center: true }
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '总人解',
|
|
||||||
handler: this.humanTrainRoute,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.humanTrainRoute,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号重开',
|
label: '信号重开',
|
||||||
handler: this.reopenSignal,
|
handler: this.reopenSignal,
|
||||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||||
auth: { station: true, center: false }
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号封锁',
|
type: 'separator'
|
||||||
handler: this.lock,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.lock,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号解封',
|
label: '进路交人工控',
|
||||||
handler: this.unlock,
|
|
||||||
disabledCallback: MenuDisabledState.Signal.unlock,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '进路收人工控',
|
|
||||||
handler: this.humanControl,
|
handler: this.humanControl,
|
||||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||||
auth: { station: false, center: true }
|
auth: { station: false, center: true }
|
||||||
@ -218,15 +152,6 @@ export default {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapGetters('training', [
|
|
||||||
'mode',
|
|
||||||
'operatemode'
|
|
||||||
]),
|
|
||||||
...mapGetters('menuOperation', [
|
|
||||||
'buttonOperation'
|
|
||||||
])
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||||
@ -236,6 +161,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('training', [
|
||||||
|
'mode',
|
||||||
|
'operatemode'
|
||||||
|
]),
|
||||||
|
...mapGetters('menuOperation', [
|
||||||
|
'buttonOperation'
|
||||||
|
])
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
const self = this;
|
const self = this;
|
||||||
@ -338,27 +272,6 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路引导
|
|
||||||
guide() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
send: 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, response }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (valid) {
|
|
||||||
var tempData = null;
|
|
||||||
if (response) {
|
|
||||||
tempData = response.data;
|
|
||||||
}
|
|
||||||
this.$refs.routeGuide.doShow(operate.operation, this.selected, tempData);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消进路
|
// 取消进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -375,19 +288,39 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 总人解
|
// 信号封锁
|
||||||
humanTrainRoute() {
|
lock() {
|
||||||
|
const operate = {
|
||||||
|
start: true,
|
||||||
|
send: 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 }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.routeLock.doShow(operate.operation, this.selected);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 信号解封
|
||||||
|
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.humanTrainRoute.menu.operation
|
operation: OperationEvent.Signal.unlock.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -407,33 +340,14 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号封锁
|
// 信号关灯
|
||||||
lock() {
|
signalClose() {
|
||||||
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.lock.menu.operation
|
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);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号解封
|
|
||||||
unlock() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
label: MapDeviceType.Signal.label,
|
|
||||||
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) {
|
||||||
@ -459,7 +373,7 @@ export default {
|
|||||||
tempData = response.data;
|
tempData = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected, tempData);
|
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -480,90 +394,10 @@ export default {
|
|||||||
tempData = response.data;
|
tempData = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.routeControl.doShow(operate, this.selected, tempData);
|
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// //设置联锁自动进路
|
|
||||||
// setAutoInterlock() {
|
|
||||||
// let 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() {
|
|
||||||
// let 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() {
|
|
||||||
// let 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() {
|
|
||||||
// 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() {
|
detail() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -1,28 +1,40 @@
|
|||||||
<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" />
|
||||||
|
<station-human-control-all ref="stationHumanControlAll" />
|
||||||
|
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</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,
|
||||||
|
StationCmdControl,
|
||||||
|
StationHumanControlAll,
|
||||||
|
StationSetRouteControlAll,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -30,9 +42,51 @@
|
|||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
local: [
|
||||||
|
{
|
||||||
|
label: '全站设置联锁自动触发',
|
||||||
|
handler: this.setAutoTrigger,
|
||||||
|
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
|
||||||
|
auth: { station: true, center: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '全站取消联锁自动触发',
|
||||||
|
handler: this.cancelAutoTrigger,
|
||||||
|
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
|
||||||
|
auth: { station: true, center: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '上电解锁',
|
||||||
|
handler: this.powerUnLock,
|
||||||
|
disabledCallback: MenuDisabledState.Station.powerUnLock,
|
||||||
|
auth: { station: true, center: false }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '执行关键操作测试',
|
||||||
|
handler: this.execKeyOperationTest,
|
||||||
|
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||||
|
auth: { station: true, center: false }
|
||||||
|
}
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
],
|
{
|
||||||
|
label: '所有进路自排关',
|
||||||
|
handler: this.humanControlALL,
|
||||||
|
disabledCallback: MenuDisabledState.Station.humanControlALL,
|
||||||
|
auth: { station: false, center: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所有进路自排开',
|
||||||
|
handler: this.atsAutoControlALL,
|
||||||
|
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
|
||||||
|
auth: { station: false, center: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '执行关键操作测试',
|
||||||
|
handler: this.execKeyOperationTest,
|
||||||
|
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
|
||||||
|
auth: { station: false, center: true }
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
@ -46,7 +100,7 @@
|
|||||||
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
disabledCallback: MenuDisabledState.Station.cancelStoppage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
@ -68,25 +122,25 @@
|
|||||||
},
|
},
|
||||||
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 = [];
|
this.menu = [];
|
||||||
if (this.selected.concentrateStationCode == this.selected.code) {
|
if (this.selected.concentrateStationCode == this.selected.code) {
|
||||||
//编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
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.selected.centralized) {
|
if (this.selected.centralized) {
|
||||||
//故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = [...this.menuForce]
|
this.menu = [...this.menuForce];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,9 +158,9 @@
|
|||||||
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,
|
||||||
@ -122,13 +176,13 @@
|
|||||||
} 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,
|
||||||
@ -144,10 +198,110 @@
|
|||||||
} 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() {
|
||||||
|
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>
|
</script>
|
@ -1,25 +1,25 @@
|
|||||||
<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: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
PopMenu
|
PopMenu
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
@ -27,16 +27,7 @@
|
|||||||
],
|
],
|
||||||
menuForce: [
|
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);
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
@ -47,12 +38,21 @@
|
|||||||
'buttonOperation'
|
'buttonOperation'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||||
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
|
} else {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
let self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
@ -65,5 +65,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,34 +1,52 @@
|
|||||||
<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" />
|
||||||
|
<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>
|
</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,
|
||||||
|
StandJumpStopControl,
|
||||||
StandDetail,
|
StandDetail,
|
||||||
|
StandRunLevel,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
|
StandBackStrategy,
|
||||||
|
StandStopTime,
|
||||||
|
StandDetainTrainAll
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -40,87 +58,150 @@
|
|||||||
label: '设置扣车',
|
label: '设置扣车',
|
||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消扣车',
|
label: '取消扣车',
|
||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置跳停',
|
label: '设置跳停',
|
||||||
handler: this.setJumpStop,
|
handler: this.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消跳停',
|
label: '取消跳停',
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '提前发车',
|
||||||
|
handler: this.earlyDeparture,
|
||||||
|
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
||||||
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置停站时间',
|
label: '设置停站时间',
|
||||||
handler: this.setStopTime,
|
handler: this.setStopTime,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置站间运行等级',
|
type: 'separator'
|
||||||
handler: this.setRunLevel,
|
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
|
||||||
auth: { station: true, center: true },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '属性',
|
label: '站台详细信息',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
disabledCallback: MenuDisabledState.StationStand.detail,
|
||||||
auth: { station: true, center: true },
|
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: [
|
central: [
|
||||||
{
|
{
|
||||||
label: '设置扣车',
|
label: '扣车',
|
||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消扣车',
|
label: '取消扣车',
|
||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '提前发车',
|
||||||
|
handler: this.earlyDeparture,
|
||||||
|
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
||||||
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置跳停',
|
label: '设置跳停',
|
||||||
handler: this.setJumpStop,
|
handler: this.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消跳停',
|
label: '取消跳停',
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置停站时间',
|
label: '设置停站时间',
|
||||||
handler: this.setStopTime,
|
handler: this.setStopTime,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置站间运行等级',
|
label: '设置运行等级',
|
||||||
handler: this.setRunLevel,
|
handler: this.setRunLevel,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// label: '变通策略管理',
|
||||||
|
// handler: this.setBackStrategy,
|
||||||
|
// disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
||||||
|
// auth: { station: true, center: true }
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '属性',
|
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,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
disabledCallback: MenuDisabledState.StationStand.detail,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -136,7 +217,7 @@
|
|||||||
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
@ -158,21 +239,21 @@
|
|||||||
},
|
},
|
||||||
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);
|
||||||
@ -189,9 +270,9 @@
|
|||||||
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,
|
||||||
@ -207,13 +288,13 @@
|
|||||||
} 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,
|
||||||
@ -229,13 +310,13 @@
|
|||||||
} 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);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -248,11 +329,11 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -264,11 +345,60 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
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() {
|
setJumpStop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -278,13 +408,13 @@
|
|||||||
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.standControl.doShow(operate, this.selected);
|
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消跳停
|
// 取消跳停
|
||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -294,13 +424,13 @@
|
|||||||
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.standControl.doShow(operate, this.selected);
|
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//停站时间控制
|
// 停站时间控制
|
||||||
setStopTime() {
|
setStopTime() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -315,15 +445,15 @@
|
|||||||
tempDate = response.data;
|
tempDate = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected, tempDate);
|
this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 设置运行等级
|
// 设置运行等级
|
||||||
setRunLevel() {
|
setRunLevel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -332,21 +462,60 @@
|
|||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation
|
operation: OperationEvent.StationStand.setRunLevel.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
|
console.log(valid, '----')
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let tempDate = null;
|
let tempDate = null;
|
||||||
if (response) {
|
if (response) {
|
||||||
tempDate = response.data;
|
tempDate = response.data;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected, tempDate);
|
this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch((error) => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
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() {
|
detail() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -363,10 +532,10 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
|
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,34 +1,49 @@
|
|||||||
<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" />
|
||||||
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
|
<alxe-effective ref="alxeEffective" />
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</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,
|
||||||
|
SwitchCmdControl,
|
||||||
|
SpeedLimitControl,
|
||||||
|
SpeedCmdControl,
|
||||||
|
AlxeEffective,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
type: Object
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -37,53 +52,17 @@
|
|||||||
menuNormal: {
|
menuNormal: {
|
||||||
local: [
|
local: [
|
||||||
{
|
{
|
||||||
label: '单操到定位',
|
label: '轨道切除',
|
||||||
handler: this.locate,
|
handler: this.split,
|
||||||
disabledCallback: MenuDisabledState.Switch.locate,
|
disabledCallback: MenuDisabledState.Switch.split,
|
||||||
auth: { station: true, center: true }
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '单操到反位',
|
label: '轨道激活',
|
||||||
handler: this.reverse,
|
handler: this.active,
|
||||||
disabledCallback: MenuDisabledState.Switch.reverse,
|
disabledCallback: MenuDisabledState.Switch.active,
|
||||||
auth: { station: true, center: true }
|
auth: { station: true, center: true }
|
||||||
},
|
}
|
||||||
{
|
|
||||||
label: '道岔单锁',
|
|
||||||
handler: this.lock,
|
|
||||||
disabledCallback: MenuDisabledState.Switch.lock,
|
|
||||||
auth: { station: true, center: false }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '道岔解锁',
|
|
||||||
handler: this.unlock,
|
|
||||||
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 }
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
{
|
{
|
||||||
@ -105,7 +84,7 @@
|
|||||||
auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '道岔解锁',
|
label: '道岔单解',
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
disabledCallback: MenuDisabledState.Switch.unlock,
|
disabledCallback: MenuDisabledState.Switch.unlock,
|
||||||
auth: { station: true, center: true }
|
auth: { station: true, center: true }
|
||||||
@ -127,12 +106,6 @@
|
|||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
disabledCallback: MenuDisabledState.Switch.fault,
|
disabledCallback: MenuDisabledState.Switch.fault,
|
||||||
auth: { station: true, center: true }
|
auth: { station: true, center: true }
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '属性',
|
|
||||||
handler: this.undeveloped,
|
|
||||||
disabledCallback: MenuDisabledState.Switch.property,
|
|
||||||
auth: { station: true, center: true }
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -154,7 +127,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
@ -176,21 +149,21 @@
|
|||||||
},
|
},
|
||||||
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);
|
||||||
@ -207,9 +180,9 @@
|
|||||||
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,
|
||||||
@ -225,13 +198,13 @@
|
|||||||
} 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,
|
||||||
@ -247,13 +220,13 @@
|
|||||||
} 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,
|
||||||
@ -267,9 +240,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔解封
|
// 道岔解封
|
||||||
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,
|
||||||
@ -279,13 +252,13 @@
|
|||||||
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,
|
||||||
@ -299,9 +272,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔解封
|
// 道岔解封
|
||||||
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,
|
||||||
@ -311,13 +284,13 @@
|
|||||||
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,
|
||||||
@ -331,9 +304,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//道岔转动
|
// 道岔转动
|
||||||
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,
|
||||||
@ -350,9 +323,9 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//道岔故障解锁
|
// 道岔故障解锁
|
||||||
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,
|
||||||
@ -362,13 +335,13 @@
|
|||||||
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,
|
||||||
@ -378,16 +351,16 @@
|
|||||||
};
|
};
|
||||||
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,
|
||||||
@ -401,9 +374,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//区段激活
|
// 区段激活
|
||||||
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,
|
||||||
@ -417,35 +390,51 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//单操到定位
|
// 道岔计轴预复位
|
||||||
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 确认计轴有效
|
||||||
|
alxeEffective() {
|
||||||
|
const operate = {
|
||||||
|
start: true,
|
||||||
|
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 }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -458,5 +447,5 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,34 +1,32 @@
|
|||||||
<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',
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
SystemTime
|
SystemTime
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
logoImg: logo_,
|
logoImg: logo_,
|
||||||
@ -38,100 +36,100 @@
|
|||||||
title: '服务器1',
|
title: '服务器1',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: logo_,
|
src: logo_,
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '服务器2',
|
title: '服务器2',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '前置机1',
|
title: '前置机1',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '前置机2',
|
title: '前置机2',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '主调',
|
title: '主调',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '调度台1',
|
title: '调度台1',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '调度台2',
|
title: '调度台2',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '调度台3',
|
title: '调度台3',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '大屏',
|
title: '大屏',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '维护工作站',
|
title: '维护工作站',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '运行图显示人工站',
|
title: '运行图显示人工站',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '跳停',
|
title: '跳停',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '扣车',
|
title: '扣车',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: '',
|
src: '',
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '列车报警',
|
title: '列车报警',
|
||||||
operate: '',
|
operate: '',
|
||||||
src: logo_,
|
src: logo_,
|
||||||
click: this.undeveloped,
|
click: this.undeveloped
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.training.initTime': function (initTime) {
|
|
||||||
let date = new Date(initTime);
|
|
||||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isShowSystemTime() {
|
isShowSystemTime() {
|
||||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
'$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() {
|
mounted() {
|
||||||
this.initTools();
|
this.initTools();
|
||||||
},
|
},
|
||||||
@ -140,10 +138,10 @@
|
|||||||
this.tools = [];
|
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;
|
||||||
|
@ -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 }
|
||||||
},
|
},
|
||||||
menuForce: [],
|
{
|
||||||
menuSpeed: []
|
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: [
|
||||||
|
{
|
||||||
|
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>
|
||||||
|
@ -1,38 +1,40 @@
|
|||||||
<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"
|
||||||
|
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||||
<el-form label-width="80px" size="mini">
|
<el-form label-width="80px" size="mini">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="线路名称">
|
<el-form-item label="线路名称">
|
||||||
<el-input v-model="model.lineName" disabled />
|
<el-input v-model="model.lineName" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="单位名称">
|
<el-form-item label="单位名称">
|
||||||
<el-input v-model="model.unitName" disabled />
|
<el-input v-model="model.unitName" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="模块名称">
|
<el-form-item label="模块名称">
|
||||||
<el-input v-model="model.moduleName" disabled />
|
<el-input v-model="model.moduleName" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item label="报警时间">
|
<el-form-item label="报警时间">
|
||||||
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
|
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
|
||||||
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span slot="label">等 级</span>
|
<span slot="label">等 级</span>
|
||||||
<el-input v-model="model.level" disabled />
|
<el-input v-model="model.level" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="确认状态">
|
<el-form-item label="确认状态">
|
||||||
<el-input v-model="model.confirm" disabled />
|
<el-input v-model="model.confirm" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -40,24 +42,25 @@
|
|||||||
<el-col :span="9" class="alarm-type">
|
<el-col :span="9" class="alarm-type">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span slot="label">类  型</span>
|
<span slot="label">类  型</span>
|
||||||
<el-input v-model="model.type" disabled />
|
<el-input v-model="model.type" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15" class="alarm-child-type">
|
<el-col :span="15" class="alarm-child-type">
|
||||||
<el-form-item label="子类型">
|
<el-form-item label="子类型">
|
||||||
<el-input v-model="model.childType" disabled />
|
<el-input v-model="model.childType" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="时间摘要">
|
<el-form-item label="时间摘要">
|
||||||
<el-input v-model="model.timeSummary" disabled />
|
<el-input v-model="model.timeSummary" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="推荐操作">
|
<el-form-item label="推荐操作">
|
||||||
<el-input v-model="model.recommendedOperation" disabled />
|
<el-input v-model="model.recommendedOperation" disabled></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="alarm-detail-description">
|
<div class="alarm-detail-description">
|
||||||
<span> 报警详细描述</span><br>
|
<span> 报警详细描述</span><br>
|
||||||
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
|
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
|
||||||
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
@ -65,18 +68,17 @@
|
|||||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确 定</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<span style="line-height:26px">未确认{{ level }}级报警数目:1</span>
|
<span style="line-height:26px">未确认{{level}}级报警数目:1</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- </span> -->
|
|
||||||
</el-dialog>
|
</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 {
|
||||||
@ -101,40 +103,40 @@ export default {
|
|||||||
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) {
|
||||||
@ -151,7 +153,7 @@ export default {
|
|||||||
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');
|
||||||
@ -165,40 +167,41 @@ export default {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -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] };
|
||||||
|
@ -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">
|
||||||
|
@ -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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#statusBar {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#statusDownTrainDetail {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
@ -1,3 +1,4 @@
|
|||||||
|
import Vue from 'vue';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import deviceState from '@/jmap/constant/deviceState';
|
import deviceState from '@/jmap/constant/deviceState';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
@ -14,8 +15,7 @@ export const SystemType = {
|
|||||||
|
|
||||||
export const StationControlType = {
|
export const StationControlType = {
|
||||||
'01': 'center', // 中控
|
'01': 'center', // 中控
|
||||||
'02': 'station', // 站控
|
'02': 'station' // 站控
|
||||||
'03': 'station'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 控制禁用
|
// 控制禁用
|
||||||
@ -126,9 +126,6 @@ export const MenuDisabledState = {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 总人解
|
|
||||||
humanTrainRoute() {
|
|
||||||
},
|
|
||||||
// 人工控
|
// 人工控
|
||||||
humanControl() {
|
humanControl() {
|
||||||
},
|
},
|
||||||
@ -370,15 +367,6 @@ export const MenuDisabledState = {
|
|||||||
if (device && !device.fault) {
|
if (device && !device.fault) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
// 单操到定位
|
|
||||||
locate() {
|
|
||||||
},
|
|
||||||
// 单操到反位
|
|
||||||
reverse() {
|
|
||||||
},
|
|
||||||
// 属性
|
|
||||||
property() {
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Train: {
|
Train: {
|
||||||
@ -394,33 +382,12 @@ export const MenuDisabledState = {
|
|||||||
// 修改车组号
|
// 修改车组号
|
||||||
editTrainNo() {
|
editTrainNo() {
|
||||||
},
|
},
|
||||||
// 创建车组号
|
|
||||||
createTrainNo() {
|
|
||||||
},
|
|
||||||
// 移动车组号
|
|
||||||
moveTrainNo() {
|
|
||||||
},
|
|
||||||
// 删除车组号
|
|
||||||
deleteTrainNo() {
|
|
||||||
},
|
|
||||||
// 移动列车识别号
|
// 移动列车识别号
|
||||||
moveTrainId() {
|
moveTrainId() {
|
||||||
},
|
},
|
||||||
// 交换列车识别号
|
// 交换列车识别号
|
||||||
switchTrainId() {
|
switchTrainId() {
|
||||||
},
|
},
|
||||||
// 设计划车
|
|
||||||
setPlanTrainId() {
|
|
||||||
},
|
|
||||||
// 设目的地车
|
|
||||||
destinationTrainId() {
|
|
||||||
},
|
|
||||||
// 设人工车
|
|
||||||
artificialTrainId() {
|
|
||||||
},
|
|
||||||
// 详细列车信息
|
|
||||||
detailTrainInfo() {
|
|
||||||
},
|
|
||||||
// 设置限速
|
// 设置限速
|
||||||
limitSpeed() {
|
limitSpeed() {
|
||||||
},
|
},
|
||||||
@ -437,6 +404,24 @@ export const MenuDisabledState = {
|
|||||||
if (device && !device.fault) {
|
if (device && !device.fault) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 添加计划车
|
||||||
|
addPlanTrain() {
|
||||||
|
},
|
||||||
|
// 设置计划车
|
||||||
|
setPlanTrain() {
|
||||||
|
},
|
||||||
|
// 设置头码车
|
||||||
|
setHeadTrain() {
|
||||||
|
},
|
||||||
|
// 设置人工车
|
||||||
|
setWorkTrain() {
|
||||||
|
},
|
||||||
|
// 标记重点车
|
||||||
|
trainToFlag() {
|
||||||
|
},
|
||||||
|
// 取消标记重点车
|
||||||
|
trainUnFlag() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -453,7 +438,6 @@ export function menuConvert(menu) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (elem.disabledCallback.constructor === Function) {
|
if (elem.disabledCallback.constructor === Function) {
|
||||||
// elem.disabled = elem.defaultDisabled;
|
|
||||||
if (!elem.defaultDisabled) {
|
if (!elem.defaultDisabled) {
|
||||||
elem.disabled = elem.disabledCallback();
|
elem.disabled = elem.disabledCallback();
|
||||||
}
|
}
|
||||||
@ -552,7 +536,7 @@ export function menuFiltration(menuObj) {
|
|||||||
export function trainMenuFiltration(menuObj) {
|
export function trainMenuFiltration(menuObj) {
|
||||||
var menu = [];
|
var menu = [];
|
||||||
if (store.state.training.prdType != '') {
|
if (store.state.training.prdType != '') {
|
||||||
var type = SystemType[store.state.training.prdType];
|
const type = SystemType[store.state.training.prdType];
|
||||||
menu = [...menuObj[type]];
|
menu = [...menuObj[type]];
|
||||||
if (menu.constructor === Array) {
|
if (menu.constructor === Array) {
|
||||||
menu.forEach(elem => {
|
menu.forEach(elem => {
|
||||||
@ -576,12 +560,11 @@ export function trainMenuFiltration(menuObj) {
|
|||||||
/**
|
/**
|
||||||
* 离开菜单以及执行完菜单取消选中状态
|
* 离开菜单以及执行完菜单取消选中状态
|
||||||
*/
|
*/
|
||||||
export function mouseCancelState(device) {
|
export function mouseCancelState(selected) {
|
||||||
// Object.assign(device, { _selected: false });
|
const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
|
||||||
// var viewInstance = store.state.map.jlmap.getViewInstanceByDevice({ _type: device._type, _code: device.code });
|
const instance = (device || {}).instance;
|
||||||
// if (viewInstance && viewInstance['mouseleave']) {
|
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
||||||
// viewInstance['selected'] = false;
|
device['down'] = false;
|
||||||
// viewInstance['mouseleave'](store.state.map.jlmap._zr.curEvent);
|
instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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);
|
||||||
},
|
},
|
||||||
|
@ -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;
|
||||||
|
@ -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',
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
|
@ -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%"
|
||||||
|
@ -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"
|
||||||
|
@ -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 = {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
@ -1,23 +1,30 @@
|
|||||||
<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',
|
||||||
|
components: {
|
||||||
|
DataTable
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
maxTop: {
|
maxTop: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
DataTable
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
maxmini: true,
|
maxmini: true,
|
||||||
@ -34,15 +41,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
label: '到点',
|
label: '到点'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'stopTime',
|
prop: 'stopTime',
|
||||||
label: '停站时间',
|
label: '停站时间'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'endTime',
|
prop: 'endTime',
|
||||||
label: '发点',
|
label: '发点'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'level',
|
prop: 'level',
|
||||||
@ -51,27 +58,27 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -86,10 +93,10 @@
|
|||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user