openatc-components 0.0.48 → 0.0.51

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