openatc-components 0.0.45 → 0.0.48

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