openatc-components 0.0.77 → 0.0.80

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