openatc-components 0.1.189 → 0.1.191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +436 -0
- package/package/kisscomps/components/DirectionListConfiguration/index.js +2 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-pedeastward.vue +35 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-pednorthward.vue +30 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-pedsouthward.vue +35 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-pedwestward.vue +41 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -0
- package/package/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -0
- package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +127 -0
- package/package/kisscomps/components/IntersectionDirectionSelection/index.js +2 -0
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +0 -1
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PatternWalkSvg.vue +429 -0
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1272 -0
- package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +239 -16
- package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +88 -14
- package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +88 -15
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +24 -8
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +24 -8
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +50 -2
- package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +6 -0
- package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +28 -1
- package/package/kisscomps/index.js +5 -1
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/EdgeMgr/controller/crossDiagramMgr.js +5 -1
- package/src/api/param.js +11 -0
- package/src/icons/demo_index.html +8146 -0
- package/src/icons/iconfont.css +219 -3
- package/src/icons/iconfont.js +1 -1
- package/src/icons/iconfont.json +378 -0
- package/src/icons/iconfont.ttf +0 -0
- package/src/icons/iconfont.woff +0 -0
- package/src/icons/iconfont.woff2 +0 -0
- package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +436 -0
- package/src/kisscomps/components/DirectionListConfiguration/index.js +2 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-pedeastward.vue +35 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-pednorthward.vue +30 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-pedsouthward.vue +35 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-pedwestward.vue +41 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -0
- package/src/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -0
- package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +127 -0
- package/src/kisscomps/components/IntersectionDirectionSelection/index.js +2 -0
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +0 -1
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1272 -0
- package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +239 -16
- package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +88 -14
- package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +88 -15
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +24 -8
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +24 -8
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +50 -2
- package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +6 -0
- package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +28 -1
- package/src/kisscomps/index.js +5 -1
- package/src/utils/conflct.js +233 -0
- package/src/utils/conflictList.js +87 -0
- package/src/utils/phasedesc.js +37 -17
- package/src/views/intersection.vue +62 -12
- package/src/views/overView.vue +1 -1
- package/static/styles/uiComponents.scss +52 -0
- package/src/node_modules/.package_versions.json +0 -1
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
<!-- 其他路口 -->
|
|
58
58
|
<CustomRoadsSvg v-if="crossType === 'Customroads'"/>
|
|
59
59
|
<!-- 匝道 -->
|
|
60
|
-
<RampEastRoadsSvg v-if="crossType === 'ramp-east'" />
|
|
61
|
-
<RampWestRoadsSvg v-if="crossType === 'ramp-west'" />
|
|
62
|
-
<RampNorthRoadsSvg v-if="crossType === 'ramp-north'" />
|
|
63
|
-
<RampSouthRoadsSvg v-if="crossType === 'ramp-south'" />
|
|
60
|
+
<RampEastRoadsSvg v-if="crossType === 'ramp-east' && !isVipRoute" />
|
|
61
|
+
<RampWestRoadsSvg v-if="crossType === 'ramp-west' && !isVipRoute" />
|
|
62
|
+
<RampNorthRoadsSvg v-if="crossType === 'ramp-north' && !isVipRoute" />
|
|
63
|
+
<RampSouthRoadsSvg v-if="crossType === 'ramp-south' && !isVipRoute" />
|
|
64
64
|
<!-- 路段行人过街 -->
|
|
65
65
|
<PedSectionSNSvg v-if="crossType === 'ped-section-south-north'" />
|
|
66
66
|
<PedSectionEWSvg v-if="crossType === 'ped-section-east-west'" />
|
|
@@ -68,22 +68,23 @@
|
|
|
68
68
|
<!-- 城市道路状态-->
|
|
69
69
|
<div v-if="mainType === '100' || mainType === '101' || mainType === '104'">
|
|
70
70
|
<!-- 人行道 -->
|
|
71
|
-
<div class="sidewalk" v-if="resetflag && isLoaded">
|
|
72
|
-
<
|
|
71
|
+
<div class="sidewalk" id="sidewalk" v-if="resetflag && isLoaded">
|
|
72
|
+
<SidewalkClickSvg v-if="isVipRoute && compSidewalkPhaseData.length" :Data="compSidewalkPhaseData" :clickMode="clickMode" @handleClickSidewalkIcon="handleClickSidewalkIcon" />
|
|
73
|
+
<SidewalkSvg v-else v-for="(side, index) in compSidewalkPhaseData" :key="side.key + '-' + index" :Data="side" :crossType="crossType" />
|
|
73
74
|
</div>
|
|
74
75
|
<!-- 车道相位 -->
|
|
75
76
|
<div v-if="resetflag" class="phaseIcon">
|
|
76
|
-
<PhaseIconSvg v-for="(item, index) in compLanePhaseData" :key="item.key + '-' + index" :Data="item"/>
|
|
77
|
+
<PhaseIconSvg v-for="(item, index) in compLanePhaseData" :key="item.key + '-' + index" :Data="item" :isVipRoute="isVipRoute" :clickMode="clickMode" @handleClickPhaseIcon="handleClickPhaseIcon" />
|
|
77
78
|
</div>
|
|
78
79
|
<!-- 公交相位 -->
|
|
79
|
-
<div v-if="resetflag" class="busIcon">
|
|
80
|
+
<div v-if="resetflag && !isVipRoute" class="busIcon">
|
|
80
81
|
<BusMapSvg v-for="(item, index) in comdireBusPhaseData" :key="'Busmap-' + item.key + '-' + index" :Data="item" />
|
|
81
82
|
<PhaseIconSvg v-for="(item, index) in comdireBusPhaseData" :key="item.key + '-' + index" :Data="item"/>
|
|
82
83
|
</div>
|
|
83
84
|
</div>
|
|
84
85
|
<!-- 匝道状态 -->
|
|
85
86
|
<!-- 车道相位 -->
|
|
86
|
-
<div v-if="resetflag && mainType === '103'">
|
|
87
|
+
<div v-if="resetflag && mainType === '103' && !isVipRoute">
|
|
87
88
|
<RampPhaseIconSvg v-for="(item, index) in LanePhaseData" :key="item.key + '-' + index" :Data="item" />
|
|
88
89
|
</div>
|
|
89
90
|
</div>
|
|
@@ -122,11 +123,12 @@
|
|
|
122
123
|
<div v-if="mainType === '100' || mainType === '101'">
|
|
123
124
|
<!-- 人行道 -->
|
|
124
125
|
<div class="sidewalk" v-if="resetflag && isLoaded">
|
|
125
|
-
<
|
|
126
|
+
<SidewalkClickSvg v-if="isVipRoute && compSidewalkPhaseData.length" :Data="compSidewalkPhaseData" :clickMode="clickMode" @handleClickSidewalkIcon="handleClickSidewalkIcon" />
|
|
127
|
+
<SidewalkSvg v-else v-for="side in compSidewalkPhaseData" :key="side.key" :Data="side" :crossType="crossType" />
|
|
126
128
|
</div>
|
|
127
129
|
<!-- 车道相位 -->
|
|
128
130
|
<div v-if="resetflag" class="phaseIcon">
|
|
129
|
-
<LPhaseIconSvg v-for="item in compLanePhaseData" :key="item.key" :Data="item"/>
|
|
131
|
+
<LPhaseIconSvg v-for="item in compLanePhaseData" :key="item.key" :Data="item" :isVipRoute="isVipRoute" :clickMode="clickMode" @handleClickPhaseIcon="handleClickPhaseIcon"/>
|
|
130
132
|
</div>
|
|
131
133
|
<!-- 公交相位 -->
|
|
132
134
|
<div v-if="resetflag" class="busIcon">
|
|
@@ -142,6 +144,7 @@
|
|
|
142
144
|
import PhaseIconSvg from './phaseIcon/phaseIconSvg'
|
|
143
145
|
import PhaseDataModel from './utils.js'
|
|
144
146
|
import { getIntersectionInfo } from '../../../../api/template.js'
|
|
147
|
+
import { uploadSingleTscParam } from '../../../../api/param.js'
|
|
145
148
|
import CrossRoadsSvg from './baseImg/CrossRoadsSvg'
|
|
146
149
|
import TShapeEastRoadsSvg from './baseImg/TShapeEastRoadsSvg'
|
|
147
150
|
import TShapeWestRoadsSvg from './baseImg/TShapeWestRoadsSvg.vue'
|
|
@@ -150,6 +153,7 @@ import TShapeSouthRoadsSvg from './baseImg/TShapeSouthRoadsSvg.vue'
|
|
|
150
153
|
import CustomRoadsSvg from './baseImg/CustomRoadsSvg.vue'
|
|
151
154
|
import RefreshSvg from './baseImg/refreshSvg'
|
|
152
155
|
import SidewalkSvg from './baseImg/SidewalkSvg'
|
|
156
|
+
import SidewalkClickSvg from './baseImg/SidewalkClickSvg'
|
|
153
157
|
import RampEastRoadsSvg from './baseImg/RampEastSvg'
|
|
154
158
|
import RampWestRoadsSvg from './baseImg/RampWestSvg'
|
|
155
159
|
import RampNorthRoadsSvg from './baseImg/RampNorthSvg'
|
|
@@ -167,6 +171,9 @@ import LPhaseIconSvg from './phaseIcon/LphaseIconSvg'
|
|
|
167
171
|
import CrossDiagramMgr from '../../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
168
172
|
import BusMapSvg from './busIcon/busMapSvg'
|
|
169
173
|
import { getMessageByCode } from '../../../../utils/responseMessage.js'
|
|
174
|
+
|
|
175
|
+
import CrossDirectionConflictList from '../../../../utils/conflictList.js'
|
|
176
|
+
|
|
170
177
|
export default {
|
|
171
178
|
name: 'crossDiagram',
|
|
172
179
|
components: {
|
|
@@ -192,7 +199,8 @@ export default {
|
|
|
192
199
|
LTShapeNorthRoadsSvg,
|
|
193
200
|
LTShapeSouthRoadsSvg,
|
|
194
201
|
LPhaseIconSvg,
|
|
195
|
-
BusMapSvg
|
|
202
|
+
BusMapSvg,
|
|
203
|
+
SidewalkClickSvg
|
|
196
204
|
},
|
|
197
205
|
props: {
|
|
198
206
|
crossStatusData: {
|
|
@@ -230,6 +238,24 @@ export default {
|
|
|
230
238
|
stateName: {
|
|
231
239
|
type: String,
|
|
232
240
|
default: ''
|
|
241
|
+
},
|
|
242
|
+
choosedDirection: {
|
|
243
|
+
type: Array
|
|
244
|
+
},
|
|
245
|
+
choosedPedDirection: {
|
|
246
|
+
type: Array
|
|
247
|
+
},
|
|
248
|
+
isVipRoute: { // 区分普通路口和VIP路口,如果是vip路口(特勤路线和分组管控),才需要获取通道和处理通道冲突,并显示已选方向
|
|
249
|
+
type: Boolean,
|
|
250
|
+
default: false
|
|
251
|
+
},
|
|
252
|
+
clickMode: {
|
|
253
|
+
type: Boolean,
|
|
254
|
+
default: false
|
|
255
|
+
},
|
|
256
|
+
isThirdSignal: {
|
|
257
|
+
type: Boolean,
|
|
258
|
+
default: false
|
|
233
259
|
}
|
|
234
260
|
},
|
|
235
261
|
// computed: {
|
|
@@ -616,23 +642,40 @@ export default {
|
|
|
616
642
|
return
|
|
617
643
|
}
|
|
618
644
|
this.isLoaded = true
|
|
619
|
-
this.crossInfo = res.data.data.param
|
|
620
645
|
this.tempType = res.data.data.type
|
|
621
646
|
// 获取车道相位、行人相位信息(坐标、名称)
|
|
622
647
|
this.mainType = this.tempType.split('-')[0]
|
|
623
648
|
this.mainDirection = this.tempType.split('-')[1]
|
|
649
|
+
if (this.isVipRoute && !this.isThirdSignal) {
|
|
650
|
+
// 特勤、分组管控下,非第三方设备,按通道显示相位方向;第三方设备还是按路口相位配置显示相位方向
|
|
651
|
+
this.getChannelInfo()
|
|
652
|
+
return
|
|
653
|
+
}
|
|
654
|
+
this.crossInfo = res.data.data.param
|
|
624
655
|
if (this.mainType === '100' || this.mainType === '101' || this.mainType === '104') {
|
|
625
656
|
// 城市道路加载车道相位坐标和人行道坐标
|
|
626
657
|
this.getPhasePos()
|
|
627
658
|
this.getOverlapPhasePos()
|
|
628
659
|
this.getPedPhasePos()
|
|
629
660
|
this.getOverlapPedPhasePos()
|
|
630
|
-
this.
|
|
661
|
+
if (!this.isVipRoute) {
|
|
662
|
+
this.getBusPos()
|
|
663
|
+
}
|
|
631
664
|
}
|
|
632
|
-
if (this.mainType === '103') {
|
|
665
|
+
if (!this.isVipRoute && this.mainType === '103') {
|
|
633
666
|
// 获取匝道道路的主路和支路的相位坐标
|
|
634
667
|
this.getRampPhasePos()
|
|
635
668
|
}
|
|
669
|
+
if (this.isVipRoute && this.isThirdSignal) {
|
|
670
|
+
this.LanePhaseData = this.CrossDiagramMgr.compare(this.LanePhaseData, this.overlapLanePhaseData, 'type', 'nostatus')
|
|
671
|
+
// console.log(this.LanePhaseData)
|
|
672
|
+
this.sidewalkPhaseData = this.CrossDiagramMgr.compare(this.sidewalkPhaseData, this.overlapsidewalkPhaseData, 'pedtype', 'nostatus')
|
|
673
|
+
let allDir = this.LanePhaseData.map(ele => ele.id)
|
|
674
|
+
let allPedDir = this.sidewalkPhaseData.map(ele => ele.id)
|
|
675
|
+
this.inneChoosedDirection = this.choosedDirection.filter(dir => allDir.indexOf(dir) !== -1)
|
|
676
|
+
this.inneChoosedPedDirection = this.choosedPedDirection.filter(dir => allPedDir.indexOf(dir) !== -1)
|
|
677
|
+
this.drawPhaseIcon()
|
|
678
|
+
}
|
|
636
679
|
})
|
|
637
680
|
},
|
|
638
681
|
getBusPos () {
|
|
@@ -734,8 +777,12 @@ export default {
|
|
|
734
777
|
ele.peddirection.forEach((dir, index) => {
|
|
735
778
|
// 行人相位
|
|
736
779
|
if (this.PhaseDataModel.getSidePos(dir)) {
|
|
780
|
+
let key = this.CrossDiagramMgr.getUniqueKey('pedphase')
|
|
781
|
+
if (this.isVipRoute && this.isThirdSignal) {
|
|
782
|
+
key = this.CrossDiagramMgr.getUniqueKey('pedphase') + `-${this.agentId}`
|
|
783
|
+
}
|
|
737
784
|
this.sidewalkPhaseData.push({
|
|
738
|
-
key
|
|
785
|
+
key,
|
|
739
786
|
phaseid: ele.id, // 相位id,用于对应相位状态
|
|
740
787
|
id: dir,
|
|
741
788
|
name: this.PhaseDataModel.getSidePos(dir).name,
|
|
@@ -899,6 +946,182 @@ export default {
|
|
|
899
946
|
getRoadDirection () {
|
|
900
947
|
// 获取行车方向(从平台或配置工具的配置文件中读取)
|
|
901
948
|
this.roadDir = this.roadDirection
|
|
949
|
+
},
|
|
950
|
+
getChannelInfo () {
|
|
951
|
+
uploadSingleTscParam('channel', this.agentId).then(data => {
|
|
952
|
+
let res = data.data
|
|
953
|
+
if (!res.success) {
|
|
954
|
+
if (res.code === '4003') {
|
|
955
|
+
this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
|
|
956
|
+
return
|
|
957
|
+
}
|
|
958
|
+
this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
|
|
959
|
+
return
|
|
960
|
+
}
|
|
961
|
+
this.channelList = res.data.data.channelList.filter(ele => ele.type !== undefined)
|
|
962
|
+
// console.log('this.channelList', this.channelList)
|
|
963
|
+
this.handleChannelDirection()
|
|
964
|
+
})
|
|
965
|
+
},
|
|
966
|
+
handleChannelDirection () {
|
|
967
|
+
this.LanePhaseData = []
|
|
968
|
+
this.sidewalkPhaseData = []
|
|
969
|
+
this.sidewalkDir = []
|
|
970
|
+
let realphasedirarr = []
|
|
971
|
+
let realpeddirarr = []
|
|
972
|
+
this.channelList.forEach((ele, i) => {
|
|
973
|
+
if (ele.type === 0 || ele.type === 1 || ele.type === 3) {
|
|
974
|
+
if (ele.realdir) {
|
|
975
|
+
ele.realdir.forEach((dir, index) => {
|
|
976
|
+
// 车道相位(通道类型是机动车,非机动车,公交时,对应相位机动车)
|
|
977
|
+
this.LanePhaseData.push({
|
|
978
|
+
key: this.CrossDiagramMgr.getUniqueKey('phase'),
|
|
979
|
+
channelid: ele.id, // 通道id
|
|
980
|
+
id: dir, // 接口返回的dir字段,对应前端定义的相位方向id,唯一标识
|
|
981
|
+
name: this.PhaseDataModel.getPhase(dir).name,
|
|
982
|
+
left: this.PhaseDataModel.getPhase(dir).x,
|
|
983
|
+
top: this.PhaseDataModel.getPhase(dir).y
|
|
984
|
+
})
|
|
985
|
+
})
|
|
986
|
+
realphasedirarr = Array.from(new Set(realphasedirarr.concat(ele.realdir)))
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
if (ele.type === 2) {
|
|
990
|
+
if (ele.realdir) {
|
|
991
|
+
ele.realdir.forEach((dir, index) => {
|
|
992
|
+
// 行人相位
|
|
993
|
+
if (this.sidewalkDir.indexOf(dir) === -1 && this.PhaseDataModel.getSidePos(dir)) {
|
|
994
|
+
this.sidewalkPhaseData.push({
|
|
995
|
+
key: this.CrossDiagramMgr.getUniqueKey('pedphase') + `-${this.agentId}`,
|
|
996
|
+
channelid: ele.id, // 通道id
|
|
997
|
+
id: dir,
|
|
998
|
+
name: this.PhaseDataModel.getSidePos(dir).name
|
|
999
|
+
})
|
|
1000
|
+
}
|
|
1001
|
+
})
|
|
1002
|
+
realpeddirarr = Array.from(new Set(realpeddirarr.concat(ele.realdir)))
|
|
1003
|
+
this.sidewalkDir = Array.from(new Set([...this.sidewalkDir.concat(ele.realdir)]))
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
})
|
|
1007
|
+
this.inneChoosedDirection = this.choosedDirection.filter(dir => realphasedirarr.indexOf(dir) !== -1)
|
|
1008
|
+
this.inneChoosedPedDirection = this.choosedPedDirection.filter(dir => realpeddirarr.indexOf(dir) !== -1)
|
|
1009
|
+
this.drawPhaseIcon()
|
|
1010
|
+
},
|
|
1011
|
+
async drawPhaseIcon () {
|
|
1012
|
+
const targetIds = [4, 8, 12, 16] // 掉头相位后画
|
|
1013
|
+
this.LanePhaseData = this.LanePhaseData.filter(item => !targetIds.includes(item.id)).concat(this.LanePhaseData.filter(item => targetIds.includes(item.id)))
|
|
1014
|
+
if (!this.isThirdSignal) {
|
|
1015
|
+
await this.getConflictList()
|
|
1016
|
+
this.handleClickedPhase()
|
|
1017
|
+
this.compLanePhaseData = JSON.parse(JSON.stringify(this.LanePhaseData))
|
|
1018
|
+
this.handleClickedPedPhase()
|
|
1019
|
+
this.compSidewalkPhaseData = JSON.parse(JSON.stringify(this.sidewalkPhaseData))
|
|
1020
|
+
} else {
|
|
1021
|
+
// 第三方信号机不需要处理冲突关系
|
|
1022
|
+
this.handleClickedPhase()
|
|
1023
|
+
this.compLanePhaseData = JSON.parse(JSON.stringify(this.LanePhaseData))
|
|
1024
|
+
this.handleClickedPedPhase()
|
|
1025
|
+
this.compSidewalkPhaseData = JSON.parse(JSON.stringify(this.sidewalkPhaseData))
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
handleClickedPhase () {
|
|
1029
|
+
if (!this.isThirdSignal) {
|
|
1030
|
+
this.inneChoosedDirection = this.inneChoosedDirection.filter(dir => this.phaseConflictList.indexOf(dir) === -1)
|
|
1031
|
+
}
|
|
1032
|
+
for (let index = 0; index < this.LanePhaseData.length; index++) {
|
|
1033
|
+
const element = this.LanePhaseData[index]
|
|
1034
|
+
if (this.inneChoosedDirection.indexOf(element.id) !== -1) {
|
|
1035
|
+
element.clicked = true
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
|
|
1040
|
+
handleClickPhaseIcon (key, action) {
|
|
1041
|
+
let curClickedPhase = {}
|
|
1042
|
+
if (action === 'clicked') {
|
|
1043
|
+
for (let index = 0; index < this.LanePhaseData.length; index++) {
|
|
1044
|
+
const element = this.LanePhaseData[index]
|
|
1045
|
+
if (element.key === key) {
|
|
1046
|
+
element.clicked = true
|
|
1047
|
+
curClickedPhase = JSON.parse(JSON.stringify(element))
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
if (action === 'cancle') {
|
|
1052
|
+
for (let index = 0; index < this.LanePhaseData.length; index++) {
|
|
1053
|
+
const element = this.LanePhaseData[index]
|
|
1054
|
+
if (element.key === key) {
|
|
1055
|
+
delete element.clicked
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
this.compLanePhaseData = JSON.parse(JSON.stringify(this.LanePhaseData))
|
|
1060
|
+
// console.log(this.compLanePhaseData)
|
|
1061
|
+
let clickedDirection = this.compLanePhaseData.filter(ele => ele.clicked && !ele.disabled)
|
|
1062
|
+
this.inneChoosedDirection = clickedDirection.map(ele => ele.id)
|
|
1063
|
+
this.EmitAllChoosedDirection(curClickedPhase)
|
|
1064
|
+
},
|
|
1065
|
+
handleClickedPedPhase () {
|
|
1066
|
+
if (!this.isThirdSignal) {
|
|
1067
|
+
this.inneChoosedPedDirection = this.inneChoosedPedDirection.filter(dir => this.pedConflictList.indexOf(dir) === -1)
|
|
1068
|
+
}
|
|
1069
|
+
// 排他
|
|
1070
|
+
for (let index = 0; index < this.sidewalkPhaseData.length; index++) {
|
|
1071
|
+
const element = this.sidewalkPhaseData[index]
|
|
1072
|
+
delete element.clicked
|
|
1073
|
+
}
|
|
1074
|
+
for (let index = 0; index < this.sidewalkPhaseData.length; index++) {
|
|
1075
|
+
const element = this.sidewalkPhaseData[index]
|
|
1076
|
+
if (this.inneChoosedPedDirection.indexOf(element.id) !== -1) {
|
|
1077
|
+
element.clicked = true
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
handleClickSidewalkIcon (data, curChoosePed) {
|
|
1082
|
+
this.clickedPedDirection = data.filter(ele => ele.clicked && !ele.disabled)
|
|
1083
|
+
this.inneChoosedPedDirection = this.clickedPedDirection.map(ele => ele.id)
|
|
1084
|
+
this.EmitAllChoosedDirection(curChoosePed)
|
|
1085
|
+
},
|
|
1086
|
+
EmitAllChoosedDirection (curClickedPhase) {
|
|
1087
|
+
let allChoosedDir = {
|
|
1088
|
+
direction: this.inneChoosedDirection,
|
|
1089
|
+
peddirection: this.inneChoosedPedDirection
|
|
1090
|
+
}
|
|
1091
|
+
this.$emit('handleClickCrossIcon', allChoosedDir, curClickedPhase)
|
|
1092
|
+
this.drawPhaseIcon()
|
|
1093
|
+
},
|
|
1094
|
+
async getConflictList () {
|
|
1095
|
+
let ConflictList = new CrossDirectionConflictList(this.agentId)
|
|
1096
|
+
return ConflictList.getConflictListByAgentid().then(res => {
|
|
1097
|
+
if (res) {
|
|
1098
|
+
let conflictList = ConflictList.getListDirConflict(this.inneChoosedDirection, this.inneChoosedPedDirection)
|
|
1099
|
+
this.phaseConflictList = conflictList.allConflictDir
|
|
1100
|
+
this.pedConflictList = conflictList.allPedConflictDir
|
|
1101
|
+
// 排他
|
|
1102
|
+
for (let index = 0; index < this.LanePhaseData.length; index++) {
|
|
1103
|
+
const element = this.LanePhaseData[index]
|
|
1104
|
+
delete element.disabled
|
|
1105
|
+
}
|
|
1106
|
+
for (let index = 0; index < this.sidewalkPhaseData.length; index++) {
|
|
1107
|
+
const element = this.sidewalkPhaseData[index]
|
|
1108
|
+
delete element.disabled
|
|
1109
|
+
}
|
|
1110
|
+
for (let index = 0; index < this.LanePhaseData.length; index++) {
|
|
1111
|
+
const element = this.LanePhaseData[index]
|
|
1112
|
+
if (this.phaseConflictList.indexOf(element.id) !== -1) {
|
|
1113
|
+
element.disabled = true
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
for (let index = 0; index < this.sidewalkPhaseData.length; index++) {
|
|
1117
|
+
const element = this.sidewalkPhaseData[index]
|
|
1118
|
+
if (this.pedConflictList.indexOf(element.id) !== -1) {
|
|
1119
|
+
element.disabled = true
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
// console.log(this.LanePhaseData)
|
|
1123
|
+
}
|
|
1124
|
+
})
|
|
902
1125
|
}
|
|
903
1126
|
},
|
|
904
1127
|
mounted () {
|
package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue
CHANGED
|
@@ -10,9 +10,13 @@
|
|
|
10
10
|
* See the Mulan PSL v2 for more details.
|
|
11
11
|
**/
|
|
12
12
|
<template>
|
|
13
|
-
<div :style="{position: 'absolute', left: Data.left, top: Data.top}">
|
|
13
|
+
<div :id="Data.key" :style="{position: 'absolute', left: Data.left, top: Data.top}">
|
|
14
14
|
<div :class="Data.id < 9 ? '' : 'hide'">
|
|
15
|
-
<svg
|
|
15
|
+
<svg v-if="Data.id === 4 || Data.id === 8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18.1 14.5" :width="IconLenghDiaoTou" :height="IconWdithDiaoTou">
|
|
16
|
+
<path id="东掉头" :class="Data.name === '东掉头' ? '' : 'invisible'" d="M0,8.8c0,3.1,2.2,5.7,4.9,5.7h13.2v-2.5H4.9c-1.3,0-2.4-1.4-2.4-3.1s1.1-3.1,2.4-3.1h3.6v3.1l7.7-4.4L8.6,0v3.1H4.9C2.2,3.1,0,5.7,0,8.8z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
17
|
+
<path id="西掉头" :class="Data.name === '西掉头' ? '' : 'invisible'" d="M18.1,5.7c0-3.1-2.2-5.7-4.9-5.7H0v2.5h13.3c1.3,0,2.4,1.4,2.4,3.1s-1.1,3.1-2.4,3.1H9.7V5.6L2,10l7.6,4.5v-3.2h3.6C15.9,11.3,18.1,8.8,18.1,5.7z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
18
|
+
</svg>
|
|
19
|
+
<svg v-else version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
16
20
|
viewBox="0 0 36 26" style="enable-background:new 0 0 36 26;" xml:space="preserve" :width="IconLengh" :height="IconWdith">
|
|
17
21
|
<!-- 东相位 -->
|
|
18
22
|
<path id="东左转" :class="Data.name === '东左转' ? '' : 'invisible'" d="M11,7.1h24v-3H10.9c-3.1,0-5.7,2.6-5.8,5.7l-0.4,2.9L1,12.2l3.9,9.7l6.5-8.2l-3.7-0.5l0.5-3.3
|
|
@@ -20,20 +24,24 @@
|
|
|
20
24
|
<path id="东右转" :class="Data.name === '东右转' ? '' : 'invisible'" d="M8.1,15.8l-0.4-3l3.7-0.5L4.9,4.1L1,13.8l3.7-0.5l0.4,2.9c0,3.2,2.6,5.7,5.8,5.7H35v-3H10.9
|
|
21
25
|
c-1.5,0-2.8-1.3-2.8-2.8V15.8z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
22
26
|
<polygon id="东直行" :class="Data.name === '东直行' ? '' : 'invisible'" points="35,11.5 10.1,11.5 10.1,7.8 0.9,13 10.1,18.2 10.1,14.5 35,14.5 " :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
23
|
-
<path id="东掉头" :class="Data.name === '东掉头' ? '' : 'invisible'" d="M13.6,15.2c0,3.7,2.6,6.7,5.8,6.7H35v-3H19.4c-1.5,0-2.8-1.7-2.8-3.7s1.3-3.7,2.8-3.7h4.3v3.7
|
|
24
|
-
l9.1-5.2l-9.1-5.2v3.7h-4.3C16.2,8.5,13.6,11.5,13.6,15.2z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
27
|
+
<!-- <path id="东掉头" :class="Data.name === '东掉头' ? '' : 'invisible'" d="M13.6,15.2c0,3.7,2.6,6.7,5.8,6.7H35v-3H19.4c-1.5,0-2.8-1.7-2.8-3.7s1.3-3.7,2.8-3.7h4.3v3.7
|
|
28
|
+
l9.1-5.2l-9.1-5.2v3.7h-4.3C16.2,8.5,13.6,11.5,13.6,15.2z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/> -->
|
|
25
29
|
<!-- 西相位 -->
|
|
26
30
|
<path id="西左转" :class="Data.name === '西左转' ? '' : 'invisible'" d="M25,18.9H1v3h24.1c3.1,0,5.7-2.6,5.8-5.7l0.4-2.9l3.7,0.5l-3.9-9.7l-6.5,8.2l3.7,0.5l-0.5,3.3
|
|
27
31
|
C27.8,17.6,26.6,18.9,25,18.9L25,18.9z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
28
32
|
<path id="西右转" :class="Data.name === '西右转' ? '' : 'invisible'" d="M27.9,10.2l0.4,3l-3.7,0.5l6.5,8.2l3.9-9.7l-3.7,0.5l-0.4-2.9c0-3.2-2.6-5.7-5.8-5.7H1v3h24.1
|
|
29
33
|
c1.5,0,2.8,1.3,2.8,2.8V10.2z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
30
34
|
<polygon id="西直行" :class="Data.name === '西直行' ? '' : 'invisible'" points="1,14.5 26,14.5 26,18.2 35.1,13 26,7.8 26,11.5 1,11.5 " :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
31
|
-
<path id="西掉头" :class="Data.name === '西掉头' ? '' : 'invisible'" d="M22.4,10.8c0-3.7-2.6-6.7-5.8-6.7H1v3h15.7c1.5,0,2.8,1.7,2.8,3.7s-1.3,3.7-2.8,3.7h-4.3v-3.7
|
|
32
|
-
L3.3,16l9,5.3v-3.8h4.3C19.8,17.5,22.4,14.5,22.4,10.8z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
35
|
+
<!-- <path id="西掉头" :class="Data.name === '西掉头' ? '' : 'invisible'" d="M22.4,10.8c0-3.7-2.6-6.7-5.8-6.7H1v3h15.7c1.5,0,2.8,1.7,2.8,3.7s-1.3,3.7-2.8,3.7h-4.3v-3.7
|
|
36
|
+
L3.3,16l9,5.3v-3.8h4.3C19.8,17.5,22.4,14.5,22.4,10.8z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/> -->
|
|
33
37
|
</svg>
|
|
34
38
|
</div>
|
|
35
39
|
<div :class="Data.id >= 9 ? '' : 'hide'">
|
|
36
|
-
<svg
|
|
40
|
+
<svg v-if="Data.id === 12 || Data.id === 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 14.5 18.1" :width="IconWdithDiaoTou" :height="IconLenghDiaoTou">
|
|
41
|
+
<path id="南掉头" :class="Data.name === '南掉头' ? '' : 'invisible'" d="M5.7,0C2.5,0,0,2.2,0,4.9l0,13.2h2.5V4.9c0-1.3,1.4-2.4,3.1-2.4s3.1,1.1,3.1,2.4v3.6H5.7l4.4,7.7l4.4-7.7h-3.2V4.9C11.3,2.2,8.8,0,5.7,0z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
42
|
+
<path id="北掉头" :class="Data.name === '北掉头' ? '' : 'invisible'" d="M8.8,18.1c3.1,0,5.7-2.2,5.7-4.9V0l-2.5,0v13.3c0,1.3-1.4,2.4-3.1,2.4s-3.1-1.1-3.1-2.4V9.7h3.1L4.4,2L0,9.6h3.1v3.6C3.1,15.9,5.7,18.1,8.8,18.1z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
43
|
+
</svg>
|
|
44
|
+
<svg v-else version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
37
45
|
viewBox="0 0 26 36" style="enable-background:new 0 0 26 36;" xml:space="preserve" :width="IconWdith" :height="IconLengh">
|
|
38
46
|
<!-- 南相位 -->
|
|
39
47
|
<path id="南左转" :class="Data.name === '南左转' ? '' : 'invisible'" d="M18.9,11v24h3V10.9c0-3.1-2.6-5.7-5.7-5.8l-2.9-0.4L13.8,1L4.1,4.9l8.2,6.5l0.5-3.7l3.3,0.5
|
|
@@ -41,16 +49,16 @@ L3.3,16l9,5.3v-3.8h4.3C19.8,17.5,22.4,14.5,22.4,10.8z" :fill="this.FlashColor ?
|
|
|
41
49
|
<path id="南右转" :class="Data.name === '南右转' ? '' : 'invisible'" d="M10.2,8.1l3-0.4l0.5,3.7l8.2-6.5L12.2,1l0.5,3.7L9.8,5.1c-3.2,0-5.7,2.6-5.7,5.8V35h3V10.9
|
|
42
50
|
c0-1.5,1.3-2.8,2.8-2.8H10.2z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
43
51
|
<polygon id="南直行" :class="Data.name === '南直行' ? '' : 'invisible'" points="14.5,35 14.5,10.1 18.2,10.1 13,0.9 7.8,10.1 11.5,10.1 11.5,35 " :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
44
|
-
<path id="南掉头" :class="Data.name === '南掉头' ? '' : 'invisible'" d="M10.8,13.6c-3.7,0-6.7,2.6-6.7,5.8V35h3V19.4c0-1.5,1.7-2.8,3.7-2.8s3.7,1.3,3.7,2.8v4.3h-3.7
|
|
45
|
-
l5.2,9.1l5.2-9.1h-3.8v-4.3C17.4,16.2,14.4,13.6,10.8,13.6z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
52
|
+
<!-- <path id="南掉头" :class="Data.name === '南掉头' ? '' : 'invisible'" d="M10.8,13.6c-3.7,0-6.7,2.6-6.7,5.8V35h3V19.4c0-1.5,1.7-2.8,3.7-2.8s3.7,1.3,3.7,2.8v4.3h-3.7
|
|
53
|
+
l5.2,9.1l5.2-9.1h-3.8v-4.3C17.4,16.2,14.4,13.6,10.8,13.6z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/> -->
|
|
46
54
|
<!-- 北相位 -->
|
|
47
55
|
<path id="北左转" :class="Data.name === '北左转' ? '' : 'invisible'" d="M7.1,25V1h-3v24.1c0,3.1,2.6,5.7,5.7,5.8l2.9,0.4L12.2,35l9.7-3.9l-8.2-6.5l-0.5,3.7l-3.3-0.5
|
|
48
56
|
C8.4,27.8,7.1,26.6,7.1,25L7.1,25z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
49
57
|
<path id="北右转" :class="Data.name === '北右转' ? '' : 'invisible'" d="M15.8,27.9l-3,0.4l-0.5-3.7l-8.2,6.5l9.7,3.9l-0.5-3.7l2.9-0.4c3.2,0,5.7-2.6,5.7-5.8V1h-3v24.1
|
|
50
58
|
c0,1.5-1.3,2.8-2.8,2.8H15.8z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
51
59
|
<polygon id="北直行" :class="Data.name === '北直行' ? '' : 'invisible'" points="11.5,0.9 11.5,25.9 7.8,25.9 13,35 18.2,25.9 14.5,25.9 14.5,0.9 " :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
52
|
-
<path id="北掉头" :class="Data.name === '北掉头' ? '' : 'invisible'" d="M15.2,22.4c3.7,0,6.7-2.6,6.7-5.8V1h-3v15.7c0,1.5-1.7,2.8-3.7,2.8s-3.7-1.3-3.7-2.8v-4.3h3.7
|
|
53
|
-
L10,3.3l-5.2,9h3.7v4.3C8.5,19.8,11.5,22.4,15.2,22.4z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/>
|
|
60
|
+
<!-- <path id="北掉头" :class="Data.name === '北掉头' ? '' : 'invisible'" d="M15.2,22.4c3.7,0,6.7-2.6,6.7-5.8V1h-3v15.7c0,1.5-1.7,2.8-3.7,2.8s-3.7-1.3-3.7-2.8v-4.3h3.7
|
|
61
|
+
L10,3.3l-5.2,9h3.7v4.3C8.5,19.8,11.5,22.4,15.2,22.4z" :fill="this.FlashColor ? this.FlashColor : (Data.color ? Data.color : defaultColor)"/> -->
|
|
54
62
|
</svg>
|
|
55
63
|
</div>
|
|
56
64
|
</div>
|
|
@@ -64,12 +72,17 @@ export default {
|
|
|
64
72
|
FlashColor: undefined,
|
|
65
73
|
GreenColor: '#77fb65',
|
|
66
74
|
YellowColor: '#f7b500',
|
|
67
|
-
lastType: ''
|
|
75
|
+
lastType: '',
|
|
76
|
+
clickedColor: '#299bcc',
|
|
77
|
+
disabledColor: '#828282'
|
|
68
78
|
}
|
|
69
79
|
},
|
|
70
80
|
watch: {
|
|
71
81
|
Data: {
|
|
72
82
|
handler: function (val) {
|
|
83
|
+
if (this.isVipRoute) {
|
|
84
|
+
this.handleStatus()
|
|
85
|
+
}
|
|
73
86
|
if (this.lastType === '') {
|
|
74
87
|
if (val.type === 4 || val.type === '黄闪') {
|
|
75
88
|
// 绿闪:绿-》灰-》绿 循环效果
|
|
@@ -105,12 +118,73 @@ export default {
|
|
|
105
118
|
type: String,
|
|
106
119
|
default: '22px'
|
|
107
120
|
},
|
|
121
|
+
IconLenghDiaoTou: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: '18.11px'
|
|
124
|
+
},
|
|
125
|
+
IconWdithDiaoTou: {
|
|
126
|
+
type: String,
|
|
127
|
+
default: '14.47px'
|
|
128
|
+
},
|
|
108
129
|
Data: {
|
|
109
130
|
type: Object
|
|
131
|
+
},
|
|
132
|
+
clickMode: {
|
|
133
|
+
type: Boolean,
|
|
134
|
+
default: false
|
|
135
|
+
},
|
|
136
|
+
isVipRoute: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: false
|
|
110
139
|
}
|
|
111
140
|
},
|
|
112
|
-
methods: {
|
|
113
|
-
|
|
141
|
+
methods: {
|
|
142
|
+
handleClick (e) {
|
|
143
|
+
let clickedPath = e.target
|
|
144
|
+
// console.log(clickedPath)
|
|
145
|
+
if (clickedPath) {
|
|
146
|
+
// 在这里对找到的元素进行操作
|
|
147
|
+
if (clickedPath.getAttribute('disabled') === 'true') {
|
|
148
|
+
return
|
|
149
|
+
}
|
|
150
|
+
if (clickedPath.getAttribute('fill') === this.clickedColor) {
|
|
151
|
+
clickedPath.setAttribute('fill', '#fff')
|
|
152
|
+
this.$emit('handleClickPhaseIcon', this.Data.key, 'cancle')
|
|
153
|
+
} else {
|
|
154
|
+
clickedPath.setAttribute('fill', this.clickedColor)
|
|
155
|
+
this.$emit('handleClickPhaseIcon', this.Data.key, 'clicked')
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
handleStatus () {
|
|
160
|
+
let IconDom = document.getElementById(this.Data.key)
|
|
161
|
+
let DirDom = IconDom.querySelector(`#${this.Data.name}`)
|
|
162
|
+
if (this.Data.clicked === true) {
|
|
163
|
+
DirDom.setAttribute('fill', this.clickedColor)
|
|
164
|
+
}
|
|
165
|
+
if (this.clickMode && this.Data.disabled === true) {
|
|
166
|
+
DirDom.setAttribute('fill', this.disabledColor)
|
|
167
|
+
DirDom.setAttribute('disabled', 'true')
|
|
168
|
+
}
|
|
169
|
+
if (this.Data.disabled === undefined && this.Data.clicked === undefined) {
|
|
170
|
+
DirDom.setAttribute('fill', this.defaultColor)
|
|
171
|
+
DirDom.removeAttribute('disabled')
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
IconAddEvent () {
|
|
175
|
+
let IconDom = document.getElementById(this.Data.key)
|
|
176
|
+
let DirDom = IconDom.querySelector(`#${this.Data.name}`)
|
|
177
|
+
if (this.clickMode && DirDom.getAttribute('class') !== 'invisible') {
|
|
178
|
+
DirDom.addEventListener('click', this.handleClick)
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
mounted () {
|
|
183
|
+
if (this.isVipRoute) {
|
|
184
|
+
this.handleStatus()
|
|
185
|
+
this.IconAddEvent()
|
|
186
|
+
}
|
|
187
|
+
}
|
|
114
188
|
}
|
|
115
189
|
</script>
|
|
116
190
|
<style scoped>
|