openatc-components 0.1.186 → 0.1.187

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.
Files changed (428) hide show
  1. package/.babelrc +18 -18
  2. package/.editorconfig +9 -9
  3. package/.eslintignore +5 -5
  4. package/.eslintrc.js +29 -29
  5. package/.postcssrc.js +10 -10
  6. package/README.md +30 -30
  7. package/build/build.js +41 -41
  8. package/build/check-versions.js +54 -54
  9. package/build/package.config.js +58 -58
  10. package/build/package.dev.config.js +107 -107
  11. package/build/package.prod.config.js +160 -160
  12. package/build/utils.js +101 -101
  13. package/build/vue-loader.conf.js +22 -22
  14. package/build/webpack.base.conf.js +114 -114
  15. package/build/webpack.dev.conf.js +95 -95
  16. package/build/webpack.prod.conf.js +149 -149
  17. package/config/dev.env.js +8 -8
  18. package/config/index.js +93 -93
  19. package/config/prod.env.js +5 -5
  20. package/config/test.env.js +7 -7
  21. package/index.html +12 -12
  22. package/package/kisscomps/components/BoardCard/BoardCard.vue +108 -108
  23. package/package/kisscomps/components/BoardCard/index.js +2 -2
  24. package/package/kisscomps/components/Channelization/Channelization.vue +584 -585
  25. package/package/kisscomps/components/Channelization/index.js +2 -2
  26. package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -361
  27. package/package/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -2
  28. package/package/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
  29. package/package/kisscomps/components/ChannelizationWithInterface/index.js +2 -2
  30. package/package/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
  31. package/package/kisscomps/components/CommonKanban/index.js +2 -2
  32. package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
  33. package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
  34. package/package/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
  35. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
  36. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
  37. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
  38. package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
  39. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
  40. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
  41. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
  42. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
  43. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +467 -467
  44. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
  45. package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
  46. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1005 -1005
  47. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +110 -110
  48. package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
  49. package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
  50. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
  51. package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  52. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  53. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  54. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  55. package/package/kisscomps/components/DrawChannelization/index.js +2 -2
  56. package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  57. package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
  58. package/package/kisscomps/components/ExpendConfig/index.js +2 -2
  59. package/package/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
  60. package/package/kisscomps/components/FaultDetailModal/index.js +2 -2
  61. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +497 -497
  62. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  63. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  64. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  65. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  66. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  67. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  68. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  69. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
  70. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  71. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  72. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  73. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  74. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  75. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  76. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  77. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  78. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  79. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  80. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  81. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  82. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  83. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  84. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  85. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +959 -959
  86. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +123 -123
  87. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +123 -123
  88. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
  89. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  90. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  91. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +99 -99
  92. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +99 -99
  93. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  94. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +171 -171
  95. package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +78 -78
  96. package/package/kisscomps/components/IntersectionMap/index.js +2 -2
  97. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +162 -163
  98. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +530 -530
  99. package/package/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  100. package/package/kisscomps/components/KanBan/index.js +2 -2
  101. package/package/kisscomps/components/KanBan/kanban.vue +225 -225
  102. package/package/kisscomps/components/MessageBox/index.vue +96 -96
  103. package/package/kisscomps/components/OverLap/OverLap.vue +214 -214
  104. package/package/kisscomps/components/OverLap/index.js +2 -2
  105. package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +272 -272
  106. package/package/kisscomps/components/PatternOptimize/index.js +2 -2
  107. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1456 -1456
  108. package/package/kisscomps/components/PatternStatus/index.js +2 -2
  109. package/package/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  110. package/package/kisscomps/components/PatternWalkSvg/index.js +2 -2
  111. package/package/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
  112. package/package/kisscomps/components/PhaseDirectionSelect/index.js +2 -2
  113. package/package/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
  114. package/package/kisscomps/components/PhaseDirectionText/index.js +2 -2
  115. package/package/kisscomps/components/PhaseMarker/index.js +6 -6
  116. package/package/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  117. package/package/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  118. package/package/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  119. package/package/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  120. package/package/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  121. package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  122. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +828 -828
  123. package/package/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +313 -313
  124. package/package/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
  125. package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  126. package/package/kisscomps/components/SchemeConfig/index.js +2 -2
  127. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  128. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +228 -228
  129. package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +197 -197
  130. package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  131. package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +275 -275
  132. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +840 -840
  133. package/package/kisscomps/components/StageBord/StageBord.vue +242 -242
  134. package/package/kisscomps/components/StageBord/index.js +2 -2
  135. package/package/kisscomps/components/StageStatus/StageStatus.vue +341 -341
  136. package/package/kisscomps/components/StageStatus/index.js +2 -2
  137. package/package/kisscomps/components/Stages/index.vue +211 -211
  138. package/package/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  139. package/package/kisscomps/components/SvgIcon/index.js +2 -2
  140. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1065 -1065
  141. package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
  142. package/package/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
  143. package/package/kisscomps/components/XiaoKanban/index.vue +102 -102
  144. package/package/kisscomps/components/overView/index.vue +699 -699
  145. package/package/kisscomps/components/patternConfig/index.js +2 -2
  146. package/package/kisscomps/components/patternConfig/index.vue +1120 -1120
  147. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +349 -349
  148. package/package/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
  149. package/package/kisscomps/components/patternConfig/planContent.vue +573 -573
  150. package/package/kisscomps/components/patternConfig/planMenu.vue +329 -329
  151. package/package/kisscomps/components/patternConfig/utils.js +152 -152
  152. package/package/kisscomps/components/patternList/index.js +2 -2
  153. package/package/kisscomps/components/patternList/patternList.vue +581 -581
  154. package/package/kisscomps/index.js +119 -119
  155. package/package/kissui.js +216608 -0
  156. package/package/kissui.min.js +1 -1
  157. package/package.json +127 -127
  158. package/src/App.vue +24 -24
  159. package/src/EdgeMgr/EdgeModelBase.js +16 -16
  160. package/src/EdgeMgr/controller/crossDiagramMgr.js +120 -120
  161. package/src/api/authapi.js +31 -31
  162. package/src/api/config.js +21 -21
  163. package/src/api/control.js +106 -106
  164. package/src/api/cross.js +49 -49
  165. package/src/api/device.js +135 -135
  166. package/src/api/fault.js +66 -66
  167. package/src/api/index.js +24 -24
  168. package/src/api/login.js +46 -46
  169. package/src/api/optimize.js +72 -72
  170. package/src/api/param.js +154 -154
  171. package/src/api/passwdAssest.js +101 -101
  172. package/src/api/route.js +171 -171
  173. package/src/api/template.js +27 -27
  174. package/src/i18n/index.js +26 -26
  175. package/src/i18n/language/en.js +1426 -1426
  176. package/src/i18n/language/index.js +25 -25
  177. package/src/i18n/language/zh.js +1425 -1425
  178. package/src/icons/demo.css +539 -539
  179. package/src/icons/iconfont.css +1183 -1183
  180. package/src/icons/iconfont.json +2053 -2053
  181. package/src/icons/index.js +20 -20
  182. package/src/icons/svg/azimuthlocking.svg +26 -26
  183. package/src/icons/svg/bendi.svg +110 -110
  184. package/src/icons/svg/bujin.svg +36 -36
  185. package/src/icons/svg/connectBlue.svg +7 -7
  186. package/src/icons/svg/currentvolume.svg +0 -0
  187. package/src/icons/svg/custom-BRTlane.svg +40 -40
  188. package/src/icons/svg/custom-buslane.svg +40 -40
  189. package/src/icons/svg/custom-detector.svg +12 -12
  190. package/src/icons/svg/custom-east-bottom.svg +32 -32
  191. package/src/icons/svg/custom-east-top.svg +32 -32
  192. package/src/icons/svg/custom-ewped.svg +35 -35
  193. package/src/icons/svg/custom-nonmotorizedlane.svg +40 -40
  194. package/src/icons/svg/custom-north-left.svg +32 -32
  195. package/src/icons/svg/custom-north-right.svg +32 -32
  196. package/src/icons/svg/custom-peddetector.svg +17 -17
  197. package/src/icons/svg/custom-snped.svg +35 -35
  198. package/src/icons/svg/custom-south-left.svg +32 -32
  199. package/src/icons/svg/custom-south-right.svg +32 -32
  200. package/src/icons/svg/custom-tramlane.svg +40 -40
  201. package/src/icons/svg/custom-vehiclebranch.svg +40 -40
  202. package/src/icons/svg/custom-vehiclemainroad.svg +41 -41
  203. package/src/icons/svg/custom-west-bottom.svg +32 -32
  204. package/src/icons/svg/custom-west-top.svg +32 -32
  205. package/src/icons/svg/custom-xlped.svg +14 -14
  206. package/src/icons/svg/custom-xrped.svg +14 -14
  207. package/src/icons/svg/cutRed.svg +7 -7
  208. package/src/icons/svg/cycle.svg +0 -0
  209. package/src/icons/svg/dingzhouqi.svg +34 -34
  210. package/src/icons/svg/ganyingkongzhi.svg +30 -30
  211. package/src/icons/svg/guandeng.svg +81 -81
  212. package/src/icons/svg/huangshan.svg +71 -71
  213. package/src/icons/svg/maincontrol.svg +0 -0
  214. package/src/icons/svg/manualcontrolbackground.svg +51 -51
  215. package/src/icons/svg/manualcontrolbackground1.svg +62 -62
  216. package/src/icons/svg/manualcontrolbackgrounden.svg +62 -62
  217. package/src/icons/svg/model.svg +0 -0
  218. package/src/icons/svg/phasediff.svg +0 -0
  219. package/src/icons/svg/prioritycontrol.svg +21 -21
  220. package/src/icons/svg/quanhong.svg +86 -86
  221. package/src/icons/svg/shanghe.svg +11 -11
  222. package/src/icons/svg/shoudong.svg +103 -103
  223. package/src/icons/svg/tentativeplan.svg +28 -28
  224. package/src/icons/svg/time.svg +0 -0
  225. package/src/icons/svg/wuxianlan.svg +46 -46
  226. package/src/icons/svg/xiala.svg +11 -11
  227. package/src/icons/svg/xingrenguojie.svg +33 -33
  228. package/src/icons/svg/xitong.svg +89 -89
  229. package/src/icons/svg/youxian.svg +41 -41
  230. package/src/icons/svg/zizhukongzhi.svg +43 -43
  231. package/src/kisscomps/components/BoardCard/BoardCard.vue +108 -108
  232. package/src/kisscomps/components/BoardCard/index.js +2 -2
  233. package/src/kisscomps/components/Channelization/Channelization.vue +584 -585
  234. package/src/kisscomps/components/Channelization/index.js +2 -2
  235. package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -361
  236. package/src/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -2
  237. package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
  238. package/src/kisscomps/components/ChannelizationWithInterface/index.js +2 -2
  239. package/src/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
  240. package/src/kisscomps/components/CommonKanban/index.js +2 -2
  241. package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
  242. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
  243. package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
  244. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
  245. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
  246. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
  247. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
  248. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
  249. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
  250. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
  251. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
  252. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +467 -467
  253. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
  254. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
  255. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1005 -1005
  256. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +110 -110
  257. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
  258. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
  259. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
  260. package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  261. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  262. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  263. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  264. package/src/kisscomps/components/DrawChannelization/index.js +2 -2
  265. package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  266. package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
  267. package/src/kisscomps/components/ExpendConfig/index.js +2 -2
  268. package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
  269. package/src/kisscomps/components/FaultDetailModal/index.js +2 -2
  270. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +497 -497
  271. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  272. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  273. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  274. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  275. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  276. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  277. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  278. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
  279. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  280. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  281. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  282. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  283. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  284. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  285. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  286. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  287. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  288. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  289. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  290. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  291. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  292. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  293. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  294. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +959 -959
  295. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +123 -123
  296. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +123 -123
  297. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
  298. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  299. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  300. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +99 -99
  301. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +99 -99
  302. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  303. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +171 -171
  304. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +78 -78
  305. package/src/kisscomps/components/IntersectionMap/index.js +2 -2
  306. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +162 -163
  307. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +530 -530
  308. package/src/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  309. package/src/kisscomps/components/KanBan/index.js +2 -2
  310. package/src/kisscomps/components/KanBan/kanban.vue +225 -225
  311. package/src/kisscomps/components/MessageBox/index.vue +96 -96
  312. package/src/kisscomps/components/OverLap/OverLap.vue +214 -214
  313. package/src/kisscomps/components/OverLap/index.js +2 -2
  314. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +272 -272
  315. package/src/kisscomps/components/PatternOptimize/index.js +2 -2
  316. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1456 -1456
  317. package/src/kisscomps/components/PatternStatus/index.js +2 -2
  318. package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  319. package/src/kisscomps/components/PatternWalkSvg/index.js +2 -2
  320. package/src/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
  321. package/src/kisscomps/components/PhaseDirectionSelect/index.js +2 -2
  322. package/src/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
  323. package/src/kisscomps/components/PhaseDirectionText/index.js +2 -2
  324. package/src/kisscomps/components/PhaseMarker/index.js +6 -6
  325. package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  326. package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  327. package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  328. package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  329. package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  330. package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  331. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +828 -828
  332. package/src/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +313 -313
  333. package/src/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
  334. package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  335. package/src/kisscomps/components/SchemeConfig/index.js +2 -2
  336. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  337. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +228 -228
  338. package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +197 -197
  339. package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  340. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +275 -275
  341. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +840 -840
  342. package/src/kisscomps/components/StageBord/StageBord.vue +242 -242
  343. package/src/kisscomps/components/StageBord/index.js +2 -2
  344. package/src/kisscomps/components/StageStatus/StageStatus.vue +341 -341
  345. package/src/kisscomps/components/StageStatus/index.js +2 -2
  346. package/src/kisscomps/components/Stages/index.vue +211 -211
  347. package/src/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  348. package/src/kisscomps/components/SvgIcon/index.js +2 -2
  349. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1065 -1065
  350. package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
  351. package/src/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
  352. package/src/kisscomps/components/XiaoKanban/index.vue +102 -102
  353. package/src/kisscomps/components/overView/index.vue +699 -699
  354. package/src/kisscomps/components/patternConfig/index.js +2 -2
  355. package/src/kisscomps/components/patternConfig/index.vue +1120 -1120
  356. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +349 -349
  357. package/src/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
  358. package/src/kisscomps/components/patternConfig/planContent.vue +573 -573
  359. package/src/kisscomps/components/patternConfig/planMenu.vue +329 -329
  360. package/src/kisscomps/components/patternConfig/utils.js +152 -152
  361. package/src/kisscomps/components/patternList/index.js +2 -2
  362. package/src/kisscomps/components/patternList/patternList.vue +581 -581
  363. package/src/kisscomps/index.js +119 -119
  364. package/src/lib/publicjs/ArryListUtil.js +38 -38
  365. package/src/lib/publicjs/HttpurlMgr.js +45 -45
  366. package/src/lib/publicjs/KissApi.js +158 -158
  367. package/src/lib/publicjs/KissWSSub/Heartcheck.js +128 -128
  368. package/src/lib/publicjs/KissWSSub/KissWsSub.js +91 -91
  369. package/src/lib/publicjs/KissWSSub/KissWsSubByType.js +152 -152
  370. package/src/lib/publicjs/KissWSSub/SimuWsSubByType.js +44 -44
  371. package/src/lib/publicjs/KissWSSub/Sub.js +51 -51
  372. package/src/lib/publicjs/KissWSSub/SubChannel.js +119 -119
  373. package/src/lib/publicjs/basecomponents.js +65 -65
  374. package/src/lib/publicjs/localStorage.js +112 -112
  375. package/src/lib/publicjs/objdeepcopy.js +32 -32
  376. package/src/lib/publicjs/pageScroll.js +30 -30
  377. package/src/lib/publicjs/passwdAssest.js +101 -101
  378. package/src/lib/publicjs/styleclassfactory.js +32 -32
  379. package/src/main.js +50 -50
  380. package/src/router/index.js +56 -56
  381. package/src/store/getters.js +16 -16
  382. package/src/store/index.js +26 -26
  383. package/src/store/modules/globalParam.js +67 -67
  384. package/src/utils/ControlFormat.js +68 -68
  385. package/src/utils/RingDataModel.js +251 -251
  386. package/src/utils/auth.js +199 -199
  387. package/src/utils/dateFormat.js +41 -41
  388. package/src/utils/errorcode.js +228 -228
  389. package/src/utils/fault.js +196 -196
  390. package/src/utils/faultcode.js +209 -209
  391. package/src/utils/index.js +69 -69
  392. package/src/utils/pedphasedesc.js +119 -119
  393. package/src/utils/phaseList.js +203 -203
  394. package/src/utils/phasedesc.js +124 -124
  395. package/src/utils/responseMessage.js +21 -21
  396. package/src/utils/validate.js +43 -43
  397. package/src/views/customchannelization.vue +49 -49
  398. package/src/views/home.1.vue +479 -479
  399. package/src/views/home.vue +93 -93
  400. package/src/views/intersection.vue +309 -309
  401. package/src/views/overView.vue +41 -41
  402. package/src/views/patternConfig.vue +1495 -1495
  403. package/src/views/schemeconfig.vue +173 -173
  404. package/static/apiconfig.json +451 -451
  405. package/static/styles/channelizatioon.scss +433 -433
  406. package/static/styles/common.scss +23 -23
  407. package/static/styles/commonkanban.scss +100 -100
  408. package/static/styles/dark/index.scss +2 -2
  409. package/static/styles/dark/theme/element-dark.scss +42 -42
  410. package/static/styles/index.scss +84 -84
  411. package/static/styles/intersection.scss +190 -183
  412. package/static/styles/light/index.scss +2 -2
  413. package/static/styles/light/theme/element-light.scss +42 -42
  414. package/static/styles/overview.scss +135 -135
  415. package/static/styles/patternConfig.scss +55 -55
  416. package/static/styles/schemeconfig.scss +493 -493
  417. package/static/styles/stages.scss +64 -64
  418. package/static/styles/uiComponents.scss +5 -5
  419. package/static/styles/xiaokanban.scss +50 -50
  420. package/static/token.json +2 -2
  421. package/test/e2e/custom-assertions/elementCount.js +27 -27
  422. package/test/e2e/nightwatch.conf.js +46 -46
  423. package/test/e2e/runner.js +48 -48
  424. package/test/e2e/specs/test.js +19 -19
  425. package/test/unit/.eslintrc +7 -7
  426. package/test/unit/jest.conf.js +30 -30
  427. package/test/unit/setup.js +3 -3
  428. package/test/unit/specs/HelloWorld.spec.js +11 -11
@@ -1,1456 +1,1456 @@
1
- /**
2
- * Copyright (c) 2020 kedacom
3
- * OpenATC is licensed under Mulan PSL v2.
4
- * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
- * You may obtain a copy of Mulan PSL v2 at:
6
- * http://license.coscl.org.cn/MulanPSL2
7
- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
- * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
- * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
- * See the Mulan PSL v2 for more details.
11
- **/
12
- <template>
13
- <div class="main-patternstatus">
14
- <!-- 环模式true -->
15
- <div v-if="this.contrloType === 'ring' || !this.contrloType">
16
- <div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
17
- <div style="position: relative;" :style="{'height': '34px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode===7?'direction': ''">
18
- <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#7ccc66'}">
19
- <el-tooltip placement="top-start" effect="light">
20
- <div slot="content">P{{item.id}}:{{item.split}}</div>
21
- <div style="cursor:pointer;">
22
- <div class="ring-phase">
23
- <!-- <patternwalksvg :showWalk="item.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
24
- <xdrdirselector Width="60px" Height="60px" Widths="50px" Heights="50px" :showlist="item.direction"></xdrdirselector>
25
- </div>
26
- <div class="box" style="position: absolute; left:40px;top: -1px;">
27
- <div class="ring-nums">P{{item.id}}</div>
28
- <div class="ring-nums">{{item.split}}</div>
29
- </div>
30
- </div>
31
- </el-tooltip>
32
- <div style="width:50px;" v-for="(bus,index3) in busPhaseData" :key="index3">
33
- <i class="iconfont icon-lukouzhilu" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 1 && bus.phaseid===item.id"></i>
34
- <i class="iconfont icon-BRT" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 4 && bus.phaseid===item.id"></i>
35
- <i class="iconfont icon-xuxiangwei-xin" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 99 && bus.phaseid===item.id"></i>
36
- <i class="iconfont icon-feijidongche" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 6 && bus.phaseid===item.id"></i>
37
- <i class="iconfont icon-gongjiaoche" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 3 && bus.phaseid===item.id"></i>
38
- <i class="iconfont icon-youguidianche" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 5 && bus.phaseid===item.id"></i>
39
- </div>
40
- </div>
41
- <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.flashgreen.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','float':'left','background': 'linear-gradient(to right, #ffffff 50%, #7ccc66 0)','background-size': '4px 100%'}"></div>
42
- <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.yellowWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f9dc6a'}"></div>
43
- <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.redWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f27979'}"></div>
44
- </div>
45
- </div>
46
- <div v-if="showBarrier">
47
- <div v-for="(item, index) in barrierList" :key="index + '1'">
48
- <div class="divider" :style="{'left':item, 'height':barrierHeight}"></div>
49
- </div>
50
- </div>
51
- <div v-show="(this.curtime>0 && cycle && cycle>0) || (this.curtime>0 && newCycle && newCycle>0)">
52
- <div class="curTimeDiv" :style="{'left':paddingLeft }">{{ timeNumDevide }}</div>
53
- <div class="curTimeLine" :style="{'left':paddingLeft, 'height':barrierHeight}"></div>
54
- </div>
55
- </div>
56
- <div v-if="this.contrloType === 'stage'">
57
- <div v-for="(list, index1) in stageLists" :key="index1">
58
- <!-- <div> -->
59
- <div class="first-1" :style="{'width':list.greenWidth,'height':'34px','position':'relative','background':'#7ccc66'}">
60
- <el-tooltip placement="top-start" effect="light">
61
- <div slot="content">
62
- <span class="ring-nums" v-for="(pha,index) in list.phases" :key="index">
63
- P{{pha}}
64
- </span>
65
- </div>
66
- <div style="cursor:pointer;">
67
- <div class="ring-phase">
68
- <!-- <patternwalksvg :showWalk="list.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
69
- <xdrdirselector v-if="list.direction&&list.direction.length>0" Width="60px" Height="60px" Widths="50px" Heights="50px" :showlist="list.direction"></xdrdirselector>
70
- </div>
71
- <div class="box" style="position: absolute; left:41px; top:-1px;">
72
- <div class="ring-nums">S{{list.key+1}}</div>
73
- <div class="ring-nums">{{list.stageSplit}}</div>
74
- </div>
75
- <!-- <div class="box" style="line-height:28px">
76
- <span class="ring-nums" v-for="(pha,index) in list.phases" :key="index">
77
- P:{{pha}}
78
- </span>
79
- </div> -->
80
- </div>
81
- </el-tooltip>
82
- </div>
83
- <!-- <div class="first-1" :style="{'width':item.flashgreen,'height':'34px','float':'left','background': 'linear-gradient(to right, #ffffff 50%, #7ccc66 0)','background-size': '4px 100%'}"></div> -->
84
- <div class="first-1" :style="{'width':list.yellowWidth,'height':'34px','background':'#f9dc6a'}"></div>
85
- <div class="first-1" :style="{'width':list.redWidth,'height':'34px','background':'#f27979'}"></div>
86
- </div>
87
- </div>
88
- <!-- </div> -->
89
- </div>
90
- </template>
91
- <script>
92
- // import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
93
- import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
94
- // import PatternWalkSvg from '../IntersectionMap/crossDirection/baseImg/PatternWalkSvg'
95
- import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
96
- import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
97
- export default {
98
- name: 'pattern-list',
99
- components: {
100
- // patternwalksvg,
101
- xdrdirselector
102
- },
103
- data () {
104
- return {
105
- barrierHeight: '',
106
- barrierList: [],
107
- newCycle: this.cycles,
108
- patternIds: this.patternId,
109
- newPatterns: [],
110
- newList: [],
111
- contrloCycle: 0,
112
- sidewalkPhaseData: [],
113
- // controlDatas: this.controlData,
114
- max: '',
115
- fixCycle: '',
116
- curtime: 0,
117
- stageLists: [],
118
- busPhaseData: [], // 公交相位数据
119
- patternInfo: []
120
- }
121
- },
122
- props: {
123
- cycleChange: {
124
- type: Boolean,
125
- default: true
126
- },
127
- stagesChange: {
128
- type: Array
129
- },
130
- controlPhase: {
131
- type: Object
132
- },
133
- contrloType: {
134
- type: String
135
- },
136
- phaseList: {
137
- type: Array
138
- },
139
- patternList: {
140
- type: Array
141
- },
142
- showBarrier: {
143
- type: Boolean,
144
- default: false
145
- },
146
- localPatternList: {
147
- type: Array
148
- },
149
- controlData: {
150
- type: Object
151
- },
152
- showCondition: {
153
- type: Boolean,
154
- default: false
155
- },
156
- cycle: {
157
- type: Number
158
- },
159
- agentId: {
160
- type: String
161
- },
162
- cycles: {
163
- type: Number
164
- },
165
- patternId: {
166
- type: Number
167
- },
168
- patternStatusList: {
169
- type: Array
170
- },
171
- syncTime: {
172
- type: Number
173
- }
174
- },
175
- computed: {
176
- paddingLeft () {
177
- let res = '0%'
178
- if (this.contrloCycle > 0) {
179
- let curPercent = this.curtime / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
180
- res = curPercent * 100 + '%'
181
- }
182
- if (this.cycles > 0) {
183
- let curPercent = this.curtime / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
184
- res = curPercent * 100 + '%'
185
- }
186
- return res
187
- },
188
- timeNumDevide () {
189
- if (this.contrloCycle > 0) {
190
- // let res = (this.contrloCycle - this.syncTime) + '/' + this.contrloCycle
191
- // let res = this.curtime + '/' + (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
192
- let res = this.curtime
193
- return res
194
- }
195
- if (this.cycles > 0) {
196
- // let res = (this.cycles - this.syncTime) + '/' + this.cycles
197
- // let res = this.curtime + '/' + (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
198
- let res = this.curtime
199
- return res
200
- }
201
- }
202
- },
203
- watch: {
204
- controlPhase: {
205
- handler: function (val, oldVal) {
206
- if (this.controlPhase && this.controlPhase.curTime) {
207
- this.curtime = this.controlPhase.curTime
208
- }
209
- },
210
- // 深度观察监听
211
- deep: true
212
- },
213
- controlData: {
214
- handler: function (val, oldVal) {
215
- if (this.contrloType === 'stage') {
216
- this.getIndexStage()
217
- }
218
- // this.controlDatas = this.controlData
219
- this.getPedPhasePos()
220
- if (this.localPatternList) {
221
- this.max = ''
222
- let idPattern = this.localPatternList.filter(item => item.id === this.controlData.patternid)
223
- if (idPattern.length === 0 || (this.controlData && this.showCondition)) {
224
- this.handleTentivePatternData()
225
- } else {
226
- this.handlePatternData()
227
- }
228
- this.handleBarrierHeight()
229
- }
230
- if (!this.controlData.curTime) return
231
- this.curtime = this.controlData.curTime
232
- },
233
- // 深度观察监听
234
- deep: true
235
- },
236
- cycleChange: {
237
- handler: function (val, oldVal) {
238
- this.getStage()
239
- this.handleCurrentChange(this.patternStatusList)
240
- this.handleBarrierHeight()
241
- },
242
- // 深度观察监听
243
- deep: true
244
- },
245
- phaseList: {
246
- handler: function (val, oldVal) {
247
- this.getPedPhasePos()
248
- this.getBusPos()
249
- this.getStage()
250
- // this.handlePatternData()
251
- },
252
- // 深度观察监听
253
- deep: true
254
- },
255
- agentId: {
256
- handler: function (val, oldVal) {
257
- this.getBusPos()
258
- },
259
- // 深度观察监听
260
- deep: true
261
- },
262
- patternId: {
263
- handler: function (val, oldVal) {
264
- this.patternIds = this.patternId
265
- },
266
- // 深度观察监听
267
- deep: true
268
- },
269
- cycles: {
270
- handler: function (val, oldVal) {
271
- this.newCycle = this.cycles
272
- },
273
- // 深度观察监听
274
- deep: true
275
- },
276
- contrloType: {
277
- handler: function (val, oldVal) {
278
- if (this.contrloType === 'stage') {
279
- this.getStage()
280
- }
281
- },
282
- // 深度观察监听
283
- deep: true
284
- },
285
- stagesChange: {
286
- handler: function (val, oldVal) {
287
- if (this.contrloType === 'stage') {
288
- this.getStage()
289
- }
290
- },
291
- // 深度观察监听
292
- deep: true
293
- },
294
- patternStatusList: {
295
- handler: function (val, oldVal) {
296
- this.handleBarrierHeight() // 计算屏障高度
297
- if (this.patternStatusList && this.newCycle) {
298
- setTimeout(() => {
299
- this.handleCurrentChange(this.patternStatusList)
300
- this.handleBarrierHeight()
301
- }, 10)
302
- this.handleBarrierHeight()
303
- }
304
- },
305
- // 深度观察监听
306
- deep: true
307
- }
308
- },
309
- created () {
310
- this.globalParamModel = this.$store.getters.globalParamModel
311
- if (this.patternStatusList && this.newCycle && !this.controlData) {
312
- setTimeout(() => {
313
- this.handleCurrentChange(this.patternStatusList)
314
- this.handleBarrierHeight()
315
- }, 400)
316
- } else if ((this.controlData && this.controlData.patternid === 109) || (this.controlData && this.showCondition) || (this.controlData && this.localPatternList.length === 0)) {
317
- this.handleTentivePatternData()
318
- } else {
319
- this.handlePatternData()
320
- }
321
- this.PhaseDataModel = new PhaseDataModel()
322
- this.CrossDiagramMgr = new CrossDiagramMgr()
323
- this.getPedPhasePos()
324
- this.getBusPos()
325
- if (this.contrloType === 'stage') {
326
- this.getStage()
327
- }
328
- },
329
- methods: {
330
- getPed (data) {
331
- let ped = []
332
- for (let stg of data) {
333
- let peddirections = []
334
- let currPhase = this.phaseList.filter((item) => {
335
- return item.id === stg
336
- })[0]
337
- if (!currPhase) return
338
- if (!currPhase.peddirection) return
339
- for (let walk of this.sidewalkPhaseData) {
340
- for (let ped of currPhase.peddirection) {
341
- if (stg === walk.phaseid) {
342
- let obj = {}
343
- obj.name = walk.name
344
- obj.id = walk.id
345
- if (ped === walk.id) {
346
- peddirections.push(obj)
347
- peddirections = Array.from(new Set(peddirections))
348
- }
349
- }
350
- }
351
- }
352
- ped.push(...peddirections)
353
- }
354
- return ped
355
- },
356
- handleStageData (data) {
357
- if (!data) return
358
- let peddirections = this.getPed(data)
359
- let stagesTemp = []
360
- let tempList = []
361
- for (let stg of data) {
362
- let directionList = []
363
- let currPhase = this.phaseList.filter((item) => {
364
- return item.id === stg
365
- })[0]
366
- if (currPhase !== undefined) {
367
- directionList.push(...currPhase.direction)
368
- directionList = Array.from(new Set(directionList))
369
- }
370
- if (directionList.length === 0) {
371
- tempList.push({
372
- id: '',
373
- color: '#454545',
374
- peddirection: peddirections
375
- })
376
- } else {
377
- tempList = directionList.map(dir => ({
378
- id: dir,
379
- color: '#454545',
380
- peddirection: peddirections
381
- }))
382
- }
383
- let newTemp = tempList.filter(item => item.id !== '')
384
- stagesTemp.push(...newTemp)
385
- }
386
- return stagesTemp
387
- },
388
- getIndexStage () {
389
- if (this.localPatternList.length === 0) return
390
- for (let i = 0; i < this.localPatternList.length; i++) {
391
- if (this.controlData.patternid === this.localPatternList[i].id) {
392
- if (!this.localPatternList[i].stagesList) return
393
- let stageCycleList = this.localPatternList[i].stagesList.map(item => {
394
- return item.stageSplit ? item.stageSplit : 0
395
- })
396
- let stageMaxCyle = stageCycleList.reduce((a, b) => {
397
- return a + b
398
- }, 0)
399
- this.stageLists = this.localPatternList[i].stagesList.map(item => {
400
- return {
401
- ...item,
402
- // peddirection: this.getPed(item.phases ? item.phases : item.stages),
403
- direction: this.handleStageData(item.phases ? item.phases : item.stages),
404
- greenWidth: (item.green / stageMaxCyle * 100).toFixed(3) + '%',
405
- yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
406
- redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
407
- }
408
- })
409
- }
410
- }
411
- },
412
- getStage () {
413
- if (!this.stagesChange) return
414
- const globalParamModel = this.$store.getters.globalParamModel
415
- let pattern = globalParamModel.getParamsByType('patternList')
416
- let mapAdd = pattern.map(item => item.stagesList).map(item => {
417
- return item.map(val => {
418
- return val.stageSplit
419
- })
420
- })
421
- let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
422
- return item.length > 0 ? item.reduce((a, b) => {
423
- return a + b
424
- }) : 0
425
- }) : 0
426
- let stageMaxCyle = Math.max(...maxCycle)// 每个环的周期最大值
427
- if (!this.cycleChange) {
428
- let stageCycleList = this.stagesChange.map(item => {
429
- return item.stageSplit ? item.stageSplit : 0
430
- })
431
- stageMaxCyle = stageCycleList.reduce((a, b) => {
432
- return a + b
433
- }, 0)
434
- }
435
- this.stageLists = this.stagesChange.map(item => {
436
- return {
437
- ...item,
438
- // peddirection: this.getPed(item.phases ? item.phases : item.stages),
439
- direction: this.handleStageData(item.phases ? item.phases : item.stages),
440
- greenWidth: ((item.stageSplit - item.yellow - item.red) / stageMaxCyle * 100).toFixed(3) + '%',
441
- yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
442
- redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
443
- }
444
- })
445
- },
446
- getBusPos () {
447
- // 公交相位信息
448
- this.busPhaseData = []
449
- this.phaseList.forEach((ele, i) => {
450
- // if (ele.controltype >= 3 && ele.controltype <= 5) {
451
- // ele.direction.forEach((dir, index) => {
452
- // 车道相位
453
- this.busPhaseData.push({
454
- phaseid: ele.id, // 相位did,用于对应相位状态
455
- // id: dir, // 接口返回的dir字段,对应前端定义的相位方向id,唯一标识
456
- // name: this.PhaseDataModel.getBusPhasePos(dir).name,
457
- controltype: ele.controltype
458
- })
459
- // })
460
- // }
461
- })
462
- let result = []
463
- let obj = {}
464
- for (var i = 0; i < this.busPhaseData.length; i++) {
465
- if (!obj[this.busPhaseData[i].phaseid]) {
466
- result.push(this.busPhaseData[i])
467
- obj[this.busPhaseData[i].phaseid] = true
468
- }
469
- }
470
- this.busPhaseData = result
471
- },
472
- getPedPhasePos () {
473
- // 行人相位信息
474
- this.sidewalkPhaseData = []
475
- this.phaseList.forEach((ele, i) => {
476
- if (ele.peddirection) {
477
- ele.peddirection.forEach((dir, index) => {
478
- // 行人相位
479
- if (this.PhaseDataModel.getSidePos(dir)) {
480
- this.sidewalkPhaseData.push({
481
- key: this.CrossDiagramMgr.getUniqueKey('pedphase'),
482
- phaseid: ele.id, // 相位id,用于对应相位状态
483
- id: dir,
484
- name: this.PhaseDataModel.getSidePos(dir).name
485
- })
486
- }
487
- })
488
- }
489
- })
490
- },
491
- handleTentivePatternData () {
492
- if (!this.controlData) return
493
- this.newList = []
494
- if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
495
- if (!this.controlData.phase) return
496
- // let cycle = this.controlData.cycle
497
- if (!this.controlData.rings) return
498
- let newValue = []
499
- for (let rings of this.controlData.rings) {
500
- let phase = this.controlData.phase
501
- // let list = []
502
- let obj = {}
503
- for (let key in rings.sequence) {
504
- obj[key] = rings.sequence[key]
505
- }
506
- let newObj = Object.keys(obj).map(val => ({
507
- id: obj[val]
508
- }))
509
- newValue.push(newObj)
510
- for (let sequ of rings.sequence) {
511
- let obj = {}
512
- obj.id = sequ
513
- let split = phase.filter((item) => {
514
- return item.id === sequ
515
- })[0].split
516
- newValue.map(d => {
517
- d.map(r => {
518
- if (r.id === sequ) {
519
- r.value = split
520
- }
521
- })
522
- })
523
- }
524
- }
525
- this.handleTentative(newValue)
526
- },
527
- handleTentative (val) {
528
- if (val === null || val.length === 0) return
529
- // 周期以实际的绿信比来计算
530
- let valSplit = val.map(item => {
531
- return item.map(val => {
532
- return val.value + (val.sum ? val.sum : 0)
533
- })
534
- })
535
- let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
536
- return item.length > 0 ? item.reduce((a, b) => {
537
- return a + b
538
- }) : 0
539
- }) : 0
540
- let cycle = Math.max(...splitCycle)// 每个环的周期最大值
541
- this.contrloCycle = cycle
542
- this.patternInfo = []
543
- let currentArr = []
544
- let newPattern = []
545
- val.map(i => {
546
- newPattern.push(...i)
547
- })
548
- if (this.phaseList.length === 0) return
549
- for (let patternStatus of val[0]) {
550
- // if (patternStatus.mode !== 7) {
551
- let concurrent = this.phaseList.filter((item) => {
552
- return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
553
- })[0].concurrent// 当前相位的并发相位
554
- if (concurrent) {
555
- let obj = {
556
- id: patternStatus.id,
557
- current: concurrent.sort()
558
- }
559
- currentArr.push(obj)
560
- }
561
- // }
562
- }
563
- if (currentArr.length !== 0) {
564
- let newCurrent = this.tranform(currentArr)
565
- let ringTeam = this.step1(this.phaseList, newCurrent)
566
- this.fillGap(ringTeam, val)
567
- }
568
- // let cycle = this.controlData.cycle
569
- for (let rings of val) {
570
- if (rings.length === 0) continue
571
- let list = []
572
- for (let ring of rings) {
573
- if (ring.value === 0) continue
574
- let obj = {}
575
- let split = ring.value
576
- obj.id = ring.id
577
- // obj.split = split
578
- let currPhase = this.phaseList.filter((item) => {
579
- if (item.id === ring.id && item.controltype === 99) {
580
- obj.controltype = item.controltype
581
- }
582
- return item.id === ring.id
583
- })[0]
584
- if (!currPhase) return
585
- let peddirections = []
586
- for (let walk of this.sidewalkPhaseData) {
587
- if (currPhase.peddirection) {
588
- for (let ped of currPhase.peddirection) {
589
- // if (stg === walk.phaseid) {
590
- let objs = {}
591
- objs.name = walk.name
592
- objs.id = walk.id
593
- if (ped === walk.id) {
594
- peddirections.push(objs)
595
- peddirections = Array.from(new Set(peddirections))
596
- }
597
- // }
598
- }
599
- } else {
600
- peddirections = []
601
- }
602
- }
603
- if (ring.desc && ring.desc.length > 0) {
604
- obj.direction = ring.desc.map(item => { // 虚相位desc为空
605
- return {
606
- id: item.id,
607
- color: '#454545'
608
- }
609
- })
610
- } else {
611
- if (currPhase.direction && currPhase.direction.length > 0) {
612
- obj.direction = currPhase.direction.map(item => {
613
- return {
614
- id: item,
615
- peddirection: peddirections,
616
- color: '#454545'
617
- }
618
- })
619
- } else {
620
- obj.direction = [
621
- {
622
- id: '',
623
- color: '#454545',
624
- peddirection: peddirections
625
- }
626
- ]
627
- }
628
- }
629
- obj.split = split
630
- obj.cycle = cycle
631
- if (ring.sum) {
632
- obj.sum = ring.sum
633
- obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
634
- } else {
635
- obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100) + '%'
636
- }
637
- obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100) + '%'
638
- obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100) + '%'
639
- obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100) + '%'
640
- // 忽略相位不显示
641
- // let mode = ring.mode
642
- // if (mode !== 7) { // 忽略相位不显示
643
- list.push(obj)
644
- // }
645
- }
646
- this.patternInfo.push(list)
647
- }
648
- },
649
- handlePatternData () {
650
- if (!this.controlData) return
651
- // this.newList = []
652
- if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
653
- if (!this.controlData.phase) return
654
- if (!this.controlData.rings) return
655
- let nowPattern = this.localPatternList.filter(item => {
656
- return item.id === this.controlData.patternid
657
- })[0].rings
658
- // 信号机忽略相位,更新最新的相位信息
659
- let filterPattern = []
660
- for (let i of nowPattern) {
661
- for (let j of this.controlData.rings) {
662
- let filterSequence = i.filter(item => j.sequence.includes(item.id))
663
- if (filterSequence.length > 0) {
664
- filterPattern.push(filterSequence)
665
- }
666
- }
667
- }
668
- for (let rings of this.controlData.rings) {
669
- for (let sequ of rings.sequence) {
670
- let split = this.controlData.phase.filter((item) => {
671
- return item.id === sequ
672
- })[0].split
673
- filterPattern.map(d => {
674
- return d.map(r => {
675
- if (r.id === sequ) {
676
- r.value = split
677
- }
678
- })
679
- })
680
- }
681
- }
682
- this.handleOverViewChange(filterPattern)
683
- },
684
- handleBarrierHeight () { // 屏障高度
685
- if (!this.patternInfo) return
686
- let patternLength = this.patternInfo.length
687
- this.barrierHeight = (patternLength * 35 + 21) + 'px'
688
- },
689
- handleOverViewChange (val) {
690
- if (val === null || val.length === 0) return
691
- // 周期以实际的绿信比来计算
692
- let valSplit = val.map(item => {
693
- return item.map(val => {
694
- return val.value + (val.sum ? val.sum : 0)
695
- })
696
- })
697
- let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
698
- return item.length > 0 ? item.reduce((a, b) => {
699
- return a + b
700
- }) : 0
701
- }) : 0
702
- let cycle = Math.max(...splitCycle)// 每个环的周期最大值
703
- this.contrloCycle = cycle
704
- // 按环序分组
705
- let ringlength = []
706
- let ringsequence = val.map(item => {
707
- if (item.length === 0) return
708
- ringlength.push(item.length)
709
- return item.map(k => {
710
- return k.id
711
- })
712
- })
713
- let newRings = ringsequence.filter(item => item)
714
- let minLength = Math.min(...ringlength)
715
- let resultArrs = [] // 环1分组
716
- let resultArr = [] // 环2分组
717
- for (let j = 0; j < ringsequence[0].length; j += minLength) {
718
- resultArrs.push(ringsequence[0].slice(j, j + minLength))
719
- if (ringsequence[0].length === minLength) {
720
- resultArrs.push([])
721
- }
722
- }
723
- if (newRings.length > 1) {
724
- for (let i = 0; i < ringsequence[1].length; i += minLength) {
725
- resultArr.push(ringsequence[1].slice(i, i + minLength))
726
- }
727
- }
728
- this.patternInfo = []
729
- let currentArr = []
730
- let newPattern = []
731
- val.map(i => {
732
- newPattern.push(...i)
733
- })
734
- if (this.phaseList.length === 0) return
735
- for (let patternStatus of val[0]) {
736
- // if (patternStatus.mode !== 7) {
737
- let concurrent = this.phaseList.filter((item) => {
738
- return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
739
- })[0].concurrent// 当前相位的并发相位
740
- if (concurrent) {
741
- let obj = {
742
- id: patternStatus.id,
743
- current: concurrent.sort()
744
- }
745
- currentArr.push(obj)
746
- }
747
- // }
748
- }
749
- if (currentArr.length !== 0) {
750
- let newCurrent = this.tranform(currentArr)
751
- // 取没个环与环关系的并集
752
- let barrierRing1 = []
753
- let barrierRing2 = []
754
- let ring1 = [] // 环1与关系1的并集
755
- for (let h = 0; h < newCurrent.length; h++) {
756
- let adds = [...new Set(resultArrs[0])].filter(item => newCurrent[h].includes(item))
757
- ring1.push(adds)
758
- }
759
- let ring1s = [] // 环1与关系2的并集
760
- for (let h = 0; h < newCurrent.length; h++) {
761
- let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
762
- ring1s.push(addRing1)
763
- }
764
- barrierRing1.push(...ring1, ...ring1s)
765
- let resultList = []
766
- if (newRings.length > 1) {
767
- let ring2s = [] // 环2与关系1的并集
768
- for (let h = 0; h < newCurrent.length; h++) {
769
- let addRing2 = [...new Set(resultArr[1])].filter(item => newCurrent[h].includes(item))
770
- ring2s.push(addRing2)
771
- }
772
- let ring2 = [] // 环2与关系1的并集
773
- for (let h = 0; h < newCurrent.length; h++) {
774
- let add = [...new Set(resultArr[0])].filter(item => newCurrent[h].includes(item))
775
- ring2.push(add)
776
- }
777
- barrierRing2.push(...ring2, ...ring2s)
778
- for (let k = 0; k < barrierRing1.length; k++) {
779
- resultList.push(barrierRing1[k].concat(barrierRing2[k]))
780
- }
781
- }
782
- let resultLists = resultList.filter(item => item.length !== 0)
783
- let ringArr = []
784
- for (let l = 0; l < resultLists.length; l++) {
785
- for (let d = 0; d < newCurrent.length; d++) {
786
- if (newCurrent[d].filter(item => resultLists[l].includes(item)).length > 0) {
787
- ringArr.push({
788
- data: resultLists[l],
789
- id: d + 1,
790
- index: l
791
- })
792
- }
793
- }
794
- }
795
- for (var i = 0; i < ringArr.length; i++) {
796
- for (var j = i + 1; j < ringArr.length; j++) {
797
- if (ringArr[i].id === ringArr[j].id && ringArr[i].index + 1 === ringArr[j].index) {
798
- ringArr[i].data = ringArr[i].data.concat(ringArr[j].data)
799
- ringArr.splice(ringArr.indexOf(ringArr[j].id), 1)
800
- }
801
- }
802
- }
803
- let resArr = ringArr.map(item => item.data)
804
- let ringTeam = this.step1(this.phaseList, resArr)
805
- let ringTeams = ringTeam.filter(item => item.length !== 0)
806
- this.fillGap(ringTeams, val)
807
- // 总览添加屏障
808
- let newPattern = []
809
- val.map(i => {
810
- newPattern.push(...i)
811
- })
812
- let barrier = this.step2(ringTeams, newPattern)
813
- let barrierLeft = barrier.map(item => item - 0.3)
814
- this.barrierList = barrierLeft.map(j => {
815
- return (j / (this.max ? this.max : this.contrloCycle) * 100) + '%'
816
- })
817
- }
818
- // let cycle = this.controlData.cycle
819
- for (let rings of val) {
820
- if (rings.length === 0) continue
821
- let list = []
822
- for (let ring of rings) {
823
- if (ring.value === 0) continue
824
- let obj = {}
825
- let split = ring.value
826
- obj.id = ring.id
827
- obj.mode = ring.mode
828
- // obj.split = split
829
- let currPhase = this.phaseList.filter((item) => {
830
- if (item.id === ring.id && item.controltype === 99) {
831
- obj.controltype = item.controltype
832
- }
833
- return item.id === ring.id
834
- })[0]
835
- if (!currPhase) return
836
- let peddirections = []
837
- for (let walk of this.sidewalkPhaseData) {
838
- if (currPhase.peddirection) {
839
- for (let ped of currPhase.peddirection) {
840
- // if (stg === walk.phaseid) {
841
- let objs = {}
842
- objs.name = walk.name
843
- objs.id = walk.id
844
- if (ped === walk.id) {
845
- peddirections.push(objs)
846
- peddirections = Array.from(new Set(peddirections))
847
- }
848
- // }
849
- }
850
- } else {
851
- peddirections = []
852
- }
853
- }
854
- if (ring.desc && ring.desc.length > 0) {
855
- obj.direction = ring.desc.map(item => { // 虚相位desc为空
856
- return {
857
- id: item.id,
858
- color: '#454545'
859
- }
860
- })
861
- } else {
862
- if (currPhase.direction && currPhase.direction.length > 0) {
863
- obj.direction = currPhase.direction.map(item => {
864
- return {
865
- id: item,
866
- peddirection: peddirections,
867
- color: '#454545'
868
- }
869
- })
870
- } else {
871
- obj.direction = [
872
- {
873
- id: '',
874
- color: '#454545',
875
- peddirection: peddirections
876
- }
877
- ]
878
- }
879
- }
880
- obj.split = split
881
- obj.cycle = cycle
882
- if (ring.sum) {
883
- obj.sum = ring.sum
884
- obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
885
- } else {
886
- obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100) + '%'
887
- }
888
- obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100) + '%'
889
- obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100) + '%'
890
- obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100) + '%'
891
- // 忽略相位不显示
892
- // let mode = ring.mode
893
- // if (mode !== 7) { // 忽略相位不显示
894
- list.push(obj)
895
- // }
896
- }
897
- this.patternInfo.push(list)
898
- }
899
- },
900
- handleCurrentChange (val) { // 两个ring的数据
901
- if (val === null || val.length === 0) return
902
- if (this.controlPhase && this.controlPhase.phase && this.controlPhase.phase[0].split) {
903
- val.map(i => {
904
- i.map(j => {
905
- j.value = this.controlPhase.phase.filter(item => item.id === j.id)[0].split
906
- })
907
- })
908
- }
909
- // 按环序分组
910
- let ringlength = []
911
- let ringsequence = val.map(item => {
912
- if (item.length === 0) return
913
- ringlength.push(item.length)
914
- return item.map(k => {
915
- return k.id
916
- })
917
- })
918
- let valSplit = val.map(item => {
919
- return item.map(val => {
920
- return val.value + (val.sum ? val.sum : 0)
921
- })
922
- })
923
- let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
924
- return item.length > 0 ? item.reduce((a, b) => {
925
- return a + b
926
- }) : 0
927
- }) : 0
928
- let cycle = Math.max(...splitCycle)// 每个环的周期最大值
929
- this.fixCycle = cycle// 每个环的周期最大值
930
- let newRings = ringsequence.filter(item => item)
931
- let minLength = Math.min(...ringlength)
932
- let resultArrs = [] // 环1分组
933
- let resultArr = [] // 环2分组
934
- for (let j = 0; j < ringsequence[0].length; j += minLength) {
935
- resultArrs.push(ringsequence[0].slice(j, j + minLength))
936
- if (ringsequence[0].length === minLength) {
937
- resultArrs.push([])
938
- }
939
- }
940
- if (newRings.length > 1) {
941
- for (let i = 0; i < ringsequence[1].length; i += minLength) {
942
- resultArr.push(ringsequence[1].slice(i, i + minLength))
943
- }
944
- }
945
- this.patternInfo = []
946
- this.barrierList = []
947
- let currentArr = []
948
- let newPattern = []
949
- val.map(i => {
950
- newPattern.push(...i)
951
- })
952
- if (this.phaseList.length === 0) return
953
- for (let patternStatus of val[0]) {
954
- // if (patternStatus.mode !== 7) {
955
- let concurrent = this.phaseList.filter((item) => {
956
- return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
957
- })[0].concurrent// 当前相位的并发相位
958
- if (concurrent) {
959
- let obj = {
960
- id: patternStatus.id,
961
- current: concurrent.sort()
962
- }
963
- currentArr.push(obj)
964
- }
965
- // }
966
- }
967
- if (currentArr.length !== 0) {
968
- let newCurrent = this.tranform(currentArr)
969
- // 取没个环与环关系的并集
970
- let barrierRing1 = []
971
- let barrierRing2 = []
972
- let ring1 = [] // 环1与关系1的并集
973
- for (let h = 0; h < newCurrent.length; h++) {
974
- let adds = [...new Set(resultArrs[0])].filter(item => newCurrent[h].includes(item))
975
- ring1.push(adds)
976
- }
977
- let ring1s = [] // 环1与关系2的并集
978
- for (let h = 0; h < newCurrent.length; h++) {
979
- let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
980
- ring1s.push(addRing1)
981
- }
982
- barrierRing1.push(...ring1, ...ring1s)
983
- let resultList = []
984
- if (newRings.length > 1) {
985
- let ring2s = [] // 环2与关系1的并集
986
- for (let h = 0; h < newCurrent.length; h++) {
987
- let addRing2 = [...new Set(resultArr[1])].filter(item => newCurrent[h].includes(item))
988
- ring2s.push(addRing2)
989
- }
990
- let ring2 = [] // 环2与关系1的并集
991
- for (let h = 0; h < newCurrent.length; h++) {
992
- let add = [...new Set(resultArr[0])].filter(item => newCurrent[h].includes(item))
993
- ring2.push(add)
994
- }
995
- barrierRing2.push(...ring2, ...ring2s)
996
- for (let k = 0; k < barrierRing1.length; k++) {
997
- resultList.push(barrierRing1[k].concat(barrierRing2[k]))
998
- }
999
- }
1000
- let resultLists = resultList.filter(item => item.length !== 0)
1001
- let ringArr = []
1002
- for (let l = 0; l < resultLists.length; l++) {
1003
- for (let d = 0; d < newCurrent.length; d++) {
1004
- if (newCurrent[d].filter(item => resultLists[l].includes(item)).length > 0) {
1005
- ringArr.push({
1006
- data: resultLists[l],
1007
- id: d + 1,
1008
- index: l
1009
- })
1010
- }
1011
- }
1012
- }
1013
- for (var i = 0; i < ringArr.length; i++) {
1014
- for (var j = i + 1; j < ringArr.length; j++) {
1015
- if (ringArr[i].id === ringArr[j].id && ringArr[i].index + 1 === ringArr[j].index) {
1016
- ringArr[i].data = ringArr[i].data.concat(ringArr[j].data)
1017
- ringArr.splice(ringArr.indexOf(ringArr[j].id), 1)
1018
- }
1019
- }
1020
- }
1021
- let resArr = ringArr.map(item => item.data)
1022
- let ringTeam = this.step1(this.phaseList, resArr)
1023
- let ringTeams = ringTeam.filter(item => item.length !== 0)
1024
- if (this.patternList) {
1025
- this.setBarrier(ringTeams, val)
1026
- }
1027
- if (newRings.length > 1) {
1028
- this.fillGap(ringTeams, val)
1029
- }
1030
- if (this.cycleChange) {
1031
- const globalParamModel = this.$store.getters.globalParamModel
1032
- let pattern = globalParamModel.getParamsByType('patternList')
1033
- const allCycle = pattern.map(item => item.cycle)
1034
- let cycle = Math.max(...allCycle)
1035
- this.max = cycle
1036
- } else {
1037
- this.max = ''
1038
- }
1039
- let barrier = this.step2(ringTeams, newPattern)
1040
- let barrierLeft = barrier.map(item => item - 0.3)// 屏障左移显示出人行横道
1041
- this.barrierList = barrierLeft.map(j => {
1042
- return (j / (this.max ? this.max : this.newCycle) * 100) + '%'
1043
- })
1044
- // this.barrierList.unshift(0)
1045
- }
1046
- for (let rings of val) {
1047
- if (rings.length === 0) continue
1048
- let list = []
1049
- for (let ring of rings) {
1050
- if (ring.value === 0) continue
1051
- let obj = {}
1052
- let split = ring.value
1053
- obj.id = ring.id
1054
- // obj.split = split
1055
- let currPhase = this.phaseList.filter((item) => {
1056
- if (item.id === ring.id && item.controltype === 99) {
1057
- obj.controltype = item.controltype
1058
- }
1059
- return item.id === ring.id
1060
- })[0]
1061
- if (!currPhase) return
1062
- let peddirections = []
1063
- for (let walk of this.sidewalkPhaseData) {
1064
- if (currPhase.peddirection) {
1065
- for (let ped of currPhase.peddirection) {
1066
- // if (stg === walk.phaseid) {
1067
- let objs = {}
1068
- objs.name = walk.name
1069
- objs.id = walk.id
1070
- if (ped === walk.id) {
1071
- peddirections.push(objs)
1072
- peddirections = Array.from(new Set(peddirections))
1073
- }
1074
- // }
1075
- }
1076
- } else {
1077
- peddirections = []
1078
- }
1079
- }
1080
- if (ring.desc && ring.desc.length > 0) {
1081
- obj.direction = ring.desc.map(item => { // 虚相位desc为空
1082
- return {
1083
- id: item.id,
1084
- color: '#454545',
1085
- peddirection: peddirections
1086
- }
1087
- })
1088
- } else {
1089
- if (currPhase.direction && currPhase.direction.length > 0) {
1090
- obj.direction = currPhase.direction.map(item => {
1091
- return {
1092
- id: item,
1093
- color: '#454545',
1094
- peddirection: peddirections
1095
- }
1096
- })
1097
- } else {
1098
- obj.direction = [
1099
- {
1100
- id: '',
1101
- color: '#454545',
1102
- peddirection: peddirections
1103
- }
1104
- ]
1105
- }
1106
- }
1107
- obj.split = split
1108
- obj.cycle = cycle
1109
- if (ring.sum) {
1110
- obj.sum = ring.sum
1111
- obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
1112
- } else {
1113
- obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100) + '%'
1114
- }
1115
- obj.mode = ring.mode
1116
- obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100) + '%'
1117
- obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100) + '%'
1118
- obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100) + '%'
1119
- // 忽略相位不显示
1120
- // let mode = ring.mode
1121
- // if (mode !== 7) { // 忽略相位不显示
1122
- list.push(obj)
1123
- // }
1124
- }
1125
- this.patternInfo.push(list)
1126
- }
1127
- },
1128
- setBarrier (ringTeam, val) { // 添加特征参数barrier
1129
- this.patternList.map(item => {
1130
- if (item.id === this.patternIds) {
1131
- const patternObjs = {}
1132
- val.forEach(l => {
1133
- l.map(k => {
1134
- patternObjs[k.id] = k.value
1135
- })
1136
- })
1137
- let ret = ringTeam.map((y, index) => {
1138
- if (!y || y.length === 0) return
1139
- y.map(n => {
1140
- n.length = n.data.length > 1 ? n.data.reduce((pre, cur) => pre + patternObjs[cur], 0) : patternObjs[n.data[0]]
1141
- })
1142
- return {
1143
- barrier: index + 1,
1144
- length: y[0].length,
1145
- items: y.map(j => {
1146
- return {
1147
- ring: j.ring,
1148
- data: j.data
1149
- }
1150
- })
1151
- }
1152
- })
1153
- item.barriers = ret
1154
- }
1155
- })
1156
- },
1157
- tranform (arr) { // 分barrier
1158
- let newMap = new Map()
1159
- arr.forEach(({id, current}) => {
1160
- const find = newMap.get(current.join())
1161
- if (find) newMap.get(current.join()).push(id)
1162
- else newMap.set(current.join(), [id])
1163
- })
1164
- let ret = []
1165
- newMap.forEach((value, key) => {
1166
- ret.push(Array.from(new Set(key.split(',').map(Number).concat(value))))
1167
- })
1168
- const result = []
1169
- for (const a of ret) {
1170
- let merged = false
1171
- for (const r of result) {
1172
- if (this.check([...r], a)) {
1173
- a.forEach(item => r.add(item))
1174
- merged = true
1175
- }
1176
- }
1177
- if (!merged) {
1178
- result.push(new Set(a))
1179
- }
1180
- merged = false
1181
- }
1182
- return result.map(s => [...s])
1183
- },
1184
- check (arr1, arr2) {
1185
- return arr1.some(a1 => arr2.some(a2 => a1 === a2))
1186
- },
1187
- step1 (list, arr) { // 各个环包含的相位
1188
- const ret = []
1189
- const listObj = {}
1190
- list.forEach(l => {
1191
- listObj[l.id] = l.ring
1192
- })
1193
- arr.forEach(a => {
1194
- const retItem = []
1195
- a.forEach(b => {
1196
- if (listObj[b]) {
1197
- const find = retItem.find(r => r.ring === listObj[b])
1198
- if (find) find.data.push(b)
1199
- else retItem.push({ring: listObj[b], data: [b]})
1200
- }
1201
- })
1202
- ret.push(retItem)
1203
- })
1204
- return ret
1205
- },
1206
- step2 (newArr, pattern) { // 不同环并发相位做比较
1207
- let ret = []
1208
- let max = 0
1209
- const patternObj = {}
1210
- pattern.forEach(l => {
1211
- // if (l.mode !== 7) {
1212
- patternObj[l.id] = l.value
1213
- // }
1214
- })
1215
- let barrierCycle = newArr.map(item => {
1216
- return Math.max.apply(Math, item.map(k => { return k.length }))
1217
- })
1218
- barrierCycle.forEach((b, index) => {
1219
- if (index === 0) {
1220
- ret.push(barrierCycle[index])
1221
- } else {
1222
- if (max) {
1223
- max = barrierCycle[index] + max
1224
- } else {
1225
- max = barrierCycle[index] + barrierCycle[index - 1]
1226
- }
1227
- ret.push(max)
1228
- }
1229
- })
1230
- return ret
1231
- },
1232
- fillGap (newArr, pattern) {
1233
- this.newPatterns = []
1234
- const patternObj = {}
1235
- pattern.forEach(l => {
1236
- l.map(k => {
1237
- // if (k.mode !== 7) {
1238
- patternObj[k.id] = k.value
1239
- // }
1240
- })
1241
- })
1242
- let newMax = []
1243
- let newMin = []
1244
- newArr.forEach((na, index) => {
1245
- if (!na || na.length === 0) return
1246
- na.map(n => {
1247
- n.length = n.data.length > 1 ? n.data.reduce((pre, cur) => pre + patternObj[cur], 0) : patternObj[n.data[0]]
1248
- })
1249
- let maxNum = Math.max.apply(Math, na.map(item => { return item.length }))
1250
- let minNum = Math.min.apply(Math, na.map(item => { return item.length }))
1251
- newMax.push(maxNum)
1252
- newMin.push(minNum)
1253
- let newmaxNum = Math.max.apply(Math, newMax)// 每组最大值
1254
- let newminNum = Math.min.apply(Math, newMin)
1255
- this.newCycle = newmaxNum + newminNum
1256
- if (newmaxNum === newminNum) {
1257
- this.max = newmaxNum + newminNum
1258
- pattern.map(d => {
1259
- d.map(r => {
1260
- if (r.sum) {
1261
- delete r.sum
1262
- }
1263
- })
1264
- })
1265
- }
1266
- if (maxNum === minNum) {
1267
- na.map(n => {
1268
- pattern.map(h => {
1269
- h.map(d => {
1270
- if (d.id === n.data[1] && d.sum) {
1271
- delete d.sum
1272
- }
1273
- })
1274
- })
1275
- })
1276
- } else {
1277
- na.map(n => {
1278
- if (n.length === maxNum) {
1279
- pattern.map(h => {
1280
- h.map(d => {
1281
- if (n.data.length > 1) {
1282
- if (d.id === n.data[1]) {
1283
- delete d.sum
1284
- }
1285
- } else {
1286
- if (d.id === n.data[0]) {
1287
- delete d.sum
1288
- }
1289
- }
1290
- })
1291
- })
1292
- }
1293
- })
1294
- }
1295
- na.forEach((value, index, array) => {
1296
- if (value.length !== maxNum) {
1297
- let newNa = []
1298
- newNa.push(value)
1299
- newNa.forEach(m => {
1300
- let sum = Number(maxNum - m.length)
1301
- pattern.filter((i) => {
1302
- i.map(j => {
1303
- if (m.data.length > 1) {
1304
- if (j.id === m.data[1]) {
1305
- j.sum = sum
1306
- }
1307
- } else {
1308
- if (j.id === m.data[0]) {
1309
- j.sum = sum
1310
- }
1311
- }
1312
- })
1313
- })
1314
- })
1315
- }
1316
- let mapAdd = pattern.map(item => {
1317
- return item.map(val => {
1318
- return val.value + (val.sum ? val.sum : 0)
1319
- })
1320
- })
1321
- let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
1322
- return item.length > 0 ? item.reduce((a, b) => {
1323
- return a + b
1324
- }) : 0
1325
- }) : 0
1326
- this.max = Math.max(...maxCycle)// 每个环的周期最大值
1327
- })
1328
- })
1329
- }
1330
- }
1331
- }
1332
- </script>
1333
- <style lang="scss">
1334
- // el-tooltip样式
1335
- .el-tooltip__popper.is-light {
1336
- background: #299BCC !important;
1337
- border: 1px solid #299BCC !important;
1338
- color: #FFFFFF !important;
1339
- }
1340
- .el-tooltip__popper.is-light[x-placement^="top"] .popper__arrow {
1341
- border-top-color: #299BCC !important;
1342
- }
1343
- .el-tooltip__popper.is-light[x-placement^="top"] .popper__arrow::after {
1344
- border-top-color: #299BCC !important;
1345
- }
1346
- </style>
1347
- <style lang="scss" scoped>
1348
- .main-patternstatus {
1349
- position: relative;
1350
- margin-bottom: 20px;
1351
- }
1352
- .main-patternstatus {
1353
- position: relative;
1354
- .ring-first {
1355
- margin-top: 1px;
1356
- width: 100%;
1357
- height: 34px;
1358
- }
1359
- .first-1 {
1360
- float: left;
1361
- // text-align: center;
1362
- }
1363
- // .ring-num {
1364
- // float: left;
1365
- // margin-top:7px;
1366
- // margin-left: 5px;
1367
- // font-size: 14px;
1368
- // font-weight: normal;
1369
- // font-stretch: normal;
1370
- // line-height: 22px;
1371
- // letter-spacing: 0px;
1372
- // color: #ffffff;
1373
- // }
1374
- .box {
1375
- text-align: center;
1376
- // float: left;
1377
- // margin-left: 6px;
1378
- // margin-right: 10px;
1379
- }
1380
- .ring-nums {
1381
- // float: left;
1382
- // margin-top:7px;
1383
- // margin-left: 5px;
1384
- font-size: 12px;
1385
- height: 14px;
1386
- font-weight: normal;
1387
- font-stretch: normal;
1388
- // line-height: 22px;
1389
- letter-spacing: 0px;
1390
- color: #333333;
1391
- }
1392
- .ring-phase {
1393
- position: relative;
1394
- float: left;
1395
- // margin-left: 5px;
1396
- height: 34px;
1397
- width: 36px;
1398
- z-index: 999;
1399
- background: rgba(30, 96, 12, 0.2);
1400
- // margin-top:1px;
1401
- }
1402
- .ring-phase::after {
1403
- position: absolute;
1404
- display: block;
1405
- content: '';
1406
- height: 0;
1407
- width: 0;
1408
- top: 11px;
1409
- left: 36px;
1410
- border: 5px solid transparent;
1411
- border-left-color: rgba(30, 96, 12, 0.2);
1412
- }
1413
- .divider {
1414
- position: absolute;
1415
- top: -10px;
1416
- // left: 370px;
1417
- width: 3px;
1418
- // height: 99px;
1419
- z-index: 999;
1420
- background-color:#B9BABF;
1421
- }
1422
- // .curTimeLine {
1423
- // position: absolute;
1424
- // top: -10px;
1425
- // width: 4px;
1426
- // background-color: black;
1427
- // }
1428
- // .curTimeDiv {
1429
- // position: absolute;
1430
- // z-index:50;
1431
- // top: -21px;
1432
- // margin-left: -10px;
1433
- // text-align:center;
1434
- // vertical-align: middle;
1435
- // width: 60px;
1436
- // height: 19px;
1437
- // color:black;
1438
- // // background-color: black;
1439
- // }
1440
- }
1441
- .ring-first {
1442
- margin-top: 1px;
1443
- width: 100%;
1444
- height: 34px;
1445
- }
1446
- .direction {
1447
- filter: brightness(70%);
1448
- }
1449
- .masks {
1450
- background: rgb(242, 121, 121) !important;
1451
- }
1452
- .first-1 {
1453
- float: left;
1454
- // text-align: center;
1455
- }
1456
- </style>
1
+ /**
2
+ * Copyright (c) 2020 kedacom
3
+ * OpenATC is licensed under Mulan PSL v2.
4
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
+ * You may obtain a copy of Mulan PSL v2 at:
6
+ * http://license.coscl.org.cn/MulanPSL2
7
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
+ * See the Mulan PSL v2 for more details.
11
+ **/
12
+ <template>
13
+ <div class="main-patternstatus">
14
+ <!-- 环模式true -->
15
+ <div v-if="this.contrloType === 'ring' || !this.contrloType">
16
+ <div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
17
+ <div style="position: relative;" :style="{'height': '34px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode===7?'direction': ''">
18
+ <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#7ccc66'}">
19
+ <el-tooltip placement="top-start" effect="light">
20
+ <div slot="content">P{{item.id}}:{{item.split}}</div>
21
+ <div style="cursor:pointer;">
22
+ <div class="ring-phase">
23
+ <!-- <patternwalksvg :showWalk="item.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
24
+ <xdrdirselector Width="60px" Height="60px" Widths="50px" Heights="50px" :showlist="item.direction"></xdrdirselector>
25
+ </div>
26
+ <div class="box" style="position: absolute; left:40px;top: -1px;">
27
+ <div class="ring-nums">P{{item.id}}</div>
28
+ <div class="ring-nums">{{item.split}}</div>
29
+ </div>
30
+ </div>
31
+ </el-tooltip>
32
+ <div style="width:50px;" v-for="(bus,index3) in busPhaseData" :key="index3">
33
+ <i class="iconfont icon-lukouzhilu" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 1 && bus.phaseid===item.id"></i>
34
+ <i class="iconfont icon-BRT" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 4 && bus.phaseid===item.id"></i>
35
+ <i class="iconfont icon-xuxiangwei-xin" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 99 && bus.phaseid===item.id"></i>
36
+ <i class="iconfont icon-feijidongche" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 6 && bus.phaseid===item.id"></i>
37
+ <i class="iconfont icon-gongjiaoche" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 3 && bus.phaseid===item.id"></i>
38
+ <i class="iconfont icon-youguidianche" style="position: absolute;top: 8px;left:70px;font-size:12px;color:#454545;" v-if="bus.controltype === 5 && bus.phaseid===item.id"></i>
39
+ </div>
40
+ </div>
41
+ <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.flashgreen.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','float':'left','background': 'linear-gradient(to right, #ffffff 50%, #7ccc66 0)','background-size': '4px 100%'}"></div>
42
+ <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.yellowWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f9dc6a'}"></div>
43
+ <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.redWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f27979'}"></div>
44
+ </div>
45
+ </div>
46
+ <div v-if="showBarrier">
47
+ <div v-for="(item, index) in barrierList" :key="index + '1'">
48
+ <div class="divider" :style="{'left':item, 'height':barrierHeight}"></div>
49
+ </div>
50
+ </div>
51
+ <div v-show="(this.curtime>0 && cycle && cycle>0) || (this.curtime>0 && newCycle && newCycle>0)">
52
+ <div class="curTimeDiv" :style="{'left':paddingLeft }">{{ timeNumDevide }}</div>
53
+ <div class="curTimeLine" :style="{'left':paddingLeft, 'height':barrierHeight}"></div>
54
+ </div>
55
+ </div>
56
+ <div v-if="this.contrloType === 'stage'">
57
+ <div v-for="(list, index1) in stageLists" :key="index1">
58
+ <!-- <div> -->
59
+ <div class="first-1" :style="{'width':list.greenWidth,'height':'34px','position':'relative','background':'#7ccc66'}">
60
+ <el-tooltip placement="top-start" effect="light">
61
+ <div slot="content">
62
+ <span class="ring-nums" v-for="(pha,index) in list.phases" :key="index">
63
+ P{{pha}}
64
+ </span>
65
+ </div>
66
+ <div style="cursor:pointer;">
67
+ <div class="ring-phase">
68
+ <!-- <patternwalksvg :showWalk="list.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
69
+ <xdrdirselector v-if="list.direction&&list.direction.length>0" Width="60px" Height="60px" Widths="50px" Heights="50px" :showlist="list.direction"></xdrdirselector>
70
+ </div>
71
+ <div class="box" style="position: absolute; left:41px; top:-1px;">
72
+ <div class="ring-nums">S{{list.key+1}}</div>
73
+ <div class="ring-nums">{{list.stageSplit}}</div>
74
+ </div>
75
+ <!-- <div class="box" style="line-height:28px">
76
+ <span class="ring-nums" v-for="(pha,index) in list.phases" :key="index">
77
+ P:{{pha}}
78
+ </span>
79
+ </div> -->
80
+ </div>
81
+ </el-tooltip>
82
+ </div>
83
+ <!-- <div class="first-1" :style="{'width':item.flashgreen,'height':'34px','float':'left','background': 'linear-gradient(to right, #ffffff 50%, #7ccc66 0)','background-size': '4px 100%'}"></div> -->
84
+ <div class="first-1" :style="{'width':list.yellowWidth,'height':'34px','background':'#f9dc6a'}"></div>
85
+ <div class="first-1" :style="{'width':list.redWidth,'height':'34px','background':'#f27979'}"></div>
86
+ </div>
87
+ </div>
88
+ <!-- </div> -->
89
+ </div>
90
+ </template>
91
+ <script>
92
+ // import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
93
+ import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
94
+ // import PatternWalkSvg from '../IntersectionMap/crossDirection/baseImg/PatternWalkSvg'
95
+ import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
96
+ import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
97
+ export default {
98
+ name: 'pattern-list',
99
+ components: {
100
+ // patternwalksvg,
101
+ xdrdirselector
102
+ },
103
+ data () {
104
+ return {
105
+ barrierHeight: '',
106
+ barrierList: [],
107
+ newCycle: this.cycles,
108
+ patternIds: this.patternId,
109
+ newPatterns: [],
110
+ newList: [],
111
+ contrloCycle: 0,
112
+ sidewalkPhaseData: [],
113
+ // controlDatas: this.controlData,
114
+ max: '',
115
+ fixCycle: '',
116
+ curtime: 0,
117
+ stageLists: [],
118
+ busPhaseData: [], // 公交相位数据
119
+ patternInfo: []
120
+ }
121
+ },
122
+ props: {
123
+ cycleChange: {
124
+ type: Boolean,
125
+ default: true
126
+ },
127
+ stagesChange: {
128
+ type: Array
129
+ },
130
+ controlPhase: {
131
+ type: Object
132
+ },
133
+ contrloType: {
134
+ type: String
135
+ },
136
+ phaseList: {
137
+ type: Array
138
+ },
139
+ patternList: {
140
+ type: Array
141
+ },
142
+ showBarrier: {
143
+ type: Boolean,
144
+ default: false
145
+ },
146
+ localPatternList: {
147
+ type: Array
148
+ },
149
+ controlData: {
150
+ type: Object
151
+ },
152
+ showCondition: {
153
+ type: Boolean,
154
+ default: false
155
+ },
156
+ cycle: {
157
+ type: Number
158
+ },
159
+ agentId: {
160
+ type: String
161
+ },
162
+ cycles: {
163
+ type: Number
164
+ },
165
+ patternId: {
166
+ type: Number
167
+ },
168
+ patternStatusList: {
169
+ type: Array
170
+ },
171
+ syncTime: {
172
+ type: Number
173
+ }
174
+ },
175
+ computed: {
176
+ paddingLeft () {
177
+ let res = '0%'
178
+ if (this.contrloCycle > 0) {
179
+ let curPercent = this.curtime / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
180
+ res = curPercent * 100 + '%'
181
+ }
182
+ if (this.cycles > 0) {
183
+ let curPercent = this.curtime / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
184
+ res = curPercent * 100 + '%'
185
+ }
186
+ return res
187
+ },
188
+ timeNumDevide () {
189
+ if (this.contrloCycle > 0) {
190
+ // let res = (this.contrloCycle - this.syncTime) + '/' + this.contrloCycle
191
+ // let res = this.curtime + '/' + (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
192
+ let res = this.curtime
193
+ return res
194
+ }
195
+ if (this.cycles > 0) {
196
+ // let res = (this.cycles - this.syncTime) + '/' + this.cycles
197
+ // let res = this.curtime + '/' + (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
198
+ let res = this.curtime
199
+ return res
200
+ }
201
+ }
202
+ },
203
+ watch: {
204
+ controlPhase: {
205
+ handler: function (val, oldVal) {
206
+ if (this.controlPhase && this.controlPhase.curTime) {
207
+ this.curtime = this.controlPhase.curTime
208
+ }
209
+ },
210
+ // 深度观察监听
211
+ deep: true
212
+ },
213
+ controlData: {
214
+ handler: function (val, oldVal) {
215
+ if (this.contrloType === 'stage') {
216
+ this.getIndexStage()
217
+ }
218
+ // this.controlDatas = this.controlData
219
+ this.getPedPhasePos()
220
+ if (this.localPatternList) {
221
+ this.max = ''
222
+ let idPattern = this.localPatternList.filter(item => item.id === this.controlData.patternid)
223
+ if (idPattern.length === 0 || (this.controlData && this.showCondition)) {
224
+ this.handleTentivePatternData()
225
+ } else {
226
+ this.handlePatternData()
227
+ }
228
+ this.handleBarrierHeight()
229
+ }
230
+ if (!this.controlData.curTime) return
231
+ this.curtime = this.controlData.curTime
232
+ },
233
+ // 深度观察监听
234
+ deep: true
235
+ },
236
+ cycleChange: {
237
+ handler: function (val, oldVal) {
238
+ this.getStage()
239
+ this.handleCurrentChange(this.patternStatusList)
240
+ this.handleBarrierHeight()
241
+ },
242
+ // 深度观察监听
243
+ deep: true
244
+ },
245
+ phaseList: {
246
+ handler: function (val, oldVal) {
247
+ this.getPedPhasePos()
248
+ this.getBusPos()
249
+ this.getStage()
250
+ // this.handlePatternData()
251
+ },
252
+ // 深度观察监听
253
+ deep: true
254
+ },
255
+ agentId: {
256
+ handler: function (val, oldVal) {
257
+ this.getBusPos()
258
+ },
259
+ // 深度观察监听
260
+ deep: true
261
+ },
262
+ patternId: {
263
+ handler: function (val, oldVal) {
264
+ this.patternIds = this.patternId
265
+ },
266
+ // 深度观察监听
267
+ deep: true
268
+ },
269
+ cycles: {
270
+ handler: function (val, oldVal) {
271
+ this.newCycle = this.cycles
272
+ },
273
+ // 深度观察监听
274
+ deep: true
275
+ },
276
+ contrloType: {
277
+ handler: function (val, oldVal) {
278
+ if (this.contrloType === 'stage') {
279
+ this.getStage()
280
+ }
281
+ },
282
+ // 深度观察监听
283
+ deep: true
284
+ },
285
+ stagesChange: {
286
+ handler: function (val, oldVal) {
287
+ if (this.contrloType === 'stage') {
288
+ this.getStage()
289
+ }
290
+ },
291
+ // 深度观察监听
292
+ deep: true
293
+ },
294
+ patternStatusList: {
295
+ handler: function (val, oldVal) {
296
+ this.handleBarrierHeight() // 计算屏障高度
297
+ if (this.patternStatusList && this.newCycle) {
298
+ setTimeout(() => {
299
+ this.handleCurrentChange(this.patternStatusList)
300
+ this.handleBarrierHeight()
301
+ }, 10)
302
+ this.handleBarrierHeight()
303
+ }
304
+ },
305
+ // 深度观察监听
306
+ deep: true
307
+ }
308
+ },
309
+ created () {
310
+ this.globalParamModel = this.$store.getters.globalParamModel
311
+ if (this.patternStatusList && this.newCycle && !this.controlData) {
312
+ setTimeout(() => {
313
+ this.handleCurrentChange(this.patternStatusList)
314
+ this.handleBarrierHeight()
315
+ }, 400)
316
+ } else if ((this.controlData && this.controlData.patternid === 109) || (this.controlData && this.showCondition) || (this.controlData && this.localPatternList.length === 0)) {
317
+ this.handleTentivePatternData()
318
+ } else {
319
+ this.handlePatternData()
320
+ }
321
+ this.PhaseDataModel = new PhaseDataModel()
322
+ this.CrossDiagramMgr = new CrossDiagramMgr()
323
+ this.getPedPhasePos()
324
+ this.getBusPos()
325
+ if (this.contrloType === 'stage') {
326
+ this.getStage()
327
+ }
328
+ },
329
+ methods: {
330
+ getPed (data) {
331
+ let ped = []
332
+ for (let stg of data) {
333
+ let peddirections = []
334
+ let currPhase = this.phaseList.filter((item) => {
335
+ return item.id === stg
336
+ })[0]
337
+ if (!currPhase) return
338
+ if (!currPhase.peddirection) return
339
+ for (let walk of this.sidewalkPhaseData) {
340
+ for (let ped of currPhase.peddirection) {
341
+ if (stg === walk.phaseid) {
342
+ let obj = {}
343
+ obj.name = walk.name
344
+ obj.id = walk.id
345
+ if (ped === walk.id) {
346
+ peddirections.push(obj)
347
+ peddirections = Array.from(new Set(peddirections))
348
+ }
349
+ }
350
+ }
351
+ }
352
+ ped.push(...peddirections)
353
+ }
354
+ return ped
355
+ },
356
+ handleStageData (data) {
357
+ if (!data) return
358
+ let peddirections = this.getPed(data)
359
+ let stagesTemp = []
360
+ let tempList = []
361
+ for (let stg of data) {
362
+ let directionList = []
363
+ let currPhase = this.phaseList.filter((item) => {
364
+ return item.id === stg
365
+ })[0]
366
+ if (currPhase !== undefined) {
367
+ directionList.push(...currPhase.direction)
368
+ directionList = Array.from(new Set(directionList))
369
+ }
370
+ if (directionList.length === 0) {
371
+ tempList.push({
372
+ id: '',
373
+ color: '#454545',
374
+ peddirection: peddirections
375
+ })
376
+ } else {
377
+ tempList = directionList.map(dir => ({
378
+ id: dir,
379
+ color: '#454545',
380
+ peddirection: peddirections
381
+ }))
382
+ }
383
+ let newTemp = tempList.filter(item => item.id !== '')
384
+ stagesTemp.push(...newTemp)
385
+ }
386
+ return stagesTemp
387
+ },
388
+ getIndexStage () {
389
+ if (this.localPatternList.length === 0) return
390
+ for (let i = 0; i < this.localPatternList.length; i++) {
391
+ if (this.controlData.patternid === this.localPatternList[i].id) {
392
+ if (!this.localPatternList[i].stagesList) return
393
+ let stageCycleList = this.localPatternList[i].stagesList.map(item => {
394
+ return item.stageSplit ? item.stageSplit : 0
395
+ })
396
+ let stageMaxCyle = stageCycleList.reduce((a, b) => {
397
+ return a + b
398
+ }, 0)
399
+ this.stageLists = this.localPatternList[i].stagesList.map(item => {
400
+ return {
401
+ ...item,
402
+ // peddirection: this.getPed(item.phases ? item.phases : item.stages),
403
+ direction: this.handleStageData(item.phases ? item.phases : item.stages),
404
+ greenWidth: (item.green / stageMaxCyle * 100).toFixed(3) + '%',
405
+ yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
406
+ redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
407
+ }
408
+ })
409
+ }
410
+ }
411
+ },
412
+ getStage () {
413
+ if (!this.stagesChange) return
414
+ const globalParamModel = this.$store.getters.globalParamModel
415
+ let pattern = globalParamModel.getParamsByType('patternList')
416
+ let mapAdd = pattern.map(item => item.stagesList).map(item => {
417
+ return item.map(val => {
418
+ return val.stageSplit
419
+ })
420
+ })
421
+ let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
422
+ return item.length > 0 ? item.reduce((a, b) => {
423
+ return a + b
424
+ }) : 0
425
+ }) : 0
426
+ let stageMaxCyle = Math.max(...maxCycle)// 每个环的周期最大值
427
+ if (!this.cycleChange) {
428
+ let stageCycleList = this.stagesChange.map(item => {
429
+ return item.stageSplit ? item.stageSplit : 0
430
+ })
431
+ stageMaxCyle = stageCycleList.reduce((a, b) => {
432
+ return a + b
433
+ }, 0)
434
+ }
435
+ this.stageLists = this.stagesChange.map(item => {
436
+ return {
437
+ ...item,
438
+ // peddirection: this.getPed(item.phases ? item.phases : item.stages),
439
+ direction: this.handleStageData(item.phases ? item.phases : item.stages),
440
+ greenWidth: ((item.stageSplit - item.yellow - item.red) / stageMaxCyle * 100).toFixed(3) + '%',
441
+ yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
442
+ redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
443
+ }
444
+ })
445
+ },
446
+ getBusPos () {
447
+ // 公交相位信息
448
+ this.busPhaseData = []
449
+ this.phaseList.forEach((ele, i) => {
450
+ // if (ele.controltype >= 3 && ele.controltype <= 5) {
451
+ // ele.direction.forEach((dir, index) => {
452
+ // 车道相位
453
+ this.busPhaseData.push({
454
+ phaseid: ele.id, // 相位did,用于对应相位状态
455
+ // id: dir, // 接口返回的dir字段,对应前端定义的相位方向id,唯一标识
456
+ // name: this.PhaseDataModel.getBusPhasePos(dir).name,
457
+ controltype: ele.controltype
458
+ })
459
+ // })
460
+ // }
461
+ })
462
+ let result = []
463
+ let obj = {}
464
+ for (var i = 0; i < this.busPhaseData.length; i++) {
465
+ if (!obj[this.busPhaseData[i].phaseid]) {
466
+ result.push(this.busPhaseData[i])
467
+ obj[this.busPhaseData[i].phaseid] = true
468
+ }
469
+ }
470
+ this.busPhaseData = result
471
+ },
472
+ getPedPhasePos () {
473
+ // 行人相位信息
474
+ this.sidewalkPhaseData = []
475
+ this.phaseList.forEach((ele, i) => {
476
+ if (ele.peddirection) {
477
+ ele.peddirection.forEach((dir, index) => {
478
+ // 行人相位
479
+ if (this.PhaseDataModel.getSidePos(dir)) {
480
+ this.sidewalkPhaseData.push({
481
+ key: this.CrossDiagramMgr.getUniqueKey('pedphase'),
482
+ phaseid: ele.id, // 相位id,用于对应相位状态
483
+ id: dir,
484
+ name: this.PhaseDataModel.getSidePos(dir).name
485
+ })
486
+ }
487
+ })
488
+ }
489
+ })
490
+ },
491
+ handleTentivePatternData () {
492
+ if (!this.controlData) return
493
+ this.newList = []
494
+ if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
495
+ if (!this.controlData.phase) return
496
+ // let cycle = this.controlData.cycle
497
+ if (!this.controlData.rings) return
498
+ let newValue = []
499
+ for (let rings of this.controlData.rings) {
500
+ let phase = this.controlData.phase
501
+ // let list = []
502
+ let obj = {}
503
+ for (let key in rings.sequence) {
504
+ obj[key] = rings.sequence[key]
505
+ }
506
+ let newObj = Object.keys(obj).map(val => ({
507
+ id: obj[val]
508
+ }))
509
+ newValue.push(newObj)
510
+ for (let sequ of rings.sequence) {
511
+ let obj = {}
512
+ obj.id = sequ
513
+ let split = phase.filter((item) => {
514
+ return item.id === sequ
515
+ })[0].split
516
+ newValue.map(d => {
517
+ d.map(r => {
518
+ if (r.id === sequ) {
519
+ r.value = split
520
+ }
521
+ })
522
+ })
523
+ }
524
+ }
525
+ this.handleTentative(newValue)
526
+ },
527
+ handleTentative (val) {
528
+ if (val === null || val.length === 0) return
529
+ // 周期以实际的绿信比来计算
530
+ let valSplit = val.map(item => {
531
+ return item.map(val => {
532
+ return val.value + (val.sum ? val.sum : 0)
533
+ })
534
+ })
535
+ let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
536
+ return item.length > 0 ? item.reduce((a, b) => {
537
+ return a + b
538
+ }) : 0
539
+ }) : 0
540
+ let cycle = Math.max(...splitCycle)// 每个环的周期最大值
541
+ this.contrloCycle = cycle
542
+ this.patternInfo = []
543
+ let currentArr = []
544
+ let newPattern = []
545
+ val.map(i => {
546
+ newPattern.push(...i)
547
+ })
548
+ if (this.phaseList.length === 0) return
549
+ for (let patternStatus of val[0]) {
550
+ // if (patternStatus.mode !== 7) {
551
+ let concurrent = this.phaseList.filter((item) => {
552
+ return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
553
+ })[0].concurrent// 当前相位的并发相位
554
+ if (concurrent) {
555
+ let obj = {
556
+ id: patternStatus.id,
557
+ current: concurrent.sort()
558
+ }
559
+ currentArr.push(obj)
560
+ }
561
+ // }
562
+ }
563
+ if (currentArr.length !== 0) {
564
+ let newCurrent = this.tranform(currentArr)
565
+ let ringTeam = this.step1(this.phaseList, newCurrent)
566
+ this.fillGap(ringTeam, val)
567
+ }
568
+ // let cycle = this.controlData.cycle
569
+ for (let rings of val) {
570
+ if (rings.length === 0) continue
571
+ let list = []
572
+ for (let ring of rings) {
573
+ if (ring.value === 0) continue
574
+ let obj = {}
575
+ let split = ring.value
576
+ obj.id = ring.id
577
+ // obj.split = split
578
+ let currPhase = this.phaseList.filter((item) => {
579
+ if (item.id === ring.id && item.controltype === 99) {
580
+ obj.controltype = item.controltype
581
+ }
582
+ return item.id === ring.id
583
+ })[0]
584
+ if (!currPhase) return
585
+ let peddirections = []
586
+ for (let walk of this.sidewalkPhaseData) {
587
+ if (currPhase.peddirection) {
588
+ for (let ped of currPhase.peddirection) {
589
+ // if (stg === walk.phaseid) {
590
+ let objs = {}
591
+ objs.name = walk.name
592
+ objs.id = walk.id
593
+ if (ped === walk.id) {
594
+ peddirections.push(objs)
595
+ peddirections = Array.from(new Set(peddirections))
596
+ }
597
+ // }
598
+ }
599
+ } else {
600
+ peddirections = []
601
+ }
602
+ }
603
+ if (ring.desc && ring.desc.length > 0) {
604
+ obj.direction = ring.desc.map(item => { // 虚相位desc为空
605
+ return {
606
+ id: item.id,
607
+ color: '#454545'
608
+ }
609
+ })
610
+ } else {
611
+ if (currPhase.direction && currPhase.direction.length > 0) {
612
+ obj.direction = currPhase.direction.map(item => {
613
+ return {
614
+ id: item,
615
+ peddirection: peddirections,
616
+ color: '#454545'
617
+ }
618
+ })
619
+ } else {
620
+ obj.direction = [
621
+ {
622
+ id: '',
623
+ color: '#454545',
624
+ peddirection: peddirections
625
+ }
626
+ ]
627
+ }
628
+ }
629
+ obj.split = split
630
+ obj.cycle = cycle
631
+ if (ring.sum) {
632
+ obj.sum = ring.sum
633
+ obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
634
+ } else {
635
+ obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100) + '%'
636
+ }
637
+ obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100) + '%'
638
+ obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100) + '%'
639
+ obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100) + '%'
640
+ // 忽略相位不显示
641
+ // let mode = ring.mode
642
+ // if (mode !== 7) { // 忽略相位不显示
643
+ list.push(obj)
644
+ // }
645
+ }
646
+ this.patternInfo.push(list)
647
+ }
648
+ },
649
+ handlePatternData () {
650
+ if (!this.controlData) return
651
+ // this.newList = []
652
+ if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
653
+ if (!this.controlData.phase) return
654
+ if (!this.controlData.rings) return
655
+ let nowPattern = this.localPatternList.filter(item => {
656
+ return item.id === this.controlData.patternid
657
+ })[0].rings
658
+ // 信号机忽略相位,更新最新的相位信息
659
+ let filterPattern = []
660
+ for (let i of nowPattern) {
661
+ for (let j of this.controlData.rings) {
662
+ let filterSequence = i.filter(item => j.sequence.includes(item.id))
663
+ if (filterSequence.length > 0) {
664
+ filterPattern.push(filterSequence)
665
+ }
666
+ }
667
+ }
668
+ for (let rings of this.controlData.rings) {
669
+ for (let sequ of rings.sequence) {
670
+ let split = this.controlData.phase.filter((item) => {
671
+ return item.id === sequ
672
+ })[0].split
673
+ filterPattern.map(d => {
674
+ return d.map(r => {
675
+ if (r.id === sequ) {
676
+ r.value = split
677
+ }
678
+ })
679
+ })
680
+ }
681
+ }
682
+ this.handleOverViewChange(filterPattern)
683
+ },
684
+ handleBarrierHeight () { // 屏障高度
685
+ if (!this.patternInfo) return
686
+ let patternLength = this.patternInfo.length
687
+ this.barrierHeight = (patternLength * 35 + 21) + 'px'
688
+ },
689
+ handleOverViewChange (val) {
690
+ if (val === null || val.length === 0) return
691
+ // 周期以实际的绿信比来计算
692
+ let valSplit = val.map(item => {
693
+ return item.map(val => {
694
+ return val.value + (val.sum ? val.sum : 0)
695
+ })
696
+ })
697
+ let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
698
+ return item.length > 0 ? item.reduce((a, b) => {
699
+ return a + b
700
+ }) : 0
701
+ }) : 0
702
+ let cycle = Math.max(...splitCycle)// 每个环的周期最大值
703
+ this.contrloCycle = cycle
704
+ // 按环序分组
705
+ let ringlength = []
706
+ let ringsequence = val.map(item => {
707
+ if (item.length === 0) return
708
+ ringlength.push(item.length)
709
+ return item.map(k => {
710
+ return k.id
711
+ })
712
+ })
713
+ let newRings = ringsequence.filter(item => item)
714
+ let minLength = Math.min(...ringlength)
715
+ let resultArrs = [] // 环1分组
716
+ let resultArr = [] // 环2分组
717
+ for (let j = 0; j < ringsequence[0].length; j += minLength) {
718
+ resultArrs.push(ringsequence[0].slice(j, j + minLength))
719
+ if (ringsequence[0].length === minLength) {
720
+ resultArrs.push([])
721
+ }
722
+ }
723
+ if (newRings.length > 1) {
724
+ for (let i = 0; i < ringsequence[1].length; i += minLength) {
725
+ resultArr.push(ringsequence[1].slice(i, i + minLength))
726
+ }
727
+ }
728
+ this.patternInfo = []
729
+ let currentArr = []
730
+ let newPattern = []
731
+ val.map(i => {
732
+ newPattern.push(...i)
733
+ })
734
+ if (this.phaseList.length === 0) return
735
+ for (let patternStatus of val[0]) {
736
+ // if (patternStatus.mode !== 7) {
737
+ let concurrent = this.phaseList.filter((item) => {
738
+ return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
739
+ })[0].concurrent// 当前相位的并发相位
740
+ if (concurrent) {
741
+ let obj = {
742
+ id: patternStatus.id,
743
+ current: concurrent.sort()
744
+ }
745
+ currentArr.push(obj)
746
+ }
747
+ // }
748
+ }
749
+ if (currentArr.length !== 0) {
750
+ let newCurrent = this.tranform(currentArr)
751
+ // 取没个环与环关系的并集
752
+ let barrierRing1 = []
753
+ let barrierRing2 = []
754
+ let ring1 = [] // 环1与关系1的并集
755
+ for (let h = 0; h < newCurrent.length; h++) {
756
+ let adds = [...new Set(resultArrs[0])].filter(item => newCurrent[h].includes(item))
757
+ ring1.push(adds)
758
+ }
759
+ let ring1s = [] // 环1与关系2的并集
760
+ for (let h = 0; h < newCurrent.length; h++) {
761
+ let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
762
+ ring1s.push(addRing1)
763
+ }
764
+ barrierRing1.push(...ring1, ...ring1s)
765
+ let resultList = []
766
+ if (newRings.length > 1) {
767
+ let ring2s = [] // 环2与关系1的并集
768
+ for (let h = 0; h < newCurrent.length; h++) {
769
+ let addRing2 = [...new Set(resultArr[1])].filter(item => newCurrent[h].includes(item))
770
+ ring2s.push(addRing2)
771
+ }
772
+ let ring2 = [] // 环2与关系1的并集
773
+ for (let h = 0; h < newCurrent.length; h++) {
774
+ let add = [...new Set(resultArr[0])].filter(item => newCurrent[h].includes(item))
775
+ ring2.push(add)
776
+ }
777
+ barrierRing2.push(...ring2, ...ring2s)
778
+ for (let k = 0; k < barrierRing1.length; k++) {
779
+ resultList.push(barrierRing1[k].concat(barrierRing2[k]))
780
+ }
781
+ }
782
+ let resultLists = resultList.filter(item => item.length !== 0)
783
+ let ringArr = []
784
+ for (let l = 0; l < resultLists.length; l++) {
785
+ for (let d = 0; d < newCurrent.length; d++) {
786
+ if (newCurrent[d].filter(item => resultLists[l].includes(item)).length > 0) {
787
+ ringArr.push({
788
+ data: resultLists[l],
789
+ id: d + 1,
790
+ index: l
791
+ })
792
+ }
793
+ }
794
+ }
795
+ for (var i = 0; i < ringArr.length; i++) {
796
+ for (var j = i + 1; j < ringArr.length; j++) {
797
+ if (ringArr[i].id === ringArr[j].id && ringArr[i].index + 1 === ringArr[j].index) {
798
+ ringArr[i].data = ringArr[i].data.concat(ringArr[j].data)
799
+ ringArr.splice(ringArr.indexOf(ringArr[j].id), 1)
800
+ }
801
+ }
802
+ }
803
+ let resArr = ringArr.map(item => item.data)
804
+ let ringTeam = this.step1(this.phaseList, resArr)
805
+ let ringTeams = ringTeam.filter(item => item.length !== 0)
806
+ this.fillGap(ringTeams, val)
807
+ // 总览添加屏障
808
+ let newPattern = []
809
+ val.map(i => {
810
+ newPattern.push(...i)
811
+ })
812
+ let barrier = this.step2(ringTeams, newPattern)
813
+ let barrierLeft = barrier.map(item => item - 0.3)
814
+ this.barrierList = barrierLeft.map(j => {
815
+ return (j / (this.max ? this.max : this.contrloCycle) * 100) + '%'
816
+ })
817
+ }
818
+ // let cycle = this.controlData.cycle
819
+ for (let rings of val) {
820
+ if (rings.length === 0) continue
821
+ let list = []
822
+ for (let ring of rings) {
823
+ if (ring.value === 0) continue
824
+ let obj = {}
825
+ let split = ring.value
826
+ obj.id = ring.id
827
+ obj.mode = ring.mode
828
+ // obj.split = split
829
+ let currPhase = this.phaseList.filter((item) => {
830
+ if (item.id === ring.id && item.controltype === 99) {
831
+ obj.controltype = item.controltype
832
+ }
833
+ return item.id === ring.id
834
+ })[0]
835
+ if (!currPhase) return
836
+ let peddirections = []
837
+ for (let walk of this.sidewalkPhaseData) {
838
+ if (currPhase.peddirection) {
839
+ for (let ped of currPhase.peddirection) {
840
+ // if (stg === walk.phaseid) {
841
+ let objs = {}
842
+ objs.name = walk.name
843
+ objs.id = walk.id
844
+ if (ped === walk.id) {
845
+ peddirections.push(objs)
846
+ peddirections = Array.from(new Set(peddirections))
847
+ }
848
+ // }
849
+ }
850
+ } else {
851
+ peddirections = []
852
+ }
853
+ }
854
+ if (ring.desc && ring.desc.length > 0) {
855
+ obj.direction = ring.desc.map(item => { // 虚相位desc为空
856
+ return {
857
+ id: item.id,
858
+ color: '#454545'
859
+ }
860
+ })
861
+ } else {
862
+ if (currPhase.direction && currPhase.direction.length > 0) {
863
+ obj.direction = currPhase.direction.map(item => {
864
+ return {
865
+ id: item,
866
+ peddirection: peddirections,
867
+ color: '#454545'
868
+ }
869
+ })
870
+ } else {
871
+ obj.direction = [
872
+ {
873
+ id: '',
874
+ color: '#454545',
875
+ peddirection: peddirections
876
+ }
877
+ ]
878
+ }
879
+ }
880
+ obj.split = split
881
+ obj.cycle = cycle
882
+ if (ring.sum) {
883
+ obj.sum = ring.sum
884
+ obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
885
+ } else {
886
+ obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100) + '%'
887
+ }
888
+ obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100) + '%'
889
+ obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100) + '%'
890
+ obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100) + '%'
891
+ // 忽略相位不显示
892
+ // let mode = ring.mode
893
+ // if (mode !== 7) { // 忽略相位不显示
894
+ list.push(obj)
895
+ // }
896
+ }
897
+ this.patternInfo.push(list)
898
+ }
899
+ },
900
+ handleCurrentChange (val) { // 两个ring的数据
901
+ if (val === null || val.length === 0) return
902
+ if (this.controlPhase && this.controlPhase.phase && this.controlPhase.phase[0].split) {
903
+ val.map(i => {
904
+ i.map(j => {
905
+ j.value = this.controlPhase.phase.filter(item => item.id === j.id)[0].split
906
+ })
907
+ })
908
+ }
909
+ // 按环序分组
910
+ let ringlength = []
911
+ let ringsequence = val.map(item => {
912
+ if (item.length === 0) return
913
+ ringlength.push(item.length)
914
+ return item.map(k => {
915
+ return k.id
916
+ })
917
+ })
918
+ let valSplit = val.map(item => {
919
+ return item.map(val => {
920
+ return val.value + (val.sum ? val.sum : 0)
921
+ })
922
+ })
923
+ let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
924
+ return item.length > 0 ? item.reduce((a, b) => {
925
+ return a + b
926
+ }) : 0
927
+ }) : 0
928
+ let cycle = Math.max(...splitCycle)// 每个环的周期最大值
929
+ this.fixCycle = cycle// 每个环的周期最大值
930
+ let newRings = ringsequence.filter(item => item)
931
+ let minLength = Math.min(...ringlength)
932
+ let resultArrs = [] // 环1分组
933
+ let resultArr = [] // 环2分组
934
+ for (let j = 0; j < ringsequence[0].length; j += minLength) {
935
+ resultArrs.push(ringsequence[0].slice(j, j + minLength))
936
+ if (ringsequence[0].length === minLength) {
937
+ resultArrs.push([])
938
+ }
939
+ }
940
+ if (newRings.length > 1) {
941
+ for (let i = 0; i < ringsequence[1].length; i += minLength) {
942
+ resultArr.push(ringsequence[1].slice(i, i + minLength))
943
+ }
944
+ }
945
+ this.patternInfo = []
946
+ this.barrierList = []
947
+ let currentArr = []
948
+ let newPattern = []
949
+ val.map(i => {
950
+ newPattern.push(...i)
951
+ })
952
+ if (this.phaseList.length === 0) return
953
+ for (let patternStatus of val[0]) {
954
+ // if (patternStatus.mode !== 7) {
955
+ let concurrent = this.phaseList.filter((item) => {
956
+ return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
957
+ })[0].concurrent// 当前相位的并发相位
958
+ if (concurrent) {
959
+ let obj = {
960
+ id: patternStatus.id,
961
+ current: concurrent.sort()
962
+ }
963
+ currentArr.push(obj)
964
+ }
965
+ // }
966
+ }
967
+ if (currentArr.length !== 0) {
968
+ let newCurrent = this.tranform(currentArr)
969
+ // 取没个环与环关系的并集
970
+ let barrierRing1 = []
971
+ let barrierRing2 = []
972
+ let ring1 = [] // 环1与关系1的并集
973
+ for (let h = 0; h < newCurrent.length; h++) {
974
+ let adds = [...new Set(resultArrs[0])].filter(item => newCurrent[h].includes(item))
975
+ ring1.push(adds)
976
+ }
977
+ let ring1s = [] // 环1与关系2的并集
978
+ for (let h = 0; h < newCurrent.length; h++) {
979
+ let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
980
+ ring1s.push(addRing1)
981
+ }
982
+ barrierRing1.push(...ring1, ...ring1s)
983
+ let resultList = []
984
+ if (newRings.length > 1) {
985
+ let ring2s = [] // 环2与关系1的并集
986
+ for (let h = 0; h < newCurrent.length; h++) {
987
+ let addRing2 = [...new Set(resultArr[1])].filter(item => newCurrent[h].includes(item))
988
+ ring2s.push(addRing2)
989
+ }
990
+ let ring2 = [] // 环2与关系1的并集
991
+ for (let h = 0; h < newCurrent.length; h++) {
992
+ let add = [...new Set(resultArr[0])].filter(item => newCurrent[h].includes(item))
993
+ ring2.push(add)
994
+ }
995
+ barrierRing2.push(...ring2, ...ring2s)
996
+ for (let k = 0; k < barrierRing1.length; k++) {
997
+ resultList.push(barrierRing1[k].concat(barrierRing2[k]))
998
+ }
999
+ }
1000
+ let resultLists = resultList.filter(item => item.length !== 0)
1001
+ let ringArr = []
1002
+ for (let l = 0; l < resultLists.length; l++) {
1003
+ for (let d = 0; d < newCurrent.length; d++) {
1004
+ if (newCurrent[d].filter(item => resultLists[l].includes(item)).length > 0) {
1005
+ ringArr.push({
1006
+ data: resultLists[l],
1007
+ id: d + 1,
1008
+ index: l
1009
+ })
1010
+ }
1011
+ }
1012
+ }
1013
+ for (var i = 0; i < ringArr.length; i++) {
1014
+ for (var j = i + 1; j < ringArr.length; j++) {
1015
+ if (ringArr[i].id === ringArr[j].id && ringArr[i].index + 1 === ringArr[j].index) {
1016
+ ringArr[i].data = ringArr[i].data.concat(ringArr[j].data)
1017
+ ringArr.splice(ringArr.indexOf(ringArr[j].id), 1)
1018
+ }
1019
+ }
1020
+ }
1021
+ let resArr = ringArr.map(item => item.data)
1022
+ let ringTeam = this.step1(this.phaseList, resArr)
1023
+ let ringTeams = ringTeam.filter(item => item.length !== 0)
1024
+ if (this.patternList) {
1025
+ this.setBarrier(ringTeams, val)
1026
+ }
1027
+ if (newRings.length > 1) {
1028
+ this.fillGap(ringTeams, val)
1029
+ }
1030
+ if (this.cycleChange) {
1031
+ const globalParamModel = this.$store.getters.globalParamModel
1032
+ let pattern = globalParamModel.getParamsByType('patternList')
1033
+ const allCycle = pattern.map(item => item.cycle)
1034
+ let cycle = Math.max(...allCycle)
1035
+ this.max = cycle
1036
+ } else {
1037
+ this.max = ''
1038
+ }
1039
+ let barrier = this.step2(ringTeams, newPattern)
1040
+ let barrierLeft = barrier.map(item => item - 0.3)// 屏障左移显示出人行横道
1041
+ this.barrierList = barrierLeft.map(j => {
1042
+ return (j / (this.max ? this.max : this.newCycle) * 100) + '%'
1043
+ })
1044
+ // this.barrierList.unshift(0)
1045
+ }
1046
+ for (let rings of val) {
1047
+ if (rings.length === 0) continue
1048
+ let list = []
1049
+ for (let ring of rings) {
1050
+ if (ring.value === 0) continue
1051
+ let obj = {}
1052
+ let split = ring.value
1053
+ obj.id = ring.id
1054
+ // obj.split = split
1055
+ let currPhase = this.phaseList.filter((item) => {
1056
+ if (item.id === ring.id && item.controltype === 99) {
1057
+ obj.controltype = item.controltype
1058
+ }
1059
+ return item.id === ring.id
1060
+ })[0]
1061
+ if (!currPhase) return
1062
+ let peddirections = []
1063
+ for (let walk of this.sidewalkPhaseData) {
1064
+ if (currPhase.peddirection) {
1065
+ for (let ped of currPhase.peddirection) {
1066
+ // if (stg === walk.phaseid) {
1067
+ let objs = {}
1068
+ objs.name = walk.name
1069
+ objs.id = walk.id
1070
+ if (ped === walk.id) {
1071
+ peddirections.push(objs)
1072
+ peddirections = Array.from(new Set(peddirections))
1073
+ }
1074
+ // }
1075
+ }
1076
+ } else {
1077
+ peddirections = []
1078
+ }
1079
+ }
1080
+ if (ring.desc && ring.desc.length > 0) {
1081
+ obj.direction = ring.desc.map(item => { // 虚相位desc为空
1082
+ return {
1083
+ id: item.id,
1084
+ color: '#454545',
1085
+ peddirection: peddirections
1086
+ }
1087
+ })
1088
+ } else {
1089
+ if (currPhase.direction && currPhase.direction.length > 0) {
1090
+ obj.direction = currPhase.direction.map(item => {
1091
+ return {
1092
+ id: item,
1093
+ color: '#454545',
1094
+ peddirection: peddirections
1095
+ }
1096
+ })
1097
+ } else {
1098
+ obj.direction = [
1099
+ {
1100
+ id: '',
1101
+ color: '#454545',
1102
+ peddirection: peddirections
1103
+ }
1104
+ ]
1105
+ }
1106
+ }
1107
+ obj.split = split
1108
+ obj.cycle = cycle
1109
+ if (ring.sum) {
1110
+ obj.sum = ring.sum
1111
+ obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
1112
+ } else {
1113
+ obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100) + '%'
1114
+ }
1115
+ obj.mode = ring.mode
1116
+ obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100) + '%'
1117
+ obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100) + '%'
1118
+ obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100) + '%'
1119
+ // 忽略相位不显示
1120
+ // let mode = ring.mode
1121
+ // if (mode !== 7) { // 忽略相位不显示
1122
+ list.push(obj)
1123
+ // }
1124
+ }
1125
+ this.patternInfo.push(list)
1126
+ }
1127
+ },
1128
+ setBarrier (ringTeam, val) { // 添加特征参数barrier
1129
+ this.patternList.map(item => {
1130
+ if (item.id === this.patternIds) {
1131
+ const patternObjs = {}
1132
+ val.forEach(l => {
1133
+ l.map(k => {
1134
+ patternObjs[k.id] = k.value
1135
+ })
1136
+ })
1137
+ let ret = ringTeam.map((y, index) => {
1138
+ if (!y || y.length === 0) return
1139
+ y.map(n => {
1140
+ n.length = n.data.length > 1 ? n.data.reduce((pre, cur) => pre + patternObjs[cur], 0) : patternObjs[n.data[0]]
1141
+ })
1142
+ return {
1143
+ barrier: index + 1,
1144
+ length: y[0].length,
1145
+ items: y.map(j => {
1146
+ return {
1147
+ ring: j.ring,
1148
+ data: j.data
1149
+ }
1150
+ })
1151
+ }
1152
+ })
1153
+ item.barriers = ret
1154
+ }
1155
+ })
1156
+ },
1157
+ tranform (arr) { // 分barrier
1158
+ let newMap = new Map()
1159
+ arr.forEach(({id, current}) => {
1160
+ const find = newMap.get(current.join())
1161
+ if (find) newMap.get(current.join()).push(id)
1162
+ else newMap.set(current.join(), [id])
1163
+ })
1164
+ let ret = []
1165
+ newMap.forEach((value, key) => {
1166
+ ret.push(Array.from(new Set(key.split(',').map(Number).concat(value))))
1167
+ })
1168
+ const result = []
1169
+ for (const a of ret) {
1170
+ let merged = false
1171
+ for (const r of result) {
1172
+ if (this.check([...r], a)) {
1173
+ a.forEach(item => r.add(item))
1174
+ merged = true
1175
+ }
1176
+ }
1177
+ if (!merged) {
1178
+ result.push(new Set(a))
1179
+ }
1180
+ merged = false
1181
+ }
1182
+ return result.map(s => [...s])
1183
+ },
1184
+ check (arr1, arr2) {
1185
+ return arr1.some(a1 => arr2.some(a2 => a1 === a2))
1186
+ },
1187
+ step1 (list, arr) { // 各个环包含的相位
1188
+ const ret = []
1189
+ const listObj = {}
1190
+ list.forEach(l => {
1191
+ listObj[l.id] = l.ring
1192
+ })
1193
+ arr.forEach(a => {
1194
+ const retItem = []
1195
+ a.forEach(b => {
1196
+ if (listObj[b]) {
1197
+ const find = retItem.find(r => r.ring === listObj[b])
1198
+ if (find) find.data.push(b)
1199
+ else retItem.push({ring: listObj[b], data: [b]})
1200
+ }
1201
+ })
1202
+ ret.push(retItem)
1203
+ })
1204
+ return ret
1205
+ },
1206
+ step2 (newArr, pattern) { // 不同环并发相位做比较
1207
+ let ret = []
1208
+ let max = 0
1209
+ const patternObj = {}
1210
+ pattern.forEach(l => {
1211
+ // if (l.mode !== 7) {
1212
+ patternObj[l.id] = l.value
1213
+ // }
1214
+ })
1215
+ let barrierCycle = newArr.map(item => {
1216
+ return Math.max.apply(Math, item.map(k => { return k.length }))
1217
+ })
1218
+ barrierCycle.forEach((b, index) => {
1219
+ if (index === 0) {
1220
+ ret.push(barrierCycle[index])
1221
+ } else {
1222
+ if (max) {
1223
+ max = barrierCycle[index] + max
1224
+ } else {
1225
+ max = barrierCycle[index] + barrierCycle[index - 1]
1226
+ }
1227
+ ret.push(max)
1228
+ }
1229
+ })
1230
+ return ret
1231
+ },
1232
+ fillGap (newArr, pattern) {
1233
+ this.newPatterns = []
1234
+ const patternObj = {}
1235
+ pattern.forEach(l => {
1236
+ l.map(k => {
1237
+ // if (k.mode !== 7) {
1238
+ patternObj[k.id] = k.value
1239
+ // }
1240
+ })
1241
+ })
1242
+ let newMax = []
1243
+ let newMin = []
1244
+ newArr.forEach((na, index) => {
1245
+ if (!na || na.length === 0) return
1246
+ na.map(n => {
1247
+ n.length = n.data.length > 1 ? n.data.reduce((pre, cur) => pre + patternObj[cur], 0) : patternObj[n.data[0]]
1248
+ })
1249
+ let maxNum = Math.max.apply(Math, na.map(item => { return item.length }))
1250
+ let minNum = Math.min.apply(Math, na.map(item => { return item.length }))
1251
+ newMax.push(maxNum)
1252
+ newMin.push(minNum)
1253
+ let newmaxNum = Math.max.apply(Math, newMax)// 每组最大值
1254
+ let newminNum = Math.min.apply(Math, newMin)
1255
+ this.newCycle = newmaxNum + newminNum
1256
+ if (newmaxNum === newminNum) {
1257
+ this.max = newmaxNum + newminNum
1258
+ pattern.map(d => {
1259
+ d.map(r => {
1260
+ if (r.sum) {
1261
+ delete r.sum
1262
+ }
1263
+ })
1264
+ })
1265
+ }
1266
+ if (maxNum === minNum) {
1267
+ na.map(n => {
1268
+ pattern.map(h => {
1269
+ h.map(d => {
1270
+ if (d.id === n.data[1] && d.sum) {
1271
+ delete d.sum
1272
+ }
1273
+ })
1274
+ })
1275
+ })
1276
+ } else {
1277
+ na.map(n => {
1278
+ if (n.length === maxNum) {
1279
+ pattern.map(h => {
1280
+ h.map(d => {
1281
+ if (n.data.length > 1) {
1282
+ if (d.id === n.data[1]) {
1283
+ delete d.sum
1284
+ }
1285
+ } else {
1286
+ if (d.id === n.data[0]) {
1287
+ delete d.sum
1288
+ }
1289
+ }
1290
+ })
1291
+ })
1292
+ }
1293
+ })
1294
+ }
1295
+ na.forEach((value, index, array) => {
1296
+ if (value.length !== maxNum) {
1297
+ let newNa = []
1298
+ newNa.push(value)
1299
+ newNa.forEach(m => {
1300
+ let sum = Number(maxNum - m.length)
1301
+ pattern.filter((i) => {
1302
+ i.map(j => {
1303
+ if (m.data.length > 1) {
1304
+ if (j.id === m.data[1]) {
1305
+ j.sum = sum
1306
+ }
1307
+ } else {
1308
+ if (j.id === m.data[0]) {
1309
+ j.sum = sum
1310
+ }
1311
+ }
1312
+ })
1313
+ })
1314
+ })
1315
+ }
1316
+ let mapAdd = pattern.map(item => {
1317
+ return item.map(val => {
1318
+ return val.value + (val.sum ? val.sum : 0)
1319
+ })
1320
+ })
1321
+ let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
1322
+ return item.length > 0 ? item.reduce((a, b) => {
1323
+ return a + b
1324
+ }) : 0
1325
+ }) : 0
1326
+ this.max = Math.max(...maxCycle)// 每个环的周期最大值
1327
+ })
1328
+ })
1329
+ }
1330
+ }
1331
+ }
1332
+ </script>
1333
+ <style lang="scss">
1334
+ // el-tooltip样式
1335
+ .el-tooltip__popper.is-light {
1336
+ background: #299BCC !important;
1337
+ border: 1px solid #299BCC !important;
1338
+ color: #FFFFFF !important;
1339
+ }
1340
+ .el-tooltip__popper.is-light[x-placement^="top"] .popper__arrow {
1341
+ border-top-color: #299BCC !important;
1342
+ }
1343
+ .el-tooltip__popper.is-light[x-placement^="top"] .popper__arrow::after {
1344
+ border-top-color: #299BCC !important;
1345
+ }
1346
+ </style>
1347
+ <style lang="scss" scoped>
1348
+ .main-patternstatus {
1349
+ position: relative;
1350
+ margin-bottom: 20px;
1351
+ }
1352
+ .main-patternstatus {
1353
+ position: relative;
1354
+ .ring-first {
1355
+ margin-top: 1px;
1356
+ width: 100%;
1357
+ height: 34px;
1358
+ }
1359
+ .first-1 {
1360
+ float: left;
1361
+ // text-align: center;
1362
+ }
1363
+ // .ring-num {
1364
+ // float: left;
1365
+ // margin-top:7px;
1366
+ // margin-left: 5px;
1367
+ // font-size: 14px;
1368
+ // font-weight: normal;
1369
+ // font-stretch: normal;
1370
+ // line-height: 22px;
1371
+ // letter-spacing: 0px;
1372
+ // color: #ffffff;
1373
+ // }
1374
+ .box {
1375
+ text-align: center;
1376
+ // float: left;
1377
+ // margin-left: 6px;
1378
+ // margin-right: 10px;
1379
+ }
1380
+ .ring-nums {
1381
+ // float: left;
1382
+ // margin-top:7px;
1383
+ // margin-left: 5px;
1384
+ font-size: 12px;
1385
+ height: 14px;
1386
+ font-weight: normal;
1387
+ font-stretch: normal;
1388
+ // line-height: 22px;
1389
+ letter-spacing: 0px;
1390
+ color: #333333;
1391
+ }
1392
+ .ring-phase {
1393
+ position: relative;
1394
+ float: left;
1395
+ // margin-left: 5px;
1396
+ height: 34px;
1397
+ width: 36px;
1398
+ z-index: 999;
1399
+ background: rgba(30, 96, 12, 0.2);
1400
+ // margin-top:1px;
1401
+ }
1402
+ .ring-phase::after {
1403
+ position: absolute;
1404
+ display: block;
1405
+ content: '';
1406
+ height: 0;
1407
+ width: 0;
1408
+ top: 11px;
1409
+ left: 36px;
1410
+ border: 5px solid transparent;
1411
+ border-left-color: rgba(30, 96, 12, 0.2);
1412
+ }
1413
+ .divider {
1414
+ position: absolute;
1415
+ top: -10px;
1416
+ // left: 370px;
1417
+ width: 3px;
1418
+ // height: 99px;
1419
+ z-index: 999;
1420
+ background-color:#B9BABF;
1421
+ }
1422
+ // .curTimeLine {
1423
+ // position: absolute;
1424
+ // top: -10px;
1425
+ // width: 4px;
1426
+ // background-color: black;
1427
+ // }
1428
+ // .curTimeDiv {
1429
+ // position: absolute;
1430
+ // z-index:50;
1431
+ // top: -21px;
1432
+ // margin-left: -10px;
1433
+ // text-align:center;
1434
+ // vertical-align: middle;
1435
+ // width: 60px;
1436
+ // height: 19px;
1437
+ // color:black;
1438
+ // // background-color: black;
1439
+ // }
1440
+ }
1441
+ .ring-first {
1442
+ margin-top: 1px;
1443
+ width: 100%;
1444
+ height: 34px;
1445
+ }
1446
+ .direction {
1447
+ filter: brightness(70%);
1448
+ }
1449
+ .masks {
1450
+ background: rgb(242, 121, 121) !important;
1451
+ }
1452
+ .first-1 {
1453
+ float: left;
1454
+ // text-align: center;
1455
+ }
1456
+ </style>