北京一号线指令操作调整
This commit is contained in:
parent
d50f096b0a
commit
2c4848f4db
@ -36,13 +36,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
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 CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
@ -127,64 +127,35 @@ export default {
|
||||
},
|
||||
// 取消列车进路
|
||||
cancelTrainRoute() {
|
||||
this.cancelTrainRouteFunc();
|
||||
},
|
||||
cancelTrainRouteFunc() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
messages: [`信号关灯: ${this.signalName}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Signal.signalClose, {}, 1).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.confirmControl.doShow(data.operate);
|
||||
}).catch(() => {
|
||||
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);
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
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 => {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消
|
||||
|
@ -1,53 +1,69 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="beijing-01__systerm route-detail" :title="title" :visible.sync="show" width="340px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>车站</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>进路列表</span>
|
||||
<el-table ref="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"></notice-info>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-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 { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
@ -61,8 +77,8 @@ export default {
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
}
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -78,24 +94,24 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '查询进路状态'
|
||||
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
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -115,11 +131,10 @@ export default {
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -134,10 +149,9 @@ export default {
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -148,5 +162,5 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -80,7 +80,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
@ -278,47 +278,24 @@ export default {
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||
param:{
|
||||
routeCodeList:this.selection
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||
param:{
|
||||
routeCodeList:this.selection
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -61,11 +61,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
@ -210,7 +210,6 @@ export default {
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code
|
||||
};
|
||||
@ -225,34 +224,20 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
||||
param: {
|
||||
routeCode: this.row.code
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
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();
|
||||
|
@ -45,10 +45,11 @@
|
||||
</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 NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
@ -75,7 +76,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
@ -159,48 +160,24 @@ export default {
|
||||
},
|
||||
// 区故解
|
||||
faultUnlock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.fault);
|
||||
},
|
||||
// 计轴预复位
|
||||
axlePreReset() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.axlePreReset);
|
||||
},
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.split);
|
||||
},
|
||||
// 轨道区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
this.sendCommand(menuOperate.Section.active);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -209,18 +186,14 @@ export default {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,41 +1,58 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-run-level" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationName" size="mini" disabled></el-input>
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationStrategy" size="mini" disabled></el-input>
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
|
||||
<el-table ref="table" :data="strategyList" border :cell-style="tableStyle" style="width: 100%; margin-top:10px"
|
||||
size="mini" @row-click="clickEvent" height="120" highlight-current-row :show-header="false">
|
||||
<el-table-column prop="label" :id="domIdChoose" style="margin-left:30px">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||
确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl"></confirm-control>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-run-level"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationName" size="mini" disabled />
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationStrategy" size="mini" disabled />
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="strategyList"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%; margin-top:10px"
|
||||
size="mini"
|
||||
height="120"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="label" style="margin-left:30px" />
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||
确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
@ -65,7 +82,7 @@ export default {
|
||||
{
|
||||
value: '04',
|
||||
label: '关闭'
|
||||
},
|
||||
}
|
||||
],
|
||||
stationName: '',
|
||||
stationStrategy: '',
|
||||
@ -73,13 +90,13 @@ export default {
|
||||
isConfirm: false,
|
||||
strategy: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
@ -100,17 +117,17 @@ export default {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
let stationList = [...this.stationList];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode)
|
||||
const stationList = [...this.stationList];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
this.$nextTick(() => {
|
||||
this.$refs.table.setCurrentRow(null);
|
||||
})
|
||||
});
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
this.selected = selected;
|
||||
@ -125,7 +142,7 @@ export default {
|
||||
if (item.value == opts.reentryStrategy) {
|
||||
this.stationStrategy = item.label;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
@ -138,7 +155,7 @@ export default {
|
||||
},
|
||||
clickEvent(row, column, event) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation
|
||||
};
|
||||
this.strategy = row.value;
|
||||
this.isConfirm = true;
|
||||
@ -146,7 +163,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
@ -155,10 +172,10 @@ export default {
|
||||
if (row.check && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = selection.length ? false : true;
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.selection = selection;
|
||||
}
|
||||
@ -171,25 +188,13 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
const operate = {
|
||||
over:true,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
param:{
|
||||
standReentryStrategy: this.strategy
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
||||
@ -197,7 +202,7 @@ export default {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -209,5 +214,5 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -110,10 +110,11 @@
|
||||
</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 NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
@ -142,7 +143,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
upRadioId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
|
||||
@ -252,65 +253,25 @@ export default {
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.setDetainTrain);
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
|
||||
},
|
||||
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
};
|
||||
|
||||
this.sendCommand(menuOperate.StationStand.earlyDeparture);
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -103,9 +103,10 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
@ -163,7 +164,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
return '跳停';
|
||||
@ -243,65 +244,29 @@ export default {
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
// let val = this.model.val1;
|
||||
// if (this.model.val2) {
|
||||
// val = this.model.val2 + '::' + this.model.tripNumber;
|
||||
// }
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
param:{
|
||||
trainGroupNumber:this.model.tripNumber
|
||||
}
|
||||
// val: this.selected.direction //站台的上下行方向, 01:下行 /02:上行
|
||||
// val: val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
// let val = this.model.val1;
|
||||
// if (this.model.val2) {
|
||||
// val = this.model.val2 + '::' + this.model.tripNumber;
|
||||
// }
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
param:{
|
||||
trainGroupNumber:this.model.tripNumber
|
||||
}
|
||||
// val: val // 站台的上下行方向, 01:下行 /02:上行
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
|
@ -89,7 +89,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
@ -311,27 +311,13 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||
param: {
|
||||
runLevelTime: 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();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
||||
|
@ -69,7 +69,7 @@
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StandStopTime',
|
||||
@ -210,28 +210,13 @@ export default {
|
||||
// });
|
||||
// },
|
||||
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 : 1,
|
||||
parkingAlwaysValid: this.effective == '1'
|
||||
}
|
||||
// messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`]
|
||||
};
|
||||
|
||||
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 });
|
||||
}
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then((data)=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
|
@ -173,7 +173,7 @@ export default {
|
||||
// },
|
||||
// 故障解锁
|
||||
faultUnlock(selectType) {
|
||||
commitOperate(menuOperate.Section.fault, selectType, [selectType.code]).then((data)=>{
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.sectionControl.doShow(data.operate, data.selected);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user