openatc-components 0.1.7 → 0.1.9

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.vue +157 -157
  51. package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  52. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  53. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  54. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  55. package/package/kisscomps/components/DrawChannelization/index.js +2 -2
  56. package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  57. package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +114 -114
  58. package/package/kisscomps/components/ExpendConfig/index.js +2 -2
  59. package/package/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +170 -170
  60. package/package/kisscomps/components/FaultDetailModal/index.js +2 -2
  61. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +497 -497
  62. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  63. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  64. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  65. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  66. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  67. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  68. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  69. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1179 -1179
  70. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  71. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  72. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  73. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  74. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  75. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  76. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  77. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  78. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  79. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  80. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  81. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  82. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  83. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  84. package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  85. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +913 -913
  86. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +112 -112
  87. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +112 -112
  88. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +111 -111
  89. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  90. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  91. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +99 -99
  92. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +99 -99
  93. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  94. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +99 -99
  95. package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +78 -78
  96. package/package/kisscomps/components/IntersectionMap/index.js +2 -2
  97. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +154 -154
  98. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +521 -518
  99. package/package/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  100. package/package/kisscomps/components/KanBan/index.js +2 -2
  101. package/package/kisscomps/components/KanBan/kanban.vue +219 -219
  102. package/package/kisscomps/components/MessageBox/index.vue +96 -96
  103. package/package/kisscomps/components/OverLap/OverLap.vue +207 -207
  104. package/package/kisscomps/components/OverLap/index.js +2 -2
  105. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +962 -962
  106. package/package/kisscomps/components/PatternStatus/index.js +2 -2
  107. package/package/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  108. package/package/kisscomps/components/PatternWalkSvg/index.js +2 -2
  109. package/package/kisscomps/components/PhaseMarker/index.js +6 -6
  110. package/package/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  111. package/package/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  112. package/package/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  113. package/package/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  114. package/package/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  115. package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  116. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +760 -760
  117. package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  118. package/package/kisscomps/components/SchemeConfig/index.js +2 -2
  119. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  120. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +219 -219
  121. package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +190 -190
  122. package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  123. package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +269 -269
  124. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1387 -1387
  125. package/package/kisscomps/components/StageBord/StageBord.vue +242 -242
  126. package/package/kisscomps/components/StageBord/index.js +2 -2
  127. package/package/kisscomps/components/StageStatus/StageStatus.vue +310 -310
  128. package/package/kisscomps/components/StageStatus/index.js +2 -2
  129. package/package/kisscomps/components/Stages/index.vue +139 -139
  130. package/package/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  131. package/package/kisscomps/components/SvgIcon/index.js +2 -2
  132. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +522 -522
  133. package/package/kisscomps/components/XRDDirSelector/index.js +2 -2
  134. package/package/kisscomps/components/overView/index.vue +679 -679
  135. package/package/kisscomps/components/patternList/index.js +2 -2
  136. package/package/kisscomps/components/patternList/patternList.vue +567 -567
  137. package/package/kisscomps/index.js +106 -106
  138. package/package/kissui.min.js +1 -1
  139. package/package.json +124 -124
  140. package/src/App.vue +24 -24
  141. package/src/EdgeMgr/EdgeModelBase.js +16 -16
  142. package/src/EdgeMgr/controller/crossDiagramMgr.js +120 -120
  143. package/src/api/authapi.js +31 -31
  144. package/src/api/config.js +21 -21
  145. package/src/api/control.js +76 -76
  146. package/src/api/cross.js +33 -33
  147. package/src/api/fault.js +66 -66
  148. package/src/api/index.js +24 -24
  149. package/src/api/login.js +46 -46
  150. package/src/api/optimize.js +72 -72
  151. package/src/api/param.js +154 -154
  152. package/src/api/passwdAssest.js +101 -101
  153. package/src/api/template.js +27 -27
  154. package/src/i18n/index.js +26 -26
  155. package/src/i18n/language/en.js +1227 -1227
  156. package/src/i18n/language/index.js +25 -25
  157. package/src/i18n/language/zh.js +1226 -1226
  158. package/src/icons/demo.css +539 -539
  159. package/src/icons/iconfont.css +835 -835
  160. package/src/icons/iconfont.json +1444 -1444
  161. package/src/icons/index.js +20 -20
  162. package/src/icons/svg/bendi.svg +110 -110
  163. package/src/icons/svg/bujin.svg +36 -36
  164. package/src/icons/svg/connectBlue.svg +7 -7
  165. package/src/icons/svg/currentvolume.svg +0 -0
  166. package/src/icons/svg/custom-BRTlane.svg +40 -40
  167. package/src/icons/svg/custom-buslane.svg +40 -40
  168. package/src/icons/svg/custom-detector.svg +12 -12
  169. package/src/icons/svg/custom-east-bottom.svg +32 -32
  170. package/src/icons/svg/custom-east-top.svg +32 -32
  171. package/src/icons/svg/custom-ewped.svg +35 -35
  172. package/src/icons/svg/custom-nonmotorizedlane.svg +40 -40
  173. package/src/icons/svg/custom-north-left.svg +32 -32
  174. package/src/icons/svg/custom-north-right.svg +32 -32
  175. package/src/icons/svg/custom-peddetector.svg +17 -17
  176. package/src/icons/svg/custom-snped.svg +35 -35
  177. package/src/icons/svg/custom-south-left.svg +32 -32
  178. package/src/icons/svg/custom-south-right.svg +32 -32
  179. package/src/icons/svg/custom-tramlane.svg +40 -40
  180. package/src/icons/svg/custom-vehiclebranch.svg +40 -40
  181. package/src/icons/svg/custom-vehiclemainroad.svg +41 -41
  182. package/src/icons/svg/custom-west-bottom.svg +32 -32
  183. package/src/icons/svg/custom-west-top.svg +32 -32
  184. package/src/icons/svg/custom-xlped.svg +14 -14
  185. package/src/icons/svg/custom-xrped.svg +14 -14
  186. package/src/icons/svg/cutRed.svg +7 -7
  187. package/src/icons/svg/cycle.svg +0 -0
  188. package/src/icons/svg/dingzhouqi.svg +34 -34
  189. package/src/icons/svg/ganyingkongzhi.svg +30 -30
  190. package/src/icons/svg/guandeng.svg +81 -81
  191. package/src/icons/svg/huangshan.svg +71 -71
  192. package/src/icons/svg/maincontrol.svg +0 -0
  193. package/src/icons/svg/manualcontrolbackground.svg +51 -51
  194. package/src/icons/svg/manualcontrolbackground1.svg +62 -62
  195. package/src/icons/svg/manualcontrolbackgrounden.svg +62 -62
  196. package/src/icons/svg/model.svg +0 -0
  197. package/src/icons/svg/phasediff.svg +0 -0
  198. package/src/icons/svg/quanhong.svg +86 -86
  199. package/src/icons/svg/shanghe.svg +11 -11
  200. package/src/icons/svg/shoudong.svg +103 -103
  201. package/src/icons/svg/time.svg +0 -0
  202. package/src/icons/svg/wuxianlan.svg +46 -46
  203. package/src/icons/svg/xiala.svg +11 -11
  204. package/src/icons/svg/xingrenguojie.svg +33 -33
  205. package/src/icons/svg/xitong.svg +89 -89
  206. package/src/icons/svg/youxian.svg +41 -41
  207. package/src/icons/svg/zizhukongzhi.svg +43 -43
  208. package/src/kisscomps/components/BoardCard/BoardCard.vue +94 -94
  209. package/src/kisscomps/components/BoardCard/index.js +2 -2
  210. package/src/kisscomps/components/Channelization/Channelization.vue +544 -544
  211. package/src/kisscomps/components/Channelization/index.js +2 -2
  212. package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +349 -349
  213. package/src/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -2
  214. package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +494 -494
  215. package/src/kisscomps/components/ChannelizationWithInterface/index.js +2 -2
  216. package/src/kisscomps/components/CommonKanban/CommonKanban.vue +118 -118
  217. package/src/kisscomps/components/CommonKanban/index.js +2 -2
  218. package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +165 -165
  219. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
  220. package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
  221. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
  222. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
  223. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
  224. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
  225. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
  226. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
  227. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
  228. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
  229. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +455 -455
  230. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +219 -219
  231. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
  232. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +992 -992
  233. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +110 -110
  234. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +699 -699
  235. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +157 -157
  236. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +157 -157
  237. package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
  238. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
  239. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
  240. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
  241. package/src/kisscomps/components/DrawChannelization/index.js +2 -2
  242. package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
  243. package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +114 -114
  244. package/src/kisscomps/components/ExpendConfig/index.js +2 -2
  245. package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +170 -170
  246. package/src/kisscomps/components/FaultDetailModal/index.js +2 -2
  247. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +497 -497
  248. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
  249. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +300 -300
  250. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +288 -288
  251. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +391 -391
  252. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +336 -336
  253. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +345 -345
  254. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +389 -389
  255. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1179 -1179
  256. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +402 -402
  257. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +361 -361
  258. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +368 -368
  259. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +475 -475
  260. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +494 -494
  261. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +401 -401
  262. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +360 -360
  263. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +367 -367
  264. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +476 -476
  265. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
  266. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
  267. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
  268. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
  269. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
  270. package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
  271. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +913 -913
  272. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +112 -112
  273. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +112 -112
  274. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +111 -111
  275. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
  276. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
  277. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +99 -99
  278. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +99 -99
  279. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
  280. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +99 -99
  281. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +78 -78
  282. package/src/kisscomps/components/IntersectionMap/index.js +2 -2
  283. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +154 -154
  284. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +521 -518
  285. package/src/kisscomps/components/IntersectionWithInterface/index.js +2 -2
  286. package/src/kisscomps/components/KanBan/index.js +2 -2
  287. package/src/kisscomps/components/KanBan/kanban.vue +219 -219
  288. package/src/kisscomps/components/MessageBox/index.vue +96 -96
  289. package/src/kisscomps/components/OverLap/OverLap.vue +207 -207
  290. package/src/kisscomps/components/OverLap/index.js +2 -2
  291. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +962 -962
  292. package/src/kisscomps/components/PatternStatus/index.js +2 -2
  293. package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
  294. package/src/kisscomps/components/PatternWalkSvg/index.js +2 -2
  295. package/src/kisscomps/components/PhaseMarker/index.js +6 -6
  296. package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
  297. package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
  298. package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
  299. package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
  300. package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
  301. package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
  302. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +760 -760
  303. package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +195 -195
  304. package/src/kisscomps/components/SchemeConfig/index.js +2 -2
  305. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +198 -198
  306. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +219 -219
  307. package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +190 -190
  308. package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
  309. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +269 -269
  310. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1387 -1387
  311. package/src/kisscomps/components/StageBord/StageBord.vue +242 -242
  312. package/src/kisscomps/components/StageBord/index.js +2 -2
  313. package/src/kisscomps/components/StageStatus/StageStatus.vue +310 -310
  314. package/src/kisscomps/components/StageStatus/index.js +2 -2
  315. package/src/kisscomps/components/Stages/index.vue +139 -139
  316. package/src/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
  317. package/src/kisscomps/components/SvgIcon/index.js +2 -2
  318. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +522 -522
  319. package/src/kisscomps/components/XRDDirSelector/index.js +2 -2
  320. package/src/kisscomps/components/overView/index.vue +679 -679
  321. package/src/kisscomps/components/patternList/index.js +2 -2
  322. package/src/kisscomps/components/patternList/patternList.vue +567 -567
  323. package/src/kisscomps/index.js +106 -106
  324. package/src/lib/publicjs/ArryListUtil.js +38 -38
  325. package/src/lib/publicjs/HttpurlMgr.js +45 -45
  326. package/src/lib/publicjs/KissApi.js +158 -158
  327. package/src/lib/publicjs/KissWSSub/Heartcheck.js +128 -128
  328. package/src/lib/publicjs/KissWSSub/KissWsSub.js +91 -91
  329. package/src/lib/publicjs/KissWSSub/KissWsSubByType.js +152 -152
  330. package/src/lib/publicjs/KissWSSub/SimuWsSubByType.js +44 -44
  331. package/src/lib/publicjs/KissWSSub/Sub.js +51 -51
  332. package/src/lib/publicjs/KissWSSub/SubChannel.js +119 -119
  333. package/src/lib/publicjs/basecomponents.js +65 -65
  334. package/src/lib/publicjs/localStorage.js +112 -112
  335. package/src/lib/publicjs/objdeepcopy.js +32 -32
  336. package/src/lib/publicjs/pageScroll.js +30 -30
  337. package/src/lib/publicjs/passwdAssest.js +101 -101
  338. package/src/lib/publicjs/styleclassfactory.js +32 -32
  339. package/src/main.js +50 -50
  340. package/src/router/index.js +42 -42
  341. package/src/store/getters.js +16 -16
  342. package/src/store/index.js +26 -26
  343. package/src/store/modules/globalParam.js +67 -67
  344. package/src/utils/ControlFormat.js +68 -68
  345. package/src/utils/RingDataModel.js +191 -191
  346. package/src/utils/auth.js +111 -111
  347. package/src/utils/dateFormat.js +41 -41
  348. package/src/utils/errorcode.js +224 -224
  349. package/src/utils/fault.js +195 -195
  350. package/src/utils/faultcode.js +209 -209
  351. package/src/utils/index.js +69 -69
  352. package/src/utils/pedphasedesc.js +119 -119
  353. package/src/utils/phasedesc.js +124 -124
  354. package/src/utils/responseMessage.js +21 -21
  355. package/src/utils/validate.js +43 -43
  356. package/src/views/customchannelization.vue +49 -49
  357. package/src/views/home.1.vue +479 -479
  358. package/src/views/home.vue +78 -78
  359. package/src/views/intersection.vue +308 -308
  360. package/src/views/overView.vue +41 -41
  361. package/src/views/schemeconfig.vue +165 -165
  362. package/static/apiconfig.json +351 -351
  363. package/static/styles/channelizatioon.scss +414 -414
  364. package/static/styles/common.scss +20 -20
  365. package/static/styles/commonkanban.scss +87 -87
  366. package/static/styles/dark/index.scss +2 -2
  367. package/static/styles/dark/theme/element-dark.scss +42 -42
  368. package/static/styles/index.scss +84 -84
  369. package/static/styles/intersection.scss +170 -170
  370. package/static/styles/light/index.scss +2 -2
  371. package/static/styles/light/theme/element-light.scss +42 -42
  372. package/static/styles/overview.scss +371 -371
  373. package/static/styles/schemeconfig.scss +457 -457
  374. package/static/styles/stages.scss +64 -64
  375. package/static/token.json +2 -2
  376. package/test/e2e/custom-assertions/elementCount.js +27 -27
  377. package/test/e2e/nightwatch.conf.js +46 -46
  378. package/test/e2e/runner.js +48 -48
  379. package/test/e2e/specs/test.js +19 -19
  380. package/test/unit/.eslintrc +7 -7
  381. package/test/unit/jest.conf.js +30 -30
  382. package/test/unit/setup.js +3 -3
  383. package/test/unit/specs/HelloWorld.spec.js +11 -11
  384. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
  385. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
@@ -1,1387 +1,1387 @@
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">
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>