From 09b2923126d11cde4d1dbb0407b4d31e483d0860 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 30 Mar 2021 09:57:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?iscs=20=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs/iscs.js | 8 +++++- src/iscs/mouseController.js | 6 ++++- .../iscs/iscsDraw/icscComponents/button.vue | 20 ++++++++------- .../stationConfig/canvas/iscsCanvas.vue | 25 +++++++++++++++++-- .../iscs/iscsSystem/stationConfig/index.vue | 2 +- .../stationConfig/ticketOrEntrance/index.vue | 8 +++++- src/views/iscs/iscsSystem/stationNav.vue | 5 ++-- 7 files changed, 57 insertions(+), 17 deletions(-) diff --git a/src/iscs/iscs.js b/src/iscs/iscs.js index 0cbd893f1..c6f6a20c4 100644 --- a/src/iscs/iscs.js +++ b/src/iscs/iscs.js @@ -18,7 +18,7 @@ class Iscs { this.methods = opts.methods; // 鼠标事件 - this.events = { __Pan: 'pan', Selected: 'selected', Contextmenu: 'contextmenu', Keyboard: 'keyboard', dblclick: 'dblclick'}; + this.events = { __Pan: 'pan', Selected: 'selected', Contextmenu: 'contextmenu', Keyboard: 'keyboard', dblclick: 'dblclick', click:'click'}; // 设备数据 this.iscsDevice = {}; @@ -280,6 +280,9 @@ class Iscs { case this.events.dblclick: this.$mouseController.on(this.events.dblclick, cb, context); break; + case this.events.click: + this.$mouseController.on(this.events.click, cb, context); + break; case this.events.Contextmenu: this.$mouseController.on(this.events.Contextmenu, cb, context); break; @@ -303,6 +306,9 @@ class Iscs { case this.events.dblclick: this.$mouseController.off(this.events.dblclick, cb); break; + case this.events.click: + this.$mouseController.off(this.events.click, cb); + break; case this.events.Contextmenu: this.$mouseController.off(this.events.Contextmenu, cb); break; diff --git a/src/iscs/mouseController.js b/src/iscs/mouseController.js index 44205f387..284752c10 100644 --- a/src/iscs/mouseController.js +++ b/src/iscs/mouseController.js @@ -138,7 +138,11 @@ class MouseController extends Eventful { } click(e) { var em = this.checkEvent(e); - this.trigger(this.events.Selected, em); + if (em.deviceType == 'IscsButton') { + this.trigger(this.events.click, em); + } else { + this.trigger(this.events.Selected, em); + } } moveEvent(e) { const newEm = new EventModel(e); diff --git a/src/views/iscs/iscsDraw/icscComponents/button.vue b/src/views/iscs/iscsDraw/icscComponents/button.vue index 8d56998fe..a260153db 100644 --- a/src/views/iscs/iscsDraw/icscComponents/button.vue +++ b/src/views/iscs/iscsDraw/icscComponents/button.vue @@ -91,7 +91,7 @@ export default { function: '', textColor: '', textColorActive: '#000', - fillColor: 'rgba(0,0,0,0)', + fillColor: 'rgba(0,0,0,0)', fillColorActive: 'rgba(0,0,0,0)' }, rules: { @@ -127,8 +127,8 @@ export default { this.form.fontSize = model.fontSize; this.form.textColor = model.textColor || '#fff'; this.form.textColorActive = model.textColorActive || '#000'; - this.form.fillColor = model.fillColor; - this.form.fillColorActive = model.fillColorActive; + this.form.fillColor = model.fillColor; + this.form.fillColorActive = model.fillColorActive; } } }, @@ -136,6 +136,8 @@ export default { if (this.$route.query.lineCode == '02') { this.functionList = [ {label: '操作按钮', value: 'OperatingButton'}, + {label: '门禁站台层', value: 'goToStand'}, + {label: '门禁站厅层', value: 'goToStation'}, {label: '元素显隐', value: 'ElementShow'}, {label: '返回', value: 'GoBack'} ]; @@ -172,8 +174,8 @@ export default { fontSize: this.form.fontSize, textColor: this.form.textColor, textColorActive: this.form.textColorActive, - fillColor: this.form.fillColor, - fillColorActive: this.form.fillColorActive + fillColor: this.form.fillColor, + fillColorActive: this.form.fillColorActive }; this.$emit('createDataModel', rectModel); this.initPage(); @@ -195,8 +197,8 @@ export default { context: this.form.context, function: this.form.function, fontSize: this.form.fontSize, - fillColor: this.form.fillColor, - fillColorActive: this.form.fillColorActive + fillColor: this.form.fillColor, + fillColorActive: this.form.fillColorActive }; this.$emit('deleteDataModel', rectModel); }, @@ -216,8 +218,8 @@ export default { function: '', textColor: '', textColorActive: '#000', - fillColor: '', - fillColorActive: '' + fillColor: '', + fillColorActive: '' }; } } diff --git a/src/views/iscs/iscsSystem/stationConfig/canvas/iscsCanvas.vue b/src/views/iscs/iscsSystem/stationConfig/canvas/iscsCanvas.vue index b7e64b37e..9e606814b 100644 --- a/src/views/iscs/iscsSystem/stationConfig/canvas/iscsCanvas.vue +++ b/src/views/iscs/iscsSystem/stationConfig/canvas/iscsCanvas.vue @@ -90,6 +90,7 @@ export default { this.$store.dispatch('iscs/setIscsData', iscsData); if (this.$route.query.group) { this.$iscs.on('dblclick', this.onDblclick, this); + this.$iscs.on('click', this.onlclick, this); } }, onDblclick(em) { @@ -97,10 +98,30 @@ export default { if (em.deviceType == 'IscsGroup') { this.$iscs.iscsDevice[em.deviceModel.code].instance.hide(); this.$refs.valve.doShow(em.deviceModel); - } else if (em.deviceType == 'IscsButton') { + } else if (em.deviceType == 'IscsButton' && em.deviceModel.function != 'goToStand' && em.deviceModel.function != 'goToStation') { this.$refs.protectReset.doShow(em.deviceModel); } }, + + onlclick(em) { + // 父编组上元素内容 + const query = { + stationName: this.$route.query.stationName, + stationId: this.$route.query.stationId, + group: this.$route.query.group, + mapId: this.$route.query.mapId, + lineCode:'02', + noPreLogout:this.$route.query.noPreLogout + }; + let type = ''; + if (em.deviceType == 'IscsButton' && em.deviceModel.function == 'goToStand') { + type = 'afcTwo02'; + } else if (em.deviceType == 'IscsButton' && em.deviceModel.function == 'goToStation') { + type = 'afcOne02'; + } + this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query }); + }, + // 地图加载完成 handleViewLoaded() { this.loading = false; @@ -126,7 +147,7 @@ export default { } }, setIscs(data, oldData) { - this.$iscs.setIscs(oldData, data, this.$route.query.mapId); + this.$iscs.setIscs(oldData, data, this.$route.query.lineCode); }, // 执行操作 handleModel(model) { diff --git a/src/views/iscs/iscsSystem/stationConfig/index.vue b/src/views/iscs/iscsSystem/stationConfig/index.vue index 7d4360a30..b7aa76d00 100644 --- a/src/views/iscs/iscsSystem/stationConfig/index.vue +++ b/src/views/iscs/iscsSystem/stationConfig/index.vue @@ -19,7 +19,7 @@ --> - + diff --git a/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue b/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue index c93c336de..696c28db6 100644 --- a/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue +++ b/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue @@ -62,9 +62,15 @@ export default { this.title = this.stationName + ' 自动售检票系统'; this.scaleRate = window.innerWidth / 1920; this.height = 800; - } else if (this.mode == 'entranceGuard') { + } else if (this.mode == 'afcTwo02') { params.userInterface = 'afcTwo02'; params.system = 'entranceGuard'; + this.title = this.stationName + ' 门禁系统 站厅层'; + this.scaleRate = window.innerWidth / 1920; + this.height = 800; + } else if (this.mode == 'afcOne02') { + params.userInterface = 'afcOne02'; + params.system = 'entranceGuard'; this.title = this.stationName + ' 门禁系统 站台层'; this.scaleRate = window.innerWidth / 1920; this.height = 800; diff --git a/src/views/iscs/iscsSystem/stationNav.vue b/src/views/iscs/iscsSystem/stationNav.vue index f84d814ac..c69a7f9a6 100644 --- a/src/views/iscs/iscsSystem/stationNav.vue +++ b/src/views/iscs/iscsSystem/stationNav.vue @@ -249,8 +249,8 @@ export default { }, { name: '门禁系统', - mode: 'entranceGuard', - id: 'entranceGuard', + mode: 'afcOne02', + id: 'afcOne02', type: 'interface' } ]}, @@ -443,6 +443,7 @@ export default { stationId: this.selectStation, group: this.group, mapId: this.$route.query.mapId, + lineCode:'02', noPreLogout:this.$route.query.noPreLogout }; if (isReplace) { From 770bdff7912cf173b513f2f8e405e0fe3dcd4b2d Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 30 Mar 2021 09:59:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue b/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue index 696c28db6..0e0a5ddd9 100644 --- a/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue +++ b/src/views/iscs/iscsSystem/stationConfig/ticketOrEntrance/index.vue @@ -65,13 +65,13 @@ export default { } else if (this.mode == 'afcTwo02') { params.userInterface = 'afcTwo02'; params.system = 'entranceGuard'; - this.title = this.stationName + ' 门禁系统 站厅层'; + this.title = this.stationName + ' 门禁系统 站台层'; this.scaleRate = window.innerWidth / 1920; this.height = 800; } else if (this.mode == 'afcOne02') { params.userInterface = 'afcOne02'; params.system = 'entranceGuard'; - this.title = this.stationName + ' 门禁系统 站台层'; + this.title = this.stationName + ' 门禁系统 站厅层'; this.scaleRate = window.innerWidth / 1920; this.height = 800; }