openatc-components 0.0.57 → 0.0.58

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