Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
6c3ebbe03e
@ -154,10 +154,7 @@ export default {
|
||||
const stationIndex = this.sortStationList.findIndex((item) => item.code == selected.stationCode);
|
||||
if (selected.right) {
|
||||
const nextStation = this.sortStationList[stationIndex + 1];
|
||||
let nextStationStand = '';
|
||||
this.stationStandList.forEach(stand => {
|
||||
if (stand.stationCode === nextStation.code && stand.right) { nextStationStand = stand; }
|
||||
});
|
||||
const nextStationStand = this.stationStandList.find(stand => stand.stationCode === nextStation.code && stand.right);
|
||||
nextStation && nextStationStand && this.tempData.push({
|
||||
name: `${nextStationStand.name}(${nextStation.name})`,
|
||||
time: selected.runLevelTime ? selected.runLevelTime : 0,
|
||||
@ -165,11 +162,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
const nextStation = this.sortStationList[stationIndex - 1];
|
||||
let nextStationStand = '';
|
||||
this.stationStandList.forEach(stand => {
|
||||
if (stand.stationCode === nextStation.code && stand.right) { nextStationStand = stand; }
|
||||
});
|
||||
console.log(nextStation, nextStationStand, '========');
|
||||
const nextStationStand = this.stationStandList.find(stand => stand.stationCode === nextStation.code && !stand.right);
|
||||
nextStation && nextStationStand && this.tempData.push({
|
||||
name: `${nextStationStand.name}(${nextStation.name})`,
|
||||
time: selected.runLevelTime ? selected.runLevelTime : 0,
|
||||
|
@ -74,6 +74,9 @@ export default {
|
||||
watch: {
|
||||
isShowBar(val) {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
},
|
||||
'$store.state.map.mapStateLoadedCount': function () {
|
||||
this.$store.dispatch('map/flushMapRef');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-row>
|
||||
<el-table
|
||||
ref="singleTable"
|
||||
:data="signalList"
|
||||
:data="filterSignalList"
|
||||
highlight-current-row
|
||||
height="350px"
|
||||
@current-change="handleCurrentChange"
|
||||
@ -28,10 +28,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<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 :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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -78,6 +78,13 @@ export default {
|
||||
isBlock() {
|
||||
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() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
@ -124,7 +131,7 @@ export default {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
commit(isClose = false) {
|
||||
const step = {
|
||||
code: `${this.selected.code}`,
|
||||
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.$refs.signalBlock.doShow(step, this.selected);
|
||||
this.initEle = this.selected;
|
||||
isClose && this.isClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.isClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
@ -1,8 +1,8 @@
|
||||
<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-row>
|
||||
<el-table :data="signalList" height="300px">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table :data="signalList" height="300px" >
|
||||
<el-table-column prop="code" label="ID" />
|
||||
<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模式进程" />
|
||||
@ -12,10 +12,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -100,9 +100,7 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
},
|
||||
handleClick() {
|
||||
commit(isClose = false) {
|
||||
|
||||
},
|
||||
cancel() {
|
||||
|
@ -24,10 +24,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<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 :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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -117,7 +117,7 @@ export default {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
commit(isClose = false) {
|
||||
const step = {
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.lock.confirm.operation,
|
||||
@ -128,8 +128,10 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.signalCanBlock.doShow(step, this.selected);
|
||||
this.initEle = this.selected;
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
@ -1,49 +1,51 @@
|
||||
<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-row>
|
||||
<el-table
|
||||
ref="singleTable"
|
||||
:data="signalList"
|
||||
highlight-current-row
|
||||
height="300px"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="name" label="信号机" />
|
||||
<el-table-column prop="blockStatus" label="显示">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getSignalShow(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="blockProcess" label="可引导">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getCanGuide(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" label="引导过程" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getProcess(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" width="150" label="区间信号引导过程" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !selected.callOn" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div>
|
||||
<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-table
|
||||
ref="singleTable"
|
||||
:data="signalList"
|
||||
highlight-current-row
|
||||
height="300px"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="name" label="信号机" />
|
||||
<el-table-column prop="blockStatus" label="显示">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getSignalShow(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="blockProcess" label="可引导">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getCanGuide(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" label="引导过程" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getProcess(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" width="150" label="区间信号引导过程" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !selected.callOn" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !selected.callOn" @click="commit(false)">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<signal-guide ref="signalGuide" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -153,7 +155,7 @@ export default {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
commit(isClose = false) {
|
||||
const step = {
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.guide.confirm.operation,
|
||||
@ -164,8 +166,10 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.signalGuide.doShow(step, this.selected);
|
||||
this.initEle = this.selected;
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
@ -39,7 +39,7 @@
|
||||
<div class="border-box-title">CBTC</div>
|
||||
<el-table
|
||||
ref="singleTable1"
|
||||
:data="routeList"
|
||||
:data="filterRouteList"
|
||||
highlight-current-row
|
||||
style="position: relative;top: -15px;"
|
||||
height="120px"
|
||||
@ -129,7 +129,7 @@
|
||||
<!--<div class="border-box-title">后备</div>-->
|
||||
<!--<el-table-->
|
||||
<!--ref="singleTable5"-->
|
||||
<!--:data="routeList"-->
|
||||
<!--:data="filterRouteList"-->
|
||||
<!--highlight-current-row-->
|
||||
<!--style="position: relative;top: -15px;"-->
|
||||
<!--height="332px"-->
|
||||
@ -161,10 +161,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<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 :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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -204,7 +204,8 @@ export default {
|
||||
beforeSectionList: [],
|
||||
checked: false,
|
||||
unlockType: 'auto',
|
||||
forbidRoute: false
|
||||
forbidRoute: false,
|
||||
route: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -216,6 +217,9 @@ export default {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
filterRouteList() {
|
||||
return this.routeList.filter(el => { return el.flt == {'auto': true, 'artificial': false}[this.unlockType]; });
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
@ -295,7 +299,11 @@ export default {
|
||||
this.$refs.singleTable2.setCurrentRow();
|
||||
this.$refs.singleTable3.setCurrentRow();
|
||||
this.$refs.singleTable4.setCurrentRow();
|
||||
this.$refs.singleTable.setCurrentRow(row);
|
||||
|
||||
if (!row) { return; }
|
||||
this.route = row;
|
||||
|
||||
// 恢复进路区段的切除状态
|
||||
this.restoreBeforeDevices(); // 清空
|
||||
const containSectionList = [];
|
||||
@ -353,32 +361,38 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
commit(isClose = false) {
|
||||
const step = {
|
||||
over: true,
|
||||
param: {
|
||||
routeCode: this.selected.code,
|
||||
signalCode: this.selected.startSignalCode
|
||||
routeCode: this.route.code,
|
||||
signalCode: (this.selected || {}).startSignalCode
|
||||
}
|
||||
};
|
||||
|
||||
if (this.activeName === 'first') {
|
||||
if (this.unlockType === 'auto') {
|
||||
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') {
|
||||
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') {
|
||||
step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation;
|
||||
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 }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
@ -387,6 +401,8 @@ export default {
|
||||
this.$refs.singleTable2.setCurrentRow();
|
||||
this.$refs.singleTable1.setCurrentRow(val);
|
||||
if (!val) { return; }
|
||||
|
||||
this.route = val;
|
||||
const step = {
|
||||
code: `${val.code}`,
|
||||
operation: OperationEvent.Signal.atsAutoControl.choose.operation,
|
||||
@ -406,6 +422,7 @@ export default {
|
||||
this.$refs.singleTable1.setCurrentRow();
|
||||
this.$refs.singleTable2.setCurrentRow(val);
|
||||
if (!val) { return; }
|
||||
|
||||
const step = {
|
||||
code: `${val.code}`,
|
||||
operation: OperationEvent.Signal.atsAutoControl.choose.operation,
|
||||
@ -425,6 +442,9 @@ export default {
|
||||
this.$refs.singleTable4.setCurrentRow();
|
||||
this.$refs.singleTable3.setCurrentRow(val);
|
||||
if (!val) { return; }
|
||||
|
||||
this.route = val;
|
||||
|
||||
const step = {
|
||||
code: `${val.code}`,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.choose.operation,
|
||||
@ -440,22 +460,23 @@ export default {
|
||||
});
|
||||
},
|
||||
handleCurrentChange4(val) {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$refs.singleTable3.setCurrentRow();
|
||||
this.$refs.singleTable4.setCurrentRow(val);
|
||||
const step = {
|
||||
code: `${val.code}`,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.choose.operation,
|
||||
param: {}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.selected = val;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
// this.$refs.singleTable.setCurrentRow();
|
||||
// this.$refs.singleTable3.setCurrentRow();
|
||||
// this.$refs.singleTable4.setCurrentRow(val);
|
||||
|
||||
// const step = {
|
||||
// code: `${val.code}`,
|
||||
// operation: OperationEvent.Signal.cancelTrainRoute.choose.operation,
|
||||
// param: {}
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.selected = val;
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
},
|
||||
handleCurrentChange5(val) {
|
||||
|
||||
|
@ -38,10 +38,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -130,7 +130,7 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
commit(isClose = false) {
|
||||
if (this.command) {
|
||||
const operate = {
|
||||
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 }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
isClose && this.doClose();
|
||||
this.$emit('commandSuccess', this.selected.code);
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
|
@ -33,10 +33,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -121,21 +121,22 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
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,
|
||||
over: true,
|
||||
param: {signalCode: this.selected.code}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$emit('commandSuccess', this.selected.code);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
commit(isClose = false) {
|
||||
// const operate = {
|
||||
// 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,
|
||||
// over: true,
|
||||
// param: {signalCode: this.selected.code}
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// isClose && this.doClose();
|
||||
// this.$emit('commandSuccess', this.selected.code);
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// isClose && this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.$refs.singleTable.setCurrentRow(this.selected);
|
||||
|
@ -38,10 +38,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -126,19 +126,21 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
commit(isClose = false) {
|
||||
const operate = {
|
||||
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,
|
||||
over: true,
|
||||
param: {signalCode: this.selected.code}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
isClose && this.doClose();
|
||||
this.$emit('commandSuccess', this.selected.code);
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
@ -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-row>
|
||||
<el-col :span="18">
|
||||
<el-table :data="signalList" height="300px">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table
|
||||
: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 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">
|
||||
<div class="set-status-title">命令</div>
|
||||
<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>
|
||||
<el-radio v-model="command" :label="false">取消</el-radio>
|
||||
</div>
|
||||
@ -22,10 +27,10 @@
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -42,6 +47,7 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
@ -96,6 +102,9 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handleCurrentChange(el) {
|
||||
this.selected = el;
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
this.operate = operate;
|
||||
@ -110,10 +119,31 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
},
|
||||
handleClick() {
|
||||
commit(isClose = false) {
|
||||
const step = {
|
||||
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() {
|
||||
const operate = {
|
||||
|
@ -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-row>
|
||||
<el-col :span="18">
|
||||
<el-table :data="signalList" height="350px">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table
|
||||
:data="filterSignalList"
|
||||
height="350px"
|
||||
highlight-current-row
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="name" label="ID" />
|
||||
<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>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<div class="set-status-title">命令</div>
|
||||
<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>
|
||||
<el-radio v-model="signalModel" label="lightingOn">点灯</el-radio>
|
||||
<el-radio v-model="signalModel" :label="true">点灯</el-radio>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<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 :span="4" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
|
||||
@ -40,6 +48,7 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
@ -64,6 +73,13 @@ export default {
|
||||
show() {
|
||||
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() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
@ -90,6 +106,9 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handleCurrentChange(el) {
|
||||
this.selected = el;
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
@ -103,7 +122,31 @@ export default {
|
||||
this.dialogShow = false;
|
||||
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() {
|
||||
|
||||
|
@ -81,10 +81,10 @@ export default {
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
domIdApply() {
|
||||
},
|
||||
domIdApply() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menuButton.domId : '';
|
||||
},
|
||||
},
|
||||
title() {
|
||||
return '站台开放/关闭';
|
||||
}
|
||||
@ -116,13 +116,13 @@ export default {
|
||||
this.$refs.singleTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit(isClose=false) {
|
||||
commit(isClose = false) {
|
||||
const step = {
|
||||
over: true,
|
||||
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,
|
||||
param: {standCode: this.selected.code}
|
||||
};
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -130,7 +130,7 @@ export default {
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
isClose && this.doClose();
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
@ -3,6 +3,7 @@ import { parser, updateMapData } from '@/jmapNew/utils/parser';
|
||||
import Vue from 'vue';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import store from '@/store/index';
|
||||
import {updateForList} from '../../jmapNew/utils/parser';
|
||||
|
||||
/**
|
||||
* 查询受影响的Devices并删除
|
||||
@ -219,6 +220,7 @@ const map = {
|
||||
mapList: {}, // 地图数据列表
|
||||
mapViewLoadedCount: 0, // 地图视图加载完成标识
|
||||
mapDataLoadedCount: 0, // 地图数据加载完成标识
|
||||
mapStateLoadedCount: 0, // 地图状态变化完成标识
|
||||
mapDataLoadedScreenCount: 0, // 大屏加载完成
|
||||
trainDetails: null, // 地图'列车详情'显示
|
||||
deleteCount: 0, // 绘图快捷删除标识
|
||||
@ -638,6 +640,16 @@ const map = {
|
||||
},
|
||||
|
||||
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) => {
|
||||
if (map && map.skinVO) {
|
||||
@ -689,6 +701,9 @@ const map = {
|
||||
mapDataLoadedCountIncrement: (state) => {
|
||||
state.mapDataLoadedCount += 1;
|
||||
},
|
||||
mapStateLoadedCountIncrenment: (state) => {
|
||||
state.mapStateLoadedCount += 1;
|
||||
},
|
||||
mapViewLoadedScreenCountIncrement: (state) => {
|
||||
state.mapDataLoadedScreenCount += 1;
|
||||
},
|
||||
@ -886,6 +901,9 @@ const map = {
|
||||
},
|
||||
|
||||
actions: {
|
||||
flushMapRef: ({ commit }) => {
|
||||
commit('flushMapRef');
|
||||
},
|
||||
setMapData:({ commit }, mapData) => {
|
||||
commit('setMapData', mapData);
|
||||
},
|
||||
@ -1007,6 +1025,10 @@ const map = {
|
||||
commit('mapDataLoadedCountIncrement');
|
||||
},
|
||||
|
||||
mapStateLoaded:({ commit }) => {
|
||||
commit('mapStateLoadedCountIncrenment');
|
||||
},
|
||||
|
||||
clearJlmapTrainView: () => {
|
||||
if (Vue.prototype.$jlmap) {
|
||||
Vue.prototype.$jlmap.clearTrainView();
|
||||
|
@ -261,7 +261,8 @@ export default {
|
||||
methods: {
|
||||
dataLoaded: this.handleDataLoaded,
|
||||
viewLoaded: this.handleViewLoaded,
|
||||
stateLoaded: this.handleStateLoaded
|
||||
stateLoaded: this.handleStateLoaded,
|
||||
stateUpdate: this.handleStateUpdate
|
||||
}
|
||||
});
|
||||
|
||||
@ -322,11 +323,9 @@ export default {
|
||||
handleStateLoaded() {
|
||||
this.mapViewLoaded(false);
|
||||
},
|
||||
// 地图视图更新
|
||||
handleViewUpdate() {
|
||||
},
|
||||
// 地图状态更新
|
||||
handleStateUpdate() {
|
||||
this.$store.dispatch('map/mapStateLoaded');
|
||||
},
|
||||
// 视图参数改变
|
||||
handleOptionsUpdate(options) {
|
||||
|
Loading…
Reference in New Issue
Block a user