北京一号线新版信号机操作调整
This commit is contained in:
parent
387746a69b
commit
4dde67b582
@ -1,9 +1,19 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-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>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
<span>{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -14,16 +24,20 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/noticeInfo'
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -31,10 +45,7 @@
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -52,13 +63,15 @@
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return '进路交人工控';
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return '进路交ATS自动控'
|
||||
return '进路交ATS自动控';
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return '设置运行等级';
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return '停站时间';
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
return '设置折返策略';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
@ -68,7 +81,7 @@
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
/** 进路设置*/
|
||||
return OperationEvent.Signal.arrangementRoute.confirm.domId
|
||||
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
@ -93,14 +106,16 @@
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -151,16 +166,16 @@
|
||||
this.setBackStrategy();
|
||||
}
|
||||
},
|
||||
//进路设置
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -169,18 +184,18 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//信号关灯
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation
|
||||
}
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -189,18 +204,18 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//信号重开
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -209,18 +224,18 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//取消进路
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -229,18 +244,18 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//进路交人工控
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -251,16 +266,16 @@
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//进路交ATS自动控
|
||||
// 进路交ATS自动控
|
||||
atsAutoControl() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -271,17 +286,17 @@
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//设置运行等级
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||
val: this.operate.val
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -290,19 +305,19 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//停站时间
|
||||
// 停站时间
|
||||
setStopTime() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||
val: this.operate.val,
|
||||
}
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -311,19 +326,19 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
//设置折返策略
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||
val: this.operate.val,
|
||||
}
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -332,15 +347,15 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
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/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
@ -349,7 +364,7 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
@ -1,16 +1,25 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm signal-control" :title="title" :visible.sync="show" width="300px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm signal-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</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-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -21,18 +30,19 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl"></confirm-control>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
@ -47,7 +57,7 @@
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -66,13 +76,15 @@
|
||||
return '信号关灯';
|
||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
return '重开信号';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
@ -81,8 +93,8 @@
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -112,112 +124,91 @@
|
||||
this.reopenSignal();
|
||||
}
|
||||
},
|
||||
//取消列车进路
|
||||
// 取消列车进路
|
||||
cancelTrainRoute() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
/** 现地工作站*/
|
||||
this.cancelTrainRouteByLocal();
|
||||
} else if (this.$store.state.training.prdType == '02') {
|
||||
/** 行调工作站*/
|
||||
this.cancelTrainRouteByCentral();
|
||||
}
|
||||
this.cancelTrainRouteFunc();
|
||||
// if (this.$store.state.training.prdType == '01') {
|
||||
// /** 现地工作站*/
|
||||
// this.cancelTrainRouteFunc();
|
||||
// } else if (this.$store.state.training.prdType == '02') {
|
||||
// /** 行调工作站*/
|
||||
// this.cancelTrainRouteFunc();
|
||||
// }
|
||||
},
|
||||
//现地工作站取消进路
|
||||
cancelTrainRouteByLocal() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//行调工作站取消进路
|
||||
cancelTrainRouteByCentral() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
cancelTrainRouteFunc() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
}
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//信号关灯
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
messages: [`信号关灯: ${this.signalName}`],
|
||||
}
|
||||
messages: [`信号关灯: ${this.signalName}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//信号重开
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
}
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
//取消
|
||||
// 取消
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,40 +1,55 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-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-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="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-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled></el-input>
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 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;">
|
||||
<el-radio-group v-model="control" style="width: 40%;float: left;" @change="chooseControl">
|
||||
<div style="margin-bottom: 10px;">
|
||||
<el-radio label="01" :id="control === '01'? '': domIdChoose1">自动</el-radio>
|
||||
<el-radio :id="control === '01'? '': domIdChoose1" label="01">自动</el-radio>
|
||||
</div>
|
||||
<el-radio label="02" :id="control === '02'? '': domIdChoose1">全人工</el-radio>
|
||||
<el-radio :id="control === '02'? '': domIdChoose1" label="02">全人工</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>
|
||||
<el-input-number
|
||||
:id="domIdInput"
|
||||
v-model="time"
|
||||
:disabled="disabledInput"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
size="mini"
|
||||
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;"
|
||||
@change="inputTime"
|
||||
/>
|
||||
<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 v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
|
||||
<el-radio :id="effective === true? '': domIdChoose2" :label="true">一直有效</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -46,18 +61,18 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl"></confirm-control>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</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 { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'StandStopTime',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
@ -73,8 +88,8 @@
|
||||
effective: false,
|
||||
selected: null,
|
||||
standName: '',
|
||||
stationName: '',
|
||||
}
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -97,21 +112,21 @@
|
||||
},
|
||||
disabledUp() {
|
||||
if (this.selected) {
|
||||
return this.selected.direction !== '02'
|
||||
return this.selected.direction !== '02';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
disabledDown() {
|
||||
if (this.selected) {
|
||||
return this.selected.direction !== '01'
|
||||
return this.selected.direction !== '01';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
disabledInput() {
|
||||
return this.control === '01'; //如果是自动则不可以设置
|
||||
return this.control === '01'; // 如果是自动则不可以设置
|
||||
},
|
||||
disabledTime() {
|
||||
return this.control === '01'; //如果是自动则不可以设置
|
||||
return this.control === '01'; // 如果是自动则不可以设置
|
||||
},
|
||||
title() {
|
||||
return '停站时间';
|
||||
@ -120,18 +135,18 @@
|
||||
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.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -139,7 +154,7 @@
|
||||
|
||||
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.effective = !!tempDate.parkingValidStatus;
|
||||
this.direction = selected.direction;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
@ -160,53 +175,53 @@
|
||||
this.effective = true;
|
||||
}
|
||||
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
||||
val: `${control}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
chooseEffective(effective) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
||||
val: `${effective}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
inputTime(time) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
repeat: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||
val: `${time}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
val: [`${this.control}`, this.time, this.effective].join('::'),
|
||||
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 }) => {
|
||||
@ -216,23 +231,23 @@
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
})
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -207,15 +207,17 @@ export default {
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
@ -229,15 +231,16 @@ export default {
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
@ -251,14 +254,17 @@ export default {
|
||||
arrangementRoute() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
// send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
var tempData = null;
|
||||
@ -276,63 +282,65 @@ export default {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号封锁
|
||||
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
|
||||
};
|
||||
// // 信号封锁
|
||||
// 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 = {
|
||||
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 }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// this.$store.dispatch('training/nextNew', 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 = {
|
||||
// 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 }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.routeCmdControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
@ -344,11 +352,12 @@ export default {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
@ -359,11 +368,14 @@ export default {
|
||||
humanControl() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
// send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
@ -380,11 +392,14 @@ export default {
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
// send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
@ -401,11 +416,14 @@ export default {
|
||||
detail() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
// send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
|
Loading…
Reference in New Issue
Block a user