This commit is contained in:
joylink_cuiweidong 2020-12-28 17:23:39 +08:00
commit 6c3ebbe03e
15 changed files with 273 additions and 145 deletions

View File

@ -154,10 +154,7 @@ export default {
const stationIndex = this.sortStationList.findIndex((item) => item.code == selected.stationCode); const stationIndex = this.sortStationList.findIndex((item) => item.code == selected.stationCode);
if (selected.right) { if (selected.right) {
const nextStation = this.sortStationList[stationIndex + 1]; const nextStation = this.sortStationList[stationIndex + 1];
let nextStationStand = ''; const nextStationStand = this.stationStandList.find(stand => stand.stationCode === nextStation.code && stand.right);
this.stationStandList.forEach(stand => {
if (stand.stationCode === nextStation.code && stand.right) { nextStationStand = stand; }
});
nextStation && nextStationStand && this.tempData.push({ nextStation && nextStationStand && this.tempData.push({
name: `${nextStationStand.name}(${nextStation.name})`, name: `${nextStationStand.name}(${nextStation.name})`,
time: selected.runLevelTime ? selected.runLevelTime : 0, time: selected.runLevelTime ? selected.runLevelTime : 0,
@ -165,11 +162,7 @@ export default {
}); });
} else { } else {
const nextStation = this.sortStationList[stationIndex - 1]; const nextStation = this.sortStationList[stationIndex - 1];
let nextStationStand = ''; const nextStationStand = this.stationStandList.find(stand => stand.stationCode === nextStation.code && !stand.right);
this.stationStandList.forEach(stand => {
if (stand.stationCode === nextStation.code && stand.right) { nextStationStand = stand; }
});
console.log(nextStation, nextStationStand, '========');
nextStation && nextStationStand && this.tempData.push({ nextStation && nextStationStand && this.tempData.push({
name: `${nextStationStand.name}(${nextStation.name})`, name: `${nextStationStand.name}(${nextStation.name})`,
time: selected.runLevelTime ? selected.runLevelTime : 0, time: selected.runLevelTime ? selected.runLevelTime : 0,

View File

@ -74,6 +74,9 @@ export default {
watch: { watch: {
isShowBar(val) { isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar'); val && this.$store.dispatch('config/updateMenuBar');
},
'$store.state.map.mapStateLoadedCount': function () {
this.$store.dispatch('map/flushMapRef');
} }
}, },
mounted() { mounted() {

View File

@ -3,7 +3,7 @@
<el-row> <el-row>
<el-table <el-table
ref="singleTable" ref="singleTable"
:data="signalList" :data="filterSignalList"
highlight-current-row highlight-current-row
height="350px" height="350px"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@ -28,10 +28,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button>应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -78,6 +78,13 @@ export default {
isBlock() { isBlock() {
return this.operate && this.operate.operation === OperationEvent.Signal.lock.menu.operation; return this.operate && this.operate.operation === OperationEvent.Signal.lock.menu.operation;
}, },
filterSignalList() {
return this.signalList.map(el => {
return this.$store.getters['map/getDeviceByCode'](el.code);
}).filter(el => {
return this.isBlock ? !el.blockade : el.blockade;
});
},
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
@ -124,7 +131,7 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose = false) {
const step = { const step = {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: this.isBlock ? OperationEvent.Signal.lock.confirm.operation : OperationEvent.Signal.unlock.confirm.operation, operation: this.isBlock ? OperationEvent.Signal.lock.confirm.operation : OperationEvent.Signal.unlock.confirm.operation,
@ -135,8 +142,10 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.signalBlock.doShow(step, this.selected); this.$refs.signalBlock.doShow(step, this.selected);
this.initEle = this.selected; this.initEle = this.selected;
isClose && this.isClose();
} }
}).catch(() => { }).catch(() => {
isClose && this.isClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -1,8 +1,8 @@
<template> <template>
<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-table :data="signalList" height="300px"> <el-table :data="signalList" height="300px" >
<el-table-column prop="id" label="ID" /> <el-table-column prop="code" label="ID" />
<el-table-column prop="mode" label="信号模式" /> <el-table-column prop="mode" label="信号模式" />
<el-table-column v-if="isCbtc" prop="status" label="CBTC可命令" /> <el-table-column v-if="isCbtc" prop="status" label="CBTC可命令" />
<el-table-column v-if="isCbtc" prop="status" label="CBTC模式进程" /> <el-table-column v-if="isCbtc" prop="status" label="CBTC模式进程" />
@ -12,10 +12,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button>应用(A)</el-button> <el-button :loading="loading" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -100,9 +100,7 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose = false) {
},
handleClick() {
}, },
cancel() { cancel() {

View File

@ -24,10 +24,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -117,7 +117,7 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose = false) {
const step = { const step = {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.lock.confirm.operation, operation: OperationEvent.Signal.lock.confirm.operation,
@ -128,8 +128,10 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.signalCanBlock.doShow(step, this.selected); this.$refs.signalCanBlock.doShow(step, this.selected);
this.initEle = this.selected; this.initEle = this.selected;
isClose && this.doClose();
} }
}).catch(() => { }).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -1,49 +1,51 @@
<template> <template>
<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"> <div>
<el-row> <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-table <el-row>
ref="singleTable" <el-table
:data="signalList" ref="singleTable"
highlight-current-row :data="signalList"
height="300px" highlight-current-row
@current-change="handleCurrentChange" height="300px"
> @current-change="handleCurrentChange"
<el-table-column prop="name" label="信号机" /> >
<el-table-column prop="blockStatus" label="显示"> <el-table-column prop="name" label="信号机" />
<template slot-scope="scope"> <el-table-column prop="blockStatus" label="显示">
<span>{{ getSignalShow(scope.row.code) }}</span> <template slot-scope="scope">
</template> <span>{{ getSignalShow(scope.row.code) }}</span>
</el-table-column> </template>
<el-table-column prop="blockProcess" label="可引导"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="blockProcess" label="可引导">
<span>{{ getCanGuide(scope.row.code) }}</span> <template slot-scope="scope">
</template> <span>{{ getCanGuide(scope.row.code) }}</span>
</el-table-column> </template>
<el-table-column prop="unblockProcess" label="引导过程" width="120"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="unblockProcess" label="引导过程" width="120">
<span>{{ getProcess(scope.row.code) }}</span> <template slot-scope="scope">
</template> <span>{{ getProcess(scope.row.code) }}</span>
</el-table-column> </template>
<el-table-column prop="unblockProcess" width="150" label="区间信号引导过程" /> </el-table-column>
</el-table> <el-table-column prop="unblockProcess" width="150" label="区间信号引导过程" />
</el-row> </el-table>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="4" :offset="1"> <el-row justify="center" class="button-group">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !selected.callOn" @click="commit">确定(O)</el-button> <el-col :span="4" :offset="1">
</el-col> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !selected.callOn" @click="commit(true)">确定(O)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !selected.callOn" @click="commit(false)">应用(A)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
<el-col :span="4" :offset="2"> </el-col>
<el-button>帮助(H)</el-button> <el-col :span="4" :offset="2">
</el-col> <el-button>帮助(H)</el-button>
</el-row> </el-col>
</el-row>
</el-dialog>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<signal-guide ref="signalGuide" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" /> <signal-guide ref="signalGuide" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog> </div>
</template> </template>
<script> <script>
@ -153,7 +155,7 @@ export default {
return ''; return '';
} }
}, },
commit() { commit(isClose = false) {
const step = { const step = {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.guide.confirm.operation, operation: OperationEvent.Signal.guide.confirm.operation,
@ -164,8 +166,10 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.signalGuide.doShow(step, this.selected); this.$refs.signalGuide.doShow(step, this.selected);
this.initEle = this.selected; this.initEle = this.selected;
isClose && this.doClose();
} }
}).catch(() => { }).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -39,7 +39,7 @@
<div class="border-box-title">CBTC</div> <div class="border-box-title">CBTC</div>
<el-table <el-table
ref="singleTable1" ref="singleTable1"
:data="routeList" :data="filterRouteList"
highlight-current-row highlight-current-row
style="position: relative;top: -15px;" style="position: relative;top: -15px;"
height="120px" height="120px"
@ -129,7 +129,7 @@
<!--<div class="border-box-title">后备</div>--> <!--<div class="border-box-title">后备</div>-->
<!--<el-table--> <!--<el-table-->
<!--ref="singleTable5"--> <!--ref="singleTable5"-->
<!--:data="routeList"--> <!--:data="filterRouteList"-->
<!--highlight-current-row--> <!--highlight-current-row-->
<!--style="position: relative;top: -15px;"--> <!--style="position: relative;top: -15px;"-->
<!--height="332px"--> <!--height="332px"-->
@ -161,10 +161,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!route" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-button :id="domIdConfirm" :loading="loading" :disabled="!route" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -204,7 +204,8 @@ export default {
beforeSectionList: [], beforeSectionList: [],
checked: false, checked: false,
unlockType: 'auto', unlockType: 'auto',
forbidRoute: false forbidRoute: false,
route: null
}; };
}, },
computed: { computed: {
@ -216,6 +217,9 @@ export default {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
filterRouteList() {
return this.routeList.filter(el => { return el.flt == {'auto': true, 'artificial': false}[this.unlockType]; });
},
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
@ -295,7 +299,11 @@ export default {
this.$refs.singleTable2.setCurrentRow(); this.$refs.singleTable2.setCurrentRow();
this.$refs.singleTable3.setCurrentRow(); this.$refs.singleTable3.setCurrentRow();
this.$refs.singleTable4.setCurrentRow(); this.$refs.singleTable4.setCurrentRow();
this.$refs.singleTable.setCurrentRow(row);
if (!row) { return; } if (!row) { return; }
this.route = row;
// //
this.restoreBeforeDevices(); // this.restoreBeforeDevices(); //
const containSectionList = []; const containSectionList = [];
@ -353,32 +361,38 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
commit() { commit(isClose = false) {
const step = { const step = {
over: true, over: true,
param: { param: {
routeCode: this.selected.code, routeCode: this.route.code,
signalCode: this.selected.startSignalCode signalCode: (this.selected || {}).startSignalCode
} }
}; };
if (this.activeName === 'first') { if (this.activeName === 'first') {
if (this.unlockType === 'auto') { if (this.unlockType === 'auto') {
step.operation = OperationEvent.Signal.atsAutoControl.confirm.operation; step.operation = OperationEvent.Signal.atsAutoControl.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING; step.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
} else if (this.unlockType === 'artificial') { } else if (this.unlockType === 'artificial') {
step.operation = OperationEvent.Signal.humanControl.confirm.operation; step.operation = OperationEvent.Signal.humanControl.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING; step.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
} }
} else if (this.activeName === 'second') { } else if (this.activeName === 'second') {
step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation; step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE; step.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
} else {
step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
} }
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.doClose(); isClose && this.doClose();
} }
}).catch(() => { }).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
@ -387,6 +401,8 @@ export default {
this.$refs.singleTable2.setCurrentRow(); this.$refs.singleTable2.setCurrentRow();
this.$refs.singleTable1.setCurrentRow(val); this.$refs.singleTable1.setCurrentRow(val);
if (!val) { return; } if (!val) { return; }
this.route = val;
const step = { const step = {
code: `${val.code}`, code: `${val.code}`,
operation: OperationEvent.Signal.atsAutoControl.choose.operation, operation: OperationEvent.Signal.atsAutoControl.choose.operation,
@ -406,6 +422,7 @@ export default {
this.$refs.singleTable1.setCurrentRow(); this.$refs.singleTable1.setCurrentRow();
this.$refs.singleTable2.setCurrentRow(val); this.$refs.singleTable2.setCurrentRow(val);
if (!val) { return; } if (!val) { return; }
const step = { const step = {
code: `${val.code}`, code: `${val.code}`,
operation: OperationEvent.Signal.atsAutoControl.choose.operation, operation: OperationEvent.Signal.atsAutoControl.choose.operation,
@ -425,6 +442,9 @@ export default {
this.$refs.singleTable4.setCurrentRow(); this.$refs.singleTable4.setCurrentRow();
this.$refs.singleTable3.setCurrentRow(val); this.$refs.singleTable3.setCurrentRow(val);
if (!val) { return; } if (!val) { return; }
this.route = val;
const step = { const step = {
code: `${val.code}`, code: `${val.code}`,
operation: OperationEvent.Signal.cancelTrainRoute.choose.operation, operation: OperationEvent.Signal.cancelTrainRoute.choose.operation,
@ -440,22 +460,23 @@ export default {
}); });
}, },
handleCurrentChange4(val) { handleCurrentChange4(val) {
this.$refs.singleTable.setCurrentRow(); // this.$refs.singleTable.setCurrentRow();
this.$refs.singleTable3.setCurrentRow(); // this.$refs.singleTable3.setCurrentRow();
this.$refs.singleTable4.setCurrentRow(val); // this.$refs.singleTable4.setCurrentRow(val);
const step = {
code: `${val.code}`, // const step = {
operation: OperationEvent.Signal.cancelTrainRoute.choose.operation, // code: `${val.code}`,
param: {} // operation: OperationEvent.Signal.cancelTrainRoute.choose.operation,
}; // param: {}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { // };
if (valid) { // this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); // if (valid) {
this.selected = val; // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} // this.selected = val;
}).catch(() => { // }
this.$refs.noticeInfo.doShow(); // }).catch(() => {
}); // this.$refs.noticeInfo.doShow();
// });
}, },
handleCurrentChange5(val) { handleCurrentChange5(val) {

View File

@ -38,10 +38,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button>应用(A)</el-button> <el-button id="domIdConfirm" :loading="loading" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -130,7 +130,7 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose = false) {
if (this.command) { if (this.command) {
const operate = { const operate = {
cmdType: this.isBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK, cmdType: this.isBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
@ -140,10 +140,11 @@ export default {
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); isClose && this.doClose();
this.$emit('commandSuccess', this.selected.code); this.$emit('commandSuccess', this.selected.code);
} }
}).catch(() => { }).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
} else { } else {

View File

@ -33,10 +33,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -121,21 +121,22 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose = false) {
const operate = { // const operate = {
cmdType: this.command ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK, // cmdType: this.command ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
operation: this.command ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation, // operation: this.command ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation,
over: true, // over: true,
param: {signalCode: this.selected.code} // param: {signalCode: this.selected.code}
}; // };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { // if (valid) {
this.doClose(); // isClose && this.doClose();
this.$emit('commandSuccess', this.selected.code); // this.$emit('commandSuccess', this.selected.code);
} // }
}).catch(() => { // }).catch(() => {
this.$refs.noticeInfo.doShow(); // isClose && this.doClose();
}); // this.$refs.noticeInfo.doShow();
// });
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.$refs.singleTable.setCurrentRow(this.selected); this.$refs.singleTable.setCurrentRow(this.selected);

View File

@ -38,10 +38,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -126,19 +126,21 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose = false) {
const operate = { const operate = {
cmdType: this.command ? CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE : CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE, cmdType: this.command ? CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE : CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE,
operation: this.command ? OperationEvent.Signal.guide.confirm1.operation : OperationEvent.Signal.cancelGuide.confirm1.operation, operation: this.command ? OperationEvent.Signal.guide.confirm1.operation : OperationEvent.Signal.cancelGuide.confirm1.operation,
over: true, over: true,
param: {signalCode: this.selected.code} param: {signalCode: this.selected.code}
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); isClose && this.doClose();
this.$emit('commandSuccess', this.selected.code); this.$emit('commandSuccess', this.selected.code);
} }
}).catch(() => { }).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -2,8 +2,13 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :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="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row> <el-row>
<el-col :span="18"> <el-col :span="18">
<el-table :data="signalList" height="300px"> <el-table
<el-table-column prop="id" label="ID" /> :data="signalList"
height="300px"
highlight-current-row
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="ID" />
<el-table-column prop="mode" label="信号模式" /> <el-table-column prop="mode" label="信号模式" />
<el-table-column v-if="isCbtc" prop="status" label="CBTC可命令" /> <el-table-column v-if="isCbtc" prop="status" label="CBTC可命令" />
<el-table-column v-if="isCbtc" prop="status" label="CBTC模式进程" /> <el-table-column v-if="isCbtc" prop="status" label="CBTC模式进程" />
@ -14,7 +19,7 @@
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
<div class="set-status-title">命令</div> <div class="set-status-title">命令</div>
<div class="set-status-box"> <div class="set-status-box">
<el-radio v-model="command" :disabled="true" :label="true">确认</el-radio> <el-radio v-model="command" :label="true">确认</el-radio>
<br> <br>
<el-radio v-model="command" :label="false">取消</el-radio> <el-radio v-model="command" :label="false">取消</el-radio>
</div> </div>
@ -22,10 +27,10 @@
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button>应用(A)</el-button> <el-button :id="domIdConfirm" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -42,6 +47,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
export default { export default {
@ -96,6 +102,9 @@ export default {
}); });
}, },
methods: { methods: {
handleCurrentChange(el) {
this.selected = el;
},
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
this.operate = operate; this.operate = operate;
@ -110,10 +119,31 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose = false) {
}, const step = {
handleClick() { over: true,
param: {
signalCode: this.selected.code
}
};
if (this.command) {
step.operation = OperationEvent.Signal.atsAutoControl.confirm.operation;
// step.cmdType = CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING;
} else {
step.command = OperationEvent.Signal.humanControl.confirm.operation;
// step.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING;
}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
isClose && this.doClose();
}
}).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow();
});
}, },
cancel() { cancel() {
const operate = { const operate = {

View File

@ -2,28 +2,36 @@
<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="18"> <el-col :span="18">
<el-table :data="signalList" height="350px"> <el-table
<el-table-column prop="id" label="ID" /> :data="filterSignalList"
height="350px"
highlight-current-row
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="ID" />
<el-table-column prop="signalModel" label="信号指示模式"> <el-table-column prop="signalModel" label="信号指示模式">
<span>灭灯模式</span> <template slot-scope="scope">
<span v-if="scope.row.greenOpen">开灯模式</span>
<span v-if="scope.row.redOpen">灭灯模式</span>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
<div class="set-status-title">命令</div> <div class="set-status-title">命令</div>
<div class="set-status-box"> <div class="set-status-box">
<el-radio v-model="signalModel" :disabled="true" label="lightingOff">灭灯</el-radio> <el-radio v-model="signalModel" :label="false">灭灯</el-radio>
<br> <br>
<el-radio v-model="signalModel" label="lightingOn">点灯</el-radio> <el-radio v-model="signalModel" :label="true">点灯</el-radio>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button>应用(A)</el-button> <el-button :id="domIdConfirm" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="2"> <el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button> <el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -40,6 +48,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
export default { export default {
@ -64,6 +73,13 @@ export default {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
filterSignalList() {
return this.signalList.map(el => {
return this.$store.getters['map/getDeviceByCode'](el.code);
}).filter(el => {
return this.signalModel ? el.redOpen : el.greenOpen;
});
},
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
@ -90,6 +106,9 @@ export default {
}); });
}, },
methods: { methods: {
handleCurrentChange(el) {
this.selected = el;
},
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
// //
@ -103,7 +122,31 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit() { commit(isClose = false) {
const step = {
over: true,
param: {
signalCode: (this.selected || {}).code
}
};
if (this.signalModel) {
step.operation = OperationEvent.Signal.atsAutoControl.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
} else {
step.command = OperationEvent.Signal.humanControl.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL;
}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
isClose && this.doClose();
}
}).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow();
});
}, },
handleClick() { handleClick() {

View File

@ -81,10 +81,10 @@ export default {
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
}, },
domIdApply() { domIdApply() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menuButton.domId : ''; return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menuButton.domId : '';
}, },
title() { title() {
return '站台开放/关闭'; return '站台开放/关闭';
} }
@ -116,13 +116,13 @@ export default {
this.$refs.singleTable.setCurrentRow(); this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
commit(isClose=false) { commit(isClose = false) {
const step = { const step = {
over: true, over: true,
cmdType:this.status ? CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP : CMD.Stand.CMD_STAND_SET_JUMP_STOP, cmdType:this.status ? CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP : CMD.Stand.CMD_STAND_SET_JUMP_STOP,
operation:this.status ? OperationEvent.StationStand.cancelJumpStop.confirm.operation : OperationEvent.StationStand.setJumpStop.confirm.operation, operation:this.status ? OperationEvent.StationStand.cancelJumpStop.confirm.operation : OperationEvent.StationStand.setJumpStop.confirm.operation,
param: {standCode: this.selected.code} param: {standCode: this.selected.code}
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
@ -130,7 +130,7 @@ export default {
isClose && this.doClose(); isClose && this.doClose();
} }
}).catch((error) => { }).catch((error) => {
isClose && this.doClose(); isClose && this.doClose();
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },

View File

@ -3,6 +3,7 @@ import { parser, updateMapData } from '@/jmapNew/utils/parser';
import Vue from 'vue'; import Vue from 'vue';
import { deepAssign } from '@/utils/index'; import { deepAssign } from '@/utils/index';
import store from '@/store/index'; import store from '@/store/index';
import {updateForList} from '../../jmapNew/utils/parser';
/** /**
* 查询受影响的Devices并删除 * 查询受影响的Devices并删除
@ -219,6 +220,7 @@ const map = {
mapList: {}, // 地图数据列表 mapList: {}, // 地图数据列表
mapViewLoadedCount: 0, // 地图视图加载完成标识 mapViewLoadedCount: 0, // 地图视图加载完成标识
mapDataLoadedCount: 0, // 地图数据加载完成标识 mapDataLoadedCount: 0, // 地图数据加载完成标识
mapStateLoadedCount: 0, // 地图状态变化完成标识
mapDataLoadedScreenCount: 0, // 大屏加载完成 mapDataLoadedScreenCount: 0, // 大屏加载完成
trainDetails: null, // 地图'列车详情'显示 trainDetails: null, // 地图'列车详情'显示
deleteCount: 0, // 绘图快捷删除标识 deleteCount: 0, // 绘图快捷删除标识
@ -638,6 +640,16 @@ const map = {
}, },
mutations: { mutations: {
// 改变地图数据索引
flushMapRef: (state) => {
state.map.sectionList = [...state.map.sectionList];
state.map.switchList = [...state.map.switchList];
state.map.signalList = [...state.map.signalList];
state.map.stationList = [...state.map.stationList];
state.map.stationStandList = [...state.map.stationStandList];
state.map.trainList = [...state.map.trainList];
state.map.trainWindowList = [...state.map.trainWindowList];
},
// 设置地图数据 // 设置地图数据
setMapData: (state, map) => { setMapData: (state, map) => {
if (map && map.skinVO) { if (map && map.skinVO) {
@ -689,6 +701,9 @@ const map = {
mapDataLoadedCountIncrement: (state) => { mapDataLoadedCountIncrement: (state) => {
state.mapDataLoadedCount += 1; state.mapDataLoadedCount += 1;
}, },
mapStateLoadedCountIncrenment: (state) => {
state.mapStateLoadedCount += 1;
},
mapViewLoadedScreenCountIncrement: (state) => { mapViewLoadedScreenCountIncrement: (state) => {
state.mapDataLoadedScreenCount += 1; state.mapDataLoadedScreenCount += 1;
}, },
@ -886,6 +901,9 @@ const map = {
}, },
actions: { actions: {
flushMapRef: ({ commit }) => {
commit('flushMapRef');
},
setMapData:({ commit }, mapData) => { setMapData:({ commit }, mapData) => {
commit('setMapData', mapData); commit('setMapData', mapData);
}, },
@ -1007,6 +1025,10 @@ const map = {
commit('mapDataLoadedCountIncrement'); commit('mapDataLoadedCountIncrement');
}, },
mapStateLoaded:({ commit }) => {
commit('mapStateLoadedCountIncrenment');
},
clearJlmapTrainView: () => { clearJlmapTrainView: () => {
if (Vue.prototype.$jlmap) { if (Vue.prototype.$jlmap) {
Vue.prototype.$jlmap.clearTrainView(); Vue.prototype.$jlmap.clearTrainView();

View File

@ -261,7 +261,8 @@ export default {
methods: { methods: {
dataLoaded: this.handleDataLoaded, dataLoaded: this.handleDataLoaded,
viewLoaded: this.handleViewLoaded, viewLoaded: this.handleViewLoaded,
stateLoaded: this.handleStateLoaded stateLoaded: this.handleStateLoaded,
stateUpdate: this.handleStateUpdate
} }
}); });
@ -322,11 +323,9 @@ export default {
handleStateLoaded() { handleStateLoaded() {
this.mapViewLoaded(false); this.mapViewLoaded(false);
}, },
//
handleViewUpdate() {
},
// //
handleStateUpdate() { handleStateUpdate() {
this.$store.dispatch('map/mapStateLoaded');
}, },
// //
handleOptionsUpdate(options) { handleOptionsUpdate(options) {