rt-sim-training-client/src/views/iscs/iscsDesign/demonList.vue

875 lines
34 KiB
Vue
Raw Normal View History

2020-01-15 10:11:26 +08:00
<template>
<div v-loading="loading" class="joylink-card map-list-main">
<div class="clearfix">
<div>iscs系统列表</div>
2020-09-21 10:26:34 +08:00
</div>
<div class="text_item">
<!--<el-cascader v-model="mapStationList" style="width: 100%;" :props="props" placeholder="请选择车站" @change="handleChange" />-->
<!--<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />-->
<div style="border-bottom: 1px solid #EBEEF5; padding: 10px 10px;">
<el-select v-model="lineCode" size="mini" placeholder="请选择线路">
<el-option
v-for="item in lineList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</div>
2020-01-15 10:11:26 +08:00
<div class="tree_box">
<el-tree ref="tree" :data="treeList" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent" @node-contextmenu="showContextMenu">
<span slot-scope="{ node:tnode, data }">
<span class="el-icon-tickets" :style="{color: data.valid ? 'green':''}" />
<span>&nbsp;{{ tnode.label }}</span>
</span>
</el-tree>
</div>
<div class="buttonList">
2020-09-21 10:26:34 +08:00
<!--<el-button size="small" type="primary" class="eachButton" @click="createMap">{{ $t('map.newConstruction') }}</el-button>-->
2020-01-15 10:11:26 +08:00
</div>
</div>
</div>
</template>
<script>
import { DeviceMenu } from '@/scripts/ConstDic';
import { removeSessionStorage } from '@/utils/auth';
import { getPublishMapListOnline, getStationListNeedAttendant } from '@/api/jmap/map';
import { getLineCodeList } from '@/api/management/mapline';
2020-01-15 10:11:26 +08:00
export default {
name: 'UserMapList',
data() {
return {
loading: false,
defaultShowKeys: [],
filterText: '',
selected: {},
defaultProps: {
children: 'children',
label: 'name'
},
point: {
x: 0,
y: 0
},
editModel: {},
lineCode: '',
mapList: [],
mapStationList: [],
lineList: [],
pageTreeMap: {
'01': [],
2020-09-21 13:20:30 +08:00
'02': [
{
// 牵引降压混合变电所主接线图 变电所接线图 降压变电所主接线图 解除网图 混合变电所主接线图
name: '电力监控系统',
2020-09-21 14:11:02 +08:00
mode: 'powerMonitoring02',
2020-09-21 13:20:30 +08:00
id: 'powerMonitoring',
type: 'totalSystem',
children: [
{
name: '黄山变电所接线图',
2020-09-21 14:11:02 +08:00
mode: 'powerMonitoring02',
2020-09-21 13:20:30 +08:00
id: 'substation',
type: 'interface'
},
{
name: '降压变电所主接线图',
2020-09-21 14:11:02 +08:00
mode: 'powerMonitoring02',
2020-09-21 13:20:30 +08:00
id: 'stepDown',
type: 'interface'
},
{
name: '控制中心图',
2020-09-21 14:11:02 +08:00
mode: 'powerMonitoring02',
2020-09-21 13:20:30 +08:00
id: 'hybrid',
type: 'interface'
},
{
name: '牵引降压混合变电所主接线图',
2020-09-21 14:11:02 +08:00
mode: 'powerMonitoring02',
2020-09-21 13:20:30 +08:00
id: 'combined',
type: 'interface'
},
{
name: '停车场接触网图',
2020-09-21 14:11:02 +08:00
mode: 'powerMonitoring02',
2020-09-21 13:20:30 +08:00
id: 'catenary',
type: 'interface'
}
]
},
2020-09-21 18:05:25 +08:00
{
name: '环境与设备监控系统',
mode: 'environment02',
id: 'environment',
type: 'totalSystem',
children: [
{
name: '大系统',
mode: 'environment02',
id: 'environmentOne',
type: 'interface'
},
{
name: '冷水系统',
mode: 'environment02',
id: 'environmentTwo',
type: 'interface'
},
{
name: '隧道通风系统',
mode: 'environment02',
id: 'environmentThree',
type: 'interface'
},
{
name: '车站小系统1',
mode: 'environment02',
id: 'environmentFour',
type: 'interface'
}
]
},
2020-09-21 13:20:30 +08:00
{
name: '自动售检票/门禁',
2020-09-21 14:11:02 +08:00
mode: 'afc02',
2020-09-21 13:20:30 +08:00
id: 'afc',
type: 'totalSystem',
children: [
{
name: '自动售检票系统',
2020-09-21 14:11:02 +08:00
mode: 'afc02',
2020-09-21 13:20:30 +08:00
id: 'autoTicket',
type: 'interface'
},
{
name: '门禁系统',
2020-09-21 14:11:02 +08:00
mode: 'afc02',
2020-09-21 13:20:30 +08:00
id: 'entranceGuard',
2020-09-21 18:05:25 +08:00
type: 'system',
children: [
{
name: '站厅层',
mode: 'afc02',
id: 'afcOne02',
type: 'interface'
}
]
2020-09-21 13:20:30 +08:00
}
]
},
{
name: '火灾报警系统',
2020-09-21 14:11:02 +08:00
mode: 'fas02',
2020-09-21 13:20:30 +08:00
id: 'fas',
type: 'totalSystem',
children: [
{
name: '火灾报警系统-FAS联动',
2020-09-21 14:11:02 +08:00
mode: 'fas02',
2020-09-21 13:20:30 +08:00
id: 'linkage',
type: 'interface'
},
{
name: '火灾报警系统-站厅层',
2020-09-21 14:11:02 +08:00
mode: 'fas02',
2020-09-21 13:20:30 +08:00
id: 'stationHall',
2020-09-21 18:05:25 +08:00
type: 'system',
children: [
{
name: '站厅层',
mode: 'fas02',
id: 'stationHallOne',
type: 'interface'
},
{
name: '站厅层A端',
mode: 'fas02',
id: 'stationHallTwo',
type: 'interface'
},
{
name: '站厅层B端',
mode: 'fas02',
id: 'stationHallThree',
type: 'interface'
},
{
name: '站厅层公共区段',
mode: 'fas02',
id: 'stationHallFour',
type: 'interface'
}
]
2020-09-21 13:20:30 +08:00
},
{
name: '火灾报警系统-站台层',
2020-09-21 14:11:02 +08:00
mode: 'fas02',
2020-09-21 13:20:30 +08:00
id: 'platform',
2020-09-21 18:05:25 +08:00
type: 'system',
children: [
{
name: '站台层',
mode: 'fas02',
id: 'platformOne',
type: 'interface'
},
{
name: '站台层A端',
mode: 'fas02',
id: 'platformTwo',
type: 'interface'
},
{
name: '站台层B端',
mode: 'fas02',
id: 'platformThree',
type: 'interface'
},
{
name: '站台层公共区段',
mode: 'fas02',
id: 'platformFour',
type: 'interface'
}
]
2020-09-21 13:20:30 +08:00
},
{
name: '火灾报警系统-区间',
2020-09-21 14:11:02 +08:00
mode: 'fas02',
2020-09-21 13:20:30 +08:00
id: 'section',
type: 'interface'
},
{
name: '感温光纤探测系统',
2020-09-21 14:11:02 +08:00
mode: 'fas02',
2020-09-21 13:20:30 +08:00
id: 'sensing',
type: 'interface'
},
{
name: '气体灭火系统',
2020-09-21 14:11:02 +08:00
mode: 'fas02',
2020-09-21 13:20:30 +08:00
id: 'gas',
type: 'interface'
}
]
},
{
name: '信号系统',
2020-09-21 14:11:02 +08:00
mode: 'signalSystem02',
2020-09-21 13:20:30 +08:00
id: 'signalSystem',
type: 'totalSystem',
children: [
2020-09-21 18:05:25 +08:00
// 暂时没有 系统界面 介绍
// {
// name: 'TIS管理器',
// mode: 'signalSystem02',
// id: 'tis',
// type: 'interface'
// },
// {
// name: '列车时刻表',
// mode: 'signalSystem02',
// id: 'schedule',
// type: 'interface'
// },
// 这两个内容 不清晰
2020-09-21 13:20:30 +08:00
{
name: '信号系统',
2020-09-21 14:11:02 +08:00
mode: 'signalSystem02',
2020-09-21 13:20:30 +08:00
id: 'signal',
type: 'interface'
},
{
name: '全线信号系统界面',
2020-09-21 14:11:02 +08:00
mode: 'signalSystem02',
2020-09-21 13:20:30 +08:00
id: 'allLineSignal',
type: 'interface'
}
]
2020-09-21 14:11:02 +08:00
},
2020-09-21 18:05:25 +08:00
{
name: '屏蔽门系统',
mode: 'psdSystem02',
id: 'psdSystem',
2020-09-21 18:05:25 +08:00
type: 'totalSystem',
children: [
{
name: '屏蔽门系统',
mode: 'psdSystem02',
id: 'psdOne',
type: 'interface'
}
]
},
2020-09-21 14:11:02 +08:00
{
2020-09-21 13:20:30 +08:00
name: '通信',
2020-09-21 14:11:02 +08:00
mode: 'communication02',
2020-09-21 13:20:30 +08:00
id: 'communication',
type: 'totalSystem',
children: [
2020-09-21 18:05:25 +08:00
// 不用画图
// {
// name: '乘客信息显示系统',
// mode: 'communication02',
// id: 'pis',
// type: 'system',
// children: [
// ]
// },
// {
// name: '广播系统',
// mode: 'communication02',
// id: 'broadcasting',
// type: 'system',
// children: [
// ]
// },
2020-09-21 13:20:30 +08:00
{
name: '闭路电视',
2020-09-21 14:11:02 +08:00
mode: 'communication02',
2020-09-21 13:20:30 +08:00
id: 'cctv',
2020-09-21 18:05:25 +08:00
type: 'system',
children:[
{
name: '站厅',
mode: 'communication02',
id: 'basOne',
type: 'interface'
},
{
name: '上行站台',
mode: 'communication02',
id: 'basTwo',
type: 'interface'
},
{
name: '下行站台',
mode: 'communication02',
id: 'basThree',
type: 'interface'
},
{
name: '地下一层',
mode: 'communication02',
id: 'basFour',
type: 'interface'
},
{
name: '地下二层',
mode: 'communication02',
id: 'basFive',
type: 'interface'
}
]
2020-09-21 13:20:30 +08:00
}
]
}],
'03': [],
'04': [],
'05': [],
'06': [],
'07': [{
2020-06-24 15:02:09 +08:00
name: 'FAS界面',
mode: 'fas',
id: 'fas',
type: 'totalSystem',
2020-01-15 10:11:26 +08:00
children: [
{
2020-06-24 15:02:09 +08:00
name: '站厅报警',
2020-01-16 16:25:33 +08:00
mode: 'fas',
2020-06-24 15:02:09 +08:00
id: 'stationHall',
2020-02-05 10:16:59 +08:00
type: 'system',
children: [
{
name: '站厅报警',
2020-02-05 10:16:59 +08:00
mode: 'fas',
id: 'stationHall',
2020-06-24 15:02:09 +08:00
type: 'interface'
}
]
},
{
name: '站台报警',
mode: 'fas',
id: 'stand',
type: 'system',
children: [
2020-02-05 10:16:59 +08:00
{
name: '站台报警',
2020-02-05 10:16:59 +08:00
mode: 'fas',
id: 'stand',
2020-06-24 15:02:09 +08:00
type: 'interface'
2020-06-01 18:33:17 +08:00
},
{
2020-06-24 15:02:09 +08:00
name: '公共区域',
2020-06-01 18:33:17 +08:00
mode: 'fas',
2020-06-24 15:02:09 +08:00
id: 'standPublicArea',
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '系统状态',
mode: 'fas',
id: 'systemState',
type: 'system',
children: [
2020-05-09 10:04:57 +08:00
{
name: '系统状态',
mode: 'fas',
2020-06-24 15:02:09 +08:00
id: 'systemState',
2020-05-09 10:04:57 +08:00
type: 'interface'
2020-02-05 10:16:59 +08:00
}
]
2020-06-24 15:02:09 +08:00
}
]
},
{
name: 'BAS界面',
mode: 'bas',
id: 'bas',
type: 'totalSystem',
2020-06-24 15:02:09 +08:00
children: [
{
2020-06-24 15:02:09 +08:00
name: '大系统',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'bigSystem',
type: 'system',
2020-06-24 15:02:09 +08:00
children:[
{
name: '大系统',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'bigSystem',
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '小系统',
mode: 'bas',
id: 'smallSystem',
type: 'system',
children: [
{
2020-06-24 15:02:09 +08:00
name: '小系统A端(一)',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'aSideOne',
type: 'interface'
},
{
2020-06-24 15:02:09 +08:00
name: '小系统A端(二)',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'aSideTwo',
type: 'interface'
},
{
2020-06-24 15:02:09 +08:00
name: '小系统B端',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'bSide',
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '水系统',
mode: 'bas',
id: 'waterSystem',
type: 'system',
children: [
{
name: '水系统',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'waterSystem',
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '照明',
mode: 'bas',
id: 'lightingSystem',
type: 'system',
children: [
2020-06-02 16:12:34 +08:00
{
2020-06-24 15:02:09 +08:00
name: '照明系统',
2020-06-02 16:12:34 +08:00
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'lightingSystem',
2020-06-02 16:12:34 +08:00
type: 'interface'
2020-06-02 17:50:56 +08:00
},
{
name: 'EPS系统',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'epsSystem',
2020-06-02 17:50:56 +08:00
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '电扶梯',
mode: 'bas',
id: 'electricEscalator',
type: 'system',
children: [
{
name: '电扶梯',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'electricEscalator',
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '机电排水',
mode: 'bas',
id: 'waterSupply',
type: 'system',
children: [
{
name: '机电排水',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'waterSupply',
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '隧道通风',
mode: 'bas',
id: 'tunnelVentilation',
type: 'system',
children: [
{
name: '隧道通风',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'tunnelVentilation',
type: 'interface'
},
{
2020-06-24 15:02:09 +08:00
name: '射流风机图',
mode: 'bas',
2020-06-24 15:02:09 +08:00
id: 'jetFan',
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '车站网络',
mode: 'bas',
id: 'stationNet',
type: 'system',
children: [
{
name: '车站网络',
2020-06-24 15:02:09 +08:00
mode:'bas',
id: 'stationNet',
type: 'interface'
}
]
2020-06-24 15:02:09 +08:00
}
]
},
{
name: 'PSD界面',
mode: 'psd',
id: 'psd',
type: 'totalSystem',
2020-06-24 15:02:09 +08:00
children: [
2020-01-16 16:25:33 +08:00
{
2020-06-24 15:02:09 +08:00
name: '屏蔽门',
2020-01-16 16:25:33 +08:00
mode: 'psd',
2020-06-24 15:02:09 +08:00
id: 'psd',
2020-02-05 10:16:59 +08:00
type: 'system',
children: [
{
name: '屏蔽门',
mode: 'psd',
2020-06-24 15:02:09 +08:00
id: 'psd',
type: 'interface'
2020-02-05 10:16:59 +08:00
}
]
2020-06-24 15:02:09 +08:00
}
]
},
{
name: 'cctv界面',
mode: 'cctv',
id: 'cctv',
type: 'system',
children: [
2020-01-17 14:15:14 +08:00
{
2020-06-24 15:02:09 +08:00
name: '车站控制',
2020-01-17 14:15:14 +08:00
mode: 'cctv',
2020-06-24 15:02:09 +08:00
id: 'cctv',
2020-02-05 10:16:59 +08:00
type: 'system',
children: [
{
2020-06-24 15:02:09 +08:00
name: '站厅',
2020-02-05 10:16:59 +08:00
mode: 'cctv',
2020-06-24 15:02:09 +08:00
id: 'stationHall',
type: 'interface'
2020-02-05 10:16:59 +08:00
},
{
2020-06-24 15:02:09 +08:00
name: '站台',
2020-02-05 10:16:59 +08:00
mode: 'cctv',
2020-06-24 15:02:09 +08:00
id: 'stand',
type: 'interface'
2020-06-01 18:33:17 +08:00
},
{
2020-06-24 15:02:09 +08:00
name: '云台',
2020-06-01 18:33:17 +08:00
mode: 'cctv',
2020-06-24 15:02:09 +08:00
id: 'holder',
2020-06-01 18:33:17 +08:00
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '中心设备状态',
mode: 'cctv',
id: 'centralDeviceState',
type: 'system',
children: [
{
2020-06-24 15:02:09 +08:00
name: '中心设备状态',
mode: 'cctv',
2020-06-24 15:02:09 +08:00
id: 'centralDeviceState',
type: 'interface'
2020-02-05 10:16:59 +08:00
}
]
2020-06-24 15:02:09 +08:00
}
]
},
{
name: 'AFC界面',
mode: 'afc',
id: 'afc',
type: 'totalSystem',
2020-06-24 15:02:09 +08:00
children: [
2020-01-17 18:45:28 +08:00
{
2020-06-24 15:02:09 +08:00
name: '售检票',
2020-01-17 18:45:28 +08:00
mode: 'afc',
2020-06-24 15:02:09 +08:00
id: 'afc',
2020-02-05 10:16:59 +08:00
type: 'system',
children: [
{
name: '售检票',
mode: 'afc',
2020-06-24 15:02:09 +08:00
id: 'afc',
type: 'interface'
2020-02-05 10:16:59 +08:00
}
]
2020-06-24 15:02:09 +08:00
}
]
},
{
name: 'ACS界面',
mode: 'acs',
id: 'acs',
type: 'totalSystem',
2020-06-24 15:02:09 +08:00
children: [
2020-01-17 18:45:28 +08:00
{
2020-06-24 15:02:09 +08:00
name: '门禁-站台层',
2020-01-17 18:45:28 +08:00
mode: 'acs',
2020-08-12 15:19:38 +08:00
id: 'acs',
2020-02-05 10:16:59 +08:00
type: 'system',
children: [
{
2020-02-05 10:22:22 +08:00
name: '门禁-站台层',
2020-02-05 10:16:59 +08:00
mode: 'acs',
2020-06-24 15:02:09 +08:00
id: 'stand',
type: 'interface'
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '门禁-站厅层',
mode: 'acs',
2020-08-12 15:19:38 +08:00
id: 'acs',
2020-06-24 15:02:09 +08:00
type: 'system',
children: [
2020-02-05 10:22:22 +08:00
{
name: '门禁-站厅层',
mode: 'acs',
2020-06-24 15:02:09 +08:00
id: 'stationHall',
type: 'interface'
2020-02-05 10:16:59 +08:00
}
]
2020-06-24 15:02:09 +08:00
}
]
},
{
name: '网络状态',
mode: 'netState',
id: 'netState',
type: 'totalSystem',
2020-06-24 15:02:09 +08:00
children: [
{
name: '网络状态',
mode: 'netState',
2020-06-24 15:02:09 +08:00
id: 'netState',
type: 'system',
children: [
{
name: '网络状态',
mode: 'netState',
2020-06-24 15:02:09 +08:00
id: 'netState',
type: 'interface'
}
]
2020-01-15 10:11:26 +08:00
}
]
}],
'08': [],
'09': [],
'10': [],
'11': [],
'12': []
}
};
},
computed: {
props() {
const self = this;
return {
lazy: true,
lazyLoad (node, resolve) {
const { level } = node;
let nodes = [];
if (level === 1) {
getStationListNeedAttendant(node.data.value).then(resp => {
nodes = resp.data.map(elem => { return {value: elem.code, label: elem.name, leaf: true}; });
resolve(nodes);
}).catch(() => {
self.$message.error('获取车站列表失败');
resolve(nodes);
});
} else if (!level) {
getPublishMapListOnline().then(resp => {
nodes = resp.data.map(elem => { return { value: elem.id, label: elem.name, leaf: false }; });
resolve(nodes);
}).catch(() => {
self.$message.error('获取地图列表失败!');
resolve(nodes);
});
}
2020-01-15 10:11:26 +08:00
}
};
},
treeList() {
if (this.lineCode) {
return this.pageTreeMap[this.lineCode];
} else {
return [];
}
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
mapStationList(val) {
console.log(val);
}
},
beforeDestroy () {
removeSessionStorage('demonList');
},
mounted() {
if (this.$route.query.lineCode) {
this.lineCode = this.$route.query.lineCode;
}
getLineCodeList().then(resp => {
this.lineList = resp.data || [];
}).catch(() => {
this.$message.error('获取线路列表异常!');
});
},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
createMap() {
this.$emit('createMap');
2020-01-15 10:11:26 +08:00
},
clickEvent(obj, data, ele) {
2020-01-15 13:27:07 +08:00
switch (obj.type) {
case 'totalSystem':
break;
2020-01-15 13:27:07 +08:00
case 'system' :
break;
case 'interface':
this.$router.push({ path: `/iscs/design/edit`, query: {mode: obj.mode, system: data.parent.data.id, part: obj.id, lineCode: this.lineCode} });
2020-01-15 13:27:07 +08:00
break;
}
2020-01-15 10:11:26 +08:00
},
showContextMenu(e, obj, node, vueElem) {
const deviceMenuMap = { system: DeviceMenu.IscsSystem, interface: DeviceMenu.IscsInterface };
if (obj && (obj.type == 'system' || obj.type == 'interface')) {
2020-01-15 10:11:26 +08:00
e.preventDefault();
const menu = deviceMenuMap[obj.type];
2020-01-15 10:11:26 +08:00
this.point = {
x: e.clientX,
y: e.clientY
};
this.editModel = obj;
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
}
}
};
</script>
<style lang="scss" scoped>
.clearfix{
padding: 0 20px;
border-bottom: 1px solid #EBEEF5;
box-sizing: border-box;
height: 47px;
line-height: 47px;
2020-04-15 15:42:47 +08:00
position: absolute;
width:100%;
display: flex;
justify-content: space-between;
2020-01-15 10:11:26 +08:00
}
.text_item{
2020-04-15 15:42:47 +08:00
height: 100%;
padding-top: 47px;
2020-01-15 10:11:26 +08:00
.tree_box{
height: calc(100% - 89px);
overflow-y: auto;
}
}
.buttonList{
padding: 8px 0px 8px 0px;
border-top: 1px #ccc solid;
}
.eachButton{
margin-left:10px;
}
.uploadDemo {
position: relative;
overflow: hidden;
// float: right;
padding: 9px 15px;
margin-right: 3px;
cursor: pointer;
input {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
}
.map-list-main{
text-align:left;
height: 100%;
2020-04-15 15:42:47 +08:00
position: relative;
2020-01-15 10:11:26 +08:00
}
</style>