宁波三信号右键菜单
This commit is contained in:
parent
3508380dd1
commit
0fc9c03d2b
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menus __socpe" :style="{width: width + 'px'}">
|
<div class="menus __socpe" :style="{width: width + 'px'}">
|
||||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
||||||
<menu-station-stand ref="menuStationStand" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||||
<menu-switch ref="menuSwitch" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
<menu-switch ref="menuSwitch" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
||||||
<menu-signal ref="menuSignal" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
<menu-signal ref="menuSignal" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
||||||
<menu-section ref="menuSection" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
<menu-section ref="menuSection" :selected="selected" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @onUpdateDone="onUpdateDone" @onChangeInitInfo="onChangeInitInfo" />
|
||||||
|
@ -133,7 +133,7 @@ export default {
|
|||||||
selected() {
|
selected() {
|
||||||
return this.$store.state.menuOperation.selected;
|
return this.$store.state.menuOperation.selected;
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||||
},
|
},
|
||||||
domIdChoose1() {
|
domIdChoose1() {
|
||||||
@ -158,7 +158,7 @@ export default {
|
|||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'selected': function(val) {
|
'selected': function(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
const stand = this.$store.getters['map/getDeviceByCode'](val.code);
|
const stand = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
if (stand) {
|
if (stand) {
|
||||||
@ -176,6 +176,18 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
let index = 0;
|
||||||
|
const stand = this.stationStandList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.$refs.table.setCurrentRow(stand);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
@ -199,7 +211,7 @@ export default {
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
|
@ -202,6 +202,30 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, sure, selected) {
|
||||||
|
this.operate = operate;
|
||||||
|
this.sure = sure;
|
||||||
|
if (this.isSetSpeed) {
|
||||||
|
this.title = `${sure ? '确认/取消设置临时限速区域' : '初始化设置临时限速区域'}`;
|
||||||
|
} else {
|
||||||
|
this.title = `${sure ? '清除临时限速区域' : '初始化清除临时限速区域'}`;
|
||||||
|
this.command = true;
|
||||||
|
}
|
||||||
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.changeIgnore = sure;
|
||||||
|
let index = 0;
|
||||||
|
const section = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.$refs.singleTable1.setCurrentRow(section);
|
||||||
|
this.speedLimitValue = this.initParams.value || 0;
|
||||||
|
setTimeout(()=> {
|
||||||
|
this.$refs.singleTable1.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
this.$emit('updateDone');
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
@ -166,6 +166,28 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, sure, selected) {
|
||||||
|
this.operate = operate;
|
||||||
|
this.sure = sure;
|
||||||
|
if (sure) {
|
||||||
|
this.title = `${this.isBlock ? '确认/取消关闭轨道' : '确认/取消开放轨道'}`;
|
||||||
|
} else {
|
||||||
|
this.title = `${this.isBlock ? '初始化关闭轨道' : '初始化开放轨道'}`;
|
||||||
|
this.command = true;
|
||||||
|
}
|
||||||
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
let index = 0;
|
||||||
|
const section = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.$refs.table.setCurrentRow(section);
|
||||||
|
setTimeout(()=> {
|
||||||
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
this.$emit('updateDone');
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-table :data="tempList" highlight-current-row height="350px" @current-change="selectLine">
|
<el-table ref="sectionTable" :data="tempList" highlight-current-row height="350px" @current-change="selectLine">
|
||||||
<el-table-column prop="name" width="100" label="轨道" />
|
<el-table-column prop="name" width="100" label="轨道" />
|
||||||
<el-table-column prop="blockStatus" width="120" label="MAU">
|
<el-table-column prop="blockStatus" width="120" label="MAU">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="true">打印(P)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="true">打印(P)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" type="primary" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" type="primary" @click="cancel">关闭(C)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :disabled="true">帮助(H)</el-button>
|
<el-button :disabled="true">帮助(H)</el-button>
|
||||||
@ -81,9 +81,9 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
tempList() {
|
tempList() {
|
||||||
return this.sectionList.filter(el => ['01', '04'].includes(el.type) )
|
return this.sectionList.filter(el => ['01', '04'].includes(el.type) );
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
@ -106,12 +106,22 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
this.operate = operate;
|
this.operate = operate;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.operate = operate;
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
const index = this.tempList.findIndex(el => el.code == selected.code);
|
||||||
|
setTimeout(()=> {
|
||||||
|
this.$refs.sectionTable.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
});
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<div class="simulate_table">
|
<div id="sim_table" class="simulate_table">
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<div class="simulate_table_header" style="width: 120px;">站台</div>
|
<div class="simulate_table_header" style="width: 120px;">站台</div>
|
||||||
<div class="simulate_table_header" style="width: 120px;">扣车</div>
|
<div class="simulate_table_header" style="width: 120px;">扣车</div>
|
||||||
@ -116,6 +116,19 @@ export default {
|
|||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
|
this.judgeStatus();
|
||||||
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.selectedStandList = [selected.code];
|
||||||
|
this.allChecked = false;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
const index = this.stationStandList.findIndex(el => el.code == selected.code);
|
||||||
|
const ele = document.getElementById('sim_table');
|
||||||
|
ele.scrollTop = index * 20;
|
||||||
|
this.judgeStatus();
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row style="width: 100%;overflow-x: auto;">
|
<el-row style="width: 100%;overflow-x: auto;">
|
||||||
<el-table :data="stationStandList" height="350px">
|
<el-table ref="table" :data="stationStandList" height="350px">
|
||||||
<el-table-column prop="name" width="80" label="站台" />
|
<el-table-column prop="name" width="80" label="站台" />
|
||||||
<el-table-column prop="status" width="80" label="状态">打开</el-table-column>
|
<el-table-column prop="status" width="80" label="状态">打开</el-table-column>
|
||||||
<el-table-column prop="minTime" width="110" label="最小停站时间" />
|
<el-table-column prop="minTime" width="110" label="最小停站时间" />
|
||||||
@ -96,6 +96,16 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
const index = this.stationStandList.findIndex(el => el.code == selected.code);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
@ -103,7 +113,7 @@ export default {
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
},
|
},
|
||||||
handleClick() {
|
handleClick(mon, years) {
|
||||||
},
|
},
|
||||||
getDetainStatus(code) {
|
getDetainStatus(code) {
|
||||||
const stand = this.$store.getters['map/getDeviceByCode'](code);
|
const stand = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-tabs v-model="activeName" type="border-card" @tab-click="changeTabs">
|
<el-tabs v-model="activeName" type="border-card" @tab-click="changeTabs">
|
||||||
<el-tab-pane label="站台" name="first">
|
<el-tab-pane label="站台" name="first">
|
||||||
<div class="simulate_table">
|
<div id="sim_table" class="simulate_table">
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<div class="simulate_table_header" style="width: 120px;">站台</div>
|
<div class="simulate_table_header" style="width: 120px;">站台</div>
|
||||||
<div class="simulate_table_header" style="width: 120px;">扣车</div>
|
<div class="simulate_table_header" style="width: 120px;">扣车</div>
|
||||||
@ -127,6 +127,18 @@ export default {
|
|||||||
});
|
});
|
||||||
this.judgeStatus();
|
this.judgeStatus();
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.selectedStandList = [selected.code];
|
||||||
|
this.allChecked = false;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
const index = this.stationStandList.findIndex(el => el.code == selected.code);
|
||||||
|
const ele = document.getElementById('sim_table');
|
||||||
|
ele.scrollTop = index * 20;
|
||||||
|
this.judgeStatus();
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
clickStand(val) {
|
clickStand(val) {
|
||||||
const index = this.selectedStandList.indexOf(val.code);
|
const index = this.selectedStandList.indexOf(val.code);
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
|
@ -158,6 +158,14 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
const stand = this.centralizedStaionList.find(el => el.code == selected.code);
|
||||||
|
this.$refs.table.setCurrentRow(stand);
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
getControlApplUserId(controller, controlApplicant) {
|
getControlApplUserId(controller, controlApplicant) {
|
||||||
const memberData = this.$store.state.training.memberData;
|
const memberData = this.$store.state.training.memberData;
|
||||||
if (controller && memberData[controller] && memberData[controller].userId == this.$store.state.user.id ) {
|
if (controller && memberData[controller] && memberData[controller].userId == this.$store.state.user.id ) {
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-table
|
<el-table
|
||||||
|
:id="domIdChoose"
|
||||||
ref="table"
|
ref="table"
|
||||||
:data="switchList"
|
:data="switchList"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
height="300px"
|
height="300px"
|
||||||
:id="domIdChoose"
|
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
>
|
||||||
<el-table-column prop="name" width="80" label="道岔" />
|
<el-table-column prop="name" width="80" label="道岔" />
|
||||||
@ -61,8 +61,7 @@ export default {
|
|||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
isActive: false
|
||||||
isActive: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -96,15 +95,15 @@ export default {
|
|||||||
if (this.show) {
|
if (this.show) {
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'selected': function(val) {
|
'selected': function(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
const swchEle = this.$store.getters['map/getDeviceByCode'](val.code);
|
const swchEle = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
if (swchEle && swchEle.cutOff) {
|
if (swchEle && swchEle.cutOff) {
|
||||||
this.status = true;
|
this.status = true;
|
||||||
} else {
|
} else {
|
||||||
this.status = false;
|
this.status = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -117,6 +116,18 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
let index = 0;
|
||||||
|
const switchEle = this.switchList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.$refs.table.setCurrentRow(switchEle);
|
||||||
|
setTimeout(()=> {
|
||||||
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
@ -127,13 +138,13 @@ export default {
|
|||||||
const step = {
|
const step = {
|
||||||
over: true,
|
over: true,
|
||||||
cmdType: this.status ? CMD.Switch.CMD_SWITCH_ACTIVE : CMD.Switch.CMD_SWITCH_CUT_OFF,
|
cmdType: this.status ? CMD.Switch.CMD_SWITCH_ACTIVE : CMD.Switch.CMD_SWITCH_CUT_OFF,
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm.operation: OperationEvent.Command.common.apply.operation,
|
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||||
param: { switchCode: this.selected.code}
|
param: { switchCode: this.selected.code}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -145,22 +156,22 @@ export default {
|
|||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getSwitchCutOff(code) {
|
getSwitchCutOff(code) {
|
||||||
const swchEle = this.$store.getters['map/getDeviceByCode'](code);
|
const swchEle = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (!!swchEle.cutOff) {
|
if (swchEle.cutOff) {
|
||||||
return '未激活';
|
return '未激活';
|
||||||
} else {
|
} else {
|
||||||
return '激活';
|
return '激活';
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" v-if="sure">
|
<el-col v-if="sure" :span="6">
|
||||||
<div class="radio-box-title">命令</div>
|
<div class="radio-box-title">命令</div>
|
||||||
<div class="radio-box">
|
<div class="radio-box">
|
||||||
<el-radio v-model="command" :label="true" style="display: block;margin-bottom: 10px;">确认</el-radio>
|
<el-radio v-model="command" :label="true" style="display: block;margin-bottom: 10px;">确认</el-radio>
|
||||||
@ -61,41 +61,41 @@ import { mapGetters } from 'vuex';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
|
||||||
initCacheMap: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
initInfo: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
updateDone: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
initCacheMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initInfo: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateDone: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
standStatus: true,
|
standStatus: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
command: true,
|
command: true,
|
||||||
sure: false,
|
sure: false,
|
||||||
operate: {},
|
operate: {},
|
||||||
currentSelect: null,
|
currentSelect: null,
|
||||||
noInit: true,
|
noInit: true,
|
||||||
changeIgnore: false,
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -105,21 +105,21 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
tempList() {
|
tempList() {
|
||||||
return this.switchList;
|
return this.switchList;
|
||||||
},
|
},
|
||||||
initSelect() {
|
initSelect() {
|
||||||
return this.initInfo.initSelect||{};
|
return this.initInfo.initSelect || {};
|
||||||
},
|
},
|
||||||
isBlock() {
|
isBlock() {
|
||||||
return this.operate && this.operate.operation.includes(OperationEvent.Command.commandNingBo3.line_switch_block.operation);
|
return this.operate && this.operate.operation.includes(OperationEvent.Command.commandNingBo3.line_switch_block.operation);
|
||||||
},
|
},
|
||||||
cmdType() {
|
cmdType() {
|
||||||
return this.isBlock ? CMD.Switch.CMD_SWITCH_BLOCK : CMD.Switch.CMD_SWITCH_UNBLOCK;
|
return this.isBlock ? CMD.Switch.CMD_SWITCH_BLOCK : CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||||
},
|
},
|
||||||
disabled() {
|
disabled() {
|
||||||
return !this.currentSelect || (this.isBlock? this.currentSelect.blockade: !this.currentSelect.blockade) || this.noInit;
|
return !this.currentSelect || (this.isBlock ? this.currentSelect.blockade : !this.currentSelect.blockade) || this.noInit;
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||||
},
|
},
|
||||||
@ -139,82 +139,104 @@ export default {
|
|||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateDone() {
|
updateDone() {
|
||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code]||{}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCacheMap() {
|
getCacheMap() {
|
||||||
return this.initCacheMap[this.cmdType.value]||{};
|
return this.initCacheMap[this.cmdType.value] || {};
|
||||||
},
|
},
|
||||||
doShow(operate, sure) {
|
doShow(operate, sure) {
|
||||||
this.operate = operate;
|
this.operate = operate;
|
||||||
this.sure = sure;
|
this.sure = sure;
|
||||||
|
|
||||||
if (sure) {
|
if (sure) {
|
||||||
this.title = `${this.isBlock ? '确认/取消道岔封锁' : '确认/取消道岔解除封锁'}`;
|
this.title = `${this.isBlock ? '确认/取消道岔封锁' : '确认/取消道岔解除封锁'}`;
|
||||||
} else {
|
} else {
|
||||||
this.title = `${this.isBlock ? '初始化道岔封锁': '初始化解除封锁'}`;
|
this.title = `${this.isBlock ? '初始化道岔封锁' : '初始化解除封锁'}`;
|
||||||
this.command = true;
|
this.command = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.currentSelect = sure? this.$store.getters['map/getDeviceByCode'](this.initSelect.code): null
|
this.currentSelect = sure ? this.$store.getters['map/getDeviceByCode'](this.initSelect.code) : null;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure
|
this.changeIgnore = sure;
|
||||||
this.$refs.table.setCurrentRow(sure? this.tempList.find(el => el.code == this.initSelect.code): null);
|
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
rightClickShow(operate, sure, selected) {
|
||||||
|
this.operate = operate;
|
||||||
|
this.sure = sure;
|
||||||
|
if (sure) {
|
||||||
|
this.title = `${this.isBlock ? '确认/取消道岔封锁' : '确认/取消道岔解除封锁'}`;
|
||||||
|
} else {
|
||||||
|
this.title = `${this.isBlock ? '初始化道岔封锁' : '初始化解除封锁'}`;
|
||||||
|
this.command = true;
|
||||||
|
}
|
||||||
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
let index = 0;
|
||||||
|
const switchEle = this.tempList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.$refs.table.setCurrentRow(switchEle);
|
||||||
|
setTimeout(()=> {
|
||||||
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
this.$emit('updateDone');
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.sure && (this.currentSelect = null);
|
this.sure && (this.currentSelect = null);
|
||||||
this.sure && this.$refs.table.setCurrentRow();
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||||
)
|
);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit(isClose = false) {
|
commit(isClose = false) {
|
||||||
if (this.currentSelect &&
|
if (this.currentSelect &&
|
||||||
this.currentSelect.code == this.initSelect.code) {
|
this.currentSelect.code == this.initSelect.code) {
|
||||||
const cacheMap= this.getCacheMap()
|
const cacheMap = this.getCacheMap();
|
||||||
const isOK = this.command&&(!this.sure || this.sure&&cacheMap[this.currentSelect.code])
|
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
||||||
const operate = {
|
const operate = {
|
||||||
cmdType: this.sure&&isOK ? this.cmdType : null,
|
cmdType: this.sure && isOK ? this.cmdType : null,
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||||
over: this.sure,
|
over: this.sure,
|
||||||
param: { switchCode: this.currentSelect.code }
|
param: { switchCode: this.currentSelect.code }
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (isOK) {
|
if (isOK) {
|
||||||
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, {done: this.sure? 'two': 'one'});
|
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, {done: this.sure ? 'two' : 'one'});
|
||||||
} else {
|
} else {
|
||||||
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
this.$store.dispatch('map/flushMapRef');
|
this.$store.dispatch('map/flushMapRef');
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('两次选择不一致');
|
this.$messageBox('两次选择不一致');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
@ -223,34 +245,34 @@ export default {
|
|||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.changeIgnore = false;
|
this.changeIgnore = false;
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getSwitchStatus(code) {
|
getSwitchStatus(code) {
|
||||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
return elem.blockade? '锁闭的': '未锁闭的';
|
return elem.blockade ? '锁闭的' : '未锁闭的';
|
||||||
},
|
},
|
||||||
getProcess(code, type) {
|
getProcess(code, type) {
|
||||||
const blockType = this.isBlock ? 'block': 'unblock';
|
const blockType = this.isBlock ? 'block' : 'unblock';
|
||||||
const cacheMap = this.getCacheMap();
|
const cacheMap = this.getCacheMap();
|
||||||
const cache = cacheMap[code];
|
const cache = cacheMap[code];
|
||||||
if (blockType==type) {
|
if (blockType == type) {
|
||||||
if (cache) {
|
if (cache) {
|
||||||
if (this.sure) {
|
if (this.sure) {
|
||||||
return cache.done == 'two' ? this.isBlock ? '确认锁闭完成' : '确认解锁完成' : '等待确认/取消';
|
return cache.done == 'two' ? this.isBlock ? '确认锁闭完成' : '确认解锁完成' : '等待确认/取消';
|
||||||
} else {
|
} else {
|
||||||
return cache.done == 'one' ? '已初始化' : ''
|
return cache.done == 'one' ? '已初始化' : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -260,7 +282,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,21 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.mode = '';
|
||||||
|
this.position = '';
|
||||||
|
this.$nextTick(function () {
|
||||||
|
let index = 0;
|
||||||
|
const switchEle = this.switchList.find((el, i) => { index = i; return el.code == selected.code; });
|
||||||
|
this.$refs.table.setCurrentRow(switchEle);
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
this.handleCurrentChange(switchEle);
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="switchList" height="350px">
|
<el-table ref="table" :data="switchList" height="350px">
|
||||||
<el-table-column prop="name" width="80" label="道岔" />
|
<el-table-column prop="name" width="80" label="道岔" />
|
||||||
<el-table-column prop="position" width="80" label="位置">
|
<el-table-column prop="position" width="80" label="位置">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -94,6 +94,14 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
rightClickShow(operate, selected) {
|
||||||
|
this.operate = operate;
|
||||||
|
this.dialogShow = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
const index = this.switchList.findIndex(el => el.code == selected.code);
|
||||||
|
this.$refs.table.bodyWrapper.scrollTop = index * 20;
|
||||||
|
}, 200);
|
||||||
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
@ -1,45 +1,42 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl" pop-class="ningbo-01__systerm" />
|
|
||||||
<section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
|
|
||||||
<speed-limit-control ref="speedLimitControl" pop-class="ningbo-01__systerm" />
|
|
||||||
<alxe-effective ref="alxeEffective" />
|
|
||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||||
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
|
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
|
||||||
<load-spare-train ref="loadSpareTrain" pop-class="foshan-01__systerm" />
|
<load-spare-train ref="loadSpareTrain" pop-class="foshan-01__systerm" />
|
||||||
|
<section-open ref="sectionOpen" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @updateDone="onUpdateDone" @initSelect="onChangeInitInfo" />
|
||||||
|
<section-limit-speed ref="sectionLimitSpeed" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @updateDone="onUpdateDone" @initSelect="onChangeInitInfo" />
|
||||||
|
<section-show ref="sectionShow" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
|
||||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||||
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
|
||||||
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
|
|
||||||
import AlxeEffective from './dialog/alxeEffective';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
|
import SectionOpen from './menuDialog/sectionOpen';
|
||||||
|
import SectionLimitSpeed from './menuDialog/sectionLimitSpeed';
|
||||||
|
import SectionShow from './menuDialog/sectionShow';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
components: {
|
components: {
|
||||||
|
SectionLimitSpeed,
|
||||||
PopMenu,
|
PopMenu,
|
||||||
SectionControl,
|
|
||||||
SectionUnLock,
|
|
||||||
SpeedLimitControl,
|
|
||||||
AlxeEffective,
|
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
TrainAddPlan,
|
TrainAddPlan,
|
||||||
SetFault,
|
SetFault,
|
||||||
LoadSpareTrain
|
LoadSpareTrain,
|
||||||
|
SectionOpen,
|
||||||
|
SectionShow
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -47,6 +44,24 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
initCacheMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initInfo: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateDone: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -71,26 +86,67 @@ export default {
|
|||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
// {
|
{
|
||||||
// label: '区段跟踪激活',
|
label: '开放',
|
||||||
// handler: this.active,
|
children: [
|
||||||
// cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
{
|
||||||
// },
|
label: '初始化',
|
||||||
// {
|
handler: this.handlerInitOpen
|
||||||
// label: '区段跟踪切除',
|
},
|
||||||
// handler: this.split,
|
{
|
||||||
// cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
label: '确定/取消',
|
||||||
// },
|
handler: this.handlerOpen
|
||||||
// {
|
}
|
||||||
// label: '确认计轴有效',
|
]
|
||||||
// handler: this.alxeEffective,
|
},
|
||||||
// cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
{
|
||||||
// },
|
label: '关闭',
|
||||||
// {
|
children: [
|
||||||
// label: '设置临时限速',
|
{
|
||||||
// handler: this.setSpeed,
|
label: '初始化',
|
||||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
handler: this.handlerInitClose
|
||||||
// }
|
},
|
||||||
|
{
|
||||||
|
label: '确定/取消',
|
||||||
|
handler: this.handlerClose
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '临时限速',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: '设置',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: '初始化',
|
||||||
|
handler: this.handlerInitSetLimit
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '确定/取消',
|
||||||
|
handler: this.handlerSetLimit
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '清除',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: '初始化',
|
||||||
|
handler: this.handlerInitCancelLimit
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '确定/取消',
|
||||||
|
handler: this.handlerCancelLimit
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '显示',
|
||||||
|
handler: this.handlerDetail
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
@ -144,7 +200,8 @@ export default {
|
|||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
if (this.selected.type != '04') {
|
if (this.selected.type != '04') {
|
||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
this.menu = this.menuNormal.Center;
|
||||||
} else {
|
} else {
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
}
|
}
|
||||||
@ -153,6 +210,12 @@ export default {
|
|||||||
this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onUpdateDone() {
|
||||||
|
this.$emit('onUpdateDone');
|
||||||
|
},
|
||||||
|
onChangeInitInfo(initSelect, initParams) {
|
||||||
|
this.$emit('onChangeInitInfo', initSelect, initParams);
|
||||||
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
@ -251,6 +314,33 @@ export default {
|
|||||||
this.$refs.loadSpareTrain.doShow(operate, this.selected);
|
this.$refs.loadSpareTrain.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
handlerInitOpen() {
|
||||||
|
this.$refs.sectionOpen.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_open_init, false, this.selected);
|
||||||
|
},
|
||||||
|
handlerOpen() {
|
||||||
|
this.$refs.sectionOpen.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_open_sure, true, this.selected);
|
||||||
|
},
|
||||||
|
handlerInitClose() {
|
||||||
|
this.$refs.sectionOpen.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_close_init, false, this.selected);
|
||||||
|
},
|
||||||
|
handlerClose() {
|
||||||
|
this.$refs.sectionOpen.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_close_sure, true, this.selected);
|
||||||
|
},
|
||||||
|
handlerInitSetLimit() {
|
||||||
|
this.$refs.sectionLimitSpeed.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_setSpeed_init, false, this.selected);
|
||||||
|
},
|
||||||
|
handlerSetLimit() {
|
||||||
|
this.$refs.sectionLimitSpeed.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_setSpeed_sure, true, this.selected);
|
||||||
|
},
|
||||||
|
handlerInitCancelLimit() {
|
||||||
|
this.$refs.sectionLimitSpeed.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_clearSpeed_init, false, this.selected);
|
||||||
|
},
|
||||||
|
handlerCancelLimit() {
|
||||||
|
this.$refs.sectionLimitSpeed.rightClickShow(OperationEvent.Command.commandNingBo3.line_section_clearSpeed_sure, true, this.selected);
|
||||||
|
},
|
||||||
|
handlerDetail() {
|
||||||
|
this.$refs.sectionShow.rightClickShow('', this.selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -227,30 +227,6 @@ export default {
|
|||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置通过模式
|
|
||||||
singalPassModel() {
|
|
||||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消通过模式
|
|
||||||
singalCancelPassModel() {
|
|
||||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.routeControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 人工解锁进路(信号机取消引导)
|
|
||||||
humanTrainRoute() {
|
|
||||||
commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
|
@ -69,19 +69,28 @@ export default {
|
|||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
// {
|
// {
|
||||||
// label: '所有进路自排关',
|
// label: '开放/关闭',
|
||||||
// handler: this.humanControlALL,
|
// handler: ''
|
||||||
// cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '所有进路自排开',
|
// label: '设置/取消扣车',
|
||||||
// handler: this.atsAutoControlALL,
|
// handler: ''
|
||||||
// cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '执行关键操作测试',
|
// label: '设置站间列车数量',
|
||||||
// handler: this.execKeyOperationTest,
|
// handler: ''
|
||||||
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
// },
|
||||||
|
// {
|
||||||
|
// label: '分配停站时间',
|
||||||
|
// handler: ''
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: '授权转移',
|
||||||
|
// handler: ''
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: '显示',
|
||||||
|
// handler: ''
|
||||||
// }
|
// }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -1,45 +1,41 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<stand-control ref="standControl" system-name="ningbo-01__systerm" />
|
|
||||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="ningbo-01__systerm" />
|
|
||||||
<stand-detail ref="standDetail" pop-class="ningbo-01__systerm" />
|
|
||||||
<stand-run-level ref="standRunLevel" system-name="ningbo-01__systerm" />
|
|
||||||
<stand-stop-time ref="standStopTime" system-name="ningbo-01__systerm" />
|
|
||||||
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
|
||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||||
|
<stand-control ref="standControl" />
|
||||||
|
<stand-detain ref="standDetain" />
|
||||||
|
<allocate-time ref="allocateTime" />
|
||||||
|
<station-transfer ref="stationTransfer" />
|
||||||
|
<stand-detail ref="standDetail" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
|
||||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
|
||||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||||
import StandDetail from '@/jmapNew/theme/components/menus/dialog/standDetail';
|
|
||||||
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 '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
|
import StandControl from './menuDialog/standControl';
|
||||||
|
import StandDetain from './menuDialog/standDetain';
|
||||||
|
import StandDetail from './menuDialog/standDetail';
|
||||||
|
import AllocateTime from './menuDialog/allocateTime';
|
||||||
|
import StationTransfer from './menuDialog/stationTransfer';
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
StandControl,
|
|
||||||
StandJumpStopControl,
|
|
||||||
StandBulkBuckleTrain,
|
|
||||||
StandDetail,
|
|
||||||
StandRunLevel,
|
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
StandStopTime,
|
StandControl,
|
||||||
SetFault
|
SetFault,
|
||||||
|
StandDetain,
|
||||||
|
AllocateTime,
|
||||||
|
StationTransfer,
|
||||||
|
StandDetail
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -76,66 +72,30 @@ export default {
|
|||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
// {
|
{
|
||||||
// label: '扣车',
|
label: '开放/关闭',
|
||||||
// handler: this.setDetainTrain,
|
handler: this.handlerOpenOrClose
|
||||||
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
},
|
||||||
// },
|
{
|
||||||
// {
|
label: '设置/取消扣车',
|
||||||
// label: '取消扣车',
|
handler: this.handlerDetain
|
||||||
// handler: this.cancelDetainTrain,
|
},
|
||||||
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
{
|
||||||
// },
|
label: '设置站间列车数量',
|
||||||
// {
|
handler: this.undeveloped
|
||||||
// label: '批量扣车',
|
},
|
||||||
// handler: this.setBulkBuckleTrain,
|
{
|
||||||
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
label: '分配停站时间',
|
||||||
// },
|
handler: this.handlerAllocateTime
|
||||||
// {
|
},
|
||||||
// label: '批量取消扣车',
|
{
|
||||||
// handler: this.cancelBulkBuckleTrain,
|
label: '授权转移',
|
||||||
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
handler: this.handlerStationTransfer
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// label: '提前发车',
|
label: '显示',
|
||||||
// handler: this.earlyDeparture,
|
handler: this.handlerDetail
|
||||||
// cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
}
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '设置跳停',
|
|
||||||
// handler: this.setJumpStop,
|
|
||||||
// cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '取消跳停',
|
|
||||||
// handler: this.cancelJumpStop,
|
|
||||||
// cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '设置停站时间',
|
|
||||||
// handler: this.setStopTime,
|
|
||||||
// cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '设置运行等级',
|
|
||||||
// handler: this.setRunLevel,
|
|
||||||
// cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '区间列车数量限制',
|
|
||||||
// handler: this.setDetainTrainAll,
|
|
||||||
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '取消区间列车数量限制',
|
|
||||||
// handler: this.cancelDetainTrainAll,
|
|
||||||
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '查看站台信息',
|
|
||||||
// handler: this.detail,
|
|
||||||
// cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
|
||||||
// }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
@ -173,7 +133,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
this.menu = this.menuNormal.Center;
|
||||||
|
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
@ -207,99 +168,25 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置扣车
|
handlerOpenOrClose() {
|
||||||
setDetainTrain() {
|
this.$refs.standControl.rightClickShow('', this.selected);
|
||||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 取消扣车
|
handlerDetain() {
|
||||||
cancelDetainTrain() {
|
this.$refs.standDetain.rightClickShow('', this.selected);
|
||||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 区间列车数量限制
|
handlerAllocateTime() {
|
||||||
setDetainTrainAll() {
|
this.$refs.allocateTime.rightClickShow('', this.selected);
|
||||||
commitOperate(menuOperate.StationStand.setDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 取消区间列车数量限制
|
handlerStationTransfer() {
|
||||||
cancelDetainTrainAll() {
|
this.$refs.stationTransfer.rightClickShow('', this.selected);
|
||||||
commitOperate(menuOperate.StationStand.cancelDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 批量扣车
|
handlerDetail() {
|
||||||
setBulkBuckleTrain() {
|
this.$refs.standDetail.rightClickShow('', this.selected);
|
||||||
commitOperate(menuOperate.StationStand.setBulkBuckleTrain, {}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standBulkBuckleTrain.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 批量取消扣车
|
undeveloped() {
|
||||||
cancelBulkBuckleTrain() {
|
this.$alert('实现中......', '提示', {
|
||||||
commitOperate(menuOperate.StationStand.cancelBulkBuckleTrain, {}, 0).then(({valid, operate})=>{
|
confirmButtonText: '确定',
|
||||||
if (valid) {
|
callback: action => {
|
||||||
this.$refs.standBulkBuckleTrain.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置跳停
|
|
||||||
setJumpStop() {
|
|
||||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消跳停
|
|
||||||
cancelJumpStop() {
|
|
||||||
commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standJumpStopControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置停站时间
|
|
||||||
setStopTime() {
|
|
||||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standStopTime.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置运行等级
|
|
||||||
setRunLevel() {
|
|
||||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standRunLevel.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置提前发车
|
|
||||||
earlyDeparture() {
|
|
||||||
commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 查询站台状态
|
|
||||||
detail() {
|
|
||||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.standDetail.doShow(operate, this.selected);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,43 +1,36 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<switch-control ref="switchControl" pop-class="ningbo-01__systerm" />
|
|
||||||
<section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
|
|
||||||
<speed-limit-control ref="speedLimitControl" pop-class="ningbo-01__systerm" />
|
|
||||||
<alxe-effective ref="alxeEffective" />
|
|
||||||
<switch-hook-lock ref="switchHookLock" pop-class="ningbo-01__systerm" />
|
|
||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
<switch-command ref="switchCommand" />
|
||||||
|
<switch-block ref="switchBlock" :init-cache-map="initCacheMap" :init-info="initInfo" :update-done="updateDone" @updateDone="onUpdateDone" @initSelect="onChangeInitInfo" />
|
||||||
|
<switch-active ref="switchActive" />
|
||||||
|
<switch-detail ref="switchDetail" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
|
||||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
|
||||||
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
|
||||||
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
|
|
||||||
import AlxeEffective from './dialog/alxeEffective';
|
|
||||||
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import SwitchCommand from './menuDialog/switchCommand';
|
||||||
|
import SwitchBlock from './menuDialog/switchBlock';
|
||||||
|
import SwitchActive from './menuDialog/switchActive';
|
||||||
|
import SwitchDetail from './menuDialog/switchDetail';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchMenu',
|
name: 'SwitchMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
SwitchControl,
|
|
||||||
SectionUnLock,
|
|
||||||
SpeedLimitControl,
|
|
||||||
AlxeEffective,
|
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
SetFault,
|
SwitchCommand,
|
||||||
SwitchHookLock
|
SwitchBlock,
|
||||||
|
SwitchActive,
|
||||||
|
SwitchDetail
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -45,6 +38,24 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
initCacheMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initInfo: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateDone: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -84,55 +95,54 @@ export default {
|
|||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
// {
|
{
|
||||||
// label: '定操',
|
label: '命令',
|
||||||
// handler: this.locate,
|
handler: this.handlerCommand
|
||||||
// cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
},
|
||||||
// },
|
{
|
||||||
// {
|
label: '封锁',
|
||||||
// label: '反操',
|
children: [
|
||||||
// handler: this.reverse,
|
{
|
||||||
// cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
label: '初始化',
|
||||||
// },
|
handler: this.handlerInitBlock
|
||||||
// {
|
},
|
||||||
// label: '道岔单锁',
|
{
|
||||||
// handler: this.lock,
|
label: '确定/取消',
|
||||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
handler: this.handlerBlock
|
||||||
// },
|
}
|
||||||
// {
|
]
|
||||||
// type: 'separator'
|
},
|
||||||
// },
|
{
|
||||||
// {
|
label: '解除封锁',
|
||||||
// label: '区段激活',
|
children: [
|
||||||
// handler: this.active,
|
{
|
||||||
// cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
label: '初始化',
|
||||||
// },
|
handler: this.handlerInitUnblock
|
||||||
// {
|
},
|
||||||
// label: '区段切除',
|
{
|
||||||
// handler: this.split,
|
label: '确定/取消',
|
||||||
// cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
handler: this.handlerUnblock
|
||||||
// },
|
}
|
||||||
// {
|
]
|
||||||
// type: 'separator'
|
},
|
||||||
// },
|
{
|
||||||
// {
|
label: '请求动岔',
|
||||||
// label: '确认计轴有效',
|
children: [
|
||||||
// handler: this.alxeEffective,
|
{
|
||||||
// cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
label: '请求或授权/取消',
|
||||||
// },
|
handler: this.handlerActive
|
||||||
// {
|
},
|
||||||
// label: '设置临时限速',
|
{
|
||||||
// handler: this.setSpeed,
|
label: '显示',
|
||||||
// cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
disabled: true,
|
||||||
// },
|
handler: this.undeveloped
|
||||||
// {
|
}
|
||||||
// type: 'separator'
|
]
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// label: '查看公里标',
|
label: '显示',
|
||||||
// handler: this.undeveloped,
|
handler: this.handlerDetail
|
||||||
// cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
}
|
||||||
// }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
@ -170,7 +180,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
|
this.menu = this.menuNormal.Center;
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
// if (!this.$store.state.scriptRecord.bgSet) {
|
// if (!this.$store.state.scriptRecord.bgSet) {
|
||||||
@ -184,6 +195,12 @@ export default {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onUpdateDone() {
|
||||||
|
this.$emit('onUpdateDone');
|
||||||
|
},
|
||||||
|
onChangeInitInfo(initSelect, initParams) {
|
||||||
|
this.$emit('onChangeInitInfo', initSelect, initParams);
|
||||||
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.initMenu();
|
this.initMenu();
|
||||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||||
@ -195,86 +212,6 @@ export default {
|
|||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 定操定位
|
|
||||||
locate() {
|
|
||||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 定操反位
|
|
||||||
reverse() {
|
|
||||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 道岔单锁
|
|
||||||
lock() {
|
|
||||||
commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 道岔单解
|
|
||||||
unlock() {
|
|
||||||
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 道岔封锁
|
|
||||||
block() {
|
|
||||||
commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 道岔解封
|
|
||||||
unblock() {
|
|
||||||
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 区段切除
|
|
||||||
split() {
|
|
||||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 区段激活
|
|
||||||
active() {
|
|
||||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 设置临时限速
|
|
||||||
setSpeed() {
|
|
||||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 确认计轴有效
|
|
||||||
alxeEffective() {
|
|
||||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.alxeEffective.doShow(operate, this.selected);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
undeveloped() {
|
undeveloped() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$alert('实现中......', '提示', {
|
this.$alert('实现中......', '提示', {
|
||||||
@ -302,6 +239,27 @@ export default {
|
|||||||
// 道岔钩锁
|
// 道岔钩锁
|
||||||
hookLock() {
|
hookLock() {
|
||||||
this.$refs.switchHookLock.doShow(this.selected);
|
this.$refs.switchHookLock.doShow(this.selected);
|
||||||
|
},
|
||||||
|
handlerCommand() {
|
||||||
|
this.$refs.switchCommand.rightClickShow('', this.selected);
|
||||||
|
},
|
||||||
|
handlerInitBlock() {
|
||||||
|
this.$refs.switchBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_switch_block_init, false, this.selected);
|
||||||
|
},
|
||||||
|
handlerBlock() {
|
||||||
|
this.$refs.switchBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_switch_block_sure, true, this.selected);
|
||||||
|
},
|
||||||
|
handlerInitUnblock() {
|
||||||
|
this.$refs.switchBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_switch_unblock_init, false, this.selected);
|
||||||
|
},
|
||||||
|
handlerUnblock() {
|
||||||
|
this.$refs.switchBlock.rightClickShow(OperationEvent.Command.commandNingBo3.line_switch_unblock_sure, true, this.selected);
|
||||||
|
},
|
||||||
|
handlerActive() {
|
||||||
|
this.$refs.switchActive.rightClickShow('', this.selected);
|
||||||
|
},
|
||||||
|
handlerDetail() {
|
||||||
|
this.$refs.switchDetail.rightClickShow('', this.selected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.8.169:9000'; // 旭强
|
// BASE_API = 'http://192.168.8.169:9000'; // 旭强
|
||||||
BASE_API = 'http://192.168.3.203:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.203:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
|
Loading…
Reference in New Issue
Block a user