This commit is contained in:
fan 2020-06-18 10:05:20 +08:00
commit 39bc38701e
71 changed files with 1322 additions and 5693 deletions

View File

@ -73,3 +73,12 @@ export function getPublish3dMapDetail(id) {
});
return datad.then();
}
/** 更新地图3d数据*/
export function tuoguan3ddrive(group,on,data) {
return request({
url: `/api/scriptSimulation/${group}/${on}/trust`,
method: 'put',
data: data
});
}

View File

@ -102,13 +102,13 @@ export function getmodels(data) {
deviceType:"suidaobg",
type:"nbsuidao",
picUrl:"",
assetUrl:"../../static/model/suidao/nbsuidao.FBX"
assetUrl:"../../static/model/suidao/suidao.FBX"
}
assets.push(backgroundmodel);
models.assets = assets;
models.stationtexture = "nb1";
models.istexture = true;
models.stationtexture = "fz1";
models.istexture = false;
console.log(models);
postmap.assets = JSON.stringify(models);
//link轨道

View File

@ -40,6 +40,7 @@ class Jlmap {
// 显示集中站
this.stationCode = '';
this.isUpdateShowTrainList = false;
}
// 初始化属性有鼠标事件 缩放等
@ -421,8 +422,9 @@ class Jlmap {
}
} else {
if (elem.deviceType === 'TRAIN') {
store.dispatch('map/updateTrainState', elem);
store.dispatch('map/setActiveTrainList', elem);
this.isUpdateShowTrainList = true;
store.dispatch('map/updateTrainList', elem);
// store.dispatch('map/updateTrainState', elem);
} else if (elem.deviceType === 'STAND') {
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.postHandle(list || []);

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -2,9 +2,9 @@
<div>
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-control ref="routeControl" />
<route-control ref="routeControl" :pop-class="systemName" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<route-detail ref="routeDetail" :system-name="systemName" />
<notice-info ref="noticeInfo" />
<password-box ref="password" @checkOver="passWordCommit" />
</div>
@ -12,10 +12,10 @@
<script>
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 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 { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
@ -49,6 +49,7 @@ export default {
return {
menu: [],
clickNum:0,
systemName:'beijing-01__systerm',
oldSelected:null,
menuNormal: {
Local: [

View File

@ -1,11 +1,11 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" system-name="beijing-01__systerm" />
<stand-jump-stop-control ref="standJumpStopControl" system-name="beijing-01__systerm" />
<stand-control ref="standControl" :system-name="systemName" />
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" />
<stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" />
<stand-run-level ref="standRunLevel" :system-name="systemName" />
<stand-stop-time ref="standStopTime" :system-name="systemName" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
</div>
@ -17,8 +17,8 @@ import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime';
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
@ -51,6 +51,7 @@ export default {
data() {
return {
menu: [],
systemName:'beijing-01__systerm',
menuNormal: {
Local: [
],

View File

@ -2,7 +2,7 @@
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<switch-control ref="switchControl" />
<switch-control ref="switchControl" pop-class="beijing-01__systerm" />
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
@ -12,7 +12,7 @@
<script>
import PopMenu from '@/components/PopMenu';
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 AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';

View File

@ -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>

View File

@ -2,7 +2,7 @@
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" />
<switch-control ref="switchControl" />
<switch-control ref="switchControl" pop-class="chengdou-01__system" />
<create-device-label ref="createDeviceLabel" />
</div>
</template>
@ -11,7 +11,7 @@
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
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 CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex';

View File

@ -78,7 +78,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
// import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'PasswordBox',

View File

@ -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>

View File

@ -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>

View File

@ -2,18 +2,18 @@
<div>
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-control ref="routeControl" />
<route-control ref="routeControl" :pop-class="'chengdou-03__systerm'" />
<route-detail ref="routeDetail" />
<route-guide ref="routeGuide" />
<route-hand-control ref="routeHandControl" />
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
<password-box ref="passwordBox" :pop-class="'chengdou-03__systerm'" @checkOver="passWordCommit" />
</div>
</template>
<script>
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 RouteDetail from './dialog/routeDetail';
import RouteHandControl from './dialog/routeHandControl';
@ -24,7 +24,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
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';
export default {

View File

@ -2,7 +2,7 @@
<div>
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<switch-control ref="switchControl" />
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
<notice-info ref="noticeInfo" />
</div>
</template>
@ -10,7 +10,7 @@
<script>
import PopMenu from '@/components/PopMenu';
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 CMD from '@/scripts/cmdPlugin/CommandEnum';
import CancelMouseState from '@/mixin/CancelMouseState';

View File

@ -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>

View File

@ -1,7 +1,8 @@
<template>
<el-dialog
v-dialogDrag
:class="systemName+' notice-info'"
class="notice-info"
:class="popClass"
:title="title"
:visible.sync="show"
width="360px"
@ -21,24 +22,24 @@
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import {OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'NoticeInfo',
props:{
systemName:{
type:String,
required:true
props: {
popClass: {
type: String,
default: ''
}
},
data() {
return {
dialogShow: false,
messages: ['命令下达失败']
messages: []
};
},
computed: {
@ -60,8 +61,9 @@ export default {
methods: {
doShow(messages) {
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages && messages != 'null') {
this.messages = ['命令执行失败'];
if (messages && messages != 'null' && messages != 'undefined') {
this.messages.push(messages);
}
this.$nextTick(function () {

View File

@ -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"> &lt; </el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { 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>

View 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>

View File

@ -2,7 +2,7 @@
<div>
<el-dialog
v-dialogDrag
class="beijing-01__systerm route-detail"
:class="systemName+' route-detail'"
:title="title"
:visible.sync="show"
width="340px"
@ -62,14 +62,20 @@
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
// import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from '../childDialog/noticeInfo';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
props:{
systemName:{
type:String,
required:true
}
},
data() {
return {
dialogShow: false,
@ -128,7 +134,7 @@ export default {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
// mouseCancelState(this.selected);
},
commit() {
const operate = {

View File

@ -128,7 +128,7 @@
<script>
import { OperationEvent } 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 { mapGetters } from 'vuex';

View File

@ -106,7 +106,7 @@ import { mapGetters } from 'vuex';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
// import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
import NoticeInfo from '../childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../../utils/menuOperate';
export default {

View File

@ -1,5 +1,5 @@
<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-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
@ -68,15 +68,21 @@
<script>
import { mapGetters } from 'vuex';
import ConfirmControl from './childDialog/confirmControl';
import ConfirmControl from '../childDialog/confirmControl';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '../utils/menuOperate';
import {menuOperate, commitOperate} from '../../utils/menuOperate';
export default {
name: 'StandRunLevel',
components: {
ConfirmControl
},
props:{
systemName:{
type:String,
required:true
}
},
data() {
return {
dialogShow: false,

View File

@ -1,7 +1,7 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-stop-time"
:class="systemName+' stand-stop-time'"
:title="title"
:visible.sync="show"
width="340px"
@ -68,16 +68,22 @@
</template>
<script>
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
// import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from '../childDialog/noticeInfo';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '../utils/menuOperate';
import {menuOperate, commitOperate} from '../../utils/menuOperate';
export default {
name: 'StandStopTime',
components: {
NoticeInfo
},
props:{
systemName:{
type:String,
required:true
}
},
data() {
return {
dialogShow: false,
@ -151,7 +157,7 @@ export default {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
// mouseCancelState(this.selected);
},
chooseControl(control) {
/** 自动时的默认时间*/

View File

@ -1,7 +1,8 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm switch-control"
class="switch-control"
:class="popClass"
:title="title"
:visible.sync="show"
width="300px"
@ -22,7 +23,7 @@
<el-input v-model="switchName" size="small" disabled />
</el-col>
</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-radio v-model="activeRadio" label="1" :disabled="activeRadio == 2" style="display: block; text-align: center;">
激活</el-radio>
@ -32,7 +33,7 @@
切除</el-radio>
</el-col>
</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-radio v-model="lockRadio" label="1" style="display: block; text-align: center;">
道岔单锁</el-radio>
@ -42,7 +43,7 @@
道岔解单锁</el-radio>
</el-col>
</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-radio v-model="turnRadio" label="1" :disabled="turnRadio == 2" style="display: block; text-align: center;">
道岔定位</el-radio>
@ -60,21 +61,30 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<notice-info ref="noticeInfo" :pop-class="popClass" />
<password-box ref="passwordBox" :pop-class="popClass" @checkOver="passWordCommit" />
</el-dialog>
</template>
<script>
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from '../childDialog/noticeInfo';
import PasswordBox from '../childDialog/passwordInputBox';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '../utils/menuOperate';
import {menuOperate, commitOperate} from '../../utils/menuOperate';
export default {
name: 'SwitchControl',
components: {
NoticeInfo
NoticeInfo,
PasswordBox
},
props: {
popClass: {
type: String,
default: ''
}
},
data() {
return {
@ -104,7 +114,13 @@ export default {
},
title() {
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) {
return '道岔封锁';
} 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) {
return '道岔强扳';
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
return '区段控制';
return '区段切除';
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
return '区段控制';
return '区段激活';
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
return '道岔转动';
}
return '';
}
@ -170,23 +188,27 @@ export default {
},
commit() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
/** 道岔单锁*/
this.lock();
this.lock(); //
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
/** 道岔封锁*/
this.block();
this.block(); //
} else if (this.operation == OperationEvent.Switch.locate.menu.operation) {
/** 道岔定位*/
this.locate();
this.locate(); //
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
/** 道岔反位*/
this.reverse();
this.reverse(); //
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
/** 区段切除*/
this.split();
this.split(); //
} 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() {
this.sendCommand(menuOperate.Switch.block);
switch (this.popClass) {
case 'chengdou-03__systerm':
this.openPasswordBox(this.operation);
break;
default: this.sendCommand(menuOperate.Switch.block);
}
},
//
locate() {
this.sendCommand(menuOperate.Switch.locate);
},
//
turnout() {
this.sendCommand(menuOperate.Switch.turnout);
},
//
reverse() {
this.sendCommand(menuOperate.Switch.reverse);
@ -213,19 +245,62 @@ export default {
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 = {
operation: OperationEvent.Command.cancel.menu.operation
operation: operation
};
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);
});
},
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) {
this.loading = true;
commitOperate(operate, {}, 2).then(({valid})=>{
@ -238,6 +313,19 @@ export default {
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();
});
}
}
};

View File

@ -37,51 +37,58 @@ export const menuOperate = {
}
},
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,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
cancelTrainRoute:{
// 取消进路
cancelTrainRoute:{ // 取消进路
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
humanTrainRoute:{
// 总人解
humanTrainRoute:{ // 总人解
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
cmdType:CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
},
reopenSignal:{
// 信号重开
reopenSignal:{ // 信号重开
operation: OperationEvent.Signal.reopenSignal.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
signalClose:{
// 信号关灯
signalClose:{ // 信号关灯
operation: OperationEvent.Signal.signalClose.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
},
humanControl:{
// 进路交人工控
humanControl:{ // 进路交人工控
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
atsAutoControl:{
// 进路交自动控
atsAutoControl:{ // 进路交自动控
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
setAutoInterlock:{
// 设置通过模式
setAutoInterlock:{ // 设置通过模式
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
cancelAutoInterlock:{
// 取消通过模式
cancelAutoInterlock:{ // 取消通过模式
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
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:{
// 查询进路状态
operation: OperationEvent.Signal.detail.menu.operation
@ -98,6 +105,16 @@ export const menuOperate = {
operation: OperationEvent.Switch.unlock.menu.operation,
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:{
// 道岔强扳
operation: OperationEvent.Switch.turnoutForce.menu.operation
@ -131,8 +148,17 @@ export const menuOperate = {
// 确认计轴有效
operation: OperationEvent.Switch.alxeEffective.menu.operation,
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:{
setDetainTrain:{

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -4,9 +4,9 @@
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-un-lock ref="routeUnLock" />
<route-control ref="routeControl" />
<route-control ref="routeControl" :pop-class="systemName" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<route-detail ref="routeDetail" :system-name="systemName" />
<router-command ref="routerCommand" />
<notice-info ref="noticeInfo" />
</div>
@ -14,13 +14,13 @@
<script>
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 RouteLock from './dialog/routeLock';
import RouteUnLock from './dialog/routeUnLock';
import RouteHandControl from './dialog/routeHandControl';
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 CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -54,6 +54,7 @@ export default {
data() {
return {
menu: [],
systemName:'foshan-01__systerm',
menuNormal: {
Local: [
{

View File

@ -1,11 +1,11 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" system-name="foshan-01__systerm" />
<stand-jump-stop-control ref="standJumpStopControl" system-name="foshan-01__systerm" />
<stand-control ref="standControl" :system-name="systemName" />
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" />
<stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" />
<stand-run-level ref="standRunLevel" :system-name="systemName" />
<stand-stop-time ref="standStopTime" :system-name="systemName" />
<stand-back-strategy ref="standBackStrategy" />
<stand-detain-train-all ref="standDetainTrainAll" />
<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 StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime';
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import StandDetainTrainAll from './dialog/standDetainTrainAll';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@ -53,6 +53,7 @@ export default {
data() {
return {
menu: [],
systemName:'foshan-01__systerm',
menuNormal: {
Local: [
{

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" />
<switch-control ref="switchControl" pop-class="foshan-01__systerm" />
<switch-un-lock ref="switchUnLock" />
<speed-limit-control ref="speedLimitControl" />
<notice-info ref="noticeInfo" />
@ -10,7 +10,7 @@
<script>
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 SpeedLimitControl from './dialog/speedLimitControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';

View File

@ -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>

View File

@ -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>

View File

@ -3,7 +3,7 @@
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" />
<route-control ref="routeControl" :pop-class="'fuzhou-01__systerm'" />
<route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
@ -13,7 +13,7 @@
<script>
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 RouteLock from './dialog/routeLock';
import RouteCmdControl from './dialog/routeCmdControl';

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" />
<switch-control ref="switchControl" pop-class="fuzhou-01__systerm" />
<switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
@ -10,13 +10,13 @@
<script>
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 SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate';

View File

@ -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>

View File

@ -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>

View File

@ -3,7 +3,7 @@
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" />
<route-control ref="routeControl" :pop-class="'haerbin-01__systerm'" />
<route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
@ -13,7 +13,7 @@
<script>
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 RouteLock from './dialog/routeLock';
import RouteCmdControl from './dialog/routeCmdControl';

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" />
<switch-control ref="switchControl" :pop-class="'haerbin-01__systerm'" />
<switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
@ -10,7 +10,7 @@
<script>
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 SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -2,25 +2,23 @@
<div>
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-un-lock ref="routeUnLock" />
<route-control ref="routeControl" />
<route-control ref="routeControl" :pop-class="systemName" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<route-detail ref="routeDetail" :system-name="systemName" />
<router-command ref="routerCommand" />
<notice-info ref="noticeInfo" />\
<notice-info ref="noticeInfo" />
</div>
</template>
<script>
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 RouteLock from './dialog/routeLock';
import RouteUnLock from './dialog/routeUnLock';
import RouteHandControl from './dialog/routeHandControl';
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 {menuOperate, commitOperate} from './utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -34,7 +32,6 @@ export default {
PopMenu,
RouteControl,
RouteSelection,
RouteLock,
RouteUnLock,
RouteHandControl,
RouteDetail,
@ -52,6 +49,7 @@ export default {
data() {
return {
menu: [],
systemName:'ningbo-01__systerm',
menuNormal: {
Local: [
{
@ -258,7 +256,7 @@ export default {
lock() {
commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeLock.doShow(operate, this.selected);
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},

View File

@ -1,11 +1,11 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" system-name="ningbo-01__systerm" />
<stand-jump-stop-control ref="standJumpStopControl" system-name="ningbo-01__systerm" />
<stand-control ref="standControl" :system-name="systemName" />
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" />
<stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" />
<stand-run-level ref="standRunLevel" :system-name="systemName" />
<stand-stop-time ref="standStopTime" :system-name="systemName" />
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
<notice-info ref="noticeInfo" />
</div>
@ -16,8 +16,8 @@ import PopMenu from '@/components/PopMenu';
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime';
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from './utils/menuOperate';
@ -49,6 +49,7 @@ export default {
data() {
return {
menu: [],
systemName:'ningbo-01__systerm',
menuNormal: {
Local: [
{

View File

@ -1,7 +1,7 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<switch-control ref="switchControl" />
<switch-control ref="switchControl" :pop-class="'ningbo-01__systerm'" />
<switch-un-lock ref="switchUnLock" />
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
@ -11,7 +11,7 @@
<script>
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 SpeedLimitControl from './dialog/speedLimitControl';
import AlxeEffective from './dialog/alxeEffective';

View File

@ -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>

View File

@ -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>

View File

@ -3,7 +3,7 @@
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" />
<route-control ref="routeControl" :pop-class="'xian-01__systerm'" />
<route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
@ -13,7 +13,7 @@
<script>
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 RouteLock from './dialog/routeLock';
import RouteCmdControl from './dialog/routeCmdControl';

View File

@ -1,7 +1,7 @@
<template>
<div>
<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" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
@ -10,7 +10,7 @@
<script>
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 SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';

View File

@ -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>

View File

@ -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>

View File

@ -4,7 +4,6 @@
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-un-lock ref="routeUnLock" />
<route-control ref="routeControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<router-command ref="routerCommand" />
@ -14,7 +13,6 @@
<script>
import PopMenu from '@/components/PopMenu/index';
import RouteControl from './dialog/routeControl';
import RouteSelection from './dialog/routeSelection';
import RouteLock from './dialog/routeLock';
import RouteUnLock from './dialog/routeUnLock';
@ -33,7 +31,6 @@ export default {
name: 'SignalMenu',
components: {
PopMenu,
RouteControl,
RouteSelection,
RouteLock,
RouteUnLock,
@ -424,14 +421,6 @@ export default {
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() {
const step = {

View File

@ -1,7 +1,7 @@
<template>
<div>
<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" />
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
@ -11,7 +11,7 @@
<script>
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 SpeedLimitControl from './dialog/speedLimitControl';
import AlxeEffective from './dialog/alxeEffective';
@ -19,7 +19,6 @@ import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
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() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {

View File

@ -205,7 +205,6 @@ const map = {
updateCount: 0, // 绘图快捷修改标识
mousemove: 0, // 实训战场图移动标识
version: '', // 地图版本,
activeTrainList:{}, // 当前按计划行车的列车列表,
activeTrainListUpdate:0, // 当前按计划行车的列车列表更新标识
runPlanStatus:false, // 是否正处于按计划行车
showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
@ -727,12 +726,10 @@ const map = {
}
});
},
setActiveTrainList:(state, data) => {
state.activeTrainList[data.code] = data;
setActiveTrainList:(state) => {
state.activeTrainListUpdate++;
},
resetActiveTrainList:(state, data) => {
state.activeTrainList = {};
resetActiveTrainList:(state) => {
state.activeTrainListUpdate = 0;
},
setDeleteCount: (state) => {
@ -790,11 +787,11 @@ const map = {
updateAutoReentryState: (state, status) => {
state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status);
},
updateTrainState:(state, status) =>{
if (state.map.trainList) {
state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
}
},
// updateTrainState:(state, status) =>{
// if (state.map.trainList) {
// state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
// }
// },
updateStationStand: (state, status) => {
const holdIndex = state.holdStandList.indexOf(status.code);
const jumpIndex = state.jumpStandList.indexOf(status.code);
@ -832,6 +829,14 @@ const map = {
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) => {
commit('updateAutoReentryState', status);
},
updateTrainState:({ commit }, status) => {
commit('updateTrainState', status);
},
// updateTrainState:({ commit }, status) => {
// commit('updateTrainState', status);
// },
updateStationStand: ({ commit }, status) => {
commit('updateStationStand', status);
},
@ -906,6 +911,11 @@ const map = {
}
},
// 更新列车信息
updateTrainList:({ commit }, train) => {
commit('updateTrainList', train);
},
setMapDataIdList: ({ state }, data) => {
state.mapIdList[`mapDate_${data.mapId}`] = data.mapData;
},
@ -993,8 +1003,8 @@ const map = {
setDeleteCount: ({ commit }) => {
commit('setDeleteCount');
},
setActiveTrainList: ({ commit }, data) => {
commit('setActiveTrainList', data);
setActiveTrainList: ({ commit }) => {
commit('setActiveTrainList');
},
resetActiveTrainList: ({ commit }) => {
commit('resetActiveTrainList');

View File

@ -85,23 +85,23 @@
}
},
watch: {
move:function(val,oldval) {
if(val != oldval){
let command ={
code:this.groupNum,
operation:"602",
type:"07",
param:val
};
// if(this.drawWay == 'true'){
throttle(trainSimulationForce(this.group,this.groupNum,val),200,true);
// move:function(val,oldval) {
// if(val != oldval){
// let command ={
// code:this.groupNum,
// operation:"602",
// type:"07",
// param:val
// };
// // if(this.drawWay == 'true'){
// throttle(trainSimulationForce(this.group,this.groupNum,val),200,true);
// //
// // }else{
// // throttle(sendSimulationCommand(this.group,command),200,true);
// // }
//
// }else{
// throttle(sendSimulationCommand(this.group,command),200,true);
// }
}
},
// },
touchstate:function(val,oldval){
if(val != oldval){
// if(this.userRole == "DRIVER"){
@ -234,6 +234,9 @@
}
}
throttle(trainSimulationForce(this.group,this.groupNum, this.move),200,true);
updatemmic1(this.move);
},
speedend: function(event){
document.getElementById("div1").onmousemove = null;

View File

@ -119,7 +119,7 @@
<img class="buttonimg" :src="doorrightimg" />
<div class="buttontext">{{ $t('jlmap3d.closeRightDoor') }}</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" />
<div class="buttontext">{{ $t('jlmap3d.emergencyBraking') }}</div>
</div>
@ -140,7 +140,7 @@
<script>
import Vue from 'vue';
// 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 {
name: 'TopRightPane',
@ -425,6 +425,11 @@
},
cbtcclick: function (e){
},
ebstop: function (e){
trainSimulationEb(this.group,this.groupNum).then(netdata => {
// console.log(netdata);
});
},
updatabuttonlight: function (data){
// console.log(data);

View File

@ -8,7 +8,9 @@
</div>
<div class="display-draft">
<el-button-group>
<!-- <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="showplane">{{ showbuttonmsg }}</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 { 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';
@ -88,6 +90,9 @@ export default {
dcontrolshow: false,
msgshow:false,
controlmsg:"不能选择其它列车",
tuoguanbutton:false,
tuoguanbuttonmsg:"托管",
tuoguanstatus:false,
};
},
watch: {
@ -161,11 +166,24 @@ export default {
// this.$destroy();
}
},
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
},
mounted() {
this.mmishow = true;
window.datanew = this.datanew;
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();
},
methods: {
@ -262,6 +280,11 @@ export default {
}
},
tuoguan(){
tuoguan3ddrive(this.$route.query.group,this.tuoguanstatus,{}).then(netdata => {
console.log(netdata);
});
},
updatestatus(newdata){
this.trainnum = newdata.groupNumber;
this.$refs.mmiui.updatetrainstatus(newdata);

View File

@ -6,7 +6,7 @@
</div>
<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 class="toptext" style="left:16%;top:15px;">
@ -140,7 +140,8 @@ export default {
m9image:null,
m10state:"jinduan",
m10image:null,
c1state:"qianyin",
newc1state:"none",
c1state:"none",
c1image:null,
c2state:"rm",
c2image:null,
@ -149,8 +150,14 @@ export default {
c5state:"normal",
c5image:null,
images:null,
newa1state:"black",
a1state:"black",
}
},
mounted() {
window.updatemmic1 = this.updatemmic1;
this.init();
},
beforeDestroy() {
@ -183,8 +190,8 @@ export default {
this.m8image = this.images.m8['jinjizhidong'];
this.m9image = this.images.m9['ato'];
this.m10image = this.images.m10['jinduan'];
this.c1image = this.images.c1['qianyin'];
this.c2image = this.images.c2['rm'];
this.c1image = this.images.c1['none'];
this.c2image = this.images.c2['none'];
this.c3image = this.images.c3['normal'];
this.c5image = this.images.c5['normal'];
},
@ -204,18 +211,20 @@ export default {
},
updatetrainstatus(newdata){
//
console.log(newdata);
this.updatemmispeedview(newdata.v,newdata.pv,newdata.tv);
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.updatemmiatoatp(newdata.atoOn,newdata.atpOn);
this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
},
updatemmistate(aaa){
@ -234,6 +243,19 @@ export default {
if(this.mmimodel.updateato){
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){
if(drivedata != this.m2state){
if(drivedata == "CBTC"){
this.m2state = drivedata;
updatemmidrivemodelevel(runlevel,dirvemode,atoon,atpon){
if(runlevel != this.m2state){
if(runlevel == "CBTC"){
this.m2state = runlevel;
this.m2image = this.images.m2['cbtc'];
}else if(drivedata == "IL"){
this.m2state = drivedata;
}else if(runlevel == "IL"){
this.m2state = runlevel;
this.m2image = this.images.m2['il'];
}else{
this.m2state = drivedata;
this.m2state = runlevel;
this.m2image = this.images.m2['start'];
}
}
},
updatemmidrivemode(drivedata){
if(drivedata != this.m1state){
if(drivedata == "CM"){
this.m1state = drivedata;
if(dirvemode != this.m1state){
if(dirvemode == "CM"){
this.m1state = dirvemode;
this.m1image = this.images.m1['cm'];
}else if(drivedata == "RM"){
this.m1state = drivedata;
}else if(dirvemode == "RM"){
this.m1state = dirvemode;
this.m1image = this.images.m1['rm'];
}else if(drivedata == "AM"){
this.m1state = drivedata;
}else if(dirvemode == "AM"){
this.m1state = dirvemode;
this.m1image = this.images.m1['am'];
}else{
this.m1state = null;
this.m1image = this.images.m1['start'];
}
}
},
updatemmiatoatp(atoon,atpon){
//
if(this.m9state1 != atoon){
this.m9state1 = atoon;
@ -352,6 +366,7 @@ export default {
}else{
this.m9image = this.images.m9["ato"];
// this.c2image = this.images.c2['none'];
}
}
@ -363,6 +378,7 @@ export default {
this.m9image = this.images.m9["atp"];
}
}
},
updatemmidoormode(leftDoorCanClose,rightDoorCanClose){
if(leftDoorCanClose != this.m5stateleft|| rightDoorCanClose != this.m5stateright){
@ -417,6 +433,26 @@ export default {
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){
if(next != this.nextstation || end != this.endstation){
this.endstation = end;
@ -425,9 +461,6 @@ export default {
},
},
mounted() {
this.init();
},
beforeDestroy() {
}
}

View File

@ -192,6 +192,7 @@ export default {
this.$refs.chatCoversitionList.addCoversition(data, headerTitle);
this.isHasCoversition = true;
this.currentCoversition = {id:data.id, all:data.all};
this.memberListCoversition = {id:data.id, all:data.all};
this.headerTitle = headerTitle;
},
changeCoversition(data) {

View File

@ -181,9 +181,21 @@ export default {
let newMemberList = [];
if (res.code == 200) {
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 = playerList.filter(item => item.hasPlay === true);
}
if (res.data.mapLocation) {
this.mapLocation = res.data.mapLocation;

View File

@ -52,7 +52,7 @@
@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
v-if="isPractice"
@ -245,6 +245,8 @@ export default {
return this.mode === 'practice';
},
isDrive() {
console.log(this.mode);
console.log(this.prdType);
return this.prdType == '04';
},
isShowScheduling() {
@ -624,6 +626,11 @@ export default {
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
},
script3ddriveshow(){
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.mapId, this.group);
},
passflow() {
const routeData = this.$router.resolve({
path:'/jlmap3d/passengerflow',

View File

@ -7,6 +7,7 @@
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
</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="danger" :disabled="dataError" @click="end">初始化</el-button>
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
@ -198,6 +199,9 @@ export default {
Notification.closeAll();
});
},
jumpjlmap3d() {
this.$emit('script3ddriveshow');
},
async loadSystemTime() {
}

View File

@ -70,20 +70,27 @@ export default {
},
watch:{
'$store.state.map.activeTrainListUpdate': function (val) {
const trainList = Object.values(this.$store.state.map.activeTrainList);
if (val) {
const trainList = this.$store.state.map.map.trainList;
if (this.lineCode == '10' || this.lineCode == '11') {
this.topTrainList = trainList.filter((train)=>{
return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode;
// train.serviceNumber != '' && train.serviceNumber != undefined &&
return !train.right && train.sectionCode;
});
this.bottomTrainList = trainList.filter((train)=>{
return train.serviceNumber != '' && train.serviceNumber != undefined && train.right && train.sectionCode;
// 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 {
this.topTrainList = [];
this.bottomTrainList = [];
this.trainList = [];
}
},
'$store.state.map.runPlanStatus': function (val) {
if (!val) {

View File

@ -100,6 +100,7 @@ export default {
return this.userRole == 'STATION_SUPERVISOR';
},
isDriver() {
console.log(this.userRole);
return this.userRole == 'DRIVER';
},
isAdmin() {

View File

@ -70,7 +70,8 @@ export default {
},
watch:{
'$store.state.map.activeTrainListUpdate': function (val) {
const trainList = Object.values(this.$store.state.map.activeTrainList);
if (val) {
const trainList = this.$store.state.map.map.trainList;
if (this.lineCode == '10' || this.lineCode == '11') {
this.topTrainList = trainList.filter((train)=>{
return train.serviceNumber != '' && train.serviceNumber != undefined && !train.right && train.sectionCode;
@ -83,7 +84,11 @@ export default {
return train.serviceNumber != '' && train.serviceNumber != undefined && train.sectionCode;
});
}
} else {
this.topTrainList = [];
this.bottomTrainList = [];
this.trainList = [];
}
},
'$store.state.map.runPlanStatus': function (val) {
if (!val) {

View File

@ -112,8 +112,10 @@ export default {
// isStartCoversition
const targetNameList = [];
element.conversationMemberIds.forEach(id=>{
if (member.id != id) {
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() });
break;