openatc-components 0.0.45 → 0.0.46

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 +1412 -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 +1412 -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,1412 @@
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
+ 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>