iscs调整

This commit is contained in:
fan 2020-06-24 15:02:09 +08:00
parent e71f74a769
commit 86c7e44876
6 changed files with 257 additions and 212 deletions

File diff suppressed because one or more lines are too long

View File

@ -866,7 +866,7 @@ export const asyncRouter = [
}, },
children: [ children: [
{ {
path: 'edit/:id/:mode', path: 'edit',
component: IscsDraw, component: IscsDraw,
hidden: true hidden: true
} }
@ -908,7 +908,7 @@ export const asyncRouter = [
}, },
children: [ children: [
{ {
path: 'edit/:id/:mode', path: 'edit',
component: IscsDraw, component: IscsDraw,
hidden: true hidden: true
} }

View File

@ -74,226 +74,349 @@ export default {
this.treeList = []; this.treeList = [];
this.treeList = [ this.treeList = [
{ {
name: 'iscs系统', name: 'FAS界面',
id: 0, mode: 'fas',
id: 'fas',
type: 'system', type: 'system',
children: [ children: [
{ {
name: 'FAS界面', name: '站厅报警',
mode: 'fas', mode: 'fas',
id: 'fas', id: 'stationHall',
type: 'system', type: 'system',
children: [ children: [
{ {
name: '站厅报警', name: '站厅报警',
mode: 'fas', mode: 'fas',
id: 'stationHall', id: 'stationHall',
type: 'system',
children: [
{
name: '站厅报警',
mode: 'fas',
id: 'stationHall',
type: 'interface'
}
]
},
{
name: '站台报警',
mode: 'fas',
id: 'stand',
type: 'system',
children: {
name: '站台报警',
mode: 'fas',
id: 'stand',
type: 'interface'
}
},
{
name: '站台报警-公共',
mode: 'fas',
id: '12',
type: 'interface'
},
{
name: '系统状态',
mode: 'fas',
id: '13',
type: 'interface' type: 'interface'
} }
] ]
}, },
{ {
name: 'BAS界面', name: '站台报警',
mode: 'bas', mode: 'fas',
id: '2', id: 'stand',
type: 'system', type: 'system',
children: [ children: [
{
name: '站台报警',
mode: 'fas',
id: 'stand',
type: 'interface'
},
{
name: '公共区域',
mode: 'fas',
id: 'standPublicArea',
type: 'interface'
}
]
},
{
name: '系统状态',
mode: 'fas',
id: 'systemState',
type: 'system',
children: [
{
name: '系统状态',
mode: 'fas',
id: 'systemState',
type: 'interface'
}
]
}
]
},
{
name: 'BAS界面',
mode: 'bas',
id: 'bas',
type: 'system',
children: [
{
name: '大系统',
mode: 'bas',
id: 'bigSystem',
type: 'system',
children:[
{ {
name: '大系统', name: '大系统',
mode: 'bas', mode: 'bas',
id: '21', id: 'bigSystem',
type: 'interface' type: 'interface'
}, }
]
},
{
name: '小系统',
mode: 'bas',
id: 'smallSystem',
type: 'system',
children: [
{ {
name: '小系统', name: '小系统A端(一)',
mode: 'bas', mode: 'bas',
id: '22', id: 'aSideOne',
type: 'interface'
},
{
name: '小系统B端',
mode: 'bas',
id: '22-1',
type: 'interface' type: 'interface'
}, },
{ {
name: '小系统A端(二)', name: '小系统A端(二)',
mode: 'bas', mode: 'bas',
id: '22-2', id: 'aSideTwo',
type: 'interface' type: 'interface'
}, },
{
name: '小系统B端',
mode: 'bas',
id: 'bSide',
type: 'interface'
}
]
},
{
name: '水系统',
mode: 'bas',
id: 'waterSystem',
type: 'system',
children: [
{ {
name: '水系统', name: '水系统',
mode: 'bas', mode: 'bas',
id: '23', id: 'waterSystem',
type: 'interface' type: 'interface'
}, }
]
},
{
name: '照明',
mode: 'bas',
id: 'lightingSystem',
type: 'system',
children: [
{ {
name: '照明', name: '照明系统',
mode: 'bas', mode: 'bas',
id: '24', id: 'lightingSystem',
type: 'interface' type: 'interface'
}, },
{ {
name: 'EPS系统', name: 'EPS系统',
mode: 'bas', mode: 'bas',
id: '25', id: 'epsSystem',
type: 'interface'
},
{
name: '电扶梯',
mode: 'bas',
id: '26',
type: 'interface'
},
{
name: '机电排水',
mode: 'bas',
id: '27',
type: 'interface'
},
{
name: '隧道通风',
mode: 'bas',
id: '28',
type: 'interface'
},
{
name: '隧道通风-射流风机图',
mode: 'bas',
id: '29',
type: 'interface'
},
{
name: '车站网络',
mode: 'bas',
id: '210',
type: 'interface' type: 'interface'
} }
] ]
}, },
{ {
name: 'PSD界面', name: '电扶梯',
mode: 'bas',
id: 'electricEscalator',
type: 'system',
children: [
{
name: '电扶梯',
mode: 'bas',
id: 'electricEscalator',
type: 'interface'
}
]
},
{
name: '机电排水',
mode: 'bas',
id: 'waterSupply',
type: 'system',
children: [
{
name: '机电排水',
mode: 'bas',
id: 'waterSupply',
type: 'interface'
}
]
},
{
name: '隧道通风',
mode: 'bas',
id: 'tunnelVentilation',
type: 'system',
children: [
{
name: '隧道通风',
mode: 'bas',
id: 'tunnelVentilation',
type: 'interface'
},
{
name: '射流风机图',
mode: 'bas',
id: 'jetFan',
type: 'interface'
}
]
},
{
name: '车站网络',
mode: 'bas',
id: 'stationNet',
type: 'system',
children: [
{
name: '车站网络',
mode:'bas',
id: 'stationNet',
type: 'interface'
}
]
}
]
},
{
name: 'PSD界面',
mode: 'psd',
id: 'psd',
type: 'system',
children: [
{
name: '屏蔽门',
mode: 'psd', mode: 'psd',
id: '3', id: 'psd',
type: 'system', type: 'system',
children: [ children: [
{ {
name: '屏蔽门', name: '屏蔽门',
mode: 'psd', mode: 'psd',
id: '31', id: 'psd',
type: 'interface' type: 'interface'
} }
] ]
}, }
]
},
{
name: 'cctv界面',
mode: 'cctv',
id: 'cctv',
type: 'system',
children: [
{ {
name: 'cctv界面', name: '车站控制',
mode: 'cctv', mode: 'cctv',
id: '4', id: 'cctv',
type: 'system', type: 'system',
children: [ children: [
{ {
name: '车站控制-站厅', name: '站厅',
mode: 'cctv', mode: 'cctv',
id: '41', id: 'stationHall',
type: 'interface' type: 'interface'
}, },
{ {
name: '车站控制-站台', name: '站台',
mode: 'cctv', mode: 'cctv',
id: '42', id: 'stand',
type: 'interface' type: 'interface'
}, },
{ {
name: '中心设备状态', name: '云台',
mode: 'cctv', mode: 'cctv',
id: '43', id: 'holder',
type: 'interface'
},
{
name: '车站控制-云台',
mode: 'cctv',
id: '44',
type: 'interface' type: 'interface'
} }
] ]
}, },
{ {
name: 'AFC界面', name: '中心设备状态',
mode: 'cctv',
id: 'centralDeviceState',
type: 'system',
children: [
{
name: '中心设备状态',
mode: 'cctv',
id: 'centralDeviceState',
type: 'interface'
}
]
}
]
},
{
name: 'AFC界面',
mode: 'afc',
id: 'afc',
type: 'system',
children: [
{
name: '售检票',
mode: 'afc', mode: 'afc',
id: '5', id: 'afc',
type: 'system', type: 'system',
children: [ children: [
{ {
name: '售检票', name: '售检票',
mode: 'afc', mode: 'afc',
id: '51', id: 'afc',
type: 'interface' type: 'interface'
} }
] ]
}, }
]
},
{
name: 'ACS界面',
mode: 'acs',
id: 'acs',
type: 'system',
children: [
{ {
name: 'ACS界面', name: '门禁-站台层',
mode: 'acs', mode: 'acs',
id: '6', id: 'stand',
type: 'system', type: 'system',
children: [ children: [
{ {
name: '门禁-站台层', name: '门禁-站台层',
mode: 'acs', mode: 'acs',
id: '61', id: 'stand',
type: 'interface'
},
{
name: '门禁-站厅层',
mode: 'acs',
id: '62',
type: 'interface' type: 'interface'
} }
] ]
}, },
{
name: '门禁-站厅层',
mode: 'acs',
id: 'stationHall',
type: 'system',
children: [
{
name: '门禁-站厅层',
mode: 'acs',
id: 'stationHall',
type: 'interface'
}
]
}
]
},
{
name: '网络状态',
mode: 'netState',
id: 'netState',
type: 'system',
children: [
{ {
name: '网络状态', name: '网络状态',
mode: 'netState', mode: 'netState',
id: '7', id: 'netState',
type: 'system', type: 'system',
children: [ children: [
{ {
name: '网络状态', name: '网络状态',
mode: 'netState', mode: 'netState',
id: '71', id: 'netState',
type: 'interface' type: 'interface'
} }
] ]
@ -307,7 +430,7 @@ export default {
case 'system' : case 'system' :
break; break;
case 'interface': case 'interface':
this.$router.push({ path: `/iscs/design/edit/${obj.id}/${obj.mode}` }); this.$router.push({ path: `/iscs/design/edit`, query: {mode: obj.mode, system: data.parent.data.id, part: obj.id} });
break; break;
} }
}, },

View File

@ -49,24 +49,24 @@ export default {
}, },
computed:{ computed:{
iscsMode() { iscsMode() {
return this.$route.params.mode; return this.$route.query.mode;
} }
}, },
watch: { watch: {
$route(val) { $route(val) {
this.iscsChange(this.$route.params.id); this.iscsChange(this.$route.query.mode, this.$route.query.system, this.$route.query.part);
} }
}, },
mounted() { mounted() {
this.$refs.iscsPlate.show(); this.$refs.iscsPlate.show(this.$route.query.mode, this.$route.query.system, this.$route.query.part);
this.$refs.iscsPlate.drawIscsInit(); this.$refs.iscsPlate.drawIscsInit();
}, },
beforeDestroy() { beforeDestroy() {
}, },
methods: { methods: {
iscsChange(id) { iscsChange(mode, system, part) {
this.$refs.iscsPlate.show(id); this.$refs.iscsPlate.show(mode, system, part);
this.$refs.iscsPlate.drawIscsInit(); this.$refs.iscsPlate.drawIscsInit();
} }
} }

View File

@ -18,7 +18,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.$refs.iscsPlate.show('net', 'netState', 'netState'); this.$refs.iscsPlate.show('netState', 'netState', 'netState');
}, },
methods: {} methods: {}
}; };

View File

@ -9,7 +9,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Iscs from '@/iscs/iscs'; import Iscs from '@/iscs/iscs';
import { parser, deviceFactory } from '@/iscs/utils/parser'; import { parser, deviceFactory } from '@/iscs/utils/parser';
import iscsData from '@/iscs/constant/iscsData'; import {getIscsData} from '@/iscs/constant/iscsData';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { exitFullscreen } from '@/utils/screen'; import { exitFullscreen } from '@/utils/screen';
import { putJointTrainingSimulationUser } from '@/api/chat'; import { putJointTrainingSimulationUser } from '@/api/chat';
@ -92,8 +92,8 @@ export default {
this.iscsDestroy(); this.iscsDestroy();
}, },
methods: { methods: {
show (deviceCode) { show (mode, system, part) {
if (!deviceCode) { if (!mode || !system || !part) {
return; return;
} }
document.getElementById(this.iscsId).oncontextmenu = function (e) { document.getElementById(this.iscsId).oncontextmenu = function (e) {
@ -101,7 +101,7 @@ export default {
}; };
this.iscsDestroy(); this.iscsDestroy();
this.loading = true; this.loading = true;
const data = parser(iscsData[deviceCode], {width: this.canvasWidth, height: this.canvasHeight}); const data = parser(getIscsData(mode, system, part), {width: this.canvasWidth, height: this.canvasHeight});
this.$iscs = new Iscs({ this.$iscs = new Iscs({
dom: document.getElementById(this.iscsId), dom: document.getElementById(this.iscsId),
config: { config: {
@ -123,8 +123,8 @@ export default {
if (this.$route.query.group) { if (this.$route.query.group) {
this.$iscs.on('selected', this.onSelected, this); this.$iscs.on('selected', this.onSelected, this);
} }
this.setIscs(data, iscsData[deviceCode]); this.setIscs(data, getIscsData(mode, system, part));
this.$store.dispatch('iscs/setIscsData', iscsData[deviceCode]); this.$store.dispatch('iscs/setIscsData', getIscsData(mode, system, part));
if (this.$route.path.startsWith('/iscs/design')) { if (this.$route.path.startsWith('/iscs/design')) {
this.$iscs.on('keyboard', this.onKeyboard, this); this.$iscs.on('keyboard', this.onKeyboard, this);
} }