openatc-components 0.1.9 → 0.1.11

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