【线路功能】线路功能的仿真客户端是否可修改成可配置,因为有的线路某些客户端没有数据无法使用,例如佛山线没有数字沙盘、IBP盘等

This commit is contained in:
fan 2023-01-29 18:13:37 +08:00
parent 5d560ad800
commit b225ee5c4c
4 changed files with 120 additions and 8 deletions

View File

@ -260,11 +260,19 @@ export default {
initTerminalList() { initTerminalList() {
this.terminalList = []; this.terminalList = [];
this.commonTerminal.forEach(item => { this.commonTerminal.forEach(item => {
if (item.roleList.includes(this.roles) && item.isShow()) { if (item.roleList.includes(this.roles) && item.isShow() && this.checkClientSet(item)) {
this.terminalList.push(item); this.terminalList.push(item);
} }
}); });
}, },
checkClientSet(client) {
const clientSet = this.$store.state.map.map ? this.$store.state.map.map.clientSet : '';
if (clientSet) {
return clientSet.includes(client.code);
} else {
return true;
}
},
noEvent(code) { noEvent(code) {
this.$emit('pictureChange', code); this.$emit('pictureChange', code);
}, },
@ -291,10 +299,14 @@ export default {
} }
}, },
changePictureShow(code) { changePictureShow(code) {
if (!this.$store.state.map.map.clientSet || this.$store.state.map.map.clientSet.includes(code)) {
this.$emit('loadingChange'); this.$emit('loadingChange');
setTimeout(() => { setTimeout(() => {
this.$emit('pictureChange', code); this.$emit('pictureChange', code);
}, 100); }, 100);
} else if (this.terminalList[0]) {
this.$emit('pictureChange', this.terminalList[0].code);
}
} }
} }
}; };

View File

@ -0,0 +1,91 @@
<template>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="800px"
:before-close="handleClose"
>
<div style="text-align: center">
<el-transfer
v-model="showClientList"
style="text-align: left; display: inline-block"
filterable
:titles="['隐藏客户端', '显示客户端']"
:button-texts="['到左边', '到右边']"
:format="{
noChecked: '${total}',
hasChecked: '${checked}/${total}'
}"
:data="data"
>
<span slot-scope="{ option }">{{ option.label }}</span>
</el-transfer>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="commit"> </el-button>
</span>
</el-dialog>
</template>
<script>
export default {
name: 'ClientConfig',
data() {
return {
dialogVisible: false,
showClientList: ['localWork', 'dispatchWork', 'dispatcherManage', 'trafficTerminal', 'trafficManageTerminal', 'schedulingPlan', 'dispatchingCommand',
'trainTicket', 'registerBook', 'diagramLoad', 'diagramPreview', 'diagramEdit', 'scheduleWork', 'cctvView', 'iscsView', 'bigScreen', 'drivingPlan', 'ibp',
'digitalStand', 'largePassengerStrategy', 'largePassengerView', 'psl', 'baSiDi', 'troWork', 'troDetailWork', 'maintainerSelect'],
data: [
{ label: '现地工作站', key: 'localWork' },
{ label: '行调工作站', key: 'dispatchWork' },
{ label: '行调台', key: 'dispatcherManage' },
{ label: '车务终端', key: 'trafficTerminal' },
{ label: '车务管理终端', key: 'trafficManageTerminal' },
{ label: '调度计划', key: 'schedulingPlan' },
{ label: '调度命令', key: 'dispatchingCommand' },
{ label: '路票', key: 'trainTicket' },
{ label: '簿册', key: 'registerBook' },
{ label: '运行图加载', key: 'diagramLoad' },
{ label: '运行图预览', key: 'diagramPreview' },
{ label: '运行图编制', key: 'diagramEdit' },
{ label: '派班工作站', key: 'scheduleWork' },
{ label: 'cctv视图', key: 'cctvView' },
{ label: 'ISCS', key: 'iscsView' },
{ label: '大屏', key: 'bigScreen' },
{ label: '司机视角', key: 'drivingPlan' },
{ label: 'IBP盘', key: 'ibp' },
{ label: '数字沙盘', key: 'digitalStand' },
{ label: '大客流策略', key: 'largePassengerStrategy' },
{ label: '大客流视图', key: 'largePassengerView' },
{ label: 'PSL', key: 'psl' },
{ label: 'BaSiDi', key: 'baSiDi' },
{ label: '轨道总览', key: 'troWork' },
{ label: '轨道详览', key: 'troDetailWork' },
{ label: '通号端', key: 'maintainerSelect' }
]
};
},
methods: {
show() {
const mapData = this.$store.state.map.map;
if (mapData && mapData.clientSet) {
this.showClientList = mapData.clientSet;
}
this.dialogVisible = true;
},
handleClose() {
this.dialogVisible = false;
},
commit() {
this.$store.state.map.map.clientSet = this.showClientList;
this.dialogVisible = false;
}
}
};
</script>
<style scoped>
</style>

View File

@ -32,6 +32,7 @@
@updateMapModel="updateMapModel" @updateMapModel="updateMapModel"
@generateDepotCiEvent="generateDepotCiEvent" @generateDepotCiEvent="generateDepotCiEvent"
@setMapFunctionConfig="setMapFunctionConfig" @setMapFunctionConfig="setMapFunctionConfig"
@setClientConfig="setClientConfig"
@setCenter="setCenter" @setCenter="setCenter"
@selectView="selectViewDraft" @selectView="selectViewDraft"
@showMap="showMap" @showMap="showMap"
@ -51,6 +52,7 @@
<config-map ref="configMap" @handleSelectPhysicalView="handleSelectPhysicalView" /> <config-map ref="configMap" @handleSelectPhysicalView="handleSelectPhysicalView" />
<ci-config ref="ciConfig" /> <ci-config ref="ciConfig" />
<map-function-config ref="mapFunctionConfig" /> <map-function-config ref="mapFunctionConfig" />
<client-config ref="clientConfig" />
<depot-station ref="depotStation" /> <depot-station ref="depotStation" />
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<check-config ref="checkConfig" @checkOver="checkOver" /> <check-config ref="checkConfig" @checkOver="checkOver" />
@ -71,10 +73,9 @@ import ElementImport from './elementImport';
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import DepotStation from './depotStation'; import DepotStation from './depotStation';
import mapFunctionConfig from './mapFunctionConfig'; import mapFunctionConfig from './mapFunctionConfig';
import ConfigMap from './configMap'; import ConfigMap from './configMap';
import DataRelation from './dataRelation/index'; import DataRelation from './dataRelation/index';
import ClientConfig from './clientConfig';
export default { export default {
name: 'MapView', name: 'MapView',
@ -88,7 +89,8 @@ export default {
CheckConfig, CheckConfig,
ElementImport, ElementImport,
DepotStation, DepotStation,
mapFunctionConfig mapFunctionConfig,
ClientConfig
}, },
data() { data() {
return { return {
@ -320,6 +322,9 @@ export default {
setMapFunctionConfig() { setMapFunctionConfig() {
this.$refs.mapFunctionConfig.show(); this.$refs.mapFunctionConfig.show();
}, },
setClientConfig() {
this.$refs.clientConfig.show();
},
handleSelectControlPage(model) { handleSelectControlPage(model) {
if (this.$refs.mapOperate) { if (this.$refs.mapOperate) {
this.$refs.mapOperate.handleSelectControlPage(model); this.$refs.mapOperate.handleSelectControlPage(model);

View File

@ -14,6 +14,7 @@
<span class="el-dropdown-link">配置</span> <span class="el-dropdown-link">配置</span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item><div @click="setMapFunctionConfig">地图配置</div></el-dropdown-item> <el-dropdown-item><div @click="setMapFunctionConfig">地图配置</div></el-dropdown-item>
<el-dropdown-item><div @click="setClientConfig">客户端配置</div></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-dropdown class="operate-button" trigger="click"> <el-dropdown class="operate-button" trigger="click">
@ -217,6 +218,9 @@ export default {
setMapFunctionConfig() { setMapFunctionConfig() {
this.$emit('setMapFunctionConfig'); this.$emit('setMapFunctionConfig');
}, },
setClientConfig() {
this.$emit('setClientConfig');
},
generateDepotCiEvent() { generateDepotCiEvent() {
this.$emit('generateDepotCiEvent'); this.$emit('generateDepotCiEvent');
} }