From 61e517e317a2b2f2e57a8f39fd4eb089082e9c26 Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 11 Aug 2022 11:17:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=BC=94=E7=BB=83?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=A1=8C=E5=80=BC=E5=88=B7=E6=96=B0=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/jointTrainingNew/index.vue | 88 ++++++++++----------- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index 3874bd574..0c9bf13b1 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -233,6 +233,12 @@ export default { this.cancelBigScreenMode(); } }, + '$store.state.map.mapDataLoadedCount':function(val) { + const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT']; + if (roleList.includes(this.$store.state.training.roles)) { + this.stationRoleShow(this.showStation); + } + }, '$store.state.map.mapViewLoadedCount': function () { // 地图视图加载完成标识 this.mapViewLoadedOver = true; this.showSelectStation && this.setShowStation(this.showStation); @@ -420,7 +426,6 @@ export default { // 仿真系统 async initLoadDemonData() { if (this.lineCode) { - // 01 现地 02 行调 '' 观众 let resp = {data: {}}; resp = await this.getUserRole(); if (resp && resp.code == 200) { @@ -434,11 +439,45 @@ export default { handleDialogShow(type) { this.$refs[type].doShow(); }, + stationRoleShow(deviceCode) { + const pictureLineCodeList = ['16']; + if (this.lineCode === '14') { + const list = []; + const mapDevice = this.$store.state.map.mapDevice; + this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData}); + for (const key in mapDevice) { + list.push(mapDevice[key]); + } + this.$jlmap.updateShowMode(list, '02'); + } + if (pictureLineCodeList.includes(this.lineCode) && this.$store.state.map.map && this.$store.state.map.map.pictureList) { + const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === deviceCode && picture.type === 'chainStation'); + if (picture) { + const mapDevice = this.$store.state.map.mapDevice; + const list = []; + const deviceList = []; + for (const key in mapDevice) { + list.push(mapDevice[key]); + deviceList.push(key); + } + this.$jlmap.updateShowStation(list, ''); + this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); + this.$jlmap.updatePicture(deviceList); + this.$jlmap.updateTransform(picture.scaling, picture.origin); + this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[deviceCode]); + } else { + this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]); + this.mapViewLoadedOver && this.switchStationMode(deviceCode); + } + } else { + this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]); + this.mapViewLoadedOver && this.switchStationMode(deviceCode); + } + }, // 设置prdType和role setSimulationPrdType(deviceCode) { // Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号 this.showStation = ''; - const pictureLineCodeList = ['16']; let tempData; let dataZoom; switch (this.userRole) { @@ -459,38 +498,7 @@ export default { this.$refs.menuSchema.chiShowStation = deviceCode; this.showStation = deviceCode; // this.changePrdType('01'); - if (this.lineCode === '14') { - const list = []; - const mapDevice = this.$store.state.map.mapDevice; - this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData}); - for (const key in mapDevice) { - list.push(mapDevice[key]); - } - this.$jlmap.updateShowMode(list, '02'); - } - if (pictureLineCodeList.includes(this.lineCode) && this.$store.state.map.map && this.$store.state.map.map.pictureList) { - const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === deviceCode && picture.type === 'chainStation'); - if (picture) { - const mapDevice = this.$store.state.map.mapDevice; - const list = []; - const deviceList = []; - for (const key in mapDevice) { - list.push(mapDevice[key]); - deviceList.push(key); - } - this.$jlmap.updateShowStation(list, ''); - this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); - this.$jlmap.updatePicture(deviceList); - this.$jlmap.updateTransform(picture.scaling, picture.origin); - this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[deviceCode]); - } else { - this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]); - this.mapViewLoadedOver && this.switchStationMode(deviceCode); - } - } else { - this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]); - this.mapViewLoadedOver && this.switchStationMode(deviceCode); - } + this.stationRoleShow(deviceCode); this.jl3dmaintainershow = false; this.drivingShow = false; break; @@ -500,17 +508,7 @@ export default { this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT'); this.$refs.menuSchema.chiShowStation = deviceCode; this.showStation = deviceCode; - if (this.lineCode === '14') { - const list = []; - const mapDevice = this.$store.state.map.mapDevice; - this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeDate: this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData}); - for (const key in mapDevice) { - list.push(mapDevice[key]); - } - this.$jlmap.updateShowMode(list, '02'); - } - this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]); - this.mapViewLoadedOver && this.switchStationMode(deviceCode); + this.stationRoleShow(deviceCode); this.jl3dmaintainershow = false; this.drivingShow = false; break; From 319cd60d6c999d83603bafc36773977ab2c81fef Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 11 Aug 2022 11:18:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=97=E8=BD=A6=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=E8=87=B3=E6=93=8D=E4=BD=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/beijing_01/menus/menuTrain.vue | 8 +-- .../theme/chengdu_01/menus/menuTrain.vue | 8 +-- .../theme/chengdu_03/menus/menuTrain.vue | 8 +-- .../components/menus/dialog/setFault.vue | 10 +-- .../theme/datie_01/menus/menuTrain.vue | 16 ++--- .../theme/datie_02/menus/menuTrain.vue | 16 ++--- .../theme/datie_jd1a/menus/menuTrain.vue | 16 ++--- .../theme/datie_ksk/menus/menuButton.vue | 64 +++++++++++++------ .../theme/datie_ksk/menus/menuTrain.vue | 16 ++--- .../theme/datie_tky/menus/menuTrain.vue | 16 ++--- .../theme/foshan_01/menus/menuTrain.vue | 8 +-- .../theme/fuzhou_01/menus/menuTrain.vue | 8 +-- .../theme/haerbin_01/menus/menuTrain.vue | 8 +-- .../theme/nanjing_02/menus/menuTrain.vue | 8 +-- .../theme/ningbo_01/menus/menuTrain.vue | 8 +-- .../theme/ningbo_03/menus/menuTrain.vue | 8 +-- src/jmapNew/theme/race_01/menus/menuTrain.vue | 8 +-- src/jmapNew/theme/xian_01/menus/menuTrain.vue | 10 +-- src/jmapNew/theme/xian_02/menus/menuTrain.vue | 8 +-- 19 files changed, 140 insertions(+), 112 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue index 38a2b8f02..bcd4c2205 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue @@ -230,10 +230,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue index ef16ae564..3a83f1f7d 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue @@ -143,10 +143,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue index 31e41df1b..8754f070f 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue @@ -126,10 +126,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue index ce093d2d8..93200a45d 100644 --- a/src/jmapNew/theme/components/menus/dialog/setFault.vue +++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue @@ -23,11 +23,13 @@ - + - 越红灯行驶 - 越引导行驶 - + 越红灯行驶
+ 越引导行驶
+ 运行至前方车站
+ 进路闭塞法行车
+
diff --git a/src/jmapNew/theme/datie_01/menus/menuTrain.vue b/src/jmapNew/theme/datie_01/menus/menuTrain.vue index 9244e9f08..215595047 100644 --- a/src/jmapNew/theme/datie_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_01/menus/menuTrain.vue @@ -123,14 +123,14 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '进路闭塞法行车', - handler: this.routeBlockRun - } + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '进路闭塞法行车', + // handler: this.routeBlockRun + // } // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/datie_02/menus/menuTrain.vue b/src/jmapNew/theme/datie_02/menus/menuTrain.vue index c31b4c55b..9539df66b 100644 --- a/src/jmapNew/theme/datie_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_02/menus/menuTrain.vue @@ -185,14 +185,14 @@ export default { } ] }, - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '进路闭塞法行车', - handler: this.routeBlockRun - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '进路闭塞法行车', + // handler: this.routeBlockRun + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue b/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue index 119d1f328..599015882 100644 --- a/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue @@ -182,14 +182,14 @@ export default { } ] }, - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '进路闭塞法行车', - handler: this.routeBlockRun - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '进路闭塞法行车', + // handler: this.routeBlockRun + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/datie_ksk/menus/menuButton.vue b/src/jmapNew/theme/datie_ksk/menus/menuButton.vue index 79e8d1daa..eacb8824e 100644 --- a/src/jmapNew/theme/datie_ksk/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_ksk/menus/menuButton.vue @@ -352,16 +352,24 @@ export default { if (this.timeNode && val - this.timeNode >= 15) { this.clearOperate(); } + const routeDeviceList = []; + this.routeList.forEach(item => { + if (item && item.btnCodeList && item.btnCodeList.length && this.deviceList && this.deviceList.length && item.btnCodeList[0] === this.deviceList[0].code) { + routeDeviceList.push(this.$store.getters['map/getDeviceByCode'](item.btnCodeList[1])); + } + }); + const updateList = []; + if (this.deviceList && this.deviceList.length) { + updateList.push({code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0}); + } + routeDeviceList.forEach(item => { + updateList.push({ code: item.code, _type: item._type, toSelected: 0 }); + }); if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) { if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') { - this.$store.dispatch('training/updateMapState', [{ code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0 }]); - } else if ( - this.deviceList && - this.deviceList.length && - this.deviceList[0]._type === 'Signal' && - this.deviceList[0].type === 'SHUNTING' - ) { - this.$store.dispatch('training/updateMapState', [{ code: this.deviceList[0].code, _type: 'Signal', hasSelected: 0 }]); + this.$store.dispatch('training/updateMapState', updateList); + } else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') { + this.$store.dispatch('training/updateMapState', updateList); } this.deviceList = []; } @@ -620,7 +628,17 @@ export default { if (valid) { // 仅信号按钮调车信号机有状态 if (deviceList[0]._type === 'SignalButton' || (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING')) { - this.$store.dispatch('training/updateMapState', [{ code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1 }]); + const routeDeviceList = []; + this.routeList.forEach(item => { + if (item && item.btnCodeList && item.btnCodeList.length && this.deviceList && this.deviceList.length && item.btnCodeList[0] === deviceList[0].code) { + routeDeviceList.push(this.$store.getters['map/getDeviceByCode'](item.btnCodeList[1])); + } + }); + const updateList = [{ code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1 }]; + routeDeviceList.forEach(item => { + updateList.push({ code: item.code, _type: item._type, toSelected: 1 }); + }); + this.$store.dispatch('training/updateMapState', updateList); } } }) @@ -715,7 +733,7 @@ export default { val: model.code, cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE }; - const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code); + // const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code); if (model._type === 'SignalButton' && model.type === 'PICK') { operate.param = { signalCode: model.signalCode }; this.sendCommand(operate); @@ -942,18 +960,26 @@ export default { return false; } }, - clearOperate() { - // 清除操作 - this.deviceList && - this.deviceList.length && - this.$store.dispatch('training/updateMapState', [ - { code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0 } - ]); + clearOperate() { // 清除操作 this.deviceList = []; Handler.clear(); // 清空操作组 this.$store.dispatch('menuOperation/setButtonOperation', null); - // this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(false) - // this.pressedSignalButton = null + }, + clearSignalButton() { // 清除信号按钮前端状态 + const routeDeviceList = []; + this.routeList.forEach(item => { + if (item && item.btnCodeList && item.btnCodeList.length && this.deviceList && this.deviceList.length && item.btnCodeList[0] === this.deviceList[0].code) { + routeDeviceList.push(this.$store.getters['map/getDeviceByCode'](item.btnCodeList[1])); + } + }); + const updateList = []; + if (this.deviceList && this.deviceList.length) { + updateList.push({code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0}); + } + routeDeviceList.forEach(item => { + updateList.push({ code: item.code, _type: item._type, toSelected: 0 }); + }); + this.deviceList && this.deviceList.length && this.$store.dispatch('training/updateMapState', updateList); }, assistOperateOrChange(model) { // mode.type== diff --git a/src/jmapNew/theme/datie_ksk/menus/menuTrain.vue b/src/jmapNew/theme/datie_ksk/menus/menuTrain.vue index 119d1f328..599015882 100644 --- a/src/jmapNew/theme/datie_ksk/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_ksk/menus/menuTrain.vue @@ -182,14 +182,14 @@ export default { } ] }, - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '进路闭塞法行车', - handler: this.routeBlockRun - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '进路闭塞法行车', + // handler: this.routeBlockRun + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/datie_tky/menus/menuTrain.vue b/src/jmapNew/theme/datie_tky/menus/menuTrain.vue index 358630182..ceab65302 100644 --- a/src/jmapNew/theme/datie_tky/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_tky/menus/menuTrain.vue @@ -185,14 +185,14 @@ export default { } ] }, - { - label: '确认运行至前方站', - handler: this.nextStation - }, - { - label: '进路闭塞法行车', - handler: this.routeBlockRun - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, + // { + // label: '进路闭塞法行车', + // handler: this.routeBlockRun + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue index dc41811c4..efe9dfc0e 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue @@ -134,10 +134,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue index 93d9af963..b9b2a13b1 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue @@ -108,10 +108,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue b/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue index d9aa8a1da..0838f2cfc 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue @@ -75,10 +75,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue b/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue index dda65c3c5..5744d6904 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue @@ -75,10 +75,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue index 8ac6b9d53..1251a633d 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue @@ -214,10 +214,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue index e24da823f..2e21da03c 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue @@ -215,10 +215,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal diff --git a/src/jmapNew/theme/race_01/menus/menuTrain.vue b/src/jmapNew/theme/race_01/menus/menuTrain.vue index a544dbff3..75cb2ceed 100644 --- a/src/jmapNew/theme/race_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/race_01/menus/menuTrain.vue @@ -229,10 +229,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '限速指令', // handler: this.handleSpeedLimit diff --git a/src/jmapNew/theme/xian_01/menus/menuTrain.vue b/src/jmapNew/theme/xian_01/menus/menuTrain.vue index 8777fb089..a9e454299 100644 --- a/src/jmapNew/theme/xian_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_01/menus/menuTrain.vue @@ -159,10 +159,10 @@ export default { label: '转NRM模式', handler: this.handlerApplyNrmMode }, - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal @@ -302,7 +302,7 @@ export default { }); }, handlerApplyNrmMode() { - commitOperate(menuOperate.Driver.applyNrm, { groupNumber: this.selected.code }, 0).then(({ valid, operate }) => { + commitOperate(menuOperate.Driver.applyNrm, { groupNumber: this.selected.code }, 3).then(({ valid, operate }) => { }).catch((error) => { console.error(error); this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/xian_02/menus/menuTrain.vue b/src/jmapNew/theme/xian_02/menus/menuTrain.vue index 5c7e0fc43..a045c6ea1 100644 --- a/src/jmapNew/theme/xian_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_02/menus/menuTrain.vue @@ -237,10 +237,10 @@ export default { } ], menuDirective: [ - { - label: '确认运行至前方站', - handler: this.nextStation - }, + // { + // label: '确认运行至前方站', + // handler: this.nextStation + // }, // { // label: '越引导信号行驶', // handler: this.handleOverFuideSignal From 1a80ae755815231a84ebb82d3830bd0a5c22b620 Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 11 Aug 2022 11:18:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8D=A1=E6=96=AF=E6=9F=AF=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/datie_ksk.js | 4 +- src/jmapNew/shape/graph/Signal/index.js | 17 +- src/jmapNew/shape/graph/SignalButton/index.js | 658 +++++++++--------- 3 files changed, 353 insertions(+), 326 deletions(-) diff --git a/src/jmapNew/config/skinCode/datie_ksk.js b/src/jmapNew/config/skinCode/datie_ksk.js index 7a825f073..f4fadb96e 100644 --- a/src/jmapNew/config/skinCode/datie_ksk.js +++ b/src/jmapNew/config/skinCode/datie_ksk.js @@ -261,7 +261,9 @@ class SkinCode extends defaultStyle { this[deviceType.SignalButton] = { shape: 'roundWithDock', fillColor: '#808080', - showName: true + showName: true, + selectColor: '#0000ff', + flashingColor: '#ffff00' }; this[deviceType.SwitchFault] = { displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示) diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index e1f642769..4bf15d7e4 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -647,7 +647,6 @@ class Signal extends Group { } this.sigPost.setHorColor(this.style.Signal.post.openHorColor); } - } /* 侧向开放 */ openLateral(logicLight) { @@ -726,6 +725,14 @@ class Signal extends Group { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor); this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor); } + redFlash() { + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor); + this.lamps[0].setAnimationStart(this.style.Signal.lamp.redColor); + } + blueFlash() { + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor); + this.lamps[0].setAnimationStart(this.style.Signal.lamp.blueColor); + } lampWhite() { if (this.lamps.length === 1) { this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor); @@ -1086,6 +1093,14 @@ class Signal extends Group { this.greenYellow(); break; } + case 'RF': { + this.redFlash(); + break; + } + case 'BF': { + this.blueFlash(); + break; + } default: { this.close(model.logicLight); // 信号关闭 break; diff --git a/src/jmapNew/shape/graph/SignalButton/index.js b/src/jmapNew/shape/graph/SignalButton/index.js index ecbf971d4..40786947e 100644 --- a/src/jmapNew/shape/graph/SignalButton/index.js +++ b/src/jmapNew/shape/graph/SignalButton/index.js @@ -1,333 +1,343 @@ -import Group from 'zrender/src/container/Group' -import Rect from 'zrender/src/graphic/shape/Rect' -import Line from 'zrender/src/graphic/shape/Line' -import Text from 'zrender/src/graphic/Text' -import Arc from 'zrender/src/graphic/shape/Arc' -import Circle from 'zrender/src/graphic/shape/Circle' -import store from '@/store/index' +import Group from 'zrender/src/container/Group'; +import Rect from 'zrender/src/graphic/shape/Rect'; +import Line from 'zrender/src/graphic/shape/Line'; +import Text from 'zrender/src/graphic/Text'; +import Arc from 'zrender/src/graphic/shape/Arc'; +import Circle from 'zrender/src/graphic/shape/Circle'; +import store from '@/store/index'; const typeList = [ - 'PICK_ASSIST', - 'DEPART_ASSIST', - 'ASSIST', - 'GUIDELOCK', - 'SECTION_FAULT_UNLOCK', - 'LOCATE', - 'REVERSE', - 'CANCEL', - 'HUMAN_RELEASE_ROUTE', - 'MONOLOCK', - 'UNLOCK', - 'BLOCK', - 'UNBLOCK', - 'CHANGE_DIRECTION' -] + 'PICK_ASSIST', + 'DEPART_ASSIST', + 'ASSIST', + 'GUIDELOCK', + 'SECTION_FAULT_UNLOCK', + 'LOCATE', + 'REVERSE', + 'CANCEL', + 'HUMAN_RELEASE_ROUTE', + 'MONOLOCK', + 'UNLOCK', + 'BLOCK', + 'UNBLOCK', + 'CHANGE_DIRECTION' +]; export default class SignalButton extends Group { - constructor(model, { style }) { - super() - this._code = model.code - this._type = model._type - this.zlevel = model.zlevel - const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code) - if (pictureDevice) { - this.computedPosition = pictureDevice.position - } else { - this.computedPosition = model.position - } - this.z = 0 - this.model = model - this.style = style - this.pressed = false - // Line - this.create() - this.setState(model) - } - - create() { - const model = this.model - const computedPosition = this.computedPosition - const fillColor = this.getTypeColor() - if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) { - const circle1 = new Circle({ - zlevel: this.zlevel, - z: this.z + 2, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 7, - r: 7 - }, - style: { - stroke: '#69666E', - lineWidth: 1, - fill: fillColor - } - }) - const circle2 = new Circle({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 9, - r: 8 - }, - style: { - fill: '#000' - } - }) - const circle3 = new Circle({ - zlevel: this.zlevel, - z: this.z, - shape: { - cx: computedPosition.x + 7, - cy: computedPosition.y + 9, - r: 9 - }, - style: { - fill: '#eee' - } - }) - this.arcShape = circle1 - this.arcShapeDock1 = circle2 - this.arcShapeDock2 = circle3 - this.add(circle1) - .add(circle2) - .add(circle3) - } else { - this.rectButton = new Rect({ - zlevel: this.zlevel, - z: this.z, - shape: { - x: computedPosition.x, - y: computedPosition.y, - width: 14, - height: 14 - }, - style: { - lineDash: null, - stroke: '#69666E', - lineWidth: 1, - fill: fillColor - } - }) - this.add(this.rectButton) - } - this.leftLine = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 1, - y1: computedPosition.y + 1, - x2: computedPosition.x + 13, - y2: computedPosition.y + 13 - }, - style: { - lineWidth: 2, - stroke: '#ff0000' - } - }) - this.add(this.leftLine) - this.leftLine.hide() - this.rightLine = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 13, - y1: computedPosition.y + 1, - x2: computedPosition.x + 1, - y2: computedPosition.y + 13 - }, - style: { - lineWidth: 2, - stroke: '#ff0000' - } - }) - this.add(this.rightLine) - this.rightLine.hide() - this.leftBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y - 1, - x2: computedPosition.x - 1, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#FFFFFF' - } - }) - this.add(this.leftBoard) - this.leftBoard.hide() - this.topBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y - 1, - x2: computedPosition.x + 15, - y2: computedPosition.y - 1 - }, - style: { - lineWidth: 2, - stroke: '#FFFFFF' - } - }) - this.add(this.topBoard) - this.topBoard.hide() - this.rightBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x + 15, - y1: computedPosition.y - 1, - x2: computedPosition.x + 15, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#A0A0A0' - } - }) - this.add(this.rightBoard) - this.rightBoard.hide() - this.bottomBoard = new Line({ - zlevel: this.zlevel, - z: this.z + 1, - shape: { - x1: computedPosition.x - 1, - y1: computedPosition.y + 15, - x2: computedPosition.x + 15, - y2: computedPosition.y + 15 - }, - style: { - lineWidth: 2, - stroke: '#A0A0A0' - } - }) - this.add(this.bottomBoard) - this.bottomBoard.hide() - const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'] - if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) { - this.buttonText = new Text({ - zlevel: this.zlevel, - z: this.z, - style: { - x: computedPosition.x + model.nameOffset.x, - y: computedPosition.y + model.nameOffset.y, - fontWeight: '400', - fontSize: 10, - fontFamily: '', - text: model.name, - textFill: '#C0C0C0', - textAlign: 'middle', - textVerticalAlign: 'top' - } - }) - this.add(this.buttonText) - } - } - startAnimate() { - this.rectButton && - this.rectButton - .animateStyle(true) - .when(0, { fill: '#000' }) - .when(1000, { fill: this.getTypeColor() }) - .when(2000, { fill: '#000' }) - .start() - } - stopAnimation() { - this.rectButton && this.rectButton.stopAnimation(true) - // this.arcFlash && this.arcFlash.stopAnimation(false); - } - getTypeColor() { - if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) { - return this.style.SignalButton.fillColor - } - let color = '' - const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'] - if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') { - color = '#808080' - } else if (this.model.type === 'GUIDE') { - color = '#5050E1' - } else if (list.includes(this.model.type)) { - color = '#ccc' - } else { - color = '#008000' - } - return color - } // - recover() { - this.stopAnimation() - this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() }) - this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() }) - this.rightLine && this.rightLine.hide() - this.leftLine && this.leftLine.hide() - this.rectButton && this.rectButton.show() - this.arcShape && this.arcShape.show() - this.arcShapeDock1 && this.arcShapeDock1.show() - this.arcShapeDock2 && this.arcShapeDock2.show() - this.buttonText && this.buttonText.show() - this.leftBoard && this.leftBoard.hide() - this.rightBoard && this.rightBoard.hide() - this.topBoard && this.topBoard.hide() - this.bottomBoard && this.bottomBoard.hide() - } - blockShow() { - this.rightLine && this.rightLine.show() - this.leftLine && this.leftLine.show() - } - setState(model) { - this.recover() - // { value: 'ASSIST', label: '总辅助按钮' }, - // { value: 'PICK_ASSIST', label: '接辅助按钮' }, - // { value: 'DEPART_ASSIST', label: '发辅助按钮' }, - const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION'] - if (list.includes(model.type)) { - if (this.rectButton) { - if (model.pressDown) { - this.rectButton.setStyle({ fill: '#FFFF00' }) + constructor(model, { style }) { + super(); + this._code = model.code; + this._type = model._type; + this.zlevel = model.zlevel; + const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code); + if (pictureDevice) { + this.computedPosition = pictureDevice.position; } else { - this.rectButton.setStyle({ fill: this.getTypeColor() }) + this.computedPosition = model.position; } - } + this.z = 0; + this.model = model; + this.style = style; + this.pressed = false; + // Line + this.create(); + this.setState(model); } - // { value: 'PICK', label: '接车按钮' }, - // { value: 'SHUNT_TERMINAL', label: '调车终端按钮' }, - if (!store.getters['map/checkDeviceShow'](this._code)) { - this.buttonText && this.buttonText.hide() - this.rectButton && this.rectButton.hide() - this.leftLine && this.leftLine.hide() - this.rightLine && this.rightLine.hide() - this.arcShape && this.arcShape.hide() - this.arcShapeDock1 && this.arcShapeDock1.hide() - this.arcShapeDock2 && this.arcShapeDock2.hide() - } else { - if (model.hasSelected) { - this.startAnimate() - } - } - } - pressDown(flg, color) { - if (this.pressed === flg) return - if (this.arcShapeDock1) { - if (flg) { - this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel }) - if (color) { - this.arcShape - .animateStyle(true) - .when(0, { fill: '#69666E' }) - .when(1000, { fill: color }) - .when(2000, { fill: '#69666E' }) - .start() + + create() { + const model = this.model; + const computedPosition = this.computedPosition; + const fillColor = this.getTypeColor(); + if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) { + const circle1 = new Circle({ + zlevel: this.zlevel, + z: this.z + 2, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 7, + r: 7 + }, + style: { + stroke: '#69666E', + lineWidth: 1, + fill: fillColor + } + }); + const circle2 = new Circle({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 9, + r: 8 + }, + style: { + fill: '#000' + } + }); + const circle3 = new Circle({ + zlevel: this.zlevel, + z: this.z, + shape: { + cx: computedPosition.x + 7, + cy: computedPosition.y + 9, + r: 9 + }, + style: { + fill: '#eee' + } + }); + this.arcShape = circle1; + this.arcShapeDock1 = circle2; + this.arcShapeDock2 = circle3; + this.add(circle1) + .add(circle2) + .add(circle3); + } else { + this.rectButton = new Rect({ + zlevel: this.zlevel, + z: this.z, + shape: { + x: computedPosition.x, + y: computedPosition.y, + width: 14, + height: 14 + }, + style: { + lineDash: null, + stroke: '#69666E', + lineWidth: 1, + fill: fillColor + } + }); + this.add(this.rectButton); + } + this.leftLine = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + 1, + y1: computedPosition.y + 1, + x2: computedPosition.x + 13, + y2: computedPosition.y + 13 + }, + style: { + lineWidth: 2, + stroke: '#ff0000' + } + }); + this.add(this.leftLine); + this.leftLine.hide(); + this.rightLine = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + 13, + y1: computedPosition.y + 1, + x2: computedPosition.x + 1, + y2: computedPosition.y + 13 + }, + style: { + lineWidth: 2, + stroke: '#ff0000' + } + }); + this.add(this.rightLine); + this.rightLine.hide(); + this.leftBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - 1, + y1: computedPosition.y - 1, + x2: computedPosition.x - 1, + y2: computedPosition.y + 15 + }, + style: { + lineWidth: 2, + stroke: '#FFFFFF' + } + }); + this.add(this.leftBoard); + this.leftBoard.hide(); + this.topBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - 1, + y1: computedPosition.y - 1, + x2: computedPosition.x + 15, + y2: computedPosition.y - 1 + }, + style: { + lineWidth: 2, + stroke: '#FFFFFF' + } + }); + this.add(this.topBoard); + this.topBoard.hide(); + this.rightBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x + 15, + y1: computedPosition.y - 1, + x2: computedPosition.x + 15, + y2: computedPosition.y + 15 + }, + style: { + lineWidth: 2, + stroke: '#A0A0A0' + } + }); + this.add(this.rightBoard); + this.rightBoard.hide(); + this.bottomBoard = new Line({ + zlevel: this.zlevel, + z: this.z + 1, + shape: { + x1: computedPosition.x - 1, + y1: computedPosition.y + 15, + x2: computedPosition.x + 15, + y2: computedPosition.y + 15 + }, + style: { + lineWidth: 2, + stroke: '#A0A0A0' + } + }); + this.add(this.bottomBoard); + this.bottomBoard.hide(); + const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']; + if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) { + this.buttonText = new Text({ + zlevel: this.zlevel, + z: this.z, + style: { + x: computedPosition.x + model.nameOffset.x, + y: computedPosition.y + model.nameOffset.y, + fontWeight: '400', + fontSize: 10, + fontFamily: '', + text: model.name, + textFill: '#C0C0C0', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.buttonText); } - } else { - this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel }) - this.arcShape.stopAnimation(true) - this.recover() - } - this.pressed = flg } - } - getAnchorPoint() {} + startAnimate(color) { + // let color = this.getTypeColor(); + // if (this.style.SignalButton && this.style.SignalButton.flashingColor) { + // color = this.style.SignalButton.flashingColor; + // } + this.rectButton && + this.rectButton + .animateStyle(true) + .when(0, { fill: '#000' }) + .when(1000, { fill: color }) + .when(2000, { fill: '#000' }) + .start(); + } + stopAnimation() { + this.rectButton && this.rectButton.stopAnimation(true); + // this.arcFlash && this.arcFlash.stopAnimation(false); + } + getTypeColor() { + if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) { + return this.style.SignalButton.fillColor; + } + let color = ''; + const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']; + if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') { + color = '#808080'; + } else if (this.model.type === 'GUIDE') { + color = '#5050E1'; + } else if (list.includes(this.model.type)) { + color = '#ccc'; + } else { + color = '#008000'; + } + return color; + } // + recover() { + this.stopAnimation(); + this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() }); + this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() }); + this.rightLine && this.rightLine.hide(); + this.leftLine && this.leftLine.hide(); + this.rectButton && this.rectButton.show(); + this.arcShape && this.arcShape.show(); + this.arcShapeDock1 && this.arcShapeDock1.show(); + this.arcShapeDock2 && this.arcShapeDock2.show(); + this.buttonText && this.buttonText.show(); + this.leftBoard && this.leftBoard.hide(); + this.rightBoard && this.rightBoard.hide(); + this.topBoard && this.topBoard.hide(); + this.bottomBoard && this.bottomBoard.hide(); + } + blockShow() { + this.rightLine && this.rightLine.show(); + this.leftLine && this.leftLine.show(); + } + setState(model) { + this.recover(); + // { value: 'ASSIST', label: '总辅助按钮' }, + // { value: 'PICK_ASSIST', label: '接辅助按钮' }, + // { value: 'DEPART_ASSIST', label: '发辅助按钮' }, + const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION']; + if (list.includes(model.type)) { + if (this.rectButton) { + if (model.pressDown) { + this.rectButton.setStyle({ fill: '#FFFF00' }); + } else { + this.rectButton.setStyle({ fill: this.getTypeColor() }); + } + } + } + // { value: 'PICK', label: '接车按钮' }, + // { value: 'SHUNT_TERMINAL', label: '调车终端按钮' }, + if (!store.getters['map/checkDeviceShow'](this._code)) { + this.buttonText && this.buttonText.hide(); + this.rectButton && this.rectButton.hide(); + this.leftLine && this.leftLine.hide(); + this.rightLine && this.rightLine.hide(); + this.arcShape && this.arcShape.hide(); + this.arcShapeDock1 && this.arcShapeDock1.hide(); + this.arcShapeDock2 && this.arcShapeDock2.hide(); + } else { + if (model.hasSelected) { + if (this.style.SignalButton && this.style.SignalButton.selectColor) { + this.rectButton && this.rectButton.setStyle({fill:this.style.SignalButton.selectColor}); + } else { + this.startAnimate(this.getTypeColor()); + } + } else if (model.toSelected) { + this.startAnimate(this.style.SignalButton.flashingColor); + } + } + } + pressDown(flg, color) { + if (this.pressed === flg) return; + if (this.arcShapeDock1) { + if (flg) { + this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel }); + if (color) { + this.arcShape + .animateStyle(true) + .when(0, { fill: '#69666E' }) + .when(1000, { fill: color }) + .when(2000, { fill: '#69666E' }) + .start(); + } + } else { + this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel }); + this.arcShape.stopAnimation(true); + this.recover(); + } + this.pressed = flg; + } + } + getAnchorPoint() {} }