Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
39bc38701e
@ -73,3 +73,12 @@ export function getPublish3dMapDetail(id) {
|
|||||||
});
|
});
|
||||||
return datad.then();
|
return datad.then();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 更新地图3d数据*/
|
||||||
|
export function tuoguan3ddrive(group,on,data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${group}/${on}/trust`,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -102,13 +102,13 @@ export function getmodels(data) {
|
|||||||
deviceType:"suidaobg",
|
deviceType:"suidaobg",
|
||||||
type:"nbsuidao",
|
type:"nbsuidao",
|
||||||
picUrl:"",
|
picUrl:"",
|
||||||
assetUrl:"../../static/model/suidao/nbsuidao.FBX"
|
assetUrl:"../../static/model/suidao/suidao.FBX"
|
||||||
}
|
}
|
||||||
assets.push(backgroundmodel);
|
assets.push(backgroundmodel);
|
||||||
|
|
||||||
models.assets = assets;
|
models.assets = assets;
|
||||||
models.stationtexture = "nb1";
|
models.stationtexture = "fz1";
|
||||||
models.istexture = true;
|
models.istexture = false;
|
||||||
console.log(models);
|
console.log(models);
|
||||||
postmap.assets = JSON.stringify(models);
|
postmap.assets = JSON.stringify(models);
|
||||||
//link轨道
|
//link轨道
|
||||||
|
@ -40,6 +40,7 @@ class Jlmap {
|
|||||||
|
|
||||||
// 显示集中站
|
// 显示集中站
|
||||||
this.stationCode = '';
|
this.stationCode = '';
|
||||||
|
this.isUpdateShowTrainList = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化属性有鼠标事件 缩放等
|
// 初始化属性有鼠标事件 缩放等
|
||||||
@ -421,8 +422,9 @@ class Jlmap {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (elem.deviceType === 'TRAIN') {
|
if (elem.deviceType === 'TRAIN') {
|
||||||
store.dispatch('map/updateTrainState', elem);
|
this.isUpdateShowTrainList = true;
|
||||||
store.dispatch('map/setActiveTrainList', elem);
|
store.dispatch('map/updateTrainList', elem);
|
||||||
|
// store.dispatch('map/updateTrainState', elem);
|
||||||
} else if (elem.deviceType === 'STAND') {
|
} else if (elem.deviceType === 'STAND') {
|
||||||
store.dispatch('map/updateStationStand', elem);
|
store.dispatch('map/updateStationStand', elem);
|
||||||
}
|
}
|
||||||
@ -436,6 +438,10 @@ class Jlmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (this.isUpdateShowTrainList) {
|
||||||
|
store.dispatch('map/setActiveTrainList');
|
||||||
|
this.isUpdateShowTrainList = false;
|
||||||
|
}
|
||||||
this.handleRouteSignalStatus(signalDeviceList);
|
this.handleRouteSignalStatus(signalDeviceList);
|
||||||
// 状态后处理
|
// 状态后处理
|
||||||
this.postHandle(list || []);
|
this.postHandle(list || []);
|
||||||
|
@ -1,185 +0,0 @@
|
|||||||
<template>
|
|
||||||
<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-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</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 { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return '取消列车进路';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return '重开信号';
|
|
||||||
} else {
|
|
||||||
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;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消列车进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,344 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="beijing-01__systerm stand-run-level"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="500px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
|
||||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-input v-model="standName" size="small" disabled />
|
|
||||||
</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 prop="level" label="运行等级">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
:id="chooseLevelId"
|
|
||||||
v-model="scope.row.level"
|
|
||||||
size="mini"
|
|
||||||
@change="levelSelectChange(scope.row)"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in levelList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="time" label="区间运行时间">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
:id="domIdChoose"
|
|
||||||
v-model="scope.row.time"
|
|
||||||
size="mini"
|
|
||||||
:disabled="scope.row.level == 0"
|
|
||||||
@change="timeSelectChange"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in timeList[scope.row.level]"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="check" label="一直有效">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<!-- <el-row class="button-group">
|
|
||||||
<span v-if="isSelect && tempData.length">提示: 未选中要设置运行等级的下一站台</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>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StandRunLevel',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
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: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
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() {
|
|
||||||
const list = {
|
|
||||||
'0': [{ value: 0, label: '0' }],
|
|
||||||
'1': [], // 120 - 110
|
|
||||||
'2': [], // 100 - 90
|
|
||||||
'3': [], // 80 - 70
|
|
||||||
'4': [] // 60 - 50
|
|
||||||
};
|
|
||||||
for (let i = 110; i <= 120; i++) {
|
|
||||||
list['1'].push({ value: i, label: `${i}` });
|
|
||||||
}
|
|
||||||
for (let i = 90; i <= 100; i++) {
|
|
||||||
list['2'].push({ value: i, label: `${i}` });
|
|
||||||
}
|
|
||||||
for (let i = 70; i <= 80; i++) {
|
|
||||||
list['3'].push({ value: i, label: `${i}` });
|
|
||||||
}
|
|
||||||
for (let i = 50; i <= 60; i++) {
|
|
||||||
list['4'].push({ value: i, label: `${i}` });
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
// 深度数据状态
|
|
||||||
tempData: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
this.checkTableDataSelction(val);
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
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 = [];
|
|
||||||
// const stationList = this.stationList.slice();
|
|
||||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
|
||||||
if (selected.direction == '01') { // 下行
|
|
||||||
// 下行时,此站不是最后一站
|
|
||||||
if (index != 0) {
|
|
||||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus ? opts.intervalRunTimeValidStatus : true });
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 上行时,此站不是最后一站
|
|
||||||
if (index != this.stationList.length) {
|
|
||||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus ? opts.intervalRunTimeValidStatus : true });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.loadInitData(selected, opts);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
checkTableDataSelction(data) {
|
|
||||||
const selection = [];
|
|
||||||
if (data && data.length > 0) {
|
|
||||||
data.forEach(row => {
|
|
||||||
if (row.check && !row.disabled) {
|
|
||||||
selection.push(row);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.disabledSend = !selection.length;
|
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
|
||||||
this.selection = selection;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
timeSelectChange(time) {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
|
||||||
val: time.toString()
|
|
||||||
};
|
|
||||||
|
|
||||||
this.time = time.toString();
|
|
||||||
this.isSelect = false;
|
|
||||||
this.isConfirm = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
levelSelectChange(row) {
|
|
||||||
const operate = {
|
|
||||||
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/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
checkChange(check) {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
|
||||||
val: check.toString()
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.isConfirm) {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: Number(this.time), runLevelTimeForever: !!this.tempData[0].check}, 2).then(({ valid })=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,202 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="beijing-01__systerm switch-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>车站名称</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="switchName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="isActive" style="margin-top: 10px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="activeRadio" label="1" :disabled="activeRadio == 2" style="display: block; text-align: center;">
|
|
||||||
激活</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="activeRadio" label="2" :disabled="activeRadio == 1" style="display: block; text-align: center;">
|
|
||||||
切除</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="isLock" style="margin-top: 10px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="lockRadio" label="1" disabled style="display: block; text-align: center;">
|
|
||||||
道岔单锁</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="lockRadio" label="2" style="display: block; text-align: center;">
|
|
||||||
道岔解锁</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SwitchControl',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isActive: false,
|
|
||||||
isLock: false,
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: '',
|
|
||||||
stationName: '',
|
|
||||||
switchName: '',
|
|
||||||
lockRadio: '1',
|
|
||||||
activeRadio: '1'
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
return '区段控制';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
return '区段控制';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
return '道岔解锁';
|
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.switchName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
this.switchName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.isActive = false;
|
|
||||||
this.isLock = false;
|
|
||||||
if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
this.isActive = true;
|
|
||||||
this.activeRadio = '2';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
this.isActive = true;
|
|
||||||
this.activeRadio = '1';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
this.isLock = true;
|
|
||||||
this.lockRadio = '2';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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.Switch.split.menu.operation) {
|
|
||||||
/** 区段激活*/
|
|
||||||
this.split();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
/** 区段激活*/
|
|
||||||
this.active();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
/** 道岔单解*/
|
|
||||||
this.unlock();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 道岔单解
|
|
||||||
unlock() {
|
|
||||||
this.sendCommand(menuOperate.Switch.unlock);
|
|
||||||
},
|
|
||||||
// 区段切除
|
|
||||||
split() {
|
|
||||||
this.sendCommand(menuOperate.Switch.split);
|
|
||||||
},
|
|
||||||
// 区段激活
|
|
||||||
active() {
|
|
||||||
this.sendCommand(menuOperate.Switch.active);
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
sendCommand(operate) { // 发送指令
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -2,9 +2,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<route-selection ref="routeSelection" />
|
<route-selection ref="routeSelection" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" :pop-class="systemName" />
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" :system-name="systemName" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="password" @checkOver="passWordCommit" />
|
<password-box ref="password" @checkOver="passWordCommit" />
|
||||||
</div>
|
</div>
|
||||||
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import RouteControl from './dialog/routeControl';
|
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteHandControl from './dialog/routeHandControl';
|
import RouteHandControl from './dialog/routeHandControl';
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
|
||||||
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';
|
||||||
@ -49,6 +49,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
clickNum:0,
|
clickNum:0,
|
||||||
|
systemName:'beijing-01__systerm',
|
||||||
oldSelected:null,
|
oldSelected:null,
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<stand-control ref="standControl" system-name="beijing-01__systerm" />
|
<stand-control ref="standControl" :system-name="systemName" />
|
||||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="beijing-01__systerm" />
|
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" />
|
||||||
<stand-detail ref="standDetail" />
|
<stand-detail ref="standDetail" />
|
||||||
<stand-run-level ref="standRunLevel" />
|
<stand-run-level ref="standRunLevel" :system-name="systemName" />
|
||||||
<stand-stop-time ref="standStopTime" />
|
<stand-stop-time ref="standStopTime" :system-name="systemName" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<stand-back-strategy ref="standBackStrategy" />
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
</div>
|
</div>
|
||||||
@ -17,8 +17,8 @@ import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
|||||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
||||||
import StandBackStrategy from './dialog/standBackStrategy';
|
import StandBackStrategy from './dialog/standBackStrategy';
|
||||||
import StandDetail from './dialog/standDetail';
|
import StandDetail from './dialog/standDetail';
|
||||||
import StandRunLevel from './dialog/standRunLevel';
|
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
|
||||||
import StandStopTime from './dialog/standStopTime';
|
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
|
||||||
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';
|
||||||
@ -51,6 +51,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
|
systemName:'beijing-01__systerm',
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
],
|
],
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl" />
|
<section-control ref="sectionControl" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" pop-class="beijing-01__systerm" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<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 '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||||
import AlxeEffective from './dialog/alxeEffective';
|
import AlxeEffective from './dialog/alxeEffective';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
@ -1,218 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag class="chengdou-01__system switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span style="color:#000;">车站名称</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span style="color:#000;">道岔</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="switchName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SwitchControl',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
mixins: [
|
|
||||||
CancelMouseState
|
|
||||||
],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: '',
|
|
||||||
stationName: '',
|
|
||||||
switchName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
return '单操到定位';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
return '单操到反位';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
return '道岔单锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
return '道岔解锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
return '道岔封锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
return '区故解';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
return '道岔解封';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.switchName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
this.switchName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
this.locate(); // 单操到正位
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
this.reverse(); // 单操到反位
|
|
||||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
this.lock(); // 道岔单锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
this.unlock(); // 道岔解锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
this.block(); // 道岔封锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
this.unblock(); // 道岔解封
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
this.fault();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔解锁
|
|
||||||
unlock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
|
||||||
block() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔解封
|
|
||||||
unblock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 单操到正位
|
|
||||||
locate() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.locate.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 单操到反位
|
|
||||||
reverse() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 区故解
|
|
||||||
fault() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.fault.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
sendCommand(operate) { // 发送指令
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" pop-class="chengdou-01__system" />
|
||||||
<create-device-label ref="createDeviceLabel" />
|
<create-device-label ref="createDeviceLabel" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import CreateDeviceLabel from './dialog/createDeviceLabel';
|
import CreateDeviceLabel from './dialog/createDeviceLabel';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
// import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PasswordBox',
|
name: 'PasswordBox',
|
||||||
|
@ -1,284 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="chengdou-03__systerm signal-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="440px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="2"><span>车站</span></el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" style="margin-top: 50px">
|
|
||||||
<el-col :span="11" :offset="13">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<password-box ref="password" @checkOver="passWordCommit" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import PasswordBox from './childDialog/passwordInputBox';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
PasswordBox,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
mixins: [
|
|
||||||
CancelMouseState
|
|
||||||
],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
tempdata: [],
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: '',
|
|
||||||
operateCode: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return '取消列车进路';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.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.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected, tempdata) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.tempdata = tempdata;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.operateCode = operate.code;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消列车进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.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.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
passWordCommit(data) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: data.operateNext,
|
|
||||||
cmdType: data.cmdType
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) { this.doClose(); }
|
|
||||||
}).catch((error) => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
// 取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 总人解
|
|
||||||
humanTrainRoute() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.humanTrainRoute.confirm.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号封锁
|
|
||||||
lock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.lock.confirm.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号解封
|
|
||||||
unlock() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
|
||||||
operateNext: OperationEvent.Signal.unlock.confirm.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
|
||||||
this.$refs.password.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
|
||||||
messages: [`信号关灯: ${this.signalName}`]
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,249 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag class="chengdou-03__systerm switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>车站名称</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="switchName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import PasswordBox from './childDialog/passwordInputBox';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SwitchControl',
|
|
||||||
components: {
|
|
||||||
NoticeInfo,
|
|
||||||
PasswordBox
|
|
||||||
},
|
|
||||||
mixins: [
|
|
||||||
CancelMouseState
|
|
||||||
],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: '',
|
|
||||||
stationName: '',
|
|
||||||
switchName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
return '单操到定位';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
return '单操到反位';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
return '道岔单锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
return '道岔解锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
return '道岔封锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
return '区故解';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
return '道岔解封';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.switchName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
this.switchName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
this.locate(); // 单操到正位
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
this.reverse(); // 单操到反位
|
|
||||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
this.lock(); // 道岔单锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
this.unlock(); // 道岔解锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
this.openPasswordBox(this.operation, OperationEvent.Switch.block.confirm.operation); // 道岔封锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
this.openPasswordBox(this.operation, OperationEvent.Switch.unblock.confirm.operation); // 道岔解封
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation); // 区故解
|
|
||||||
}
|
|
||||||
},
|
|
||||||
passWordCommit(data) { // 密码窗确认
|
|
||||||
if (data.operation === OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
this.fault();
|
|
||||||
} else if (data.operation === OperationEvent.Switch.block.menu.operation) {
|
|
||||||
this.block();
|
|
||||||
} else if (data.operation === OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
this.unblock();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔解锁
|
|
||||||
unlock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
|
||||||
block() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔解封
|
|
||||||
unblock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 单操到正位
|
|
||||||
locate() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.locate.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 单操到反位
|
|
||||||
reverse() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 区故解
|
|
||||||
fault() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.fault.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 打开密码输入框
|
|
||||||
openPasswordBox(operation, operateNext) {
|
|
||||||
const operate = {
|
|
||||||
operation: operation,
|
|
||||||
operateNext: operateNext
|
|
||||||
};
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.passwordBox.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
sendCommand(operate) { // 发送指令
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -2,18 +2,18 @@
|
|||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<route-selection ref="routeSelection" />
|
<route-selection ref="routeSelection" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" :pop-class="'chengdou-03__systerm'" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<route-guide ref="routeGuide" />
|
<route-guide ref="routeGuide" />
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
<password-box ref="passwordBox" :pop-class="'chengdou-03__systerm'" @checkOver="passWordCommit" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import RouteControl from './dialog/routeControl';
|
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from './dialog/routeDetail';
|
||||||
import RouteHandControl from './dialog/routeHandControl';
|
import RouteHandControl from './dialog/routeHandControl';
|
||||||
@ -24,7 +24,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import PasswordBox from './dialog/childDialog/passwordInputBox';
|
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl" />
|
<section-control ref="sectionControl" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<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 '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||||
|
@ -0,0 +1,282 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="confirm-control"
|
||||||
|
:class="popClass"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="360px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<div class="context">
|
||||||
|
<template v-for="(message, index) in messages">
|
||||||
|
<span :key="index">{{ message }}</span>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
import NoticeInfo from './noticeInfo';
|
||||||
|
import { commitOperate } from '../../utils/menuOperate';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ConfirmControl',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
popClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false,
|
||||||
|
operate: {},
|
||||||
|
messages: '',
|
||||||
|
operation: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
|
return this.$t('menu.accessSetting');
|
||||||
|
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
|
return this.$t('menu.menuSignal.signalOff'); // 信号关灯
|
||||||
|
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
return this.$t('menu.menuSignal.signalReopen');
|
||||||
|
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
return this.$t('menu.cancelTheWay');
|
||||||
|
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
|
return this.$t('menu.approachManualControl');
|
||||||
|
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
|
return this.$t('menu.accessToATSAutomaticControl');
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||||
|
return this.$t('menu.menuStationStand.setRunLevel');
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||||
|
return this.$t('menu.stopTime');
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||||
|
return this.$t('menu.setSwitchbackStrategy'); // 设置折返策略
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
domIdCancel() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
|
return OperationEvent.Signal.arrangementRoute.confirm.domId; // 进路设置
|
||||||
|
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
|
return OperationEvent.Signal.signalClose.confirm.domId; // 信号关灯
|
||||||
|
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
return OperationEvent.Signal.reopenSignal.confirm.domId; // 信号重开
|
||||||
|
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
return OperationEvent.Signal.cancelTrainRoute.confirm.domId; // 取消进路
|
||||||
|
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
|
return OperationEvent.Signal.humanControl.confirm.domId; // 进路交人工控
|
||||||
|
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
|
return OperationEvent.Signal.atsAutoControl.confirm.domId; // 进路交ATS自动控
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||||
|
return OperationEvent.StationStand.setRunLevel.confirm.domId; // 设置运行等级
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||||
|
return OperationEvent.StationStand.setStopTime.confirm.domId; // 设置停站时间
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||||
|
return OperationEvent.StationStand.setBackStrategy.confirm.domId; // 设置折返策略
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate) {
|
||||||
|
if (!this.dialogShow) {
|
||||||
|
this.loading = false;
|
||||||
|
this.operate = operate || {};
|
||||||
|
this.messages = operate.messages;
|
||||||
|
this.operation = operate.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
|
this.routeSetting(); // 进路设置
|
||||||
|
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
|
this.signalClose(); // 信号关灯
|
||||||
|
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
this.reopenSignal(); // 信号重开
|
||||||
|
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
this.cancelTrainRoute(); // 取消进路
|
||||||
|
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
|
this.humanControl(); // 进路交人工控
|
||||||
|
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
|
this.atsAutoControl(); // 进路交ATS自动控
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||||
|
this.setRunLevel(); // 设置运行等级
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||||
|
this.setStopTime(); // 停站时间
|
||||||
|
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||||
|
this.setBackStrategy(); // 设置折返策略
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 信号关灯
|
||||||
|
signalClose() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
|
};
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 设置折返策略
|
||||||
|
setBackStrategy() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||||
|
val: this.operate.val
|
||||||
|
};
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
|
||||||
|
// 进路设置
|
||||||
|
routeSetting() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
|
};
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 信号重开
|
||||||
|
reopenSignal() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 取消进路
|
||||||
|
cancelTrainRoute() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 进路交人工控
|
||||||
|
humanControl() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 进路交ATS自动控
|
||||||
|
atsAutoControl() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 设置运行等级
|
||||||
|
setRunLevel() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||||
|
val: this.operate.val
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 停站时间
|
||||||
|
setStopTime() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: this.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||||
|
val: this.operate.val
|
||||||
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
|
||||||
|
sendCommand(operate) {
|
||||||
|
this.loading = true;
|
||||||
|
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.confirm-control .context {
|
||||||
|
padding-bottom: 40px !important;
|
||||||
|
border: 1px solid lightgray;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
:class="systemName+' notice-info'"
|
class="notice-info"
|
||||||
|
:class="popClass"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="360px"
|
width="360px"
|
||||||
@ -21,24 +22,24 @@
|
|||||||
<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-row>
|
</el-row>
|
||||||
</span>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NoticeInfo',
|
name: 'NoticeInfo',
|
||||||
props:{
|
props: {
|
||||||
systemName:{
|
popClass: {
|
||||||
type:String,
|
type: String,
|
||||||
required:true
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
messages: ['命令下达失败']
|
messages: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -60,8 +61,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
doShow(messages) {
|
doShow(messages) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.messages = ['命令下达失败'];
|
this.messages = ['命令执行失败'];
|
||||||
if (messages && messages != 'null') {
|
|
||||||
|
if (messages && messages != 'null' && messages != 'undefined') {
|
||||||
this.messages.push(messages);
|
this.messages.push(messages);
|
||||||
}
|
}
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
@ -0,0 +1,199 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
:class="popClass"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="360px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
title="密码校验"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="22" :offset="1">
|
||||||
|
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
|
||||||
|
</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 { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PasswordBox',
|
||||||
|
props: {
|
||||||
|
popClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
correctPassword: '123', // 写死的初始密码
|
||||||
|
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.cancel.password.domId : '';
|
||||||
|
},
|
||||||
|
set: function () {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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() { // 确定
|
||||||
|
if (this.passwordCheck === this.correctPassword) {
|
||||||
|
this.$emit('checkOver', this.operate);
|
||||||
|
this.doClose();
|
||||||
|
this.inputClear();
|
||||||
|
} 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;
|
||||||
|
const password = this.passwordCheck;
|
||||||
|
if (password !== '') {
|
||||||
|
this.passwordCheck = password.substring(0, password.length - 1);
|
||||||
|
this.encryptionPassword = this.passwordCheck;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
operation: OperationEvent.Command.close.password.operation
|
||||||
|
};
|
||||||
|
this.$emit('checkCancel');
|
||||||
|
this.$store.dispatch('training/nextNew', 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 && this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.notice-info .context {
|
||||||
|
padding-bottom: 40px !important;
|
||||||
|
border: 1px solid lightgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.password-error {
|
||||||
|
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
336
src/jmapNew/theme/components/menus/dialog/routeControl.vue
Normal file
336
src/jmapNew/theme/components/menus/dialog/routeControl.vue
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
class="signal-control"
|
||||||
|
:class="popClass"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="300px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-row class="header">
|
||||||
|
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||||
|
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-input v-model="signalName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div v-if="passModel && popClass == 'ningbo-01__systerm'">
|
||||||
|
<div style="height: 12px" />
|
||||||
|
<el-radio v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
|
||||||
|
<el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
|
||||||
|
</div>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10" :offset="2">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.confirm') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="4">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<confirm-control ref="confirmControl" :pop-class="popClass" />
|
||||||
|
<password-box ref="password" :pop-class="popClass" @checkOver="passWordCommit" />
|
||||||
|
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import ConfirmControl from '../childDialog/confirmControl';
|
||||||
|
import NoticeInfo from '../childDialog/noticeInfo';
|
||||||
|
import PasswordBox from '../childDialog/passwordInputBox';
|
||||||
|
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'RouteControl',
|
||||||
|
components: {
|
||||||
|
ConfirmControl,
|
||||||
|
NoticeInfo,
|
||||||
|
PasswordBox
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
popClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false,
|
||||||
|
selected: null,
|
||||||
|
operation: null,
|
||||||
|
stationName: '',
|
||||||
|
signalName: '',
|
||||||
|
passRadio: '1',
|
||||||
|
passModel: false // 信号机控制显示判断
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdCancel() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
return '取消列车进路';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||||
|
return '总人解';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
|
return '信号关灯';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
return this.$t('menu.menuSignal.reopenTrainSignal'); // 重开信号
|
||||||
|
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
||||||
|
return this.$t('menu.menuSignal.setInterlockAutoRoute'); // 信号机控制
|
||||||
|
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
||||||
|
return this.$t('menu.menuSignal.cancelInterlockAutoRoute'); // 信号机控制 取消通过模式
|
||||||
|
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
||||||
|
return this.$t('menu.menuSignal.setInterlockAutoTrigger'); // 设置联锁自动触发
|
||||||
|
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
||||||
|
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger'); // 取消联锁自动触发
|
||||||
|
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
|
return '信号解封';
|
||||||
|
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
||||||
|
return '信号封锁';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
if (!this.dialogShow) {
|
||||||
|
this.passModel = false;
|
||||||
|
this.signalName = '';
|
||||||
|
this.stationName = '';
|
||||||
|
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||||
|
this.signalName = selected.name;
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
|
if (station) {
|
||||||
|
this.stationName = station.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.operation = operate.operation;
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
||||||
|
this.passRadio = '1';
|
||||||
|
this.passModel = true;
|
||||||
|
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
||||||
|
this.passRadio = '2';
|
||||||
|
this.passModel = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
this.mouseCancelState(this.selected);
|
||||||
|
},
|
||||||
|
changeRadio() {
|
||||||
|
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
|
this.cancelTrainRoute(); // 取消列车进路
|
||||||
|
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
|
||||||
|
this.humanTrainRoute(); // 总人解
|
||||||
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
|
this.signalClose(); // 信号关灯
|
||||||
|
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||||
|
this.reopenSignal(); // 信号重开
|
||||||
|
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
||||||
|
this.singalPassModel(); // 设置通过模式 设置联锁自动进路
|
||||||
|
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
||||||
|
this.singalCancelPassModel(); // 取消通过模式 取消联锁自动进路
|
||||||
|
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
||||||
|
this.setAutoTrigger(); // 设置联锁自动触发
|
||||||
|
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
||||||
|
this.cancelAutoTrigger(); // 取消联锁自动触发
|
||||||
|
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
||||||
|
this.lock(); // 信号封锁
|
||||||
|
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
|
this.unlock(); // 信号解封
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 取消列车进路
|
||||||
|
cancelTrainRoute() {
|
||||||
|
switch (this.popClass) {
|
||||||
|
case 'ningbo-01__systerm':
|
||||||
|
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
||||||
|
break;
|
||||||
|
case 'fuzhou-01__systerm':
|
||||||
|
this.sendCommandNext(menuOperate.Signal.cancelTrainRoute).then(operate => {
|
||||||
|
operate['messages'] = [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')];
|
||||||
|
this.$refs.confirmControl.doShow(operate);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'xian-01__systerm':
|
||||||
|
this.sendCommandNext(menuOperate.Signal.cancelTrainRoute).then(operate => {
|
||||||
|
operate['messages'] = `取消以信号机${this.selected.name}为始端的进路,该进路即将由自动信号模式转为人工模式!`;
|
||||||
|
this.$refs.confirmControl.doShow(operate);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 信号关灯
|
||||||
|
signalClose() {
|
||||||
|
switch (this.popClass) {
|
||||||
|
case 'ningbo-01__systerm':
|
||||||
|
this.sendCommandNext(menuOperate.Signal.signalClose).then(operate => {
|
||||||
|
this.$refs.confirmControl.doShow(operate);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'fuzhou-01__systerm':
|
||||||
|
this.sendCommandNext(menuOperate.Signal.signalClose).then(operate => {
|
||||||
|
operate['messages'] = [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName];
|
||||||
|
this.$refs.confirmControl.doShow(operate);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'foshan-01__systerm':
|
||||||
|
case 'beijing-01__systerm':
|
||||||
|
case 'chengdou-01__systerm':
|
||||||
|
case 'xian-01__systerm':
|
||||||
|
this.sendCommandNext(menuOperate.Signal.signalClose).then(operate => {
|
||||||
|
operate['messages'] = `信号关灯: ${this.signalName}`;
|
||||||
|
this.$refs.confirmControl.doShow(operate);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.sendCommand(menuOperate.Signal.signalClose);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 信号重开
|
||||||
|
reopenSignal() {
|
||||||
|
switch (this.popClass) {
|
||||||
|
case 'ningbo-01__systerm':
|
||||||
|
this.sendCommand(menuOperate.Signal.reopenSignal);
|
||||||
|
break;
|
||||||
|
case 'fuzhou-01__systerm':
|
||||||
|
this.sendCommandNext(menuOperate.Signal.reopenSignal).then(operate => {
|
||||||
|
operate['messages'] = [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName];
|
||||||
|
this.$refs.confirmControl.doShow(operate);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'xian-01__systerm':
|
||||||
|
this.sendCommandNext(menuOperate.Signal.reopenSignal).then(operate => {
|
||||||
|
operate['messages'] = `信号重开: ${this.selected.name}`;
|
||||||
|
this.$refs.confirmControl.doShow(operate);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.sendCommand(menuOperate.Signal.reopenSignal);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 信号封锁
|
||||||
|
lock() {
|
||||||
|
this.sendCommand(menuOperate.Signal.lock);
|
||||||
|
},
|
||||||
|
// 信号解封
|
||||||
|
unlock() {
|
||||||
|
this.sendCommandNext(menuOperate.Signal.unlock).then(operate => {
|
||||||
|
this.$refs.password.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
passWordCommit(data) { // 密码二次确认
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: OperationEvent.Signal.unlock.confirm.operation,
|
||||||
|
cmdType: menuOperate.Signal.unlock.cmdType
|
||||||
|
};
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
// 设置通过模式
|
||||||
|
singalPassModel() {
|
||||||
|
this.sendCommand(menuOperate.Signal.setAutoInterlock);
|
||||||
|
},
|
||||||
|
// 取消通过模式
|
||||||
|
singalCancelPassModel() {
|
||||||
|
this.sendCommand(menuOperate.Signal.cancelAutoInterlock);
|
||||||
|
},
|
||||||
|
// 设置联锁自动触发
|
||||||
|
setAutoTrigger() {
|
||||||
|
this.sendCommand(menuOperate.Signal.setAutoTrigger);
|
||||||
|
},
|
||||||
|
// 取消联锁自动触发
|
||||||
|
cancelAutoTrigger() {
|
||||||
|
this.sendCommand(menuOperate.Signal.cancelAutoTrigger);
|
||||||
|
},
|
||||||
|
// 总人解
|
||||||
|
humanTrainRoute() {
|
||||||
|
this.sendCommand(menuOperate.Signal.humanTrainRoute);
|
||||||
|
},
|
||||||
|
sendCommand(operate) {
|
||||||
|
this.loading = true;
|
||||||
|
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
sendCommandNext(operate) {
|
||||||
|
const that = this;
|
||||||
|
return new Promise(function(resolve, reject) {
|
||||||
|
that.loading = true;
|
||||||
|
commitOperate(operate, {}, 1).then(({valid})=>{
|
||||||
|
that.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
that.doClose();
|
||||||
|
that.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
resolve({...operate});
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
that.loading = false;
|
||||||
|
that.doClose();
|
||||||
|
that.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
class="beijing-01__systerm route-detail"
|
:class="systemName+' route-detail'"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="340px"
|
width="340px"
|
||||||
@ -62,14 +62,20 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteDetail',
|
name: 'RouteDetail',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
|
props:{
|
||||||
|
systemName:{
|
||||||
|
type:String,
|
||||||
|
required:true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -128,7 +134,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
// mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
const operate = {
|
const operate = {
|
@ -128,7 +128,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ import { mapGetters } from 'vuex';
|
|||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
// import { mouseCancelState } from '../utils/menuItemStatus';
|
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag :z-index="2000" :class="systemName+' stand-run-level'" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
<el-col :span="10"><span>集中站</span></el-col>
|
||||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||||
@ -68,15 +68,21 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from '../childDialog/confirmControl';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandRunLevel',
|
name: 'StandRunLevel',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl
|
ConfirmControl
|
||||||
},
|
},
|
||||||
|
props:{
|
||||||
|
systemName:{
|
||||||
|
type:String,
|
||||||
|
required:true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
class="beijing-01__systerm stand-stop-time"
|
:class="systemName+' stand-stop-time'"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="340px"
|
width="340px"
|
||||||
@ -68,16 +68,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../childDialog/noticeInfo';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandStopTime',
|
name: 'StandStopTime',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
|
props:{
|
||||||
|
systemName:{
|
||||||
|
type:String,
|
||||||
|
required:true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -151,7 +157,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
// mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
chooseControl(control) {
|
chooseControl(control) {
|
||||||
/** 自动时的默认时间*/
|
/** 自动时的默认时间*/
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
class="ningbo-01__systerm switch-control"
|
class="switch-control"
|
||||||
|
:class="popClass"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="300px"
|
width="300px"
|
||||||
@ -22,7 +23,7 @@
|
|||||||
<el-input v-model="switchName" size="small" disabled />
|
<el-input v-model="switchName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-if="isActive" style="margin-top: 10px;">
|
<el-row v-if="isActive && (popClass == 'ningbo-01__systerm' || popClass == 'fuzhou-01__systerm' || popClass == 'beijing-01__systerm')" style="margin-top: 10px;">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio v-model="activeRadio" label="1" :disabled="activeRadio == 2" style="display: block; text-align: center;">
|
<el-radio v-model="activeRadio" label="1" :disabled="activeRadio == 2" style="display: block; text-align: center;">
|
||||||
激活</el-radio>
|
激活</el-radio>
|
||||||
@ -32,7 +33,7 @@
|
|||||||
切除</el-radio>
|
切除</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-if="isLock" style="margin-top: 10px;">
|
<el-row v-if="isLock && (popClass == 'ningbo-01__systerm' || popClass == 'foshan-01__systerm' || popClass == 'beijing-01__systerm')" style="margin-top: 10px;">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio v-model="lockRadio" label="1" style="display: block; text-align: center;">
|
<el-radio v-model="lockRadio" label="1" style="display: block; text-align: center;">
|
||||||
道岔单锁</el-radio>
|
道岔单锁</el-radio>
|
||||||
@ -42,7 +43,7 @@
|
|||||||
道岔解单锁</el-radio>
|
道岔解单锁</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-if="isTurnBlock" style="margin-top: 10px;">
|
<el-row v-if="isTurnBlock && (popClass == 'ningbo-01__systerm' || popClass == 'foshan-01__systerm' || popClass == 'beijing-01__systerm')" style="margin-top: 10px;">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-radio v-model="turnRadio" label="1" :disabled="turnRadio == 2" style="display: block; text-align: center;">
|
<el-radio v-model="turnRadio" label="1" :disabled="turnRadio == 2" style="display: block; text-align: center;">
|
||||||
道岔定位</el-radio>
|
道岔定位</el-radio>
|
||||||
@ -60,21 +61,30 @@
|
|||||||
<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" :pop-class="popClass" />
|
||||||
|
<password-box ref="passwordBox" :pop-class="popClass" @checkOver="passWordCommit" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../childDialog/noticeInfo';
|
||||||
|
import PasswordBox from '../childDialog/passwordInputBox';
|
||||||
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchControl',
|
name: 'SwitchControl',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo,
|
||||||
|
PasswordBox
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
popClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -104,7 +114,13 @@ export default {
|
|||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||||
return '道岔控制';
|
return '道岔单锁';
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
return '道岔解锁';
|
||||||
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
|
return '区故解';
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
return '道岔解封';
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||||
return '道岔封锁';
|
return '道岔封锁';
|
||||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation || this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.locate.menu.operation || this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||||
@ -112,9 +128,11 @@ export default {
|
|||||||
} 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.turnout.menu.operation) {
|
||||||
|
return '道岔转动';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@ -170,23 +188,27 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
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.block.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||||
/** 道岔封锁*/
|
this.block(); // 道岔封锁
|
||||||
this.block();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||||
/** 道岔定位*/
|
this.locate(); // 道岔定位
|
||||||
this.locate();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||||
/** 道岔反位*/
|
this.reverse(); // 道岔反位
|
||||||
this.reverse();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||||
/** 区段切除*/
|
this.split(); // 区段切除
|
||||||
this.split();
|
|
||||||
} 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.turnout.menu.operation) {
|
||||||
|
this.turnout(this.operation); // 道岔转动
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
this.unlock(); // 道岔解锁
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
this.unblock(); // 道岔解封
|
||||||
|
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||||
|
this.fault(); // 区故解
|
||||||
|
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||||
|
this.turnoutForce(); // 道岔强扳
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
@ -195,12 +217,22 @@ export default {
|
|||||||
},
|
},
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
this.sendCommand(menuOperate.Switch.block);
|
switch (this.popClass) {
|
||||||
|
case 'chengdou-03__systerm':
|
||||||
|
this.openPasswordBox(this.operation);
|
||||||
|
break;
|
||||||
|
default: this.sendCommand(menuOperate.Switch.block);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 道岔定位
|
// 道岔定位
|
||||||
locate() {
|
locate() {
|
||||||
this.sendCommand(menuOperate.Switch.locate);
|
this.sendCommand(menuOperate.Switch.locate);
|
||||||
},
|
},
|
||||||
|
// 道岔转动
|
||||||
|
turnout() {
|
||||||
|
this.sendCommand(menuOperate.Switch.turnout);
|
||||||
|
},
|
||||||
// 道岔反位
|
// 道岔反位
|
||||||
reverse() {
|
reverse() {
|
||||||
this.sendCommand(menuOperate.Switch.reverse);
|
this.sendCommand(menuOperate.Switch.reverse);
|
||||||
@ -213,19 +245,62 @@ export default {
|
|||||||
active() {
|
active() {
|
||||||
this.sendCommand(menuOperate.Switch.active);
|
this.sendCommand(menuOperate.Switch.active);
|
||||||
},
|
},
|
||||||
cancel() {
|
// 道岔解锁
|
||||||
|
unlock() {
|
||||||
|
this.sendCommand(menuOperate.Switch.unlock);
|
||||||
|
},
|
||||||
|
// 道岔解封
|
||||||
|
unblock() {
|
||||||
|
switch (this.popClass) {
|
||||||
|
case 'chengdou-03__systerm':
|
||||||
|
this.openPasswordBox(this.operation);
|
||||||
|
break;
|
||||||
|
default: this.sendCommand(menuOperate.Switch.unblock);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 区故解
|
||||||
|
fault() {
|
||||||
|
switch (this.popClass) {
|
||||||
|
case 'chengdou-03__systerm':
|
||||||
|
this.openPasswordBox(this.operation);
|
||||||
|
break;
|
||||||
|
default: this.sendCommand(menuOperate.Switch.fault);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 道岔强扮
|
||||||
|
turnoutForce() {
|
||||||
|
this.sendCommand(menuOperate.Switch.turnoutForce);
|
||||||
|
},
|
||||||
|
|
||||||
|
// 打开密码输入框
|
||||||
|
openPasswordBox(operation) {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: operation
|
||||||
};
|
};
|
||||||
|
this.loading = true;
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.passwordBox.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
passWordCommit(data) { // 密码窗确认
|
||||||
|
if (data.operation === OperationEvent.Switch.fault.menu.operation) {
|
||||||
|
this.sendCommand(menuOperate.Switch.fault);
|
||||||
|
} else if (data.operation === OperationEvent.Switch.block.menu.operation) {
|
||||||
|
this.sendCommand(menuOperate.Switch.block);
|
||||||
|
} else if (data.operation === OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
this.sendCommand(menuOperate.Switch.unblock);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
sendCommand(operate) {
|
sendCommand(operate) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||||
@ -238,6 +313,19 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
@ -37,51 +37,58 @@ export const menuOperate = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Signal:{
|
Signal:{
|
||||||
arrangementRoute:{
|
lock: {
|
||||||
// 排列进路
|
operation: OperationEvent.Signal.lock.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||||
|
},
|
||||||
|
unlock: {
|
||||||
|
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||||
|
},
|
||||||
|
arrangementRoute:{ // 排列进路
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
},
|
},
|
||||||
cancelTrainRoute:{
|
cancelTrainRoute:{ // 取消进路
|
||||||
// 取消进路
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
},
|
},
|
||||||
humanTrainRoute:{
|
humanTrainRoute:{ // 总人解
|
||||||
// 总人解
|
|
||||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
||||||
cmdType:CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
cmdType:CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||||
},
|
},
|
||||||
reopenSignal:{
|
reopenSignal:{ // 信号重开
|
||||||
// 信号重开
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
},
|
},
|
||||||
signalClose:{
|
signalClose:{ // 信号关灯
|
||||||
// 信号关灯
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
},
|
},
|
||||||
humanControl:{
|
humanControl:{ // 进路交人工控
|
||||||
// 进路交人工控
|
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||||
},
|
},
|
||||||
atsAutoControl:{
|
atsAutoControl:{ // 进路交自动控
|
||||||
// 进路交自动控
|
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||||
},
|
},
|
||||||
setAutoInterlock:{
|
setAutoInterlock:{ // 设置通过模式
|
||||||
// 设置通过模式
|
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||||
},
|
},
|
||||||
cancelAutoInterlock:{
|
cancelAutoInterlock:{ // 取消通过模式
|
||||||
// 取消通过模式
|
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||||
},
|
},
|
||||||
|
setAutoTrigger: { // 设置联锁自动触发
|
||||||
|
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||||
|
},
|
||||||
|
cancelAutoTrigger: { // 取消联锁自动触发
|
||||||
|
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||||
|
},
|
||||||
detail:{
|
detail:{
|
||||||
// 查询进路状态
|
// 查询进路状态
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
operation: OperationEvent.Signal.detail.menu.operation
|
||||||
@ -98,6 +105,16 @@ export const menuOperate = {
|
|||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||||
},
|
},
|
||||||
|
block: {
|
||||||
|
// 道岔封锁
|
||||||
|
operation: OperationEvent.Switch.block.menu.operation,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||||
|
},
|
||||||
|
unblock:{
|
||||||
|
// 道岔解封
|
||||||
|
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||||
|
},
|
||||||
turnoutForce:{
|
turnoutForce:{
|
||||||
// 道岔强扳
|
// 道岔强扳
|
||||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||||
@ -131,8 +148,17 @@ export const menuOperate = {
|
|||||||
// 确认计轴有效
|
// 确认计轴有效
|
||||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||||
|
},
|
||||||
|
turnout: {
|
||||||
|
// 道岔转动
|
||||||
|
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||||
|
},
|
||||||
|
fault:{
|
||||||
|
// 区段故障解锁
|
||||||
|
operation: OperationEvent.Switch.fault.menu.operation,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
StationStand:{
|
StationStand:{
|
||||||
setDetainTrain:{
|
setDetainTrain:{
|
||||||
|
@ -1,269 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="foshan-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-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div v-if="passModel" style="margin: 12px 0;">
|
|
||||||
<el-radio v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
|
|
||||||
<el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: '',
|
|
||||||
passRadio: '1',
|
|
||||||
passModel: false // 信号机控制显示判断
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return '取消列车进路';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return '重开信号';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
return '信号机控制';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
return '信号机控制';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
|
||||||
return '设置联锁自动触发';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
|
||||||
return '取消联锁自动触发';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.passModel = false;
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
this.passRadio = '1';
|
|
||||||
this.passModel = true;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
this.passRadio = '2';
|
|
||||||
this.passModel = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
changeRadio() {
|
|
||||||
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消列车进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
this.singalPassModel(); // 设置通过模式
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
this.singalCancelPassModel(); // 取消通过模式
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
|
||||||
this.setAutoTrigger(); /** 设置联锁自动触发*/
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
|
||||||
this.cancelAutoTrigger(); /** 取消联锁自动触发*/
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
|
||||||
messages: [`信号关灯: ${this.signalName}`],
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 设置通过模式
|
|
||||||
singalPassModel() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 取消通过模式
|
|
||||||
singalCancelPassModel() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
sendCommand(operate) {
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="foshan-01__systerm route-detail"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="10"><span>车站</span></el-col>
|
|
||||||
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div class="table">
|
|
||||||
<span>进路列表</span>
|
|
||||||
<el-table
|
|
||||||
ref="tempTable"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
:height="140"
|
|
||||||
>
|
|
||||||
<el-table-column label="进路">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ scope.row.name }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="status" label="控制状态" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<!-- <span v-if="scope.row.controlType == '01'">自动(不进行冲突检测)</span>
|
|
||||||
<span v-else>人工</span> -->
|
|
||||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteDetail',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
tempData: [],
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'signalList'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '查询进路状态';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected, tempData) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.tempData = tempData || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.detail.menu.operation,
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,341 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag :z-index="2000" class="foshan-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
|
||||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-input v-model="standName" size="small" disabled />
|
|
||||||
</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 prop="level" label="运行等级">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select :id="chooseLevelId" v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)">
|
|
||||||
<el-option
|
|
||||||
v-for="item in levelList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="time" label="区间运行时间">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
:id="domIdChoose"
|
|
||||||
v-model="scope.row.time"
|
|
||||||
size="mini"
|
|
||||||
:disabled="scope.row.level == 0"
|
|
||||||
@change="timeSelectChange"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in timeList[scope.row.level]"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="check" label="一直有效">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<!-- <el-row class="button-group">
|
|
||||||
<span v-if="isSelect && tempData.length">提示: 未选中要设置运行等级的下一站台</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" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StandRunLevel',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
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: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
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() {
|
|
||||||
const list = {
|
|
||||||
'0': [{ value: 0, label: '0' }],
|
|
||||||
'1': [], // 120 - 110
|
|
||||||
'2': [], // 100 - 90
|
|
||||||
'3': [], // 80 - 70
|
|
||||||
'4': [] // 60 - 50
|
|
||||||
};
|
|
||||||
for (let i = 110; i <= 120; i++) {
|
|
||||||
list['1'].push({ value: i, label: `${i}` });
|
|
||||||
}
|
|
||||||
for (let i = 90; i <= 100; i++) {
|
|
||||||
list['2'].push({ value: i, label: `${i}` });
|
|
||||||
}
|
|
||||||
for (let i = 70; i <= 80; i++) {
|
|
||||||
list['3'].push({ value: i, label: `${i}` });
|
|
||||||
}
|
|
||||||
for (let i = 50; i <= 60; i++) {
|
|
||||||
list['4'].push({ value: i, label: `${i}` });
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
// 深度数据状态
|
|
||||||
tempData: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
this.checkTableDataSelction(val);
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getLevelByTime(time) {
|
|
||||||
const times = Object.keys(this.timeList).findIndex(key => {
|
|
||||||
return this.timeList[key].findIndex(obj => {
|
|
||||||
return obj.value == time;
|
|
||||||
}) >= 0;
|
|
||||||
}).toString();
|
|
||||||
return times == -1 ? '0' : times;
|
|
||||||
},
|
|
||||||
loadInitData(selected) {
|
|
||||||
this.tempData = [];
|
|
||||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
|
||||||
if (selected.direction == '01') { // 下行
|
|
||||||
// 下行时,此站不是最后一站
|
|
||||||
if (index != 0) {
|
|
||||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(selected.runLevelTime), time: selected.runLevelTime ? selected.runLevelTime : 0, check: !!selected.runLevelTimeForever });
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 上行时,此站不是最后一站
|
|
||||||
if (index != this.stationList.length) {
|
|
||||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(selected.runLevelTime), time: selected.runLevelTime ? selected.runLevelTime : 0, check: !!selected.runLevelTimeForever });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
checkTableDataSelction(data) { // 深度监测
|
|
||||||
const selection = [];
|
|
||||||
if (data && data.length > 0) {
|
|
||||||
data.forEach(row => {
|
|
||||||
if (row.check && !row.disabled) {
|
|
||||||
selection.push(row);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
|
||||||
this.selection = selection;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
timeSelectChange(time) {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
|
||||||
val: this.time
|
|
||||||
};
|
|
||||||
|
|
||||||
this.time = time;
|
|
||||||
this.isSelect = false;
|
|
||||||
this.isConfirm = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
levelSelectChange(row) {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
|
|
||||||
val: row.level
|
|
||||||
};
|
|
||||||
|
|
||||||
this.time = row.time = this.timeList[row.level][0].value;
|
|
||||||
this.isSelect = false;
|
|
||||||
this.isConfirm = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
checkChange(check) {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
|
||||||
val: check
|
|
||||||
};
|
|
||||||
this.isConfirm = true;
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.isConfirm) {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
|
||||||
param: {
|
|
||||||
runLevelTime: Number(this.time),
|
|
||||||
runLevelTimeForever: !!this.tempData[0].check
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,241 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag :title="title" class="foshan-01__systerm stand-stop-time" :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-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="standName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;">
|
|
||||||
<span class="base-label" style="left: -9px;">模式</span>
|
|
||||||
<div style=" position: relative; top:-10px;">
|
|
||||||
<el-radio-group v-model="control" style="width: 40%;float: left;" @change="chooseControl">
|
|
||||||
<div style="margin-bottom: 10px;">
|
|
||||||
<el-radio :id="control === '01'? '': domIdChoose1" label="01">自动</el-radio>
|
|
||||||
</div>
|
|
||||||
<el-radio :id="control === '02'? '': domIdChoose1" label="02">全人工</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
<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" :disabled="disabledTime" @change="chooseEffective">
|
|
||||||
<el-radio :id="effective == '0'? '': domIdChoose2" label="0" name="effective">一次有效</el-radio>
|
|
||||||
<el-radio :id="effective == '1'? '': domIdChoose2" label="1" name="effective">一直有效</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StandStopTime',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
time: 0,
|
|
||||||
control: '01',
|
|
||||||
direction: '01',
|
|
||||||
effective: '0',
|
|
||||||
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) {
|
|
||||||
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.control = Number(selected.parkingTime) == -1 ? '01' : '02';
|
|
||||||
this.effective = selected.parkingAlwaysValid ? '1' : '0';
|
|
||||||
this.direction = selected.direction;
|
|
||||||
|
|
||||||
this.time = Number(selected.parkingTime) == -1 ? 15 : Number(selected.parkingTime);
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
chooseControl(control) {
|
|
||||||
/** 自动时的默认时间*/
|
|
||||||
if (control == '01') {
|
|
||||||
this.time = 15;
|
|
||||||
this.effective = '1';
|
|
||||||
}
|
|
||||||
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
|
||||||
val: this.control
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
chooseEffective() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
|
||||||
val: this.effective
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
inputTime() {
|
|
||||||
const operate = {
|
|
||||||
repeat: true,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
|
||||||
val: this.time
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
send: true,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
|
||||||
param: {
|
|
||||||
parkingTime: this.control == '01' ? -1 : this.time,
|
|
||||||
parkingAlwaysValid: this.effective == '1'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => { this.doClose(); });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,237 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="foshan-01__systerm switch-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>车站名称</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="switchName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="isLock" style="margin-top: 10px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="lockRadio" label="1" style="display: block; text-align: center;">
|
|
||||||
道岔单锁</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="lockRadio" label="2" disabled style="display: block; text-align: center;">
|
|
||||||
道岔解单锁</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="isTurnBlock" style="margin-top: 10px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="turnRadio" label="1" :disabled="turnRadio == 2" style="display: block; text-align: center;">
|
|
||||||
道岔定位</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="turnRadio" label="2" :disabled="turnRadio == 1" style="display: block; text-align: center;">
|
|
||||||
道岔反位</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SwitchControl',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: '',
|
|
||||||
stationName: '',
|
|
||||||
switchName: '',
|
|
||||||
isLock: false,
|
|
||||||
isTurnBlock: false,
|
|
||||||
turnRadio: '1',
|
|
||||||
lockRadio: '1',
|
|
||||||
activeRadio: '1'
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
return '道岔控制';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
return '道岔封锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation || this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
return '道岔控制';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
|
||||||
return '道岔强扳';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
return '区段控制';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
return '区段控制';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.switchName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
this.switchName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.isLock = false;
|
|
||||||
this.isTurnBlock = false;
|
|
||||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
this.isTurnBlock = true;
|
|
||||||
this.turnRadio = '1';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
this.isTurnBlock = true;
|
|
||||||
this.turnRadio = '2';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
this.isLock = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
/** 道岔单锁*/
|
|
||||||
this.lock();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
/** 道岔封锁*/
|
|
||||||
this.block();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
/** 道岔定位*/
|
|
||||||
this.locate();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
/** 道岔反位*/
|
|
||||||
this.reverse();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
|
||||||
block() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔定位
|
|
||||||
locate() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.locate.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔反位
|
|
||||||
reverse() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
sendCommand(operate) {
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -4,9 +4,9 @@
|
|||||||
<route-selection ref="routeSelection" />
|
<route-selection ref="routeSelection" />
|
||||||
<route-lock ref="routeLock" />
|
<route-lock ref="routeLock" />
|
||||||
<route-un-lock ref="routeUnLock" />
|
<route-un-lock ref="routeUnLock" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" :pop-class="systemName" />
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" :system-name="systemName" />
|
||||||
<router-command ref="routerCommand" />
|
<router-command ref="routerCommand" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
@ -14,13 +14,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import RouteControl from './dialog/routeControl';
|
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteLock from './dialog/routeLock';
|
import RouteLock from './dialog/routeLock';
|
||||||
import RouteUnLock from './dialog/routeUnLock';
|
import RouteUnLock from './dialog/routeUnLock';
|
||||||
import RouteHandControl from './dialog/routeHandControl';
|
import RouteHandControl from './dialog/routeHandControl';
|
||||||
import RouterCommand from './dialog/routerCommand';
|
import RouterCommand from './dialog/routerCommand';
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
@ -54,6 +54,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
|
systemName:'foshan-01__systerm',
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<stand-control ref="standControl" system-name="foshan-01__systerm" />
|
<stand-control ref="standControl" :system-name="systemName" />
|
||||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="foshan-01__systerm" />
|
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" />
|
||||||
<stand-detail ref="standDetail" />
|
<stand-detail ref="standDetail" />
|
||||||
<stand-run-level ref="standRunLevel" />
|
<stand-run-level ref="standRunLevel" :system-name="systemName" />
|
||||||
<stand-stop-time ref="standStopTime" />
|
<stand-stop-time ref="standStopTime" :system-name="systemName" />
|
||||||
<stand-back-strategy ref="standBackStrategy" />
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -18,12 +18,12 @@ import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
|||||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
||||||
import StandBackStrategy from './dialog/standBackStrategy';
|
import StandBackStrategy from './dialog/standBackStrategy';
|
||||||
import StandDetail from './dialog/standDetail';
|
import StandDetail from './dialog/standDetail';
|
||||||
import StandRunLevel from './dialog/standRunLevel';
|
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
|
||||||
import StandStopTime from './dialog/standStopTime';
|
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
@ -53,6 +53,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
|
systemName:'foshan-01__systerm',
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" pop-class="foshan-01__systerm" />
|
||||||
<switch-un-lock ref="switchUnLock" />
|
<switch-un-lock ref="switchUnLock" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import SwitchUnLock from './dialog/switchUnLock';
|
import SwitchUnLock from './dialog/switchUnLock';
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
@ -1,254 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm signal-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.confirm') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.cancelTheTrainApproach');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.signalOff');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.reopenTrainSignal');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.setInterlockAutoRoute');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.cancelInterlockAutoRoute');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.setInterlockAutoTrigger');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger');
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.selected = selected;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消列车进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
/** 设置联锁自动进路*/
|
|
||||||
this.setAutoInterlock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
/** 取消联锁自动进路*/
|
|
||||||
this.cancelAutoInterlock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
|
||||||
/** 设置联锁自动触发*/
|
|
||||||
this.setAutoTrigger();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
|
||||||
/** 取消联锁自动触发*/
|
|
||||||
this.cancelAutoTrigger();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 1).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
if (this.$store.state.training.prdType === '02') {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
operate['messages'] = [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')];
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
console.log(error);
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
operate['messages'] = [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName];
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 1).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
operate['messages'] = [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName];
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置联锁自动进路
|
|
||||||
setAutoInterlock() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.setAutoInterlock, {}, 2).then(({valid, operate}) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消联锁自动进路
|
|
||||||
cancelAutoInterlock() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {}, 2).then(({valid, operate}) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.setAutoTrigger, {}, 2).then(({valid, operate}) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
// 取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.cancelAutoTrigger, {}, 2).then(({valid, operate}) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,206 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm switch-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.switch') }}</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="switchName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="activeShow" style="margin-top: 10px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
|
||||||
{{ $t('menu.activation') }}</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;">
|
|
||||||
{{ $t('menu.resection') }}</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SwitchControl',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
operation: '',
|
|
||||||
stationName: '',
|
|
||||||
switchName: '',
|
|
||||||
radio: 1,
|
|
||||||
activeShow: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
return this.$t('menu.menuSwitch.switchLock');
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
return this.$t('menu.menuSwitch.switchBlockade');
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
|
||||||
return this.$t('menu.menuSwitch.switchTurnout');
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
|
||||||
return this.$t('menu.menuSwitch.switchForcedPull');
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
return this.$t('menu.menuSwitch.sectionResection');
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
return this.$t('menu.menuSwitch.sectionActive');
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.switchName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
this.switchName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.operation = operate.operation;
|
|
||||||
if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
this.activeShow = true;
|
|
||||||
this.radio = '2';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
this.activeShow = true;
|
|
||||||
this.radio = '1';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
/** 道岔单锁*/
|
|
||||||
this.lock();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
/** 道岔封锁*/
|
|
||||||
this.block();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
|
||||||
/** 道岔转动*/
|
|
||||||
this.turnout(this.operation);
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
|
||||||
/** 道岔强扳*/
|
|
||||||
this.turnoutForce();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
/** 区段激活*/
|
|
||||||
this.split();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
/** 区段激活*/
|
|
||||||
this.active();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
this.sendCommand(menuOperate.Switch.lock);
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
|
||||||
block() {
|
|
||||||
this.sendCommand(menuOperate.Switch.block);
|
|
||||||
},
|
|
||||||
// 道岔转动
|
|
||||||
turnout() {
|
|
||||||
this.sendCommand(menuOperate.Switch.turnout);
|
|
||||||
},
|
|
||||||
// 道岔强扮
|
|
||||||
turnoutForce() {
|
|
||||||
this.sendCommand(menuOperate.Switch.turnoutForce);
|
|
||||||
},
|
|
||||||
// 区段切除
|
|
||||||
split() {
|
|
||||||
this.sendCommand(menuOperate.Switch.split);
|
|
||||||
},
|
|
||||||
// 区段激活
|
|
||||||
active() {
|
|
||||||
this.sendCommand(menuOperate.Switch.active);
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
sendCommand(operate) { // 发送指令
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -3,7 +3,7 @@
|
|||||||
<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-lock ref="routeLock" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" :pop-class="'fuzhou-01__systerm'" />
|
||||||
<route-cmd-control ref="routeCmdControl" />
|
<route-cmd-control ref="routeCmdControl" />
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import RouteControl from './dialog/routeControl';
|
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteLock from './dialog/routeLock';
|
import RouteLock from './dialog/routeLock';
|
||||||
import RouteCmdControl from './dialog/routeCmdControl';
|
import RouteCmdControl from './dialog/routeCmdControl';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" pop-class="fuzhou-01__systerm" />
|
||||||
<switch-cmd-control ref="switchCmdControl" />
|
<switch-cmd-control ref="switchCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import SwitchCmdControl from './dialog/switchCmdControl';
|
import SwitchCmdControl from './dialog/switchCmdControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
|
@ -1,339 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="haerbin-01__systerm signal-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.confirm') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.cancelTheTrainApproach');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.signalOff');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.reopenTrainSignal');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.setInterlockAutoRoute');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.cancelInterlockAutoRoute');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.setInterlockAutoTrigger');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger');
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.selected = selected;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消列车进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
/** 设置联锁自动进路*/
|
|
||||||
this.setAutoInterlock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
/** 取消联锁自动进路*/
|
|
||||||
this.cancelAutoInterlock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
|
||||||
/** 设置联锁自动触发*/
|
|
||||||
this.setAutoTrigger();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
|
||||||
/** 取消联锁自动触发*/
|
|
||||||
this.cancelAutoTrigger();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
if (this.$store.state.training.prdType == '01') {
|
|
||||||
/** 现地工作站*/
|
|
||||||
this.cancelTrainRouteByLocal();
|
|
||||||
} else if (this.$store.state.training.prdType == '02') {
|
|
||||||
/** 行调工作站*/
|
|
||||||
this.cancelTrainRouteByCentral();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 现地工作站取消进路
|
|
||||||
cancelTrainRouteByLocal() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 行调工作站取消进路
|
|
||||||
cancelTrainRouteByCentral() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
|
||||||
messages: [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')]
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.confirmControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
const operate = {
|
|
||||||
over:true,
|
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
|
||||||
// messages: [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName]
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
const operate = {
|
|
||||||
over:true,
|
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
|
||||||
// messages: [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName]
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置联锁自动进路
|
|
||||||
setAutoInterlock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消联锁自动进路
|
|
||||||
cancelAutoInterlock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
|
||||||
};
|
|
||||||
|
|
||||||
this.doClose();
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,219 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag class="haerbin-01__systerm switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>车站名称</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="switchName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SwitchControl',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
mixins: [
|
|
||||||
CancelMouseState
|
|
||||||
],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: '',
|
|
||||||
stationName: '',
|
|
||||||
switchName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
return '单操到定位';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
return '单操到反位';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
return '道岔单锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
return '道岔解锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
return '道岔封锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
return '区故解';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
return '道岔解封';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.switchName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
this.switchName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
this.locate(); // 单操到正位
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
this.reverse(); // 单操到反位
|
|
||||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
this.lock(); // 道岔单锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
this.unlock(); // 道岔解锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
this.block(); // 道岔封锁
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
this.unblock(); // 道岔解封
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
this.fault();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔解锁
|
|
||||||
unlock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
|
||||||
block() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 道岔解封
|
|
||||||
unblock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 单操到正位
|
|
||||||
locate() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.locate.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 单操到反位
|
|
||||||
reverse() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
// 区故解
|
|
||||||
fault() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Switch.fault.menu.operation,
|
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
|
||||||
};
|
|
||||||
this.sendCommand(operate);
|
|
||||||
},
|
|
||||||
sendCommand(operate) { // 发送指令
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -3,7 +3,7 @@
|
|||||||
<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-lock ref="routeLock" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" :pop-class="'haerbin-01__systerm'" />
|
||||||
<route-cmd-control ref="routeCmdControl" />
|
<route-cmd-control ref="routeCmdControl" />
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import RouteControl from './dialog/routeControl';
|
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteLock from './dialog/routeLock';
|
import RouteLock from './dialog/routeLock';
|
||||||
import RouteCmdControl from './dialog/routeCmdControl';
|
import RouteCmdControl from './dialog/routeCmdControl';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" :pop-class="'haerbin-01__systerm'" />
|
||||||
<switch-cmd-control ref="switchCmdControl" />
|
<switch-cmd-control ref="switchCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import SwitchCmdControl from './dialog/switchCmdControl';
|
import SwitchCmdControl from './dialog/switchCmdControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
@ -1,209 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-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-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div v-if="passModel">
|
|
||||||
<div style="height: 12px" />
|
|
||||||
<el-radio v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
|
|
||||||
<el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: '',
|
|
||||||
passRadio: '1',
|
|
||||||
passModel: false // 信号机控制显示判断
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return '取消列车进路';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return '重开信号';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
return '信号机控制';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
return '信号机控制';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.passModel = false;
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
this.passRadio = '1';
|
|
||||||
this.passModel = true;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
this.passRadio = '2';
|
|
||||||
this.passModel = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
changeRadio() {
|
|
||||||
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消列车进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
this.singalPassModel(); // 设置通过模式
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
this.singalCancelPassModel(); // 取消通过模式
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
|
||||||
},
|
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then((data)=>{
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.confirmControl.doShow(data.operate);
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
this.sendCommand(menuOperate.Signal.reopenSignal);
|
|
||||||
},
|
|
||||||
// 设置通过模式
|
|
||||||
singalPassModel() {
|
|
||||||
this.sendCommand(menuOperate.Signal.setAutoInterlock);
|
|
||||||
},
|
|
||||||
// 取消通过模式
|
|
||||||
singalCancelPassModel() {
|
|
||||||
this.sendCommand(menuOperate.Signal.cancelAutoInterlock);
|
|
||||||
},
|
|
||||||
sendCommand(operate) {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,166 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-01__systerm route-detail"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="10"><span>车站</span></el-col>
|
|
||||||
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div class="table">
|
|
||||||
<span>进路列表</span>
|
|
||||||
<el-table
|
|
||||||
ref="tempTable"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
:height="140"
|
|
||||||
>
|
|
||||||
<el-table-column label="进路">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ scope.row.name }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="status" label="控制状态" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteDetail',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
tempData: [],
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'signalList'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '查询进路状态';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected, tempData) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.tempData = tempData || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.detail.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,145 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-01__systerm route-lock"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
|
||||||
<el-col :span="10" :offset="2"><span>信号设备</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteLock',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
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;
|
|
||||||
this.operate = operate.operation;
|
|
||||||
// 入股不是断点激活,而是第一次显示需要初始化
|
|
||||||
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.dialogShow = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: this.operate,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,228 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag :title="title" class="ningbo-01__systerm stand-stop-time" :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-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="standName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;">
|
|
||||||
<span class="base-label" style="left: -9px;">模式</span>
|
|
||||||
<div style=" position: relative; top:-10px;">
|
|
||||||
<el-radio-group v-model="control" style="width: 40%;float: left;" @change="chooseControl">
|
|
||||||
<div style="margin-bottom: 10px;">
|
|
||||||
<el-radio :id="control === '01'? '': domIdChoose1" label="01">自动</el-radio>
|
|
||||||
</div>
|
|
||||||
<el-radio :id="control === '02'? '': domIdChoose1" label="02">全人工</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
<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 :id="domIdChoose2" v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
|
||||||
<el-radio :label="false" name="effective">一次有效</el-radio>
|
|
||||||
<el-radio :label="true" name="effective">一直有效</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StandStopTime',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
time: 30,
|
|
||||||
control: '01',
|
|
||||||
direction: '01',
|
|
||||||
effective: true,
|
|
||||||
selected: null,
|
|
||||||
standName: '',
|
|
||||||
stationName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdChoose1() {
|
|
||||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
|
|
||||||
},
|
|
||||||
domIdChoose2() {
|
|
||||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
|
||||||
},
|
|
||||||
domIdInput() {
|
|
||||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
|
|
||||||
},
|
|
||||||
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) {
|
|
||||||
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.control = selected.parkingTime == 0 ? '01' : '02';
|
|
||||||
this.time = selected.parkingTime ? Number(selected.parkingTime) : 30;
|
|
||||||
this.effective = selected.parkingAlwaysValid == '1';
|
|
||||||
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');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
chooseControl(control) {
|
|
||||||
/** 自动时的默认时间*/
|
|
||||||
if (control == '01') {
|
|
||||||
this.time = 30;
|
|
||||||
this.effective = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
|
||||||
val: `${control}`
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
chooseEffective(effective) {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
|
||||||
val: `${effective}`
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
inputTime(time) {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
|
||||||
val: `${time}`
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.time, parkingAlwaysValid: this.effective}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => { this.doClose(); });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -2,25 +2,23 @@
|
|||||||
<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-un-lock ref="routeUnLock" />
|
<route-un-lock ref="routeUnLock" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" :pop-class="systemName" />
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" :system-name="systemName" />
|
||||||
<router-command ref="routerCommand" />
|
<router-command ref="routerCommand" />
|
||||||
<notice-info ref="noticeInfo" />\
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import RouteControl from './dialog/routeControl';
|
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteLock from './dialog/routeLock';
|
|
||||||
import RouteUnLock from './dialog/routeUnLock';
|
import RouteUnLock from './dialog/routeUnLock';
|
||||||
import RouteHandControl from './dialog/routeHandControl';
|
import RouteHandControl from './dialog/routeHandControl';
|
||||||
import RouterCommand from './dialog/routerCommand';
|
import RouterCommand from './dialog/routerCommand';
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
@ -34,7 +32,6 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
RouteControl,
|
RouteControl,
|
||||||
RouteSelection,
|
RouteSelection,
|
||||||
RouteLock,
|
|
||||||
RouteUnLock,
|
RouteUnLock,
|
||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
@ -52,6 +49,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
|
systemName:'ningbo-01__systerm',
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
{
|
{
|
||||||
@ -258,7 +256,7 @@ export default {
|
|||||||
lock() {
|
lock() {
|
||||||
commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.routeLock.doShow(operate, this.selected);
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<stand-control ref="standControl" system-name="ningbo-01__systerm" />
|
<stand-control ref="standControl" :system-name="systemName" />
|
||||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="ningbo-01__systerm" />
|
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" />
|
||||||
<stand-detail ref="standDetail" />
|
<stand-detail ref="standDetail" />
|
||||||
<stand-run-level ref="standRunLevel" />
|
<stand-run-level ref="standRunLevel" :system-name="systemName" />
|
||||||
<stand-stop-time ref="standStopTime" />
|
<stand-stop-time ref="standStopTime" :system-name="systemName" />
|
||||||
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
@ -16,8 +16,8 @@ import PopMenu from '@/components/PopMenu';
|
|||||||
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
||||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
||||||
import StandDetail from './dialog/standDetail';
|
import StandDetail from './dialog/standDetail';
|
||||||
import StandRunLevel from './dialog/standRunLevel';
|
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
|
||||||
import StandStopTime from './dialog/standStopTime';
|
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
|
||||||
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
|
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
@ -49,6 +49,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menu: [],
|
menu: [],
|
||||||
|
systemName:'ningbo-01__systerm',
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" :pop-class="'ningbo-01__systerm'" />
|
||||||
<switch-un-lock ref="switchUnLock" />
|
<switch-un-lock ref="switchUnLock" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import SwitchUnLock from './dialog/switchUnLock';
|
import SwitchUnLock from './dialog/switchUnLock';
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||||
import AlxeEffective from './dialog/alxeEffective';
|
import AlxeEffective from './dialog/alxeEffective';
|
||||||
|
@ -1,293 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="xian-01__systerm signal-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.signal') }}</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.confirm') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.cancel') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return '取消进路';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.reopenTrainSignal');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.setInterlockAutoRoute');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.cancelInterlockAutoRoute');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.setInterlockAutoTrigger');
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
|
||||||
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger');
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.selected = selected;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
/** 设置联锁自动进路*/
|
|
||||||
this.setAutoInterlock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
/** 取消联锁自动进路*/
|
|
||||||
this.cancelAutoInterlock();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoTrigger.menu.operation) {
|
|
||||||
/** 设置联锁自动触发*/
|
|
||||||
this.setAutoTrigger();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoTrigger.menu.operation) {
|
|
||||||
/** 取消联锁自动触发*/
|
|
||||||
this.cancelAutoTrigger();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 1).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
operate['messages'] = `取消以信号机${this.selected.name}为始端的进路,该进路即将由自动信号模式转为人工模式!`;
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
console.log(error);
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
operate['messages'] = `信号关灯: ${this.selected.name}`;
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 1).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
operate['messages'] = `信号重开: ${this.selected.name}`;
|
|
||||||
this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置联锁自动进路
|
|
||||||
setAutoInterlock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
|
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消联锁自动进路
|
|
||||||
cancelAutoInterlock() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置联锁自动触发
|
|
||||||
setAutoTrigger() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消联锁自动触发
|
|
||||||
cancelAutoTrigger() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
|
||||||
};
|
|
||||||
|
|
||||||
this.doClose();
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,169 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag class="xian-01__systerm switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>车站名称</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="switchName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SwitchControl',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
operation: '',
|
|
||||||
stationName: '',
|
|
||||||
switchName: '',
|
|
||||||
activeShow: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
return '道岔单锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
return '道岔封锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
|
||||||
return '道岔转动';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
return '区段切除';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
return '区段激活';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.switchName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
this.switchName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
/** 道岔单锁*/
|
|
||||||
this.lock();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
/** 道岔封锁*/
|
|
||||||
this.block();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
|
||||||
/** 道岔转动*/
|
|
||||||
this.turnout(this.operation);
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
/** 区段激活*/
|
|
||||||
this.split();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
/** 区段激活*/
|
|
||||||
this.active();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
this.sendCommand(menuOperate.Switch.lock);
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
|
||||||
block() {
|
|
||||||
this.sendCommand(menuOperate.Switch.block);
|
|
||||||
},
|
|
||||||
// 道岔转动
|
|
||||||
turnout() {
|
|
||||||
this.sendCommand(menuOperate.Switch.turnout);
|
|
||||||
},
|
|
||||||
// 区段切除
|
|
||||||
split() {
|
|
||||||
this.sendCommand(menuOperate.Switch.split);
|
|
||||||
},
|
|
||||||
// 区段激活
|
|
||||||
active() {
|
|
||||||
this.sendCommand(menuOperate.Switch.active);
|
|
||||||
},
|
|
||||||
sendCommand(operate) { // 发送指令
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -3,7 +3,7 @@
|
|||||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
|
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
|
||||||
<route-selection ref="routeSelection" />
|
<route-selection ref="routeSelection" />
|
||||||
<route-lock ref="routeLock" />
|
<route-lock ref="routeLock" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" :pop-class="'xian-01__systerm'" />
|
||||||
<route-cmd-control ref="routeCmdControl" />
|
<route-cmd-control ref="routeCmdControl" />
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import RouteControl from './dialog/routeControl';
|
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteLock from './dialog/routeLock';
|
import RouteLock from './dialog/routeLock';
|
||||||
import RouteCmdControl from './dialog/routeCmdControl';
|
import RouteCmdControl from './dialog/routeCmdControl';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
|
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" :pop-class="'xian-01__systerm'" />
|
||||||
<switch-cmd-control ref="switchCmdControl" />
|
<switch-cmd-control ref="switchCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import SwitchCmdControl from './dialog/switchCmdControl';
|
import SwitchCmdControl from './dialog/switchCmdControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
@ -1,209 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="xian-02__system 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-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div v-if="passModel">
|
|
||||||
<div style="height: 12px" />
|
|
||||||
<el-radio v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
|
|
||||||
<el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: '',
|
|
||||||
passRadio: '1',
|
|
||||||
passModel: false // 信号机控制显示判断
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
return '取消列车进路';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
return '重开信号';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
return '信号机控制';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
return '信号机控制';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.passModel = false;
|
|
||||||
this.signalName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
|
||||||
this.signalName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
this.passRadio = '1';
|
|
||||||
this.passModel = true;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
this.passRadio = '2';
|
|
||||||
this.passModel = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
changeRadio() {
|
|
||||||
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
|
||||||
/** 取消列车进路*/
|
|
||||||
this.cancelTrainRoute();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
|
||||||
this.signalClose();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
|
|
||||||
/** 信号重开*/
|
|
||||||
this.reopenSignal();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.setAutoInterlock.menu.operation) {
|
|
||||||
this.singalPassModel(); // 设置通过模式
|
|
||||||
} else if (this.operation == OperationEvent.Signal.cancelAutoInterlock.menu.operation) {
|
|
||||||
this.singalCancelPassModel(); // 取消通过模式
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 取消列车进路
|
|
||||||
cancelTrainRoute() {
|
|
||||||
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
|
||||||
},
|
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then((data)=>{
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.confirmControl.doShow(data.operate);
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 信号重开
|
|
||||||
reopenSignal() {
|
|
||||||
this.sendCommand(menuOperate.Signal.reopenSignal);
|
|
||||||
},
|
|
||||||
// 设置通过模式
|
|
||||||
singalPassModel() {
|
|
||||||
this.sendCommand(menuOperate.Signal.setAutoInterlock);
|
|
||||||
},
|
|
||||||
// 取消通过模式
|
|
||||||
singalCancelPassModel() {
|
|
||||||
this.sendCommand(menuOperate.Signal.cancelAutoInterlock);
|
|
||||||
},
|
|
||||||
sendCommand(operate) {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,244 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="xian-02__system switch-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>车站名称</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="switchName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="isActive" style="margin-top: 10px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="activeRadio" label="1" :disabled="activeRadio == 2" style="display: block; text-align: center;">
|
|
||||||
激活</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="activeRadio" label="2" :disabled="activeRadio == 1" style="display: block; text-align: center;">
|
|
||||||
切除</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="isLock" style="margin-top: 10px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="lockRadio" label="1" style="display: block; text-align: center;">
|
|
||||||
道岔单锁</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="lockRadio" label="2" disabled style="display: block; text-align: center;">
|
|
||||||
道岔解单锁</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="isTurnBlock" style="margin-top: 10px;">
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-radio v-model="turnRadio" label="1" :disabled="turnRadio == 2" style="display: block; text-align: center;">
|
|
||||||
道岔定位</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-radio v-model="turnRadio" label="2" :disabled="turnRadio == 1" style="display: block; text-align: center;">
|
|
||||||
道岔反位</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
|
||||||
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SwitchControl',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
operation: '',
|
|
||||||
stationName: '',
|
|
||||||
switchName: '',
|
|
||||||
isLock: false,
|
|
||||||
isTurnBlock: false,
|
|
||||||
isActive: false,
|
|
||||||
turnRadio: '1',
|
|
||||||
lockRadio: '1',
|
|
||||||
activeRadio: '1'
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
return '道岔控制';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
return '道岔封锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation || this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
return '道岔控制';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
|
||||||
return '道岔强扳';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
return '区段控制';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
return '区段控制';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.switchName = '';
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
|
||||||
this.switchName = selected.name;
|
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
|
||||||
if (station) {
|
|
||||||
this.stationName = station.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.isLock = false;
|
|
||||||
this.isTurnBlock = false;
|
|
||||||
this.isActive = false;
|
|
||||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
this.isTurnBlock = true;
|
|
||||||
this.turnRadio = '1';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
this.isTurnBlock = true;
|
|
||||||
this.turnRadio = '2';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
this.isLock = true;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
this.isActive = true;
|
|
||||||
this.activeRadio = '2';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
this.isActive = true;
|
|
||||||
this.activeRadio = '1';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
|
||||||
/** 道岔单锁*/
|
|
||||||
this.lock();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
|
||||||
/** 道岔封锁*/
|
|
||||||
this.block();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
|
||||||
/** 道岔定位*/
|
|
||||||
this.locate();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
|
||||||
/** 道岔反位*/
|
|
||||||
this.reverse();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
|
||||||
/** 区段切除*/
|
|
||||||
this.split();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
|
||||||
/** 区段激活*/
|
|
||||||
this.active();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
this.sendCommand(menuOperate.Switch.lock);
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
|
||||||
block() {
|
|
||||||
this.sendCommand(menuOperate.Switch.block);
|
|
||||||
},
|
|
||||||
// 道岔定位
|
|
||||||
locate() {
|
|
||||||
this.sendCommand(menuOperate.Switch.npChain);
|
|
||||||
},
|
|
||||||
// 道岔反位
|
|
||||||
reverse() {
|
|
||||||
this.sendCommand(menuOperate.Switch.rpChain);
|
|
||||||
},
|
|
||||||
// 区段切除
|
|
||||||
split() {
|
|
||||||
this.sendCommand(menuOperate.Switch.split);
|
|
||||||
},
|
|
||||||
// 区段激活
|
|
||||||
active() {
|
|
||||||
this.sendCommand(menuOperate.Switch.active);
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
sendCommand(operate) {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -4,7 +4,6 @@
|
|||||||
<route-selection ref="routeSelection" />
|
<route-selection ref="routeSelection" />
|
||||||
<route-lock ref="routeLock" />
|
<route-lock ref="routeLock" />
|
||||||
<route-un-lock ref="routeUnLock" />
|
<route-un-lock ref="routeUnLock" />
|
||||||
<route-control ref="routeControl" />
|
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<router-command ref="routerCommand" />
|
<router-command ref="routerCommand" />
|
||||||
@ -14,7 +13,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu/index';
|
import PopMenu from '@/components/PopMenu/index';
|
||||||
import RouteControl from './dialog/routeControl';
|
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteLock from './dialog/routeLock';
|
import RouteLock from './dialog/routeLock';
|
||||||
import RouteUnLock from './dialog/routeUnLock';
|
import RouteUnLock from './dialog/routeUnLock';
|
||||||
@ -33,7 +31,6 @@ export default {
|
|||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
RouteControl,
|
|
||||||
RouteSelection,
|
RouteSelection,
|
||||||
RouteLock,
|
RouteLock,
|
||||||
RouteUnLock,
|
RouteUnLock,
|
||||||
@ -424,14 +421,6 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(step);
|
this.$refs.noticeInfo.doShow(step);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 信号关灯
|
|
||||||
signalClose() {
|
|
||||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 引导信号
|
// 引导信号
|
||||||
guideSignal() {
|
guideSignal() {
|
||||||
const step = {
|
const step = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" :tip-msg="topTip" :tip-subhead="tipSubhead" />
|
<pop-menu ref="popMenu" :menu="menu" pop-class="xian-02__pop_tip_station" :tip-msg="topTip" :tip-subhead="tipSubhead" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" pop-class="xian-02__systerm" />
|
||||||
<switch-un-lock ref="switchUnLock" />
|
<switch-un-lock ref="switchUnLock" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu/index';
|
import PopMenu from '@/components/PopMenu/index';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||||
import SwitchUnLock from './dialog/switchUnLock';
|
import SwitchUnLock from './dialog/switchUnLock';
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||||
import AlxeEffective from './dialog/alxeEffective';
|
import AlxeEffective from './dialog/alxeEffective';
|
||||||
@ -19,7 +19,6 @@ import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||||
@ -217,28 +216,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
|
||||||
const operate = {
|
|
||||||
start: true,
|
|
||||||
code: this.selected.code,
|
|
||||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
|
||||||
param: {
|
|
||||||
switchCode: this.selected.code
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.mouseCancelState(this.selected);
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
} else {
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置故障
|
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -205,7 +205,6 @@ const map = {
|
|||||||
updateCount: 0, // 绘图快捷修改标识
|
updateCount: 0, // 绘图快捷修改标识
|
||||||
mousemove: 0, // 实训战场图移动标识
|
mousemove: 0, // 实训战场图移动标识
|
||||||
version: '', // 地图版本,
|
version: '', // 地图版本,
|
||||||
activeTrainList:{}, // 当前按计划行车的列车列表,
|
|
||||||
activeTrainListUpdate:0, // 当前按计划行车的列车列表更新标识
|
activeTrainListUpdate:0, // 当前按计划行车的列车列表更新标识
|
||||||
runPlanStatus:false, // 是否正处于按计划行车
|
runPlanStatus:false, // 是否正处于按计划行车
|
||||||
showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
|
showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
|
||||||
@ -727,12 +726,10 @@ const map = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setActiveTrainList:(state, data) => {
|
setActiveTrainList:(state) => {
|
||||||
state.activeTrainList[data.code] = data;
|
|
||||||
state.activeTrainListUpdate++;
|
state.activeTrainListUpdate++;
|
||||||
},
|
},
|
||||||
resetActiveTrainList:(state, data) => {
|
resetActiveTrainList:(state) => {
|
||||||
state.activeTrainList = {};
|
|
||||||
state.activeTrainListUpdate = 0;
|
state.activeTrainListUpdate = 0;
|
||||||
},
|
},
|
||||||
setDeleteCount: (state) => {
|
setDeleteCount: (state) => {
|
||||||
@ -790,11 +787,11 @@ const map = {
|
|||||||
updateAutoReentryState: (state, status) => {
|
updateAutoReentryState: (state, status) => {
|
||||||
state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status);
|
state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status);
|
||||||
},
|
},
|
||||||
updateTrainState:(state, status) =>{
|
// updateTrainState:(state, status) =>{
|
||||||
if (state.map.trainList) {
|
// if (state.map.trainList) {
|
||||||
state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
|
// state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
updateStationStand: (state, status) => {
|
updateStationStand: (state, status) => {
|
||||||
const holdIndex = state.holdStandList.indexOf(status.code);
|
const holdIndex = state.holdStandList.indexOf(status.code);
|
||||||
const jumpIndex = state.jumpStandList.indexOf(status.code);
|
const jumpIndex = state.jumpStandList.indexOf(status.code);
|
||||||
@ -832,6 +829,14 @@ const map = {
|
|||||||
state.flankProtectList.splice(index, 1);
|
state.flankProtectList.splice(index, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
updateTrainList: (state, data)=>{
|
||||||
|
const trainList = state.map.trainList;
|
||||||
|
trainList.forEach(elem => {
|
||||||
|
if (elem.code == data.code) {
|
||||||
|
elem = deepAssign(elem || {}, data);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -876,9 +881,9 @@ const map = {
|
|||||||
updateAutoReentryState: ({ commit }, status) => {
|
updateAutoReentryState: ({ commit }, status) => {
|
||||||
commit('updateAutoReentryState', status);
|
commit('updateAutoReentryState', status);
|
||||||
},
|
},
|
||||||
updateTrainState:({ commit }, status) => {
|
// updateTrainState:({ commit }, status) => {
|
||||||
commit('updateTrainState', status);
|
// commit('updateTrainState', status);
|
||||||
},
|
// },
|
||||||
updateStationStand: ({ commit }, status) => {
|
updateStationStand: ({ commit }, status) => {
|
||||||
commit('updateStationStand', status);
|
commit('updateStationStand', status);
|
||||||
},
|
},
|
||||||
@ -906,6 +911,11 @@ const map = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 更新列车信息
|
||||||
|
updateTrainList:({ commit }, train) => {
|
||||||
|
commit('updateTrainList', train);
|
||||||
|
},
|
||||||
|
|
||||||
setMapDataIdList: ({ state }, data) => {
|
setMapDataIdList: ({ state }, data) => {
|
||||||
state.mapIdList[`mapDate_${data.mapId}`] = data.mapData;
|
state.mapIdList[`mapDate_${data.mapId}`] = data.mapData;
|
||||||
},
|
},
|
||||||
@ -993,8 +1003,8 @@ const map = {
|
|||||||
setDeleteCount: ({ commit }) => {
|
setDeleteCount: ({ commit }) => {
|
||||||
commit('setDeleteCount');
|
commit('setDeleteCount');
|
||||||
},
|
},
|
||||||
setActiveTrainList: ({ commit }, data) => {
|
setActiveTrainList: ({ commit }) => {
|
||||||
commit('setActiveTrainList', data);
|
commit('setActiveTrainList');
|
||||||
},
|
},
|
||||||
resetActiveTrainList: ({ commit }) => {
|
resetActiveTrainList: ({ commit }) => {
|
||||||
commit('resetActiveTrainList');
|
commit('resetActiveTrainList');
|
||||||
|
@ -85,23 +85,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
move:function(val,oldval) {
|
// move:function(val,oldval) {
|
||||||
if(val != oldval){
|
// if(val != oldval){
|
||||||
let command ={
|
// let command ={
|
||||||
code:this.groupNum,
|
// code:this.groupNum,
|
||||||
operation:"602",
|
// operation:"602",
|
||||||
type:"07",
|
// type:"07",
|
||||||
param:val
|
// param:val
|
||||||
};
|
// };
|
||||||
// if(this.drawWay == 'true'){
|
// // if(this.drawWay == 'true'){
|
||||||
throttle(trainSimulationForce(this.group,this.groupNum,val),200,true);
|
// throttle(trainSimulationForce(this.group,this.groupNum,val),200,true);
|
||||||
//
|
// //
|
||||||
// }else{
|
// // }else{
|
||||||
// throttle(sendSimulationCommand(this.group,command),200,true);
|
// // throttle(sendSimulationCommand(this.group,command),200,true);
|
||||||
// }
|
// // }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
touchstate:function(val,oldval){
|
touchstate:function(val,oldval){
|
||||||
if(val != oldval){
|
if(val != oldval){
|
||||||
// if(this.userRole == "DRIVER"){
|
// if(this.userRole == "DRIVER"){
|
||||||
@ -234,6 +234,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
throttle(trainSimulationForce(this.group,this.groupNum, this.move),200,true);
|
||||||
|
updatemmic1(this.move);
|
||||||
},
|
},
|
||||||
speedend: function(event){
|
speedend: function(event){
|
||||||
document.getElementById("div1").onmousemove = null;
|
document.getElementById("div1").onmousemove = null;
|
||||||
|
@ -119,7 +119,7 @@
|
|||||||
<img class="buttonimg" :src="doorrightimg" />
|
<img class="buttonimg" :src="doorrightimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.closeRightDoor') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.closeRightDoor') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="urgestop" class="panebutton" style="bottom:6%;left:73%;">
|
<div id="urgestop" class="panebutton" style="bottom:6%;left:73%;" @click="ebstop">
|
||||||
<img class="buttonimg" :src="urgestopimg" />
|
<img class="buttonimg" :src="urgestopimg" />
|
||||||
<div class="buttontext">{{ $t('jlmap3d.emergencyBraking') }}</div>
|
<div class="buttontext">{{ $t('jlmap3d.emergencyBraking') }}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -140,7 +140,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
// import { sendSimulationCommand } from '@/api/simulation.js';
|
// import { sendSimulationCommand } from '@/api/simulation.js';
|
||||||
import { trainSimulationDriveMode, trainSimulationAto ,trainSimulationAtp,trainSimulationChangeHead,trainSimulationDoorControl } from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
|
import { trainSimulationDriveMode, trainSimulationAto ,trainSimulationAtp,trainSimulationChangeHead,trainSimulationDoorControl,trainSimulationEb } from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TopRightPane',
|
name: 'TopRightPane',
|
||||||
@ -425,6 +425,11 @@
|
|||||||
},
|
},
|
||||||
cbtcclick: function (e){
|
cbtcclick: function (e){
|
||||||
|
|
||||||
|
},
|
||||||
|
ebstop: function (e){
|
||||||
|
trainSimulationEb(this.group,this.groupNum).then(netdata => {
|
||||||
|
// console.log(netdata);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
updatabuttonlight: function (data){
|
updatabuttonlight: function (data){
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="display-draft">
|
<div class="display-draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
|
|
||||||
<!-- <el-button type="primary" @click="raystand">站台选择</el-button> -->
|
<!-- <el-button type="primary" @click="raystand">站台选择</el-button> -->
|
||||||
|
<el-button type="primary" v-show="tuoguanbutton" @click="tuoguan">{{ tuoguanbuttonmsg }}</el-button>
|
||||||
<el-button type="primary" @click="cctvplane">{{ cctvbuttonmsg }}</el-button>
|
<el-button type="primary" @click="cctvplane">{{ cctvbuttonmsg }}</el-button>
|
||||||
<el-button type="primary" @click="showplane">{{ showbuttonmsg }}</el-button>
|
<el-button type="primary" @click="showplane">{{ showbuttonmsg }}</el-button>
|
||||||
<el-button type="primary" @click="back">{{$t('global.back')}}</el-button>
|
<el-button type="primary" @click="back">{{$t('global.back')}}</el-button>
|
||||||
@ -47,9 +49,9 @@ import { mapGetters } from 'vuex';
|
|||||||
|
|
||||||
// import ShowProperty from '@/views/jlmap3d/show/property';
|
// import ShowProperty from '@/views/jlmap3d/show/property';
|
||||||
|
|
||||||
import { simulationNotify, setTrainingCbtcInitTime } from '@/api/simulation';
|
import { simulationNotify, setTrainingCbtcInitTime, getSimulationInfoNew } from '@/api/simulation';
|
||||||
|
|
||||||
import { getPublishMapDetail, getPublish3dMapDetail } from '@/api/jlmap3d/load3ddata';
|
import { getPublishMapDetail, getPublish3dMapDetail,tuoguan3ddrive } from '@/api/jlmap3d/load3ddata';
|
||||||
|
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
@ -88,6 +90,9 @@ export default {
|
|||||||
dcontrolshow: false,
|
dcontrolshow: false,
|
||||||
msgshow:false,
|
msgshow:false,
|
||||||
controlmsg:"不能选择其它列车",
|
controlmsg:"不能选择其它列车",
|
||||||
|
tuoguanbutton:false,
|
||||||
|
tuoguanbuttonmsg:"托管",
|
||||||
|
tuoguanstatus:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -161,11 +166,24 @@ export default {
|
|||||||
// this.$destroy();
|
// this.$destroy();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
userId() {
|
||||||
|
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.mmishow = true;
|
this.mmishow = true;
|
||||||
window.datanew = this.datanew;
|
window.datanew = this.datanew;
|
||||||
window.updatestatus = this.updatestatus;
|
window.updatestatus = this.updatestatus;
|
||||||
|
if(this.$route.query.group){
|
||||||
|
getSimulationInfoNew(this.$route.query.group).then(netdata => {
|
||||||
|
console.log(netdata);
|
||||||
|
if(netdata.data.type == "SCRIPT_MAKING"){
|
||||||
|
this.tuoguanbutton = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// this.$refs.mmiui.init();
|
// this.$refs.mmiui.init();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -262,6 +280,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
tuoguan(){
|
||||||
|
tuoguan3ddrive(this.$route.query.group,this.tuoguanstatus,{}).then(netdata => {
|
||||||
|
console.log(netdata);
|
||||||
|
});
|
||||||
|
},
|
||||||
updatestatus(newdata){
|
updatestatus(newdata){
|
||||||
this.trainnum = newdata.groupNumber;
|
this.trainnum = newdata.groupNumber;
|
||||||
this.$refs.mmiui.updatetrainstatus(newdata);
|
this.$refs.mmiui.updatetrainstatus(newdata);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class = "top">
|
<div class = "top">
|
||||||
<div style="background:yellow;left:5%;width:10%;height:100%;">
|
<div style="left:5%;width:10%;height:100%;" :style="{background:a1state}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="toptext" style="left:16%;top:15px;">
|
<div class="toptext" style="left:16%;top:15px;">
|
||||||
@ -140,7 +140,8 @@ export default {
|
|||||||
m9image:null,
|
m9image:null,
|
||||||
m10state:"jinduan",
|
m10state:"jinduan",
|
||||||
m10image:null,
|
m10image:null,
|
||||||
c1state:"qianyin",
|
newc1state:"none",
|
||||||
|
c1state:"none",
|
||||||
c1image:null,
|
c1image:null,
|
||||||
c2state:"rm",
|
c2state:"rm",
|
||||||
c2image:null,
|
c2image:null,
|
||||||
@ -149,8 +150,14 @@ export default {
|
|||||||
c5state:"normal",
|
c5state:"normal",
|
||||||
c5image:null,
|
c5image:null,
|
||||||
images:null,
|
images:null,
|
||||||
|
newa1state:"black",
|
||||||
|
a1state:"black",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
window.updatemmic1 = this.updatemmic1;
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
||||||
|
|
||||||
@ -183,8 +190,8 @@ export default {
|
|||||||
this.m8image = this.images.m8['jinjizhidong'];
|
this.m8image = this.images.m8['jinjizhidong'];
|
||||||
this.m9image = this.images.m9['ato'];
|
this.m9image = this.images.m9['ato'];
|
||||||
this.m10image = this.images.m10['jinduan'];
|
this.m10image = this.images.m10['jinduan'];
|
||||||
this.c1image = this.images.c1['qianyin'];
|
this.c1image = this.images.c1['none'];
|
||||||
this.c2image = this.images.c2['rm'];
|
this.c2image = this.images.c2['none'];
|
||||||
this.c3image = this.images.c3['normal'];
|
this.c3image = this.images.c3['normal'];
|
||||||
this.c5image = this.images.c5['normal'];
|
this.c5image = this.images.c5['normal'];
|
||||||
},
|
},
|
||||||
@ -204,18 +211,20 @@ export default {
|
|||||||
},
|
},
|
||||||
updatetrainstatus(newdata){
|
updatetrainstatus(newdata){
|
||||||
//更新车组号
|
//更新车组号
|
||||||
|
console.log(newdata);
|
||||||
this.updatemmispeedview(newdata.v,newdata.pv,newdata.tv);
|
this.updatemmispeedview(newdata.v,newdata.pv,newdata.tv);
|
||||||
|
|
||||||
this.updatemmilen(newdata.maLen);
|
this.updatemmilen(newdata.maLen);
|
||||||
|
|
||||||
this.updatammirunlevel(newdata.runLevel);
|
this.updatemmidrivemodelevel(newdata.runLevel,newdata.driveMode,newdata.atoOn,newdata.atpOn);
|
||||||
|
// this.updatammirunlevel(newdata.runLevel);
|
||||||
|
//
|
||||||
|
// this.updatemmidrivemode(newdata.driveMode);
|
||||||
|
//
|
||||||
|
// this.updatemmiatoatp(newdata.atoOn,newdata.atpOn);
|
||||||
|
|
||||||
this.updatemmidrivemode(newdata.driveMode);
|
|
||||||
|
|
||||||
this.updatemmistation(newdata.endStation,newdata.nextStation);
|
this.updatemmistation(newdata.endStation,newdata.nextStation);
|
||||||
|
|
||||||
this.updatemmiatoatp(newdata.atoOn,newdata.atpOn);
|
|
||||||
|
|
||||||
this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
|
this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
|
||||||
},
|
},
|
||||||
updatemmistate(aaa){
|
updatemmistate(aaa){
|
||||||
@ -234,6 +243,19 @@ export default {
|
|||||||
if(this.mmimodel.updateato){
|
if(this.mmimodel.updateato){
|
||||||
this.mmimodel.updateato(atospeed);
|
this.mmimodel.updateato(atospeed);
|
||||||
}
|
}
|
||||||
|
console.log(this.m9state1);
|
||||||
|
|
||||||
|
if(this.m9state1 == false){
|
||||||
|
if(speed>atospeed){
|
||||||
|
this.newa1state = "yellow";
|
||||||
|
}else{
|
||||||
|
this.newa1state = "black";
|
||||||
|
}
|
||||||
|
if(this.newa1state != this.a1state){
|
||||||
|
this.a1state = this.newa1state;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -308,43 +330,35 @@ export default {
|
|||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
updatammirunlevel(drivedata){
|
updatemmidrivemodelevel(runlevel,dirvemode,atoon,atpon){
|
||||||
if(drivedata != this.m2state){
|
if(runlevel != this.m2state){
|
||||||
if(drivedata == "CBTC"){
|
if(runlevel == "CBTC"){
|
||||||
this.m2state = drivedata;
|
this.m2state = runlevel;
|
||||||
this.m2image = this.images.m2['cbtc'];
|
this.m2image = this.images.m2['cbtc'];
|
||||||
}else if(drivedata == "IL"){
|
}else if(runlevel == "IL"){
|
||||||
this.m2state = drivedata;
|
this.m2state = runlevel;
|
||||||
this.m2image = this.images.m2['il'];
|
this.m2image = this.images.m2['il'];
|
||||||
}else{
|
}else{
|
||||||
this.m2state = drivedata;
|
this.m2state = runlevel;
|
||||||
this.m2image = this.images.m2['start'];
|
this.m2image = this.images.m2['start'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
if(dirvemode != this.m1state){
|
||||||
updatemmidrivemode(drivedata){
|
if(dirvemode == "CM"){
|
||||||
if(drivedata != this.m1state){
|
this.m1state = dirvemode;
|
||||||
if(drivedata == "CM"){
|
|
||||||
this.m1state = drivedata;
|
|
||||||
this.m1image = this.images.m1['cm'];
|
this.m1image = this.images.m1['cm'];
|
||||||
}else if(drivedata == "RM"){
|
}else if(dirvemode == "RM"){
|
||||||
this.m1state = drivedata;
|
this.m1state = dirvemode;
|
||||||
this.m1image = this.images.m1['rm'];
|
this.m1image = this.images.m1['rm'];
|
||||||
}else if(drivedata == "AM"){
|
}else if(dirvemode == "AM"){
|
||||||
this.m1state = drivedata;
|
this.m1state = dirvemode;
|
||||||
this.m1image = this.images.m1['am'];
|
this.m1image = this.images.m1['am'];
|
||||||
}else{
|
}else{
|
||||||
this.m1state = null;
|
this.m1state = null;
|
||||||
this.m1image = this.images.m1['start'];
|
this.m1image = this.images.m1['start'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
updatemmiatoatp(atoon,atpon){
|
|
||||||
//
|
//
|
||||||
if(this.m9state1 != atoon){
|
if(this.m9state1 != atoon){
|
||||||
this.m9state1 = atoon;
|
this.m9state1 = atoon;
|
||||||
@ -352,6 +366,7 @@ export default {
|
|||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.m9image = this.images.m9["ato"];
|
this.m9image = this.images.m9["ato"];
|
||||||
|
// this.c2image = this.images.c2['none'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,6 +378,7 @@ export default {
|
|||||||
this.m9image = this.images.m9["atp"];
|
this.m9image = this.images.m9["atp"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
updatemmidoormode(leftDoorCanClose,rightDoorCanClose){
|
updatemmidoormode(leftDoorCanClose,rightDoorCanClose){
|
||||||
if(leftDoorCanClose != this.m5stateleft|| rightDoorCanClose != this.m5stateright){
|
if(leftDoorCanClose != this.m5stateleft|| rightDoorCanClose != this.m5stateright){
|
||||||
@ -417,6 +433,26 @@ export default {
|
|||||||
this.malen = +parseInt(len)/2*10+"px";
|
this.malen = +parseInt(len)/2*10+"px";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
updatemmic1(qspeed){
|
||||||
|
if(this.nowspeed != 0 ){
|
||||||
|
this.newc1state = 'duoxing';
|
||||||
|
}else{
|
||||||
|
this.newc1state = 'none';
|
||||||
|
}
|
||||||
|
if(qspeed>0){
|
||||||
|
|
||||||
|
this.newc1state = 'qianyin';
|
||||||
|
}else if(qspeed<0){
|
||||||
|
|
||||||
|
this.newc1state = 'zhidong';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(this.c1state != this.newc1state){
|
||||||
|
this.c1state = this.newc1state;
|
||||||
|
this.c1image = this.images.c1[this.c1state];
|
||||||
|
}
|
||||||
|
},
|
||||||
updatemmistation(end,next){
|
updatemmistation(end,next){
|
||||||
if(next != this.nextstation || end != this.endstation){
|
if(next != this.nextstation || end != this.endstation){
|
||||||
this.endstation = end;
|
this.endstation = end;
|
||||||
@ -425,9 +461,6 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.init();
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,6 +192,7 @@ export default {
|
|||||||
this.$refs.chatCoversitionList.addCoversition(data, headerTitle);
|
this.$refs.chatCoversitionList.addCoversition(data, headerTitle);
|
||||||
this.isHasCoversition = true;
|
this.isHasCoversition = true;
|
||||||
this.currentCoversition = {id:data.id, all:data.all};
|
this.currentCoversition = {id:data.id, all:data.all};
|
||||||
|
this.memberListCoversition = {id:data.id, all:data.all};
|
||||||
this.headerTitle = headerTitle;
|
this.headerTitle = headerTitle;
|
||||||
},
|
},
|
||||||
changeCoversition(data) {
|
changeCoversition(data) {
|
||||||
|
@ -181,9 +181,21 @@ export default {
|
|||||||
let newMemberList = [];
|
let newMemberList = [];
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data.memberList && res.data.memberList.length > 0) {
|
if (res.data.memberList && res.data.memberList.length > 0) {
|
||||||
const lastData = JSON.stringify(res.data.memberList);
|
// res.data.memberList
|
||||||
|
// newMemberList
|
||||||
|
const playerList = res.data.memberList.filter(item => item.hasPlay === true);
|
||||||
|
playerList.map(each=>{
|
||||||
|
if (!each.deviceName && each.deviceCode) {
|
||||||
|
const device = this.$store.getters['map/getDeviceByCode'](each.deviceCode);
|
||||||
|
if (device.name) {
|
||||||
|
each.deviceName = device.name;
|
||||||
|
} else {
|
||||||
|
each.deviceName = each.deviceCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const lastData = JSON.stringify(playerList);
|
||||||
newMemberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
newMemberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||||
// newMemberList = playerList.filter(item => item.hasPlay === true);
|
|
||||||
}
|
}
|
||||||
if (res.data.mapLocation) {
|
if (res.data.mapLocation) {
|
||||||
this.mapLocation = res.data.mapLocation;
|
this.mapLocation = res.data.mapLocation;
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
@showScheduling="showScheduling"
|
@showScheduling="showScheduling"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<menu-script v-if="isScript" ref="menuScript" :offset-bottom="offsetBottom" :group="group" :data-error="dataError" />
|
<menu-script v-if="isScript" ref="menuScript" @script3ddriveshow="script3ddriveshow" :offset-bottom="offsetBottom" :group="group" :data-error="dataError" />
|
||||||
|
|
||||||
<menu-practice
|
<menu-practice
|
||||||
v-if="isPractice"
|
v-if="isPractice"
|
||||||
@ -245,6 +245,8 @@ export default {
|
|||||||
return this.mode === 'practice';
|
return this.mode === 'practice';
|
||||||
},
|
},
|
||||||
isDrive() {
|
isDrive() {
|
||||||
|
console.log(this.mode);
|
||||||
|
console.log(this.prdType);
|
||||||
return this.prdType == '04';
|
return this.prdType == '04';
|
||||||
},
|
},
|
||||||
isShowScheduling() {
|
isShowScheduling() {
|
||||||
@ -624,6 +626,11 @@ export default {
|
|||||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
script3ddriveshow(){
|
||||||
|
this.panelShow = false;
|
||||||
|
this.drivingShow = true;
|
||||||
|
this.$refs.Jl3dDrive.show(this.mapId, this.group);
|
||||||
|
},
|
||||||
passflow() {
|
passflow() {
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path:'/jlmap3d/passengerflow',
|
path:'/jlmap3d/passengerflow',
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
||||||
</el-button-group> -->
|
</el-button-group> -->
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
|
<el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
|
||||||
<el-button v-if="!isScriptCommand" type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
|
<el-button v-if="!isScriptCommand" type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
|
||||||
<el-button v-if="!isScriptCommand" type="danger" :disabled="dataError" @click="end">初始化</el-button>
|
<el-button v-if="!isScriptCommand" type="danger" :disabled="dataError" @click="end">初始化</el-button>
|
||||||
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
|
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
|
||||||
@ -198,6 +199,9 @@ export default {
|
|||||||
Notification.closeAll();
|
Notification.closeAll();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
jumpjlmap3d() {
|
||||||
|
this.$emit('script3ddriveshow');
|
||||||
|
},
|
||||||
async loadSystemTime() {
|
async loadSystemTime() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -70,20 +70,27 @@ export default {
|
|||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'$store.state.map.activeTrainListUpdate': function (val) {
|
'$store.state.map.activeTrainListUpdate': function (val) {
|
||||||
const trainList = Object.values(this.$store.state.map.activeTrainList);
|
if (val) {
|
||||||
if (this.lineCode == '10' || this.lineCode == '11') {
|
const trainList = this.$store.state.map.map.trainList;
|
||||||
this.topTrainList = trainList.filter((train)=>{
|
if (this.lineCode == '10' || this.lineCode == '11') {
|
||||||
return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode;
|
this.topTrainList = trainList.filter((train)=>{
|
||||||
});
|
// train.serviceNumber != '' && train.serviceNumber != undefined &&
|
||||||
this.bottomTrainList = trainList.filter((train)=>{
|
return !train.right && train.sectionCode;
|
||||||
return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode;
|
});
|
||||||
});
|
this.bottomTrainList = trainList.filter((train)=>{
|
||||||
|
// train.serviceNumber != '' && train.serviceNumber != undefined &&
|
||||||
|
return train.right && train.sectionCode;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.trainList = trainList.filter((train)=>{
|
||||||
|
return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode;
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.trainList = trainList.filter((train)=>{
|
this.topTrainList = [];
|
||||||
return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode;
|
this.bottomTrainList = [];
|
||||||
});
|
this.trainList = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
'$store.state.map.runPlanStatus': function (val) {
|
'$store.state.map.runPlanStatus': function (val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
|
@ -100,6 +100,7 @@ export default {
|
|||||||
return this.userRole == 'STATION_SUPERVISOR';
|
return this.userRole == 'STATION_SUPERVISOR';
|
||||||
},
|
},
|
||||||
isDriver() {
|
isDriver() {
|
||||||
|
console.log(this.userRole);
|
||||||
return this.userRole == 'DRIVER';
|
return this.userRole == 'DRIVER';
|
||||||
},
|
},
|
||||||
isAdmin() {
|
isAdmin() {
|
||||||
|
@ -70,20 +70,25 @@ export default {
|
|||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'$store.state.map.activeTrainListUpdate': function (val) {
|
'$store.state.map.activeTrainListUpdate': function (val) {
|
||||||
const trainList = Object.values(this.$store.state.map.activeTrainList);
|
if (val) {
|
||||||
if (this.lineCode == '10' || this.lineCode == '11') {
|
const trainList = this.$store.state.map.map.trainList;
|
||||||
this.topTrainList = trainList.filter((train)=>{
|
if (this.lineCode == '10' || this.lineCode == '11') {
|
||||||
return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode;
|
this.topTrainList = trainList.filter((train)=>{
|
||||||
});
|
return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode;
|
||||||
this.bottomTrainList = trainList.filter((train)=>{
|
});
|
||||||
return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode;
|
this.bottomTrainList = trainList.filter((train)=>{
|
||||||
});
|
return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.trainList = trainList.filter((train)=>{
|
||||||
|
return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode;
|
||||||
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.trainList = trainList.filter((train)=>{
|
this.topTrainList = [];
|
||||||
return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode;
|
this.bottomTrainList = [];
|
||||||
});
|
this.trainList = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
'$store.state.map.runPlanStatus': function (val) {
|
'$store.state.map.runPlanStatus': function (val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
|
@ -112,8 +112,10 @@ export default {
|
|||||||
// isStartCoversition
|
// isStartCoversition
|
||||||
const targetNameList = [];
|
const targetNameList = [];
|
||||||
element.conversationMemberIds.forEach(id=>{
|
element.conversationMemberIds.forEach(id=>{
|
||||||
const userName = memberVOList.find(elem=>{ return elem.id == id; });
|
if (member.id != id) {
|
||||||
targetNameList.push(userName.name);
|
const userName = memberVOList.find(elem=>{ return elem.id == id; });
|
||||||
|
targetNameList.push(userName.name);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.actionInfoList.push({id: element.id, isStartCoversition: true, memberName: memberName, targetName:targetNameList.toString() });
|
this.actionInfoList.push({id: element.id, isStartCoversition: true, memberName: memberName, targetName:targetNameList.toString() });
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user