Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
4a44a71d72
@ -79,8 +79,10 @@ export default {
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
this.radio = '2';
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
this.radio = '1';
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return '区故解';
|
||||
|
@ -1,78 +1,104 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog class="beijing-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
||||
:value="option.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="nameLabel" label-width="80px">
|
||||
<el-input v-model="name" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限速值" label-width="80px">
|
||||
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled"
|
||||
@change="speedSelectChange">
|
||||
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table class="table" ref="table" :data="tableData" border style="width: 100%" size="mini"
|
||||
highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="50" label="序号">
|
||||
</el-table-column>
|
||||
<el-table-column prop="date" :width="160" label="时间">
|
||||
</el-table-column>
|
||||
<el-table-column prop="context" :width="180" label="执行过程">
|
||||
</el-table-column>
|
||||
<el-table-column prop="result" label="执行结果">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="notice">{{message}}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate"></confirm-control-speed>
|
||||
</div>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm section-cmd-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="nameLabel" label-width="80px">
|
||||
<el-input v-model="name" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限速值" label-width="80px">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="speed"
|
||||
size="small"
|
||||
:disabled="spdDisabled"
|
||||
@change="speedSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
class="table"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="50" label="序号" />
|
||||
<el-table-column prop="date" :width="160" label="时间" />
|
||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||
<el-table-column prop="result" label="执行结果" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
@ -107,7 +133,7 @@ export default {
|
||||
stationName: '',
|
||||
name: '',
|
||||
speed: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
nameLabel() {
|
||||
@ -117,14 +143,14 @@ export default {
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
return '道岔名称';
|
||||
}else{
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
speedList() {
|
||||
let list = [{ name: '不限速', value: '-1' }];
|
||||
const list = [{ name: '不限速', value: '-1' }];
|
||||
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||
let speed = String(i * this.speedSpace);
|
||||
const speed = String(i * this.speedSpace);
|
||||
list.push({ name: speed, value: speed });
|
||||
}
|
||||
return list;
|
||||
@ -134,8 +160,8 @@ export default {
|
||||
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
|
||||
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
|
||||
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
|
||||
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' },
|
||||
]
|
||||
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }
|
||||
];
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
@ -264,9 +290,9 @@ export default {
|
||||
}
|
||||
},
|
||||
isCancelSpeed() {
|
||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation
|
||||
|| this.operation == OperationEvent.Switch.cancelSpeed.menu.operation
|
||||
},
|
||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
@ -294,7 +320,7 @@ export default {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
@ -310,7 +336,7 @@ export default {
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000)
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
@ -326,20 +352,20 @@ export default {
|
||||
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.name += section.name
|
||||
this.name += section.name;
|
||||
}
|
||||
}
|
||||
this.name += selected.name
|
||||
this.name += selected.name;
|
||||
}
|
||||
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.name = selected.name
|
||||
this.name = selected.name;
|
||||
}
|
||||
}
|
||||
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
@ -373,17 +399,17 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
speedSelectChange(val) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
val: val,
|
||||
}
|
||||
val: val
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.choose.operation
|
||||
operate.operation = OperationEvent.Section.setSpeed.choose.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.choose.operation
|
||||
operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||
@ -392,12 +418,12 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
command() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
}
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -429,12 +455,12 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
}
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -464,17 +490,17 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
over:true,
|
||||
type: this.type,
|
||||
val: this.speed,
|
||||
param: {
|
||||
speedLimitValue: `${this.speed}`
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -509,12 +535,12 @@ export default {
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
}
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
@ -541,13 +567,13 @@ export default {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
||||
})
|
||||
});
|
||||
},
|
||||
close() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.close.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -581,8 +607,8 @@ export default {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
@ -333,13 +333,7 @@ export default {
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeSelection.doShow(data.operate, this.selected, routes);
|
||||
this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
});
|
||||
},
|
||||
// 现地设置进路
|
||||
@ -399,25 +393,13 @@ export default {
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, routes);
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, routes);
|
||||
this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
@ -437,15 +419,19 @@ export default {
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
this.$refs.routeDetail.doShow(data.operate, this.selected, routes);
|
||||
this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
operation: data.operation,
|
||||
|
@ -23,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -237,167 +238,63 @@ export default {
|
||||
},
|
||||
// 道岔单锁
|
||||
lock(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
param: {
|
||||
switchCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
param: {
|
||||
switchCode: selectType.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, selectType);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 现地道岔强扳
|
||||
switchTurnoutForce(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
param:{
|
||||
switchCode:selectType.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, selectType);
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
param: {
|
||||
switchCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 单操到反位
|
||||
reverse(selectType) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
param: {
|
||||
switchCode: selectType.code
|
||||
},
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
// 区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 设置临时限速
|
||||
setSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
@ -8,37 +8,31 @@ export const menuOperate = {
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
axlePreReset:{
|
||||
// 区段计轴预复位
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
},
|
||||
fault:{
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
param:['sectionCode'],
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
}
|
||||
},
|
||||
@ -92,6 +86,56 @@ export const menuOperate = {
|
||||
// 查询进路状态
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
// 道岔单锁
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
unlock:{
|
||||
// 道岔解锁
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
turnoutForce:{
|
||||
// 道岔强扳
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation
|
||||
},
|
||||
locate:{
|
||||
// 单操到定位
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
reverse:{
|
||||
// 单操到反位
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置临时限速
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
}
|
||||
|
||||
},
|
||||
Stand:{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@ -102,8 +146,8 @@ export function commitOperate(operate, paramList, over) {
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
// isOnce 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over != 0) {
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
if (over == 2 || over == 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user