地图设计-客户端数据
This commit is contained in:
parent
6f8d198f4c
commit
8ae41273d6
@ -846,6 +846,9 @@ const map = {
|
||||
map.conversationGroupMap.EMERGENCY = [];
|
||||
}
|
||||
}
|
||||
if (!map.mapClientVOList) {
|
||||
map.mapClientVOList = [];
|
||||
}
|
||||
state.map = map;
|
||||
let showConfig = {};
|
||||
if (Vue.prototype.$jlmap && typeof Vue.prototype.$jlmap.getShowConfig === 'function') {
|
||||
|
@ -70,6 +70,7 @@ import FloodGate from './floodGate';
|
||||
import DirectionRod from './directionRod';
|
||||
import SignalButton from './signalButton';
|
||||
import SimulationMember from './simulationMember/index';
|
||||
import terminals from './terminals';
|
||||
|
||||
export default {
|
||||
name: 'MapOperate',
|
||||
@ -99,7 +100,8 @@ export default {
|
||||
FloodGate,
|
||||
DirectionRod,
|
||||
SignalButton,
|
||||
SimulationMember
|
||||
SimulationMember,
|
||||
terminals
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -142,7 +144,8 @@ export default {
|
||||
{label: '防淹门', name: 'FloodGate', menus: FloodGate},
|
||||
{label: '方向杆', name: 'DirectionRod', menus: DirectionRod},
|
||||
{label: '信号按钮', name: 'SignalButton', menus: SignalButton },
|
||||
{label: '仿真成员', name: 'SimulationMember', menus: SimulationMember}
|
||||
{label: '仿真成员', name: 'SimulationMember', menus: SimulationMember},
|
||||
{label: '客户端', name: 'terminals', menus: terminals}
|
||||
],
|
||||
selectDevice:'',
|
||||
enabledTab: 'Section'
|
||||
|
338
src/views/newMap/newMapdraft/mapoperate/terminals.vue
Normal file
338
src/views/newMap/newMapdraft/mapoperate/terminals.vue
Normal file
@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card" style="height: 100%">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<div style="height: calc(100% - 47px);overflow-y: auto;">
|
||||
<el-row style="margin-bottom: 5px;">
|
||||
<el-col :span="6" :offset="1"><div style="text-align: center;font-size: 14px;">名称</div></el-col>
|
||||
<el-col :span="5" :offset="1"><div style="text-align: center;font-size: 14px;">客户端类型</div></el-col>
|
||||
<el-col :span="6" :offset="1"><div style="text-align: center;font-size: 14px;">设备</div></el-col>
|
||||
<el-col :span="4"><div style="text-align: center;font-size: 14px;">操作</div></el-col>
|
||||
</el-row>
|
||||
<el-row v-for="(item, index) in mapClientVOList" :key="index" style="margin-bottom: 5px;">
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-input v-model="item.name" size="mini" :title="item.name" />
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-select v-model="item.type" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in getTerminals()" :key="elem.code" :label="elem.name" :value="elem.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-select v-if="stationShow.includes(item.type)" v-model="item.deviceCode" placeholder="请选择" size="mini">
|
||||
<el-option v-for="elem in stationList" :key="elem.code" :label="elem.name" :value="elem.code" />
|
||||
</el-select>
|
||||
<span v-else>--</span>
|
||||
</el-col>
|
||||
<el-col :span="4" style="text-align: center;">
|
||||
<el-button type="primary" size="mini" @click="deleteClient(index)">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="createClient">新建</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="一键生成" name="second" :lazy="lazy">
|
||||
<el-form ref="generationForm" :model="generationForm" label-width="120px" class="demo-ruleForm" size="small">
|
||||
<el-form-item label="系统:" prop="systemType">
|
||||
<el-select v-model="generationForm.systemType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in systemList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center;">
|
||||
<el-button size="small" type="primary" @click="keyGeneration">一键生成</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex';
|
||||
export default {
|
||||
name: 'Terminals',
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
lazy: true,
|
||||
memberActive: 'METRO',
|
||||
generationForm: {
|
||||
systemType: 'METRO'
|
||||
},
|
||||
systemList: [
|
||||
{ label: '地铁CBTC', value: 'METRO' },
|
||||
{ label: '大铁CTC', value: 'RAILWAY' },
|
||||
{ label: '应急调度', value: 'EMERGENCY' }
|
||||
],
|
||||
// mapClientVOList: [],
|
||||
stationShow: ['localWork']
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', ['stationList']),
|
||||
mapClientVOList() {
|
||||
return this.$store.state.map.map.mapClientVOList;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
createClient() {
|
||||
const obj = {
|
||||
id: this.getId(),
|
||||
name: '',
|
||||
type: '',
|
||||
deviceCode: ''
|
||||
};
|
||||
this.mapClientVOList.push(obj);
|
||||
},
|
||||
getId() {
|
||||
const list = [];
|
||||
this.mapClientVOList.forEach(item => {
|
||||
if (item.id) {
|
||||
list.push(item.id.slice(9));
|
||||
}
|
||||
});
|
||||
const maxNum = list.length ? Math.max(...list) : 0;
|
||||
return `terminals${maxNum + 1}`;
|
||||
},
|
||||
deleteClient(index) {
|
||||
this.mapClientVOList.splice(index, 1);
|
||||
},
|
||||
keyGeneration() {
|
||||
this.mapClientVOList.splice(0, this.mapClientVOList.length);
|
||||
const terminalsList = this.getTerminals(this.generationForm.systemType);
|
||||
terminalsList.forEach(item => {
|
||||
if (this.stationShow.includes(item.code)) {
|
||||
this.stationList.forEach(ii => {
|
||||
const obj = {
|
||||
id: this.getId(),
|
||||
name: `${item.name}-${ii.name}`,
|
||||
type: item.code,
|
||||
deviceCode: ii.code
|
||||
};
|
||||
this.mapClientVOList.push(obj);
|
||||
});
|
||||
} else {
|
||||
const obj = {
|
||||
id: this.getId(),
|
||||
name: item.name,
|
||||
type: item.code,
|
||||
deviceCode: ''
|
||||
};
|
||||
this.mapClientVOList.push(obj);
|
||||
}
|
||||
});
|
||||
},
|
||||
getTerminals(type) {
|
||||
const commonTerminals = (type) => [
|
||||
{
|
||||
name: type === 'RAILWAY' ? '联锁操作终端' : '现地工作站',
|
||||
code: 'localWork',
|
||||
isShow: () => true
|
||||
|
||||
},
|
||||
{
|
||||
name: '行调工作站',
|
||||
code: 'dispatchWork',
|
||||
isShow: () => this.$route.query.lineCode !== '14'
|
||||
|
||||
},
|
||||
{
|
||||
name: '线网监控',
|
||||
code: 'nccWork',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '线路监控',
|
||||
code: 'lineMonitor',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '行调台',
|
||||
code: 'dispatcherManage',
|
||||
isShow: () => type === 'RAILWAY'
|
||||
|
||||
},
|
||||
{
|
||||
name: '车务终端',
|
||||
code: 'trafficTerminal',
|
||||
isShow: () => type === 'RAILWAY'
|
||||
|
||||
},
|
||||
{
|
||||
name: '车务管理终端',
|
||||
code: 'trafficManageTerminal',
|
||||
isShow: () => type === 'RAILWAY'
|
||||
|
||||
},
|
||||
{
|
||||
name: '调度计划',
|
||||
code: 'schedulingPlan',
|
||||
isShow: () => type === 'RAILWAY'
|
||||
|
||||
},
|
||||
{
|
||||
name: '调度命令',
|
||||
code: 'dispatchingCommand',
|
||||
isShow: () => type === 'RAILWAY'
|
||||
|
||||
},
|
||||
{
|
||||
name: '路票',
|
||||
code: 'trainTicket',
|
||||
isShow: () => type === 'RAILWAY'
|
||||
|
||||
},
|
||||
{
|
||||
name: '簿册',
|
||||
code: 'registerBook',
|
||||
isShow: () => type === 'RAILWAY'
|
||||
|
||||
},
|
||||
{
|
||||
name: '运行图加载',
|
||||
code: 'diagramLoad',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '司机ATS工作站',
|
||||
code: 'driverAtsWork',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '运行图预览',
|
||||
code: 'diagramPreview',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '运行图编制',
|
||||
code: 'diagramEdit',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '派班工作站',
|
||||
code: 'scheduleWork',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: 'cctv视图',
|
||||
code: 'cctvView',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: 'ISCS',
|
||||
code: 'iscsView',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '大屏',
|
||||
code: 'bigScreen',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '司机视角',
|
||||
code: 'drivingPlan',
|
||||
isShow: () => type === 'METRO' || type === 'RAILWAY'
|
||||
|
||||
},
|
||||
{
|
||||
name: 'IBP盘',
|
||||
code: 'ibp',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '数字沙盘',
|
||||
code: 'digitalStand',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '大客流策略',
|
||||
code: 'largePassengerStrategy',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '大客流视图',
|
||||
code: 'largePassengerView',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: 'PSL',
|
||||
code: 'psl',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: 'BaSiDi',
|
||||
code: 'baSiDi',
|
||||
isShow: () => this.$route.query.lineCode === '14' && type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '轨道总览',
|
||||
code: 'troWork',
|
||||
isShow: () => this.$route.query.lineCode === '14' && type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '轨道详览',
|
||||
code: 'troDetailWork',
|
||||
isShow: () => this.$route.query.lineCode === '14' && type === 'METRO'
|
||||
|
||||
},
|
||||
{
|
||||
name: '通号端',
|
||||
code: 'maintainerSelect',
|
||||
isShow: () => type === 'METRO'
|
||||
|
||||
}
|
||||
];
|
||||
const terminalList = commonTerminals(type);
|
||||
let list = terminalList;
|
||||
if (type) {
|
||||
list = terminalList.filter(item => {
|
||||
return item.isShow();
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user