openatc-components 0.0.88 → 0.0.89

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 (393) 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 +90 -91
  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 +89 -89
  23. package/package/kisscomps/components/BoardCard/index.js +2 -2
  24. package/package/kisscomps/components/Channelization/Channelization.vue +544 -0
  25. package/package/kisscomps/components/Channelization/index.js +2 -0
  26. package/package/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +498 -0
  27. package/package/kisscomps/components/ChannelizationWithInterface/index.js +2 -0
  28. package/package/kisscomps/components/CommonKanban/CommonKanban.vue +118 -118
  29. package/package/kisscomps/components/CommonKanban/index.js +2 -2
  30. package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +249 -0
  31. package/package/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -0
  32. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -0
  33. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +176 -0
  34. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -0
  35. package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +48 -0
  36. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +182 -0
  37. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +222 -0
  38. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +191 -0
  39. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +78 -0
  40. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +433 -0
  41. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +195 -0
  42. package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +71 -0
  43. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +940 -0
  44. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +119 -0
  45. package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +563 -0
  46. package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +157 -0
  47. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +191 -0
  48. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +331 -0
  49. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +157 -0
  50. package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -0
  51. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +43 -0
  52. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -0
  53. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -0
  54. package/package/kisscomps/components/DrawChannelization/index.js +2 -0
  55. package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -0
  56. package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +114 -114
  57. package/package/kisscomps/components/ExpendConfig/index.js +2 -2
  58. package/package/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +170 -170
  59. package/package/kisscomps/components/FaultDetailModal/index.js +2 -2
  60. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +497 -497
  61. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  62. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  63. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  64. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  65. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  66. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  67. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  68. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1179 -1179
  69. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  70. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  71. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  72. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  73. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  74. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  75. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  76. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  77. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  78. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  79. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  80. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  81. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  82. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  83. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  84. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +912 -912
  85. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +112 -112
  86. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +112 -112
  87. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +111 -111
  88. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  89. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  90. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +99 -99
  91. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +99 -99
  92. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  93. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +99 -99
  94. package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +78 -78
  95. package/package/kisscomps/components/IntersectionMap/index.js +2 -2
  96. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +153 -153
  97. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +518 -518
  98. package/package/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  99. package/package/kisscomps/components/KanBan/index.js +2 -2
  100. package/package/kisscomps/components/KanBan/kanban.vue +219 -219
  101. package/package/kisscomps/components/MessageBox/index.vue +96 -0
  102. package/package/kisscomps/components/OverLap/OverLap.vue +207 -207
  103. package/package/kisscomps/components/OverLap/index.js +2 -2
  104. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +888 -888
  105. package/package/kisscomps/components/PatternStatus/index.js +2 -2
  106. package/package/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  107. package/package/kisscomps/components/PatternWalkSvg/index.js +2 -2
  108. package/package/kisscomps/components/PhaseMarker/index.js +6 -6
  109. package/package/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  110. package/package/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  111. package/package/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  112. package/package/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  113. package/package/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  114. package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  115. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +744 -744
  116. package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  117. package/package/kisscomps/components/SchemeConfig/index.js +2 -2
  118. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  119. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +219 -219
  120. package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +263 -263
  121. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1384 -1384
  122. package/package/kisscomps/components/StageBord/StageBord.vue +242 -242
  123. package/package/kisscomps/components/StageBord/index.js +2 -2
  124. package/package/kisscomps/components/StageStatus/StageStatus.vue +306 -306
  125. package/package/kisscomps/components/StageStatus/index.js +2 -2
  126. package/package/kisscomps/components/Stages/index.vue +139 -139
  127. package/package/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  128. package/package/kisscomps/components/SvgIcon/index.js +2 -2
  129. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +522 -522
  130. package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
  131. package/package/kisscomps/components/overView/index.vue +676 -676
  132. package/package/kisscomps/components/patternList/index.js +2 -2
  133. package/package/kisscomps/components/patternList/patternList.vue +562 -562
  134. package/package/kisscomps/index.js +96 -92
  135. package/package/kissui.min.js +1 -1
  136. package/package.json +4 -2
  137. package/src/App.vue +24 -24
  138. package/src/EdgeMgr/EdgeModelBase.js +16 -16
  139. package/src/EdgeMgr/controller/crossDiagramMgr.js +120 -120
  140. package/src/api/authapi.js +31 -31
  141. package/src/api/config.js +21 -21
  142. package/src/api/control.js +76 -76
  143. package/src/api/cross.js +33 -0
  144. package/src/api/fault.js +66 -66
  145. package/src/api/index.js +24 -24
  146. package/src/api/login.js +46 -46
  147. package/src/api/optimize.js +72 -72
  148. package/src/api/param.js +154 -154
  149. package/src/api/passwdAssest.js +101 -101
  150. package/src/api/template.js +27 -27
  151. package/src/i18n/index.js +26 -26
  152. package/src/i18n/language/en.js +1186 -1111
  153. package/src/i18n/language/index.js +25 -25
  154. package/src/i18n/language/zh.js +1185 -1110
  155. package/src/icons/demo.css +539 -539
  156. package/src/icons/iconfont.css +835 -835
  157. package/src/icons/iconfont.json +1444 -1444
  158. package/src/icons/index.js +20 -20
  159. package/src/icons/svg/bendi.svg +110 -110
  160. package/src/icons/svg/bujin.svg +36 -36
  161. package/src/icons/svg/connectBlue.svg +7 -7
  162. package/src/icons/svg/currentvolume.svg +0 -0
  163. package/src/icons/svg/custom-BRTlane.svg +40 -0
  164. package/src/icons/svg/custom-bicyclelane.svg +7 -0
  165. package/src/icons/svg/custom-buslane.svg +40 -0
  166. package/src/icons/svg/custom-detector.svg +12 -0
  167. package/src/icons/svg/custom-east-bottom.svg +32 -0
  168. package/src/icons/svg/custom-east-top.svg +32 -0
  169. package/src/icons/svg/custom-ewped.svg +35 -0
  170. package/src/icons/svg/custom-motorway.svg +7 -0
  171. package/src/icons/svg/custom-nonmotorizedlane.svg +40 -0
  172. package/src/icons/svg/custom-north-left.svg +32 -0
  173. package/src/icons/svg/custom-north-right.svg +32 -0
  174. package/src/icons/svg/custom-pedcrossing.svg +7 -0
  175. package/src/icons/svg/custom-peddetector.svg +17 -0
  176. package/src/icons/svg/custom-pedeastward.svg +9 -0
  177. package/src/icons/svg/custom-pedestrian.svg +7 -0
  178. package/src/icons/svg/custom-pednorthward.svg +9 -0
  179. package/src/icons/svg/custom-pedsouthward.svg +9 -0
  180. package/src/icons/svg/custom-pedwestward.svg +9 -0
  181. package/src/icons/svg/custom-secondcrossing.svg +7 -0
  182. package/src/icons/svg/custom-sectionpedestrian.svg +7 -0
  183. package/src/icons/svg/custom-snped.svg +35 -0
  184. package/src/icons/svg/custom-south-left.svg +32 -0
  185. package/src/icons/svg/custom-south-right.svg +32 -0
  186. package/src/icons/svg/custom-straightahead.svg +7 -0
  187. package/src/icons/svg/custom-tramlane.svg +40 -0
  188. package/src/icons/svg/custom-turnaround.svg +7 -0
  189. package/src/icons/svg/custom-turnleft.svg +7 -0
  190. package/src/icons/svg/custom-turnright.svg +7 -0
  191. package/src/icons/svg/custom-vehiclebranch.svg +40 -0
  192. package/src/icons/svg/custom-vehiclemainroad.svg +41 -0
  193. package/src/icons/svg/custom-west-bottom.svg +32 -0
  194. package/src/icons/svg/custom-west-top.svg +32 -0
  195. package/src/icons/svg/custom-xlped.svg +14 -0
  196. package/src/icons/svg/custom-xpedestrian.svg +7 -0
  197. package/src/icons/svg/custom-xrped.svg +14 -0
  198. package/src/icons/svg/cutRed.svg +7 -7
  199. package/src/icons/svg/cycle.svg +0 -0
  200. package/src/icons/svg/dingzhouqi.svg +34 -34
  201. package/src/icons/svg/ganyingkongzhi.svg +30 -30
  202. package/src/icons/svg/guandeng.svg +81 -81
  203. package/src/icons/svg/huangshan.svg +71 -71
  204. package/src/icons/svg/maincontrol.svg +0 -0
  205. package/src/icons/svg/manualcontrolbackground.svg +51 -51
  206. package/src/icons/svg/manualcontrolbackground1.svg +62 -62
  207. package/src/icons/svg/manualcontrolbackgrounden.svg +62 -62
  208. package/src/icons/svg/model.svg +0 -0
  209. package/src/icons/svg/phasediff.svg +0 -0
  210. package/src/icons/svg/quanhong.svg +86 -86
  211. package/src/icons/svg/shanghe.svg +11 -11
  212. package/src/icons/svg/shoudong.svg +103 -103
  213. package/src/icons/svg/time.svg +0 -0
  214. package/src/icons/svg/wuxianlan.svg +46 -46
  215. package/src/icons/svg/xiala.svg +11 -11
  216. package/src/icons/svg/xingrenguojie.svg +33 -33
  217. package/src/icons/svg/xitong.svg +89 -89
  218. package/src/icons/svg/youxian.svg +41 -41
  219. package/src/icons/svg/zizhukongzhi.svg +43 -43
  220. package/src/kisscomps/components/BoardCard/BoardCard.vue +89 -89
  221. package/src/kisscomps/components/BoardCard/index.js +2 -2
  222. package/src/kisscomps/components/Channelization/Channelization.vue +544 -0
  223. package/src/kisscomps/components/Channelization/index.js +2 -0
  224. package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +498 -0
  225. package/src/kisscomps/components/ChannelizationWithInterface/index.js +2 -0
  226. package/src/kisscomps/components/CommonKanban/CommonKanban.vue +118 -118
  227. package/src/kisscomps/components/CommonKanban/index.js +2 -2
  228. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +249 -0
  229. package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -0
  230. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -0
  231. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +176 -0
  232. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -0
  233. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +48 -0
  234. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +182 -0
  235. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +222 -0
  236. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +191 -0
  237. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +78 -0
  238. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +433 -0
  239. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +195 -0
  240. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +71 -0
  241. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +940 -0
  242. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +119 -0
  243. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +563 -0
  244. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +157 -0
  245. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +191 -0
  246. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +331 -0
  247. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +157 -0
  248. package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -0
  249. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +43 -0
  250. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -0
  251. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -0
  252. package/src/kisscomps/components/DrawChannelization/index.js +2 -0
  253. package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -0
  254. package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +114 -114
  255. package/src/kisscomps/components/ExpendConfig/index.js +2 -2
  256. package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +170 -170
  257. package/src/kisscomps/components/FaultDetailModal/index.js +2 -2
  258. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +497 -497
  259. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  260. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  261. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  262. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  263. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  264. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  265. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  266. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1179 -1179
  267. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  268. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  269. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  270. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  271. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  272. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  273. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  274. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  275. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  276. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  277. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  278. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  279. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  280. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  281. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  282. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +912 -912
  283. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +112 -112
  284. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +112 -112
  285. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +111 -111
  286. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  287. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  288. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +99 -99
  289. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +99 -99
  290. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  291. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +99 -99
  292. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +78 -78
  293. package/src/kisscomps/components/IntersectionMap/index.js +2 -2
  294. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +153 -153
  295. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +518 -518
  296. package/src/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  297. package/src/kisscomps/components/KanBan/index.js +2 -2
  298. package/src/kisscomps/components/KanBan/kanban.vue +219 -219
  299. package/src/kisscomps/components/MessageBox/index.vue +96 -0
  300. package/src/kisscomps/components/OverLap/OverLap.vue +207 -207
  301. package/src/kisscomps/components/OverLap/index.js +2 -2
  302. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +888 -888
  303. package/src/kisscomps/components/PatternStatus/index.js +2 -2
  304. package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  305. package/src/kisscomps/components/PatternWalkSvg/index.js +2 -2
  306. package/src/kisscomps/components/PhaseMarker/index.js +6 -6
  307. package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  308. package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  309. package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  310. package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  311. package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  312. package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  313. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +744 -744
  314. package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  315. package/src/kisscomps/components/SchemeConfig/index.js +2 -2
  316. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  317. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +219 -219
  318. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +263 -263
  319. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1384 -1384
  320. package/src/kisscomps/components/StageBord/StageBord.vue +242 -242
  321. package/src/kisscomps/components/StageBord/index.js +2 -2
  322. package/src/kisscomps/components/StageStatus/StageStatus.vue +306 -306
  323. package/src/kisscomps/components/StageStatus/index.js +2 -2
  324. package/src/kisscomps/components/Stages/index.vue +139 -139
  325. package/src/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  326. package/src/kisscomps/components/SvgIcon/index.js +2 -2
  327. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +522 -522
  328. package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
  329. package/src/kisscomps/components/overView/index.vue +676 -676
  330. package/src/kisscomps/components/patternList/index.js +2 -2
  331. package/src/kisscomps/components/patternList/patternList.vue +562 -562
  332. package/src/kisscomps/index.js +96 -92
  333. package/src/lib/publicjs/ArryListUtil.js +38 -38
  334. package/src/lib/publicjs/HttpurlMgr.js +45 -45
  335. package/src/lib/publicjs/KissApi.js +158 -158
  336. package/src/lib/publicjs/KissWSSub/Heartcheck.js +128 -128
  337. package/src/lib/publicjs/KissWSSub/KissWsSub.js +91 -91
  338. package/src/lib/publicjs/KissWSSub/KissWsSubByType.js +152 -152
  339. package/src/lib/publicjs/KissWSSub/SimuWsSubByType.js +44 -44
  340. package/src/lib/publicjs/KissWSSub/Sub.js +51 -51
  341. package/src/lib/publicjs/KissWSSub/SubChannel.js +119 -119
  342. package/src/lib/publicjs/basecomponents.js +65 -65
  343. package/src/lib/publicjs/localStorage.js +112 -112
  344. package/src/lib/publicjs/objdeepcopy.js +32 -32
  345. package/src/lib/publicjs/pageScroll.js +30 -30
  346. package/src/lib/publicjs/passwdAssest.js +101 -101
  347. package/src/lib/publicjs/styleclassfactory.js +32 -32
  348. package/src/main.js +50 -47
  349. package/src/router/index.js +43 -36
  350. package/src/store/getters.js +16 -16
  351. package/src/store/index.js +26 -26
  352. package/src/store/modules/globalParam.js +78 -27
  353. package/src/utils/ControlFormat.js +68 -68
  354. package/src/utils/RingDataModel.js +191 -191
  355. package/src/utils/auth.js +111 -111
  356. package/src/utils/dateFormat.js +41 -41
  357. package/src/utils/errorcode.js +224 -224
  358. package/src/utils/fault.js +195 -195
  359. package/src/utils/faultcode.js +209 -209
  360. package/src/utils/index.js +69 -69
  361. package/src/utils/pedphasedesc.js +119 -119
  362. package/src/utils/phasedesc.js +124 -124
  363. package/src/utils/responseMessage.js +21 -21
  364. package/src/utils/validate.js +43 -43
  365. package/src/views/customchannelization.vue +50 -0
  366. package/src/views/home.1.vue +479 -479
  367. package/src/views/home.vue +78 -78
  368. package/src/views/intersection.vue +282 -276
  369. package/src/views/overView.vue +41 -41
  370. package/src/views/schemeconfig.vue +154 -154
  371. package/static/apiconfig.json +351 -336
  372. package/static/styles/channelizatioon.scss +365 -0
  373. package/static/styles/common.scss +20 -19
  374. package/static/styles/commonkanban.scss +87 -87
  375. package/static/styles/dark/index.scss +2 -2
  376. package/static/styles/dark/theme/element-dark.scss +42 -42
  377. package/static/styles/index.scss +84 -84
  378. package/static/styles/intersection.scss +170 -170
  379. package/static/styles/light/index.scss +2 -2
  380. package/static/styles/light/theme/element-light.scss +42 -42
  381. package/static/styles/overview.scss +371 -371
  382. package/static/styles/schemeconfig.scss +405 -405
  383. package/static/styles/stages.scss +64 -64
  384. package/static/token.json +2 -2
  385. package/test/e2e/custom-assertions/elementCount.js +27 -27
  386. package/test/e2e/nightwatch.conf.js +46 -46
  387. package/test/e2e/runner.js +48 -48
  388. package/test/e2e/specs/test.js +19 -19
  389. package/test/unit/.eslintrc +7 -7
  390. package/test/unit/jest.conf.js +30 -30
  391. package/test/unit/setup.js +3 -3
  392. package/test/unit/specs/HelloWorld.spec.js +11 -11
  393. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PatternWalkSvg.vue +0 -429
@@ -1,1384 +1,1384 @@
1
- <template>
2
- <div class="tentativeplan-control">
3
- <div class="title" style="margin-bottom: 18px;">{{$t('openatccomponents.overview.tentativeplan')}}</div>
4
- <el-row>
5
- <el-col :span="12">
6
- <el-form
7
- ref="manual"
8
- label-position="left"
9
- :model="manualInfo"
10
- label-width="100px">
11
- <el-form-item
12
- :label="$t('openatccomponents.overview.patternid') + ':'"
13
- prop="count">
14
- <el-select @change="selectPattern()" v-model="manualInfo.tempPatternid" class="col-inner" size="small" :placeholder="$t('openatccomponents.common.select')">
15
- <el-option
16
- v-for="item in patternSelect"
17
- :key="item.value"
18
- :value="item.desc">
19
- </el-option>
20
- </el-select>
21
- <!-- <el-input v-model="manualInfo.tempDuration" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
22
- </el-form-item>
23
- <el-form-item
24
- :label="$t('openatccomponents.overview.delay') + ':'"
25
- prop="intersection">
26
- <el-input v-model="manualInfo.tempDelay" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
27
- </el-form-item>
28
- </el-form>
29
- </el-col>
30
- <el-col :span="12">
31
- <el-form
32
- ref="manual"
33
- label-position="left"
34
- :model="manualInfo"
35
- label-width="100px">
36
- <el-form-item
37
- :label="$t('openatccomponents.overview.patternoffset') + ':'"
38
- prop="count">
39
- <el-input v-model="manualInfo.offset" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
40
- </el-form-item>
41
- <el-form-item
42
- :label="$t('openatccomponents.overview.duration') + ':'"
43
- prop="intersection">
44
- <el-input v-model="manualInfo.duration" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
45
- </el-form-item>
46
- </el-form>
47
- </el-col>
48
- </el-row>
49
- <el-row>
50
- <div class="title" style="margin-top:18px; margin-bottom:10px">{{$t('openatccomponents.overview.patternstate')}}:
51
- <span>({{$t('openatccomponents.overview.cycle')}}: {{cycle}} {{$t('openatccomponents.overview.patternoffset')}}: {{offset}})</span>
52
- </div>
53
- <stage-status
54
- :patternStatusList="patternOne.length===0?planPattern.rings:patternOne[0].rings"
55
- >
56
- </stage-status>
57
- <pattern-list
58
- :patternList="patternOne.length===0?planPattern.rings:patternOne"
59
- :patternStatusList="patternOne.length===0?planPattern.rings:patternOne[0].rings"
60
- :cycles="patternOne.length===0?planPattern.cycle:patternOne[0].cycle"
61
- :phaseList="phaseList">
62
- </pattern-list>
63
- </el-row>
64
- <el-row>
65
- <el-tabs v-model="activeList" type="card">
66
- <el-tab-pane :label="$t('openatccomponents.pattern.ringConfig')" name="ring">
67
- <!-- <el-row :gutter="20"> -->
68
- <!-- <el-col :span="12" > -->
69
- <!-- <div class="components-container board" > -->
70
- <div style="width: 100%; overflow: hidden;margin-top: 20px;">
71
- <kan-ban v-for="n in ringCount"
72
- :key="n" class="closephasekanban"
73
- :index="n"
74
- :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
75
- :list="patternOne.length===0?planPattern.rings[n-1]:patternOne[0].rings[n-1]"
76
- :phaseList="phaseList"
77
- :header-text="$t('openatccomponents.pattern.ring')+n"
78
- @handleSplit="handleSplit">
79
- </kan-ban>
80
- </div>
81
- <!-- </el-col> -->
82
- <!-- </el-row> -->
83
- </el-tab-pane>
84
- <el-tab-pane :label="$t('openatccomponents.pattern.stageConfig')" name="kanban">
85
- <el-scrollbar :vertical="true">
86
- <div class="stage-panel-contener">
87
- <stage-board v-for="(stage,index) in patternOne.length===0?allPatternList[0].stagesList:patternOne[0].stagesList"
88
- class="closephasekanban"
89
- :key="index"
90
- :stage="stage"
91
- :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
92
- :stageInfo="patternOne.length===0?allPatternList[0].stagesList:patternOne[0].stagesList"
93
- :coordphaseOption="coordphaseOption"
94
- :subIndex="index"
95
- @onStageSplitChange="onStageSplitChange"
96
- @stageSplitChange="stageSplitChange"
97
- @onStageDelaystartChange="onStageDelaystartChange"
98
- @onStageAdvanceendChange="onStageAdvanceendChange"
99
- >
100
- </stage-board>
101
- </div>
102
- </el-scrollbar>
103
- </el-tab-pane>
104
- <el-tab-pane :label="$t('openatccomponents.pattern.parameters')" name="parame">
105
- <el-row>
106
- <!-- <el-col :span="12"> -->
107
- <expend-config
108
- v-for="(j,index) in ringCounts"
109
- :key="index"
110
- class="closephasekanban"
111
- :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
112
- :header-text="$t('openatccomponents.pattern.ring')+j"
113
- :list="patternOne.length===0?planPattern.rings[j-1]:patternOne[0].rings[j-1]"
114
- >
115
- </expend-config>
116
- <!-- </el-col> -->
117
- <!-- <el-col :span="12"> -->
118
- <div style="width: 60%;margin: 10px auto;color:#ffffff">
119
- {{$t('openatccomponents.pattern.forbiddenstage')}}
120
- <el-input class="stage-value" size="small" v-model="forbiddenstage"></el-input>
121
- </div>
122
- <div style="width: 60%;margin: 10px auto;color:#ffffff">
123
- {{$t('openatccomponents.pattern.screenstage')}}
124
- <el-input class="stage-value" size="small" v-model="screenstage"></el-input>
125
- </div>
126
- <div style="width: 60%;margin: 10px auto;color:#ffffff">
127
- <!-- <el-col :span="8"> -->
128
- {{$t('openatccomponents.pattern.coordinatestage')}}
129
- <el-input class="stage-value" size="small" v-model="coordinatestage"></el-input>
130
- <!-- </el-col> -->
131
- </div>
132
- <!-- </el-col> -->
133
- </el-row>
134
- </el-tab-pane>
135
- <el-tab-pane :label="$t('openatccomponents.pattern.overLap')" name="overlap">
136
- <el-row :gutter="20">
137
- <el-col :span="24" >
138
- <over-lap
139
- :stageList="stagesList"
140
- :overlap="overlap"
141
- :checked="true"
142
- :tentative="true"
143
- :cycle="patternOne.length===0?planPattern.cycle:patternOne[0].cycle"
144
- >
145
- </over-lap>
146
- </el-col>
147
- </el-row>
148
- </el-tab-pane>
149
- </el-tabs>
150
- </el-row>
151
- <div class="footer">
152
- <el-button @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
153
- <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
154
- </div>
155
- </div>
156
- </template>
157
-
158
- <script>
159
- export default {
160
- name: 'tentativeplancontrol',
161
- props: {
162
- controlData: {
163
- type: Object
164
- },
165
- phaseList: {
166
- type: Array
167
- },
168
- overlap: {
169
- type: Array
170
- },
171
- allPatternList: {
172
- type: Array
173
- },
174
- patternSelect: {
175
- type: Array
176
- }
177
- },
178
- computed: {
179
- rings () {
180
- return this.patternOne.length === 0 ? this.planPattern.rings : this.patternOne[0].rings
181
- },
182
- cycle () {
183
- return this.patternOne.length === 0 ? this.max : (this.patternOne.length > 0 && (this.patternOne[0].cycle < this.max)) ? this.max : this.patternOne[0].cycle
184
- },
185
- offset () {
186
- return Number((this.patternOne.length === 0 || this.manualInfo.offset > 0) ? this.manualInfo.offset : this.patternOne[0].offset)
187
- },
188
- forbiddenstage () {
189
- return this.patternOne.length === 0 ? this.allPatternList[0].forbiddenstage : this.patternOne[0].forbiddenstage
190
- },
191
- screenstage () {
192
- return this.patternOne.length === 0 ? this.allPatternList[0].screenstage : this.patternOne[0].screenstage
193
- },
194
- coordinatestage () {
195
- return this.patternOne.length === 0 ? this.allPatternList[0].coordinatestage : this.patternOne[0].coordinatestage
196
- }
197
- },
198
- data () {
199
- return {
200
- stagesList: [],
201
- phaseRings: [],
202
- options: {
203
- group: 'pattern'
204
- },
205
- // overlap: [
206
- // {
207
- // 'id': 1,
208
- // 'desc': '东方向南半测行人相位',
209
- // 'includedphases': [
210
- // 1,
211
- // 8
212
- // ],
213
- // 'peddirection': [
214
- // 6
215
- // ]
216
- // },
217
- // {
218
- // 'id': 2,
219
- // 'desc': '东方向北半测行人相位',
220
- // 'includedphases': [
221
- // 1,
222
- // 2
223
- // ],
224
- // 'peddirection': [
225
- // 5
226
- // ]
227
- // },
228
- // {
229
- // 'id': 3,
230
- // 'desc': '西方向南半测行人相位',
231
- // 'includedphases': [
232
- // 5,
233
- // 6
234
- // ],
235
- // 'peddirection': [
236
- // 8
237
- // ]
238
- // },
239
- // {
240
- // 'id': 4,
241
- // 'desc': '西方向北半测行人相位',
242
- // 'includedphases': [
243
- // 4,
244
- // 5
245
- // ],
246
- // 'peddirection': [
247
- // 7
248
- // ]
249
- // },
250
- // {
251
- // 'id': 5,
252
- // 'desc': '南方向东半测行人相位',
253
- // 'includedphases': [
254
- // 7,
255
- // 8
256
- // ],
257
- // 'peddirection': [
258
- // 10
259
- // ]
260
- // },
261
- // {
262
- // 'id': 6,
263
- // 'desc': '南方向西半测行人相位',
264
- // 'includedphases': [
265
- // 6,
266
- // 7
267
- // ],
268
- // 'peddirection': [
269
- // 9
270
- // ]
271
- // },
272
- // {
273
- // 'id': 7,
274
- // 'desc': '北方向东半测行人相位',
275
- // 'includedphases': [
276
- // 2,
277
- // 3
278
- // ],
279
- // 'peddirection': [
280
- // 12
281
- // ]
282
- // },
283
- // {
284
- // 'id': 8,
285
- // 'desc': '北方向西半测行人相位',
286
- // 'includedphases': [
287
- // 3,
288
- // 4
289
- // ],
290
- // 'peddirection': [
291
- // 11
292
- // ]
293
- // }
294
- // ],
295
- max: '',
296
- patternCycleEqual: true,
297
- activeList: 'ring',
298
- ringCount: 1,
299
- ringCounts: 1,
300
- coordphaseOption: [],
301
- patternOne: [],
302
- planPattern: {},
303
- // allPatternList: [
304
- // {
305
- // 'id': 1,
306
- // 'desc': '',
307
- // 'offset': 10,
308
- // 'cycle': 120,
309
- // 'rings': [
310
- // [
311
- // {
312
- // 'name': 'phase1',
313
- // 'id': 1,
314
- // 'value': 30,
315
- // 'mode': 2,
316
- // 'options': [],
317
- // 'minSplit': 20,
318
- // 'desc': [
319
- // {
320
- // 'id': 13,
321
- // 'color': '#454545'
322
- // }
323
- // ]
324
- // },
325
- // {
326
- // 'name': 'phase2',
327
- // 'id': 2,
328
- // 'value': 30,
329
- // 'mode': 2,
330
- // 'options': [],
331
- // 'minSplit': 20,
332
- // 'desc': [
333
- // {
334
- // 'id': 10,
335
- // 'color': '#454545'
336
- // },
337
- // {
338
- // 'id': 12,
339
- // 'color': '#454545'
340
- // }
341
- // ]
342
- // },
343
- // {
344
- // 'name': 'phase3',
345
- // 'id': 3,
346
- // 'value': 30,
347
- // 'mode': 2,
348
- // 'options': [],
349
- // 'minSplit': 20,
350
- // 'desc': [
351
- // {
352
- // 'id': 1,
353
- // 'color': '#454545'
354
- // }
355
- // ]
356
- // },
357
- // {
358
- // 'name': 'phase4',
359
- // 'id': 4,
360
- // 'value': 30,
361
- // 'mode': 2,
362
- // 'options': [],
363
- // 'minSplit': 20,
364
- // 'desc': [
365
- // {
366
- // 'id': 6,
367
- // 'color': '#454545'
368
- // },
369
- // {
370
- // 'id': 8,
371
- // 'color': '#454545'
372
- // }
373
- // ]
374
- // }
375
- // ],
376
- // [
377
- // {
378
- // 'name': 'phase5',
379
- // 'id': 5,
380
- // 'value': 30,
381
- // 'mode': 2,
382
- // 'options': [],
383
- // 'minSplit': 20,
384
- // 'desc': [
385
- // {
386
- // 'id': 9,
387
- // 'color': '#454545'
388
- // }
389
- // ]
390
- // },
391
- // {
392
- // 'name': 'phase6',
393
- // 'id': 6,
394
- // 'value': 30,
395
- // 'mode': 2,
396
- // 'options': [],
397
- // 'minSplit': 20,
398
- // 'desc': [
399
- // {
400
- // 'id': 14,
401
- // 'color': '#454545'
402
- // },
403
- // {
404
- // 'id': 16,
405
- // 'color': '#454545'
406
- // }
407
- // ]
408
- // },
409
- // {
410
- // 'name': 'phase7',
411
- // 'id': 7,
412
- // 'value': 30,
413
- // 'mode': 2,
414
- // 'options': [],
415
- // 'minSplit': 20,
416
- // 'desc': [
417
- // {
418
- // 'id': 5,
419
- // 'color': '#454545'
420
- // }
421
- // ]
422
- // },
423
- // {
424
- // 'name': 'phase8',
425
- // 'id': 8,
426
- // 'value': 30,
427
- // 'mode': 2,
428
- // 'options': [],
429
- // 'minSplit': 20,
430
- // 'desc': [
431
- // {
432
- // 'id': 2,
433
- // 'color': '#454545'
434
- // },
435
- // {
436
- // 'id': 4,
437
- // 'color': '#454545'
438
- // }
439
- // ]
440
- // }
441
- // ],
442
- // [],
443
- // []
444
- // ],
445
- // 'barriers': [
446
- // {
447
- // 'barrier': 1,
448
- // 'length': 60,
449
- // 'items': [
450
- // {
451
- // 'ring': 2,
452
- // 'data': [
453
- // 5,
454
- // 6
455
- // ]
456
- // },
457
- // {
458
- // 'ring': 1,
459
- // 'data': [
460
- // 1,
461
- // 2
462
- // ]
463
- // }
464
- // ]
465
- // },
466
- // {
467
- // 'barrier': 2,
468
- // 'length': 60,
469
- // 'items': [
470
- // {
471
- // 'ring': 2,
472
- // 'data': [
473
- // 7,
474
- // 8
475
- // ]
476
- // },
477
- // {
478
- // 'ring': 1,
479
- // 'data': [
480
- // 3,
481
- // 4
482
- // ]
483
- // }
484
- // ]
485
- // }
486
- // ],
487
- // 'stagesList': [
488
- // {
489
- // 'split': 30,
490
- // 'stages': [
491
- // 1,
492
- // 5
493
- // ]
494
- // },
495
- // {
496
- // 'split': 30,
497
- // 'stages': [
498
- // 2,
499
- // 6
500
- // ]
501
- // },
502
- // {
503
- // 'split': 30,
504
- // 'stages': [
505
- // 3,
506
- // 7
507
- // ]
508
- // },
509
- // {
510
- // 'split': 30,
511
- // 'stages': [
512
- // 4,
513
- // 8
514
- // ]
515
- // }
516
- // ],
517
- // 'stages': [
518
- // [
519
- // 1,
520
- // 5
521
- // ],
522
- // [
523
- // 2,
524
- // 6
525
- // ],
526
- // [
527
- // 3,
528
- // 7
529
- // ],
530
- // [
531
- // 4,
532
- // 8
533
- // ]
534
- // ]
535
- // },
536
- // {
537
- // 'id': 2,
538
- // 'desc': '方案2',
539
- // 'offset': 0,
540
- // 'cycle': 110,
541
- // 'rings': [
542
- // [
543
- // {
544
- // 'name': 'phase1',
545
- // 'id': 1,
546
- // 'value': 20,
547
- // 'mode': 2,
548
- // 'options': [
549
- // 0,
550
- // 0,
551
- // 0
552
- // ],
553
- // 'minSplit': 13,
554
- // 'delaystart': 0,
555
- // 'advanceend': 0
556
- // },
557
- // {
558
- // 'name': 'phase2',
559
- // 'id': 2,
560
- // 'value': 35,
561
- // 'mode': 2,
562
- // 'options': [
563
- // 0,
564
- // 0,
565
- // 0
566
- // ],
567
- // 'minSplit': 13,
568
- // 'delaystart': 0,
569
- // 'advanceend': 0
570
- // },
571
- // {
572
- // 'name': 'phase3',
573
- // 'id': 3,
574
- // 'value': 30,
575
- // 'mode': 2,
576
- // 'options': [
577
- // 0,
578
- // 0,
579
- // 0
580
- // ],
581
- // 'minSplit': 13,
582
- // 'delaystart': 0,
583
- // 'advanceend': 0
584
- // },
585
- // {
586
- // 'name': 'phase4',
587
- // 'id': 4,
588
- // 'value': 25,
589
- // 'mode': 2,
590
- // 'options': [
591
- // 0,
592
- // 0,
593
- // 0
594
- // ],
595
- // 'minSplit': 13,
596
- // 'delaystart': 0,
597
- // 'advanceend': 0
598
- // }
599
- // ],
600
- // [
601
- // {
602
- // 'name': 'Phase 5',
603
- // 'id': 5,
604
- // 'value': 27,
605
- // 'mode': 2,
606
- // 'options': [
607
- // 0,
608
- // 0,
609
- // 0
610
- // ],
611
- // 'minSplit': 13,
612
- // 'delaystart': 0,
613
- // 'advanceend': 0
614
- // },
615
- // {
616
- // 'name': 'Phase 6',
617
- // 'id': 6,
618
- // 'value': 28,
619
- // 'mode': 2,
620
- // 'options': [
621
- // 0,
622
- // 0,
623
- // 0
624
- // ],
625
- // 'minSplit': 13,
626
- // 'delaystart': 0,
627
- // 'advanceend': 0
628
- // },
629
- // {
630
- // 'name': 'Phase 7',
631
- // 'id': 7,
632
- // 'value': 35,
633
- // 'mode': 2,
634
- // 'options': [
635
- // 0,
636
- // 0,
637
- // 0
638
- // ],
639
- // 'minSplit': 13,
640
- // 'delaystart': 0,
641
- // 'advanceend': 0
642
- // },
643
- // {
644
- // 'name': 'Phase 8',
645
- // 'id': 8,
646
- // 'value': 20,
647
- // 'mode': 2,
648
- // 'options': [
649
- // 0,
650
- // 0,
651
- // 0
652
- // ],
653
- // 'minSplit': 13,
654
- // 'delaystart': 0,
655
- // 'advanceend': 0
656
- // }
657
- // ],
658
- // [],
659
- // []
660
- // ],
661
- // 'stagesList': [
662
- // {
663
- // 'split': 20,
664
- // 'stages': [
665
- // 1,
666
- // 5
667
- // ],
668
- // 'delaystart': 0,
669
- // 'advanceend': 0
670
- // },
671
- // {
672
- // 'split': 7,
673
- // 'stages': [
674
- // 2,
675
- // 5
676
- // ],
677
- // 'delaystart': 0,
678
- // 'advanceend': 0
679
- // },
680
- // {
681
- // 'split': 28,
682
- // 'stages': [
683
- // 2,
684
- // 6
685
- // ],
686
- // 'delaystart': 0,
687
- // 'advanceend': 0
688
- // },
689
- // {
690
- // 'split': 30,
691
- // 'stages': [
692
- // 3,
693
- // 7
694
- // ],
695
- // 'delaystart': 0,
696
- // 'advanceend': 0
697
- // },
698
- // {
699
- // 'split': 5,
700
- // 'stages': [
701
- // 4,
702
- // 7
703
- // ],
704
- // 'delaystart': 0,
705
- // 'advanceend': 0
706
- // },
707
- // {
708
- // 'split': 20,
709
- // 'stages': [
710
- // 4,
711
- // 8
712
- // ],
713
- // 'delaystart': 0,
714
- // 'advanceend': 0
715
- // }
716
- // ],
717
- // 'stages': [
718
- // [
719
- // 1,
720
- // 5
721
- // ],
722
- // [
723
- // 2,
724
- // 5
725
- // ],
726
- // [
727
- // 2,
728
- // 6
729
- // ],
730
- // [
731
- // 3,
732
- // 7
733
- // ],
734
- // [
735
- // 4,
736
- // 7
737
- // ],
738
- // [
739
- // 4,
740
- // 8
741
- // ]
742
- // ],
743
- // 'barriers': [
744
- // {
745
- // 'barrier': 1,
746
- // 'length': 55,
747
- // 'items': [
748
- // {
749
- // 'ring': 2,
750
- // 'data': [
751
- // 5,
752
- // 6
753
- // ]
754
- // },
755
- // {
756
- // 'ring': 1,
757
- // 'data': [
758
- // 1,
759
- // 2
760
- // ]
761
- // }
762
- // ]
763
- // },
764
- // {
765
- // 'barrier': 2,
766
- // 'length': 55,
767
- // 'items': [
768
- // {
769
- // 'ring': 2,
770
- // 'data': [
771
- // 7,
772
- // 8
773
- // ]
774
- // },
775
- // {
776
- // 'ring': 1,
777
- // 'data': [
778
- // 3,
779
- // 4
780
- // ]
781
- // }
782
- // ]
783
- // }
784
- // ]
785
- // },
786
- // {
787
- // 'id': 3,
788
- // 'desc': '方案3',
789
- // 'offset': 0,
790
- // 'cycle': 120,
791
- // 'rings': [
792
- // [
793
- // {
794
- // 'name': 'phase1',
795
- // 'id': 1,
796
- // 'value': 40,
797
- // 'mode': 2,
798
- // 'options': [
799
- // 0,
800
- // 0,
801
- // 0
802
- // ],
803
- // 'minSplit': 13,
804
- // 'delaystart': 0,
805
- // 'advanceend': 0
806
- // },
807
- // {
808
- // 'name': 'phase2',
809
- // 'id': 2,
810
- // 'value': 20,
811
- // 'mode': 2,
812
- // 'options': [
813
- // 0,
814
- // 0,
815
- // 0
816
- // ],
817
- // 'minSplit': 13,
818
- // 'delaystart': 0,
819
- // 'advanceend': 0
820
- // },
821
- // {
822
- // 'name': 'phase3',
823
- // 'id': 3,
824
- // 'value': 30,
825
- // 'mode': 2,
826
- // 'options': [
827
- // 0,
828
- // 0,
829
- // 0
830
- // ],
831
- // 'minSplit': 13,
832
- // 'delaystart': 0,
833
- // 'advanceend': 0
834
- // },
835
- // {
836
- // 'name': 'phase4',
837
- // 'id': 4,
838
- // 'value': 30,
839
- // 'mode': 2,
840
- // 'options': [
841
- // 0,
842
- // 0,
843
- // 0
844
- // ],
845
- // 'minSplit': 13,
846
- // 'delaystart': 0,
847
- // 'advanceend': 0
848
- // }
849
- // ],
850
- // [
851
- // {
852
- // 'name': 'Phase 5',
853
- // 'id': 5,
854
- // 'value': 20,
855
- // 'mode': 2,
856
- // 'options': [
857
- // 0,
858
- // 0,
859
- // 0
860
- // ],
861
- // 'minSplit': 13,
862
- // 'delaystart': 0,
863
- // 'advanceend': 0
864
- // },
865
- // {
866
- // 'name': 'Phase 6',
867
- // 'id': 6,
868
- // 'value': 40,
869
- // 'mode': 2,
870
- // 'options': [
871
- // 0,
872
- // 0,
873
- // 0
874
- // ],
875
- // 'minSplit': 13,
876
- // 'delaystart': 0,
877
- // 'advanceend': 0
878
- // },
879
- // {
880
- // 'name': 'Phase 7',
881
- // 'id': 7,
882
- // 'value': 30,
883
- // 'mode': 2,
884
- // 'options': [
885
- // 0,
886
- // 0,
887
- // 0
888
- // ],
889
- // 'minSplit': 13,
890
- // 'delaystart': 0,
891
- // 'advanceend': 0
892
- // },
893
- // {
894
- // 'name': 'Phase 8',
895
- // 'id': 8,
896
- // 'value': 30,
897
- // 'mode': 2,
898
- // 'options': [
899
- // 0,
900
- // 0,
901
- // 0
902
- // ],
903
- // 'minSplit': 13,
904
- // 'delaystart': 0,
905
- // 'advanceend': 0
906
- // }
907
- // ],
908
- // [],
909
- // []
910
- // ],
911
- // 'stagesList': [
912
- // {
913
- // 'split': 20,
914
- // 'stages': [
915
- // 1,
916
- // 5
917
- // ],
918
- // 'delaystart': 0,
919
- // 'advanceend': 0
920
- // },
921
- // {
922
- // 'split': 20,
923
- // 'stages': [
924
- // 1,
925
- // 6
926
- // ],
927
- // 'delaystart': 0,
928
- // 'advanceend': 0
929
- // },
930
- // {
931
- // 'split': 20,
932
- // 'stages': [
933
- // 2,
934
- // 6
935
- // ],
936
- // 'delaystart': 0,
937
- // 'advanceend': 0
938
- // },
939
- // {
940
- // 'split': 30,
941
- // 'stages': [
942
- // 3,
943
- // 7
944
- // ],
945
- // 'delaystart': 0,
946
- // 'advanceend': 0
947
- // },
948
- // {
949
- // 'split': 30,
950
- // 'stages': [
951
- // 4,
952
- // 8
953
- // ],
954
- // 'delaystart': 0,
955
- // 'advanceend': 0
956
- // }
957
- // ],
958
- // 'stages': [
959
- // [
960
- // 1,
961
- // 5
962
- // ],
963
- // [
964
- // 1,
965
- // 6
966
- // ],
967
- // [
968
- // 2,
969
- // 6
970
- // ],
971
- // [
972
- // 3,
973
- // 7
974
- // ],
975
- // [
976
- // 4,
977
- // 8
978
- // ]
979
- // ],
980
- // 'barriers': [
981
- // {
982
- // 'barrier': 1,
983
- // 'length': 60,
984
- // 'items': [
985
- // {
986
- // 'ring': 2,
987
- // 'data': [
988
- // 5,
989
- // 6
990
- // ]
991
- // },
992
- // {
993
- // 'ring': 1,
994
- // 'data': [
995
- // 1,
996
- // 2
997
- // ]
998
- // }
999
- // ]
1000
- // },
1001
- // {
1002
- // 'barrier': 2,
1003
- // 'length': 60,
1004
- // 'items': [
1005
- // {
1006
- // 'ring': 2,
1007
- // 'data': [
1008
- // 7,
1009
- // 8
1010
- // ]
1011
- // },
1012
- // {
1013
- // 'ring': 1,
1014
- // 'data': [
1015
- // 3,
1016
- // 4
1017
- // ]
1018
- // }
1019
- // ]
1020
- // }
1021
- // ]
1022
- // }
1023
- // ],
1024
- manualInfo: {
1025
- tempPatternid: '',
1026
- offset: 0,
1027
- duration: 300,
1028
- tempDelay: 0 // 控制方式手动操作的情况下的延迟时间的临时值。
1029
- // tempDuration: 300 // 控制方式手动操作的情况下的持续时间的临时值。
1030
- }
1031
- }
1032
- },
1033
- created () {
1034
- this.patternPlan()
1035
- this.getCycle()
1036
- if (this.patternOne.length === 0) {
1037
- this.handleStageData(this.planPattern.rings)
1038
- }
1039
- this.initData()
1040
- },
1041
- methods: {
1042
- patternPlan () {
1043
- let Pattern = {
1044
- offset: 0,
1045
- cycle: 0,
1046
- rings: [[], [], [], []]
1047
- }
1048
- var newPattern = JSON.parse(JSON.stringify(Pattern))
1049
- for (let phase of this.phaseList) {
1050
- let ring = {}
1051
- ring.name = 'Phase ' + phase.id
1052
- ring.desc = this.getPhaseDescription(phase.direction)
1053
- ring.id = phase.id
1054
- ring.value = 30
1055
- ring.mode = 2
1056
- ring.options = []
1057
- ring.delaystart = 0
1058
- ring.advanceend = 0
1059
- if (phase.ring === 1) {
1060
- newPattern.rings[0].push(ring)
1061
- } else if (phase.ring === 2) {
1062
- newPattern.rings[1].push(ring)
1063
- } else if (phase.ring === 3) {
1064
- newPattern.rings[2].push(ring)
1065
- } else if (phase.ring === 4) {
1066
- newPattern.rings[3].push(ring)
1067
- }
1068
- }
1069
- this.planPattern = newPattern
1070
- },
1071
- getCycle () {
1072
- for (let rings of this.planPattern.rings) {
1073
- let num = 0
1074
- for (let i = 0; i < rings.length; i++) {
1075
- if (rings[i].length !== 0) {
1076
- if (rings[i].mode === 7) { // 忽略相位不计周期
1077
- continue
1078
- }
1079
- num = num + Number(rings[i].value)
1080
- }
1081
- }
1082
- if (num !== 0) {
1083
- this.planPattern.cycle = num
1084
- break
1085
- }
1086
- }
1087
- },
1088
- getPhaseDescription (phaseList) {
1089
- if (!phaseList) return
1090
- let list = []
1091
- for (let id of phaseList) {
1092
- let obj = {}
1093
- obj.id = id
1094
- obj.color = '#454545'
1095
- list.push(obj)
1096
- }
1097
- return list
1098
- },
1099
- handleClose () {
1100
- this.$emit('closePhaseBack')
1101
- },
1102
- onStageSplitChange (diff, rowIndex, subIndex) {
1103
- let stageArr = this.stagesList[subIndex].stages
1104
- let row = this.patternList[rowIndex]
1105
- let ringsList = row.rings
1106
- for (let rings of ringsList) {
1107
- for (let ring of rings) {
1108
- if (stageArr.includes(ring.id)) {
1109
- ring.value = (ring.value ? ring.value : 0) + diff
1110
- continue
1111
- }
1112
- }
1113
- }
1114
- },
1115
- stageSplitChange (diff, rowIndex, subIndex) {
1116
- let row = this.patternList[rowIndex]
1117
- let ringsList = row.stagesList
1118
- for (let rings of ringsList) {
1119
- if (subIndex === rings.key) {
1120
- rings.stageSplit = (rings.green ? rings.green : 0) + (rings.yellow ? rings.yellow : 0) + (rings.red ? rings.red : 0)
1121
- continue
1122
- }
1123
- }
1124
- },
1125
- onStageDelaystartChange (diff, rowIndex, subIndex) {
1126
- let stageArr = this.stagesList[subIndex].stages
1127
- let row = this.patternList[rowIndex]
1128
- let ringsList = row.rings
1129
- for (let rings of ringsList) {
1130
- for (let ring of rings) {
1131
- if (stageArr.includes(ring.id)) {
1132
- ring.delaystart = (ring.delaystart ? ring.delaystart : 0) + diff
1133
- continue
1134
- }
1135
- }
1136
- }
1137
- },
1138
- onStageAdvanceendChange (diff, rowIndex, subIndex) {
1139
- let stageArr = this.stagesList[subIndex].stages
1140
- let row = this.patternList[rowIndex]
1141
- let ringsList = row.rings
1142
- for (let rings of ringsList) {
1143
- for (let ring of rings) {
1144
- if (stageArr.includes(ring.id)) {
1145
- ring.advanceend = (ring.advanceend ? ring.advanceend : 0) + diff
1146
- continue
1147
- }
1148
- }
1149
- }
1150
- },
1151
- handleSplit (index) {
1152
- if (this.patternOne.length > 0) {
1153
- let currPattern = this.patternOne[0].rings
1154
- setTimeout(() => {
1155
- this.handleStageData(currPattern)
1156
- }, 50)
1157
- } else {
1158
- let currPattern = this.planPattern.rings
1159
- setTimeout(() => {
1160
- this.handleStageData(currPattern)
1161
- }, 50)
1162
- }
1163
- },
1164
- selectPattern () {
1165
- this.manualInfo.offset = 0
1166
- let selectId = isNaN(parseInt(this.manualInfo.tempPatternid)) ? Number(this.manualInfo.tempPatternid.replace(/[^0-9]/ig, '')) : this.manualInfo.tempPatternid
1167
- this.patternOne = this.allPatternList.filter(item => {
1168
- return item.id === selectId
1169
- })
1170
- this.manualInfo.offset = this.offset
1171
- for (let rings of this.patternOne[0].rings) {
1172
- if (rings.length === 0) continue
1173
- for (let ring of rings) {
1174
- if (ring.value === 0) continue
1175
- let currPhase = this.phaseList.filter((item) => {
1176
- return item.id === ring.id
1177
- })[0]
1178
- ring.desc = currPhase.direction.map(item => {
1179
- return {
1180
- id: item,
1181
- color: '#454545'
1182
- }
1183
- })
1184
- }
1185
- }
1186
- this.handleStageData(this.patternOne[0].rings)
1187
- },
1188
- handleStageData (rings) { // stagesList
1189
- for (let i = 0; i < rings.length; i++) {
1190
- if (rings[i].length > 0) {
1191
- let phaseList = []
1192
- let stagesList = []
1193
- // rings = JSON.parse(JSON.stringify(rings))
1194
- let mapAdd = rings.map(item => {
1195
- return item.map(val => {
1196
- return val.value + (val.sum ? val.sum : 0)
1197
- })
1198
- })
1199
- let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
1200
- return item.length > 0 ? item.reduce((a, b) => {
1201
- return a + b
1202
- }) : 0
1203
- }) : 0
1204
- this.max = Math.max(...maxCycle)// 每个环的周期最大值
1205
- this.stateList = [0]
1206
- this.narr = []
1207
- let currentIds = ''
1208
- let lastCurrentIds = ''
1209
- for (let j = 0; j <= this.max; j++) { // 指针长度
1210
- for (let i = 0; i < rings.length; i++) { // 环列表
1211
- let ring = rings[i]// 每个环对象
1212
- let sum = 0
1213
- for (let n = 0; n < ring.length; n++) { // 相位累计长度
1214
- if (ring[n].mode !== 7) {
1215
- sum = sum + ring[n].value + (ring[n].sum ? ring[n].sum : 0)
1216
- if (j < sum) {
1217
- let phaseId = ring[n].id
1218
- currentIds = currentIds + '-' + phaseId
1219
- break
1220
- }
1221
- }
1222
- }
1223
- }
1224
- if (lastCurrentIds !== currentIds && lastCurrentIds !== '') { // 当前相位id和上一个相比不同说明相位变化了
1225
- phaseList.push(lastCurrentIds)
1226
- this.stateList.push(j)// 阶段累计长度的集合
1227
- }
1228
- lastCurrentIds = currentIds
1229
- currentIds = ''
1230
- }
1231
- let newPhaselist = []
1232
- phaseList.forEach(i => {
1233
- let rangeArr = i.split('-').map(Number)
1234
- if (rangeArr.length > 2) {
1235
- newPhaselist.push([
1236
- JSON.parse(JSON.stringify(rangeArr[1])),
1237
- JSON.parse(JSON.stringify(rangeArr[2]))
1238
- ])
1239
- } else {
1240
- newPhaselist.push([
1241
- JSON.parse(JSON.stringify(rangeArr[1]))
1242
- ])
1243
- }
1244
- })
1245
- for (let i = this.stateList.length - 1; i >= 1; i--) {
1246
- this.narr.push(this.stateList[i] - this.stateList[i - 1])
1247
- }
1248
- // newPhaselist
1249
- this.narr.reverse()// 阶段差
1250
- for (let i = 0; i < newPhaselist.length; i++) {
1251
- let stage = JSON.parse(JSON.stringify(newPhaselist[i]))
1252
- let stageItem = this.getStageItem(stage, rings, i)
1253
- stagesList.push(JSON.parse(JSON.stringify(stageItem)))
1254
- }
1255
- this.stagesList = JSON.parse(JSON.stringify(stagesList))
1256
- }
1257
- }
1258
- },
1259
- getStageItem (stageArr, ringsList, i) {
1260
- let res = {
1261
- key: i,
1262
- split: this.narr[i], // 阶段绿性比
1263
- stages: stageArr,
1264
- delaystart: 0,
1265
- advanceend: 0
1266
- }
1267
- // let splitArr = []
1268
- let delaystartArr = []
1269
- let advanceendArr = []
1270
- for (let rings of ringsList) {
1271
- for (let ring of rings) {
1272
- if (stageArr.includes(ring.id)) {
1273
- // let split = ring.value
1274
- let delaystart = ring.delaystart
1275
- let advanceend = ring.advanceend
1276
- // splitArr.push(split)
1277
- delaystartArr.push(delaystart)
1278
- advanceendArr.push(advanceend)
1279
- }
1280
- }
1281
- }
1282
- // splitArr.sort(function (a, b) { return a - b })
1283
- delaystartArr.sort(function (a, b) { return b - a })
1284
- advanceendArr.sort(function (a, b) { return a - b })
1285
- // res.split = splitArr.length > 0 ? splitArr[0] : 0
1286
- res.delaystart = delaystartArr.length > 0 ? delaystartArr[0] : 0
1287
- res.advanceend = advanceendArr.length > 0 ? advanceendArr[0] : 0
1288
- return res
1289
- },
1290
- initData () {
1291
- // 判断有几个环,就创建几个看板
1292
- // let phaseList = this.globalParamModel.getParamsByType('phaseList')
1293
- this.coordphaseOption = this.phaseList.map(ele => {
1294
- return {
1295
- value: ele.id
1296
- }
1297
- })
1298
- // this.overlap = this.globalParamModel.getParamsByType('overlaplList')
1299
- // this.agentId = getIframdevid()
1300
- let rings = []
1301
- if (this.phaseList.length === 0) {
1302
- // this.$store.getters.tscParam.patternList = []
1303
- return
1304
- }
1305
- for (let phase of this.phaseList) {
1306
- rings.push(phase.ring)
1307
- }
1308
- this.ringCount = Array.from(new Set(rings)) // 去除数组重复的元素
1309
- this.ringCount = this.ringCount.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
1310
- this.ringCounts = Array.from(new Set(rings)) // 去除数组重复的元素
1311
- this.ringCounts = this.ringCounts.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
1312
- // this.increaseId()
1313
- // this.getCycle()
1314
- // this.updatePhaseDescription()
1315
- // this.getOptionsOfRing()
1316
- },
1317
- sortNumbers (a, b) {
1318
- return a - b
1319
- },
1320
- isRingCycleEqual (rings) {
1321
- let isequal = true
1322
- // this.patternmsg = []
1323
- let maxCycle = 0
1324
- for (let ring of rings) {
1325
- if (ring.length === 0) continue
1326
- let cycle = 0
1327
- for (let r of ring) {
1328
- if (r.mode === 7) { // 忽略相位不计周期
1329
- continue
1330
- }
1331
- cycle = cycle + r.value
1332
- }
1333
- if (cycle > maxCycle && maxCycle === 0) {
1334
- maxCycle = cycle
1335
- }
1336
- if (cycle !== maxCycle) {
1337
- // this.patternmsg.push(rings.id)
1338
- isequal = false
1339
- }
1340
- }
1341
- return isequal
1342
- },
1343
- checkPatternRules (rings) {
1344
- if (!this.isRingCycleEqual(rings)) {
1345
- this.patternCycleEqual = false
1346
- } else {
1347
- this.patternCycleEqual = true
1348
- }
1349
- if (!this.patternCycleEqual) {
1350
- let mess = `方案中存在环周期时长不一致`
1351
- if (this.$i18n.locale === 'en') {
1352
- mess = `Inconsistent loop cycle durations exist in the scheme`
1353
- }
1354
- this.$message({
1355
- message: mess,
1356
- type: 'error',
1357
- dangerouslyUseHTMLString: true
1358
- })
1359
- return false
1360
- }
1361
- },
1362
- handleManualControl () {
1363
- let submitdata = {
1364
- control: 100,
1365
- delay: this.manualInfo.tempDelay !== undefined ? Number(this.manualInfo.tempDelay) : 0,
1366
- duration: Number(this.manualInfo.duration),
1367
- // duration: this.manualInfo.tempDuration !== undefined ? Number(this.manualInfo.tempDuration) : 0,
1368
- data: {}
1369
- }
1370
- submitdata.data.offset = this.offset
1371
- submitdata.data.cycle = this.cycle
1372
- submitdata.data.rings = this.rings
1373
- this.checkPatternRules(submitdata.data.rings)
1374
- if (this.patternCycleEqual) {
1375
- this.$emit('closePhaseControl', submitdata)
1376
- }
1377
- }
1378
- }
1379
- }
1380
- </script>
1381
-
1382
- <style>
1383
-
1384
- </style>
1
+ <template>
2
+ <div class="tentativeplan-control">
3
+ <div class="title" style="margin-bottom: 18px;">{{$t('openatccomponents.overview.tentativeplan')}}</div>
4
+ <el-row>
5
+ <el-col :span="12">
6
+ <el-form
7
+ ref="manual"
8
+ label-position="left"
9
+ :model="manualInfo"
10
+ label-width="100px">
11
+ <el-form-item
12
+ :label="$t('openatccomponents.overview.patternid') + ':'"
13
+ prop="count">
14
+ <el-select @change="selectPattern()" v-model="manualInfo.tempPatternid" class="col-inner" size="small" :placeholder="$t('openatccomponents.common.select')">
15
+ <el-option
16
+ v-for="item in patternSelect"
17
+ :key="item.value"
18
+ :value="item.desc">
19
+ </el-option>
20
+ </el-select>
21
+ <!-- <el-input v-model="manualInfo.tempDuration" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
22
+ </el-form-item>
23
+ <el-form-item
24
+ :label="$t('openatccomponents.overview.delay') + ':'"
25
+ prop="intersection">
26
+ <el-input v-model="manualInfo.tempDelay" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
27
+ </el-form-item>
28
+ </el-form>
29
+ </el-col>
30
+ <el-col :span="12">
31
+ <el-form
32
+ ref="manual"
33
+ label-position="left"
34
+ :model="manualInfo"
35
+ label-width="100px">
36
+ <el-form-item
37
+ :label="$t('openatccomponents.overview.patternoffset') + ':'"
38
+ prop="count">
39
+ <el-input v-model="manualInfo.offset" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
40
+ </el-form-item>
41
+ <el-form-item
42
+ :label="$t('openatccomponents.overview.duration') + ':'"
43
+ prop="intersection">
44
+ <el-input v-model="manualInfo.duration" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
45
+ </el-form-item>
46
+ </el-form>
47
+ </el-col>
48
+ </el-row>
49
+ <el-row>
50
+ <div class="title" style="margin-top:18px; margin-bottom:10px">{{$t('openatccomponents.overview.patternstate')}}:
51
+ <span>({{$t('openatccomponents.overview.cycle')}}: {{cycle}} {{$t('openatccomponents.overview.patternoffset')}}: {{offset}})</span>
52
+ </div>
53
+ <stage-status
54
+ :patternStatusList="patternOne.length===0?planPattern.rings:patternOne[0].rings"
55
+ >
56
+ </stage-status>
57
+ <pattern-list
58
+ :patternList="patternOne.length===0?planPattern.rings:patternOne"
59
+ :patternStatusList="patternOne.length===0?planPattern.rings:patternOne[0].rings"
60
+ :cycles="patternOne.length===0?planPattern.cycle:patternOne[0].cycle"
61
+ :phaseList="phaseList">
62
+ </pattern-list>
63
+ </el-row>
64
+ <el-row>
65
+ <el-tabs v-model="activeList" type="card">
66
+ <el-tab-pane :label="$t('openatccomponents.pattern.ringConfig')" name="ring">
67
+ <!-- <el-row :gutter="20"> -->
68
+ <!-- <el-col :span="12" > -->
69
+ <!-- <div class="components-container board" > -->
70
+ <div style="width: 100%; overflow: hidden;margin-top: 20px;">
71
+ <kan-ban v-for="n in ringCount"
72
+ :key="n" class="closephasekanban"
73
+ :index="n"
74
+ :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
75
+ :list="patternOne.length===0?planPattern.rings[n-1]:patternOne[0].rings[n-1]"
76
+ :phaseList="phaseList"
77
+ :header-text="$t('openatccomponents.pattern.ring')+n"
78
+ @handleSplit="handleSplit">
79
+ </kan-ban>
80
+ </div>
81
+ <!-- </el-col> -->
82
+ <!-- </el-row> -->
83
+ </el-tab-pane>
84
+ <el-tab-pane :label="$t('openatccomponents.pattern.stageConfig')" name="kanban">
85
+ <el-scrollbar :vertical="true">
86
+ <div class="stage-panel-contener">
87
+ <stage-board v-for="(stage,index) in patternOne.length===0?allPatternList[0].stagesList:patternOne[0].stagesList"
88
+ class="closephasekanban"
89
+ :key="index"
90
+ :stage="stage"
91
+ :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
92
+ :stageInfo="patternOne.length===0?allPatternList[0].stagesList:patternOne[0].stagesList"
93
+ :coordphaseOption="coordphaseOption"
94
+ :subIndex="index"
95
+ @onStageSplitChange="onStageSplitChange"
96
+ @stageSplitChange="stageSplitChange"
97
+ @onStageDelaystartChange="onStageDelaystartChange"
98
+ @onStageAdvanceendChange="onStageAdvanceendChange"
99
+ >
100
+ </stage-board>
101
+ </div>
102
+ </el-scrollbar>
103
+ </el-tab-pane>
104
+ <el-tab-pane :label="$t('openatccomponents.pattern.parameters')" name="parame">
105
+ <el-row>
106
+ <!-- <el-col :span="12"> -->
107
+ <expend-config
108
+ v-for="(j,index) in ringCounts"
109
+ :key="index"
110
+ class="closephasekanban"
111
+ :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
112
+ :header-text="$t('openatccomponents.pattern.ring')+j"
113
+ :list="patternOne.length===0?planPattern.rings[j-1]:patternOne[0].rings[j-1]"
114
+ >
115
+ </expend-config>
116
+ <!-- </el-col> -->
117
+ <!-- <el-col :span="12"> -->
118
+ <div style="width: 60%;margin: 10px auto;color:#ffffff">
119
+ {{$t('openatccomponents.pattern.forbiddenstage')}}
120
+ <el-input class="stage-value" size="small" v-model="forbiddenstage"></el-input>
121
+ </div>
122
+ <div style="width: 60%;margin: 10px auto;color:#ffffff">
123
+ {{$t('openatccomponents.pattern.screenstage')}}
124
+ <el-input class="stage-value" size="small" v-model="screenstage"></el-input>
125
+ </div>
126
+ <div style="width: 60%;margin: 10px auto;color:#ffffff">
127
+ <!-- <el-col :span="8"> -->
128
+ {{$t('openatccomponents.pattern.coordinatestage')}}
129
+ <el-input class="stage-value" size="small" v-model="coordinatestage"></el-input>
130
+ <!-- </el-col> -->
131
+ </div>
132
+ <!-- </el-col> -->
133
+ </el-row>
134
+ </el-tab-pane>
135
+ <el-tab-pane :label="$t('openatccomponents.pattern.overLap')" name="overlap">
136
+ <el-row :gutter="20">
137
+ <el-col :span="24" >
138
+ <over-lap
139
+ :stageList="stagesList"
140
+ :overlap="overlap"
141
+ :checked="true"
142
+ :tentative="true"
143
+ :cycle="patternOne.length===0?planPattern.cycle:patternOne[0].cycle"
144
+ >
145
+ </over-lap>
146
+ </el-col>
147
+ </el-row>
148
+ </el-tab-pane>
149
+ </el-tabs>
150
+ </el-row>
151
+ <div class="footer">
152
+ <el-button @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
153
+ <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
154
+ </div>
155
+ </div>
156
+ </template>
157
+
158
+ <script>
159
+ export default {
160
+ name: 'tentativeplancontrol',
161
+ props: {
162
+ controlData: {
163
+ type: Object
164
+ },
165
+ phaseList: {
166
+ type: Array
167
+ },
168
+ overlap: {
169
+ type: Array
170
+ },
171
+ allPatternList: {
172
+ type: Array
173
+ },
174
+ patternSelect: {
175
+ type: Array
176
+ }
177
+ },
178
+ computed: {
179
+ rings () {
180
+ return this.patternOne.length === 0 ? this.planPattern.rings : this.patternOne[0].rings
181
+ },
182
+ cycle () {
183
+ return this.patternOne.length === 0 ? this.max : (this.patternOne.length > 0 && (this.patternOne[0].cycle < this.max)) ? this.max : this.patternOne[0].cycle
184
+ },
185
+ offset () {
186
+ return Number((this.patternOne.length === 0 || this.manualInfo.offset > 0) ? this.manualInfo.offset : this.patternOne[0].offset)
187
+ },
188
+ forbiddenstage () {
189
+ return this.patternOne.length === 0 ? this.allPatternList[0].forbiddenstage : this.patternOne[0].forbiddenstage
190
+ },
191
+ screenstage () {
192
+ return this.patternOne.length === 0 ? this.allPatternList[0].screenstage : this.patternOne[0].screenstage
193
+ },
194
+ coordinatestage () {
195
+ return this.patternOne.length === 0 ? this.allPatternList[0].coordinatestage : this.patternOne[0].coordinatestage
196
+ }
197
+ },
198
+ data () {
199
+ return {
200
+ stagesList: [],
201
+ phaseRings: [],
202
+ options: {
203
+ group: 'pattern'
204
+ },
205
+ // overlap: [
206
+ // {
207
+ // 'id': 1,
208
+ // 'desc': '东方向南半测行人相位',
209
+ // 'includedphases': [
210
+ // 1,
211
+ // 8
212
+ // ],
213
+ // 'peddirection': [
214
+ // 6
215
+ // ]
216
+ // },
217
+ // {
218
+ // 'id': 2,
219
+ // 'desc': '东方向北半测行人相位',
220
+ // 'includedphases': [
221
+ // 1,
222
+ // 2
223
+ // ],
224
+ // 'peddirection': [
225
+ // 5
226
+ // ]
227
+ // },
228
+ // {
229
+ // 'id': 3,
230
+ // 'desc': '西方向南半测行人相位',
231
+ // 'includedphases': [
232
+ // 5,
233
+ // 6
234
+ // ],
235
+ // 'peddirection': [
236
+ // 8
237
+ // ]
238
+ // },
239
+ // {
240
+ // 'id': 4,
241
+ // 'desc': '西方向北半测行人相位',
242
+ // 'includedphases': [
243
+ // 4,
244
+ // 5
245
+ // ],
246
+ // 'peddirection': [
247
+ // 7
248
+ // ]
249
+ // },
250
+ // {
251
+ // 'id': 5,
252
+ // 'desc': '南方向东半测行人相位',
253
+ // 'includedphases': [
254
+ // 7,
255
+ // 8
256
+ // ],
257
+ // 'peddirection': [
258
+ // 10
259
+ // ]
260
+ // },
261
+ // {
262
+ // 'id': 6,
263
+ // 'desc': '南方向西半测行人相位',
264
+ // 'includedphases': [
265
+ // 6,
266
+ // 7
267
+ // ],
268
+ // 'peddirection': [
269
+ // 9
270
+ // ]
271
+ // },
272
+ // {
273
+ // 'id': 7,
274
+ // 'desc': '北方向东半测行人相位',
275
+ // 'includedphases': [
276
+ // 2,
277
+ // 3
278
+ // ],
279
+ // 'peddirection': [
280
+ // 12
281
+ // ]
282
+ // },
283
+ // {
284
+ // 'id': 8,
285
+ // 'desc': '北方向西半测行人相位',
286
+ // 'includedphases': [
287
+ // 3,
288
+ // 4
289
+ // ],
290
+ // 'peddirection': [
291
+ // 11
292
+ // ]
293
+ // }
294
+ // ],
295
+ max: '',
296
+ patternCycleEqual: true,
297
+ activeList: 'ring',
298
+ ringCount: 1,
299
+ ringCounts: 1,
300
+ coordphaseOption: [],
301
+ patternOne: [],
302
+ planPattern: {},
303
+ // allPatternList: [
304
+ // {
305
+ // 'id': 1,
306
+ // 'desc': '',
307
+ // 'offset': 10,
308
+ // 'cycle': 120,
309
+ // 'rings': [
310
+ // [
311
+ // {
312
+ // 'name': 'phase1',
313
+ // 'id': 1,
314
+ // 'value': 30,
315
+ // 'mode': 2,
316
+ // 'options': [],
317
+ // 'minSplit': 20,
318
+ // 'desc': [
319
+ // {
320
+ // 'id': 13,
321
+ // 'color': '#454545'
322
+ // }
323
+ // ]
324
+ // },
325
+ // {
326
+ // 'name': 'phase2',
327
+ // 'id': 2,
328
+ // 'value': 30,
329
+ // 'mode': 2,
330
+ // 'options': [],
331
+ // 'minSplit': 20,
332
+ // 'desc': [
333
+ // {
334
+ // 'id': 10,
335
+ // 'color': '#454545'
336
+ // },
337
+ // {
338
+ // 'id': 12,
339
+ // 'color': '#454545'
340
+ // }
341
+ // ]
342
+ // },
343
+ // {
344
+ // 'name': 'phase3',
345
+ // 'id': 3,
346
+ // 'value': 30,
347
+ // 'mode': 2,
348
+ // 'options': [],
349
+ // 'minSplit': 20,
350
+ // 'desc': [
351
+ // {
352
+ // 'id': 1,
353
+ // 'color': '#454545'
354
+ // }
355
+ // ]
356
+ // },
357
+ // {
358
+ // 'name': 'phase4',
359
+ // 'id': 4,
360
+ // 'value': 30,
361
+ // 'mode': 2,
362
+ // 'options': [],
363
+ // 'minSplit': 20,
364
+ // 'desc': [
365
+ // {
366
+ // 'id': 6,
367
+ // 'color': '#454545'
368
+ // },
369
+ // {
370
+ // 'id': 8,
371
+ // 'color': '#454545'
372
+ // }
373
+ // ]
374
+ // }
375
+ // ],
376
+ // [
377
+ // {
378
+ // 'name': 'phase5',
379
+ // 'id': 5,
380
+ // 'value': 30,
381
+ // 'mode': 2,
382
+ // 'options': [],
383
+ // 'minSplit': 20,
384
+ // 'desc': [
385
+ // {
386
+ // 'id': 9,
387
+ // 'color': '#454545'
388
+ // }
389
+ // ]
390
+ // },
391
+ // {
392
+ // 'name': 'phase6',
393
+ // 'id': 6,
394
+ // 'value': 30,
395
+ // 'mode': 2,
396
+ // 'options': [],
397
+ // 'minSplit': 20,
398
+ // 'desc': [
399
+ // {
400
+ // 'id': 14,
401
+ // 'color': '#454545'
402
+ // },
403
+ // {
404
+ // 'id': 16,
405
+ // 'color': '#454545'
406
+ // }
407
+ // ]
408
+ // },
409
+ // {
410
+ // 'name': 'phase7',
411
+ // 'id': 7,
412
+ // 'value': 30,
413
+ // 'mode': 2,
414
+ // 'options': [],
415
+ // 'minSplit': 20,
416
+ // 'desc': [
417
+ // {
418
+ // 'id': 5,
419
+ // 'color': '#454545'
420
+ // }
421
+ // ]
422
+ // },
423
+ // {
424
+ // 'name': 'phase8',
425
+ // 'id': 8,
426
+ // 'value': 30,
427
+ // 'mode': 2,
428
+ // 'options': [],
429
+ // 'minSplit': 20,
430
+ // 'desc': [
431
+ // {
432
+ // 'id': 2,
433
+ // 'color': '#454545'
434
+ // },
435
+ // {
436
+ // 'id': 4,
437
+ // 'color': '#454545'
438
+ // }
439
+ // ]
440
+ // }
441
+ // ],
442
+ // [],
443
+ // []
444
+ // ],
445
+ // 'barriers': [
446
+ // {
447
+ // 'barrier': 1,
448
+ // 'length': 60,
449
+ // 'items': [
450
+ // {
451
+ // 'ring': 2,
452
+ // 'data': [
453
+ // 5,
454
+ // 6
455
+ // ]
456
+ // },
457
+ // {
458
+ // 'ring': 1,
459
+ // 'data': [
460
+ // 1,
461
+ // 2
462
+ // ]
463
+ // }
464
+ // ]
465
+ // },
466
+ // {
467
+ // 'barrier': 2,
468
+ // 'length': 60,
469
+ // 'items': [
470
+ // {
471
+ // 'ring': 2,
472
+ // 'data': [
473
+ // 7,
474
+ // 8
475
+ // ]
476
+ // },
477
+ // {
478
+ // 'ring': 1,
479
+ // 'data': [
480
+ // 3,
481
+ // 4
482
+ // ]
483
+ // }
484
+ // ]
485
+ // }
486
+ // ],
487
+ // 'stagesList': [
488
+ // {
489
+ // 'split': 30,
490
+ // 'stages': [
491
+ // 1,
492
+ // 5
493
+ // ]
494
+ // },
495
+ // {
496
+ // 'split': 30,
497
+ // 'stages': [
498
+ // 2,
499
+ // 6
500
+ // ]
501
+ // },
502
+ // {
503
+ // 'split': 30,
504
+ // 'stages': [
505
+ // 3,
506
+ // 7
507
+ // ]
508
+ // },
509
+ // {
510
+ // 'split': 30,
511
+ // 'stages': [
512
+ // 4,
513
+ // 8
514
+ // ]
515
+ // }
516
+ // ],
517
+ // 'stages': [
518
+ // [
519
+ // 1,
520
+ // 5
521
+ // ],
522
+ // [
523
+ // 2,
524
+ // 6
525
+ // ],
526
+ // [
527
+ // 3,
528
+ // 7
529
+ // ],
530
+ // [
531
+ // 4,
532
+ // 8
533
+ // ]
534
+ // ]
535
+ // },
536
+ // {
537
+ // 'id': 2,
538
+ // 'desc': '方案2',
539
+ // 'offset': 0,
540
+ // 'cycle': 110,
541
+ // 'rings': [
542
+ // [
543
+ // {
544
+ // 'name': 'phase1',
545
+ // 'id': 1,
546
+ // 'value': 20,
547
+ // 'mode': 2,
548
+ // 'options': [
549
+ // 0,
550
+ // 0,
551
+ // 0
552
+ // ],
553
+ // 'minSplit': 13,
554
+ // 'delaystart': 0,
555
+ // 'advanceend': 0
556
+ // },
557
+ // {
558
+ // 'name': 'phase2',
559
+ // 'id': 2,
560
+ // 'value': 35,
561
+ // 'mode': 2,
562
+ // 'options': [
563
+ // 0,
564
+ // 0,
565
+ // 0
566
+ // ],
567
+ // 'minSplit': 13,
568
+ // 'delaystart': 0,
569
+ // 'advanceend': 0
570
+ // },
571
+ // {
572
+ // 'name': 'phase3',
573
+ // 'id': 3,
574
+ // 'value': 30,
575
+ // 'mode': 2,
576
+ // 'options': [
577
+ // 0,
578
+ // 0,
579
+ // 0
580
+ // ],
581
+ // 'minSplit': 13,
582
+ // 'delaystart': 0,
583
+ // 'advanceend': 0
584
+ // },
585
+ // {
586
+ // 'name': 'phase4',
587
+ // 'id': 4,
588
+ // 'value': 25,
589
+ // 'mode': 2,
590
+ // 'options': [
591
+ // 0,
592
+ // 0,
593
+ // 0
594
+ // ],
595
+ // 'minSplit': 13,
596
+ // 'delaystart': 0,
597
+ // 'advanceend': 0
598
+ // }
599
+ // ],
600
+ // [
601
+ // {
602
+ // 'name': 'Phase 5',
603
+ // 'id': 5,
604
+ // 'value': 27,
605
+ // 'mode': 2,
606
+ // 'options': [
607
+ // 0,
608
+ // 0,
609
+ // 0
610
+ // ],
611
+ // 'minSplit': 13,
612
+ // 'delaystart': 0,
613
+ // 'advanceend': 0
614
+ // },
615
+ // {
616
+ // 'name': 'Phase 6',
617
+ // 'id': 6,
618
+ // 'value': 28,
619
+ // 'mode': 2,
620
+ // 'options': [
621
+ // 0,
622
+ // 0,
623
+ // 0
624
+ // ],
625
+ // 'minSplit': 13,
626
+ // 'delaystart': 0,
627
+ // 'advanceend': 0
628
+ // },
629
+ // {
630
+ // 'name': 'Phase 7',
631
+ // 'id': 7,
632
+ // 'value': 35,
633
+ // 'mode': 2,
634
+ // 'options': [
635
+ // 0,
636
+ // 0,
637
+ // 0
638
+ // ],
639
+ // 'minSplit': 13,
640
+ // 'delaystart': 0,
641
+ // 'advanceend': 0
642
+ // },
643
+ // {
644
+ // 'name': 'Phase 8',
645
+ // 'id': 8,
646
+ // 'value': 20,
647
+ // 'mode': 2,
648
+ // 'options': [
649
+ // 0,
650
+ // 0,
651
+ // 0
652
+ // ],
653
+ // 'minSplit': 13,
654
+ // 'delaystart': 0,
655
+ // 'advanceend': 0
656
+ // }
657
+ // ],
658
+ // [],
659
+ // []
660
+ // ],
661
+ // 'stagesList': [
662
+ // {
663
+ // 'split': 20,
664
+ // 'stages': [
665
+ // 1,
666
+ // 5
667
+ // ],
668
+ // 'delaystart': 0,
669
+ // 'advanceend': 0
670
+ // },
671
+ // {
672
+ // 'split': 7,
673
+ // 'stages': [
674
+ // 2,
675
+ // 5
676
+ // ],
677
+ // 'delaystart': 0,
678
+ // 'advanceend': 0
679
+ // },
680
+ // {
681
+ // 'split': 28,
682
+ // 'stages': [
683
+ // 2,
684
+ // 6
685
+ // ],
686
+ // 'delaystart': 0,
687
+ // 'advanceend': 0
688
+ // },
689
+ // {
690
+ // 'split': 30,
691
+ // 'stages': [
692
+ // 3,
693
+ // 7
694
+ // ],
695
+ // 'delaystart': 0,
696
+ // 'advanceend': 0
697
+ // },
698
+ // {
699
+ // 'split': 5,
700
+ // 'stages': [
701
+ // 4,
702
+ // 7
703
+ // ],
704
+ // 'delaystart': 0,
705
+ // 'advanceend': 0
706
+ // },
707
+ // {
708
+ // 'split': 20,
709
+ // 'stages': [
710
+ // 4,
711
+ // 8
712
+ // ],
713
+ // 'delaystart': 0,
714
+ // 'advanceend': 0
715
+ // }
716
+ // ],
717
+ // 'stages': [
718
+ // [
719
+ // 1,
720
+ // 5
721
+ // ],
722
+ // [
723
+ // 2,
724
+ // 5
725
+ // ],
726
+ // [
727
+ // 2,
728
+ // 6
729
+ // ],
730
+ // [
731
+ // 3,
732
+ // 7
733
+ // ],
734
+ // [
735
+ // 4,
736
+ // 7
737
+ // ],
738
+ // [
739
+ // 4,
740
+ // 8
741
+ // ]
742
+ // ],
743
+ // 'barriers': [
744
+ // {
745
+ // 'barrier': 1,
746
+ // 'length': 55,
747
+ // 'items': [
748
+ // {
749
+ // 'ring': 2,
750
+ // 'data': [
751
+ // 5,
752
+ // 6
753
+ // ]
754
+ // },
755
+ // {
756
+ // 'ring': 1,
757
+ // 'data': [
758
+ // 1,
759
+ // 2
760
+ // ]
761
+ // }
762
+ // ]
763
+ // },
764
+ // {
765
+ // 'barrier': 2,
766
+ // 'length': 55,
767
+ // 'items': [
768
+ // {
769
+ // 'ring': 2,
770
+ // 'data': [
771
+ // 7,
772
+ // 8
773
+ // ]
774
+ // },
775
+ // {
776
+ // 'ring': 1,
777
+ // 'data': [
778
+ // 3,
779
+ // 4
780
+ // ]
781
+ // }
782
+ // ]
783
+ // }
784
+ // ]
785
+ // },
786
+ // {
787
+ // 'id': 3,
788
+ // 'desc': '方案3',
789
+ // 'offset': 0,
790
+ // 'cycle': 120,
791
+ // 'rings': [
792
+ // [
793
+ // {
794
+ // 'name': 'phase1',
795
+ // 'id': 1,
796
+ // 'value': 40,
797
+ // 'mode': 2,
798
+ // 'options': [
799
+ // 0,
800
+ // 0,
801
+ // 0
802
+ // ],
803
+ // 'minSplit': 13,
804
+ // 'delaystart': 0,
805
+ // 'advanceend': 0
806
+ // },
807
+ // {
808
+ // 'name': 'phase2',
809
+ // 'id': 2,
810
+ // 'value': 20,
811
+ // 'mode': 2,
812
+ // 'options': [
813
+ // 0,
814
+ // 0,
815
+ // 0
816
+ // ],
817
+ // 'minSplit': 13,
818
+ // 'delaystart': 0,
819
+ // 'advanceend': 0
820
+ // },
821
+ // {
822
+ // 'name': 'phase3',
823
+ // 'id': 3,
824
+ // 'value': 30,
825
+ // 'mode': 2,
826
+ // 'options': [
827
+ // 0,
828
+ // 0,
829
+ // 0
830
+ // ],
831
+ // 'minSplit': 13,
832
+ // 'delaystart': 0,
833
+ // 'advanceend': 0
834
+ // },
835
+ // {
836
+ // 'name': 'phase4',
837
+ // 'id': 4,
838
+ // 'value': 30,
839
+ // 'mode': 2,
840
+ // 'options': [
841
+ // 0,
842
+ // 0,
843
+ // 0
844
+ // ],
845
+ // 'minSplit': 13,
846
+ // 'delaystart': 0,
847
+ // 'advanceend': 0
848
+ // }
849
+ // ],
850
+ // [
851
+ // {
852
+ // 'name': 'Phase 5',
853
+ // 'id': 5,
854
+ // 'value': 20,
855
+ // 'mode': 2,
856
+ // 'options': [
857
+ // 0,
858
+ // 0,
859
+ // 0
860
+ // ],
861
+ // 'minSplit': 13,
862
+ // 'delaystart': 0,
863
+ // 'advanceend': 0
864
+ // },
865
+ // {
866
+ // 'name': 'Phase 6',
867
+ // 'id': 6,
868
+ // 'value': 40,
869
+ // 'mode': 2,
870
+ // 'options': [
871
+ // 0,
872
+ // 0,
873
+ // 0
874
+ // ],
875
+ // 'minSplit': 13,
876
+ // 'delaystart': 0,
877
+ // 'advanceend': 0
878
+ // },
879
+ // {
880
+ // 'name': 'Phase 7',
881
+ // 'id': 7,
882
+ // 'value': 30,
883
+ // 'mode': 2,
884
+ // 'options': [
885
+ // 0,
886
+ // 0,
887
+ // 0
888
+ // ],
889
+ // 'minSplit': 13,
890
+ // 'delaystart': 0,
891
+ // 'advanceend': 0
892
+ // },
893
+ // {
894
+ // 'name': 'Phase 8',
895
+ // 'id': 8,
896
+ // 'value': 30,
897
+ // 'mode': 2,
898
+ // 'options': [
899
+ // 0,
900
+ // 0,
901
+ // 0
902
+ // ],
903
+ // 'minSplit': 13,
904
+ // 'delaystart': 0,
905
+ // 'advanceend': 0
906
+ // }
907
+ // ],
908
+ // [],
909
+ // []
910
+ // ],
911
+ // 'stagesList': [
912
+ // {
913
+ // 'split': 20,
914
+ // 'stages': [
915
+ // 1,
916
+ // 5
917
+ // ],
918
+ // 'delaystart': 0,
919
+ // 'advanceend': 0
920
+ // },
921
+ // {
922
+ // 'split': 20,
923
+ // 'stages': [
924
+ // 1,
925
+ // 6
926
+ // ],
927
+ // 'delaystart': 0,
928
+ // 'advanceend': 0
929
+ // },
930
+ // {
931
+ // 'split': 20,
932
+ // 'stages': [
933
+ // 2,
934
+ // 6
935
+ // ],
936
+ // 'delaystart': 0,
937
+ // 'advanceend': 0
938
+ // },
939
+ // {
940
+ // 'split': 30,
941
+ // 'stages': [
942
+ // 3,
943
+ // 7
944
+ // ],
945
+ // 'delaystart': 0,
946
+ // 'advanceend': 0
947
+ // },
948
+ // {
949
+ // 'split': 30,
950
+ // 'stages': [
951
+ // 4,
952
+ // 8
953
+ // ],
954
+ // 'delaystart': 0,
955
+ // 'advanceend': 0
956
+ // }
957
+ // ],
958
+ // 'stages': [
959
+ // [
960
+ // 1,
961
+ // 5
962
+ // ],
963
+ // [
964
+ // 1,
965
+ // 6
966
+ // ],
967
+ // [
968
+ // 2,
969
+ // 6
970
+ // ],
971
+ // [
972
+ // 3,
973
+ // 7
974
+ // ],
975
+ // [
976
+ // 4,
977
+ // 8
978
+ // ]
979
+ // ],
980
+ // 'barriers': [
981
+ // {
982
+ // 'barrier': 1,
983
+ // 'length': 60,
984
+ // 'items': [
985
+ // {
986
+ // 'ring': 2,
987
+ // 'data': [
988
+ // 5,
989
+ // 6
990
+ // ]
991
+ // },
992
+ // {
993
+ // 'ring': 1,
994
+ // 'data': [
995
+ // 1,
996
+ // 2
997
+ // ]
998
+ // }
999
+ // ]
1000
+ // },
1001
+ // {
1002
+ // 'barrier': 2,
1003
+ // 'length': 60,
1004
+ // 'items': [
1005
+ // {
1006
+ // 'ring': 2,
1007
+ // 'data': [
1008
+ // 7,
1009
+ // 8
1010
+ // ]
1011
+ // },
1012
+ // {
1013
+ // 'ring': 1,
1014
+ // 'data': [
1015
+ // 3,
1016
+ // 4
1017
+ // ]
1018
+ // }
1019
+ // ]
1020
+ // }
1021
+ // ]
1022
+ // }
1023
+ // ],
1024
+ manualInfo: {
1025
+ tempPatternid: '',
1026
+ offset: 0,
1027
+ duration: 300,
1028
+ tempDelay: 0 // 控制方式手动操作的情况下的延迟时间的临时值。
1029
+ // tempDuration: 300 // 控制方式手动操作的情况下的持续时间的临时值。
1030
+ }
1031
+ }
1032
+ },
1033
+ created () {
1034
+ this.patternPlan()
1035
+ this.getCycle()
1036
+ if (this.patternOne.length === 0) {
1037
+ this.handleStageData(this.planPattern.rings)
1038
+ }
1039
+ this.initData()
1040
+ },
1041
+ methods: {
1042
+ patternPlan () {
1043
+ let Pattern = {
1044
+ offset: 0,
1045
+ cycle: 0,
1046
+ rings: [[], [], [], []]
1047
+ }
1048
+ var newPattern = JSON.parse(JSON.stringify(Pattern))
1049
+ for (let phase of this.phaseList) {
1050
+ let ring = {}
1051
+ ring.name = 'Phase ' + phase.id
1052
+ ring.desc = this.getPhaseDescription(phase.direction)
1053
+ ring.id = phase.id
1054
+ ring.value = 30
1055
+ ring.mode = 2
1056
+ ring.options = []
1057
+ ring.delaystart = 0
1058
+ ring.advanceend = 0
1059
+ if (phase.ring === 1) {
1060
+ newPattern.rings[0].push(ring)
1061
+ } else if (phase.ring === 2) {
1062
+ newPattern.rings[1].push(ring)
1063
+ } else if (phase.ring === 3) {
1064
+ newPattern.rings[2].push(ring)
1065
+ } else if (phase.ring === 4) {
1066
+ newPattern.rings[3].push(ring)
1067
+ }
1068
+ }
1069
+ this.planPattern = newPattern
1070
+ },
1071
+ getCycle () {
1072
+ for (let rings of this.planPattern.rings) {
1073
+ let num = 0
1074
+ for (let i = 0; i < rings.length; i++) {
1075
+ if (rings[i].length !== 0) {
1076
+ if (rings[i].mode === 7) { // 忽略相位不计周期
1077
+ continue
1078
+ }
1079
+ num = num + Number(rings[i].value)
1080
+ }
1081
+ }
1082
+ if (num !== 0) {
1083
+ this.planPattern.cycle = num
1084
+ break
1085
+ }
1086
+ }
1087
+ },
1088
+ getPhaseDescription (phaseList) {
1089
+ if (!phaseList) return
1090
+ let list = []
1091
+ for (let id of phaseList) {
1092
+ let obj = {}
1093
+ obj.id = id
1094
+ obj.color = '#454545'
1095
+ list.push(obj)
1096
+ }
1097
+ return list
1098
+ },
1099
+ handleClose () {
1100
+ this.$emit('closePhaseBack')
1101
+ },
1102
+ onStageSplitChange (diff, rowIndex, subIndex) {
1103
+ let stageArr = this.stagesList[subIndex].stages
1104
+ let row = this.patternList[rowIndex]
1105
+ let ringsList = row.rings
1106
+ for (let rings of ringsList) {
1107
+ for (let ring of rings) {
1108
+ if (stageArr.includes(ring.id)) {
1109
+ ring.value = (ring.value ? ring.value : 0) + diff
1110
+ continue
1111
+ }
1112
+ }
1113
+ }
1114
+ },
1115
+ stageSplitChange (diff, rowIndex, subIndex) {
1116
+ let row = this.patternList[rowIndex]
1117
+ let ringsList = row.stagesList
1118
+ for (let rings of ringsList) {
1119
+ if (subIndex === rings.key) {
1120
+ rings.stageSplit = (rings.green ? rings.green : 0) + (rings.yellow ? rings.yellow : 0) + (rings.red ? rings.red : 0)
1121
+ continue
1122
+ }
1123
+ }
1124
+ },
1125
+ onStageDelaystartChange (diff, rowIndex, subIndex) {
1126
+ let stageArr = this.stagesList[subIndex].stages
1127
+ let row = this.patternList[rowIndex]
1128
+ let ringsList = row.rings
1129
+ for (let rings of ringsList) {
1130
+ for (let ring of rings) {
1131
+ if (stageArr.includes(ring.id)) {
1132
+ ring.delaystart = (ring.delaystart ? ring.delaystart : 0) + diff
1133
+ continue
1134
+ }
1135
+ }
1136
+ }
1137
+ },
1138
+ onStageAdvanceendChange (diff, rowIndex, subIndex) {
1139
+ let stageArr = this.stagesList[subIndex].stages
1140
+ let row = this.patternList[rowIndex]
1141
+ let ringsList = row.rings
1142
+ for (let rings of ringsList) {
1143
+ for (let ring of rings) {
1144
+ if (stageArr.includes(ring.id)) {
1145
+ ring.advanceend = (ring.advanceend ? ring.advanceend : 0) + diff
1146
+ continue
1147
+ }
1148
+ }
1149
+ }
1150
+ },
1151
+ handleSplit (index) {
1152
+ if (this.patternOne.length > 0) {
1153
+ let currPattern = this.patternOne[0].rings
1154
+ setTimeout(() => {
1155
+ this.handleStageData(currPattern)
1156
+ }, 50)
1157
+ } else {
1158
+ let currPattern = this.planPattern.rings
1159
+ setTimeout(() => {
1160
+ this.handleStageData(currPattern)
1161
+ }, 50)
1162
+ }
1163
+ },
1164
+ selectPattern () {
1165
+ this.manualInfo.offset = 0
1166
+ let selectId = isNaN(parseInt(this.manualInfo.tempPatternid)) ? Number(this.manualInfo.tempPatternid.replace(/[^0-9]/ig, '')) : this.manualInfo.tempPatternid
1167
+ this.patternOne = this.allPatternList.filter(item => {
1168
+ return item.id === selectId
1169
+ })
1170
+ this.manualInfo.offset = this.offset
1171
+ for (let rings of this.patternOne[0].rings) {
1172
+ if (rings.length === 0) continue
1173
+ for (let ring of rings) {
1174
+ if (ring.value === 0) continue
1175
+ let currPhase = this.phaseList.filter((item) => {
1176
+ return item.id === ring.id
1177
+ })[0]
1178
+ ring.desc = currPhase.direction.map(item => {
1179
+ return {
1180
+ id: item,
1181
+ color: '#454545'
1182
+ }
1183
+ })
1184
+ }
1185
+ }
1186
+ this.handleStageData(this.patternOne[0].rings)
1187
+ },
1188
+ handleStageData (rings) { // stagesList
1189
+ for (let i = 0; i < rings.length; i++) {
1190
+ if (rings[i].length > 0) {
1191
+ let phaseList = []
1192
+ let stagesList = []
1193
+ // rings = JSON.parse(JSON.stringify(rings))
1194
+ let mapAdd = rings.map(item => {
1195
+ return item.map(val => {
1196
+ return val.value + (val.sum ? val.sum : 0)
1197
+ })
1198
+ })
1199
+ let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
1200
+ return item.length > 0 ? item.reduce((a, b) => {
1201
+ return a + b
1202
+ }) : 0
1203
+ }) : 0
1204
+ this.max = Math.max(...maxCycle)// 每个环的周期最大值
1205
+ this.stateList = [0]
1206
+ this.narr = []
1207
+ let currentIds = ''
1208
+ let lastCurrentIds = ''
1209
+ for (let j = 0; j <= this.max; j++) { // 指针长度
1210
+ for (let i = 0; i < rings.length; i++) { // 环列表
1211
+ let ring = rings[i]// 每个环对象
1212
+ let sum = 0
1213
+ for (let n = 0; n < ring.length; n++) { // 相位累计长度
1214
+ if (ring[n].mode !== 7) {
1215
+ sum = sum + ring[n].value + (ring[n].sum ? ring[n].sum : 0)
1216
+ if (j < sum) {
1217
+ let phaseId = ring[n].id
1218
+ currentIds = currentIds + '-' + phaseId
1219
+ break
1220
+ }
1221
+ }
1222
+ }
1223
+ }
1224
+ if (lastCurrentIds !== currentIds && lastCurrentIds !== '') { // 当前相位id和上一个相比不同说明相位变化了
1225
+ phaseList.push(lastCurrentIds)
1226
+ this.stateList.push(j)// 阶段累计长度的集合
1227
+ }
1228
+ lastCurrentIds = currentIds
1229
+ currentIds = ''
1230
+ }
1231
+ let newPhaselist = []
1232
+ phaseList.forEach(i => {
1233
+ let rangeArr = i.split('-').map(Number)
1234
+ if (rangeArr.length > 2) {
1235
+ newPhaselist.push([
1236
+ JSON.parse(JSON.stringify(rangeArr[1])),
1237
+ JSON.parse(JSON.stringify(rangeArr[2]))
1238
+ ])
1239
+ } else {
1240
+ newPhaselist.push([
1241
+ JSON.parse(JSON.stringify(rangeArr[1]))
1242
+ ])
1243
+ }
1244
+ })
1245
+ for (let i = this.stateList.length - 1; i >= 1; i--) {
1246
+ this.narr.push(this.stateList[i] - this.stateList[i - 1])
1247
+ }
1248
+ // newPhaselist
1249
+ this.narr.reverse()// 阶段差
1250
+ for (let i = 0; i < newPhaselist.length; i++) {
1251
+ let stage = JSON.parse(JSON.stringify(newPhaselist[i]))
1252
+ let stageItem = this.getStageItem(stage, rings, i)
1253
+ stagesList.push(JSON.parse(JSON.stringify(stageItem)))
1254
+ }
1255
+ this.stagesList = JSON.parse(JSON.stringify(stagesList))
1256
+ }
1257
+ }
1258
+ },
1259
+ getStageItem (stageArr, ringsList, i) {
1260
+ let res = {
1261
+ key: i,
1262
+ split: this.narr[i], // 阶段绿性比
1263
+ stages: stageArr,
1264
+ delaystart: 0,
1265
+ advanceend: 0
1266
+ }
1267
+ // let splitArr = []
1268
+ let delaystartArr = []
1269
+ let advanceendArr = []
1270
+ for (let rings of ringsList) {
1271
+ for (let ring of rings) {
1272
+ if (stageArr.includes(ring.id)) {
1273
+ // let split = ring.value
1274
+ let delaystart = ring.delaystart
1275
+ let advanceend = ring.advanceend
1276
+ // splitArr.push(split)
1277
+ delaystartArr.push(delaystart)
1278
+ advanceendArr.push(advanceend)
1279
+ }
1280
+ }
1281
+ }
1282
+ // splitArr.sort(function (a, b) { return a - b })
1283
+ delaystartArr.sort(function (a, b) { return b - a })
1284
+ advanceendArr.sort(function (a, b) { return a - b })
1285
+ // res.split = splitArr.length > 0 ? splitArr[0] : 0
1286
+ res.delaystart = delaystartArr.length > 0 ? delaystartArr[0] : 0
1287
+ res.advanceend = advanceendArr.length > 0 ? advanceendArr[0] : 0
1288
+ return res
1289
+ },
1290
+ initData () {
1291
+ // 判断有几个环,就创建几个看板
1292
+ // let phaseList = this.globalParamModel.getParamsByType('phaseList')
1293
+ this.coordphaseOption = this.phaseList.map(ele => {
1294
+ return {
1295
+ value: ele.id
1296
+ }
1297
+ })
1298
+ // this.overlap = this.globalParamModel.getParamsByType('overlaplList')
1299
+ // this.agentId = getIframdevid()
1300
+ let rings = []
1301
+ if (this.phaseList.length === 0) {
1302
+ // this.$store.getters.tscParam.patternList = []
1303
+ return
1304
+ }
1305
+ for (let phase of this.phaseList) {
1306
+ rings.push(phase.ring)
1307
+ }
1308
+ this.ringCount = Array.from(new Set(rings)) // 去除数组重复的元素
1309
+ this.ringCount = this.ringCount.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
1310
+ this.ringCounts = Array.from(new Set(rings)) // 去除数组重复的元素
1311
+ this.ringCounts = this.ringCounts.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
1312
+ // this.increaseId()
1313
+ // this.getCycle()
1314
+ // this.updatePhaseDescription()
1315
+ // this.getOptionsOfRing()
1316
+ },
1317
+ sortNumbers (a, b) {
1318
+ return a - b
1319
+ },
1320
+ isRingCycleEqual (rings) {
1321
+ let isequal = true
1322
+ // this.patternmsg = []
1323
+ let maxCycle = 0
1324
+ for (let ring of rings) {
1325
+ if (ring.length === 0) continue
1326
+ let cycle = 0
1327
+ for (let r of ring) {
1328
+ if (r.mode === 7) { // 忽略相位不计周期
1329
+ continue
1330
+ }
1331
+ cycle = cycle + r.value
1332
+ }
1333
+ if (cycle > maxCycle && maxCycle === 0) {
1334
+ maxCycle = cycle
1335
+ }
1336
+ if (cycle !== maxCycle) {
1337
+ // this.patternmsg.push(rings.id)
1338
+ isequal = false
1339
+ }
1340
+ }
1341
+ return isequal
1342
+ },
1343
+ checkPatternRules (rings) {
1344
+ if (!this.isRingCycleEqual(rings)) {
1345
+ this.patternCycleEqual = false
1346
+ } else {
1347
+ this.patternCycleEqual = true
1348
+ }
1349
+ if (!this.patternCycleEqual) {
1350
+ let mess = `方案中存在环周期时长不一致`
1351
+ if (this.$i18n.locale === 'en') {
1352
+ mess = `Inconsistent loop cycle durations exist in the scheme`
1353
+ }
1354
+ this.$message({
1355
+ message: mess,
1356
+ type: 'error',
1357
+ dangerouslyUseHTMLString: true
1358
+ })
1359
+ return false
1360
+ }
1361
+ },
1362
+ handleManualControl () {
1363
+ let submitdata = {
1364
+ control: 100,
1365
+ delay: this.manualInfo.tempDelay !== undefined ? Number(this.manualInfo.tempDelay) : 0,
1366
+ duration: Number(this.manualInfo.duration),
1367
+ // duration: this.manualInfo.tempDuration !== undefined ? Number(this.manualInfo.tempDuration) : 0,
1368
+ data: {}
1369
+ }
1370
+ submitdata.data.offset = this.offset
1371
+ submitdata.data.cycle = this.cycle
1372
+ submitdata.data.rings = this.rings
1373
+ this.checkPatternRules(submitdata.data.rings)
1374
+ if (this.patternCycleEqual) {
1375
+ this.$emit('closePhaseControl', submitdata)
1376
+ }
1377
+ }
1378
+ }
1379
+ }
1380
+ </script>
1381
+
1382
+ <style>
1383
+
1384
+ </style>