调整综合演练现地设备显示

This commit is contained in:
fan 2021-02-20 13:28:11 +08:00
parent 37d44bf6d2
commit 7483b1be46
3 changed files with 50 additions and 39 deletions

View File

@ -4,7 +4,7 @@
class="ningbo-01__systerm station-control"
:title="title"
:visible.sync="show"
width="600px"
width="650px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
@ -14,21 +14,28 @@
<el-row>
<el-col :span="18">
<el-table :data="tableData" style="width: 100%" height="334px" size="mini">
<el-table-column prop="apply" label="申请">
<el-checkbox />
<el-table-column prop="apply" label="申请" width="50" align="center">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.apply" />
</template>
</el-table-column>
<el-table-column prop="release" label="释放">
<el-checkbox />
<el-table-column prop="release" label="释放" width="50" align="center">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.release" />
</template>
</el-table-column>
<el-table-column prop="distribution" label="强制分配">
<el-checkbox />
<el-table-column prop="distribution" label="强制分配" width="80" align="center">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.distribution" />
</template>
</el-table-column>
<el-table-column prop="name" label="车站名" />
<el-table-column prop="control" label="控制状态" />
<el-table-column prop="name" label="车站名" align="center" width="100" :show-overflow-tooltip="true" />
<el-table-column prop="control" label="控制状态" align="center" width="70" />
<el-table-column prop="stationCode" label="" align="center" />
</el-table>
</el-col>
<el-col :span="6">
<el-button style="width: 125px;margin-left: 10px;">全部申请</el-button>
<el-button style="width: 125px;margin-left: 10px;" @click="applyAll">全部申请</el-button>
<el-button style="width: 125px;margin-top: 10px;">取消全部申请</el-button>
<el-button style="width: 125px;margin-top: 10px;">全部释放</el-button>
<el-button style="width: 125px;margin-top: 10px;">取消全部释放</el-button>
@ -66,15 +73,17 @@ export default {
doShow() {
this.tableData = [];
this.stationList.forEach(item => {
if (item.centralized) {
this.tableData.push(item);
}
this.tableData.push(item);
});
console.log(this.stationList, this.tableData);
this.show = true;
},
doClose() {
this.show = false;
},
applyAll() {
this.tableData.forEach(item => {
this.$set(item, 'apply', true);
});
}
}
};

View File

@ -155,11 +155,6 @@ export default {
$route() {
this.mapViewLoaded(true);
},
'$store.state.training.prdType': function (val) {
if (val) {
this.changePrdType(val);
}
},
'$store.state.map.showCentralizedStationNum': function (val) {
if (this.$store.state.map.showCentralizedStationCode) {
this.setShowStation(this.$store.state.map.showCentralizedStationCode);
@ -481,25 +476,6 @@ export default {
};
this.$store.dispatch('map/setMousemove');
},
//
changePrdType(val) {
const nameList = Object.keys(this.$store.state.map.map || {});
let list = []; let showMode = '';
nameList.forEach(item => {
if (item !== 'skinVO') {
const data = this.$store.state.map.map[item];
if (data && data.constructor === Array) {
list = [...list, ...data];
}
}
});
if (val === '01') {
showMode = '03';
} else if (val === '02') {
showMode = '02';
}
this.$jlmap.updatePrdType(list, val, showMode);
},
//
setShowMode(showMode) {
if (this.showMode !== showMode) {

View File

@ -370,6 +370,7 @@ export default {
this.$store.dispatch('training/setRoles', 'DISPATCHER');
this.hideIbp();
this.drivingShow = false;
this.changePrdType('02');
this.mapViewLoadedOver && this.setShowStation('');
this.jl3dmaintainershow = false;
break;
@ -378,6 +379,7 @@ export default {
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
this.$refs.menuSchema.chiShowStation = deviceCode;
this.showStation = deviceCode;
this.changePrdType('01');
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
this.jl3dmaintainershow = false;
this.drivingShow = false;
@ -527,6 +529,24 @@ export default {
this.showStation = this.centralizedStationMap[stationCode];
this.setShowStation(this.showStation);
},
changePrdType(val) {
const nameList = Object.keys(this.$store.state.map.map || {});
let list = []; let showMode = '';
nameList.forEach(item => {
if (item !== 'skinVO') {
const data = this.$store.state.map.map[item];
if (data && data.constructor === Array) {
list = [...list, ...data];
}
}
});
if (val === '01') {
showMode = '03';
} else if (val === '02') {
showMode = '02';
}
this.$jlmap.updatePrdType(list, val, showMode);
},
setShowStation(stationCode) {
const showStation = this.centralizedStationMap[stationCode];
const lineCode = this.$store.getters['map/lineCode'];
@ -537,7 +557,13 @@ export default {
let list = [];
nameList.forEach(item => {
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
list = [...list, ...this.$store.state.map.map[item]];
if (item === 'trainList') {
this.$store.state.map.map[item].forEach(elem => {
elem && list.push(elem);
});
} else {
list = [...list, ...this.$store.state.map.map[item]];
}
}
});
this.$jlmap.updateShowStation(list, showStation);